Commit 6156e91d3b7a10f1dbe73dca84b2831d034d1435
1 parent
05109f1905
Exists in
dev
#fix:新增大同高危因素提醒
Showing 2 changed files with 149 additions and 54 deletions
platform-biz-service/src/main/resources/mainOrm/master/MasterRis.xml
View file @
6156e91
| ... | ... | @@ -4,55 +4,147 @@ |
| 4 | 4 | |
| 5 | 5 | <insert id="saveRisData" parameterType="com.lyms.platform.permission.model.RisReportModel"> |
| 6 | 6 | INSERT INTO ris_report_info( |
| 7 | - R_ID, | |
| 8 | - TITLE, | |
| 9 | - TYPE, | |
| 10 | - VCCARDNO, | |
| 11 | - NAME, | |
| 12 | - BHNUM, | |
| 13 | - PHONE, | |
| 14 | - AGE, | |
| 15 | - SEX, | |
| 16 | - IMGS, | |
| 17 | - ITEM_FINDING, | |
| 18 | - ITEM_DIAGNOSIS, | |
| 19 | - ITEM_RESULT, | |
| 20 | - APPLY_TIME, | |
| 21 | - CHECK_TIME, | |
| 22 | - PUBLISH_TIME, | |
| 23 | - APPLY_DOCTOR, | |
| 24 | - APPLY_DEPT, | |
| 25 | - CHECKER, | |
| 26 | - MODIFIED, | |
| 27 | - CREATED, | |
| 28 | - HOSPITAL_ID, | |
| 29 | - ITEM_JSON | |
| 7 | + <if test="r_id != null and r_id!= ''"> | |
| 8 | + R_ID, | |
| 9 | + </if> | |
| 10 | + <if test="title != null and title!= ''"> | |
| 11 | + TITLE, | |
| 12 | + </if> | |
| 13 | + <if test="type != null and type!= ''"> | |
| 14 | + TYPE, | |
| 15 | + </if> | |
| 16 | + <if test="vccardno != null and vccardno!= ''"> | |
| 17 | + VCCARDNO, | |
| 18 | + </if> | |
| 19 | + <if test="name != null and name!= ''"> | |
| 20 | + NAME, | |
| 21 | + </if> | |
| 22 | + <if test="bhnum != null and bhnum!= ''"> | |
| 23 | + BHNUM, | |
| 24 | + </if> | |
| 25 | + <if test="phone != null and phone!= ''"> | |
| 26 | + phone, | |
| 27 | + </if> | |
| 28 | + <if test="age != null and age!= ''"> | |
| 29 | + AGE, | |
| 30 | + </if> | |
| 31 | + <if test="sex != null and sex!= ''"> | |
| 32 | + SEX, | |
| 33 | + </if> | |
| 34 | + <if test="imgs != null and imgs!= ''"> | |
| 35 | + IMGS, | |
| 36 | + </if> | |
| 37 | + <if test="item_finding != null and item_finding!= ''"> | |
| 38 | + ITEM_FINDING, | |
| 39 | + </if> | |
| 40 | + <if test="item_diagnosis != null and item_diagnosis!= ''"> | |
| 41 | + ITEM_DIAGNOSIS, | |
| 42 | + </if> | |
| 43 | + <if test="item_result != null and item_result!= ''"> | |
| 44 | + ITEM_RESULT, | |
| 45 | + </if> | |
| 46 | + <if test="apply_time != null and apply_time!= ''"> | |
| 47 | + APPLY_TIME, | |
| 48 | + </if> | |
| 49 | + <if test="check_time != null and check_time!= ''"> | |
| 50 | + CHECK_TIME, | |
| 51 | + </if> | |
| 52 | + <if test="publish_time != null and publish_time!= ''"> | |
| 53 | + PUBLISH_TIME, | |
| 54 | + </if> | |
| 55 | + <if test="apply_doctor != null and apply_doctor!= ''"> | |
| 56 | + APPLY_DOCTOR, | |
| 57 | + </if> | |
| 58 | + <if test="apply_dept != null and apply_dept!= ''"> | |
| 59 | + APPLY_DEPT, | |
| 60 | + </if> | |
| 61 | + <if test="checker != null and checker!= ''"> | |
| 62 | + CHECKER, | |
| 63 | + </if> | |
| 64 | + <if test="modified != null and modified!= ''"> | |
| 65 | + MODIFIED, | |
| 66 | + </if> | |
| 67 | + <if test="created != null and created!= ''"> | |
| 68 | + CREATED, | |
| 69 | + </if> | |
| 70 | + <if test="hospital_id != null and hospital_id!= ''"> | |
| 71 | + HOSPITAL_ID, | |
| 72 | + </if> | |
| 73 | + <if test="item_json != null and item_json!= ''"> | |
| 74 | + ITEM_JSON | |
| 75 | + </if> | |
| 76 | + | |
| 30 | 77 | ) VALUES ( |
| 31 | - ${r_id}, | |
| 32 | - ${title}, | |
| 33 | - ${type}, | |
| 34 | - ${vccardno}, | |
| 35 | - ${name}, | |
| 36 | - ${bhnum}, | |
| 37 | - ${phone}, | |
| 38 | - ${age}, | |
| 39 | - ${sex}, | |
| 40 | - ${imgs}, | |
| 41 | - ${item_finding}, | |
| 42 | - ${item_diagnosis}, | |
| 43 | - ${item_result}, | |
| 44 | - ${apply_time}, | |
| 45 | - ${check_time}, | |
| 46 | - ${publish_time}, | |
| 47 | - ${apply_doctor}, | |
| 48 | - ${apply_dept}, | |
| 49 | - ${checker}, | |
| 50 | - ${modified}, | |
| 51 | - ${created}, | |
| 52 | - ${hospital_id}, | |
| 53 | - ${item_json} | |
| 78 | + <if test="r_id != null and r_id!= ''"> | |
| 79 | + #{r_id}, | |
| 80 | + </if> | |
| 81 | + <if test="title != null and title!= ''"> | |
| 82 | + #{title}, | |
| 83 | + </if> | |
| 84 | + <if test="type != null and type!= ''"> | |
| 85 | + #{type}, | |
| 86 | + </if> | |
| 87 | + <if test="vccardno != null and vccardno!= ''"> | |
| 88 | + #{vccardno}, | |
| 89 | + </if> | |
| 90 | + <if test="name != null and name!= ''"> | |
| 91 | + #{name}, | |
| 92 | + </if> | |
| 93 | + <if test="bhnum != null and bhnum!= ''"> | |
| 94 | + #{bhnum}, | |
| 95 | + </if> | |
| 96 | + <if test="phone != null and phone!= ''"> | |
| 97 | + #{phone}, | |
| 98 | + </if> | |
| 99 | + <if test="age != null and age!= ''"> | |
| 100 | + #{age}, | |
| 101 | + </if> | |
| 102 | + <if test="sex != null and sex!= ''"> | |
| 103 | + #{sex}, | |
| 104 | + </if> | |
| 105 | + <if test="imgs != null and imgs!= ''"> | |
| 106 | + #{imgs}, | |
| 107 | + </if> | |
| 108 | + <if test="item_finding != null and item_finding!= ''"> | |
| 109 | + #{item_finding}, | |
| 110 | + </if> | |
| 111 | + <if test="item_diagnosis != null and item_diagnosis!= ''"> | |
| 112 | + #{item_diagnosis}, | |
| 113 | + </if> | |
| 114 | + <if test="item_result != null and item_result!= ''"> | |
| 115 | + #{item_result}, | |
| 116 | + </if> | |
| 117 | + <if test="apply_time != null and apply_time!= ''"> | |
| 118 | + #{apply_time}, | |
| 119 | + </if> | |
| 120 | + <if test="check_time != null and check_time!= ''"> | |
| 121 | + #{check_time}, | |
| 122 | + </if> | |
| 123 | + <if test="publish_time != null and publish_time!= ''"> | |
| 124 | + #{publish_time}, | |
| 125 | + </if> | |
| 126 | + <if test="apply_doctor != null and apply_doctor!= ''"> | |
| 127 | + #{apply_doctor}, | |
| 128 | + </if> | |
| 129 | + <if test="apply_dept != null and apply_dept!= ''"> | |
| 130 | + #{apply_dept}, | |
| 131 | + </if> | |
| 132 | + <if test="checker != null and checker!= ''"> | |
| 133 | + #{checker}, | |
| 134 | + </if> | |
| 135 | + <if test="modified != null and modified!= ''"> | |
| 136 | + #{modified}, | |
| 137 | + </if> | |
| 138 | + <if test="created != null and created!= ''"> | |
| 139 | + #{created}, | |
| 140 | + </if> | |
| 141 | + <if test="hospital_id != null and hospital_id!= ''"> | |
| 142 | + #{hospital_id}, | |
| 143 | + </if> | |
| 144 | + <if test="item_json != null and item_json!= ''"> | |
| 145 | + #{item_json} | |
| 146 | + </if> | |
| 54 | 147 | ) |
| 55 | - | |
| 56 | 148 | </insert> |
| 57 | 149 | |
| 58 | 150 | <insert id="saveRisItemsData" parameterType="java.util.List"> |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java
View file @
6156e91
| ... | ... | @@ -1198,7 +1198,7 @@ |
| 1198 | 1198 | mr.setCreated(DateUtil.getyyyy_MM_dd_hms(new Date())); |
| 1199 | 1199 | mr.setWxTempId(WxTempleteIdEnums.CHAN_JIAN_TI_XING.getId()); |
| 1200 | 1200 | messages.add(mr); |
| 1201 | - smsConfigFacade.saveMsg(messages, patient.getHospitalId()); | |
| 1201 | + // smsConfigFacade.saveMsg(messages, patient.getHospitalId()); | |
| 1202 | 1202 | } catch (InterruptedException e) { |
| 1203 | 1203 | logger.error("sendbuildingMsg Exception " + e); |
| 1204 | 1204 | } |
| 1205 | 1205 | |
| 1206 | 1206 | |
| ... | ... | @@ -1268,13 +1268,16 @@ |
| 1268 | 1268 | } |
| 1269 | 1269 | |
| 1270 | 1270 | /** |
| 1271 | - * 秦皇岛二院产检提醒 上午9点推送 | |
| 1271 | + * 秦皇岛二院、大同产检提醒 上午9点推送 | |
| 1272 | 1272 | */ |
| 1273 | 1273 | public void weekSync() { |
| 1274 | 1274 | logger.info("weekSync startup"); |
| 1275 | - final String hospitalId = "1000000016"; | |
| 1275 | + // final String hospitalId = "1000000016"; | |
| 1276 | + List<String> hospitalList=new ArrayList<>(); | |
| 1277 | + hospitalList.add("2100002419"); | |
| 1278 | + hospitalList.add("1000000016"); | |
| 1276 | 1279 | PatientsQuery patientsQuery = new PatientsQuery(); |
| 1277 | - patientsQuery.setHospitalId(hospitalId); | |
| 1280 | + patientsQuery.setHospitalList(hospitalList); | |
| 1278 | 1281 | patientsQuery.setExtEnable(false); |
| 1279 | 1282 | patientsQuery.setBuildTypeNot(1); |
| 1280 | 1283 | patientsQuery.setYn(YnEnums.YES.getId()); |
| 1281 | 1284 | |
| 1282 | 1285 | |
| ... | ... | @@ -1289,15 +1292,15 @@ |
| 1289 | 1292 | public void run() { |
| 1290 | 1293 | for (int i = 0, j = patientList.size(); i < j; i++) { |
| 1291 | 1294 | Patients patients = patientList.get(i); |
| 1292 | - Map<String, String> params = getBuildingWeek(patients, Integer.valueOf(hospitalId)); | |
| 1295 | + Map<String, String> params = getBuildingWeek(patients, Integer.valueOf(patients.getHospitalId())); | |
| 1293 | 1296 | String week = params.get("dueWeek"); |
| 1294 | 1297 | try { |
| 1295 | 1298 | if (StringUtils.isNotEmpty(week)) { |
| 1296 | 1299 | sendbuildingMsg(patients, SmsServiceEnums.CJYYTX.getId(), "【产检提醒】", "亲爱的孕妈妈,您当前孕周为" + params.get("weekDay") + "。", week); |
| 1297 | 1300 | |
| 1298 | - if (CollectionUtils.isNotEmpty(patients.getRiskFactorId()) && !patients.getRiskFactorId().contains("d42eec03-aa86-45b8-a4e0-78a0ff365fb6")) { | |
| 1301 | + if ((CollectionUtils.isNotEmpty(patients.getRiskFactorId()) && patients.getRiskFactorId().size()>1 ) ||(!patients.getRiskFactorId().get(0).equals("d42eec03-aa86-45b8-a4e0-78a0ff365fb6")) ) { | |
| 1299 | 1302 | FactorProjectQuery factorProjectQuery = new FactorProjectQuery(); |
| 1300 | - factorProjectQuery.setHospitalId(Integer.valueOf(hospitalId)); | |
| 1303 | + factorProjectQuery.setHospitalId(Integer.valueOf(patients.getHospitalId())); | |
| 1301 | 1304 | factorProjectQuery.setWeek(week); |
| 1302 | 1305 | factorProjectQuery.setRiskFactorIds(patients.getRiskFactorId()); |
| 1303 | 1306 | List<FactorProject> projectList = factorProjectService.getList(factorProjectQuery); |