Commit 9afe8ad621270a33395ad66c0d0d4c4ae8eee075

Authored by dongqin
1 parent 732116364d

修复bug

Showing 1 changed file with 18 additions and 1 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java View file @ 9afe8ad
... ... @@ -2137,7 +2137,24 @@
2137 2137 datas.put("2", datas.get("8"));
2138 2138 }
2139 2139  
2140   - healthChargeFacade.addHealthCharge(patientWeight.getHospitalId(), 1, patientWeight.getPatientId(), 2, 1, userId);
  2140 + List<Map<String, Object>> dayWeights2 = patientWeight.getDayWeights2();
  2141 + String doctorId = "";
  2142 + if (CollectionUtils.isNotEmpty(dayWeights2)){
  2143 + for (Map map: dayWeights2){
  2144 + Object data = map.get("data");
  2145 + if (data != null){
  2146 + String dbData = data.toString();
  2147 + String currentDate = DateUtil.getyyyy_MM_dd(new Date());
  2148 + if (dbData.equals(currentDate)){
  2149 + Object doctorIdObj = map.get("doctorId");
  2150 + if (doctorId != null){
  2151 + doctorId = (String) doctorIdObj;
  2152 + }
  2153 + }
  2154 + }
  2155 + }
  2156 + }
  2157 + healthChargeFacade.addHealthCharge(patientWeight.getHospitalId(), 1, patientWeight.getPatientId(), 2, 1, userId, doctorId, false);
2141 2158 return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功").setData(this.getFirstOrNull(datas));
2142 2159 }
2143 2160