Commit 066fce381458aae8cbbfdbab350b36ee3280561b

Authored by wtt
1 parent a2d88fa57d
Exists in master and in 1 other branch dev

衡水处理数据

Showing 2 changed files with 50 additions and 0 deletions

platform-dal/src/main/java/com/lyms/platform/query/SieveApplyOrderQuery.java View file @ 066fce3
... ... @@ -20,6 +20,8 @@
20 20 private String id;
21 21 private String hospitalId;
22 22  
  23 + private String caiyangyunzhou;
  24 +
23 25 private String number;
24 26  
25 27 //冗余lyms_sieve表id
... ... @@ -60,6 +62,14 @@
60 62 this.hospitalId = hospitalId;
61 63 }
62 64  
  65 + public String getCaiyangyunzhou() {
  66 + return caiyangyunzhou;
  67 + }
  68 +
  69 + public void setCaiyangyunzhou(String caiyangyunzhou) {
  70 + this.caiyangyunzhou = caiyangyunzhou;
  71 + }
  72 +
63 73 public String getId() {
64 74 return id;
65 75 }
... ... @@ -95,6 +105,9 @@
95 105 }
96 106 if(null!=hospitalId){
97 107 condition= condition.and("hospitalId",hospitalId, MongoOper.IS);
  108 + }
  109 + if(null!=caiyangyunzhou){
  110 + condition= condition.and("caiyangyunzhou",caiyangyunzhou, MongoOper.IS);
98 111 }
99 112 if(null!=sieveHospitalId){
100 113 condition= condition.and("sieveHospitalId",sieveHospitalId, MongoOper.IS);
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TestController.java View file @ 066fce3
... ... @@ -180,6 +180,8 @@
180 180 @Autowired
181 181 private MatDeliverFacade matDeliverFacade;
182 182  
  183 + @Autowired
  184 + private ApplyOrderFacade applyOrderFacade;
183 185  
184 186 static Map<String, String> highRisks = new HashMap<>();
185 187  
... ... @@ -201,6 +203,41 @@
201 203 highRisks.put("e04d5364-11da-45f6-9801-c50ad5eb6f27", "63347e70-4a74-4bc9-bad6-0c0cf1b2fd89"); //严重心律失常 ---严重心血管系统疾病
202 204 highRisks.put("4ec114d7-9c78-4dfc-878c-1139ef3ff04c", "5a40c73c422b03d4ad2bf7bf"); //骨盆狭窄或产道畸形,--- 生殖道畸形和骨盆狭小
203 205 highRisks.put("3af4b6fd-0bb9-4f4b-9d8f-916df71955cf", "5a430fe4422b03d4ad2bf82b"); //胸廓畸形伴轻度肺功能不全---- 胸廓畸形等伴轻度肺功能不全
  206 + }
  207 + /**
  208 + * 功能描述 衡水线上修改采样孕周数据问题
  209 + * @author 武涛涛
  210 + * @date 2020/7/13
  211 + */
  212 + @RequestMapping(method = RequestMethod.GET, value = "/updateSieveApplyOrder")
  213 + @ResponseBody
  214 + //增加产筛申请单
  215 + public BaseResponse updateSieveApplyOrder(@RequestParam(required = false) String number,
  216 + @RequestParam(required = false) String hospitalId) {
  217 + SieveApplyOrderQuery sieveApplyOrderQuery1 = new SieveApplyOrderQuery();
  218 + sieveApplyOrderQuery1.setNumber(number);
  219 + sieveApplyOrderQuery1.setCaiyangyunzhou("孕0周+0天");
  220 + sieveApplyOrderQuery1.setHospitalId(hospitalId);
  221 + sieveApplyOrderQuery1.setYn(YnEnums.YES.getId());
  222 + Integer integer1 = 0;
  223 + List<SieveApplyOrderModel> list1 = applyOrderService.querySieveApplyOrderWithQuery(sieveApplyOrderQuery1);
  224 + for (int i = 0; i <list1.size() ; i++) {
  225 + SieveApplyOrderModel sieveApplyOrderModel = list1.get(i);
  226 +
  227 + if(StringUtils.isEmpty(sieveApplyOrderModel.getId())){
  228 + continue;
  229 + }
  230 + if(sieveApplyOrderModel.getLastMenses()==null || sieveApplyOrderModel.getCollectionDate()==null){
  231 + System.out.println("没有末次月经或者没有采样日期"+ sieveApplyOrderModel.toString() + "==="+sieveApplyOrderModel.getId());
  232 + continue;
  233 + }
  234 + String weekDesc = DateUtil.getWeekDesc(sieveApplyOrderModel.getLastMenses(), sieveApplyOrderModel.getCollectionDate());
  235 + sieveApplyOrderModel.setCaiyangyunzhou(weekDesc);
  236 + applyOrderService.updateSieve(sieveApplyOrderModel);
  237 + integer1++;
  238 + }
  239 +
  240 + return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg(integer1.toString());
204 241 }
205 242  
206 243 @ResponseBody