Commit 57c1b237c6c37c176a8820295e8c302ef84326b7
1 parent
685018bbcc
Exists in
master
and in
6 other branches
逗号改括号
Showing 3 changed files with 24 additions and 15 deletions
platform-common/src/main/java/com/lyms/platform/common/utils/DateUtil.java
View file @
57c1b23
... | ... | @@ -1330,20 +1330,28 @@ |
1330 | 1330 | List<Map<String, Date>> restList = new ArrayList<>(); |
1331 | 1331 | if(start != null && end != null) { |
1332 | 1332 | List<Date> dates = getMonthBetween(start, end); |
1333 | - for (int i = 0; i < dates.size(); i++) { | |
1333 | + if(dates.size() == 1) { | |
1334 | 1334 | Map<String, Date> temp = new HashMap<>(); |
1335 | - temp.put("cname", dates.get(i)); | |
1336 | - if(i == 0) { | |
1337 | - temp.put("start", start); | |
1338 | - temp.put("end", dates.size() > 1 ? dates.get(i + 1) : dates.get(i + 0)); | |
1339 | - } else if(i == dates.size() - 1) { | |
1340 | - temp.put("start", dates.get(dates.size() - 1)); | |
1341 | - temp.put("end", end); | |
1342 | - } else { | |
1343 | - temp.put("start", dates.get(i)); | |
1344 | - temp.put("end", dates.get(i + 1)); | |
1345 | - } | |
1335 | + temp.put("cname", dates.get(0)); | |
1336 | + temp.put("start", start); | |
1337 | + temp.put("end", end); | |
1346 | 1338 | restList.add(temp); |
1339 | + } else { | |
1340 | + for (int i = 0; i < dates.size(); i++) { | |
1341 | + Map<String, Date> temp = new HashMap<>(); | |
1342 | + temp.put("cname", dates.get(i)); | |
1343 | + if(i == 0) { | |
1344 | + temp.put("start", start); | |
1345 | + temp.put("end", dates.get(i + 1)); | |
1346 | + } else if(i == dates.size() - 1) { | |
1347 | + temp.put("start", dates.get(dates.size() - 1)); | |
1348 | + temp.put("end", end); | |
1349 | + } else { | |
1350 | + temp.put("start", dates.get(i)); | |
1351 | + temp.put("end", dates.get(i + 1)); | |
1352 | + } | |
1353 | + restList.add(temp); | |
1354 | + } | |
1347 | 1355 | } |
1348 | 1356 | } |
1349 | 1357 | return restList; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/ReportController.java
View file @
57c1b23
... | ... | @@ -59,7 +59,7 @@ |
59 | 59 | @RequestMapping(value = "/patients/export", method = RequestMethod.GET) |
60 | 60 | public void patientsExport(String provinceId, String cityId, String areaId, String streetId, Integer statistType, |
61 | 61 | Integer ageType, Integer patientType, Date startDate, Date endDate, HttpServletRequest request, HttpServletResponse response) { |
62 | - reportService.patientsExport(provinceId, cityId, areaId, streetId, statistType, ageType, patientType, startDate, endDate, getUserId(request), response); | |
62 | + reportService.patientsExport(provinceId, cityId, areaId, streetId, statistType, ageType == null ? ageType : ageType + 1, patientType, startDate, endDate, getUserId(request), response); | |
63 | 63 | // reportService.patientsExport(provinceId, cityId, aredId, streetId, statistType, ageType, patientType, startDate, endDate, 1000000185, response); |
64 | 64 | } |
65 | 65 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BloodPressureServiceImpl.java
View file @
57c1b23
... | ... | @@ -53,7 +53,8 @@ |
53 | 53 | temp.put("ssy", bloodPressure.getSsy()); |
54 | 54 | temp.put("pulse", bloodPressure.getPulse()); |
55 | 55 | temp.put("hospitalId", hospitalId); |
56 | - if(StringUtils.isEmpty(bloodPressure.getId())) { | |
56 | + BloodPressure bp = mongoTemplate.findOne(Query.query(Criteria.where("parentId").is(bloodPressure.getParentId()).and("yn").ne(0)), BloodPressure.class); | |
57 | + if(bp == null) { | |
57 | 58 | String parentId = mongoUtil.doHidePatient(bloodPressure.getParentId(), hospitalId); |
58 | 59 | bloodPressure.setParentId(parentId); |
59 | 60 | bloodPressure.setYn(YnEnums.YES.getId()); |
... | ... | @@ -65,7 +66,7 @@ |
65 | 66 | bloodPressure.setInfos(infos); |
66 | 67 | bloodPressureService.add(bloodPressure); |
67 | 68 | } else { |
68 | - Map<String, Map<String, Object>> infos = mongoTemplate.findById(bloodPressure.getId(), BloodPressure.class).getInfos(); | |
69 | + Map<String, Map<String, Object>> infos = bp.getInfos(); | |
69 | 70 | infos.put(DateUtil.getyyyy_MM_dd(new Date()), temp); |
70 | 71 | bloodPressureService.update(bloodPressure); |
71 | 72 | } |