Commit b1dea863d6cf945d5d4a795928a79831211778e6
1 parent
07ceae1264
Exists in
master
and in
6 other branches
孕前优生上传省平台定时任务
Showing 2 changed files with 16 additions and 5 deletions
platform-operate-api/src/main/java/com/lyms/hospitalapi/lhxfy/LhxfyService.java
View file @
b1dea86
... | ... | @@ -958,8 +958,8 @@ |
958 | 958 | public BaseResponse uploadingProvince(List<String> ids){ |
959 | 959 | BaseResponse baseResponse=new BaseResponse();//返回结果对象 |
960 | 960 | if(CollectionUtils.isEmpty(ids)){ |
961 | - LogUtil.error("机构id-NULL", null); | |
962 | - baseResponse.setErrormsg("机构id-NULL"); | |
961 | + LogUtil.error("机构id:NULL", null); | |
962 | + baseResponse.setErrormsg("机构id:NULL"); | |
963 | 963 | return baseResponse; |
964 | 964 | } |
965 | 965 | List<String> baseResponseList=new ArrayList<>();//记录错误信息 |
... | ... | @@ -1422,9 +1422,15 @@ |
1422 | 1422 | MongoCondition con2 = MongoCondition.newInstance("isUploadingProvince",false, MongoOper.EXISTS); |
1423 | 1423 | query.addCriteria(c.orCondition(new MongoCondition[]{con1, con2}).getCriteria()); |
1424 | 1424 | //检查结果时间 |
1425 | - query.addCriteria(Criteria.where("resultadvice.fillDate").gte(DateUtil.getyyyy_MM_dd(start)).lte(DateUtil.getyyyy_MM_dd(end))); | |
1426 | - //查询院内孕前优生档案 | |
1427 | - List <String> ids = mongoTemplate.find(query,String.class,"id"); | |
1425 | + query.addCriteria(Criteria.where("resultAdvice.fillDate").gte(DateUtil.getyyyy_MM_dd(start)).lte(DateUtil.getyyyy_MM_dd(end))); | |
1426 | + //只返回id字段 | |
1427 | + query.fields().include("_id"); | |
1428 | + //查询院内孕前优生档案id集合 | |
1429 | + List <String> ids = new ArrayList<>(); | |
1430 | + for (PreEugenicsBaseModel model : mongoTemplate.find(query, PreEugenicsBaseModel.class)) { | |
1431 | + ids.add(model.getId()); | |
1432 | + } | |
1433 | + //上传省平台 | |
1428 | 1434 | uploadingProvince(ids); |
1429 | 1435 | } |
1430 | 1436 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TestController.java
View file @
b1dea86
... | ... | @@ -4937,5 +4937,10 @@ |
4937 | 4937 | return ""; |
4938 | 4938 | } |
4939 | 4939 | |
4940 | + @RequestMapping(value = "/test/a", method = RequestMethod.GET) | |
4941 | + @ResponseBody | |
4942 | + public void testa() { | |
4943 | + lhxfyService.uploadingProvinceTask("2100001605", DateUtil.parseYMD("2021-12-09"), DateUtil.parseYMD("2021-12-10")); | |
4944 | + } | |
4940 | 4945 | } |