Commit a6d16a943fa9311cd3c612e8f779badbd4c087b0

Authored by yangfei

Merge remote-tracking branch 'origin/master'

Showing 6 changed files

platform-dal/src/main/java/com/lyms/platform/pojo/BloodSugar.java View file @ a6d16a9
... ... @@ -62,6 +62,17 @@
62 62  
63 63 private String kcalId;
64 64  
  65 + //当前孕周
  66 + private Integer currentWeek;
  67 +
  68 + public Integer getCurrentWeek() {
  69 + return currentWeek;
  70 + }
  71 +
  72 + public void setCurrentWeek(Integer currentWeek) {
  73 + this.currentWeek = currentWeek;
  74 + }
  75 +
65 76 public String getKcalId() {
66 77 return kcalId;
67 78 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BloodSugarController.java View file @ a6d16a9
... ... @@ -76,8 +76,8 @@
76 76 * @return
77 77 */
78 78 @ResponseBody
79   - @RequestMapping(value = "/wx/{id}/{beforeWeight}/{currentWeight}", method = RequestMethod.GET)
80   - public BaseResponse setWeightInfo(@PathVariable String id,@PathVariable Double beforeWeight,@PathVariable Double currentWeight) {
  79 + @RequestMapping(value = "/wx/{id}", method = RequestMethod.GET)
  80 + public BaseResponse setWeightInfo(@PathVariable String id, String beforeWeight, String currentWeight) {
81 81 return bloodSugarService.addWeightInfo(id,beforeWeight,currentWeight);
82 82 }
83 83  
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java View file @ a6d16a9
... ... @@ -186,6 +186,9 @@
186 186 // 产后复查,设置自动分娩,这个字段其实是为了确定是否有对应的分娩记录,但是这种是没有分娩记录的
187 187 if (type == 3) {
188 188 patients.setIsAutoFm(YnEnums.YES.getId());
  189 + //本院建档本院分娩外院产后复查,区域产妇管理出现多调记录
  190 + // http://jira.healthbaby.com.cn/browse/WEB-2743
  191 + patients.setFmHospital(null);
189 192 }
190 193 patientsService.addPatient(patients);
191 194 return patients.getId();
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PostReviewFacade.java View file @ a6d16a9
... ... @@ -252,6 +252,10 @@
252 252 patients1.setFileCode(null);
253 253 patients1.setServiceType(ServiceTypeEnums.STANDARD_SERVICE.getId());
254 254 patients1.setServiceStatus(ServiceStatusEnums.STANDARD_OPEN.getId());
  255 +
  256 + //本院建档本院分娩外院产后复查,区域产妇管理出现多调记录
  257 + // http://jira.healthbaby.com.cn/browse/WEB-2743
  258 + patients1.setFmHospital(null);
255 259 patientsService.addPatient(patients1);
256 260 }
257 261 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/IBloodSugarService.java View file @ a6d16a9
... ... @@ -28,6 +28,6 @@
28 28  
29 29 BaseResponse getBloodSugarReportList(String parentId);
30 30  
31   - BaseResponse addWeightInfo(String id, Double beforeWeight, Double currentWeight);
  31 + BaseResponse addWeightInfo(String id, String beforeWeight, String currentWeight);
32 32 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BloodSugarServiceImpl.java View file @ a6d16a9
... ... @@ -583,9 +583,9 @@
583 583 {
584 584 return false;
585 585 }
586   -
  586 + one.setCurrentWeek(week);
587 587 one.setMonitorStatus(monitorStatus);
588   - one.setReportDate(DateUtil.formatDate(one.getCreated()));
  588 + one.setReportDate(DateUtil.formatDate(DateUtil.addDay(new Date(), -1)));
589 589 one.setStatus(1); //报告状态 1未查看 2查看
590 590 return true;
591 591 }
... ... @@ -759,6 +759,8 @@
759 759 Map<String,Object> nutritionModelData = new HashMap<>();
760 760 nutritionModelData.put("nutritionModelList", nutritionModel.getWeekContents());
761 761 reusltMap.put("nutritionModelData",nutritionModelData);
  762 +
  763 + reusltMap.put("currentWeek",blood.getCurrentWeek());
762 764 }
763 765  
764 766 resp.setErrorcode(ResponseCode.SUCCESS.getCode());
765 767  
766 768  
... ... @@ -905,12 +907,19 @@
905 907 }
906 908  
907 909 @Override
908   - public BaseResponse addWeightInfo(String id, Double beforeWeight, Double currentWeight) {
  910 + public BaseResponse addWeightInfo(String id, String beforeWeight, String currentWeight) {
  911 + BaseResponse resp = new BaseResponse();
  912 + if (StringUtils.isEmpty(beforeWeight) || StringUtils.isEmpty(currentWeight))
  913 + {
  914 + resp.setErrorcode(ResponseCode.DATA_ERROR.getCode());
  915 + resp.setErrormsg(ResponseCode.DATA_ERROR.getMsg());
  916 + return resp;
  917 + }
909 918 BloodSugar bloodSugarsMonth = mongoTemplate.findOne(Query.query(Criteria.where("id").is(id)), BloodSugar.class);
910   - bloodSugarsMonth.setWeight(beforeWeight);
911   - bloodSugarsMonth.setCurrentWeight(currentWeight);
  919 + bloodSugarsMonth.setWeight(Double.valueOf(String.format("%.2f", Double.parseDouble(beforeWeight))));
  920 + bloodSugarsMonth.setCurrentWeight(Double.valueOf(String.format("%.2f", Double.parseDouble(currentWeight))));
912 921 bloodSugarService.update(bloodSugarsMonth);
913   - BaseResponse resp = new BaseResponse();
  922 +
914 923 resp.setErrorcode(ResponseCode.SUCCESS.getCode());
915 924 resp.setErrormsg(ResponseCode.SUCCESS.getMsg());
916 925 return resp;