Commit 29204160e06d3e4ace3050080319d1245aea5c51
1 parent
263ef26acf
Exists in
master
and in
6 other branches
update
Showing 9 changed files with 262 additions and 48 deletions
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/BasicConfigServiceTest.java
- platform-biz-service/src/main/java/com/lyms/platform/permission/model/MysqlBaby.java
- platform-biz-service/src/main/resources/mainOrm/master/MasterMysqlAntexc.xml
- platform-dal/src/main/java/com/lyms/platform/pojo/HightWeightWeekModel.java
- platform-operate-api/src/main/java/com/lyms/hospitalapi/hs/HsfyFmService.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PuerperaManageController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TestController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientSyncMysqlFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/BasicConfigServiceTest.java
View file @
2920416
| ... | ... | @@ -7037,8 +7037,79 @@ | 
| 7037 | 7037 | } | 
| 7038 | 7038 | } | 
| 7039 | 7039 | |
| 7040 | + | |
| 7041 | + public static void saveHightWeightInfo(String fileName) { | |
| 7042 | + ApplicationContext applicationContext = new ClassPathXmlApplicationContext("classpath:/spring/applicationContext_biz_patient1.xml"); | |
| 7043 | + MongoTemplate mongoTemplate | |
| 7044 | + = (MongoTemplate) applicationContext.getBean("mongoTemplate"); | |
| 7045 | + mongoTemplate.getDb().authenticate("platform", "platform123".toCharArray()); | |
| 7046 | + File file = new File(fileName); | |
| 7047 | + Workbook wb = null; | |
| 7048 | + try { | |
| 7049 | + wb = Workbook.getWorkbook(file); | |
| 7050 | + | |
| 7051 | + Sheet s = wb.getSheet(0); | |
| 7052 | + System.out.println(s.getName() + " : "); | |
| 7053 | + int rows = s.getRows(); | |
| 7054 | + if (rows > 0) { | |
| 7055 | + //遍历每行 | |
| 7056 | + for (int i = 1; i < rows; i++) { | |
| 7057 | + System.out.println("rows=" + i); | |
| 7058 | + HightWeightWeekModel hightWeightWeekModel = new HightWeightWeekModel(); | |
| 7059 | + hightWeightWeekModel.setType(1); | |
| 7060 | + Cell[] cells = s.getRow(i); | |
| 7061 | + if (cells.length > 0) { | |
| 7062 | + for (int j = 0; j < cells.length; j++) { | |
| 7063 | + | |
| 7064 | + String str = cells[j].getContents().trim(); | |
| 7065 | + switch (j) { | |
| 7066 | + case 0: | |
| 7067 | + hightWeightWeekModel.setKcal(str); | |
| 7068 | + continue; | |
| 7069 | + case 1: | |
| 7070 | + hightWeightWeekModel.setWeek(str); | |
| 7071 | + continue; | |
| 7072 | + case 2: | |
| 7073 | + List<String> list1 = Arrays.asList(str.split("\n")); | |
| 7074 | + hightWeightWeekModel.setBreakfast(list1); | |
| 7075 | + continue; | |
| 7076 | + case 3: | |
| 7077 | + List<String> list2 = Arrays.asList(str.split("\n")); | |
| 7078 | + hightWeightWeekModel.setBreakfastAdd(list2); | |
| 7079 | + continue; | |
| 7080 | + | |
| 7081 | + case 4: | |
| 7082 | + List<String> list3 = Arrays.asList(str.split("\n")); | |
| 7083 | + hightWeightWeekModel.setLunch(list3); | |
| 7084 | + continue; | |
| 7085 | + | |
| 7086 | + case 5: | |
| 7087 | + List<String> list4 = Arrays.asList(str.split("\n")); | |
| 7088 | + hightWeightWeekModel.setLunchAdd(list4); | |
| 7089 | + continue; | |
| 7090 | + | |
| 7091 | + case 6: | |
| 7092 | + List<String> list5 = Arrays.asList(str.split("\n")); | |
| 7093 | + hightWeightWeekModel.setDinner(list5); | |
| 7094 | + continue; | |
| 7095 | + | |
| 7096 | + case 7: | |
| 7097 | + List<String> list6 = Arrays.asList(str.split("\n")); | |
| 7098 | + hightWeightWeekModel.setDinnerAdd(list6); | |
| 7099 | + continue; | |
| 7100 | + } | |
| 7101 | + } | |
| 7102 | + } | |
| 7103 | + mongoTemplate.save(hightWeightWeekModel); | |
| 7104 | + } | |
| 7105 | + } | |
| 7106 | + } catch (Exception e) { | |
| 7107 | + e.printStackTrace(); | |
| 7108 | + } | |
| 7109 | + } | |
| 7110 | + | |
| 7040 | 7111 | public static void main(String[] args) { | 
| 7041 | - handle(); | |
| 7112 | +// handle(); | |
| 7042 | 7113 | // getData(); | 
| 7043 | 7114 | //weightWeek("F:\\体重与营养管理\\体重与营养管理第三版(北方)改标红“、冰淇淋”-晓萌.xls"); | 
| 7044 | 7115 | // weightMange("F:\\体重与营养管理\\体重与营养管理第三版(北方)改标红“、冰淇淋”-晓萌.xls"); | 
| ... | ... | @@ -7094,6 +7165,7 @@ | 
| 7094 | 7165 | // saveDdb1("F:\\体重与营养管理\\低蛋白.xls"); | 
| 7095 | 7166 | |
| 7096 | 7167 | // saveBabyHeartStandardModel("C:\\Users\\Administrator\\Desktop\\儿心量表打印添加内容.xls");//儿心量表标准 | 
| 7168 | + saveHightWeightInfo("F:\\体重与营养管理\\定制高危糖尿病一周食谱(1)(1).xls");//定制高危糖尿病一周食谱 | |
| 7097 | 7169 | |
| 7098 | 7170 | } | 
| 7099 | 7171 | 
platform-biz-service/src/main/java/com/lyms/platform/permission/model/MysqlBaby.java
View file @
2920416
| ... | ... | @@ -62,10 +62,18 @@ | 
| 62 | 62 | private Date buildDate; // '建档日期', | 
| 63 | 63 | private String vcCardNo; // '就诊卡号', | 
| 64 | 64 | private String remark; // '备注', | 
| 65 | - private String couponCode; // '优惠劵号码', | |
| 65 | + private String hospitalId; // '优惠劵号码', | |
| 66 | + private String couponCode; // '医院id', | |
| 66 | 67 | private Date created; | 
| 67 | 68 | private Date modified; | 
| 68 | 69 | |
| 70 | + public String getHospitalId() { | |
| 71 | + return hospitalId; | |
| 72 | + } | |
| 73 | + | |
| 74 | + public void setHospitalId(String hospitalId) { | |
| 75 | + this.hospitalId = hospitalId; | |
| 76 | + } | |
| 69 | 77 | |
| 70 | 78 | public String getBabyId() { | 
| 71 | 79 | return babyId; | 
platform-biz-service/src/main/resources/mainOrm/master/MasterMysqlAntexc.xml
View file @
2920416
| ... | ... | @@ -648,6 +648,7 @@ | 
| 648 | 648 | vcCardNo, | 
| 649 | 649 | remark, | 
| 650 | 650 | couponCode, | 
| 651 | + hospitalId, | |
| 651 | 652 | created, | 
| 652 | 653 | modified | 
| 653 | 654 | )VALUES ( | 
| ... | ... | @@ -707,6 +708,7 @@ | 
| 707 | 708 | #{vcCardNo}, | 
| 708 | 709 | #{remark}, | 
| 709 | 710 | #{couponCode}, | 
| 711 | + #{hospitalId}, | |
| 710 | 712 | #{created}, | 
| 711 | 713 | #{modified} | 
| 712 | 714 | ) | 
platform-dal/src/main/java/com/lyms/platform/pojo/HightWeightWeekModel.java
View file @
2920416
| 1 | +package com.lyms.platform.pojo; | |
| 2 | + | |
| 3 | +import com.lyms.platform.common.result.BaseModel; | |
| 4 | +import org.springframework.data.mongodb.core.mapping.Document; | |
| 5 | + | |
| 6 | +import java.util.List; | |
| 7 | + | |
| 8 | +/** | |
| 9 | + *定制高危糖尿病一周食谱 | |
| 10 | + */ | |
| 11 | +@Document(collection = "lyms_hw_week_config") | |
| 12 | +public class HightWeightWeekModel extends BaseModel { | |
| 13 | + | |
| 14 | + private String id; | |
| 15 | + | |
| 16 | + private String kcal; | |
| 17 | + private String week; | |
| 18 | + //0 糖尿病 | |
| 19 | + private Integer type; | |
| 20 | + private List<String> breakfast;//早餐 | |
| 21 | + private List<String> breakfastAdd;//上午加餐 | |
| 22 | + private List<String> lunch;//午餐 | |
| 23 | + private List<String> lunchAdd;//下午加餐 | |
| 24 | + private List<String> dinner;//晚餐 | |
| 25 | + private List<String> dinnerAdd;//晚加餐 | |
| 26 | + | |
| 27 | + public Integer getType() { | |
| 28 | + return type; | |
| 29 | + } | |
| 30 | + | |
| 31 | + public void setType(Integer type) { | |
| 32 | + this.type = type; | |
| 33 | + } | |
| 34 | + | |
| 35 | + public String getId() { | |
| 36 | + return id; | |
| 37 | + } | |
| 38 | + | |
| 39 | + public void setId(String id) { | |
| 40 | + this.id = id; | |
| 41 | + } | |
| 42 | + | |
| 43 | + public String getKcal() { | |
| 44 | + return kcal; | |
| 45 | + } | |
| 46 | + | |
| 47 | + public void setKcal(String kcal) { | |
| 48 | + this.kcal = kcal; | |
| 49 | + } | |
| 50 | + | |
| 51 | + public String getWeek() { | |
| 52 | + return week; | |
| 53 | + } | |
| 54 | + | |
| 55 | + public void setWeek(String week) { | |
| 56 | + this.week = week; | |
| 57 | + } | |
| 58 | + | |
| 59 | + public List<String> getBreakfast() { | |
| 60 | + return breakfast; | |
| 61 | + } | |
| 62 | + | |
| 63 | + public void setBreakfast(List<String> breakfast) { | |
| 64 | + this.breakfast = breakfast; | |
| 65 | + } | |
| 66 | + | |
| 67 | + public List<String> getBreakfastAdd() { | |
| 68 | + return breakfastAdd; | |
| 69 | + } | |
| 70 | + | |
| 71 | + public void setBreakfastAdd(List<String> breakfastAdd) { | |
| 72 | + this.breakfastAdd = breakfastAdd; | |
| 73 | + } | |
| 74 | + | |
| 75 | + public List<String> getLunch() { | |
| 76 | + return lunch; | |
| 77 | + } | |
| 78 | + | |
| 79 | + public void setLunch(List<String> lunch) { | |
| 80 | + this.lunch = lunch; | |
| 81 | + } | |
| 82 | + | |
| 83 | + public List<String> getLunchAdd() { | |
| 84 | + return lunchAdd; | |
| 85 | + } | |
| 86 | + | |
| 87 | + public void setLunchAdd(List<String> lunchAdd) { | |
| 88 | + this.lunchAdd = lunchAdd; | |
| 89 | + } | |
| 90 | + | |
| 91 | + public List<String> getDinner() { | |
| 92 | + return dinner; | |
| 93 | + } | |
| 94 | + | |
| 95 | + public void setDinner(List<String> dinner) { | |
| 96 | + this.dinner = dinner; | |
| 97 | + } | |
| 98 | + | |
| 99 | + public List<String> getDinnerAdd() { | |
| 100 | + return dinnerAdd; | |
| 101 | + } | |
| 102 | + | |
| 103 | + public void setDinnerAdd(List<String> dinnerAdd) { | |
| 104 | + this.dinnerAdd = dinnerAdd; | |
| 105 | + } | |
| 106 | +} | 
platform-operate-api/src/main/java/com/lyms/hospitalapi/hs/HsfyFmService.java
View file @
2920416
| ... | ... | @@ -302,7 +302,7 @@ | 
| 302 | 302 | deliverAddRequest.setDueWeek(week); | 
| 303 | 303 | } | 
| 304 | 304 | |
| 305 | -// deliverAddRequest.setTireNumber(allFm.getFETUS_NUM());// 胎数(之前赋值为死值1) | |
| 305 | + deliverAddRequest.setTireNumber(allFm.getFETUS_NUM());// 胎数(之前赋值为死值1) | |
| 306 | 306 | // Integer placenta_Num = allFm.getPLACENTA_NUM(); | 
| 307 | 307 | // if(placenta_Num!=null){ | 
| 308 | 308 | // deliverAddRequest.setPlacenta(allFm.getPLACENTA_NUM().toString());// 胎盘(之前赋值为死值1) | 
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PuerperaManageController.java
View file @
2920416
| ... | ... | @@ -703,8 +703,8 @@ | 
| 703 | 703 | String hospitalId = autoMatchFacade.getHospitalId(patientManagerRequest.getOperatorId()); | 
| 704 | 704 | |
| 705 | 705 | if ("2100001377".equals(hospitalId)) { | 
| 706 | - header.put("prodDoctor", "初诊时间"); | |
| 707 | - header.put("checkTime", "初诊医生"); | |
| 706 | + header.put("prodDoctor", "初诊医生"); | |
| 707 | + header.put("checkTime", "初诊时间"); | |
| 708 | 708 | } | 
| 709 | 709 | header.put("phone", "联系方式"); | 
| 710 | 710 | 
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TestController.java
View file @
2920416
| ... | ... | @@ -4212,43 +4212,43 @@ | 
| 4212 | 4212 | |
| 4213 | 4213 | @ResponseBody | 
| 4214 | 4214 | @RequestMapping(value = "/syncPatients", method = RequestMethod.GET) | 
| 4215 | - public String syncPatients(@RequestParam(required = false) Date startDate,@RequestParam(required = false) Date endDate) { | |
| 4216 | - patientSyncMysqlFacade.syncPatients(startDate, endDate); | |
| 4215 | + public String syncPatients(@RequestParam(required = false) Date startDate,@RequestParam(required = false) Date endDate,@RequestParam(required = false) String hospitalId) { | |
| 4216 | + patientSyncMysqlFacade.syncPatients(startDate, endDate, hospitalId); | |
| 4217 | 4217 | return "success"; | 
| 4218 | 4218 | } | 
| 4219 | 4219 | |
| 4220 | 4220 | @ResponseBody | 
| 4221 | 4221 | @RequestMapping(value = "/syncAntexc", method = RequestMethod.GET) | 
| 4222 | - public String syncAntexc(@RequestParam(required = false) Date startDate,@RequestParam(required = false) Date endDate) { | |
| 4223 | - patientSyncMysqlFacade.syncAntexc(startDate, endDate); | |
| 4222 | + public String syncAntexc(@RequestParam(required = false) Date startDate,@RequestParam(required = false) Date endDate,@RequestParam(required = false) String hospitalId) { | |
| 4223 | + patientSyncMysqlFacade.syncAntexc(startDate, endDate, hospitalId); | |
| 4224 | 4224 | return "success"; | 
| 4225 | 4225 | } | 
| 4226 | 4226 | |
| 4227 | 4227 | @ResponseBody | 
| 4228 | 4228 | @RequestMapping(value = "/syncAntex", method = RequestMethod.GET) | 
| 4229 | - public String syncAntex(@RequestParam(required = false) Date startDate,@RequestParam(required = false) Date endDate) { | |
| 4230 | - patientSyncMysqlFacade.syncAntex(startDate, endDate); | |
| 4229 | + public String syncAntex(@RequestParam(required = false) Date startDate,@RequestParam(required = false) Date endDate,@RequestParam(required = false) String hospitalId) { | |
| 4230 | + patientSyncMysqlFacade.syncAntex(startDate, endDate, hospitalId); | |
| 4231 | 4231 | return "success"; | 
| 4232 | 4232 | } | 
| 4233 | 4233 | |
| 4234 | 4234 | @ResponseBody | 
| 4235 | 4235 | @RequestMapping(value = "/syncMatdeliver", method = RequestMethod.GET) | 
| 4236 | - public String syncMatdeliver(@RequestParam(required = false) Date startDate,@RequestParam(required = false) Date endDate) { | |
| 4237 | - patientSyncMysqlFacade.syncMatdeliver(startDate, endDate); | |
| 4236 | + public String syncMatdeliver(@RequestParam(required = false) Date startDate,@RequestParam(required = false) Date endDate,@RequestParam(required = false) String hospitalId) { | |
| 4237 | + patientSyncMysqlFacade.syncMatdeliver(startDate, endDate, hospitalId); | |
| 4238 | 4238 | return "success"; | 
| 4239 | 4239 | } | 
| 4240 | 4240 | |
| 4241 | 4241 | @ResponseBody | 
| 4242 | 4242 | @RequestMapping(value = "/syncBaby", method = RequestMethod.GET) | 
| 4243 | - public String syncBaby(@RequestParam(required = false) Date startDate,@RequestParam(required = false) Date endDate) { | |
| 4244 | - patientSyncMysqlFacade.syncBaby(startDate, endDate); | |
| 4243 | + public String syncBaby(@RequestParam(required = false) Date startDate,@RequestParam(required = false) Date endDate,@RequestParam(required = false) String hospitalId) { | |
| 4244 | + patientSyncMysqlFacade.syncBaby(startDate, endDate, hospitalId); | |
| 4245 | 4245 | return "success"; | 
| 4246 | 4246 | } | 
| 4247 | 4247 | |
| 4248 | 4248 | @ResponseBody | 
| 4249 | 4249 | @RequestMapping(value = "/syncBabyCheck", method = RequestMethod.GET) | 
| 4250 | - public String syncBabyCheck(@RequestParam(required = false) Date startDate,@RequestParam(required = false) Date endDate) { | |
| 4251 | - patientSyncMysqlFacade.syncBabyCheck(startDate, endDate); | |
| 4250 | + public String syncBabyCheck(@RequestParam(required = false) Date startDate,@RequestParam(required = false) Date endDate,@RequestParam(required = false) String hospitalId) { | |
| 4251 | + patientSyncMysqlFacade.syncBabyCheck(startDate, endDate, hospitalId); | |
| 4252 | 4252 | return "syncBabyCheck"; | 
| 4253 | 4253 | } | 
| 4254 | 4254 | |
| ... | ... | @@ -4256,7 +4256,7 @@ | 
| 4256 | 4256 | |
| 4257 | 4257 | @ResponseBody | 
| 4258 | 4258 | @RequestMapping(value = "/syncPatientsToMysql", method = RequestMethod.GET) | 
| 4259 | - public String syncPatientsToMysql(@RequestParam(required = false) Date startDate,@RequestParam(required = false) Date endDate) { | |
| 4259 | + public String syncPatientsToMysql(@RequestParam(required = false) Date startDate,@RequestParam(required = false) Date endDate,@RequestParam(required = false) String hospitalId) { | |
| 4260 | 4260 | patientSyncMysqlFacade.syncPatientsToMysql(startDate, endDate); | 
| 4261 | 4261 | return "syncPatientsToMysql"; | 
| 4262 | 4262 | } | 
| ... | ... | @@ -4265,7 +4265,7 @@ | 
| 4265 | 4265 | |
| 4266 | 4266 | @ResponseBody | 
| 4267 | 4267 | @RequestMapping(value = "/syncAntexchuToMysql", method = RequestMethod.GET) | 
| 4268 | - public String syncAntexchuToMysql(@RequestParam(required = false) Date startDate,@RequestParam(required = false) Date endDate) { | |
| 4268 | + public String syncAntexchuToMysql(@RequestParam(required = false) Date startDate,@RequestParam(required = false) Date endDate,@RequestParam(required = false) String hospitalId) { | |
| 4269 | 4269 | patientSyncMysqlFacade.syncAntexchuToMysql(startDate, endDate); | 
| 4270 | 4270 | return "syncAntexchuToMysql"; | 
| 4271 | 4271 | } | 
| ... | ... | @@ -4274,7 +4274,7 @@ | 
| 4274 | 4274 | |
| 4275 | 4275 | @ResponseBody | 
| 4276 | 4276 | @RequestMapping(value = "/syncAntexToMysql", method = RequestMethod.GET) | 
| 4277 | - public String syncAntexToMysql(@RequestParam(required = false) Date startDate,@RequestParam(required = false) Date endDate) { | |
| 4277 | + public String syncAntexToMysql(@RequestParam(required = false) Date startDate,@RequestParam(required = false) Date endDate,@RequestParam(required = false) String hospitalId) { | |
| 4278 | 4278 | patientSyncMysqlFacade.syncAntexToMysql(startDate, endDate); | 
| 4279 | 4279 | return "syncAntexToMysql"; | 
| 4280 | 4280 | } | 
| ... | ... | @@ -4284,7 +4284,7 @@ | 
| 4284 | 4284 | |
| 4285 | 4285 | @ResponseBody | 
| 4286 | 4286 | @RequestMapping(value = "/syncMatdeliverToMysql", method = RequestMethod.GET) | 
| 4287 | - public String syncMatdeliverToMysql(@RequestParam(required = false) Date startDate,@RequestParam(required = false) Date endDate) { | |
| 4287 | + public String syncMatdeliverToMysql(@RequestParam(required = false) Date startDate,@RequestParam(required = false) Date endDate,@RequestParam(required = false) String hospitalId) { | |
| 4288 | 4288 | patientSyncMysqlFacade.syncMatdeliverToMysql(startDate, endDate); | 
| 4289 | 4289 | return "syncMatdeliverToMysql"; | 
| 4290 | 4290 | } | 
| ... | ... | @@ -4293,7 +4293,7 @@ | 
| 4293 | 4293 | |
| 4294 | 4294 | @ResponseBody | 
| 4295 | 4295 | @RequestMapping(value = "/syncAllToMysql", method = RequestMethod.GET) | 
| 4296 | - public String syncAllToMysql(@RequestParam(required = false) Date startDate,@RequestParam(required = false) Date endDate) { | |
| 4296 | + public String syncAllToMysql(@RequestParam(required = false) Date startDate,@RequestParam(required = false) Date endDate,@RequestParam(required = false) String hospitalId) { | |
| 4297 | 4297 | patientSyncMysqlFacade.syncPatientsToMysql(startDate, endDate); | 
| 4298 | 4298 | patientSyncMysqlFacade.syncMatdeliverToMysql(startDate, endDate); | 
| 4299 | 4299 | patientSyncMysqlFacade.syncAntexchuToMysql(startDate, endDate); | 
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientSyncMysqlFacade.java
View file @
2920416
| ... | ... | @@ -84,7 +84,7 @@ | 
| 84 | 84 | /** | 
| 85 | 85 | * 档案 | 
| 86 | 86 | */ | 
| 87 | - public void syncPatients(Date start,Date end) | |
| 87 | + public void syncPatients(Date start,Date end,String hospitalId) | |
| 88 | 88 | { | 
| 89 | 89 | PatientsQuery puerperaQuery = new PatientsQuery(); | 
| 90 | 90 | puerperaQuery.setGteCreated(start); | 
| ... | ... | @@ -93,7 +93,8 @@ | 
| 93 | 93 | puerperaQuery.setExtEnable(false); | 
| 94 | 94 | puerperaQuery.setBuildTypeNot(1); | 
| 95 | 95 | puerperaQuery.setYn(YnEnums.YES.getId()); | 
| 96 | - puerperaQuery.setHospitalId("2100001377"); | |
| 96 | + | |
| 97 | + puerperaQuery.setHospitalId(hospitalId); | |
| 97 | 98 | System.out.println("syncPatients "+puerperaQuery.convertToQuery().convertToMongoQuery().toString()); | 
| 98 | 99 | List<Patients> patientses = patientsService.queryPatient(puerperaQuery); | 
| 99 | 100 | |
| 100 | 101 | |
| ... | ... | @@ -155,10 +156,10 @@ | 
| 155 | 156 | /** | 
| 156 | 157 | * 初诊 | 
| 157 | 158 | */ | 
| 158 | - public void syncAntexc(Date start,Date end) | |
| 159 | + public void syncAntexc(Date start,Date end,String hospitalId) | |
| 159 | 160 | { | 
| 160 | 161 | AntExChuQuery antExChuQuery = new AntExChuQuery(); | 
| 161 | - antExChuQuery.setHospitalId("2100001377"); | |
| 162 | + antExChuQuery.setHospitalId(hospitalId); | |
| 162 | 163 | if (start != null) | 
| 163 | 164 | { | 
| 164 | 165 | antExChuQuery.setCreatedTimeStart(start); | 
| 165 | 166 | |
| ... | ... | @@ -304,11 +305,11 @@ | 
| 304 | 305 | } | 
| 305 | 306 | |
| 306 | 307 | |
| 307 | - public void syncAntex(Date start,Date end) | |
| 308 | + public void syncAntex(Date start,Date end,String hospitalId) | |
| 308 | 309 | { | 
| 309 | 310 | AntExQuery antExQuery = new AntExQuery(); | 
| 310 | 311 | antExQuery.setYn(YnEnums.YES.getId()); | 
| 311 | - antExQuery.setHospitalId("2100001377"); | |
| 312 | + antExQuery.setHospitalId(hospitalId); | |
| 312 | 313 | |
| 313 | 314 | if (start != null) | 
| 314 | 315 | { | 
| 315 | 316 | |
| ... | ... | @@ -459,11 +460,11 @@ | 
| 459 | 460 | } | 
| 460 | 461 | |
| 461 | 462 | |
| 462 | - public void syncMatdeliver(Date start,Date end) | |
| 463 | + public void syncMatdeliver(Date start,Date end,String hospitalId) | |
| 463 | 464 | { | 
| 464 | 465 | MatDeliverQuery matDeliverQuery = new MatDeliverQuery(); | 
| 465 | 466 | |
| 466 | - matDeliverQuery.setHospitalId("2100001377"); | |
| 467 | + matDeliverQuery.setHospitalId(hospitalId); | |
| 467 | 468 | if (start != null) | 
| 468 | 469 | { | 
| 469 | 470 | matDeliverQuery.setCreatedTimeStart(start); | 
| 470 | 471 | |
| ... | ... | @@ -657,11 +658,11 @@ | 
| 657 | 658 | |
| 658 | 659 | |
| 659 | 660 | |
| 660 | - public void syncBaby(Date start,Date end) | |
| 661 | + public void syncBaby(Date start,Date end,String hospitalId) | |
| 661 | 662 | { | 
| 662 | 663 | BabyModelQuery babyBuildQuery = new BabyModelQuery(); | 
| 663 | 664 | babyBuildQuery.setYn(YnEnums.YES.getId()); | 
| 664 | - babyBuildQuery.setHospitalId("2100001377"); | |
| 665 | + babyBuildQuery.setHospitalId(hospitalId); | |
| 665 | 666 | if (start != null) | 
| 666 | 667 | { | 
| 667 | 668 | babyBuildQuery.setCreatedTimeStart(start); | 
| 668 | 669 | |
| ... | ... | @@ -731,10 +732,10 @@ | 
| 731 | 732 | } | 
| 732 | 733 | |
| 733 | 734 | |
| 734 | - public void syncBabyCheck(Date start,Date end) | |
| 735 | + public void syncBabyCheck(Date start,Date end,String hospitalId) | |
| 735 | 736 | { | 
| 736 | 737 | BabyCheckModelQuery query = new BabyCheckModelQuery(); | 
| 737 | - query.setHospitalId("2100001377"); | |
| 738 | + query.setHospitalId(hospitalId); | |
| 738 | 739 | |
| 739 | 740 | if (start != null) | 
| 740 | 741 | { | 
| 741 | 742 | |
| ... | ... | @@ -1265,14 +1266,20 @@ | 
| 1265 | 1266 | { | 
| 1266 | 1267 | System.out.println("syncLpData start ........"); | 
| 1267 | 1268 | |
| 1269 | + List<String> hospitalIds = Arrays.asList("2100001377","2100001452");//滦平妇幼和围场满族蒙古族自治县妇幼保健院 | |
| 1270 | + | |
| 1268 | 1271 | Date startDate = DateUtil.parseYMDHMS(DateUtil.getyyyy_MM_dd(new Date()) + " 00:00:00"); | 
| 1269 | 1272 | Date endDate = DateUtil.addDay(startDate, 1); | 
| 1270 | - syncPatients(startDate,endDate); | |
| 1271 | - syncAntexc(startDate, endDate); | |
| 1272 | - syncAntex(startDate, endDate); | |
| 1273 | - syncMatdeliver(startDate, endDate); | |
| 1274 | - syncBaby(startDate, endDate); | |
| 1275 | - syncBabyCheck(startDate, endDate); | |
| 1273 | + for (String hid : hospitalIds) | |
| 1274 | + { | |
| 1275 | + syncPatients(startDate,endDate,hid); | |
| 1276 | + syncAntexc(startDate, endDate,hid); | |
| 1277 | + syncAntex(startDate, endDate,hid); | |
| 1278 | + syncMatdeliver(startDate, endDate,hid); | |
| 1279 | + syncBaby(startDate, endDate,hid); | |
| 1280 | + syncBabyCheck(startDate, endDate,hid); | |
| 1281 | + } | |
| 1282 | + | |
| 1276 | 1283 | System.out.println("syncLpData end ........"); | 
| 1277 | 1284 | } | 
| 1278 | 1285 | 
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java
View file @
2920416
| ... | ... | @@ -2943,19 +2943,21 @@ | 
| 2943 | 2943 | if (reiskFactor.isEmpty() && weightReport.isEmpty()) { | 
| 2944 | 2944 | return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.NO_DATA).setErrormsg("对象值为空!").setData(""); | 
| 2945 | 2945 | } else { | 
| 2946 | - for (String reis : reiskFactor) { | |
| 2947 | 2946 | |
| 2948 | - //如果是妊娠期糖尿病病史 改成和 妊娠期糖尿病(无需药物治疗)取一样的内容 | |
| 2949 | - if ("5bbc0fff422b03d4ad2bf955".equals(reis)) | |
| 2950 | - { | |
| 2951 | - reis = "5aab6d3d422b03d4ad2bf83e"; | |
| 2952 | - } | |
| 2953 | - | |
| 2947 | + //如果是妊娠期糖尿病病史 改成和 妊娠期糖尿病(无需药物治疗)取一样的内容 | |
| 2948 | + if (reiskFactor.contains("5bbc0fff422b03d4ad2bf955")) | |
| 2949 | + { | |
| 2950 | + reiskFactor.add("5aab6d3d422b03d4ad2bf83e"); | |
| 2951 | + reiskFactor.remove("5bbc0fff422b03d4ad2bf955"); | |
| 2952 | + } | |
| 2953 | + for (String reis : reiskFactor) { | |
| 2954 | 2954 | for (WeightReportModel weightReportModel : weightReport) { | 
| 2955 | 2955 | if (reis.equals(weightReportModel.getgDMId()) || reis.equals(weightReportModel.getoDIPId()) || | 
| 2956 | 2956 | reis.equals(weightReportModel.getMedicationDiabetesID())) { | 
| 2957 | 2957 | //糖尿病diabetes | 
| 2958 | - datas.put("1", this.getDiabetestInfo(weights, data3, weightReportModel, patientWeight, patients, bmiD, week, diabetesKcalStr)); | |
| 2958 | + Map map = this.getDiabetestInfo(weights, data3, weightReportModel, patientWeight, patients, bmiD, week, diabetesKcalStr); | |
| 2959 | + map = getWeekInfo(diabetesKcal,map,reiskFactor); | |
| 2960 | + datas.put("1", map); | |
| 2959 | 2961 | } else if (reis.equals(weightReportModel.getGestationalHypertensionGHID()) || reis.equals(weightReportModel.getChronicHypertensionID())) { | 
| 2960 | 2962 | //高血压hypertension | 
| 2961 | 2963 | datas.put("3", this.getInfo(weights, data2, weightReportModel, patientWeight, patients, bmiD, week, gxyKcalStr)); | 
| ... | ... | @@ -3120,6 +3122,21 @@ | 
| 3120 | 3122 | patientWeight1.setPrintingTime(new Date()); | 
| 3121 | 3123 | patientWeightService2.update(Query.query(Criteria.where("_id").is(pid)), patientWeight1); | 
| 3122 | 3124 | return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功").setData(this.getFirstOrNull(datas)); | 
| 3125 | + } | |
| 3126 | + | |
| 3127 | + private Map getWeekInfo(Integer kcal,Map map,List<String> risks) | |
| 3128 | + { | |
| 3129 | + List<HightWeightWeekModel> weightReport = null; | |
| 3130 | + if (risks.contains("5aab6d3d422b03d4ad2bf83e") && (risks.contains("5aab6d3e422b03d4ad2bf83f") | |
| 3131 | + //需药物治疗的糖尿病 | |
| 3132 | + || risks.contains("de7468e6-1bb5-4fab-ae84-78857868409a"))) | |
| 3133 | + { | |
| 3134 | + String k = (kcal < 1500 ? 1500 : (kcal > 2300 ? 2300 : kcal))+"kcal"; | |
| 3135 | + weightReport = mongoTemplate.find(Query.query(Criteria.where("kcal").is(k).and("type").is(1)), HightWeightWeekModel.class); | |
| 3136 | + } | |
| 3137 | + | |
| 3138 | + map.put("weekInfo", CollectionUtils.isNotEmpty(weightReport) ? weightReport : null); | |
| 3139 | + return map; | |
| 3123 | 3140 | } | 
| 3124 | 3141 | |
| 3125 | 3142 | /** |