Commit d4276699fb0ac2d55afecc8cfe66c47ea184b2d1
1 parent
7380c8e598
Exists in
master
and in
6 other branches
update
Showing 3 changed files with 64 additions and 3 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
View file @
d427669
... | ... | @@ -1091,8 +1091,11 @@ |
1091 | 1091 | bm.setCreated(new Date()); |
1092 | 1092 | } |
1093 | 1093 | |
1094 | + // 编码,新增时候增加修改不做处理 | |
1095 | + if(StringUtils.isEmpty(b.getId())){ | |
1096 | + bm.setEncoded(getEncodedUtil()); | |
1097 | + } | |
1094 | 1098 | //新生儿民族Id |
1095 | - bm.setEncoded(getEncodedUtil());// 编码 | |
1096 | 1099 | bm.setBnationId(b.getBnationId());//新生儿民族Id |
1097 | 1100 | |
1098 | 1101 | bm.setLiveType(b.getLiveType()); |
... | ... | @@ -1325,7 +1328,7 @@ |
1325 | 1328 | return DateUtil.getDateNumber(encoded); |
1326 | 1329 | } |
1327 | 1330 | } |
1328 | - return DateUtil.getDateNumber(""); | |
1331 | + return DateUtil.getDateNumber("0"); | |
1329 | 1332 | } catch (Exception e) { |
1330 | 1333 | e.printStackTrace(); |
1331 | 1334 | } |
... | ... | @@ -1427,6 +1430,9 @@ |
1427 | 1430 | */ |
1428 | 1431 | private BabyBuildResult getBabyBuildResult(BabyModel model) { |
1429 | 1432 | BabyBuildResult result = new BabyBuildResult(); |
1433 | + result.setEncoded(model.getEncoded());//儿童建档编码 | |
1434 | + result.setBnationId(model.getBnationId());//儿童民族 | |
1435 | + | |
1430 | 1436 | result.setLiveType(model.getLiveType()); |
1431 | 1437 | result.setYn(model.getYn()); |
1432 | 1438 | result.setDataStatus(model.getDataStatus()); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/BabyBuildResult.java
View file @
d427669
... | ... | @@ -69,7 +69,10 @@ |
69 | 69 | private String fatherProfessionTypeId; |
70 | 70 | |
71 | 71 | /***********儿童信息***********/ |
72 | - | |
72 | + // 编码唯一,通过编码获取档案信息,编码格式20200721001 | |
73 | + private String encoded; | |
74 | + //新生儿民族Id | |
75 | + private String bnationId; | |
73 | 76 | //儿童名称 |
74 | 77 | private String babyName; |
75 | 78 | |
... | ... | @@ -345,6 +348,21 @@ |
345 | 348 | this.babyHighRiskReason = babyHighRiskReason; |
346 | 349 | } |
347 | 350 | |
351 | + public String getEncoded() { | |
352 | + return encoded; | |
353 | + } | |
354 | + | |
355 | + public void setEncoded(String encoded) { | |
356 | + this.encoded = encoded; | |
357 | + } | |
358 | + | |
359 | + public String getBnationId() { | |
360 | + return bnationId; | |
361 | + } | |
362 | + | |
363 | + public void setBnationId(String bnationId) { | |
364 | + this.bnationId = bnationId; | |
365 | + } | |
348 | 366 | |
349 | 367 | public List<PatientSerResult> getPatientSerResults() { |
350 | 368 | return patientSerResults; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/BabyPageResult.java
View file @
d427669
1 | 1 | package com.lyms.platform.operate.web.result; |
2 | 2 | |
3 | +import com.lyms.platform.biz.service.BasicConfigService; | |
3 | 4 | import com.lyms.platform.common.base.IBasicResultConvert; |
4 | 5 | import com.lyms.platform.common.enums.FmTypeEnums; |
5 | 6 | import com.lyms.platform.common.enums.ServiceStatusEnums; |
... | ... | @@ -10,6 +11,8 @@ |
10 | 11 | import com.lyms.platform.common.utils.StringUtils; |
11 | 12 | import com.lyms.platform.operate.web.utils.UnitConstants; |
12 | 13 | import com.lyms.platform.pojo.BabyModel; |
14 | +import com.lyms.platform.pojo.BasicConfig; | |
15 | +import org.springframework.beans.factory.annotation.Autowired; | |
13 | 16 | |
14 | 17 | import java.util.Date; |
15 | 18 | import java.util.List; |
... | ... | @@ -39,6 +42,11 @@ |
39 | 42 | //儿童名称 |
40 | 43 | private String babyName; |
41 | 44 | |
45 | + // 编码唯一,通过编码获取档案信息,编码格式20200721001 | |
46 | + private String encoded; | |
47 | + //新生儿民族Id | |
48 | + private String bnationId; | |
49 | + | |
42 | 50 | //儿童性别 |
43 | 51 | private String sex; |
44 | 52 | |
45 | 53 | |
... | ... | @@ -341,7 +349,22 @@ |
341 | 349 | } |
342 | 350 | |
343 | 351 | |
352 | + public String getEncoded() { | |
353 | + return encoded; | |
354 | + } | |
344 | 355 | |
356 | + public void setEncoded(String encoded) { | |
357 | + this.encoded = encoded; | |
358 | + } | |
359 | + | |
360 | + public String getBnationId() { | |
361 | + return bnationId; | |
362 | + } | |
363 | + | |
364 | + public void setBnationId(String bnationId) { | |
365 | + this.bnationId = bnationId; | |
366 | + } | |
367 | + | |
345 | 368 | public List<String> getmHighRiskReason() { |
346 | 369 | return mHighRiskReason; |
347 | 370 | } |
... | ... | @@ -987,6 +1010,8 @@ |
987 | 1010 | @Override |
988 | 1011 | public BabyPageResult convertToResult(BabyModel destModel) { |
989 | 1012 | List<String> list = destModel.getmHighRiskReason(); |
1013 | + setEncoded(destModel.getEncoded()); | |
1014 | + setBnationId(destModel.getBnationId() == null ? "" : getBasicConfig(destModel.getBnationId()));//民族 | |
990 | 1015 | setId(destModel.getId()); |
991 | 1016 | setPid(destModel.getPid()); |
992 | 1017 | setBabyName(destModel.getName()); |
... | ... | @@ -1106,6 +1131,18 @@ |
1106 | 1131 | |
1107 | 1132 | public void setCouponCode(String couponCode) { |
1108 | 1133 | this.couponCode = couponCode; |
1134 | + } | |
1135 | + @Autowired | |
1136 | + private BasicConfigService basicConfigService; | |
1137 | + private String getBasicConfig(String id) { | |
1138 | + if (com.lyms.platform.common.utils.StringUtils.isEmpty(id)) { | |
1139 | + return ""; | |
1140 | + } | |
1141 | + BasicConfig basicConfig = basicConfigService.getOneBasicConfigById(id); | |
1142 | + if (null != basicConfig) { | |
1143 | + return basicConfig.getName(); | |
1144 | + } | |
1145 | + return ""; | |
1109 | 1146 | } |
1110 | 1147 | } |