Commit 95b61a4042831b68620ba13ffcd926cdfc228c1a

Authored by wtt
1 parent ce33dd70da

update

Showing 5 changed files with 189 additions and 95 deletions

platform-dal/src/main/java/com/lyms/platform/pojo/BabyEyeCheck.java View file @ 95b61a4
... ... @@ -39,27 +39,34 @@
39 39 // 眼外观 1通过 2不通过
40 40 private String eyeAppearance;
41 41 private String eyeAppearanceOther;
  42 + private String eyeAppearanceCoo;//合作状态: 1 欠合作、2 不合作、3 其他
42 43 //红光反射,以前数据有相同的
43 44 private String redReflexQhd;
44 45 private String redReflexQhdOther;
  46 + private String redReflexQhdCoo; //合作状态: 1 稍不对称、2 稍减弱、3 减弱、4 欠合作、5 不合作、6其他
45 47 //瞬目反射
46 48 private String blinkReflex;
47 49 private String blinkReflexOther;
  50 + private String blinkReflexCoo; //合作状态: 1 欠合作、2 不合作、3 其他
48 51 //红球试验
49 52 private String redBallTest;
50 53 private String redBallTestOther;
  54 + private String redBallTestCoo; //合作状态: 1 欠合作、2 不合作、3 其他
51 55 //视物行为观察
52 56 private String behaviorObservation;
53 57 private String behaviorObservationOther;
  58 + private String behaviorObservationCoo; //合作状态: 1 欠合作、2 不合作、3 其他
54 59 //屈光筛查
55 60 private String refractiveScreening;
56 61 private String refractiveScreeningOther;
57 62 //眼位检查
58 63 private String eyePositionExamination;
59 64 private String eyePositionExaminationOther;
  65 + private String eyePositionExaminationCoo; //合作状态: 1 欠合作、2 不合作、3 其他
60 66 //眼球运动
61 67 private String eyeMovement;
62 68 private String eyeMovementOther;
  69 + private String eyeMovementCoo; //合作状态: 1 欠合作、2 不合作、3 其他
63 70 //戴镜类型 1框架眼镜 2隐形眼镜 3角膜塑形镜 4不戴镜
64 71 private String typeOfWearingGlasses;
65 72 /*远视力检查结果*/
... ... @@ -1264,6 +1271,62 @@
1264 1271  
1265 1272 public void setEyePositionExaminationOther(String eyePositionExaminationOther) {
1266 1273 this.eyePositionExaminationOther = eyePositionExaminationOther;
  1274 + }
  1275 +
  1276 + public String getEyeAppearanceCoo() {
  1277 + return eyeAppearanceCoo;
  1278 + }
  1279 +
  1280 + public void setEyeAppearanceCoo(String eyeAppearanceCoo) {
  1281 + this.eyeAppearanceCoo = eyeAppearanceCoo;
  1282 + }
  1283 +
  1284 + public String getRedReflexQhdCoo() {
  1285 + return redReflexQhdCoo;
  1286 + }
  1287 +
  1288 + public void setRedReflexQhdCoo(String redReflexQhdCoo) {
  1289 + this.redReflexQhdCoo = redReflexQhdCoo;
  1290 + }
  1291 +
  1292 + public String getBlinkReflexCoo() {
  1293 + return blinkReflexCoo;
  1294 + }
  1295 +
  1296 + public void setBlinkReflexCoo(String blinkReflexCoo) {
  1297 + this.blinkReflexCoo = blinkReflexCoo;
  1298 + }
  1299 +
  1300 + public String getRedBallTestCoo() {
  1301 + return redBallTestCoo;
  1302 + }
  1303 +
  1304 + public void setRedBallTestCoo(String redBallTestCoo) {
  1305 + this.redBallTestCoo = redBallTestCoo;
  1306 + }
  1307 +
  1308 + public String getBehaviorObservationCoo() {
  1309 + return behaviorObservationCoo;
  1310 + }
  1311 +
  1312 + public void setBehaviorObservationCoo(String behaviorObservationCoo) {
  1313 + this.behaviorObservationCoo = behaviorObservationCoo;
  1314 + }
  1315 +
  1316 + public String getEyePositionExaminationCoo() {
  1317 + return eyePositionExaminationCoo;
  1318 + }
  1319 +
  1320 + public void setEyePositionExaminationCoo(String eyePositionExaminationCoo) {
  1321 + this.eyePositionExaminationCoo = eyePositionExaminationCoo;
  1322 + }
  1323 +
  1324 + public String getEyeMovementCoo() {
  1325 + return eyeMovementCoo;
  1326 + }
  1327 +
  1328 + public void setEyeMovementCoo(String eyeMovementCoo) {
  1329 + this.eyeMovementCoo = eyeMovementCoo;
1267 1330 }
1268 1331  
1269 1332 public String getDoctorSign() {
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyEyeCheckController.java View file @ 95b61a4
... ... @@ -165,6 +165,7 @@
165 165 * @param endDate
166 166 * @param doctor
167 167 * @param key 姓名/联系方式/就诊卡
  168 + * @param yeymcId 幼儿园
168 169 * @param currentMonthStart/currentMonthEnd 当前月龄范围
169 170 * @param chechMonth 检查月龄
170 171 * @param positive 是否是阳性
171 172  
... ... @@ -179,9 +180,9 @@
179 180 @ResponseBody
180 181 @TokenRequired
181 182 @RequestMapping(method = RequestMethod.GET)
182   - 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,
  183 + public BaseResponse list(Date startDate, Date endDate, String doctor, String key, String yeymcId,Integer currentMonthStart, Integer currentMonthEnd, String chechMonth, boolean positive, String positiveIds, Integer page, Integer limit, HttpServletRequest request,
183 184 Date bookStartDate, Date bookEndDate, String apparatusPositive, String doctorPositive, String yin,String noPassIds) {
184   - return babyEyeCheckService.list(getUserId(request), startDate, endDate, doctor, key,
  185 + return babyEyeCheckService.list(getUserId(request), startDate, endDate, doctor, key,yeymcId,
185 186 currentMonthStart, currentMonthEnd, chechMonth, positive, positiveIds, page, limit,
186 187 bookStartDate, bookEndDate, apparatusPositive, doctorPositive, yin, noPassIds);
187 188 }
... ... @@ -204,8 +205,8 @@
204 205 @ResponseBody
205 206 @TokenRequired
206 207 @RequestMapping(value = "/export", method = RequestMethod.GET)
207   - public void export(Date startDate, Date endDate, String doctor, String key, Integer currentMonthStart, Integer currentMonthEnd, String chechMonth, boolean positive, String positiveIds, HttpServletRequest request, HttpServletResponse response, Date bookStartDate, Date bookEndDate, String apparatusPositive, String doctorPositive, String yin) {
208   - babyEyeCheckService.export(getUserId(request), startDate, endDate, doctor, key, currentMonthStart, currentMonthEnd, chechMonth, positive, positiveIds, response, bookStartDate, bookEndDate, apparatusPositive, doctorPositive, yin);
  208 + public void export(Date startDate, Date endDate, String doctor, String key, String yeymcId,Integer currentMonthStart, Integer currentMonthEnd, String chechMonth, boolean positive, String positiveIds, HttpServletRequest request, HttpServletResponse response, Date bookStartDate, Date bookEndDate, String apparatusPositive, String doctorPositive, String yin) {
  209 + babyEyeCheckService.export(getUserId(request), startDate, endDate, doctor, key, yeymcId,currentMonthStart, currentMonthEnd, chechMonth, positive, positiveIds, response, bookStartDate, bookEndDate, apparatusPositive, doctorPositive, yin);
209 210 }
210 211  
211 212 @ResponseBody
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/LisFacade.java View file @ 95b61a4
... ... @@ -437,6 +437,9 @@
437 437 //昌黎二院lis数据的就诊卡号字段保存的病人的身份证号
438 438 else if("1000000016".equals(model.getHospitalId())){
439 439 model.setVcCardNo(cardNo);
  440 + }//衡水冀州六院
  441 + else if("2100002324".equals(model.getHospitalId())){
  442 + model.setVcCardNo(cardNo);
440 443 }
441 444 // //昌邑市妇幼保健院 lis检查表中存的是病历号 需要用身份证号码转换成病历好查询
442 445 // else if("2100001605".equals(model.getHospitalId())){
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/BabyEyeCheckService.java View file @ 95b61a4
... ... @@ -26,7 +26,7 @@
26 26  
27 27 BaseResponse delete(String id, Integer userId);
28 28  
29   - BaseResponse list(Integer userId, Date startDate, Date endDate, String doctor, String key,
  29 + BaseResponse list(Integer userId, Date startDate, Date endDate, String doctor, String key, String yeymcId,
30 30 Integer currentMonthStart, Integer currentMonthEnd, String chechMonth, boolean positive,
31 31 String positiveIds, Integer page, Integer limit, Date bookStartDate, Date bookEndDate, String apparatusPositive,
32 32 String doctorPositive, String yin,String noPassIds);
... ... @@ -44,7 +44,7 @@
44 44  
45 45 BaseResponse listInit(Integer userId);
46 46  
47   - void export(Integer userId, Date startDate, Date endDate, String doctor, String key, Integer currentMonthStart, Integer currentMonthEnd, String chechMonth, boolean positive, String positiveIds, HttpServletResponse response, Date bookStartDate, Date bookEndDate, String apparatusPositive, String doctorPositive, String yin);
  47 + void export(Integer userId, Date startDate, Date endDate, String doctor, String key, String yeymcId,Integer currentMonthStart, Integer currentMonthEnd, String chechMonth, boolean positive, String positiveIds, HttpServletResponse response, Date bookStartDate, Date bookEndDate, String apparatusPositive, String doctorPositive, String yin);
48 48  
49 49 BaseResponse getBabyEyeCheckInfo(String hospitalId, String babyId);
50 50 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BabyEyeCheckServiceImpl.java View file @ 95b61a4
... ... @@ -97,6 +97,7 @@
97 97  
98 98 /**
99 99 * 处理历史眼保健数据,冗余到儿童档案
  100 + *
100 101 * @Author: 武涛涛
101 102 * @Date: 2020/8/7 15:29
102 103 */
103 104  
104 105  
... ... @@ -108,19 +109,19 @@
108 109 List<String> babyIds = new ArrayList<>();
109 110 Criteria criteria = Criteria.where("yn").ne("0");
110 111 if (startDate != null && endDate != null) {
111   - criteria.and("checkTime").gte( DateUtil.parseYMD(startDate)).lt(DateUtil.addDay(DateUtil.parseYMD(endDate), 1));
  112 + criteria.and("checkTime").gte(DateUtil.parseYMD(startDate)).lt(DateUtil.addDay(DateUtil.parseYMD(endDate), 1));
112 113 }
113 114 List<BabyEyeCheck> babyEyeChecks = mongoUtil.findField(BabyEyeCheck.class, criteria, "babyId");
114 115 babyIds = CollectionUtils.getId(babyEyeChecks, "babyId", String.class);
115 116 if (CollectionUtils.isNotEmpty(babyIds)) {
116 117 babyIds = new ArrayList<String>(new LinkedHashSet<String>(babyIds));
117 118 }
118   - for (int i = 0; i <babyIds.size() ; i++) {
  119 + for (int i = 0; i < babyIds.size(); i++) {
119 120  
120 121 //2 根据儿童档案id,单个查询获取到最后一个眼保健检查。
121 122 List<BabyEyeCheck> checkModels = mongoTemplate.find(Query.query(Criteria.where("babyId").is(babyIds.get(i)).and("yn").is("1"))
122 123 .with(new Sort(Sort.Direction.DESC, "created")), BabyEyeCheck.class);
123   - if(CollectionUtils.isNotEmpty(checkModels)){
  124 + if (CollectionUtils.isNotEmpty(checkModels)) {
124 125 BabyEyeCheck babyEyeCheck = checkModels.get(0);
125 126  
126 127 //3 使用最后检查,更新到儿童档案中。
... ... @@ -132,7 +133,7 @@
132 133 }
133 134 }
134 135 }
135   - return RespBuilder.buildSuccess("redundancyBabyCheck",redundancyBabyCheck,"redundancyBabyCheck.seiz",redundancyBabyCheck.size());
  136 + return RespBuilder.buildSuccess("redundancyBabyCheck", redundancyBabyCheck, "redundancyBabyCheck.seiz", redundancyBabyCheck.size());
136 137 }
137 138  
138 139 @Override
139 140  
140 141  
141 142  
142 143  
... ... @@ -346,22 +347,25 @@
346 347  
347 348 return RespBuilder.buildSuccess(babyEyeCheck.getId());
348 349 }
  350 +
349 351 /**
350   - 眼保健检查 上传 患者签名
  352 + * 眼保健检查 上传 患者签名
  353 + *
351 354 * @Author: 武涛涛
352 355 * @Date: 2020/12/16 11:09
353 356 */
354 357 public BaseResponse babyEyeCheckSign(String patientSign, String id) {
355 358 if (StringUtils.isNotEmpty(id)) {
356   - BabyEyeCheck babyEyeCheck = new BabyEyeCheck();
  359 + BabyEyeCheck babyEyeCheck = new BabyEyeCheck();
357 360 babyEyeCheck.setPatientSign(patientSign);
358 361 Update update = MongoConvertHelper.convertToNativeUpdate(ReflectionUtils.getUpdateField(babyEyeCheck));
359 362 mongoTemplate.updateFirst(Query.query(Criteria.where("id").is(id)), update, BabyEyeCheck.class);
360   - }else {
361   - return new BaseResponse().setErrormsg("没有id").setErrorcode(ErrorCodeConstants.BUSINESS_ERROR);
  363 + } else {
  364 + return new BaseResponse().setErrormsg("没有id").setErrorcode(ErrorCodeConstants.BUSINESS_ERROR);
362 365 }
363 366 return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功");
364 367 }
  368 +
365 369 /**
366 370 * 检查冗余最后一次检查结果到儿童档案表中
367 371 *
... ... @@ -370,7 +374,7 @@
370 374 * @Author: 武涛涛
371 375 * @Date: 2020/8/7 9:55
372 376 */
373   - private void redundancyBabyCheck(BabyEyeCheck babyEyeCheck, BabyModel babyModel,String type) {
  377 + private void redundancyBabyCheck(BabyEyeCheck babyEyeCheck, BabyModel babyModel, String type) {
374 378  
375 379 /*
376 380 * 眼保健模块下建档 displayState=1 , 非眼保健模块下建档 displayState=2 ,null不处理历史数据
... ... @@ -385,36 +389,36 @@
385 389 babyModel.setCheckId(babyEyeCheck.getId());
386 390 babyModel.setCheckTime(babyEyeCheck.getCheckTime() == null ? new Date() : babyEyeCheck.getCheckTime());
387 391 babyModel.setNextCheckTime(babyEyeCheck.getNextCheckTime());
388   - babyModel.setDoctor(StringUtils.isEmpty(babyEyeCheck.getDoctor())?"":babyEyeCheck.getDoctor());
389   - babyModel.setCheckMonthId(StringUtils.isEmpty(babyEyeCheck.getCheckMonthId())?"":babyEyeCheck.getCheckMonthId());
390   - babyModel.setApparatus(StringUtils.isEmpty(babyEyeCheck.getApparatus())?"":babyEyeCheck.getApparatus());
391   - babyModel.setDoctorJudgement(StringUtils.isEmpty(babyEyeCheck.getDoctorJudgement())?"":babyEyeCheck.getDoctorJudgement());
392   - babyModel.setEyeAppearance(StringUtils.isEmpty(babyEyeCheck.getEyeAppearance())?"":babyEyeCheck.getEyeAppearance());
393   - babyModel.setRedReflexQhd(StringUtils.isEmpty(babyEyeCheck.getRedReflexQhd())?"":babyEyeCheck.getRedReflexQhd());
394   - babyModel.setRedBallTest(StringUtils.isEmpty(babyEyeCheck.getRedBallTest())?"":babyEyeCheck.getRedBallTest());
395   - babyModel.setBehaviorObservation(StringUtils.isEmpty(babyEyeCheck.getBehaviorObservation())?"":babyEyeCheck.getBehaviorObservation());
396   - babyModel.setRefractiveScreening(StringUtils.isEmpty(babyEyeCheck.getRefractiveScreening())?"":babyEyeCheck.getRefractiveScreening());
397   - babyModel.setEyePositionExamination(StringUtils.isEmpty(babyEyeCheck.getEyePositionExamination())?"":babyEyeCheck.getEyePositionExamination());
398   - babyModel.setEyeMovement(StringUtils.isEmpty(babyEyeCheck.getEyeMovement())?"":babyEyeCheck.getEyeMovement());
399   - babyModel.setExtEyelook(StringUtils.isEmpty(babyEyeCheck.getExtEyelook())?"":babyEyeCheck.getExtEyelook());
400   - babyModel.setNystagmus(StringUtils.isEmpty(babyEyeCheck.getNystagmus())?"":babyEyeCheck.getNystagmus());
401   - babyModel.setExtRightEyelook(StringUtils.isEmpty(babyEyeCheck.getExtRightEyelook())?"":babyEyeCheck.getExtRightEyelook());
402   - babyModel.setExtLeftEyelook(StringUtils.isEmpty(babyEyeCheck.getExtLeftEyelook())?"":babyEyeCheck.getExtLeftEyelook());
403   - babyModel.setBlinkRightReflex(StringUtils.isEmpty(babyEyeCheck.getBlinkRightReflex())?"":babyEyeCheck.getBlinkRightReflex());
404   - babyModel.setBlinkLefttReflex(StringUtils.isEmpty(babyEyeCheck.getBlinkLefttReflex())?"":babyEyeCheck.getBlinkLefttReflex());
405   - babyModel.setPupillaryRightReflex(StringUtils.isEmpty(babyEyeCheck.getPupillaryRightReflex())?"":babyEyeCheck.getPupillaryRightReflex());
406   - babyModel.setPupillaryLeftReflex(StringUtils.isEmpty(babyEyeCheck.getPupillaryLeftReflex())?"":babyEyeCheck.getPupillaryLeftReflex());
407   - babyModel.setRedRightReflex(StringUtils.isEmpty(babyEyeCheck.getRedRightReflex())?"":babyEyeCheck.getRedRightReflex());
408   - babyModel.setRedLeftReflex(StringUtils.isEmpty(babyEyeCheck.getRedLeftReflex())?"":babyEyeCheck.getRedLeftReflex());
409   - babyModel.setRedReflex(StringUtils.isEmpty(babyEyeCheck.getRedReflex())?"":babyEyeCheck.getRedReflex());
410   - babyModel.setConjunctiva(StringUtils.isEmpty(babyEyeCheck.getConjunctiva())?"":babyEyeCheck.getConjunctiva());
411   - babyModel.setCorneal(StringUtils.isEmpty(babyEyeCheck.getCorneal())?"":babyEyeCheck.getCorneal());
412   - babyModel.setLacrimalApparatus(StringUtils.isEmpty(babyEyeCheck.getLacrimalApparatus())?"":babyEyeCheck.getLacrimalApparatus());
413   - babyModel.setEyePositionId2(StringUtils.isEmpty(babyEyeCheck.getEyePositionId2())?"":babyEyeCheck.getEyePositionId2());
414   - babyModel.setRedLeft2(StringUtils.isEmpty(babyEyeCheck.getRedLeft2())?"":babyEyeCheck.getRedLeft2());
415   - babyModel.setVision2(StringUtils.isEmpty(babyEyeCheck.getVision2())?"":babyEyeCheck.getVision2());
416   - babyModel.setY2(StringUtils.isEmpty(babyEyeCheck.getY2())?"":babyEyeCheck.getY2());
417   - babyModel.setRefraction2(StringUtils.isEmpty(babyEyeCheck.getRefraction2())?"":babyEyeCheck.getRefraction2());
  392 + babyModel.setDoctor(StringUtils.isEmpty(babyEyeCheck.getDoctor()) ? "" : babyEyeCheck.getDoctor());
  393 + babyModel.setCheckMonthId(StringUtils.isEmpty(babyEyeCheck.getCheckMonthId()) ? "" : babyEyeCheck.getCheckMonthId());
  394 + babyModel.setApparatus(StringUtils.isEmpty(babyEyeCheck.getApparatus()) ? "" : babyEyeCheck.getApparatus());
  395 + babyModel.setDoctorJudgement(StringUtils.isEmpty(babyEyeCheck.getDoctorJudgement()) ? "" : babyEyeCheck.getDoctorJudgement());
  396 + babyModel.setEyeAppearance(StringUtils.isEmpty(babyEyeCheck.getEyeAppearance()) ? "" : babyEyeCheck.getEyeAppearance());
  397 + babyModel.setRedReflexQhd(StringUtils.isEmpty(babyEyeCheck.getRedReflexQhd()) ? "" : babyEyeCheck.getRedReflexQhd());
  398 + babyModel.setRedBallTest(StringUtils.isEmpty(babyEyeCheck.getRedBallTest()) ? "" : babyEyeCheck.getRedBallTest());
  399 + babyModel.setBehaviorObservation(StringUtils.isEmpty(babyEyeCheck.getBehaviorObservation()) ? "" : babyEyeCheck.getBehaviorObservation());
  400 + babyModel.setRefractiveScreening(StringUtils.isEmpty(babyEyeCheck.getRefractiveScreening()) ? "" : babyEyeCheck.getRefractiveScreening());
  401 + babyModel.setEyePositionExamination(StringUtils.isEmpty(babyEyeCheck.getEyePositionExamination()) ? "" : babyEyeCheck.getEyePositionExamination());
  402 + babyModel.setEyeMovement(StringUtils.isEmpty(babyEyeCheck.getEyeMovement()) ? "" : babyEyeCheck.getEyeMovement());
  403 + babyModel.setExtEyelook(StringUtils.isEmpty(babyEyeCheck.getExtEyelook()) ? "" : babyEyeCheck.getExtEyelook());
  404 + babyModel.setNystagmus(StringUtils.isEmpty(babyEyeCheck.getNystagmus()) ? "" : babyEyeCheck.getNystagmus());
  405 + babyModel.setExtRightEyelook(StringUtils.isEmpty(babyEyeCheck.getExtRightEyelook()) ? "" : babyEyeCheck.getExtRightEyelook());
  406 + babyModel.setExtLeftEyelook(StringUtils.isEmpty(babyEyeCheck.getExtLeftEyelook()) ? "" : babyEyeCheck.getExtLeftEyelook());
  407 + babyModel.setBlinkRightReflex(StringUtils.isEmpty(babyEyeCheck.getBlinkRightReflex()) ? "" : babyEyeCheck.getBlinkRightReflex());
  408 + babyModel.setBlinkLefttReflex(StringUtils.isEmpty(babyEyeCheck.getBlinkLefttReflex()) ? "" : babyEyeCheck.getBlinkLefttReflex());
  409 + babyModel.setPupillaryRightReflex(StringUtils.isEmpty(babyEyeCheck.getPupillaryRightReflex()) ? "" : babyEyeCheck.getPupillaryRightReflex());
  410 + babyModel.setPupillaryLeftReflex(StringUtils.isEmpty(babyEyeCheck.getPupillaryLeftReflex()) ? "" : babyEyeCheck.getPupillaryLeftReflex());
  411 + babyModel.setRedRightReflex(StringUtils.isEmpty(babyEyeCheck.getRedRightReflex()) ? "" : babyEyeCheck.getRedRightReflex());
  412 + babyModel.setRedLeftReflex(StringUtils.isEmpty(babyEyeCheck.getRedLeftReflex()) ? "" : babyEyeCheck.getRedLeftReflex());
  413 + babyModel.setRedReflex(StringUtils.isEmpty(babyEyeCheck.getRedReflex()) ? "" : babyEyeCheck.getRedReflex());
  414 + babyModel.setConjunctiva(StringUtils.isEmpty(babyEyeCheck.getConjunctiva()) ? "" : babyEyeCheck.getConjunctiva());
  415 + babyModel.setCorneal(StringUtils.isEmpty(babyEyeCheck.getCorneal()) ? "" : babyEyeCheck.getCorneal());
  416 + babyModel.setLacrimalApparatus(StringUtils.isEmpty(babyEyeCheck.getLacrimalApparatus()) ? "" : babyEyeCheck.getLacrimalApparatus());
  417 + babyModel.setEyePositionId2(StringUtils.isEmpty(babyEyeCheck.getEyePositionId2()) ? "" : babyEyeCheck.getEyePositionId2());
  418 + babyModel.setRedLeft2(StringUtils.isEmpty(babyEyeCheck.getRedLeft2()) ? "" : babyEyeCheck.getRedLeft2());
  419 + babyModel.setVision2(StringUtils.isEmpty(babyEyeCheck.getVision2()) ? "" : babyEyeCheck.getVision2());
  420 + babyModel.setY2(StringUtils.isEmpty(babyEyeCheck.getY2()) ? "" : babyEyeCheck.getY2());
  421 + babyModel.setRefraction2(StringUtils.isEmpty(babyEyeCheck.getRefraction2()) ? "" : babyEyeCheck.getRefraction2());
418 422  
419 423 Update update = MongoConvertHelper.convertToNativeUpdate(ReflectionUtils.getUpdateField(babyModel));
420 424 mongoTemplate.updateFirst(Query.query(Criteria.where("id").is(babyModel.getId())), update, BabyModel.class);
421 425  
... ... @@ -441,13 +445,12 @@
441 445  
442 446 @Override
443 447 public BaseResponse info(String id) {
444   - Map<String, Object> map= getEyeCheckView(id);
  448 + Map<String, Object> map = getEyeCheckView(id);
445 449 return RespBuilder.buildSuccess(map);
446 450 }
447 451  
448 452  
449   - private Map<String, Object> getEyeCheckView(String id)
450   - {
  453 + private Map<String, Object> getEyeCheckView(String id) {
451 454 BabyEyeCheck babyEyeCheck = mongoTemplate.findById(id, BabyEyeCheck.class);
452 455  
453 456 Map<String, Object> map = ReflectionUtils.beanToMap(babyEyeCheck);
454 457  
... ... @@ -473,12 +476,9 @@
473 476 if (StringUtils.isNotEmpty(babyEyeCheck.getR1())) {
474 477  
475 478 //抚宁县妇幼
476   - if ("197".equals(babyEyeCheck.getHospitalId()))
477   - {
  479 + if ("197".equals(babyEyeCheck.getHospitalId())) {
478 480 refractometer.append("R( ").append(babyEyeCheck.getR1()).append(" )");
479   - }
480   - else
481   - {
  481 + } else {
482 482 refractometer.append("R:S( ").append(babyEyeCheck.getR1()).append(" )");
483 483 }
484 484  
485 485  
... ... @@ -495,12 +495,9 @@
495 495 refractometer.append(", ");
496 496 flag = true;
497 497 } //抚宁县妇幼
498   - if ("197".equals(babyEyeCheck.getHospitalId()))
499   - {
  498 + if ("197".equals(babyEyeCheck.getHospitalId())) {
500 499 refractometer.append("L( ").append(babyEyeCheck.getL1()).append(" ) ");
501   - }
502   - else
503   - {
  500 + } else {
504 501 refractometer.append("L:S( ").append(babyEyeCheck.getL1()).append(" ) ");
505 502 }
506 503  
507 504  
... ... @@ -517,12 +514,9 @@
517 514  
518 515 StringBuilder refraction = new StringBuilder();
519 516 if (StringUtils.isNotEmpty(babyEyeCheck.getRefractionR1())) {
520   - if ("197".equals(babyEyeCheck.getHospitalId()))
521   - {
  517 + if ("197".equals(babyEyeCheck.getHospitalId())) {
522 518 refraction.append("R( ").append(babyEyeCheck.getRefractionR1()).append(" )");
523   - }
524   - else
525   - {
  519 + } else {
526 520 refraction.append("R:S( ").append(babyEyeCheck.getRefractionR1()).append(" )");
527 521 }
528 522  
529 523  
... ... @@ -539,12 +533,9 @@
539 533 refraction.append(", ");
540 534 flag2 = true;
541 535 }
542   - if ("197".equals(babyEyeCheck.getHospitalId()))
543   - {
  536 + if ("197".equals(babyEyeCheck.getHospitalId())) {
544 537 refraction.append("L( ").append(babyEyeCheck.getRefractionL1()).append(" ) ");
545   - }
546   - else
547   - {
  538 + } else {
548 539 refraction.append("L:S( ").append(babyEyeCheck.getRefractionL1()).append(" ) ");
549 540 }
550 541  
551 542  
552 543  
553 544  
... ... @@ -609,16 +600,43 @@
609 600 @Override
610 601 public BaseResponse infoQhd(String id) {
611 602  
612   - Map<String, Object> map = getBabyEyeCheckViewQhd(id);
  603 + Map<String, Object> map = getBabyEyeCheckViewQhd(id);
613 604 return RespBuilder.buildSuccess(map);
614 605 }
615 606  
  607 + public String getHz(String coo, String type) {
  608 + String s = "";
  609 + if ("1".equals(type)) {
  610 + if ("1".equals(coo)) {
  611 + s = "欠合作";
  612 + } else if ("2".equals(coo)) {
  613 + s = "不合作";
  614 + } else if ("3".equals(coo)) {
  615 + s = "其他";
  616 + }
  617 + } else if ("2".equals(type)) {
  618 + if ("1".equals(coo)) {
  619 + s = "稍不对称";
  620 + } else if ("2".equals(coo)) {
  621 + s = "稍减弱";
  622 + } else if ("3".equals(coo)) {
  623 + s = "减弱";
  624 + } else if ("4".equals(coo)) {
  625 + s = "欠合作";
  626 + } else if ("5".equals(coo)) {
  627 + s = "不合作";
  628 + } else if ("6".equals(coo)) {
  629 + s = "其他";
  630 + }
  631 + }
  632 + return s;
  633 + }
616 634  
617   - private Map<String, Object> getBabyEyeCheckViewQhd(String id)
618   - {
  635 + private Map<String, Object> getBabyEyeCheckViewQhd(String id) {
619 636 BabyEyeCheck babyEyeCheck = mongoTemplate.findById(id, BabyEyeCheck.class);
620 637  
621 638 Map<String, Object> map = ReflectionUtils.beanToMap(babyEyeCheck);
  639 +
622 640 map.put("doctorSign", babyEyeCheck.getDoctorSign());
623 641 map.put("patientSign", babyEyeCheck.getPatientSign());
624 642  
625 643  
626 644  
627 645  
628 646  
629 647  
630 648  
... ... @@ -641,20 +659,27 @@
641 659 map.put("handleOpinionsIdList", babyEyeCheck.getHandleOpinionsIdList());//医生自定义处理意见 id
642 660 map.put("handleOpinionsId", HandleOpinionsQhdEnums.getName(babyEyeCheck.getHandleOpinionsId()));//处理意见 id,历史数据不做匹配
643 661 map.put("eyeAppearance", babyEyeCheck.getEyeAppearance());//眼外观 1通过 2不通过
  662 + map.put("eyeAppearanceCoo", getHz(babyEyeCheck.getEyeAppearanceCoo(),"1"));
644 663 map.put("redReflexQhd", babyEyeCheck.getRedReflexQhd());//红光反射
645 664 map.put("redReflexQhdOther", babyEyeCheck.getRedReflexQhdOther());
  665 + map.put("redReflexQhdCoo", getHz(babyEyeCheck.getRedReflexQhdCoo(),"2"));
646 666 map.put("blinkReflex", babyEyeCheck.getBlinkReflex()); //瞬目反射
647 667 map.put("blinkReflexOther", babyEyeCheck.getBlinkReflexOther());
  668 + map.put("blinkReflexCoo", getHz(babyEyeCheck.getBlinkReflexCoo(),"1"));
648 669 map.put("redBallTest", babyEyeCheck.getRedBallTest()); //红球试验
649 670 map.put("redBallTestOther", babyEyeCheck.getRedBallTestOther());
  671 + map.put("redBallTestCoo", getHz(babyEyeCheck.getRedBallTestCoo(),"1"));
650 672 map.put("behaviorObservation", babyEyeCheck.getBehaviorObservation());//视物行为观察
651 673 map.put("behaviorObservationOther", babyEyeCheck.getBehaviorObservationOther());
  674 + map.put("behaviorObservationCoo", getHz(babyEyeCheck.getBehaviorObservationCoo(),"1"));
652 675 map.put("refractiveScreening", babyEyeCheck.getRefractiveScreening());//屈光筛查
653 676 map.put("refractiveScreeningOther", babyEyeCheck.getRefractiveScreeningOther());
654 677 map.put("eyePositionExamination", babyEyeCheck.getEyePositionExamination()); //眼位检查
655 678 map.put("eyePositionExaminationOther", babyEyeCheck.getEyePositionExaminationOther());
  679 + map.put("eyePositionExaminationCoo", getHz(babyEyeCheck.getEyePositionExaminationCoo(),"1"));
656 680 map.put("eyeMovement", babyEyeCheck.getEyeMovement()); //眼球运动
657 681 map.put("eyeMovementOther", babyEyeCheck.getEyeMovementOther());
  682 + map.put("eyeMovementCoo", getHz(babyEyeCheck.getEyeMovementCoo(),"1"));
658 683 map.put("typeOfWearingGlasses", babyEyeCheck.getTypeOfWearingGlasses());//戴镜类型 1框架眼镜 2隐形眼镜 3角膜塑形镜 4不戴镜
659 684 map.put("rightEyeVision", babyEyeCheck.getRightEyeVision()); //右眼:裸眼视力
660 685 map.put("rightVision", babyEyeCheck.getRightVision());//右眼:戴镜视力
... ... @@ -902,7 +927,7 @@
902 927 }
903 928  
904 929 @Override
905   - public BaseResponse list(Integer userId, Date startDate, Date endDate, String doctor, String key, Integer currentMonthStart,
  930 + public BaseResponse list(Integer userId, Date startDate, Date endDate, String doctor, String key, String yeymcId, Integer currentMonthStart,
906 931 Integer currentMonthEnd, String chechMonth, boolean positive, String positiveIds,
907 932 Integer page, Integer limit, Date bookStartDate, Date bookEndDate,
908 933 String apparatusPositive, String doctorPositive, String yin, String noPassIds) {
909 934  
... ... @@ -948,9 +973,14 @@
948 973 if (StringUtils.isNotEmpty(yin)) {
949 974 criteria.and("apparatus").nin("2").and("doctorJudgement").nin("2");
950 975 }
951   - if (org.apache.commons.lang.StringUtils.isNotBlank(key)) {
  976 + if (org.apache.commons.lang.StringUtils.isNotBlank(key) || org.apache.commons.lang.StringUtils.isNotBlank(yeymcId)) {
952 977 Criteria c = new Criteria();
953   - c.orOperator(Criteria.where("mphone").is(key), Criteria.where("name").regex(key), Criteria.where("mcertNo").is(key)).and("yn").ne(0);
  978 + if (org.apache.commons.lang.StringUtils.isNotBlank(key)) {
  979 + c.orOperator(Criteria.where("mphone").is(key), Criteria.where("name").regex(key), Criteria.where("mcertNo").is(key)).and("yn").ne(0);
  980 + }
  981 + if (org.apache.commons.lang.StringUtils.isNotBlank(yeymcId)) {
  982 + c.and("yeymcId").is(yeymcId);
  983 + }
954 984 List<BabyModel> babyModels = mongoUtil.findField(BabyModel.class, c, "id");
955 985 List<String> babyIds = CollectionUtils.getId(babyModels, "id", String.class);
956 986 criteria.and("babyId").in(babyIds);
... ... @@ -1034,7 +1064,7 @@
1034 1064 Date startDate, Date endDate,
1035 1065 String doctor,
1036 1066 String key,
1037   - Integer currentMonthStart,Integer currentMonthEnd,
  1067 + Integer currentMonthStart, Integer currentMonthEnd,
1038 1068 String chechMonth,
1039 1069 boolean positive,
1040 1070 String positiveIds,
1041 1071  
1042 1072  
1043 1073  
... ... @@ -1052,21 +1082,21 @@
1052 1082 babyModelQuery.setHospitalId(hospitalId);
1053 1083 babyModelQuery.setDisplayState("1");
1054 1084  
1055   - if(startBuildDate!=null && endBuildDate!=null){
  1085 + if (startBuildDate != null && endBuildDate != null) {
1056 1086 babyModelQuery.setBuildDateNoybjStart(startBuildDate);
1057 1087 babyModelQuery.setBuildDateNoybjEnd(DateUtil.addDay(endBuildDate, 1));
1058 1088 }
1059   - if(startDate!=null && endDate!=null){
  1089 + if (startDate != null && endDate != null) {
1060 1090 babyModelQuery.setCheckTimeStart(startDate);
1061 1091 babyModelQuery.setCheckTimeEnd(DateUtil.addDay(endDate, 1));
1062 1092 }
1063   - if(bookStartDate!=null && bookEndDate!=null){
  1093 + if (bookStartDate != null && bookEndDate != null) {
1064 1094 babyModelQuery.setNextCheckTimeStart(bookStartDate);
1065 1095 babyModelQuery.setNextCheckTimeEnd(DateUtil.addDay(bookEndDate, 1));
1066 1096 }
1067 1097 babyModelQuery.setDoctor(doctor);
1068 1098 babyModelQuery.setQueryNo(key);
1069   - if(currentMonthStart!=null && currentMonthEnd!=null){
  1099 + if (currentMonthStart != null && currentMonthEnd != null) {
1070 1100 babyModelQuery.setBirthStart(DateUtil.getBirthStart(currentMonthEnd));
1071 1101 babyModelQuery.setBirthEnd(DateUtil.getBirthEnd(currentMonthStart));
1072 1102 }
1073 1103  
1074 1104  
... ... @@ -1169,11 +1199,11 @@
1169 1199 Map mapResult = new HashMap();
1170 1200 mapResult.put("babyId", babyModel.getId());//儿童档案id
1171 1201 mapResult.put("babyName", babyModel.getName());//儿童姓名
1172   - if(babyModel.getSex()!=null && babyModel.getSex()==0){
  1202 + if (babyModel.getSex() != null && babyModel.getSex() == 0) {
1173 1203 mapResult.put("sex", "女");//性别
1174   - }else if(babyModel.getSex()!=null && babyModel.getSex()==1){
  1204 + } else if (babyModel.getSex() != null && babyModel.getSex() == 1) {
1175 1205 mapResult.put("sex", "男");
1176   - }else {
  1206 + } else {
1177 1207 mapResult.put("sex", "_");
1178 1208 }
1179 1209 mapResult.put("mname", babyModel.getMname());//母亲姓名
... ... @@ -1386,6 +1416,7 @@
1386 1416 }
1387 1417 return positive;
1388 1418 }
  1419 +
1389 1420 private StringBuilder getYxxmBaby(BabyModel babyModel) {
1390 1421 StringBuilder positive = new StringBuilder(); /** 阳性项目 */
1391 1422 if ("yang".equals(babyModel.getExtRightEyelook())) {
... ... @@ -1731,7 +1762,7 @@
1731 1762 List<BabyEyeCheck> babyEyeChecks = mongoTemplate.find(Query.query(Criteria.where("babyId").is(babyId).and("hospitalId").in(hospitalIds).and("yn").ne("0"))
1732 1763 .with(new Sort(Sort.Direction.ASC, "checkTime")), BabyEyeCheck.class);
1733 1764  
1734   - List <Map> checkMonthQhdEnums1 = CheckMonthQhdEnums.getCheckMonthQhdEnums();
  1765 + List<Map> checkMonthQhdEnums1 = CheckMonthQhdEnums.getCheckMonthQhdEnums();
1735 1766 for (BabyEyeCheck babyEyeCheck : babyEyeChecks) {
1736 1767 Map<String, Object> temp = new HashMap<>();
1737 1768 if (StringUtils.isNotEmpty(babyEyeCheck.getEdition())) {
... ... @@ -1750,7 +1781,7 @@
1750 1781 try {
1751 1782 for (int i = 0; i < checkMonthQhdEnums1.size(); i++) {
1752 1783 Map map = checkMonthQhdEnums1.get(i);
1753   - if( map.get("name").toString().equals(temp.get("checkMonth").toString())){
  1784 + if (map.get("name").toString().equals(temp.get("checkMonth").toString())) {
1754 1785 map.put("state", "2");
1755 1786 map.put("id", babyEyeCheck.getId());
1756 1787 map.put("checkTime", babyEyeCheck.getCheckTime() == null ? null : DateUtil.getYyyyMmDd(babyEyeCheck.getCheckTime()));
1757 1788  
... ... @@ -1988,12 +2019,12 @@
1988 2019  
1989 2020  
1990 2021 return RespBuilder.buildSuccess("checkMonth", checkMonth, "positive", positive, "currentMonth", currentMonth, "checkMonthQhdEnums", checkMonthQhdEnums, "checkMonthQhdBTGEnums",
1991   - checkMonthQhdBTGEnums,"psychologistEnums",psychologistEnums,"nutritionSpecialtyEnums",nutritionSpecialtyEnums,"departmentReferralEnums",departmentReferralEnums);
  2022 + checkMonthQhdBTGEnums, "psychologistEnums", psychologistEnums, "nutritionSpecialtyEnums", nutritionSpecialtyEnums, "departmentReferralEnums", departmentReferralEnums);
1992 2023 }
1993 2024  
1994 2025 @Override
1995   - public void export(Integer userId, Date startDate, Date endDate, String doctor, String key, Integer currentMonthStart, Integer currentMonthEnd, String chechMonth, boolean positive, String positiveIds, HttpServletResponse response, Date bookStartDate, Date bookEndDate, String apparatusPositive, String doctorPositive, String yin) {
1996   - BaseResponse rest = list(userId, startDate, endDate, doctor, key, currentMonthStart, currentMonthEnd, chechMonth, positive, positiveIds, 1, Integer.MAX_VALUE, bookStartDate, bookEndDate, apparatusPositive, doctorPositive, yin, null);
  2026 + public void export(Integer userId, Date startDate, Date endDate, String doctor, String key, String yeymcId, Integer currentMonthStart, Integer currentMonthEnd, String chechMonth, boolean positive, String positiveIds, HttpServletResponse response, Date bookStartDate, Date bookEndDate, String apparatusPositive, String doctorPositive, String yin) {
  2027 + BaseResponse rest = list(userId, startDate, endDate, doctor, key, yeymcId, currentMonthStart, currentMonthEnd, chechMonth, positive, positiveIds, 1, Integer.MAX_VALUE, bookStartDate, bookEndDate, apparatusPositive, doctorPositive, yin, null);
1997 2028 PageResult pageResult = (PageResult) rest.getObject();
1998 2029 List<Map<String, Object>> datas = (List<Map<String, Object>>) pageResult.getGrid();
1999 2030 Map<String, String> cnames = new LinkedHashMap<>();
... ... @@ -2029,7 +2060,6 @@
2029 2060 }
2030 2061  
2031 2062  
2032   -
2033 2063 private void syncData(String action, Object data, String id) {
2034 2064 try {
2035 2065 SyncDataModel model = new SyncDataModel();
2036 2066  
2037 2067  
... ... @@ -2075,16 +2105,13 @@
2075 2105 temp.put("checkTime", babyEyeCheck.getCheckTime() == null ? null : DateUtil.getYyyyMmDd(babyEyeCheck.getCheckTime()));
2076 2106 temp.put("type", "2");
2077 2107 CollectionUtils.removeNullValue(temp);
2078   - Map<String, Object> map = null;
2079   - if ("216".equals(hospitalId))
2080   - {
  2108 + Map<String, Object> map = null;
  2109 + if ("216".equals(hospitalId)) {
2081 2110 map = getBabyEyeCheckViewQhd(babyEyeCheck.getId());
2082   - }
2083   - else
2084   - {
  2111 + } else {
2085 2112 map = getEyeCheckView(babyEyeCheck.getId());
2086 2113 }
2087   - temp.put("viewData",map);
  2114 + temp.put("viewData", map);
2088 2115  
2089 2116 datas.add(temp);
2090 2117 }