From 88922d3f87e2925aba53040e493abca90d638044 Mon Sep 17 00:00:00 2001 From: wtt Date: Wed, 22 Jul 2020 08:55:56 +0800 Subject: [PATCH] update --- .../common/enums/CheckMonthQhdBTGEnums.java | 67 ++++++++++++++++++++++ .../java/com/lyms/platform/pojo/BabyEyeCheck.java | 10 ++++ .../web/controller/BabyEyeCheckController.java | 6 +- .../operate/web/service/BabyEyeCheckService.java | 5 +- .../web/service/impl/BabyEyeCheckServiceImpl.java | 39 ++++++++++++- 5 files changed, 121 insertions(+), 6 deletions(-) create mode 100644 platform-common/src/main/java/com/lyms/platform/common/enums/CheckMonthQhdBTGEnums.java diff --git a/platform-common/src/main/java/com/lyms/platform/common/enums/CheckMonthQhdBTGEnums.java b/platform-common/src/main/java/com/lyms/platform/common/enums/CheckMonthQhdBTGEnums.java new file mode 100644 index 0000000..7c21a93 --- /dev/null +++ b/platform-common/src/main/java/com/lyms/platform/common/enums/CheckMonthQhdBTGEnums.java @@ -0,0 +1,67 @@ +package com.lyms.platform.common.enums; + +import com.lyms.platform.common.utils.StringUtils; + +/** + * 秦皇岛不通过查询条件 + */ +public enum CheckMonthQhdBTGEnums { + + eyeAppearance("eyeAppearance", "眼外观"), + redReflexQhd("redReflexQhd", "红光反射"), + blinkReflex("blinkReflex", "瞬目反射"), + redBallTest("redBallTest", "红球试验"), + behaviorObservation("behaviorObservation", "视物行为观察"), + refractiveScreening("refractiveScreening", "屈光筛查"), + eyePositionExamination("eyePositionExamination", "眼位检查"), + eyeMovement("eyeMovement", "眼球运动"); + + + private String id; + private String name; + + public static CheckMonthQhdBTGEnums get(String id) { + CheckMonthQhdBTGEnums[] values = CheckMonthQhdBTGEnums.values(); + for (CheckMonthQhdBTGEnums value : values) { + if (value.getId().equals(id)) { + return value; + } + } + return null; + } + + public static String getName(String id) { + if(StringUtils.isEmpty(id)) { + return null; + } + CheckMonthQhdBTGEnums[] values = CheckMonthQhdBTGEnums.values(); + for (CheckMonthQhdBTGEnums value : values) { + if (value.id.equals(id)) { + return value.name; + } + } + return null; + } + + CheckMonthQhdBTGEnums(String id, String name){ + this.id = id; + this.name = name; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + +} diff --git a/platform-dal/src/main/java/com/lyms/platform/pojo/BabyEyeCheck.java b/platform-dal/src/main/java/com/lyms/platform/pojo/BabyEyeCheck.java index fa86c99..bd23d39 100644 --- a/platform-dal/src/main/java/com/lyms/platform/pojo/BabyEyeCheck.java +++ b/platform-dal/src/main/java/com/lyms/platform/pojo/BabyEyeCheck.java @@ -22,6 +22,8 @@ public class BabyEyeCheck extends BaseModel { * @Author: 武涛涛 * @Date: 2020/7/20 9:27 */ + // false不合作 + private boolean uncooperative; //类型 默认是旧版本,1新版本20200720 private String edition; // 眼外观 1通过 2不通过 @@ -762,6 +764,14 @@ public class BabyEyeCheck extends BaseModel { return redReflex; } + public boolean isUncooperative() { + return uncooperative; + } + + public void setUncooperative(boolean uncooperative) { + this.uncooperative = uncooperative; + } + public void setRedReflex(String redReflex) { this.redReflex = redReflex; } diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyEyeCheckController.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyEyeCheckController.java index 44192b0..fa84907 100644 --- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyEyeCheckController.java +++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyEyeCheckController.java @@ -121,8 +121,10 @@ public class BabyEyeCheckController extends BaseController { @TokenRequired @RequestMapping(method = RequestMethod.GET) 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, - Date bookStartDate, Date bookEndDate, String apparatusPositive, String doctorPositive, String yin) { - return babyEyeCheckService.list(getUserId(request), startDate, endDate, doctor, key, currentMonthStart, currentMonthEnd, chechMonth, positive, positiveIds, page, limit, bookStartDate, bookEndDate, apparatusPositive, doctorPositive, yin); + Date bookStartDate, Date bookEndDate, String apparatusPositive, String doctorPositive, String yin,String noPassIds) { + return babyEyeCheckService.list(getUserId(request), startDate, endDate, doctor, key, + currentMonthStart, currentMonthEnd, chechMonth, positive, positiveIds, page, limit, + bookStartDate, bookEndDate, apparatusPositive, doctorPositive, yin,noPassIds); } @ResponseBody diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/BabyEyeCheckService.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/BabyEyeCheckService.java index 3b4d217..3d5e817 100644 --- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/BabyEyeCheckService.java +++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/BabyEyeCheckService.java @@ -24,7 +24,10 @@ public interface BabyEyeCheckService extends IBaseService { BaseResponse delete(String id, Integer userId); - 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, Date bookStartDate, Date bookEndDate, String apparatusPositive, String doctorPositive, String yin); + 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, Date bookStartDate, Date bookEndDate, String apparatusPositive, + String doctorPositive, String yin,String noPassIds); BaseResponse query(Integer userId, String babyId); BaseResponse queryQhd(Integer userId, String babyId); diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BabyEyeCheckServiceImpl.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BabyEyeCheckServiceImpl.java index 99d96d5..a97eda7 100644 --- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BabyEyeCheckServiceImpl.java +++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BabyEyeCheckServiceImpl.java @@ -436,6 +436,7 @@ public class BabyEyeCheckServiceImpl extends BaseServiceImpl implements BabyEyeC * @Author: 武涛涛 * @Date: 2020/7/20 13:40 */ + map.put("uncooperative", babyEyeCheck.isUncooperative());//false不合作 map.put("handleOpinionsIdList", babyEyeCheck.getHandleOpinionsIdList());//医生自定义处理意见 id map.put("handleOpinionsId", HandleOpinionsQhdEnums.getName(babyEyeCheck.getHandleOpinionsId()));//处理意见 id,历史数据不做匹配 map.put("eyeAppearance", babyEyeCheck.getEyeAppearance());//眼外观 1通过 2不通过 @@ -645,6 +646,7 @@ public class BabyEyeCheckServiceImpl extends BaseServiceImpl implements BabyEyeC BabyEyeCheck babyEyeCheck = mongoTemplate.findById(id, BabyEyeCheck.class); Map map = ReflectionUtils.beanToMap(babyEyeCheck); map.put("checkTime", DateUtil.getYyyyMmDd(babyEyeCheck.getCheckTime())); + map.put("uncooperative", babyEyeCheck.isUncooperative()); if (StringUtils.isNotEmpty(babyEyeCheck.getCheckMonthId())) { //处理老数据 if("0".equals(babyEyeCheck.getCheckMonthId())){ @@ -695,7 +697,7 @@ public class BabyEyeCheckServiceImpl extends BaseServiceImpl implements BabyEyeC 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, Date bookStartDate, Date bookEndDate, - String apparatusPositive, String doctorPositive, String yin) { + String apparatusPositive, String doctorPositive, String yin,String noPassIds) { boolean b = true; String hospitalId = autoMatchFacade.getHospitalId(userId); Criteria criteria = Criteria.where("yn").ne("0").and("hospitalId").is(hospitalId); @@ -743,6 +745,36 @@ public class BabyEyeCheckServiceImpl extends BaseServiceImpl implements BabyEyeC List babyIds = CollectionUtils.getId(babyModels, "id", String.class); criteria.and("babyId").in(babyIds); } + + /** + * 新加的 不通过查询条件 + * @Author: 武涛涛 + * @Date: 2020/7/21 21:56 + */ + if (StringUtils.isNotEmpty(noPassIds)) { + List ids = CollectionUtils.asList(noPassIds, String.class); + for (String id : ids) { + if("eyeAppearance".equals(id)){ + criteria.and("eyeAppearance").is("2"); + }else if("redReflexQhd".equals(id)){ + criteria.and("redReflexQhd").is("2"); + }else if("blinkReflex".equals(id)){ + criteria.and("blinkReflex").is("2"); + }else if("redBallTest".equals(id)){ + criteria.and("redBallTest").is("2"); + }else if("behaviorObservation".equals(id)){ + criteria.and("behaviorObservation").is("2"); + }else if("refractiveScreening".equals(id)){ + criteria.and("refractiveScreening").is("2"); + }else if("eyePositionExamination".equals(id)){ + criteria.and("eyePositionExamination").is("2"); + }else if("eyeMovement".equals(id)){ + criteria.and("eyeMovement").is("2"); + } + } + } + + /*end */ if (positive) { Query query = new Query(criteria); @@ -1060,6 +1092,7 @@ public class BabyEyeCheckServiceImpl extends BaseServiceImpl implements BabyEyeC List> checkMonth = EnumUtil.toJson(CheckMonthEnums.class); /** 检查月龄 */ List> currentMonth = EnumUtil.toJson(CheckMonthEnums2.class); /** 检查月龄 */ List> checkMonthQhdEnums = EnumUtil.toJson(CheckMonthQhdEnums.class); /** (检查时间 */ + List> checkMonthQhdBTGEnums = EnumUtil.toJson(CheckMonthQhdBTGEnums.class); /** 不通过 */ List> positive = new ArrayList<>(); /** 阳性项目 */ if ("197".equals(hospitalId)) { @@ -1245,12 +1278,12 @@ public class BabyEyeCheckServiceImpl extends BaseServiceImpl implements BabyEyeC } - return RespBuilder.buildSuccess("checkMonth", checkMonth, "positive", positive, "currentMonth", currentMonth, "checkMonthQhdEnums", checkMonthQhdEnums); + return RespBuilder.buildSuccess("checkMonth", checkMonth, "positive", positive, "currentMonth", currentMonth, "checkMonthQhdEnums", checkMonthQhdEnums, "checkMonthQhdBTGEnums", checkMonthQhdBTGEnums); } @Override 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) { - BaseResponse rest = list(userId, startDate, endDate, doctor, key, currentMonthStart, currentMonthEnd, chechMonth, positive, positiveIds, 1, Integer.MAX_VALUE, bookStartDate, bookEndDate, apparatusPositive, doctorPositive, yin); + BaseResponse rest = list(userId, startDate, endDate, doctor, key, currentMonthStart, currentMonthEnd, chechMonth, positive, positiveIds, 1, Integer.MAX_VALUE, bookStartDate, bookEndDate, apparatusPositive, doctorPositive, yin,null); PageResult pageResult = (PageResult) rest.getObject(); List> datas = (List>) pageResult.getGrid(); Map cnames = new LinkedHashMap<>(); -- 1.8.3.1