Commit 14bbf42d1fa53d9cff59c422ae27d0375377536f

Authored by yangfei

Merge remote-tracking branch 'origin/master'

Showing 17 changed files

platform-biz-service/src/main/resources/mainOrm/master/MasterLis.xml View file @ 14bbf42
... ... @@ -114,6 +114,15 @@
114 114 <if test="vcCardNo != null and vcCardNo != ''">
115 115 AND VCCARDNO = #{vcCardNo}
116 116 </if>
  117 +
  118 + <if test="vcCardNos != null and vcCardNos.size() !=0 ">
  119 + AND VCCARDNO IN
  120 + <foreach collection="vcCardNos" item="vc"
  121 + index="index" open="(" close=")" separator=",">
  122 + #{vc}
  123 + </foreach>
  124 + </if>
  125 +
117 126 <if test="phone != null and phone != ''">
118 127 AND PHONE = #{phone}
119 128 </if>
... ... @@ -132,6 +141,7 @@
132 141 #{title}
133 142 </foreach>
134 143 </if>
  144 +
135 145 </select>
136 146  
137 147  
platform-common/src/main/java/com/lyms/platform/common/enums/CZFmTypeEnums.java View file @ 14bbf42
... ... @@ -12,7 +12,7 @@
12 12 O3("人工流产", 4),
13 13 O4("药物流产", 5),
14 14 O5("难免流产", 6),
15   - O6("剖宫流产", 7),
  15 + O6("剖宫取胎", 7),
16 16 O7("自然流产", 9),
17 17 O8("生化妊娠", 10);
18 18 private CZFmTypeEnums(String name, int id) {
platform-common/src/main/java/com/lyms/platform/common/enums/CheckMonthEnums2.java View file @ 14bbf42
  1 +package com.lyms.platform.common.enums;
  2 +
  3 +import com.lyms.platform.common.utils.StringUtils;
  4 +
  5 +/**
  6 + * 检查月龄
  7 + */
  8 +public enum CheckMonthEnums2 {
  9 + I1(1, "1月龄"),
  10 +
  11 + I2(2, "2月龄"),
  12 + I3(3, "3月龄"),
  13 + I4(4, "4月龄"),
  14 + I5(5, "5月龄"),
  15 + I6(6, "6月龄"),
  16 + I7(7, "7月龄"),
  17 + I8(8, "8月龄"),
  18 + I9(9, "9月龄"),
  19 + I10(10, "10月龄"),
  20 + I11(11, "11月龄"),
  21 + I12(12, "12月龄"),
  22 + I13(13, "13月龄"),
  23 + I14(14, "14月龄"),
  24 + I15(15, "15月龄"),
  25 + I16(16, "16月龄"),
  26 + I17(17, "17月龄"),
  27 + I18(18, "18月龄"),
  28 + I19(19, "19月龄"),
  29 + I20(20, "20月龄"),
  30 + I21(21, "21月龄"),
  31 + I22(22, "22月龄"),
  32 + I23(23, "23月龄"),
  33 + I24(24, "24月龄"),
  34 + I25(25, "25月龄"),
  35 + I26(26, "26月龄"),
  36 + I27(27, "27月龄"),
  37 + I28(28, "28月龄"),
  38 + I29(29, "29月龄"),
  39 + I30(30, "30月龄"),
  40 + I31(31, "31月龄"),
  41 + I32(32, "32月龄"),
  42 + I33(33, "33月龄"),
  43 + I34(34, "34月龄"),
  44 + I35(35, "35月龄"),
  45 + I36(36, "36月龄"),
  46 + I37(37, "37月龄"),
  47 + I38(38, "38月龄"),
  48 + I39(39, "39月龄"),
  49 + I40(40, "40月龄"),
  50 + I41(41, "41月龄"),
  51 + I42(42, "42月龄"),
  52 + I43(43, "43月龄"),
  53 + I44(44, "44月龄"),
  54 + I45(45, "45月龄"),
  55 + I46(46, "46月龄"),
  56 + I47(47, "47月龄"),
  57 + I48(48, "48月龄"),
  58 + I49(49, "49月龄"),
  59 + I50(50, "50月龄"),
  60 + I51(51, "51月龄"),
  61 + I52(52, "52月龄"),
  62 + I53(53, "53月龄"),
  63 + I54(54, "54月龄"),
  64 + I55(55, "55月龄"),
  65 + I56(56, "56月龄"),
  66 + I57(57, "57月龄"),
  67 + I58(58, "58月龄"),
  68 + I59(59, "59月龄"),
  69 + I60(60, "60月龄"),
  70 + I61(61, "61月龄"),
  71 + I62(62, "62月龄"),
  72 + I63(63, "63月龄"),
  73 + I64(64, "64月龄"),
  74 + I65(65, "65月龄"),
  75 + I66(66, "66月龄"),
  76 + I67(67, "67月龄"),
  77 + I68(68, "68月龄"),
  78 + I69(69, "69月龄"),
  79 + I70(70, "70月龄"),
  80 + I71(71, "71月龄"),
  81 + I72(72, "72月龄");
  82 +
  83 + private Integer id;
  84 + private String name;
  85 +
  86 + public static CheckMonthEnums2 get(Integer id) {
  87 + CheckMonthEnums2[] values = CheckMonthEnums2.values();
  88 + for (CheckMonthEnums2 value : values) {
  89 + if (value.getId() == id) {
  90 + return value;
  91 + }
  92 + }
  93 + return null;
  94 + }
  95 +
  96 + public static String getName(String id) {
  97 + if(StringUtils.isEmpty(id)) {
  98 + return null;
  99 + }
  100 + int i = Integer.parseInt(id);
  101 + CheckMonthEnums2[] values = CheckMonthEnums2.values();
  102 + for (CheckMonthEnums2 value : values) {
  103 + if (value.id == i) {
  104 + return value.name;
  105 + }
  106 + }
  107 + return null;
  108 + }
  109 +
  110 + CheckMonthEnums2(Integer id, String name){
  111 + this.id = id;
  112 + this.name = name;
  113 + }
  114 +
  115 + public Integer getId() {
  116 + return id;
  117 + }
  118 +
  119 + public void setId(Integer id) {
  120 + this.id = id;
  121 + }
  122 +
  123 + public String getName() {
  124 + return name;
  125 + }
  126 +
  127 + public void setName(String name) {
  128 + this.name = name;
  129 + }
  130 +
  131 +}
platform-dal/src/main/java/com/lyms/platform/pojo/AntenatalExaminationModel.java View file @ 14bbf42
... ... @@ -17,6 +17,15 @@
17 17 public class AntenatalExaminationModel extends BaseModel {
18 18  
19 19 private static final long serialVersionUID = SerialIdEnum.AntenatalExaminationModel.getCid();
  20 + List<String> mHighRiskReason;
  21 +
  22 + public List<String> getmHighRiskReason() {
  23 + return mHighRiskReason;
  24 + }
  25 +
  26 + public void setmHighRiskReason(List<String> mHighRiskReason) {
  27 + this.mHighRiskReason = mHighRiskReason;
  28 + }
20 29  
21 30 /** 处理意见 */
22 31 private Map<String, List<String>> treatmentOpinion2;
platform-operate-api/src/main/java/com/lyms/hospitalapi/dzfy/DzfyHisService.java View file @ 14bbf42
... ... @@ -451,41 +451,58 @@
451 451  
452 452 /**德州
453 453 * 获取患者使用过的所有就诊卡号
454   - * @param cardNo 就诊卡号
  454 + * @param vcCardNo 就诊卡号
455 455 * @return
456 456 */
457   - public List<DzReplace> findAllCradNo(String cardNo){
  457 + public List<DzReplace> findAllVcCarddNo(String vcCardNo){
458 458 List<DzReplace> allCardNoList = new ArrayList<DzReplace>();
459   - if (StringUtils.isNotBlank(cardNo)) {
  459 + if (StringUtils.isNotBlank(vcCardNo)) {
  460 + System.out.println("vcCardNo = " + vcCardNo);
460 461 Connection conn = com.lyms.hospitalapi.dzfy.ConnTools.makeHisConnection();
461 462 QueryRunner queryRunner = new QueryRunner(true);
462   - String sql = "select id as id from zlhis.v_patientinfo where cardno = '"+cardNo+"'";
  463 + String sql = "select id as id from zlhis.v_patientinfo where cardno = '"+vcCardNo+"'";
463 464 try{
464   -
465 465 List<DzReplace> hisDzReplaceList = queryRunner.query(conn,sql,new BeanListHandler<DzReplace>(DzReplace.class));
466 466 String jzkSql = "select 病人ID as id,卡号 as cardNo,登记记录 as combTime from zlhis.jzkghjl where 病人ID = '"+hisDzReplaceList.get(0).getId()+"'";
467   -
468 467 allCardNoList = queryRunner.query(conn,jzkSql,new BeanListHandler<DzReplace>(DzReplace.class));
469   -
  468 + System.out.println("vcCardNo list " + allCardNoList);
470 469 }catch (Exception e){
471   -
472   - e.printStackTrace();
473   -
  470 + DbUtils.closeQuietly(conn);
  471 + ExceptionUtils.catchException(e, "dz his exception ");
  472 + }finally {
  473 + DbUtils.closeQuietly(conn);
474 474 }
475   -
476   -
477 475 }
478   -
479 476 return allCardNoList;
480 477 }
481 478  
482 479  
  480 + /**
  481 + * 通过就诊卡号查询到当前就诊卡号使用人的历史就诊卡号
  482 + * @param vcCardNo
  483 + * @return
  484 + */
  485 + public List<String> getDzVcCardNos(String vcCardNo)
  486 + {
  487 + List<String> vcCardNos = new ArrayList<>();
  488 + List<DzReplace> list = findAllVcCarddNo(vcCardNo);
483 489  
484   -
485   -
486   -
487   -
488   -
  490 + if (CollectionUtils.isNotEmpty(list))
  491 + {
  492 + for (DzReplace dz : list)
  493 + {
  494 + if (dz != null && StringUtils.isNotEmpty(dz.getCardNo()))
  495 + {
  496 + vcCardNos.add(dz.getCardNo());
  497 + }
  498 + }
  499 + }
  500 + else
  501 + {
  502 + vcCardNos.add(vcCardNo);
  503 + }
  504 + return vcCardNos;
  505 + }
489 506  
490 507  
491 508 public static Date parseYmd(String s) {
platform-operate-api/src/main/java/com/lyms/hospitalapi/pojo/DzReplace.java View file @ 14bbf42
... ... @@ -32,5 +32,14 @@
32 32 public void setCombTime(String combTime) {
33 33 this.combTime = combTime;
34 34 }
  35 +
  36 + @Override
  37 + public String toString() {
  38 + return "DzReplace{" +
  39 + "id='" + id + '\'' +
  40 + ", cardNo='" + cardNo + '\'' +
  41 + ", combTime='" + combTime + '\'' +
  42 + '}';
  43 + }
35 44 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/AntenatalExaminationController.java View file @ 14bbf42
... ... @@ -184,7 +184,8 @@
184 184 @RequestMapping(method = RequestMethod.GET, value = "/antex")
185 185 @ResponseBody
186 186 @TokenRequired
187   - public BaseResponse findOneAntById(@Valid AntExQueryRequest antExQueryRequest) {
  187 + public BaseResponse findOneAntById(@Valid AntExQueryRequest antExQueryRequest, HttpServletRequest request) {
  188 + antExQueryRequest.setUserId(getUserId(request));
188 189 return antenatalExaminationFacade.findOneAntExById(antExQueryRequest);
189 190 }
190 191  
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java View file @ 14bbf42
1 1 package com.lyms.platform.operate.web.facade;
2 2  
  3 +import com.lyms.platform.biz.SequenceConstant;
3 4 import com.lyms.platform.biz.service.*;
4 5 import com.lyms.platform.common.constants.ErrorCodeConstants;
5 6 import com.lyms.platform.common.enums.*;
6 7 import com.lyms.platform.common.result.BaseObjectResponse;
7 8 import com.lyms.platform.common.result.BaseResponse;
  9 +import com.lyms.platform.common.result.PageResult;
8 10 import com.lyms.platform.common.utils.*;
9 11 import com.lyms.platform.operate.web.request.*;
10 12 import com.lyms.platform.operate.web.result.*;
... ... @@ -26,6 +28,9 @@
26 28 import org.slf4j.LoggerFactory;
27 29 import org.springframework.beans.factory.annotation.Autowired;
28 30 import org.springframework.data.domain.Sort;
  31 +import org.springframework.data.mongodb.core.MongoTemplate;
  32 +import org.springframework.data.mongodb.core.query.Criteria;
  33 +import org.springframework.data.mongodb.core.query.Query;
29 34 import org.springframework.stereotype.Component;
30 35 import org.springframework.util.StopWatch;
31 36  
... ... @@ -81,6 +86,8 @@
81 86 private DischargeAbstractMotherService dischargeAbstractMotherService;
82 87 @Autowired
83 88 private MongoUtil mongoUtil;
  89 + @Autowired
  90 + private MongoTemplate mongoTemplate;
84 91  
85 92 /**
86 93 * 处理区域隐藏建档
... ... @@ -2069,6 +2076,14 @@
2069 2076 */
2070 2077 public BaseResponse findOneAntExById(AntExQueryRequest antExQueryRequest) {
2071 2078 Object object = null;
  2079 + Integer userId = antExQueryRequest.getUserId();
  2080 + List<PlantformConfigModel> configModele = mongoTemplate.find(Query.query(Criteria.where("yn").ne("0").and("userId").is(userId).and("type").is(SequenceConstant.CUSTOM_CONTENT)).with(new Sort(Sort.Direction.DESC,"createDate")), PlantformConfigModel.class);
  2081 + List mHighRiskReason = new ArrayList();
  2082 + for (PlantformConfigModel configModel : configModele) {
  2083 + Map<String, Object> map = ReflectionUtils.beanToMap(configModel);
  2084 + map.put("id", configModel.getId().toString());
  2085 + mHighRiskReason.add(map);
  2086 + }
2072 2087 //复诊
2073 2088 if ("1".equals(antExQueryRequest.getType())) {
2074 2089 AntenatalExaminationModel examinationModel = antenatalExaminationService.findOneById(antExQueryRequest.getId());
... ... @@ -2113,7 +2128,6 @@
2113 2128 antenatalExaminationResult.setCheckDoctor(map1);
2114 2129 }
2115 2130  
2116   -
2117 2131 antenatalExaminationResult.setTreatmentOpinion2Types(examinationModel.getTreatmentOpinion2Types());
2118 2132 Map<String, List<String>> treatmentOpinion2 = examinationModel.getTreatmentOpinion2();
2119 2133 Map<String, List<Map<String, Object>>> restTreatmentOpinion2 = new HashMap<>();
... ... @@ -2128,6 +2142,7 @@
2128 2142 antenatalExaminationResult.setTreatmentOpinion2Types(examinationModel.getTreatmentOpinion2Types());
2129 2143 antenatalExaminationResult.setQuicken(examinationModel.getQuicken());
2130 2144 antenatalExaminationResult.setQuickenRemark(examinationModel.getQuickenRemark());
  2145 + antenatalExaminationResult.setmHighRiskReason(mHighRiskReason);
2131 2146  
2132 2147 antenatalExaminationResult.setIsSieve(cap(data, examinationModel.getParentId()));
2133 2148 antenatalExaminationResult.setHasSieve(CollectionUtils.isEmpty(applyOrderService.querySieveApplyOrderWithQuery(applyOrderQuery)) ? 0 : 1);
... ... @@ -2192,6 +2207,7 @@
2192 2207 antexChuResult.setTreatmentOpinion2Types(antExChuModel.getTreatmentOpinion2Types());
2193 2208 antexChuResult.setQuicken(antExChuModel.getQuicken());
2194 2209 antexChuResult.setQuickenRemark(antExChuModel.getQuickenRemark());
  2210 + antexChuResult.setmHighRiskReason(mHighRiskReason);
2195 2211  
2196 2212 object = antexChuResult;
2197 2213 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java View file @ 14bbf42
... ... @@ -1514,7 +1514,6 @@
1514 1514 puerperaQuery.setPhoneOrCert(param.getCardNo());
1515 1515 } else if (param.getHospitalId()!= null & !StringUtils.isEmpty(param.getVcCardNo())) {
1516 1516  
1517   - long start = System.currentTimeMillis();
1518 1517 BabyModelQuery babyQuery = new BabyModelQuery();
1519 1518 babyQuery.setYn(YnEnums.YES.getId());
1520 1519 babyQuery.setVcCardNo(param.getVcCardNo());
1521 1520  
... ... @@ -1526,15 +1525,8 @@
1526 1525 }
1527 1526  
1528 1527 babyQuery.setHospitalIdList(groupsFacade.findGroupHospital(userId,false));
1529   - long end = System.currentTimeMillis();
1530   -
1531   - System.out.println("times1 === " + (end - start));
1532   -
1533 1528 List<BabyModel> babyModels = babyBookbuildingService.queryBabyBuildByCond(babyQuery);
1534 1529  
1535   - long end1 = System.currentTimeMillis();
1536   -
1537   - System.out.println("times2 === "+( end1 -end));
1538 1530 if (CollectionUtils.isNotEmpty(babyModels)) {
1539 1531 BabyModel model = babyModels.get(0);
1540 1532 if (model != null) {
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/LisFacade.java View file @ 14bbf42
... ... @@ -59,6 +59,9 @@
59 59 private QhdfyHisService qhdfyHisService;
60 60  
61 61 @Autowired
  62 + private DzfyHisService dzfyHisService;
  63 +
  64 + @Autowired
62 65 @Qualifier("commonThreadPool")
63 66 private ThreadPoolTaskExecutor commonThreadPool;
64 67  
... ... @@ -464,7 +467,16 @@
464 467 //通过就诊卡号和医院id查询到医院下面的lis记录
465 468 if (StringUtils.isNotEmpty(vcCardNo))
466 469 {
467   - model.setVcCardNo(vcCardNo);
  470 + //德州
  471 + if ("6".equals(HIS_VERSION))
  472 + {
  473 + model.setVcCardNos(dzfyHisService.getDzVcCardNos(vcCardNo));
  474 + }
  475 + else
  476 + {
  477 + model.setVcCardNo(vcCardNo);
  478 + }
  479 +
468 480 List<LisReportModel> lises = lisService.queryLisDataByModel(model);
469 481 if (CollectionUtils.isNotEmpty(lises))
470 482 {
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ViewFacade.java View file @ 14bbf42
... ... @@ -1965,6 +1965,7 @@
1965 1965 map.put("diagnosis", diagnosis);
1966 1966 map.put("treatmentOpinion", data.getTreatmentOpinion());
1967 1967 map.put("guide", data.getGuide());
  1968 + map.put("mHighRiskReason", mongoUtil.findPlatValueList(data.getmHighRiskReason()));
1968 1969  
1969 1970 /** 优惠券编号 */
1970 1971 map.put("couponCode", couponService.findByUsedId(id));
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/AntExAddRequest.java View file @ 14bbf42
... ... @@ -15,6 +15,15 @@
15 15 */
16 16 @Form
17 17 public class AntExAddRequest implements IBasicRequestConvert<AntenatalExaminationModel> {
  18 + List<String> mHighRiskReason;
  19 +
  20 + public List<String> getmHighRiskReason() {
  21 + return mHighRiskReason;
  22 + }
  23 +
  24 + public void setmHighRiskReason(List<String> mHighRiskReason) {
  25 + this.mHighRiskReason = mHighRiskReason;
  26 + }
18 27 /** 处理意见 */
19 28 private Map<String, List<String>> treatmentOpinion2;
20 29 private List<String> treatmentOpinion2Types;
... ... @@ -298,6 +307,7 @@
298 307 @Override
299 308 public AntenatalExaminationModel convertToDataModel() {
300 309 AntenatalExaminationModel examinationModel = new AntenatalExaminationModel();
  310 + examinationModel.setmHighRiskReason(mHighRiskReason);
301 311 examinationModel.setQuicken(quicken);
302 312 examinationModel.setQuickenRemark(quickenRemark);
303 313 examinationModel.setTreatmentOpinion2(treatmentOpinion2);
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/AntExQueryRequest.java View file @ 14bbf42
... ... @@ -17,6 +17,9 @@
17 17 @FormParam
18 18 @NotEmpty(message = "id不能为空.")
19 19 private String id;
  20 +
  21 + private Integer userId;
  22 +
20 23 //1是复诊 0 是初诊
21 24 @FormParam
22 25 @Pattern(regexp = "^[0|1]$",message = "type 只能为0或者1")
... ... @@ -36,6 +39,14 @@
36 39  
37 40 public void setType(String type) {
38 41 this.type = type;
  42 + }
  43 +
  44 + public Integer getUserId() {
  45 + return userId;
  46 + }
  47 +
  48 + public void setUserId(Integer userId) {
  49 + this.userId = userId;
39 50 }
40 51 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/AntExcAddRequest.java View file @ 14bbf42
... ... @@ -20,6 +20,16 @@
20 20 @Form
21 21 public class AntExcAddRequest implements IBasicRequestConvert<AntExChuModel> {
22 22  
  23 + List<String> mHighRiskReason;
  24 +
  25 + public List<String> getmHighRiskReason() {
  26 + return mHighRiskReason;
  27 + }
  28 +
  29 + public void setmHighRiskReason(List<String> mHighRiskReason) {
  30 + this.mHighRiskReason = mHighRiskReason;
  31 + }
  32 +
23 33 private Map<String, List<String>> treatmentOpinion2;
24 34 private List<String> treatmentOpinion2Types;
25 35 /** 胎动 */
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/AntenatalExaminationResult.java View file @ 14bbf42
... ... @@ -15,6 +15,8 @@
15 15 */
16 16 public class AntenatalExaminationResult implements IBasicResultConvert<AntenatalExaminationResult, AntenatalExaminationModel> {
17 17  
  18 + private List mHighRiskReason;
  19 +
18 20 /** 处理意见 */
19 21 private Map<String, List<Map<String, Object>>> treatmentOpinion2;
20 22 private List<String> treatmentOpinion2Types;
... ... @@ -22,6 +24,14 @@
22 24 private String quicken;
23 25 /** 胎动备注 */
24 26 private String quickenRemark;
  27 +
  28 + public List getmHighRiskReason() {
  29 + return mHighRiskReason;
  30 + }
  31 +
  32 + public void setmHighRiskReason(List mHighRiskReason) {
  33 + this.mHighRiskReason = mHighRiskReason;
  34 + }
25 35  
26 36 public String getQuicken() {
27 37 return quicken;
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/AntexChuResult.java View file @ 14bbf42
... ... @@ -15,6 +15,16 @@
15 15 */
16 16 public class AntexChuResult {
17 17  
  18 + private List mHighRiskReason;
  19 +
  20 + public List getmHighRiskReason() {
  21 + return mHighRiskReason;
  22 + }
  23 +
  24 + public void setmHighRiskReason(List mHighRiskReason) {
  25 + this.mHighRiskReason = mHighRiskReason;
  26 + }
  27 +
18 28 /** 处理意见 */
19 29 private Map<String, List<Map<String, Object>>> treatmentOpinion2;
20 30 private List<String> treatmentOpinion2Types;
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BabyEyeCheckServiceImpl.java View file @ 14bbf42
... ... @@ -105,6 +105,9 @@
105 105 @Override
106 106 public BaseResponse info(String id) {
107 107 BabyEyeCheck babyEyeCheck = mongoTemplate.findById(id, BabyEyeCheck.class);
  108 + if(babyEyeCheck == null) {
  109 + return RespBuilder.buildSuccess();
  110 + }
108 111 Map<String, Object> map = ReflectionUtils.beanToMap(babyEyeCheck);
109 112 map.put("eyeMovementsId", "xz".equals(babyEyeCheck.getEyeMovementsId()) ? "限制" : "xt".equals(babyEyeCheck.getEyeMovementsId()) ? "协调" : "");
110 113 map.put("nystagmus", parseYinYang(babyEyeCheck.getNystagmus()));
... ... @@ -115,7 +118,72 @@
115 118 map.put("doctor", couponMapper.getUserName(doctor));
116 119 }
117 120 map.put("handleOpinionsId", HandleOpinionsEnums.getName(babyEyeCheck.getHandleOpinionsId()));
118   - map.put("riskFactorId", EyeHighRiskEnums.getName(babyEyeCheck.getRiskFactorId()));
  121 + List<String> riskFactorNames = EyeHighRiskEnums.getName(babyEyeCheck.getRiskFactorId());
  122 + if(CollectionUtils.isNotEmpty(riskFactorNames)) {
  123 + for (int i = 0; i < riskFactorNames.size(); i++) {
  124 + if("其他".equals(riskFactorNames.get(i))) {
  125 + riskFactorNames.set(i, "其他:" + (babyEyeCheck.getRiskFactorIdOther() == null ? "" : map.get("riskFactorIdOther").toString()));
  126 + }
  127 + }
  128 + }
  129 +
  130 + StringBuilder refractometer = new StringBuilder();
  131 + if(StringUtils.isNotEmpty(babyEyeCheck.getR1())) {
  132 + refractometer.append("R:S( ").append(babyEyeCheck.getR1()).append( " )");
  133 + }
  134 + if(StringUtils.isNotEmpty(babyEyeCheck.getR2())) {
  135 + if(refractometer.length() != 0) {
  136 + refractometer.append(" ");
  137 + }
  138 + refractometer.append("R:DC( ").append(babyEyeCheck.getR2()).append( " )");
  139 + }
  140 + boolean flag = false;
  141 + if(StringUtils.isNotEmpty(babyEyeCheck.getL1())) {
  142 + if(refractometer.length() != 0) {
  143 + refractometer.append(", ");
  144 + flag = true;
  145 + }
  146 + refractometer.append("L:S( ").append(babyEyeCheck.getL1()).append( " ) ");
  147 + }
  148 + if(StringUtils.isNotEmpty(babyEyeCheck.getL2())) {
  149 + if(!flag) {
  150 + if(StringUtils.isNotEmpty(babyEyeCheck.getR1()) || StringUtils.isNotEmpty(babyEyeCheck.getR2())) {
  151 + refractometer.append(", ");
  152 + }
  153 + }
  154 + refractometer.append("L:DC( ").append(babyEyeCheck.getL2()).append( " )");
  155 + }
  156 + map.put("refractometer", refractometer.toString());
  157 +
  158 + StringBuilder refraction = new StringBuilder();
  159 + if(StringUtils.isNotEmpty(babyEyeCheck.getRefractionR1())) {
  160 + refraction.append("R:S( ").append(babyEyeCheck.getRefractionR1()).append( " )");
  161 + }
  162 + if(StringUtils.isNotEmpty(babyEyeCheck.getRefractionR2())) {
  163 + if(refraction.length() != 0) {
  164 + refraction.append(" ");
  165 + }
  166 + refraction.append("R:DC( ").append(babyEyeCheck.getRefractionR2()).append( " )");
  167 + }
  168 + boolean flag2 = false;
  169 + if(StringUtils.isNotEmpty(babyEyeCheck.getRefractionL1())) {
  170 + if(refraction.length() != 0) {
  171 + refraction.append(", ");
  172 + flag2 = true;
  173 + }
  174 + refraction.append("L:S( ").append(babyEyeCheck.getRefractionL1()).append( " ) ");
  175 + }
  176 + if(StringUtils.isNotEmpty(babyEyeCheck.getRefractionL2())) {
  177 + if(!flag2) {
  178 + if(StringUtils.isNotEmpty(babyEyeCheck.getRefractionR1()) || StringUtils.isNotEmpty(babyEyeCheck.getRefractionR2())) {
  179 + refraction.append(", ");
  180 + }
  181 + }
  182 + refraction.append("L:DC( ").append(babyEyeCheck.getRefractionL2()).append( " )");
  183 + }
  184 + map.put("refraction", refraction.toString());
  185 +
  186 + map.put("riskFactorId", riskFactorNames);
119 187 map.put("checkMonthId", CheckMonthEnums.getName(babyEyeCheck.getCheckMonthId()));
120 188 map.put("checkMonth", babyEyeCheck.getCheckMonthId());
121 189 map.put("nextCheckMonthId", babyEyeCheck.getNextCheckMonthId());
122 190  
... ... @@ -127,12 +195,13 @@
127 195 map.put("pupillaryRightReflex", parseYinYang(babyEyeCheck.getPupillaryRightReflex()));
128 196 map.put("pupillaryLeftReflex", parseYinYang(babyEyeCheck.getPupillaryLeftReflex()));
129 197 map.put("redRightReflex", parseYinYang(babyEyeCheck.getRedRightReflex()));
130   - map.put("eyePositionId", EyePositionEnums.getName(babyEyeCheck.getEyePositionId()));
  198 + map.put("eyePositionId", EyePositionEnums.getName(babyEyeCheck.getEyePositionId()) + (StringUtils.isNotEmpty(babyEyeCheck.getEyePositionOther()) ? ":" + babyEyeCheck.getEyePositionOther() : ""));
131 199 map.put("redLeftReflex", parseYinYang(babyEyeCheck.getRedLeftReflex()));
132 200 map.put("redReflex", parseYinYang(babyEyeCheck.getRedReflex(), babyEyeCheck.getRedReflexOther()));
133 201 map.put("conjunctiva", parseYinYang(babyEyeCheck.getConjunctiva(), babyEyeCheck.getConjunctivaOther()));
134 202 map.put("corneal", parseYinYang(babyEyeCheck.getCorneal(), babyEyeCheck.getCornealOther()));
135 203 map.put("lacrimalApparatus", parseYinYang(babyEyeCheck.getLacrimalApparatus(), babyEyeCheck.getLacrimalApparatusOther()));
  204 + //
136 205 CollectionUtils.removeNullValue(map);
137 206 return RespBuilder.buildSuccess(map);
138 207 }
... ... @@ -361,7 +430,7 @@
361 430 return RespBuilder.buildSuccess();
362 431 }
363 432 List<BabyEyeCheck> babyEyeChecks = mongoTemplate.find(Query.query(Criteria.where("babyId").is(babyId).and("hospitalId").in(hospitalIds).and("yn").ne("0"))
364   - .with(new Sort(Sort.Direction.DESC, "checkTime")), BabyEyeCheck.class);
  433 + .with(new Sort(Sort.Direction.ASC, "checkTime")), BabyEyeCheck.class);
365 434 List<Map<String, Object>> rest = new ArrayList<>();
366 435 for (BabyEyeCheck babyEyeCheck : babyEyeChecks) {
367 436 Map<String, Object> temp = new HashMap<>();
... ... @@ -385,7 +454,7 @@
385 454  
386 455 @Override
387 456 public BaseResponse listInit() {
388   - List<Map<String, Object>> checkMonth = EnumUtil.toJson(CheckMonthEnums.class); /** 检查月龄 */
  457 + List<Map<String, Object>> checkMonth = EnumUtil.toJson(CheckMonthEnums2.class); /** 检查月龄 */
389 458 List<Map<String, Object>> positive = new ArrayList<>(); /** 阳性项目 */
390 459  
391 460 Map<String, Object> extEyelookMap = new HashMap<>();