From 79d4e8d29010d6a6bfaf579ea61c1ae87f1577ae Mon Sep 17 00:00:00 2001 From: yangfei Date: Fri, 25 Aug 2017 17:02:06 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=AC=E5=8A=9B=E8=AF=8A=E6=96=AD=E6=A8=A1?= =?UTF-8?q?=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../model/BabyPatientExtendEarBirth.java | 8 +- .../mainOrm/master/BabyPatientExtendEarBirth.xml | 12 +-- .../platform/operate/web/facade/BabyEarFacade.java | 87 +++++++++++++--------- .../platform/operate/web/request/BabyEarBase.java | 3 +- 4 files changed, 64 insertions(+), 46 deletions(-) diff --git a/platform-biz-service/src/main/java/com/lyms/platform/permission/model/BabyPatientExtendEarBirth.java b/platform-biz-service/src/main/java/com/lyms/platform/permission/model/BabyPatientExtendEarBirth.java index ceba603..5bfcd75 100644 --- a/platform-biz-service/src/main/java/com/lyms/platform/permission/model/BabyPatientExtendEarBirth.java +++ b/platform-biz-service/src/main/java/com/lyms/platform/permission/model/BabyPatientExtendEarBirth.java @@ -31,7 +31,7 @@ public class BabyPatientExtendEarBirth { /** * 分娩方式 */ - private Integer parturitionType; + private String parturitionType; /** * 出生缺陷类型: 1=有 -1=无 @@ -232,13 +232,15 @@ public class BabyPatientExtendEarBirth { public void setBirthWeight(BigDecimal birthWeight) { this.birthWeight = birthWeight; } - public Integer getParturitionType() { + + public String getParturitionType() { return parturitionType; } - public void setParturitionType(Integer parturitionType) { + public void setParturitionType(String parturitionType) { this.parturitionType = parturitionType; } + public Integer getBirthDefectType() { return birthDefectType; } diff --git a/platform-biz-service/src/main/resources/mainOrm/master/BabyPatientExtendEarBirth.xml b/platform-biz-service/src/main/resources/mainOrm/master/BabyPatientExtendEarBirth.xml index 0c15cca..bdadf7c 100644 --- a/platform-biz-service/src/main/resources/mainOrm/master/BabyPatientExtendEarBirth.xml +++ b/platform-biz-service/src/main/resources/mainOrm/master/BabyPatientExtendEarBirth.xml @@ -8,7 +8,7 @@ - + @@ -64,8 +64,8 @@ insert into baby_patient_extend_ear_birth (id,fetu_number,product_number,birth_w birth_weight = #{birthWeight,jdbcType=DOUBLE}, - - parturition_type = #{parturitionType,jdbcType=INTEGER}, + + parturition_type = #{parturitionType,jdbcType=VARCHAR}, birth_defect_type = #{birthDefectType,jdbcType=INTEGER}, @@ -208,8 +208,8 @@ select id,fetu_number,product_number,birth_weight,parturition_type,birth_defect_ and birth_weight = #{birthWeight,jdbcType=DOUBLE} - - and parturition_type = #{parturitionType,jdbcType=INTEGER} + + and parturition_type = #{parturitionType,jdbcType=VARCHAR} and birth_defect_type = #{birthDefectType,jdbcType=INTEGER} @@ -238,7 +238,7 @@ select id,fetu_number,product_number,birth_weight,parturition_type,birth_defect_ and amniotic_fluid_type = #{amnioticFluidType,jdbcType=INTEGER} - + and abnormal_parturition_type = #{abnormalParturitionType,jdbcType=INTEGER} diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyEarFacade.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyEarFacade.java index aa62a0d..94b0464 100644 --- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyEarFacade.java +++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyEarFacade.java @@ -685,16 +685,22 @@ public class BabyEarFacade { int yesOrNo = historyJson.getIntValue("yesOrNo"); if (yesOrNo == 1) { historyStr.append("有("); - if (historyJson.containsKey("type")) { - String type = historyJson.getString("type"); - if ("yinJiu".equals(type)) { + if (historyJson.containsKey("yinJiu")) { + boolean yinJiu = historyJson.getBoolean("yinJiu"); + if (yinJiu) { historyStr.append("饮酒、"); } - if ("xiYan".equals(type)) { + } + if (historyJson.containsKey("xiYan")) { + boolean xiYan = historyJson.getBoolean("xiYan"); + if (xiYan) { historyStr.append("吸烟、"); } - if ("xiDu".equals(type)) { - historyStr.append("吸毒"); + } + if (historyJson.containsKey("xiDu")) { + boolean xiDu = historyJson.getBoolean("xiDu"); + if (xiDu) { + historyStr.append("吸毒、"); } } historyStr.append(")"); @@ -927,19 +933,25 @@ public class BabyEarFacade { historyStr.append("无"); } } - if (historyJson.containsKey("type")) { - String type = historyJson.getString("type"); - if ("yinJiu".equals(type)) { + if (historyJson.containsKey("yinJiu")) { + boolean yinJiu = historyJson.getBoolean("yinJiu"); + if (yinJiu) { historyStr.append("饮酒、"); } - if ("xiYan".equals(type)) { + } + if (historyJson.containsKey("xiYan")) { + boolean xiYan = historyJson.getBoolean("xiYan"); + if (xiYan) { historyStr.append("吸烟、"); } - if ("xiDu".equals(type)) { - historyStr.append("吸毒"); + } + if (historyJson.containsKey("xiDu")) { + boolean xiDu = historyJson.getBoolean("xiDu"); + if (xiDu) { + historyStr.append("吸毒、"); } - historyStr.append(")"); } + historyStr.append(")"); babyEarMotherView.setBadLifeHistoryType(historyStr.toString()); } @@ -956,10 +968,16 @@ public class BabyEarFacade { } } + if (historyJson.containsKey("tnb")) { + boolean sy = historyJson.getBooleanValue("tnb"); + if (sy) { + historyStr.append("糖尿病、"); + } + } if (historyJson.containsKey("sy")) { boolean sy = historyJson.getBooleanValue("sy"); if (sy) { - historyStr.append("肾炎"); + historyStr.append("肾炎、"); } } if (historyJson.containsKey("jzxgnjt")) { @@ -1039,21 +1057,20 @@ public class BabyEarFacade { */ public BabyEarBirthView convertToBabyEarBirthView(BabyPatientExtendEarBirth babyPatientExtendEarBirth) { BabyEarBirthView babyEarBirthView = new BabyEarBirthView(); - babyEarBirthView.setFetuNumber(babyPatientExtendEarBirth.getFetuNumber() == null ? "" : babyPatientExtendEarBirth.getFetuNumber() + ""); - babyEarBirthView.setProductNumber(babyPatientExtendEarBirth.getProductNumber() == null ? "" : babyPatientExtendEarBirth.getProductNumber() + ""); + babyEarBirthView.setFetuNumber(babyPatientExtendEarBirth.getFetuNumber() == null ? "" : babyPatientExtendEarBirth.getFetuNumber() + "次"); + babyEarBirthView.setProductNumber(babyPatientExtendEarBirth.getProductNumber() == null ? "" : babyPatientExtendEarBirth.getProductNumber() + "次"); babyEarBirthView.setBirthWeight(babyPatientExtendEarBirth.getBirthWeight()); - babyEarBirthView.setProductNumber(babyPatientExtendEarBirth.getProductNumber() == null ? "" : babyPatientExtendEarBirth.getProductNumber() + ""); babyEarBirthView.setBirthWeight(babyPatientExtendEarBirth.getBirthWeight()); if (babyPatientExtendEarBirth.getParturitionType() != null) { - String parturitionType = CZFmTypeEnums.getTitle(babyPatientExtendEarBirth.getParturitionType()); + String parturitionType = FmTypeEnums.getIdByName(babyPatientExtendEarBirth.getParturitionType()); babyEarBirthView.setParturitionType(parturitionType); } - if(babyPatientExtendEarBirth.getAmnioticFluidType()!=null){ - if(babyPatientExtendEarBirth.getAmnioticFluidType() == 1){ //1= I度 2=II度 3=III度 + if (babyPatientExtendEarBirth.getAmnioticFluidType() != null) { + if (babyPatientExtendEarBirth.getAmnioticFluidType() == 1) { //1= I度 2=II度 3=III度 babyEarBirthView.setAmnioticFluid("I度"); - }else if(babyPatientExtendEarBirth.getAmnioticFluidType() == 2){ //1= I度 2=II度 3=III度 + } else if (babyPatientExtendEarBirth.getAmnioticFluidType() == 2) { //1= I度 2=II度 3=III度 babyEarBirthView.setAmnioticFluid("II度"); - }else if(babyPatientExtendEarBirth.getAmnioticFluidType() == 2){ //1= I度 2=II度 3=III度 + } else if (babyPatientExtendEarBirth.getAmnioticFluidType() == 2) { //1= I度 2=II度 3=III度 babyEarBirthView.setAmnioticFluid("III度"); } } @@ -1066,22 +1083,22 @@ public class BabyEarFacade { parturitType = "有("; if (StringUtils.isNotEmpty(babyPatientExtendEarBirth.getAbnormalParturitionPosition())) {//异常分娩部位 1=臀部 2=脐带绕颈 3=胎膜早破 JSONObject positionJo = JSONObject.parseObject(babyPatientExtendEarBirth.getAbnormalParturitionPosition()); - if(positionJo.containsKey("tw")){ - if(positionJo.getBoolean("tw")){ - parturitType+="臀部、"; + if (positionJo.containsKey("tw")) { + if (positionJo.getBoolean("tw")) { + parturitType += "臀部、"; } } - if(positionJo.containsKey("qdrj")){ - if(positionJo.getBoolean("qdrj")){ - parturitType+="脐带绕颈、"; + if (positionJo.containsKey("qdrj")) { + if (positionJo.getBoolean("qdrj")) { + parturitType += "脐带绕颈、"; } } - if(positionJo.containsKey("tmzp")){ - if(positionJo.getBoolean("tmzp")){ - parturitType+="胎膜早破、"; + if (positionJo.containsKey("tmzp")) { + if (positionJo.getBoolean("tmzp")) { + parturitType += "胎膜早破、"; } } - parturitType+=")"; + parturitType += ")"; // if (babyPatientExtendEarBirth.getAbnormalParturitionPosition() == 1) { // parturitType = "有(臀部)"; // } else if (babyPatientExtendEarBirth.getAbnormalParturitionPosition() == 2) { @@ -1576,7 +1593,7 @@ public class BabyEarFacade { screenQuery.setCheckHospitalIds(checkHospitalIds); //如果查询号不为空,根据查询号查询儿童档案表,获取儿童档案Id - if (StringUtils.isNotEmpty(earScreenListRequest.getKeyWord())||earScreenListRequest.getBirthStartTime()!=null||earScreenListRequest.getBirthEndTime()!=null) {//关键字:姓名、联系方式、就诊卡 查询babyId + if (StringUtils.isNotEmpty(earScreenListRequest.getKeyWord()) || earScreenListRequest.getBirthStartTime() != null || earScreenListRequest.getBirthEndTime() != null) {//关键字:姓名、联系方式、就诊卡 查询babyId BabyModelQuery babyQuery = new BabyModelQuery(); babyQuery.setQueryNo(earScreenListRequest.getKeyWord()); babyQuery.setBirthStart(earScreenListRequest.getBirthStartTime()); @@ -1623,10 +1640,10 @@ public class BabyEarFacade { screenResult.setHighRiskCause(hfBuff.toString()); } String srcResult = "通过"; - if ((earScreen.getAabrLeft() != null && earScreen.getAabrLeft() == -1 )|| (earScreen.getOaeLeft() != null && earScreen.getOaeLeft() == -1)) { + if ((earScreen.getAabrLeft() != null && earScreen.getAabrLeft() == -1) || (earScreen.getOaeLeft() != null && earScreen.getOaeLeft() == -1)) { srcResult = "不通过"; } - if ((earScreen.getOaeRight() != null && earScreen.getOaeRight() == -1)|| (earScreen.getAabrRight() != null && earScreen.getAabrRight() == -1)) { + if ((earScreen.getOaeRight() != null && earScreen.getOaeRight() == -1) || (earScreen.getAabrRight() != null && earScreen.getAabrRight() == -1)) { srcResult = "不通过"; } screenResult.setSrcResult(srcResult); diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/BabyEarBase.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/BabyEarBase.java index 6463dec..c032b70 100644 --- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/BabyEarBase.java +++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/BabyEarBase.java @@ -4,7 +4,6 @@ import com.lyms.platform.common.base.IBasicRequestConvert; import com.lyms.platform.common.utils.DateUtil; import com.lyms.platform.pojo.BabyModel; -import java.util.Date; import java.util.List; /** @@ -183,7 +182,7 @@ public class BabyEarBase implements IBasicRequestConvert { babyModel.setServiceType(serviceType); babyModel.setServiceStatus(serviceStatus); babyModel.setBuildDoctor(createUserId); - babyModel.setBuildDate(new Date()); + babyModel.setBuildDate(DateUtil.parseDate(createTime)); babyModel.setBirth(DateUtil.parseYMD(birth)); babyModel.setCardNo(cardNo); babyModel.setName(name); -- 1.8.3.1