主业务添加代码

This commit is contained in:
tangw 2025-08-20 19:03:01 +08:00
parent 2b7a4e7480
commit b5e282a3ac
2 changed files with 86 additions and 33 deletions

View File

@ -123,23 +123,72 @@ public class CommonUtil {
}
//=====项目字典查询=========
public List<XmInfo> getXmInfoList(String yq) {return xmInfoMapper.getXmInfoList(yq);}
public XmInfo getXmInfo(String yq,String xmdh) {return xmInfoMapper.getXmInfo(yq,xmdh);}
public List<XmRef> getXmRefList(String yq) {return xmRefMapper.getXmRefList(yq);}
public XmRef getXmRef(String yq,String xmdh) {return xmRefMapper.getXmRef(yq,xmdh);}
public XmRef getXmRefValue(Map<String,Object> 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<XmAlarmdetail> 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<LabInstr> getLabInstrList(LabInstr labInstr){return labInstrMapper.getLabInstrList(labInstr);}
public List<XmInfo> getXmInfoList(String yq) {
return xmInfoMapper.getXmInfoList(yq);
}
public XmInfo getXmInfo(String yq, String xmdh) {
return xmInfoMapper.getXmInfo(yq, xmdh);
}
public List<XmRef> getXmRefList(String yq) {
return xmRefMapper.getXmRefList(yq);
}
public XmRef getXmRef(String yq, String xmdh) {
return xmRefMapper.getXmRef(yq, xmdh);
}
public XmRef getXmRefValue(Map<String, Object> 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<XmAlarmdetail> 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<LabInstr> 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<ComDict> comDictList = getDictCache(zdlb);
if (comDictList != null) {
List<ComDict> 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<ComDict> comDictList = getDictCache(zdlb);
if (comDictList != null) {
List<ComDict> 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<ComDict> getComDictList(String zdlb){
public List<ComDict> getComDictList(String zdlb) {
List<ComDict> 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<ComDict> dictDatas){
ComDictUtils.setDictCache(zdlb,dictDatas);
public void setDictCache(String zdlb, List<ComDict> dictDatas) {
ComDictUtils.setDictCache(zdlb, dictDatas);
}

View File

@ -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);
}
}