主业务添加代码

This commit is contained in:
tangw 2025-08-25 17:43:50 +08:00
parent 82141d9cf8
commit 3ba43668a6
4 changed files with 37 additions and 36 deletions

View File

@ -10,4 +10,5 @@ public interface XmRefMapper {
List<XmRef> getXmRefList(String yq);
XmRef getXmRef(@Param("yq")String yq, @Param("xmdh")String xmdh);
XmRef getXmRefValue(Map<String,Object> map);
XmRef getXmRefValue(@Param("yq")String yq, @Param("xmdh")String xmdh,@Param("bbtype")String bbtype, @Param("sex")String sex,@Param("age")Double age, @Param("zd")String zd, @Param("slzq")String slzq);
}

View File

@ -162,6 +162,9 @@ public class CommonUtil {
public XmRef getXmRefValue(Map<String, Object> map) {
return xmRefMapper.getXmRefValue(map);
}
public XmRef getXmRefValue(String yq,String xmdh,String bbtype,String sex,Double age,String zd,String slzq) {
return xmRefMapper.getXmRefValue(yq, xmdh, bbtype, sex, age, zd, slzq);
}
public String getXmRefJgbz(String yq, String xmdh, String csjg, String csjg1, String csjg2) {
return xmValMapper.getXmValJgbz(yq, xmdh, csjg, csjg1, csjg2);

View File

@ -25,7 +25,7 @@
<if test="sex != null and sex != ''">
and xb = #{sex}
</if>
<if test="age != null and age != 0">
<if test="age != null ">
and nl2 >= #{age} and #{age}>=nl1
</if>
<if test="zd != null ">

View File

@ -293,7 +293,7 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
}
List<LabResult> labResultList = commonUtil.getLabResultList(jyrq, yq, ybh);
if (labResultList == null) return new Result("-1", "结果为空禁止审核!");
if (labResultList == null || labResultList.size() == 0) return new Result("-1", "结果为空禁止审核!");
for (LabResult labResult : labResultList) {
String csjg = labResult.getCsjg();
if ("未做".equals(csjg)) {
@ -631,29 +631,29 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
String xmdh = resultCalc.getJsxm();
if (!xmdhold.equals(xmdh)) {
xmdhold = xmdh;
boolean setjgsg=true;
boolean setjgsg = true;
Map<String, String> variables = new HashMap<>();
String[] parameters =CalcUtils.getParameters(jsgs);
String[] parameters = CalcUtils.getParameters(jsgs);
for (int i = 0; i < parameters.length; i++) {
String itemcode=parameters[i];
if("SEX".equals(itemcode)){
String itemcode = parameters[i];
if ("SEX".equals(itemcode)) {
String sex = labPat.getBrxb().trim();
if ("1".equals(sex)) sex = "男";
if ("2".equals(sex)) sex = "女";
variables.put("SEX", sex);
}else if("AGE".equals(itemcode)){
} else if ("AGE".equals(itemcode)) {
double age = AgeUtils.getDecimalAge(AgeUtils.getBirthDateByAge(labPat.getNl(), labPat.getNldw()));
variables.put("AGE", String.valueOf(age));
}else{
} else {
List<ResultCalcDTO> collect = resultCalcDTO.stream().filter(result -> result.getXmdh().equals(itemcode)).collect(Collectors.toList());
if (collect.size() > 0) {
variables.put(itemcode, collect.get(0).getCsjg());
}else{
setjgsg=false;
} else {
setjgsg = false;
}
}
}
if(setjgsg) {
if (setjgsg) {
String result = CalcUtils.getValueFromCalc(jsgs, variables);
if (result != null && !result.trim().isEmpty()) {
//插入结果值
@ -754,16 +754,16 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
}
//危急值标识去除原则
String brxm = labPat.getBrxm();
if (brxm.contains("质控") || brxm.contains("复查") || brxm.contains("QC") || brxm.contains("qc") || brxm.contains("软化水") || brxm.contains("锅炉水")) {
if(brxm !=null)if (brxm.contains("质控") || brxm.contains("复查") || brxm.contains("QC") || brxm.contains("qc") || brxm.contains("软化水") || brxm.contains("锅炉水")) {
lb_wjz = false;
}
;
String brly = labPat.getBrly();
brly = commonUtil.getComDictNameById("PT", brly);
if (brly.contains("质控")) lb_wjz = false;
if(brly !=null)brly = commonUtil.getComDictNameById("PT", brly);
if(brly !=null)if (brly.contains("质控")) lb_wjz = false;
String ksdh = labPat.getKsdh();
ksdh = commonUtil.getComDictNameById("DP", ksdh);
if (ksdh.contains("检验科")) lb_wjz = false;
if(ksdh !=null)ksdh = commonUtil.getComDictNameById("DP", ksdh);
if(ksdh !=null)if (ksdh.contains("检验科")) lb_wjz = false;
//同步主表危急值标识
if (lb_wjz) return 1;
}
@ -800,44 +800,41 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
String ygbb = xmInfo.getYgbb();
String ygzq = xmInfo.getYgzq();
String ygzd = xmInfo.getYgzd();
String sex = "";
String sex = null;
if ("Y".equals(ygxb)) {
sex = labPat.getBrxb().trim();
if (sex == null) sex = "";
}
String yblx = "";
String yblx = null;
if ("Y".equals(ygbb)) {
yblx = labPat.getYblx();
String bb = commonUtil.getComDictIdByName("BT", yblx);
if (bb != null && !bb.trim().isEmpty()) yblx = bb;
}
String zd = "";
String zd = null;
if ("Y".equals(ygzd)) {
zd = labPat.getZd();
String icd10 = commonUtil.getComDictIdByName("ICD10", zd);
if (icd10 != null && !icd10.trim().isEmpty()) zd = icd10;
if (zd == null) {zd="";}
}
String slzq = "";
String slzq = null;
if ("Y".equals(ygzq)) {
slzq = labPat.getSlzq();
if (slzq != null) {
String zq = commonUtil.getComDictIdByName("SLZQ", slzq);
if (zq != null && !zq.trim().isEmpty()) slzq = zq;
} else {
slzq = "";
}
double age = 0;
}
Double age = null;
if ("Y".equals(ygnl)) {
age = AgeUtils.getDecimalAge(AgeUtils.getBirthDateByAge(labPat.getNl(), labPat.getNldw()));
}
XmRef xmRef = new XmRef();
if ("Y".equals(ygxb) || "Y".equals(ygbb) || "Y".equals(ygnl) || "Y".equals(ygzd) || "Y".equals(ygzq)) {
Map<String, Object> map = new HashMap<>();
map.put("yq", yblx);
map.put("xmdh", sex);
map.put("bbtype", yblx);
map.put("sex", sex);
map.put("age", age);
map.put("zd", zd);
map.put("slzq", slzq);
xmRef = commonUtil.getXmRefValue(map);
xmRef = commonUtil.getXmRefValue(yq, xmdh, yblx, sex, age, zd, slzq);
}
if (xmRef != null) {
ckxx = xmRef.getCkxx();
@ -907,12 +904,12 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
String brxm = "";
String brdh = "";
String ksdh = labPat.getKsdh();
if(ksdh !=null &&!ksdh.trim().isEmpty()) {
if (ksdh != null && !ksdh.trim().isEmpty()) {
String ksdh1 = commonUtil.getComDictIdByName("DP", ksdh);
if (ksdh1 != null && !ksdh1.trim().isEmpty()) ksdh = ksdh1;
}
String ybzt = labPat.getYbzt();
if(ybzt !=null &&!ybzt.trim().isEmpty()){
if (ybzt != null && !ybzt.trim().isEmpty()) {
String ybzt1 = commonUtil.getComDictIdByName("ST", ybzt);
if (ybzt1 != null && !ybzt1.trim().isEmpty()) ybzt = ybzt1;
}