From 5a9ba6d7c53f73d1f9a63371694fbd3786973261 Mon Sep 17 00:00:00 2001 From: liquanyu Date: Fri, 22 Jun 2018 10:58:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=A7=E7=AD=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/lyms/platform/pojo/SieveResultModel.java | 105 ++++++++++++++++++ .../platform/operate/web/facade/SieveFacade.java | 73 +++++++------ .../operate/web/request/SieveAddRequest.java | 119 ++++++++++++++++++++- .../web/service/impl/PatientWeightServiceImpl.java | 8 +- 4 files changed, 265 insertions(+), 40 deletions(-) diff --git a/platform-dal/src/main/java/com/lyms/platform/pojo/SieveResultModel.java b/platform-dal/src/main/java/com/lyms/platform/pojo/SieveResultModel.java index 5f3f02a..93863fe 100644 --- a/platform-dal/src/main/java/com/lyms/platform/pojo/SieveResultModel.java +++ b/platform-dal/src/main/java/com/lyms/platform/pojo/SieveResultModel.java @@ -5,6 +5,7 @@ import com.lyms.platform.common.result.BaseModel; import org.springframework.data.mongodb.core.mapping.Document; import java.util.Date; +import java.util.Map; /** * 产筛结果 @@ -36,6 +37,110 @@ public class SieveResultModel{ //结果录入时间 private Date resultTime; + private Map tszhzValue;// 唐氏综合症 21-三体 + private Map sbstValue;// 18-三体 + private Map stzhz13Value; //13-三体 + private Map sjgjxValue;// 神经管畸形 NTD + + //hCg + private String hCg; + + //hafp + private String hafp; + + + //hCgMom + private String hCgMom; + + //hafpMom + private String hafpMom; + + //审核者 + private String examineId; + + //检验者 + private String checkerId; + + public String getExamineId() { + return examineId; + } + + public void setExamineId(String examineId) { + this.examineId = examineId; + } + + public String getCheckerId() { + return checkerId; + } + + public void setCheckerId(String checkerId) { + this.checkerId = checkerId; + } + + public Map getTszhzValue() { + return tszhzValue; + } + + public void setTszhzValue(Map tszhzValue) { + this.tszhzValue = tszhzValue; + } + + public Map getSbstValue() { + return sbstValue; + } + + public void setSbstValue(Map sbstValue) { + this.sbstValue = sbstValue; + } + + public Map getStzhz13Value() { + return stzhz13Value; + } + + public void setStzhz13Value(Map stzhz13Value) { + this.stzhz13Value = stzhz13Value; + } + + public Map getSjgjxValue() { + return sjgjxValue; + } + + public void setSjgjxValue(Map sjgjxValue) { + this.sjgjxValue = sjgjxValue; + } + + public String gethCg() { + return hCg; + } + + public void sethCg(String hCg) { + this.hCg = hCg; + } + + public String getHafp() { + return hafp; + } + + public void setHafp(String hafp) { + this.hafp = hafp; + } + + public String gethCgMom() { + return hCgMom; + } + + public void sethCgMom(String hCgMom) { + this.hCgMom = hCgMom; + } + + public String getHafpMom() { + return hafpMom; + } + + public void setHafpMom(String hafpMom) { + this.hafpMom = hafpMom; + } + public Date getResultTime() { return resultTime; } diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/SieveFacade.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/SieveFacade.java index 3acff27..30ebd64 100644 --- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/SieveFacade.java +++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/SieveFacade.java @@ -19,6 +19,7 @@ import com.lyms.platform.operate.web.request.CqSieveQueryRequest; import com.lyms.platform.operate.web.request.SieveAddRequest; import com.lyms.platform.operate.web.result.*; import com.lyms.platform.operate.web.service.ITrackDownService; +import com.lyms.platform.operate.web.utils.CommonsHelper; import com.lyms.platform.operate.web.worker.SieveWorker; import com.lyms.platform.permission.model.Organization; import com.lyms.platform.permission.model.Users; @@ -688,37 +689,25 @@ public class SieveFacade { map.put("sieveApplyInfo",result); - if (type == 1) + if (type == 1 || type == 3) { - if (com.lyms.platform.common.utils.StringUtils.isNum(sieveApply.getApplyDoctor())) { - Users users = usersService.getUsers(Integer.parseInt(sieveApply.getApplyDoctor())); - if (users != null && users.getYn() == YnEnums.YES.getId()) { - viewInfo.put("applyDoctorName",users.getName()); - } - } + String applyDoctorName = CommonsHelper.getUserName(sieveApply.getApplyDoctor(),usersService); + viewInfo.put("applyDoctorName",applyDoctorName); - if (com.lyms.platform.common.utils.StringUtils.isNum(sieveApply.getCollectionDoctorId())) { - Users users = usersService.getUsers(Integer.parseInt(sieveApply.getCollectionDoctorId())); - if (users != null && users.getYn() == YnEnums.YES.getId()) { - viewInfo.put("collectionDoctorName",users.getName()); - } - } + String collectionDoctorName = CommonsHelper.getUserName(sieveApply.getCollectionDoctorId(),usersService); + viewInfo.put("collectionDoctorName",collectionDoctorName); + + String sendDoctorName = CommonsHelper.getUserName(sieveApply.getSendDoctor(),usersService); + viewInfo.put("sendDoctorName",sendDoctorName); + + String applyHospitalName = CommonsHelper.getHospitalName(sieveApply.getApplyHospitalId(),organizationService); + viewInfo.put("applyHospitalName", applyHospitalName); + + String currentHospitalName = CommonsHelper.getHospitalName(sieveApply.getHospitalId(),organizationService); + viewInfo.put("currentHospitalName", currentHospitalName); - if (com.lyms.platform.common.utils.StringUtils.isNum(sieveApply.getSendDoctor())) { - Users users = usersService.getUsers(Integer.parseInt(sieveApply.getSendDoctor())); - if (users != null && users.getYn() == YnEnums.YES.getId()) { - viewInfo.put("sendDoctorName",users.getName()); - } - } - if (null != sieveApply.getApplyHospitalId()) { - Organization org = organizationService.getOrganization(Integer.valueOf(sieveApply.getApplyHospitalId())); - if (null != org) { - viewInfo.put("applyHospitalName", org.getName()); - } - } String isTire = ""; String tireNumber = ""; - AntExChuQuery antExChuQuery1 = new AntExChuQuery(); antExChuQuery1.setParentId(parentId); antExChuQuery1.setYn(YnEnums.YES.getId()); @@ -732,20 +721,36 @@ public class SieveFacade { tireNumber = chuModel.getTireNumber(); } } - - map.put("isTire",isTire); + map.put("isTire", isTire); map.put("tireNumber",tireNumber); - map.put("viewInfo",viewInfo); - } - else if (type == 3) - { - Map sieveInfo = new HashMap<>(); + if (type == 3) + { + Map sieveResultInfo = new HashMap<>(); - map.put("sieveInfo",sieveInfo); + SieveResultQuery sieveResultQuery = new SieveResultQuery(); + sieveResultQuery.setParentId(parentId); + sieveResultQuery.setYn(YnEnums.YES.getId()); + List list = sieveService.queryListSieveResult(sieveResultQuery); + if (CollectionUtils.isNotEmpty(list)) + { + SieveResultModel sieveResultModel = list.get(0); + sieveResultInfo.put("hcg",sieveResultModel.gethCg() != null ? sieveResultModel.gethCg()+"ng/ml" : ""); + sieveResultInfo.put("hcgMom",sieveResultModel.gethCgMom() != null ? sieveResultModel.gethCgMom() : ""); + sieveResultInfo.put("hafp",sieveResultModel.getHafp() != null ? sieveResultModel.getHafp()+"U/ml" : ""); + sieveResultInfo.put("hafpMom",sieveResultModel.getHafpMom() != null ? sieveResultModel.getHafpMom() : ""); + sieveResultInfo.put("examineName", CommonsHelper.getUserName(sieveResultModel.getExamineId(),usersService)); + sieveResultInfo.put("checkerName",CommonsHelper.getUserName(sieveResultModel.getCheckerId(),usersService)); + sieveResultInfo.put("reportTime",DateUtil.getyyyy_MM_dd(sieveResultModel.getResultTime())); + + } + + map.put("sieveResultInfo",sieveResultInfo); + } } + } return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功").setData(map); } diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/SieveAddRequest.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/SieveAddRequest.java index b91188b..4a92b2c 100644 --- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/SieveAddRequest.java +++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/SieveAddRequest.java @@ -9,6 +9,7 @@ import org.apache.commons.lang.StringUtils; import java.util.ArrayList; import java.util.Collections; import java.util.List; +import java.util.Map; /** * 增加产筛结果 @@ -20,8 +21,8 @@ public class SieveAddRequest implements IBasicRequestConvert { private String id; private String parentId; - private String tszhz;// 唐氏综合症 - private String sjgjx;// 神经管畸形 + private String tszhz;// 唐氏综合症 21-三体 + private String sjgjx;// 神经管畸形 NTD private String sbst;// 18-三体 private String dzhpx;// 地中海贫血 private String cspj;// 产筛评价 @@ -32,6 +33,108 @@ public class SieveAddRequest implements IBasicRequestConvert { //结果录入时间 private String resultTime; + private Map tszhzValue;// 唐氏综合症 21-三体 + private Map sbstValue;// 18-三体 + private Map stzhz13Value; //13-三体 + private Map sjgjxValue;// 神经管畸形 NTD + + //hCg + private String hCg; + + //hafp + private String hafp; + + //hCgMom + private String hCgMom; + + //hafpMom + private String hafpMom; + + //审核者 + private String examineId; + + //检验者 + private String checkerId; + + public String getExamineId() { + return examineId; + } + + public void setExamineId(String examineId) { + this.examineId = examineId; + } + + public String getCheckerId() { + return checkerId; + } + + public void setCheckerId(String checkerId) { + this.checkerId = checkerId; + } + + public Map getTszhzValue() { + return tszhzValue; + } + + public void setTszhzValue(Map tszhzValue) { + this.tszhzValue = tszhzValue; + } + + public Map getSbstValue() { + return sbstValue; + } + + public void setSbstValue(Map sbstValue) { + this.sbstValue = sbstValue; + } + + public Map getStzhz13Value() { + return stzhz13Value; + } + + public void setStzhz13Value(Map stzhz13Value) { + this.stzhz13Value = stzhz13Value; + } + + public Map getSjgjxValue() { + return sjgjxValue; + } + + public void setSjgjxValue(Map sjgjxValue) { + this.sjgjxValue = sjgjxValue; + } + + public String gethCg() { + return hCg; + } + + public void sethCg(String hCg) { + this.hCg = hCg; + } + + public String getHafp() { + return hafp; + } + + public void setHafp(String hafp) { + this.hafp = hafp; + } + + public String gethCgMom() { + return hCgMom; + } + + public void sethCgMom(String hCgMom) { + this.hCgMom = hCgMom; + } + + public String getHafpMom() { + return hafpMom; + } + + public void setHafpMom(String hafpMom) { + this.hafpMom = hafpMom; + } public String getResultTime() { return resultTime; @@ -133,6 +236,18 @@ public class SieveAddRequest implements IBasicRequestConvert { sieveModel.setStzhz13(stzhz13); sieveModel.setPublishName(publishName); sieveModel.setResultTime(DateUtil.parseYMD(resultTime)); + + sieveModel.setTszhzValue(tszhzValue); + sieveModel.setSbstValue(sbstValue); + sieveModel.setStzhz13Value(stzhz13Value); + sieveModel.setSjgjxValue(sjgjxValue); + sieveModel.sethCg(hCg); + sieveModel.sethCgMom(hCgMom); + sieveModel.setHafp(hafp); + sieveModel.sethCgMom(hafpMom); + sieveModel.setExamineId(examineId); + sieveModel.setCheckerId(checkerId); + return sieveModel; } public Integer getMax(){ diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java index 4b4508e..cbb6c94 100644 --- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java +++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java @@ -1466,13 +1466,13 @@ public class PatientWeightServiceImpl extends BaseServiceImpl implements Patient double kend = (beforeWeight + addWeightEnd) * 25 + basekul; status = "处于"; - if (addWeightEnd < add && (add - addWeightEnd) >= 0.5) + if (addWeightEnd < add && (Double.valueOf(String.format("%.2f",add - addWeightEnd))) >= 0.5) { status = "高于"; kstart -= 500; kend -= 500; } - else if (addWeightStart > add && (addWeightStart - add) >= 0.5) + else if (addWeightStart > add && (Double.valueOf(String.format("%.2f",addWeightStart - add))) >= 0.5) { status = "低于"; kstart += 500; @@ -1491,8 +1491,8 @@ public class PatientWeightServiceImpl extends BaseServiceImpl implements Patient public static void main(String[] args) { PatientWeightServiceImpl patientWeightService = new PatientWeightServiceImpl(); - String bmi = patientWeightService.getBmi("50", "172"); - Map map = patientWeightService.getComputeKul(50 , 52.13, 16, Double.parseDouble(bmi),"1"); + String bmi = patientWeightService.getBmi("68.07", "165"); + Map map = patientWeightService.getComputeKul(68.07 , 70.43, 13, Double.parseDouble(bmi),"1"); System.out.println(map); // double kulStart = 750; -- 1.8.3.1