Commit fecfd9159283fdeb962586a90d16c25b52af97f3

Authored by litao@lymsh.com
1 parent 4549ec69d1

修复

Showing 2 changed files with 18 additions and 2 deletions

platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/BasicConfigService.java View file @ fecfd91
... ... @@ -66,6 +66,7 @@
66 66 Map<String, Object> temp = new HashMap<>();
67 67 temp.put("id", basicConfig.getId());
68 68 temp.put("name", basicConfig.getName());
  69 + list.add(temp);
69 70 }
70 71 return list;
71 72 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BabyEyePatientServiceImpl.java View file @ fecfd91
1 1 package com.lyms.platform.operate.web.service.impl;
2 2  
3 3 import com.lyms.platform.biz.service.BasicConfigService;
  4 +import com.lyms.platform.common.enums.FmTypeEnums;
4 5 import com.lyms.platform.common.enums.ServiceStatusEnums;
5 6 import com.lyms.platform.common.enums.ServiceTypeEnums;
6 7 import com.lyms.platform.common.enums.SexEnum;
... ... @@ -12,6 +13,7 @@
12 13 import com.lyms.platform.operate.web.facade.BasicConfigFacade;
13 14 import com.lyms.platform.operate.web.result.BasicConfigResult;
14 15 import com.lyms.platform.operate.web.service.BabyEyePatientService;
  16 +import com.lyms.platform.operate.web.utils.MongoUtil;
15 17 import com.lyms.platform.permission.dao.master.BabyEyePatientMapper;
16 18 import com.lyms.platform.pojo.BabyEyePatient;
17 19 import com.lyms.platform.pojo.BabyModel;
18 20  
19 21  
20 22  
21 23  
... ... @@ -49,19 +51,29 @@
49 51 @Autowired
50 52 private BasicConfigFacade basicConfigFacade;
51 53  
  54 + @Autowired
  55 + private MongoUtil mongoUtil;
  56 +
52 57 @Override
53 58 public BaseObjectResponse init() {
54   - List<Map<String, Object>> sex = EnumUtil.toJson(SexEnum.class);
  59 + List<Map<String, Object>> sex = EnumUtil.toJson(SexEnum.class, "id", "text");
55 60 List<BasicConfigResult> pcerteTypeResult = basicConfigFacade.getBaseicConfigByParentId(SystemConfig.CERTE_TYPE_ID); /** 证件类型 */
56 61 List<BasicConfigResult> plevelType = basicConfigFacade.getBaseicConfigByParentId(SystemConfig.LEVEL_TYPE_ID);; /** 文化程度 */
57 62 List<BasicConfigResult> professionTypeResults = basicConfigFacade.getBaseicConfigByParentId(SystemConfig.PROFESSION_TYPE_ID); /** 职业类别 */
58 63 List serviceType = ServiceTypeEnums.getServiceTypeList(); /** 服务类型 */
59 64 List serviceStatus = ServiceStatusEnums.getServiceStatusList(); /** 服务状态 */
60 65 List<Map<String, Object>> nation = basicConfigService.getEnumByParentId(SystemConfig.NATION_TYPE_ID); /** 民族 */
  66 + List fmType = FmTypeEnums.getFmTypeEnums(); /** 分娩方式 */
61 67 return RespBuilder.buildSuccess("sex", sex, "cardType", pcerteTypeResult, "plevelType", plevelType, "profession", professionTypeResults, "serviceType", serviceType,
62   - "serviceStatus", serviceStatus, "nation", nation);
  68 + "serviceStatus", serviceStatus, "nation", nation, "fmType", fmType);
63 69 }
64 70  
  71 + public static void main(String[] args) {
  72 +
  73 + List<Map<String, Object>> sex = EnumUtil.toJson(SexEnum.class, "id", "text");
  74 + System.out.println(sex);
  75 + }
  76 +
65 77 @Override
66 78 public BaseResponse addOrUpdate(Integer userId, BabyEyePatient babyEyePatient) {
67 79 if(StringUtils.isEmpty(babyEyePatient.getId())) {
... ... @@ -90,6 +102,9 @@
90 102 restMap.put("name", babyEyePatient.getName());
91 103 restMap.put("sex", StringUtils.isEmpty(babyEyePatient.getSex()) ? "" : SexEnum.getTextById(Integer.parseInt(babyEyePatient.getSex())));
92 104 restMap.put("cardNo", babyEyePatient.getCardNo());
  105 + restMap.put("nationId", mongoUtil.findName(babyEyePatient.getNationId()));
  106 + restMap.put("", babyEyePatient.getBirth());
  107 +// restMap.put("", babyEyePatient.);
93 108 // restMap.put("", babyEyePatient.);
94 109 // restMap.put("", babyEyePatient.);
95 110 // restMap.put("", babyEyePatient.);