Commit 892d64bd996ec56d5967d676febd9a47b0eca597

Authored by litao@lymsh.com
1 parent 94e60a16c1

改字段

Showing 4 changed files with 22 additions and 14 deletions

platform-common/src/main/java/com/lyms/platform/common/utils/DateUtil.java View file @ 892d64b
... ... @@ -1076,5 +1076,13 @@
1076 1076 return calendar.get(Calendar.YEAR);
1077 1077 }
1078 1078  
  1079 + /**
  1080 + * 获取从现在到xx月之后的时间
  1081 + * @param currentMonthStart
  1082 + * @return
  1083 + */
  1084 + public static Date getMonthDate(Integer currentMonthStart) {
  1085 + return null;
  1086 + }
1079 1087 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyEyeCheckController.java View file @ 892d64b
... ... @@ -75,7 +75,7 @@
75 75 * @param endDate
76 76 * @param doctor
77 77 * @param key 姓名/联系方式/就诊卡
78   - * @param currentMonth 当前月龄
  78 + * @param currentMonthStart/currentMonthEnd 当前月龄范围
79 79 * @param chechMonth 检查月龄
80 80 * @param positive 是否是阳性
81 81 * @param page
... ... @@ -86,8 +86,8 @@
86 86 @ResponseBody
87 87 @TokenRequired
88 88 @RequestMapping(method = RequestMethod.GET)
89   - public BaseResponse list(Date startDate, Date endDate, String doctor, String key, String currentMonth, String chechMonth, boolean positive, String positiveIds, Integer page, Integer limit, HttpServletRequest request) {
90   - return babyEyeCheckService.list(getUserId(request), startDate, endDate, doctor, key, currentMonth, chechMonth, positive, positiveIds, page, limit);
  89 + public BaseResponse list(Date startDate, Date endDate, String doctor, String key, Integer currentMonthStart, Integer currentMonthEnd, String chechMonth, boolean positive, String positiveIds, Integer page, Integer limit, HttpServletRequest request) {
  90 + return babyEyeCheckService.list(getUserId(request), startDate, endDate, doctor, key, currentMonthStart, currentMonthEnd, chechMonth, positive, positiveIds, page, limit);
91 91 }
92 92  
93 93 @ResponseBody
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/BabyEyeCheckService.java View file @ 892d64b
... ... @@ -21,7 +21,7 @@
21 21  
22 22 BaseResponse delete(String id);
23 23  
24   - BaseResponse list(Integer userId, Date startDate, Date endDate, String doctor, String key, String currentMonth, String chechMonth, boolean positive, String positiveIds, Integer page, Integer limit);
  24 + BaseResponse list(Integer userId, Date startDate, Date endDate, String doctor, String key, Integer currentMonthStart, Integer currentMonthEnd, String chechMonth, boolean positive, String positiveIds, Integer page, Integer limit);
25 25  
26 26 BaseResponse query(Integer userId, String babyId);
27 27  
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BabyEyeCheckServiceImpl.java View file @ 892d64b
... ... @@ -135,7 +135,7 @@
135 135 if(refractometer.length() != 0) {
136 136 refractometer.append(" ");
137 137 }
138   - refractometer.append("R:DC( ").append(babyEyeCheck.getR2()).append( " )");
  138 + refractometer.append("R:DC( ").append(babyEyeCheck.getR2()).append( " ) D");
139 139 }
140 140 boolean flag = false;
141 141 if(StringUtils.isNotEmpty(babyEyeCheck.getL1())) {
... ... @@ -151,7 +151,7 @@
151 151 refractometer.append(", ");
152 152 }
153 153 }
154   - refractometer.append("L:DC( ").append(babyEyeCheck.getL2()).append( " )");
  154 + refractometer.append("L:DC( ").append(babyEyeCheck.getL2()).append( " ) D");
155 155 }
156 156 map.put("refractometer", refractometer.toString());
157 157  
... ... @@ -163,7 +163,7 @@
163 163 if(refraction.length() != 0) {
164 164 refraction.append(" ");
165 165 }
166   - refraction.append("R:DC( ").append(babyEyeCheck.getRefractionR2()).append( " )");
  166 + refraction.append("R:DC( ").append(babyEyeCheck.getRefractionR2()).append( " ) D");
167 167 }
168 168 boolean flag2 = false;
169 169 if(StringUtils.isNotEmpty(babyEyeCheck.getRefractionL1())) {
... ... @@ -179,7 +179,7 @@
179 179 refraction.append(", ");
180 180 }
181 181 }
182   - refraction.append("L:DC( ").append(babyEyeCheck.getRefractionL2()).append( " )");
  182 + refraction.append("L:DC( ").append(babyEyeCheck.getRefractionL2()).append( " ) D");
183 183 }
184 184 map.put("refraction", refraction.toString());
185 185  
... ... @@ -195,7 +195,7 @@
195 195 map.put("pupillaryRightReflex", parseYinYang(babyEyeCheck.getPupillaryRightReflex()));
196 196 map.put("pupillaryLeftReflex", parseYinYang(babyEyeCheck.getPupillaryLeftReflex()));
197 197 map.put("redRightReflex", parseYinYang(babyEyeCheck.getRedRightReflex()));
198   - map.put("eyePositionId", EyePositionEnums.getName(babyEyeCheck.getEyePositionId()) + (StringUtils.isNotEmpty(babyEyeCheck.getEyePositionOther()) ? ":" + babyEyeCheck.getEyePositionOther() : ""));
  198 + map.put("eyePositionId", StringUtils.isNotEmpty(EyePositionEnums.getName(babyEyeCheck.getEyePositionId())) ? EyePositionEnums.getName(babyEyeCheck.getEyePositionId()) : "" + (StringUtils.isNotEmpty(babyEyeCheck.getEyePositionOther()) ? ":" + babyEyeCheck.getEyePositionOther() : ""));
199 199 map.put("redLeftReflex", parseYinYang(babyEyeCheck.getRedLeftReflex()));
200 200 map.put("redReflex", parseYinYang(babyEyeCheck.getRedReflex(), babyEyeCheck.getRedReflexOther()));
201 201 map.put("conjunctiva", parseYinYang(babyEyeCheck.getConjunctiva(), babyEyeCheck.getConjunctivaOther()));
... ... @@ -261,7 +261,7 @@
261 261 }
262 262  
263 263 @Override
264   - public BaseResponse list(Integer userId, Date startDate, Date endDate, String doctor, String key, String currentMonth, String chechMonth, boolean positive, String positiveIds, Integer page, Integer limit) {
  264 + public BaseResponse list(Integer userId, Date startDate, Date endDate, String doctor, String key, Integer currentMonthStart, Integer currentMonthEnd, String chechMonth, boolean positive, String positiveIds, Integer page, Integer limit) {
265 265 String hospitalId = autoMatchFacade.getHospitalId(userId);
266 266 Criteria criteria = Criteria.where("yn").ne("0").and("hospitalId").is(hospitalId);
267 267 if(startDate != null && endDate != null) {
... ... @@ -273,10 +273,10 @@
273 273 if(StringUtils.isNotEmpty(chechMonth)) {
274 274 criteria.and("checkMonthId").is(chechMonth);
275 275 }
276   - if(StringUtils.isNotEmpty(currentMonth)) {
277   -// Date start = DateUtil.getBeforMonth()
278   -
279   -// criteria.and("checkTime").gte(startDate).lt(DateUtil.addDay(endDate, 1));
  276 + if(currentMonthStart != null && currentMonthEnd != null) {
  277 + Date start = DateUtil.getMonthDate(currentMonthStart);
  278 + Date end = DateUtil.getMonthDate(currentMonthEnd);
  279 + criteria.and("birth").gte(start).lt(DateUtil.addDay(end, 1));
280 280 }
281 281  
282 282 if(org.apache.commons.lang.StringUtils.isNotBlank(key)) {