diff --git a/platform-biz-patient-service/src/main/java/com/lyms/platform/biz/BasicConfigServiceTest.java b/platform-biz-patient-service/src/main/java/com/lyms/platform/biz/BasicConfigServiceTest.java index e17a566..bd32cf5 100644 --- a/platform-biz-patient-service/src/main/java/com/lyms/platform/biz/BasicConfigServiceTest.java +++ b/platform-biz-patient-service/src/main/java/com/lyms/platform/biz/BasicConfigServiceTest.java @@ -6069,7 +6069,7 @@ public class BasicConfigServiceTest { /** * 诊断因素 */ - /*public static void zdyinshu(String fileName) { + public static void zdyinshu(String fileName) { ApplicationContext applicationContext = new ClassPathXmlApplicationContext("classpath:/spring/applicationContext_biz_patient1.xml"); MongoTemplate mongoTemplate = (MongoTemplate) applicationContext.getBean("mongoTemplate"); @@ -6079,6 +6079,7 @@ public class BasicConfigServiceTest { try { wb = Workbook.getWorkbook(file); + Sheet s = wb.getSheet(0); System.out.println(s.getName() + " : "); int rows = s.getRows(); @@ -6087,7 +6088,6 @@ public class BasicConfigServiceTest { for (int i = 1; i < rows; i++) { System.out.println("rows=" + i); DiagnosisTestModel weightConfigModel = new DiagnosisTestModel(); - Cell[] cells = s.getRow(i); if (cells.length > 0) { for (int j = 0; j < cells.length; j++) { @@ -6108,7 +6108,8 @@ public class BasicConfigServiceTest { } catch (Exception e) { e.printStackTrace(); } - }*/ + } + public static void main(String[] args) { //weightWeek("F:\\体重与营养管理\\体重与营养管理第三版(北方)改标红“、冰淇淋”-晓萌.xls"); // weightMange("F:\\体重与营养管理\\体重与营养管理第三版(北方)改标红“、冰淇淋”-晓萌.xls"); @@ -6133,7 +6134,7 @@ public class BasicConfigServiceTest { //dietaryIntake("F:\\膳食摄入量推荐.xls"); - //zdyinshu("F:\\诊断因素.xls"); + zdyinshu("F:\\诊断因素.xls"); //saveQhdbabyDiaginose("F:\\承德工位\\秦皇岛儿童诊断 - 副本.xls"); diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/MatDeliverController.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/MatDeliverController.java index 5c3460d..badc2e6 100644 --- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/MatDeliverController.java +++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/MatDeliverController.java @@ -2,11 +2,13 @@ package com.lyms.platform.operate.web.controller; import com.lyms.platform.biz.service.AntenatalExaminationService; import com.lyms.platform.biz.service.BasicConfigService; +import com.lyms.platform.biz.service.CommonService; import com.lyms.platform.biz.service.PatientsService; import com.lyms.platform.common.annotation.TokenRequired; import com.lyms.platform.common.base.BaseController; import com.lyms.platform.common.base.LoginContext; import com.lyms.platform.common.constants.ErrorCodeConstants; +import com.lyms.platform.common.enums.RiskDefaultTypeEnum; import com.lyms.platform.common.enums.YnEnums; import com.lyms.platform.common.result.BaseListResponse; import com.lyms.platform.common.result.BaseObjectResponse; @@ -48,6 +50,9 @@ public class MatDeliverController extends BaseController { private MatDeliverFacade matDeliverFacade; @Autowired + private CommonService commonService; + + @Autowired private CouponService couponService; @Autowired private AutoMatchFacade autoMatchFacade; @@ -391,9 +396,8 @@ public class MatDeliverController extends BaseController { } } - if ("2100001635".equals(hospitalId)) - { - map.put("mphone",newBabyManagerQueryModel.getNoEphone()); + if ("2100001635".equals(hospitalId)) { + map.put("mphone", newBabyManagerQueryModel.getNoEphone()); } Integer deformity = newBabyManagerQueryModel.getDeformity(); @@ -422,7 +426,30 @@ public class MatDeliverController extends BaseController { HighScoreResult highScoreResult = antenatalExaminationFacade.findLastRisk(patients.getPid(), false); //妊娠期高危因素 map.put("risk", highScoreResult.gethighRiskStr()); - + StringBuilder riskLevel = new StringBuilder(); + if (StringUtils.isNotEmpty(patients.getRiskLevelId())) { + List lists = JsonUtil.jkstr2Obj(patients.getRiskLevelId(), List.class); + if (CollectionUtils.isNotEmpty(lists)) { + for (String level : lists) { + if ("e637b361-99cf-41eb-84f2-f0dab596e928".equals(level)) { + riskLevel.append("绿色,"); + } else if ("eb146c03-b19f-4e28-b85f-fda574b2283b".equals(level)) { + riskLevel.append("红色,"); + } else if ("49a36aea-c5b6-4162-87d2-9eb3c6ec00c2".equals(level)) { + riskLevel.append("橙色,"); + } else if ("315107bd-91fe-42a1-9237-752f3c046a40".equals(level)) { + riskLevel.append("黄色,"); + } else if ("224b2329-cb82-4da3-a071-8527f8283aab".equals(level)) { + riskLevel.append("紫色,"); + } + } + } + } + if (riskLevel.length() > 0 && !"null".equals(riskLevel.toString()) && !"".equals(riskLevel.toString())) { + map.put("riskLevel", riskLevel.substring(0, riskLevel.length() - 1)); + } else { + map.put("riskLevel", ""); + } map.put("husbandName", patients.getHusbandName() == null ? "" : patients.getHusbandName()); map.put("husbandPhone", patients.getHusbandPhone() == null ? "" : patients.getHusbandPhone()); @@ -465,6 +492,7 @@ public class MatDeliverController extends BaseController { header.put("addressRegister", "产妇户籍地"); header.put("liveAddress", "居住地"); header.put("postRest", "产后休养地址"); + header.put("riskLevel", "妊娠风险评估五色分级情况"); header.put("risk", "妊娠期高危因素"); header.put("mphone", "联系方式"); header.put("mcertNo", "母亲证件号");