Commit 82616a7c0623c8724b45440a020f5dd7928df4c4

Authored by wtt
1 parent 33fd910625

update

Showing 5 changed files with 81 additions and 1 deletions

platform-common/src/main/java/com/lyms/platform/common/enums/CheckMonthQhdEnums.java View file @ 82616a7
... ... @@ -2,6 +2,11 @@
2 2  
3 3 import com.lyms.platform.common.utils.StringUtils;
4 4  
  5 +import java.util.ArrayList;
  6 +import java.util.HashMap;
  7 +import java.util.List;
  8 +import java.util.Map;
  9 +
5 10 /**
6 11 * 秦皇岛新的,检查月龄
7 12 */
... ... @@ -49,6 +54,20 @@
49 54 }
50 55 }
51 56 return null;
  57 + }
  58 +
  59 + public static List <Map> getCheckMonthQhdEnums() {
  60 + List <Map> mapList = new ArrayList <>();
  61 + CheckMonthQhdEnums[] values = CheckMonthQhdEnums.values();
  62 + for (CheckMonthQhdEnums value : values) {
  63 + Map map = new HashMap();
  64 + map.put("name", value.getName());
  65 + map.put("state","1");//1未做眼保健 2做了眼保健
  66 + map.put("id","");
  67 + map.put("checkTime","");
  68 + mapList.add(map);
  69 + }
  70 + return mapList;
52 71 }
53 72  
54 73 CheckMonthQhdEnums(Integer id, String name){
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyEyeCheckController.java View file @ 82616a7
... ... @@ -69,6 +69,21 @@
69 69 public BaseResponse queryQhdBase(@PathVariable String id, HttpServletRequest request) {
70 70 return babyEyeCheckService.queryQhdBase(getUserId(request), id);
71 71 }
  72 +
  73 + /**
  74 + * 获取档案和检查信息,儿童眼保健检查的检查套餐记录
  75 + *
  76 + * @param id
  77 + * @param request
  78 + * @Author: 武涛涛
  79 + * @Date: 2020/8/5 16:04
  80 + */
  81 + @ResponseBody
  82 + @TokenRequired
  83 + @RequestMapping(value = "/queryQhdBaseListState/{id}", method = RequestMethod.GET)
  84 + public BaseResponse queryQhdBaseListState(@PathVariable String id, HttpServletRequest request) {
  85 + return babyEyeCheckService.queryQhdBaseListState(getUserId(request), id);
  86 + }
72 87 /**
73 88 * 儿保检查获取眼保健检查结果信息
74 89 *
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/SieveFacade.java View file @ 82616a7
... ... @@ -1141,8 +1141,9 @@
1141 1141  
1142 1142  
1143 1143 PatientsQuery patientsQuery = new PatientsQuery();
1144   - patientsQuery.setHospitalId(hospitalId);
  1144 +// patientsQuery.setHospitalId(hospitalId);
1145 1145 patientsQuery.setYn(YnEnums.YES.getId());
  1146 + patientsQuery.setType(1);
1146 1147 if (StringUtils.isNotEmpty(cardNo)) {
1147 1148 patientsQuery.setPhoneOrCert(cardNo);
1148 1149 } else if (StringUtils.isNotEmpty(vcCardNo)) {
... ... @@ -3186,6 +3187,7 @@
3186 3187 private void cnamesRegionalCqsievesWcMap(Map<String, String> cnames) {
3187 3188 cnames.put("姓名", "姓名");
3188 3189 cnames.put("年龄", "年龄");
  3190 + cnames.put("联系方式", "联系方式");
3189 3191 cnames.put("申请时间", "申请时间");
3190 3192 cnames.put("申请孕周", "申请孕周");
3191 3193 cnames.put("采血时间", "采血时间");
... ... @@ -3253,6 +3255,7 @@
3253 3255 Map<String, Object> data = new HashMap<>();
3254 3256 data.put("姓名", sive.getName());
3255 3257 data.put("年龄", sive.getAge());
  3258 + data.put("联系方式", sive.getPhone());
3256 3259 data.put("申请时间", sive.getApplyTime());
3257 3260 data.put("申请孕周", sive.getDueWeek());
3258 3261 data.put("采血时间", sive.getCollectionDate());
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/BabyEyeCheckService.java View file @ 82616a7
... ... @@ -38,6 +38,7 @@
38 38 BaseResponse query(Integer userId, String babyId);
39 39 BaseResponse queryQhd(Integer userId, String babyId);
40 40 BaseResponse queryQhdBase(Integer userId, String babyId);
  41 + BaseResponse queryQhdBaseListState(Integer userId, String babyId);
41 42 BaseResponse queryShowQhd( String babyId);
42 43  
43 44 BaseResponse listInit(Integer userId);
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BabyEyeCheckServiceImpl.java View file @ 82616a7
... ... @@ -1704,6 +1704,48 @@
1704 1704 }
1705 1705  
1706 1706 @Override
  1707 + public BaseResponse queryQhdBaseListState(Integer userId, String babyId) {
  1708 + List<String> hospitalIds = organizationGroupsFacade.findGroupHospital(userId, false);
  1709 + if (CollectionUtils.isEmpty(hospitalIds)) {
  1710 + return RespBuilder.buildSuccess();
  1711 + }
  1712 + List<Map<String, Object>> rest = new ArrayList<>();
  1713 + List<BabyEyeCheck> babyEyeChecks = mongoTemplate.find(Query.query(Criteria.where("babyId").is(babyId).and("hospitalId").in(hospitalIds).and("yn").ne("0"))
  1714 + .with(new Sort(Sort.Direction.ASC, "checkTime")), BabyEyeCheck.class);
  1715 +
  1716 + List <Map> checkMonthQhdEnums1 = CheckMonthQhdEnums.getCheckMonthQhdEnums();
  1717 + for (BabyEyeCheck babyEyeCheck : babyEyeChecks) {
  1718 + Map<String, Object> temp = new HashMap<>();
  1719 + if (StringUtils.isNotEmpty(babyEyeCheck.getEdition())) {
  1720 + //处理老数据
  1721 + if ("0".equals(babyEyeCheck.getCheckMonthId())) {
  1722 + babyEyeCheck.setCheckMonthId("1");
  1723 + } else if ("9".equals(babyEyeCheck.getCheckMonthId())) {
  1724 + babyEyeCheck.setCheckMonthId("12");
  1725 + } else if ("18".equals(babyEyeCheck.getCheckMonthId())) {
  1726 + babyEyeCheck.setCheckMonthId("24");
  1727 + }
  1728 + temp.put("checkMonth", CheckMonthQhdEnums.getName(babyEyeCheck.getCheckMonthId()));
  1729 + } else {
  1730 + temp.put("checkMonth", CheckMonthEnums.getName(babyEyeCheck.getCheckMonthId()));
  1731 + }
  1732 + try {
  1733 + for (int i = 0; i < checkMonthQhdEnums1.size(); i++) {
  1734 + Map map = checkMonthQhdEnums1.get(i);
  1735 + if( map.get("name").toString().equals(temp.get("checkMonth").toString())){
  1736 + map.put("state", "2");
  1737 + map.put("id", babyEyeCheck.getId());
  1738 + map.put("checkTime", babyEyeCheck.getCheckTime() == null ? null : DateUtil.getYyyyMmDd(babyEyeCheck.getCheckTime()));
  1739 + continue;
  1740 + }
  1741 + }
  1742 + } catch (Exception e) {
  1743 + }
  1744 + }
  1745 + return RespBuilder.buildSuccess(checkMonthQhdEnums1);
  1746 + }
  1747 +
  1748 + @Override
1707 1749 public BaseResponse queryShowQhd(String babyId) {
1708 1750 Date firstSecond = DateUtil.getDayFirstSecond(new Date());
1709 1751 Date dayLastSecond = DateUtil.getDayLastSecond(new Date());