Commit f22dc7e60f19aa7deaac94d68a074c59e19b8887

Authored by liquanyu
1 parent 00592e9ec0

update

Showing 1 changed file with 35 additions and 9 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyNutritionFacade.java View file @ f22dc7e
... ... @@ -330,18 +330,23 @@
330 330 map.put("recordTime", DateUtil.getyyyy_MM_dd(model.getNutritiTime()));
331 331  
332 332  
333   - // 回退版本
334   - String currInterpretDoctorId = model.getInterpretDoctorId();
335   - // 新增报表解读人和结算状态
336   - /* HealthChargeModel chargeModel = mongoTemplate.findOne(Query.query(Criteria.where("babyNutritionId").is(model.getId())), HealthChargeModel.class);
337   - String currInterpretDoctorId = chargeModel.getDoctorId();*/
  333 + HealthChargeQuery healthChargeQuery = new HealthChargeQuery();
  334 + healthChargeQuery.setBabyNutritionId(model.getId());
  335 + List<HealthChargeModel> list = healthChargeService.queryHealthChargeList(healthChargeQuery);
  336 +
338 337 String interpretDoctorName = "";
339   - if (StringUtils.isNotEmpty(currInterpretDoctorId)) {
340   - Users users = usersService.getUsers(Integer.parseInt(currInterpretDoctorId));
341   - if (users != null) {
342   - interpretDoctorName = users.getName();
  338 + if (CollectionUtils.isNotEmpty(list))
  339 + {
  340 + // 报告解读医生
  341 + String currInterpretDoctorId = list.get(0).getDoctorId();
  342 + if (StringUtils.isNotEmpty(currInterpretDoctorId)) {
  343 + Users users = usersService.getUsers(Integer.parseInt(currInterpretDoctorId));
  344 + if (users != null) {
  345 + interpretDoctorName = users.getName();
  346 + }
343 347 }
344 348 }
  349 +
345 350 String settleStatusName = "";
346 351 if (currentSettleStatus != null) {
347 352 settleStatusName = currentSettleStatus == 1 ? "未结算" : "已结算";
... ... @@ -1093,6 +1098,27 @@
1093 1098 }
1094 1099 healthChargeQuery.setCreatedStart(startTime);
1095 1100 healthChargeQuery.setCreatedEnd(endTime);
  1101 +
  1102 + if (request.getInterpretDoctorId() != null) {
  1103 + healthChargeQuery.setDoctorId(request.getInterpretDoctorId());
  1104 + }
  1105 +
  1106 + List<String> arrayList = new ArrayList<String>();
  1107 + String findNo = request.getNumber();
  1108 + if (StringUtils.isNotEmpty(findNo)) {
  1109 + List<BabyModel> babyModels = getBabyModels(findNo, null);
  1110 + if (CollectionUtils.isNotEmpty(babyModels)) {
  1111 + for (BabyModel model : babyModels) {
  1112 + String modelId = model.getId();
  1113 + arrayList.add(modelId);
  1114 + }
  1115 + }
  1116 + }
  1117 +
  1118 + if (arrayList.size() > 0) {
  1119 + healthChargeQuery.setIds(arrayList);
  1120 + }
  1121 +
1096 1122  
1097 1123 ChargeRecordModel recordModel = new ChargeRecordModel();
1098 1124 recordModel.setStartDate(startTime);