From b5e282a3acf7a7519d542f08ebc18971a6462099 Mon Sep 17 00:00:00 2001 From: tangw Date: Wed, 20 Aug 2025 19:03:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=BB=E4=B8=9A=E5=8A=A1=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../interfaceCommon/utils/CommonUtil.java | 105 +++++++++++++----- .../service/impl/LisWorkOperServiceImpl.java | 14 +-- 2 files changed, 86 insertions(+), 33 deletions(-) diff --git a/lis-interfaceCommon/src/main/java/com/czlis/interfaceCommon/utils/CommonUtil.java b/lis-interfaceCommon/src/main/java/com/czlis/interfaceCommon/utils/CommonUtil.java index 53afe2f..6dbbcdf 100644 --- a/lis-interfaceCommon/src/main/java/com/czlis/interfaceCommon/utils/CommonUtil.java +++ b/lis-interfaceCommon/src/main/java/com/czlis/interfaceCommon/utils/CommonUtil.java @@ -123,23 +123,72 @@ public class CommonUtil { } //=====项目字典查询========= - public List getXmInfoList(String yq) {return xmInfoMapper.getXmInfoList(yq);} - public XmInfo getXmInfo(String yq,String xmdh) {return xmInfoMapper.getXmInfo(yq,xmdh);} - public List getXmRefList(String yq) {return xmRefMapper.getXmRefList(yq);} - public XmRef getXmRef(String yq,String xmdh) {return xmRefMapper.getXmRef(yq,xmdh);} - public XmRef getXmRefValue(Map map) {return xmRefMapper.getXmRefValue(map);} - public String getXmRefJgbz(String yq,String xmdh,String csjg,String csjg1,String csjg2) {return xmValMapper.getXmValJgbz(yq,xmdh,csjg,csjg1,csjg2);} - public List getXmAlarmdetail(String yq,String xmdh){return xmAlarmdetailMapper.getXmAlarmdetail(yq,xmdh);}; - public String getYqmc(String yq){return labInstrMapper.getYqmc(yq);} - public String getYqdl(String yq){return labInstrMapper.getYqdl(yq);} - public LabInstr getLabInstr(String yq){return labInstrMapper.getLabInstr(yq);} - public List getLabInstrList(LabInstr labInstr){return labInstrMapper.getLabInstrList(labInstr);} + public List getXmInfoList(String yq) { + return xmInfoMapper.getXmInfoList(yq); + } + + public XmInfo getXmInfo(String yq, String xmdh) { + return xmInfoMapper.getXmInfo(yq, xmdh); + } + + public List getXmRefList(String yq) { + return xmRefMapper.getXmRefList(yq); + } + + public XmRef getXmRef(String yq, String xmdh) { + return xmRefMapper.getXmRef(yq, xmdh); + } + + public XmRef getXmRefValue(Map map) { + return xmRefMapper.getXmRefValue(map); + } + + public String getXmRefJgbz(String yq, String xmdh, String csjg, String csjg1, String csjg2) { + return xmValMapper.getXmValJgbz(yq, xmdh, csjg, csjg1, csjg2); + } + + public List getXmAlarmdetail(String yq, String xmdh) { + return xmAlarmdetailMapper.getXmAlarmdetail(yq, xmdh); + } + + ; + + public String getYqmc(String yq) { + return labInstrMapper.getYqmc(yq); + } + + public String getYqdl(String yq) { + return labInstrMapper.getYqdl(yq); + } + + public LabInstr getLabInstr(String yq) { + return labInstrMapper.getLabInstr(yq); + } + + public List getLabInstrList(LabInstr labInstr) { + return labInstrMapper.getLabInstrList(labInstr); + } + //服务器时间方法 - public Date getCurrentTime(){return commonMapper.getCurrentTime();} - public String getCurrentDate(){return getDateString(getCurrentTime());} - public String getCurrentDateTime(){return getDateTimeString(getCurrentTime());} - public String getDateString(Date rq){return DateFormatUtils.format(rq, "yyyy-MM-dd");} - public String getDateTimeString(Date rq){return DateFormatUtils.format(rq, "yyyy-MM-dd HH:mm:ss");} + public Date getCurrentTime() { + return commonMapper.getCurrentTime(); + } + + public String getCurrentDate() { + return getDateString(getCurrentTime()); + } + + public String getCurrentDateTime() { + return getDateTimeString(getCurrentTime()); + } + + public String getDateString(Date rq) { + return DateFormatUtils.format(rq, "yyyy-MM-dd"); + } + + public String getDateTimeString(Date rq) { + return DateFormatUtils.format(rq, "yyyy-MM-dd HH:mm:ss"); + } //字典查询单位名称 public String getCompany(String yljg) { @@ -166,12 +215,12 @@ public class CommonUtil { List comDictList = getDictCache(zdlb); if (comDictList != null) { List collect = comDictList.stream().filter(comDict -> comDict.getZddh().equals(zddh)).collect(Collectors.toList()); - if(collect.size() > 0){ + if (collect.size() > 0) { return collect.get(0).getZdmc(); } } //如果redis当中没有查到数据,则先在设置redis值, - ComDictUtils.setDictCache(zdlb,comDictMapper.getComDictListByZdlb(zdlb)); + ComDictUtils.setDictCache(zdlb, comDictMapper.getComDictListByZdlb(zdlb)); return comDictMapper.getComDictNameById(zdlb, zddh); } @@ -179,29 +228,33 @@ public class CommonUtil { List comDictList = getDictCache(zdlb); if (comDictList != null) { List collect = comDictList.stream().filter(comDict -> comDict.getZdmc().equals(zdmc)).collect(Collectors.toList()); - if(collect.size() > 0){ + if (collect.size() > 0) { return collect.get(0).getZdmc(); } } //如果redis当中没有查到数据,则先在设置redis值, - ComDictUtils.setDictCache(zdlb,comDictMapper.getComDictListByZdlb(zdlb)); + ComDictUtils.setDictCache(zdlb, comDictMapper.getComDictListByZdlb(zdlb)); return comDictMapper.getComDictIdByName(zdlb, zdmc); } - public List getComDictList(String zdlb){ + public List getComDictList(String zdlb) { List dictCacheList = getDictCache(zdlb); - if(dictCacheList != null){ + if (dictCacheList != null) { return dictCacheList; - }else{ + } else { return comDictMapper.getComDictListByZdlb(zdlb); } } + /** * 获取本院设置全局参数yq=HISOPT + * * @param xxdh * @return */ - public String getHISOPT(String xxdh){return getComOptValue("HISOPT",xxdh);} + public String getHISOPT(String xxdh) { + return getComOptValue("HISOPT", xxdh); + } public String getComOptValue(String yq, String xxdh) { ComOpt comOpt = getOptCache(yq, xxdh); @@ -217,8 +270,8 @@ public class CommonUtil { } - public void setDictCache(String zdlb, List dictDatas){ - ComDictUtils.setDictCache(zdlb,dictDatas); + public void setDictCache(String zdlb, List dictDatas) { + ComDictUtils.setDictCache(zdlb, dictDatas); } diff --git a/liswork/src/main/java/com/czlis/liswork/service/impl/LisWorkOperServiceImpl.java b/liswork/src/main/java/com/czlis/liswork/service/impl/LisWorkOperServiceImpl.java index d6d8b0e..1f27545 100644 --- a/liswork/src/main/java/com/czlis/liswork/service/impl/LisWorkOperServiceImpl.java +++ b/liswork/src/main/java/com/czlis/liswork/service/impl/LisWorkOperServiceImpl.java @@ -312,16 +312,16 @@ public class LisWorkOperServiceImpl implements LisWorkOperService { if (!"质控".equals(brlyname)) { if ("1".equals(commonUtil.getHISOPT("sp_dublereport"))) { LabPat labPat0 = lisWorkOperMapper.checkdublereport(sqh, ybh); - if(labPat0 !=null){ - String yqmc=commonUtil.getYqmc(yq); - String msg="该申请单已经发过结果了,禁止审核!\r\n日期:"+commonUtil.getDateString(jyrq)+",仪器:"+yqmc+",样本号:"+ybh; + if (labPat0 != null) { + String yqmc = commonUtil.getYqmc(yq); + String msg = "该申请单已经发过结果了,禁止审核!\r\n日期:" + commonUtil.getDateString(jyrq) + ",仪器:" + yqmc + ",样本号:" + ybh; return new Result("-1", msg); } } else if ("1".equals(commonUtil.getHISOPT("sp_yqdublereport"))) { - LabPat labPat0 = lisWorkOperMapper.checkyqdublereport(sqh,yq, ybh); - if(labPat0 !=null){ - String yqmc=commonUtil.getYqmc(yq); - String msg="该申请单已经发过结果了,禁止审核!\r\n日期:"+commonUtil.getDateString(jyrq)+",仪器:"+yqmc+",样本号:"+ybh; + LabPat labPat0 = lisWorkOperMapper.checkyqdublereport(sqh, yq, ybh); + if (labPat0 != null) { + String yqmc = commonUtil.getYqmc(yq); + String msg = "该申请单已经发过结果了,禁止审核!\r\n日期:" + commonUtil.getDateString(jyrq) + ",仪器:" + yqmc + ",样本号:" + ybh; return new Result("-1", msg); } }