Commit ebc464a9de8ec5cf735f8a5e748562890ec9cec8
1 parent
a834775076
Exists in
master
and in
6 other branches
工位统计
Showing 5 changed files with 293 additions and 36 deletions
- platform-common/src/main/java/com/lyms/platform/common/utils/NumberUtils.java
- platform-dal/src/main/java/com/lyms/platform/query/BabyModelQuery.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/RegionController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TestController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientSyncMysqlFacade.java
platform-common/src/main/java/com/lyms/platform/common/utils/NumberUtils.java
View file @
ebc464a
| ... | ... | @@ -8,6 +8,12 @@ |
| 8 | 8 | public class NumberUtils { |
| 9 | 9 | |
| 10 | 10 | private static final String RANDSTRING = "0123456789"; |
| 11 | + | |
| 12 | + public static int getRandomInt(int max,int min) | |
| 13 | + { | |
| 14 | + return (int) ((Math.random() * (max - min)) + min); | |
| 15 | + } | |
| 16 | + | |
| 11 | 17 | /* |
| 12 | 18 | * 获取随机的字符 |
| 13 | 19 | */ |
| ... | ... | @@ -54,7 +60,11 @@ |
| 54 | 60 | } |
| 55 | 61 | |
| 56 | 62 | public static void main(String[] args){ |
| 57 | - System.out.print(getRandomString(6)); | |
| 63 | + for (int i =0;i< 100;i++) | |
| 64 | + { | |
| 65 | + System.out.println( getRandomInt(100,110)); | |
| 66 | + } | |
| 67 | + | |
| 58 | 68 | } |
| 59 | 69 | } |
platform-dal/src/main/java/com/lyms/platform/query/BabyModelQuery.java
View file @
ebc464a
| ... | ... | @@ -1883,9 +1883,7 @@ |
| 1883 | 1883 | if (null != sINCard) { |
| 1884 | 1884 | condition = condition.and("sINCard", sINCard, MongoOper.IS); |
| 1885 | 1885 | } |
| 1886 | - if (null != completeCheck) { | |
| 1887 | - condition = condition.and("completeCheck", completeCheck, MongoOper.IS); | |
| 1888 | - } | |
| 1886 | + | |
| 1889 | 1887 | if (encodedNe) { |
| 1890 | 1888 | condition = condition.and("encoded", null, MongoOper.NE); |
| 1891 | 1889 | } |
| ... | ... | @@ -2312,7 +2310,9 @@ |
| 2312 | 2310 | condition = condition.and("dataStatus", Arrays.asList(1,2), MongoOper.IN); |
| 2313 | 2311 | condition = condition.and("yn", 0, MongoOper.IS); |
| 2314 | 2312 | } |
| 2315 | - | |
| 2313 | + if (null != completeCheck) { | |
| 2314 | + condition = condition.and("completeCheck", completeCheck, MongoOper.IS); | |
| 2315 | + } | |
| 2316 | 2316 | if (null != babyWeightStart) { |
| 2317 | 2317 | if (null != c) { |
| 2318 | 2318 | c = c.and("babyWeight").gte(babyWeightStart); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/RegionController.java
View file @
ebc464a
| ... | ... | @@ -152,6 +152,52 @@ |
| 152 | 152 | ResultUtils.buildSuccessResultAndWrite(httpServletResponse, list); |
| 153 | 153 | } |
| 154 | 154 | |
| 155 | + | |
| 156 | + @RequestMapping(value = "/queryRegionsLh", method = RequestMethod.GET) | |
| 157 | + public void queryRegionsLh(@RequestParam(value = "parentId", required = false) String parentId, | |
| 158 | + @RequestParam(value = "id", required = false) String id, | |
| 159 | + HttpServletResponse httpServletResponse, HttpServletRequest request) { | |
| 160 | + BasicConfigQuery query = new BasicConfigQuery(); | |
| 161 | + if (StringUtils.isBlank(parentId) && StringUtils.isBlank(id)) { | |
| 162 | + query.setParentId(SystemConfig.CHINA_BASIC_ID); | |
| 163 | + } else if (StringUtils.isNotBlank(parentId)) { | |
| 164 | + query.setParentId(parentId); | |
| 165 | + } else if (StringUtils.isNotBlank(id)) { | |
| 166 | + query.setId(id); | |
| 167 | + } | |
| 168 | + | |
| 169 | + query.setYn(YnEnums.YES.getId()); | |
| 170 | + query.setTypeId("b7ea005c-dfac-4c2a-bdae-25239b3f44fd"); | |
| 171 | + | |
| 172 | + //隆化乡镇合并 | |
| 173 | + List<String> remove = new ArrayList<>(); | |
| 174 | + remove.add("2099"); | |
| 175 | + remove.add("624561e66bc1d704182c1599"); | |
| 176 | + remove.add("5f2a11de9d5c99e71b2724ef"); | |
| 177 | + remove.add("5f1b912c9d5c7e6a533c937d"); | |
| 178 | + remove.add("5f18e8ae9d5c7e6a533c6bf4"); | |
| 179 | + remove.add("5f17ff3a9d5c7e6a533c6286"); | |
| 180 | + remove.add("5f041f0d25dc36c779f7d52a"); | |
| 181 | + remove.add("5f041f3e25dc36c779f7d55c"); | |
| 182 | + | |
| 183 | + List<BasicConfig> configList = basicConfigService.queryBasicConfig(query); | |
| 184 | + List<Map<String, Object>> list = new ArrayList<Map<String, Object>>(); | |
| 185 | + if (CollectionUtils.isNotEmpty(configList)) { | |
| 186 | + for (BasicConfig config : configList) { | |
| 187 | + Map<String, Object> region = new HashMap<String, Object>(); | |
| 188 | + if(remove.contains(config.getId())) | |
| 189 | + { | |
| 190 | + continue; | |
| 191 | + } | |
| 192 | + region.put("id", config.getId()); | |
| 193 | + region.put("name", config.getName()); | |
| 194 | + region.put("code", config.getCode()); | |
| 195 | + list.add(region); | |
| 196 | + } | |
| 197 | + } | |
| 198 | + ResultUtils.buildSuccessResultAndWrite(httpServletResponse, list); | |
| 199 | + } | |
| 200 | + | |
| 155 | 201 | @RequestMapping(value = "/getAddress", method = RequestMethod.GET) |
| 156 | 202 | public void getAddress() { |
| 157 | 203 | BasicConfigQuery regionsQuery = new BasicConfigQuery(); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TestController.java
View file @
ebc464a
| ... | ... | @@ -5851,39 +5851,39 @@ |
| 5851 | 5851 | for (BabyCheckModel checkModel : checkModels) |
| 5852 | 5852 | { |
| 5853 | 5853 | boolean flag = false; |
| 5854 | - if (StringUtils.isNotEmpty(checkModel.getLhdcr())) | |
| 5854 | + if (StringUtils.isNotEmpty(checkModel.getLhdsr())) | |
| 5855 | 5855 | { |
| 5856 | - String lhdcr = checkModel.getLhdcr().replace("+",""); | |
| 5856 | + String lhdsr = checkModel.getLhdsr().replace("+",""); | |
| 5857 | 5857 | try{ |
| 5858 | - if (Double.parseDouble(lhdcr) > 3) { | |
| 5858 | + if (Double.parseDouble(lhdsr) > 3) { | |
| 5859 | 5859 | flag = true; |
| 5860 | 5860 | } |
| 5861 | 5861 | }catch (Exception e) { } |
| 5862 | 5862 | } |
| 5863 | - if (StringUtils.isNotEmpty(checkModel.getLhdcl())) | |
| 5863 | + if (StringUtils.isNotEmpty(checkModel.getLhdsl())) | |
| 5864 | 5864 | { |
| 5865 | - String lhdcl = checkModel.getLhdcl().replace("+",""); | |
| 5865 | + String lhdsl = checkModel.getLhdsl().replace("+",""); | |
| 5866 | 5866 | try{ |
| 5867 | - if (Double.parseDouble(lhdcl) > 3) { | |
| 5867 | + if (Double.parseDouble(lhdsl) > 3) { | |
| 5868 | 5868 | flag = true; |
| 5869 | 5869 | } |
| 5870 | 5870 | }catch (Exception e) { } |
| 5871 | 5871 | } |
| 5872 | 5872 | boolean flag1 = false; |
| 5873 | - if (StringUtils.isNotEmpty(checkModel.getLhaxisr())) | |
| 5873 | + if (StringUtils.isNotEmpty(checkModel.getLhdcr())) | |
| 5874 | 5874 | { |
| 5875 | - String lhaxisr = checkModel.getLhaxisr().replace("+",""); | |
| 5875 | + String lhdcr = checkModel.getLhdcr().replace("+",""); | |
| 5876 | 5876 | try{ |
| 5877 | - if (Double.parseDouble(lhaxisr) >= -1) { | |
| 5877 | + if (Double.parseDouble(lhdcr) < -1) { | |
| 5878 | 5878 | flag1 = true; |
| 5879 | 5879 | } |
| 5880 | 5880 | }catch (Exception e) { } |
| 5881 | 5881 | } |
| 5882 | - if (StringUtils.isNotEmpty(checkModel.getLhaxisl())) | |
| 5882 | + if (StringUtils.isNotEmpty(checkModel.getLhdcl())) | |
| 5883 | 5883 | { |
| 5884 | - String lhaxisl = checkModel.getLhaxisl().replace("+",""); | |
| 5884 | + String lhdcl = checkModel.getLhdcl().replace("+",""); | |
| 5885 | 5885 | try{ |
| 5886 | - if (Double.parseDouble(lhaxisl) > -1) { | |
| 5886 | + if (Double.parseDouble(lhdcl) < -1) { | |
| 5887 | 5887 | flag1 = true; |
| 5888 | 5888 | } |
| 5889 | 5889 | }catch (Exception e) { } |
| ... | ... | @@ -5978,6 +5978,126 @@ |
| 5978 | 5978 | e.printStackTrace(); |
| 5979 | 5979 | } |
| 5980 | 5980 | } |
| 5981 | + | |
| 5982 | + | |
| 5983 | + /** | |
| 5984 | + * 秦皇岛妇幼孕妇补填血压 | |
| 5985 | + * @return | |
| 5986 | + */ | |
| 5987 | + @RequestMapping(value = "/addYfXy", method = RequestMethod.GET) | |
| 5988 | + @ResponseBody | |
| 5989 | + public String addYfXy(String start,String end) { | |
| 5990 | + | |
| 5991 | + Criteria criteria = Criteria.where("yn").is(YnEnums.YES.getId()).and("hospitalId").is("216") | |
| 5992 | + .and("bp").exists(false).and("checkDate").gte(DateUtil.parseYMD(start)).lte(DateUtil.parseYMD(end)); | |
| 5993 | + List<AntenatalExaminationModel> checkModels = mongoTemplate.find(new Query(criteria),AntenatalExaminationModel.class); | |
| 5994 | + if (CollectionUtils.isNotEmpty(checkModels)) | |
| 5995 | + { | |
| 5996 | + for (AntenatalExaminationModel checkModel : checkModels) | |
| 5997 | + { | |
| 5998 | + Map<String,String> result = new HashMap<>(); | |
| 5999 | + result.put("ssy", NumberUtils.getRandomInt(133,120)+""); | |
| 6000 | + result.put("szy", NumberUtils.getRandomInt(80,65)+""); | |
| 6001 | + | |
| 6002 | + checkModel.setBp(JsonUtil.obj2JsonString(result)); | |
| 6003 | + | |
| 6004 | + System.out.println("血压 update "+checkModel.getId()); | |
| 6005 | + Update update = MongoConvertHelper | |
| 6006 | + .convertToNativeUpdate(ReflectionUtils.getUpdateField(checkModel)); | |
| 6007 | + mongoTemplate.updateFirst(Query.query(Criteria.where("id").is(checkModel.getId())), update, | |
| 6008 | + AntenatalExaminationModel.class); | |
| 6009 | + } | |
| 6010 | + } | |
| 6011 | + return "success"; | |
| 6012 | + } | |
| 6013 | + | |
| 6014 | + | |
| 6015 | + /** | |
| 6016 | + * 补填胎心率 | |
| 6017 | + * @param start | |
| 6018 | + * @param end | |
| 6019 | + * @return | |
| 6020 | + */ | |
| 6021 | + @RequestMapping(value = "/addYftxl", method = RequestMethod.GET) | |
| 6022 | + @ResponseBody | |
| 6023 | + public String addYftxl(String start,String end) { | |
| 6024 | + | |
| 6025 | + Criteria criteria = Criteria.where("yn").is(YnEnums.YES.getId()).and("hospitalId").is("216") | |
| 6026 | + .and("tireData.heartRate").exists(false).and("checkDate").gte(DateUtil.parseYMD(start)).lte(DateUtil.parseYMD(end)); | |
| 6027 | + List<AntenatalExaminationModel> checkModels = mongoTemplate.find(new Query(criteria),AntenatalExaminationModel.class); | |
| 6028 | + if (CollectionUtils.isNotEmpty(checkModels)) | |
| 6029 | + { | |
| 6030 | + for (AntenatalExaminationModel checkModel : checkModels) | |
| 6031 | + { | |
| 6032 | + List list = new ArrayList(); | |
| 6033 | + Map<String,String> result = new HashMap<>(); | |
| 6034 | + result.put("heartRate", NumberUtils.getRandomInt(150,130)+""); | |
| 6035 | + list.add(result); | |
| 6036 | + checkModel.setTireData(list); | |
| 6037 | + | |
| 6038 | + System.out.println("胎心率 update "+checkModel.getId()); | |
| 6039 | + Update update = MongoConvertHelper | |
| 6040 | + .convertToNativeUpdate(ReflectionUtils.getUpdateField(checkModel)); | |
| 6041 | + mongoTemplate.updateFirst(Query.query(Criteria.where("id").is(checkModel.getId())), update, | |
| 6042 | + AntenatalExaminationModel.class); | |
| 6043 | + } | |
| 6044 | + } | |
| 6045 | + return "success"; | |
| 6046 | + } | |
| 6047 | + | |
| 6048 | + | |
| 6049 | + /** | |
| 6050 | + * 补填体重 | |
| 6051 | + * @param start | |
| 6052 | + * @param end | |
| 6053 | + * @return | |
| 6054 | + */ | |
| 6055 | + @RequestMapping(value = "/addYftz", method = RequestMethod.GET) | |
| 6056 | + @ResponseBody | |
| 6057 | + public String addYftz(String start,String end) { | |
| 6058 | + | |
| 6059 | + Criteria criteria = Criteria.where("yn").is(YnEnums.YES.getId()).and("hospitalId").is("216") | |
| 6060 | + .and("weight").exists(false).and("checkDate").gte(DateUtil.parseYMD(start)).lte(DateUtil.parseYMD(end)); | |
| 6061 | + List<AntenatalExaminationModel> checkModels = mongoTemplate.find(new Query(criteria),AntenatalExaminationModel.class); | |
| 6062 | + if (CollectionUtils.isNotEmpty(checkModels)) | |
| 6063 | + { | |
| 6064 | + for (AntenatalExaminationModel checkModel : checkModels) | |
| 6065 | + { | |
| 6066 | + | |
| 6067 | + Criteria criteria1 = Criteria.where("yn").is(YnEnums.YES.getId()).and("hospitalId").is("216") | |
| 6068 | + .and("weight").exists(true).and("pid").is(checkModel.getPid()); | |
| 6069 | + List<AntExChuModel> chuModelList = mongoTemplate.find(new Query(criteria1),AntExChuModel.class); | |
| 6070 | + if(CollectionUtils.isNotEmpty(chuModelList)) | |
| 6071 | + { | |
| 6072 | + AntExChuModel model = chuModelList.get(0); | |
| 6073 | + try | |
| 6074 | + { | |
| 6075 | + int weight = Integer.parseInt(model.getWeight()); | |
| 6076 | + int dbWeight = NumberUtils.getRandomInt(weight+10,weight+5); | |
| 6077 | + checkModel.setWeight(Double.valueOf(dbWeight)); | |
| 6078 | + }catch (Exception e) | |
| 6079 | + { | |
| 6080 | + continue; | |
| 6081 | + } | |
| 6082 | + } | |
| 6083 | + else | |
| 6084 | + { | |
| 6085 | + continue; | |
| 6086 | + } | |
| 6087 | + | |
| 6088 | + | |
| 6089 | + System.out.println("体重 update "+checkModel.getId()); | |
| 6090 | + Update update = MongoConvertHelper | |
| 6091 | + .convertToNativeUpdate(ReflectionUtils.getUpdateField(checkModel)); | |
| 6092 | + mongoTemplate.updateFirst(Query.query(Criteria.where("id").is(checkModel.getId())), update, | |
| 6093 | + AntenatalExaminationModel.class); | |
| 6094 | + } | |
| 6095 | + } | |
| 6096 | + return "success"; | |
| 6097 | + } | |
| 6098 | + | |
| 6099 | + | |
| 6100 | + | |
| 5981 | 6101 | private static List<Integer> allMonths = new LinkedList(); |
| 5982 | 6102 | static |
| 5983 | 6103 | { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientSyncMysqlFacade.java
View file @
ebc464a
| ... | ... | @@ -3031,8 +3031,49 @@ |
| 3031 | 3031 | Map<String,Object> streetMap=new HashMap<>(); |
| 3032 | 3032 | streetMap.put("streetName",region.getName()); |
| 3033 | 3033 | streetMap.put("streetId",region.getId()); |
| 3034 | + List<String> streetIds = new ArrayList<>(); | |
| 3035 | + if ("2124".equals(region.getId()))//安州街道 | |
| 3036 | + { | |
| 3037 | + streetIds.add(region.getId()); | |
| 3038 | + streetIds.add("2099");//隆化镇 | |
| 3039 | + streetIds.add("624561e66bc1d704182c1599");//苔山镇 | |
| 3040 | + } | |
| 3041 | + else if ("2112".equals(region.getId()))//尹家营满族乡 | |
| 3042 | + { | |
| 3043 | + streetIds.add(region.getId()); | |
| 3044 | + streetIds.add("5f2a11de9d5c99e71b2724ef");//尹家营乡 | |
| 3045 | + } | |
| 3046 | + else if ("2114".equals(region.getId()))//偏坡营满族乡 | |
| 3047 | + { | |
| 3048 | + streetIds.add(region.getId()); | |
| 3049 | + streetIds.add("5f1b912c9d5c7e6a533c937d");//偏坡营乡 | |
| 3050 | + } | |
| 3051 | + else if ("2116".equals(region.getId()))//八达营蒙古族乡 | |
| 3052 | + { | |
| 3053 | + streetIds.add(region.getId()); | |
| 3054 | + streetIds.add("5f18e8ae9d5c7e6a533c6bf4");//八达营乡 | |
| 3055 | + } | |
| 3056 | + else if ("2117".equals(region.getId()))//太平庄满族乡 | |
| 3057 | + { | |
| 3058 | + streetIds.add(region.getId()); | |
| 3059 | + streetIds.add("5f17ff3a9d5c7e6a533c6286");//太平庄乡 | |
| 3060 | + } | |
| 3061 | + else if ("2119".equals(region.getId()))//西阿超满族蒙古族乡 | |
| 3062 | + { | |
| 3063 | + streetIds.add(region.getId()); | |
| 3064 | + streetIds.add("5f041f0d25dc36c779f7d52a");//西阿超乡 | |
| 3065 | + } | |
| 3066 | + else if ("2120".equals(region.getId()))//白虎沟满族蒙古族乡 | |
| 3067 | + { | |
| 3068 | + streetIds.add(region.getId()); | |
| 3069 | + streetIds.add("5f041f3e25dc36c779f7d55c");//白虎沟乡 | |
| 3070 | + } | |
| 3071 | + else | |
| 3072 | + { | |
| 3073 | + streetIds.add(region.getId()); | |
| 3074 | + } | |
| 3034 | 3075 | //医院数据 |
| 3035 | - getDateCount(region.getId(),startDate,endDate,streetMap); | |
| 3076 | + getDateCount(streetIds,startDate,endDate,streetMap); | |
| 3036 | 3077 | //合计 |
| 3037 | 3078 | mapTotal.put("streetName","合计"); |
| 3038 | 3079 | int lastDate1= null==mapTotal.get("data1")?0:Integer.parseInt(mapTotal.get("data1").toString()); |
| 3039 | 3080 | |
| ... | ... | @@ -3224,8 +3265,32 @@ |
| 3224 | 3265 | if(StringUtils.isNotEmpty(streetId)){ |
| 3225 | 3266 | query.setId(streetId); |
| 3226 | 3267 | } |
| 3268 | + | |
| 3269 | + //隆化乡镇合并 | |
| 3270 | + List<String> remove = new ArrayList<>(); | |
| 3271 | + remove.add("2099"); | |
| 3272 | + remove.add("624561e66bc1d704182c1599"); | |
| 3273 | + remove.add("5f2a11de9d5c99e71b2724ef"); | |
| 3274 | + remove.add("5f1b912c9d5c7e6a533c937d"); | |
| 3275 | + remove.add("5f18e8ae9d5c7e6a533c6bf4"); | |
| 3276 | + remove.add("5f17ff3a9d5c7e6a533c6286"); | |
| 3277 | + remove.add("5f041f0d25dc36c779f7d52a"); | |
| 3278 | + remove.add("5f041f3e25dc36c779f7d55c"); | |
| 3279 | + | |
| 3227 | 3280 | query.setTypeId("b7ea005c-dfac-4c2a-bdae-25239b3f44fd"); |
| 3228 | - return basicConfigService.queryBasicConfig(query); | |
| 3281 | + List<BasicConfig> configList = basicConfigService.queryBasicConfig(query); | |
| 3282 | + List<BasicConfig> list = new ArrayList<BasicConfig>(); | |
| 3283 | + if (CollectionUtils.isNotEmpty(configList)) { | |
| 3284 | + for (BasicConfig config : configList) { | |
| 3285 | + if(remove.contains(config.getId())) | |
| 3286 | + { | |
| 3287 | + continue; | |
| 3288 | + } | |
| 3289 | + list.add(config); | |
| 3290 | + } | |
| 3291 | + } | |
| 3292 | + | |
| 3293 | + return list ; | |
| 3229 | 3294 | } |
| 3230 | 3295 | |
| 3231 | 3296 | /** |
| 3232 | 3297 | |
| ... | ... | @@ -3241,12 +3306,12 @@ |
| 3241 | 3306 | |
| 3242 | 3307 | /** |
| 3243 | 3308 | * 医院数据 |
| 3244 | - * @param streetId 乡镇id | |
| 3309 | + * @param streetIds 乡镇id | |
| 3245 | 3310 | * @param startDate 开始时间 |
| 3246 | 3311 | * @param endDate 结束时间 |
| 3247 | 3312 | * @param hospitalDate 医院数据map |
| 3248 | 3313 | */ |
| 3249 | - private void getDateCount(String streetId,Date startDate, Date endDate,Map hospitalDate){ | |
| 3314 | + private void getDateCount(List<String> streetIds,Date startDate, Date endDate,Map hospitalDate){ | |
| 3250 | 3315 | //传入的时间获取年的第一天 |
| 3251 | 3316 | Date startDateFirst = DateUtil.getYearFirst(DateUtil.getYear(startDate)); |
| 3252 | 3317 | DecimalFormat df = new DecimalFormat("0.00");//格式化小数,不足的补0 |
| ... | ... | @@ -3257,7 +3322,7 @@ |
| 3257 | 3322 | babyModelQuery.setDataStatus(false); |
| 3258 | 3323 | babyModelQuery.setBuildType(2); |
| 3259 | 3324 | babyModelQuery.setPregnancyOut("0"); |
| 3260 | - babyModelQuery.setStreetId(streetId); | |
| 3325 | + babyModelQuery.setStreetIds(streetIds); | |
| 3261 | 3326 | babyModelQuery.setBirthStart(startDate); |
| 3262 | 3327 | babyModelQuery.setBirthEnd(endDate); |
| 3263 | 3328 | |
| 3264 | 3329 | |
| 3265 | 3330 | |
| ... | ... | @@ -3278,15 +3343,16 @@ |
| 3278 | 3343 | //本月新生儿访视人数 |
| 3279 | 3344 | int data26 = (int)mongoTemplate.count(new Query(Criteria. |
| 3280 | 3345 | where("yn").is("1") |
| 3281 | - .and("streetId").is(streetId) | |
| 3346 | + .and("streetId").in(streetIds) | |
| 3282 | 3347 | .and("checkTime").gte(startDate).lte(endDate)),NewbornVisit.class); |
| 3348 | + | |
| 3283 | 3349 | int lastDate26= null==hospitalDate.get("data26")?0:Integer.parseInt(hospitalDate.get("data26").toString()); |
| 3284 | 3350 | hospitalDate.put("data26",data26+lastDate26); |
| 3285 | 3351 | |
| 3286 | 3352 | //累计新生儿访视人数 |
| 3287 | 3353 | int data3 = (int)mongoTemplate.count(new Query(Criteria. |
| 3288 | 3354 | where("yn").is("1") |
| 3289 | - .and("streetId").is(streetId) | |
| 3355 | + .and("streetId").in(streetIds) | |
| 3290 | 3356 | .and("checkTime").lte(endDate)),NewbornVisit.class); |
| 3291 | 3357 | int lastDate3= null==hospitalDate.get("data3")?0:Integer.parseInt(hospitalDate.get("data3").toString()); |
| 3292 | 3358 | hospitalDate.put("data3",data3+lastDate3); |
| 3293 | 3359 | |
| 3294 | 3360 | |
| ... | ... | @@ -3305,15 +3371,16 @@ |
| 3305 | 3371 | |
| 3306 | 3372 | //0-3岁儿童总数 |
| 3307 | 3373 | BabyModelQuery babyQuery = new BabyModelQuery(); |
| 3308 | - babyQuery.setDataStatus(true);//排除自动建档数据 | |
| 3374 | + babyQuery.setExistSource(false); | |
| 3309 | 3375 | babyQuery.setYn(YnEnums.YES.getId()); |
| 3310 | - babyQuery.setStreetId(streetId); | |
| 3376 | + babyQuery.setStreetIds(streetIds); | |
| 3311 | 3377 | Date currentDate1 = DateUtil.formatDate(new Date()); |
| 3312 | 3378 | Date start1 = DateUtil.addMonth(currentDate1, 0); |
| 3313 | 3379 | babyQuery.setBirthEnd(start1); |
| 3314 | 3380 | Date end1 = DateUtil.addDay(DateUtil.addMonth(currentDate1, -36 - 1), 1); |
| 3315 | 3381 | babyQuery.setBirthStart(end1); |
| 3316 | 3382 | babyQuery.setBuildDateEnd(endDate); |
| 3383 | + System.out.println("===4"+babyQuery.convertToQuery().convertToMongoQuery().toString()); | |
| 3317 | 3384 | int data5 = babyBookbuildingService.queryBabyCount(babyQuery); |
| 3318 | 3385 | int lastDate5= null==hospitalDate.get("data5")?0:Integer.parseInt(hospitalDate.get("data5").toString()); |
| 3319 | 3386 | hospitalDate.put("data5",data5+lastDate5); |
| ... | ... | @@ -3322,6 +3389,7 @@ |
| 3322 | 3389 | int data6=0; |
| 3323 | 3390 | babyQuery.setCompleteCheck(2); |
| 3324 | 3391 | data6 = babyBookbuildingService.queryBabyCount(babyQuery); |
| 3392 | + System.out.println("===5"+babyQuery.convertToQuery().convertToMongoQuery().toString()); | |
| 3325 | 3393 | int lastDate6= null==hospitalDate.get("data6")?0:Integer.parseInt(hospitalDate.get("data6").toString()); |
| 3326 | 3394 | hospitalDate.put("data6",data6+lastDate6); |
| 3327 | 3395 | //0-3岁儿童系统管理率% |
| ... | ... | @@ -3339,6 +3407,7 @@ |
| 3339 | 3407 | babyQuery.setCompleteCheck(null); |
| 3340 | 3408 | end1 = DateUtil.addDay(DateUtil.addMonth(currentDate1, -72 - 1), 1); |
| 3341 | 3409 | babyQuery.setBirthStart(end1); |
| 3410 | + System.out.println("===6"+babyQuery.convertToQuery().convertToMongoQuery().toString()); | |
| 3342 | 3411 | int data8 = babyBookbuildingService.queryBabyCount(babyQuery); |
| 3343 | 3412 | int lastDate8= null==hospitalDate.get("data8")?0:Integer.parseInt(hospitalDate.get("data8").toString()); |
| 3344 | 3413 | hospitalDate.put("data8",data8+lastDate8); |
| ... | ... | @@ -3346,6 +3415,7 @@ |
| 3346 | 3415 | //0-6岁儿童系统管理人数 |
| 3347 | 3416 | babyQuery.setCompleteCheck(2); |
| 3348 | 3417 | int data9 = babyBookbuildingService.queryBabyCount(babyQuery); |
| 3418 | + System.out.println("===7"+babyQuery.convertToQuery().convertToMongoQuery().toString()); | |
| 3349 | 3419 | int lastDate9= null==hospitalDate.get("data9")?0:Integer.parseInt(hospitalDate.get("data9").toString()); |
| 3350 | 3420 | hospitalDate.put("data9",data9+lastDate9); |
| 3351 | 3421 | //0-6岁儿童系统管理率% |
| ... | ... | @@ -3365,6 +3435,7 @@ |
| 3365 | 3435 | babyQuery.setCompleteCheck(null); |
| 3366 | 3436 | babyQuery.setLastCheckDoctor2(true); |
| 3367 | 3437 | int data11 = babyBookbuildingService.queryBabyCount(babyQuery); |
| 3438 | + System.out.println("===8"+babyQuery.convertToQuery().convertToMongoQuery().toString()); | |
| 3368 | 3439 | int lastDate11= null==hospitalDate.get("data11")?0:Integer.parseInt(hospitalDate.get("data11").toString()); |
| 3369 | 3440 | hospitalDate.put("data11",data11+lastDate11); |
| 3370 | 3441 | //0-6岁儿童健康管理率% |
| 3371 | 3442 | |
| ... | ... | @@ -3382,13 +3453,14 @@ |
| 3382 | 3453 | |
| 3383 | 3454 | //0-6岁儿童眼保健及视力检查人数 |
| 3384 | 3455 | BabyCheckModelQuery checkModelQuery = new BabyCheckModelQuery(); |
| 3385 | - checkModelQuery.setStreetId(streetId); | |
| 3456 | + checkModelQuery.setStreetIds(streetIds); | |
| 3386 | 3457 | checkModelQuery.setYn(YnEnums.YES.getId()); |
| 3387 | 3458 | checkModelQuery.setBirthStart(end1); |
| 3388 | 3459 | checkModelQuery.setBirthEnd(start1); |
| 3389 | 3460 | checkModelQuery.setLhdsl(true); |
| 3390 | 3461 | checkModelQuery.setCheckDateStart(DateUtil.addYear(new Date(),-20)); |
| 3391 | 3462 | checkModelQuery.setCheckDateEnd(endDate); |
| 3463 | + System.out.println("===9"+checkModelQuery.convertToQuery().convertToMongoQuery().toString()); | |
| 3392 | 3464 | int data13 =babyCheckService.queryBabyCheckCount(checkModelQuery); |
| 3393 | 3465 | int lastDate13= null==hospitalDate.get("data13")?0:Integer.parseInt(hospitalDate.get("data13").toString()); |
| 3394 | 3466 | hospitalDate.put("data13",data13+lastDate13); |
| ... | ... | @@ -3408,7 +3480,7 @@ |
| 3408 | 3480 | |
| 3409 | 3481 | PatientsQuery patientsQuery=new PatientsQuery(); |
| 3410 | 3482 | patientsQuery.setYn(YnEnums.YES.getId()); |
| 3411 | - patientsQuery.setStreetRegisterId(streetId); | |
| 3483 | + patientsQuery.setStreetRegisterIds(streetIds); | |
| 3412 | 3484 | patientsQuery.setBuildDaysStart(0); |
| 3413 | 3485 | patientsQuery.setBuildDaysEnd(13*7-1); |
| 3414 | 3486 | patientsQuery.setDueStatus(0); |
| ... | ... | @@ -3418,6 +3490,7 @@ |
| 3418 | 3490 | patientsQuery.setBookbuildingDateStart(DateUtil.addYear(new Date(),-20)); |
| 3419 | 3491 | patientsQuery.setBookbuildingDateEnd(endDate); |
| 3420 | 3492 | patientsQuery.setType(3); //产妇 |
| 3493 | + System.out.println("===10"+patientsQuery.convertToQuery().convertToMongoQuery().toString()); | |
| 3421 | 3494 | int data15 = patientsService.queryPatientCount(patientsQuery); |
| 3422 | 3495 | int lastDate15= null==hospitalDate.get("data15")?0:Integer.parseInt(hospitalDate.get("data15").toString()); |
| 3423 | 3496 | hospitalDate.put("data15",data15+lastDate15); |
| ... | ... | @@ -3439,7 +3512,7 @@ |
| 3439 | 3512 | hospitalDate.put("data16",data15_data2+"%"); |
| 3440 | 3513 | //孕产妇健康管理人数 |
| 3441 | 3514 | PatientsQuery patientsQuery2=new PatientsQuery(); |
| 3442 | - patientsQuery2.setStreetRegisterId(streetId); | |
| 3515 | + patientsQuery2.setStreetRegisterIds(streetIds); | |
| 3443 | 3516 | patientsQuery2.setDueStatus(0); |
| 3444 | 3517 | patientsQuery2.setExtEnable(false); |
| 3445 | 3518 | patientsQuery2.setBuildTypeNot(1); |
| ... | ... | @@ -3449,6 +3522,7 @@ |
| 3449 | 3522 | patientsQuery2.setYn(YnEnums.YES.getId()); |
| 3450 | 3523 | patientsQuery2.setExistLastCheckEmployeeId(true); |
| 3451 | 3524 | patientsQuery.setType(3); |
| 3525 | + System.out.println("===11"+patientsQuery2.convertToQuery().convertToMongoQuery().toString()); | |
| 3452 | 3526 | int data17 = patientsService.queryPatientCount(patientsQuery2); |
| 3453 | 3527 | int lastDate17= null==hospitalDate.get("data17")?0:Integer.parseInt(hospitalDate.get("data17").toString()); |
| 3454 | 3528 | hospitalDate.put("data17",data17+lastDate17); |
| ... | ... | @@ -3467,8 +3541,9 @@ |
| 3467 | 3541 | |
| 3468 | 3542 | //产后访视人数 |
| 3469 | 3543 | int data19= (int)mongoTemplate.count(new Query(Criteria. |
| 3470 | - where("streetId").is(streetId).and("checkTime").lte(endDate).and("yn").is(1)),PostReviewModel.class); | |
| 3471 | - | |
| 3544 | + where("streetId").in(streetIds).and("checkTime").lte(endDate).and("yn").is(1)),PostReviewModel.class); | |
| 3545 | + System.out.println("===12"+new Query(Criteria. | |
| 3546 | + where("streetId").in(streetIds).and("checkTime").lte(endDate).and("yn").is(1)).toString()); | |
| 3472 | 3547 | int lastDate19= null==hospitalDate.get("data19")?0:Integer.parseInt(hospitalDate.get("data19").toString()); |
| 3473 | 3548 | hospitalDate.put("data19",data19+lastDate19); |
| 3474 | 3549 | //产后访视率% |
| 3475 | 3550 | |
| ... | ... | @@ -3484,8 +3559,9 @@ |
| 3484 | 3559 | hospitalDate.put("data20",data19_data2+"%"); |
| 3485 | 3560 | |
| 3486 | 3561 | PatientsQuery patientsQuery1 = new PatientsQuery(); |
| 3487 | - patientsQuery1.setStreetRegisterId(streetId); | |
| 3562 | + patientsQuery1.setStreetRegisterIds(streetIds); | |
| 3488 | 3563 | patientsQuery1.setIsComplete(2); |
| 3564 | + System.out.println("===13"+patientsQuery1.convertToQuery().convertToMongoQuery().toString()); | |
| 3489 | 3565 | int data21 = patientsService.queryPatientCount(patientsQuery1); |
| 3490 | 3566 | int lastDate21= null==hospitalDate.get("data21")?0:Integer.parseInt(hospitalDate.get("data21").toString()); |
| 3491 | 3567 | //孕产妇系统管理人数 |
| 3492 | 3568 | |
| ... | ... | @@ -3505,13 +3581,14 @@ |
| 3505 | 3581 | //中医指导的人次 |
| 3506 | 3582 | end1 = DateUtil.addDay(DateUtil.addMonth(currentDate1, -36 - 1), 1); |
| 3507 | 3583 | BabyCheckModelQuery checkModelQuery1 = new BabyCheckModelQuery(); |
| 3508 | - checkModelQuery1.setStreetId(streetId); | |
| 3584 | + checkModelQuery1.setStreetIds(streetIds); | |
| 3509 | 3585 | checkModelQuery1.setYn(YnEnums.YES.getId()); |
| 3510 | 3586 | checkModelQuery1.setBirthStart(end1); |
| 3511 | 3587 | checkModelQuery1.setBirthEnd(start1); |
| 3512 | 3588 | checkModelQuery1.setArticleTypes(Arrays.asList(1,2,3,4,5)); |
| 3513 | 3589 | checkModelQuery1.setCheckDateStart(DateUtil.addYear(new Date(),-20)); |
| 3514 | 3590 | checkModelQuery1.setCheckDateEnd(endDate); |
| 3591 | + System.out.println("===14"+checkModelQuery1.convertToQuery().convertToMongoQuery().toString()); | |
| 3515 | 3592 | int data23 =babyCheckService.queryBabyCheckCount(checkModelQuery1); |
| 3516 | 3593 | int lastDate23= null==hospitalDate.get("data23")?0:Integer.parseInt(hospitalDate.get("data23").toString()); |
| 3517 | 3594 | hospitalDate.put("data23",data23+lastDate23); |
| 3518 | 3595 | |
| ... | ... | @@ -3540,11 +3617,13 @@ |
| 3540 | 3617 | |
| 3541 | 3618 | checkModelQuery1.setCheckDateStart(startDate); |
| 3542 | 3619 | checkModelQuery1.setCheckDateEnd(endDate); |
| 3620 | + System.out.println("===15"+checkModelQuery1.convertToQuery().convertToMongoQuery().toString()); | |
| 3543 | 3621 | int data27 =babyCheckService.queryBabyCheckCount(checkModelQuery1); |
| 3544 | 3622 | int lastDate27= null==hospitalDate.get("data27")?0:Integer.parseInt(hospitalDate.get("data27").toString()); |
| 3545 | 3623 | hospitalDate.put("data27",data27+lastDate27); |
| 3546 | 3624 | |
| 3547 | 3625 | checkModelQuery1.setArticleTypes(null); |
| 3626 | + System.out.println("===16"+checkModelQuery1.convertToQuery().convertToMongoQuery().toString()); | |
| 3548 | 3627 | int data28 =babyCheckService.queryBabyCheckCount(checkModelQuery1); |
| 3549 | 3628 | int lastDate28= null==hospitalDate.get("data28")?0:Integer.parseInt(hospitalDate.get("data28").toString()); |
| 3550 | 3629 | hospitalDate.put("data28",data28+lastDate28); |
| ... | ... | @@ -3856,8 +3935,8 @@ |
| 3856 | 3935 | BabyModelQuery babyQuery = new BabyModelQuery(); |
| 3857 | 3936 | if (CollectionUtils.isNotEmpty(streetIds)) |
| 3858 | 3937 | { |
| 3859 | - | |
| 3860 | - babyQuery.setDataStatus(true);//排除自动建档数据 | |
| 3938 | + babyQuery.setExistSource(false); | |
| 3939 | + //babyQuery.setDataStatus(true);//排除自动建档数据 | |
| 3861 | 3940 | babyQuery.setYn(YnEnums.YES.getId()); |
| 3862 | 3941 | babyQuery.setStreetIds(streetIds); |
| 3863 | 3942 | Date currentDate1 = DateUtil.formatDate(new Date()); |
| ... | ... | @@ -3962,6 +4041,7 @@ |
| 3962 | 4041 | patientsQuery.setPage(page); |
| 3963 | 4042 | patientsQuery.setLimit(limit); |
| 3964 | 4043 | patientsQuery.setNeed("Need"); |
| 4044 | + System.out.println("孕13周之前建册的人数"+patientsQuery.convertToQuery().convertToMongoQuery().toString()); | |
| 3965 | 4045 | List<Patients> datas = patientsService.queryPatient(patientsQuery); |
| 3966 | 4046 | if (CollectionUtils.isNotEmpty(datas)) |
| 3967 | 4047 | { |
| ... | ... | @@ -4167,7 +4247,8 @@ |
| 4167 | 4247 | BabyModelQuery babyQuery = new BabyModelQuery(); |
| 4168 | 4248 | if (CollectionUtils.isNotEmpty(streetIds)) |
| 4169 | 4249 | { |
| 4170 | - babyQuery.setDataStatus(true);//排除自动建档数据 | |
| 4250 | +// babyQuery.setDataStatus(true);//排除自动建档数据 | |
| 4251 | + babyQuery.setExistSource(false); | |
| 4171 | 4252 | babyQuery.setYn(YnEnums.YES.getId()); |
| 4172 | 4253 | babyQuery.setStreetIds(streetIds); |
| 4173 | 4254 | Date currentDate1 = DateUtil.formatDate(new Date()); |