Commit f762b4ab4051f09b80d02829bad81c98a4d3b3fb
1 parent
c5710b3992
Exists in
dev
#优化产妇服务查询逻辑,增加缓存优化TODO
Showing 7 changed files with 39 additions and 7 deletions
- platform-biz-service/src/main/java/com/lyms/platform/permission/model/CheckItem.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/MatDeliverController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PuerperaManageController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BasicConfigFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MatDeliverFacade.java
platform-biz-service/src/main/java/com/lyms/platform/permission/model/CheckItem.java
View file @
f762b4a
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/MatDeliverController.java
View file @
f762b4a
... | ... | @@ -879,13 +879,15 @@ |
879 | 879 | |
880 | 880 | /** |
881 | 881 | * 小程序查询产妇产周 |
882 | - * @param idCard | |
882 | + * @param | |
883 | 883 | * @return |
884 | 884 | */ |
885 | 885 | @RequestMapping(value = "/getDueDateByWeChat", method = RequestMethod.GET) |
886 | 886 | @ResponseBody |
887 | - public BaseObjectResponse getDueDateByWeChat(@RequestParam(required = false)String idCard,@RequestParam(required = false)String pid){ | |
888 | - return matDeliverFacade.getDueDateByWeChat(idCard,pid); | |
887 | + public BaseObjectResponse getDueDateByWeChat(@RequestParam(required = false)String cardNo, | |
888 | + @RequestParam(required = false)String vcCardNo, | |
889 | + @RequestParam(required = false)String pid){ | |
890 | + return matDeliverFacade.getDueDateByWeChat(cardNo,vcCardNo,pid); | |
889 | 891 | } |
890 | 892 | @RequestMapping(value = "/vs1/test", method = RequestMethod.GET) |
891 | 893 | public void test(){ |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PuerperaManageController.java
View file @
f762b4a
... | ... | @@ -454,6 +454,7 @@ |
454 | 454 | @ResponseBody |
455 | 455 | public BaseResponse getEnums() { |
456 | 456 | Map<String, Object> map = new HashMap<>(); |
457 | + //TODO gwfz增加缓存 | |
457 | 458 | map.put("gwfz", basicConfigFacade.getBaseicConfigByParentId(SystemConfig.HIGH_RISK_ID)); |
458 | 459 | List list = new ArrayList(); |
459 | 460 | for (int i = 5; i <= 100; i = i + 5) { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java
View file @
f762b4a
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
View file @
f762b4a
... | ... | @@ -2776,6 +2776,7 @@ |
2776 | 2776 | basicConfigQuery.setYn(YnEnums.YES.getId()); |
2777 | 2777 | basicConfigQuery.setParentId(SystemConfig.DIAGNOSE_TYPE_ID); |
2778 | 2778 | basicConfigQuery.setKeyword(keyword); |
2779 | + //TODO 判读keyword 如果是null走缓存 | |
2779 | 2780 | List <BasicConfig> datas = basicConfigService.queryBasicConfig(basicConfigQuery); |
2780 | 2781 | // System.out.println(basicConfigQuery.convertToQuery().convertToMongoQuery()); |
2781 | 2782 | List <BasicConfigResult> configResults = new ArrayList <>(); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BasicConfigFacade.java
View file @
f762b4a
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MatDeliverFacade.java
View file @
f762b4a
... | ... | @@ -4273,14 +4273,38 @@ |
4273 | 4273 | * @param idCard |
4274 | 4274 | * @return |
4275 | 4275 | */ |
4276 | - public BaseObjectResponse getDueDateByWeChat(String idCard,String pid) { | |
4276 | + public BaseObjectResponse getDueDateByWeChat(String idCard,String vcCardNo,String pid) { | |
4277 | 4277 | PatientsQuery patientsQuery = new PatientsQuery(); |
4278 | - if (StringUtils.isNotEmpty(idCard)){ | |
4278 | + /* if (StringUtils.isNotEmpty(idCard)){ | |
4279 | 4279 | patientsQuery.setCardNo(idCard); |
4280 | 4280 | } |
4281 | + if (StringUtils.isNotEmpty(vcCardNo)){ | |
4282 | + patientsQuery.setVcCardNo(vcCardNo); | |
4283 | + }*/ | |
4281 | 4284 | if (StringUtils.isNotEmpty(pid)){ |
4282 | 4285 | patientsQuery.setPid(pid); |
4283 | 4286 | } |
4287 | + //如果参数传patient id ,肯定应该以id为查询条件 cfl 20230927 | |
4288 | + if (StringUtils.isNotEmpty(idCard)) { | |
4289 | + //如果查询是卡号11位数且1开头,认为是手机号码 cfl 20231128 | |
4290 | + if(idCard.length() == 11 && idCard.startsWith("1")){ | |
4291 | + patientsQuery.setPhone(idCard); | |
4292 | + }else{ | |
4293 | + patientsQuery.setCardNo(idCard); | |
4294 | + } | |
4295 | + | |
4296 | + } | |
4297 | + | |
4298 | + //id 和卡号都为空,才有可能使用就诊卡号查询 cfl 20230927 | |
4299 | + if (StringUtils.isNotEmpty(vcCardNo)) { | |
4300 | + //德州市妇幼保健院医院通过(就诊卡号、银行卡号,社保卡号) 查询出对应的用过的卡号 add lqy | |
4301 | + /* if (CollectionUtils.isNotEmpty(hospitalId) && hospitalId.contains("1000000114")) { | |
4302 | + patientsQuery.setVcCardNos(dzfyHisService.getDzVcCardNos(vcCardNo)); | |
4303 | + } else {*/ | |
4304 | + patientsQuery.setVcCardNo(vcCardNo); | |
4305 | + //} | |
4306 | + } | |
4307 | + | |
4284 | 4308 | patientsQuery.setYn(1); |
4285 | 4309 | List<Patients> patientsList = patientsService.queryPatient(patientsQuery); |
4286 | 4310 | BaseObjectResponse objectResponse = new BaseObjectResponse(); |
... | ... | @@ -4334,6 +4358,9 @@ |
4334 | 4358 | |
4335 | 4359 | private static int getTime(Date dueDate) { |
4336 | 4360 | int days = DateUtil.daysBetween(dueDate, new Date()); |
4361 | + if(days==0){ | |
4362 | + return 1; | |
4363 | + } | |
4337 | 4364 | return days%7==0?days/7:days/7+1; |
4338 | 4365 | } |
4339 | 4366 | private HighScoreResult queryRisk(List<String> id) { |