Commit f6489a84616294cd17541570cc483cc8f788bdab

Authored by litao@lymsh.com
1 parent 5fe4563d14

写bug

Showing 2 changed files with 9 additions and 19 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PregnantBuildController.java View file @ f6489a8
... ... @@ -80,6 +80,13 @@
80 80 public BaseResponse addOrUpdateYunBuild(@RequestBody YunBookbuildingAddRequest yunBookbuildingAddRequest, HttpServletRequest request) {
81 81 LoginContext loginState = (LoginContext) request.getAttribute("loginContext");
82 82  
  83 + /** 末次月经和纠正末次月经反起来存 */
  84 + if(StringUtils.isNotEmpty(yunBookbuildingAddRequest.getFuckLastMens())) {
  85 + String fuckLastMens = yunBookbuildingAddRequest.getFuckLastMens();
  86 + yunBookbuildingAddRequest.setFuckLastMens(yunBookbuildingAddRequest.getLastMenstrualPeriod());
  87 + yunBookbuildingAddRequest.setLastMenstrualPeriod(fuckLastMens);
  88 + }
  89 +
83 90 if (yunBookbuildingAddRequest != null && !StringUtils.isEmpty(yunBookbuildingAddRequest.getId()) )
84 91 {
85 92 return bookbuildingFacade.updatePregnantById(yunBookbuildingAddRequest.getId(), yunBookbuildingAddRequest,loginState.getId());
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java View file @ f6489a8
... ... @@ -237,11 +237,6 @@
237 237 }
238 238  
239 239 Patients patient = getPatientsData(yunRequest);
240   - /** 末次月经和纠正末次月经反起来存 */
241   - if(yunRequest.getFuckLastMens() != null) {
242   - patient.setLastMenses(DateUtil.parseYMD(yunRequest.getFuckLastMens()));
243   - patient.setFuckLastMens(DateUtil.parseYMD(yunRequest.getLastMenstrualPeriod()));
244   - }
245 240  
246 241 patient.setBuildDays(DateUtil.getDays(DateUtil.parseYMD(yunRequest.getLastMenstrualPeriod()), new Date()));
247 242  
... ... @@ -900,12 +895,6 @@
900 895  
901 896 Patients beforePatient = yunBookbuildingService.findOneById(id);
902 897  
903   - /** 末次月经和纠正末次月经反起来存 */
904   - if(yunRequest.getFuckLastMens() != null) {
905   - patient.setLastMenses(DateUtil.parseYMD(yunRequest.getFuckLastMens()));
906   - patient.setFuckLastMens(DateUtil.parseYMD(yunRequest.getLastMenstrualPeriod()));
907   - }
908   -
909 898 yunBookbuildingService.updatePregnant(patient, id);
910 899  
911 900 operateLogFacade.addModifyOptLog(userId, Integer.valueOf(beforePatient.getHospitalId()), beforePatient, patient, OptActionEnums.UPDATE.getId(), "孕妇建档修改");
... ... @@ -1124,14 +1113,8 @@
1124 1113 */
1125 1114 public Patients getPatientsData(YunBookbuildingAddRequest yunRequest) {
1126 1115 Patients patient = new Patients();
1127   -
1128   - // 纠正末次月经和末次月经反起存
1129   - if (StringUtils.isEmpty(yunRequest.getFuckLastMens())) {
1130   - patient.setLastMenses(DateUtil.parseYMD(yunRequest.getLastMenstrualPeriod()));
1131   - } else {
1132   - patient.setFuckLastMens(DateUtil.parseYMD(yunRequest.getLastMenstrualPeriod()));
1133   - patient.setLastMenses(DateUtil.parseYMD(yunRequest.getFuckLastMens()));
1134   - }
  1116 + patient.setFuckLastMens(DateUtil.parseYMD(yunRequest.getFuckLastMens()));
  1117 + patient.setLastMenses(DateUtil.parseYMD(yunRequest.getLastMenstrualPeriod()));
1135 1118  
1136 1119 patient.setLastMenstrualPeriodBasis(yunRequest.getLastMenstrualPeriodBasis());
1137 1120 patient.setLastMenstrualPeriodBasisDoctorId(yunRequest.getLastMenstrualPeriodBasisDoctorId());