Commit bceeabbae56c5c67becb01156780493425da190f

Authored by landong2015
1 parent b87cda8046

修改返回字段

Showing 3 changed files with 39 additions and 55 deletions

platform-common/src/main/java/com/lyms/platform/common/enums/CfEnums.java View file @ bceeabb
... ... @@ -11,6 +11,19 @@
11 11 this.id=id;
12 12 this.name=name;
13 13 }
  14 +
  15 + public static String getTitle(Integer id){
  16 + if (id==null){
  17 + return "";
  18 + }
  19 + for (CfEnums cfEnums:CfEnums.values()){
  20 + if (id.equals(cfEnums.getId())){
  21 + return cfEnums.getName();
  22 + }
  23 + }
  24 + return "";
  25 + }
  26 +
14 27 private String id;
15 28 private String name;
16 29  
platform-common/src/main/java/com/lyms/platform/common/enums/StopPregEnums.java View file @ bceeabb
... ... @@ -20,6 +20,18 @@
20 20 this.name = name;
21 21 }
22 22  
  23 + public static String getTitle(Integer id){
  24 + if (id==null){
  25 + return "";
  26 + }
  27 + for (StopPregEnums stopPregEnums:StopPregEnums.values()){
  28 + if (id.equals(stopPregEnums.getId())){
  29 + return stopPregEnums.getName();
  30 + }
  31 + }
  32 + return "";
  33 + }
  34 +
23 35 private int id;
24 36 private String name;
25 37  
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ViewFacade.java View file @ bceeabb
... ... @@ -235,57 +235,17 @@
235 235 map.put("birth", DateUtil.getyyyy_MM_dd(patients.getBirth()));
236 236 map.put("age",UnitUtils.unitSplice(DateUtil.getAge(patients.getBirth()),UnitConstants.SUI));
237 237 map.put("phone",patients.getPhone());
238   - map.put("fmWeek",patients.getFmWeek());
  238 + map.put("fmWeek",patients.getFmWeek()==null ? "": com.lyms.platform.common.utils.StringUtils.dueWeek(patients.getFmWeek()));
239 239 map.put("dueDate",DateUtil.getyyyy_MM_dd(patients.getDueDate()));
240 240 map.put("mremark",patients.getMremark());
241 241  
242 242 //处理高危因素
243 243 getRisk(data.getHighrisk(),data.getOtherHighRisk(),map);
244   -// HighScoreResult highScoreResult = null;
245   -// if (StringUtils.isNotEmpty(data.getHighrisk())){
246   -// List<String> ids = JsonUtil.toList(data.getHighrisk(), String.class);
247   -// if (CollectionUtils.isNotEmpty(ids)){
248   -// highScoreResult = ResolveUtils.queryRisk(ids, true, basicConfigService);
249   -// }
250   -// }
251   -// Integer score = 0;
252   -// if (highScoreResult.getScore()!=null){
253   -// score = highScoreResult.getScore();
254   -// }
255   -//
256   -// List<Map<String, Object>> list = ResolveUtils.queryHighRisk(highScoreResult);
257   -//
258   -// Map<String,Object> otherRisk = null;
259   -// if (StringUtils.isNotEmpty(data.getOtherHighRisk()) && !"{}".equals(data.getOtherHighRisk())){
260   -// otherRisk = new HashMap<>();
261   -// ResolveUtils.queryOtherRisk(data.getOtherHighRisk(),otherRisk,basicConfigService);
262   -// }
263   -//
264   -// Map<String,Object> otherMap = new HashMap<>();
265   -//
266   -// if (otherRisk!=null){
267   -// if (otherRisk.get("name")!=null){
268   -// otherMap.put("name",otherRisk.get("name"));
269   -// }
270   -// if (otherRisk.get("color")!=null){
271   -// otherMap.put("color",otherRisk.get("color"));
272   -// }
273   -// if (otherRisk.get("score")!=null){
274   -// String s = (String)otherRisk.get("score");
275   -// if (FunvCommonUtil.isNumeric(s)){
276   -// score = score + Integer.parseInt(s);
277   -// }
278   -// }
279   -// list.add(otherMap);
280   -// }
281   -//
282   -// map.put("score",score);
283   -// map.put("highRisk",list);
284 244  
285 245 //产检基本信息
286 246 map.put("checkDate",DateUtil.getyyyy_MM_dd(data.getCheckTime()));
287 247 //产检孕周
288   - map.put("cDueWeek",data.getcDueWeek());
  248 + map.put("cDueWeek",data.getcDueWeek()==null ? "": com.lyms.platform.common.utils.StringUtils.dueWeek(Integer.parseInt(data.getcDueWeek())));
289 249 String checkDoctor = "";
290 250  
291 251 if (org.apache.commons.lang.StringUtils.isNotEmpty(data.getProdDoctor())){
... ... @@ -304,8 +264,6 @@
304 264 }
305 265 map.put("hospital", hospital);
306 266 map.put("nextCheckTime",DateUtil.getyyyy_MM_dd(data.getNextCheckTime()));
307   - map.put("cDueWeek", data.getcDueWeek());
308   -
309 267 /* 初诊信息 */
310 268 //既往史
311 269 String pastHistory = "";
... ... @@ -448,7 +406,7 @@
448 406 }
449 407 Map<String,Object> placetaMap = new HashMap<>();
450 408 placetaMap.put("fetalPosition",fetalPosition);
451   - placetaMap.put("fetalPresentation",fetalPresentation);
  409 + placetaMap.put("fetalPresentation",FetalEnums.getTitle(fetalPresentation));
452 410 placetaMap.put("heartRate",UnitUtils.unitSplice(heartRate,UnitConstants.CIFEN));
453 411 placetaMap.put("join",JoinEnums.getTitle(join));
454 412 placetaList.add(placetaMap);
... ... @@ -488,6 +446,7 @@
488 446 map.put("xqjq",UnitUtils.unitSplice(data.getXqjq(), UnitConstants.UL));
489 447 map.put("xnsd",UnitUtils.unitSplice(data.getXnsd(), UnitConstants.UL));
490 448  
  449 + map.put("syjg",FunvCommonUtil.checkYiGan(data.getSyjg()));
491 450 map.put("hivkt",FunvCommonUtil.checkYiGan(data.getHivkt()));
492 451  
493 452 String ydfmw = "";
... ... @@ -572,7 +531,7 @@
572 531 map.put("birth",DateUtil.getyyyy_MM_dd(patients.getBirth()));
573 532 map.put("age",UnitUtils.unitSplice(DateUtil.getAge(patients.getBirth()),UnitConstants.SUI));
574 533 map.put("phone",patients.getPhone());
575   - map.put("fmWeek",patients.getFmWeek());
  534 + map.put("fmWeek",patients.getFmWeek()==null ? "": com.lyms.platform.common.utils.StringUtils.dueWeek(patients.getFmWeek()));
576 535 map.put("dueDate",DateUtil.getyyyy_MM_dd(patients.getDueDate()));
577 536 map.put("mremark",patients.getMremark());
578 537  
... ... @@ -615,7 +574,7 @@
615 574 }
616 575 map.put("hospital", hospital);
617 576 map.put("nextCheckTime",DateUtil.getyyyy_MM_dd(data.getNextCheckTime()));
618   - map.put("cDueWeek", data.getcDueWeek());
  577 + map.put("cDueWeek", data.getcDueWeek()==null ? "": com.lyms.platform.common.utils.StringUtils.dueWeek(Integer.parseInt(data.getcDueWeek())));
619 578  
620 579 /* 复诊信息 */
621 580 map.put("chiefComplaint", data.getChiefComplaint());
622 581  
... ... @@ -735,9 +694,9 @@
735 694 map.put("id",data.getId());
736 695 map.put("username",patients.getUsername());
737 696 map.put("birth",DateUtil.getyyyy_MM_dd(patients.getBirth()));
738   - map.put("age",DateUtil.getAge(patients.getBirth()));
  697 + map.put("age",UnitUtils.unitSplice(DateUtil.getAge(patients.getBirth()),UnitConstants.SUI));
739 698 map.put("phone",patients.getPhone());
740   - map.put("fmWeek",patients.getFmWeek());
  699 + map.put("fmWeek",patients.getFmWeek()==null ? "": com.lyms.platform.common.utils.StringUtils.dueWeek(patients.getFmWeek()));
741 700 map.put("dueDate",DateUtil.getyyyy_MM_dd(patients.getDueDate()));
742 701 map.put("mremark",patients.getMremark());
743 702  
... ... @@ -751,7 +710,7 @@
751 710 map.put("riskScore", UnitUtils.unitSplice(patients.getRiskScore(),UnitConstants.FEN));
752 711  
753 712 map.put("deliveryDate", data.getDueDate());
754   - map.put("dueWeek", data.getDueWeek());
  713 + map.put("dueWeek", data.getDueWeek()==null ? "": com.lyms.platform.common.utils.StringUtils.dueWeek(Integer.parseInt(data.getDueWeek())));
755 714  
756 715 String fmHospital = "";
757 716  
... ... @@ -827,7 +786,7 @@
827 786 }
828 787 Map<String,Object> placetaMap = new HashMap<>();
829 788 placetaMap.put("fetalPosition",fetalPosition);
830   - placetaMap.put("fetalPresentation",fetalPresentation);
  789 + placetaMap.put("fetalPresentation",FetalEnums.getTitle(fetalPresentation));
831 790 placetaMap.put("heartRate",UnitUtils.unitSplice(heartRate,UnitConstants.CIFEN));
832 791 placetaList.add(placetaMap);
833 792 }
... ... @@ -875,7 +834,7 @@
875 834 map.put("needleNum", UnitUtils.unitSplice(data.getNeedleNum(),UnitConstants.ZHEN));
876 835  
877 836 /* 产后生理 */
878   - map.put("maternalInfo", data.getMaternalInfo());
  837 + map.put("maternalInfo", data.getMaternalInfo()==null?"":CfEnums.getTitle(Integer.parseInt(data.getMaternalInfo())));
879 838 map.put("deathCause", data.getDeathCause()==null ? "--" : data.getDeathCause());
880 839 // 产后血压 收缩压,舒张压
881 840 String ssy = "";
... ... @@ -975,7 +934,7 @@
975 934 for (MaternalDeliverModel.Baby temp : data.getBaby()){
976 935 Map<String,Object> babyMap = new HashMap<>();
977 936 babyMap.put("dueTime",temp.getDueTime());
978   - babyMap.put("pregnancyOut",temp.getPregnancyOut());
  937 + babyMap.put("pregnancyOut",temp.getPregnancyOut()==null?"" : StopPregEnums.getTitle(Integer.parseInt(temp.getPregnancyOut())));
979 938 babyMap.put("deformity",temp.getDeformity()==null ? "" : temp.getDeformity() == 1 ? "是" : "否");
980 939 babyMap.put("babyGender",temp.getBabyGender() == null ? "" : SexEnum.getTextById(
981 940 Integer.parseInt(temp.getBabyGender())));
... ... @@ -1086,7 +1045,7 @@
1086 1045 map.put("birth",DateUtil.getyyyy_MM_dd(patients.getBirth()));
1087 1046 map.put("age",UnitUtils.unitSplice(DateUtil.getAge(patients.getBirth()),UnitConstants.SUI));
1088 1047 map.put("phone",patients.getPhone());
1089   - map.put("fmWeek",patients.getFmWeek());
  1048 + map.put("fmWeek",patients.getFmWeek()==null ? "": com.lyms.platform.common.utils.StringUtils.dueWeek(patients.getFmWeek()));
1090 1049 map.put("dueDate",DateUtil.getyyyy_MM_dd(patients.getDueDate()));
1091 1050 map.put("mremark",patients.getMremark());
1092 1051 //高危因素
... ... @@ -1214,7 +1173,7 @@
1214 1173 map.put("birth",DateUtil.getyyyy_MM_dd(patients.getBirth()));
1215 1174 map.put("age",UnitUtils.unitSplice(DateUtil.getAge(patients.getBirth()),UnitConstants.SUI));
1216 1175 map.put("phone",patients.getPhone());
1217   - map.put("fmWeek",patients.getFmWeek());
  1176 + map.put("fmWeek",patients.getFmWeek()==null ? "": com.lyms.platform.common.utils.StringUtils.dueWeek(patients.getFmWeek()));
1218 1177 map.put("dueDate",DateUtil.getyyyy_MM_dd(patients.getDueDate()));
1219 1178 map.put("mremark",patients.getMremark());
1220 1179 //高危因素