Commit 033dc11ce6f84ce1959ea15bf3bdf38c8be383b6

Authored by liquanyu
1 parent 48d3d752e6

产筛优惠劵

Showing 1 changed file with 21 additions and 0 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/ReportServiceImpl.java View file @ 033dc11
... ... @@ -3,6 +3,7 @@
3 3 import com.alibaba.fastjson.JSON;
4 4 import com.alibaba.fastjson.JSONObject;
5 5 import com.lyms.hospitalapi.pojo.ReportModel;
  6 +import com.lyms.platform.biz.service.ApplyOrderService;
6 7 import com.lyms.platform.biz.service.CommonService;
7 8 import com.lyms.platform.biz.service.PatientWeightService2;
8 9 import com.lyms.platform.common.enums.*;
... ... @@ -28,6 +29,7 @@
28 29 import com.lyms.platform.permission.service.OrganizationService;
29 30 import com.lyms.platform.permission.service.UsersService;
30 31 import com.lyms.platform.pojo.*;
  32 +import com.lyms.platform.query.SieveApplyOrderQuery;
31 33 import com.lymsh.platform.reportdata.model.echarts.Series;
32 34 import org.apache.commons.collections.*;
33 35 import org.apache.commons.lang.StringUtils;
34 36  
... ... @@ -65,7 +67,10 @@
65 67 @Autowired
66 68 AutoMatchFacade autoMatchFacade;
67 69  
  70 +
68 71 @Autowired
  72 + private ApplyOrderService applyOrderService;
  73 + @Autowired
69 74 private CouponMapper couponMapper;
70 75  
71 76 @Autowired
72 77  
... ... @@ -3214,7 +3219,23 @@
3214 3219 phone = findPhoneByPid(babyModel.getPid());
3215 3220 }
3216 3221 }
  3222 + } else if (type == 11)
  3223 + {
  3224 + SieveApplyOrderQuery sieveApplyOrderQuery1 = new SieveApplyOrderQuery();
  3225 + sieveApplyOrderQuery1.setId(usedId);
  3226 + sieveApplyOrderQuery1.setYn(YnEnums.YES.getId());
  3227 + //先查询本院是否已申请
  3228 + List<SieveApplyOrderModel> list1 = applyOrderService.querySieveApplyOrderWithQuery(sieveApplyOrderQuery1);
  3229 + usedId = CollectionUtils.isNotEmpty(list1) ? list1.get(0).getParentId() : usedId;
  3230 + Patients patients = mongoTemplate.findById(usedId, Patients.class);
  3231 + if(patients != null) {
  3232 + checkDate = patients.getCreated();
  3233 + username = patients.getUsername();
  3234 + week = DateUtil.getWeekDesc(patients.getLastMenses(), checkDate);
  3235 + phone = patients.getPhone();
  3236 + }
3217 3237 }
  3238 +
3218 3239  
3219 3240 map.put("checkDate", checkDate == null ? null : DateUtil.getyyyy_MM_dd(checkDate));
3220 3241 map.put("username", username);