微生物模块

This commit is contained in:
tangw 2025-11-25 19:36:52 +08:00
parent 9a04dbc2d4
commit 08a4149b98
7 changed files with 412 additions and 16 deletions

View File

@ -29,7 +29,7 @@ public class LisWorkBase {
/**获取当前用户姓名**/ /**获取当前用户姓名**/
String getnickname(){return SecurityUtils.getNickName();} String getnickname(){return SecurityUtils.getNickName();}
/**获取当前客户端电脑IP**/ /**获取当前客户端电脑IP**/
String getIP(){ public String getIP(){
return IpUtils.getIpAddr(); return IpUtils.getIpAddr();
} }
/**获取当前登录的医疗机构**/ /**获取当前登录的医疗机构**/
@ -114,7 +114,7 @@ public class LisWorkBase {
* @param labResultList 结果集合 * @param labResultList 结果集合
* @return 返回 * @return 返回
*/ */
boolean getAlarmFlag(List<LabResult> labResultList) { public boolean getAlarmFlag(List<LabResult> labResultList) {
boolean wjz = false; boolean wjz = false;
if(labResultList==null)return wjz; if(labResultList==null)return wjz;
if(labResultList.size()==0)return wjz; if(labResultList.size()==0)return wjz;
@ -183,7 +183,7 @@ public class LisWorkBase {
* @param ybh 样本号 * @param ybh 样本号
* @param yhdh 用户 * @param yhdh 用户
*/ */
void setpatLog(Date jyrq, String yq, String ybh, String yhdh) { public void setpatLog(Date jyrq, String yq, String ybh, String yhdh) {
Date xgrq = new Date(); Date xgrq = new Date();
String ip = getIP(); String ip = getIP();
commonUtil.insertLabPatlog(jyrq, yq, ybh, xgrq, yhdh, ip); commonUtil.insertLabPatlog(jyrq, yq, ybh, xgrq, yhdh, ip);

View File

@ -577,7 +577,7 @@ public class LisWorkcom extends LisWorkBase{
* @param labResultList * @param labResultList
* @return * @return
*/ */
String getAlarmMsg(List<LabResult> labResultList) { public String getAlarmMsg(List<LabResult> labResultList) {
StringBuilder wjzmsg = new StringBuilder(); StringBuilder wjzmsg = new StringBuilder();
List<LabResult> labResultList0 = labResultList.stream().filter(xm ->xm.getAlarm_flag() != null).filter(xm -> !xm.getAlarm_flag().trim().isEmpty()).collect(Collectors.toList()); List<LabResult> labResultList0 = labResultList.stream().filter(xm ->xm.getAlarm_flag() != null).filter(xm -> !xm.getAlarm_flag().trim().isEmpty()).collect(Collectors.toList());
if (!labResultList0.isEmpty()) { if (!labResultList0.isEmpty()) {

View File

@ -314,7 +314,7 @@ public class LisWorkconfirm extends LisWorkcom{
* @param problemId * @param problemId
* @return * @return
*/ */
private Result chksample(LabPat labPat, List<LabResult> labResultList, Integer problemId) { public Result chksample(LabPat labPat, List<LabResult> labResultList, Integer problemId) {
//医学审核条件判断 //医学审核条件判断
if (problemId < 6) { if (problemId < 6) {
String checkvalue = checkResultUtils.chksample(labPat, labResultList); String checkvalue = checkResultUtils.chksample(labPat, labResultList);
@ -332,7 +332,7 @@ public class LisWorkconfirm extends LisWorkcom{
* @param problemId * @param problemId
* @return * @return
*/ */
private Result chksamplenew(LabPat labPat, List<LabResult> labResultList, Integer problemId) { public Result chksamplenew(LabPat labPat, List<LabResult> labResultList, Integer problemId) {
//医学审核条件判断 //医学审核条件判断
Boolean setbz = false; Boolean setbz = false;
String bz = labPat.getBz(); String bz = labPat.getBz();
@ -371,7 +371,7 @@ public class LisWorkconfirm extends LisWorkcom{
* @param problemId * @param problemId
* @return * @return
*/ */
private Result afterconfirm(LabPat labPat, Integer problemId) { public Result afterconfirm(LabPat labPat, Integer problemId) {
Date jyrq = labPat.getJyrq(); Date jyrq = labPat.getJyrq();
String yq = labPat.getYq(); String yq = labPat.getYq();
String ybh = labPat.getYbh(); String ybh = labPat.getYbh();

View File

@ -136,5 +136,9 @@ public class LisWorkGermController extends BaseController {
clearPage(); clearPage();
} }
} }
@ApiOperation(value = "微生物报告审核",notes = "结果标志为目标动作,加-前缀为反操作")
@GetMapping("/check")
public Result check(Date jyrq, String yq, String ybh, String yhdh, String jgbz) {
return lisWorkGermService.check(jyrq, yq, ybh, yhdh,jgbz);
}
} }

View File

@ -22,5 +22,5 @@ public interface LisWorkGermService {
Result changeresult(LabResult labResult); Result changeresult(LabResult labResult);
Result newresult(LabResult labResult); Result newresult(LabResult labResult);
Result saveallresult(List<LabResult> labResult); Result saveallresult(List<LabResult> labResult);
Result check(Date jyrq, String yq, String ybh, String hdys,String type);
} }

View File

@ -3,10 +3,13 @@ package com.czlis.liswork.service.impl;
import com.czlis.common.core.domain.Result; import com.czlis.common.core.domain.Result;
import com.czlis.common.core.domain.entity.lis.*; import com.czlis.common.core.domain.entity.lis.*;
import com.czlis.common.utils.SecurityUtils; import com.czlis.common.utils.SecurityUtils;
import com.czlis.interfaceCommon.constants.LabResultmedConstants; import com.czlis.common.utils.ServletUtils;
import com.czlis.interfaceCommon.constants.*;
import com.czlis.interfaceCommon.mapper.ComDictMapper; import com.czlis.interfaceCommon.mapper.ComDictMapper;
import com.czlis.interfaceCommon.mapper.LabResultMedMapper; import com.czlis.interfaceCommon.mapper.LabResultMedMapper;
import com.czlis.interfaceCommon.pojo.inter.SetReport;
import com.czlis.interfaceCommon.utils.CommonUtil; import com.czlis.interfaceCommon.utils.CommonUtil;
import com.czlis.interfaceCommon.utils.LisInterfaceUtil;
import com.czlis.interfaceCommon.utils.LisUtil; import com.czlis.interfaceCommon.utils.LisUtil;
import com.czlis.interfaceCommon.utils.LisWorkUtils; import com.czlis.interfaceCommon.utils.LisWorkUtils;
import com.czlis.liswork.mapper.LisWorkGermMapper; import com.czlis.liswork.mapper.LisWorkGermMapper;
@ -16,6 +19,7 @@ import com.czlis.liswork.pojo.DTO.MediumDTO;
import com.czlis.liswork.pojo.HistoryResult; import com.czlis.liswork.pojo.HistoryResult;
import com.czlis.liswork.service.LisWorkGermService; import com.czlis.liswork.service.LisWorkGermService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.time.DateFormatUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
@ -31,6 +35,8 @@ public class LisWorkGermServiceImpl implements LisWorkGermService {
@Autowired @Autowired
LisWorkUtils lisWorkUtils; LisWorkUtils lisWorkUtils;
@Autowired @Autowired
LisInterfaceUtil lisInterfaceUtil;
@Autowired
LisWorkGermMapper lisWorkGermMapper; LisWorkGermMapper lisWorkGermMapper;
@Override @Override
public Result getresultinfo(Date jyrq, String yq, String ybh){ public Result getresultinfo(Date jyrq, String yq, String ybh){
@ -192,11 +198,12 @@ public class LisWorkGermServiceImpl implements LisWorkGermService {
Date jyrq = labResult.getJyrq(); Date jyrq = labResult.getJyrq();
String ybh = labResult.getYbh(); String ybh = labResult.getYbh();
LabPat labPat = commonUtil.getLabPatOne(jyrq, yq, ybh); LabPat labPat = commonUtil.getLabPatOne(jyrq, yq, ybh);
if(labPat!=null) {
if ("2".equals(labPat.getJgbz())) return new Result("-1", "结果已审核禁止修改!"); if ("2".equals(labPat.getJgbz())) return new Result("-1", "结果已审核禁止修改!");
if ("5".equals(labPat.getJgbz())) return new Result("-1", "结果已锁定禁止修改!"); if ("5".equals(labPat.getJgbz())) return new Result("-1", "结果已锁定禁止修改!");
if ("1".equals(labPat.getJgbz())) return new Result("-1", "结果已初审禁止修改!"); if ("1".equals(labPat.getJgbz())) return new Result("-1", "结果已初审禁止修改!");
if(!lisWorkUtils.canmodifysample(labPat))return new Result("-1","目标标本不可修改"); if (!lisWorkUtils.canmodifysample(labPat)) return new Result("-1", "目标标本不可修改");
}
commonUtil.updateLabResult(labResult); commonUtil.updateLabResult(labResult);
return new Result("0", "保存成功"); return new Result("0", "保存成功");
} }
@ -410,4 +417,390 @@ public class LisWorkGermServiceImpl implements LisWorkGermService {
commonUtil.delLabResultMed(labResultmed); commonUtil.delLabResultMed(labResultmed);
return new Result("0","成功"); return new Result("0","成功");
} }
@Override
public Result check(Date jyrq, String yq, String ybh, String hdys,String type){
int problemId = ServletUtils.getParameterToInt("problemId", 0);
String yhdh=hdys;
switch (type){
case "1":
return lisWorkUtils.confirm1(jyrq, yq, ybh, hdys, problemId);
case "2":
return lisWorkUtils.confirm(jyrq, yq, ybh, hdys, problemId);
case "3":
return checkcbbg(jyrq, yq, ybh, hdys, problemId);
case "4":
return checkejbg(jyrq, yq, ybh, hdys, problemId);
case "5":
if (yhdh == null || yhdh.isEmpty()) return new Result("-1", "锁定者为空,无法锁定报告!");
LabPat labPat = commonUtil.getLabPatOne(jyrq, yq, ybh);
String jgbz = labPat.getJgbz();
if ("2".equals(jgbz)) return new Result("-1", "报告已审核!");
if ("5".equals(jgbz)) return new Result("-1", "已锁定报告禁止审核!");
if (!commonUtil.getUserPower(yq, yhdh, 20)) {
return new Result("-1", "当前锁定者无权对本仪器报告锁定!");
}
commonUtil.updateLabPatJgbz(jyrq, yq, ybh, LabPatConstants.STOP);
lisWorkUtils.setComLog(jyrq, yq, ybh, yhdh, "LOCK", "锁定报告");
return new Result("0", "成功");
case "-1":
return lisWorkUtils.unconfirm1(jyrq, yq, ybh, hdys);
case "-2":
return lisWorkUtils.unconfirm(jyrq, yq, ybh, hdys);
case "-3":
return uncheckcbbg(jyrq, yq, ybh, hdys, problemId);
case "-4":
return uncheckejbg(jyrq, yq, ybh, hdys, problemId);
case "-5":
if (yhdh == null || yhdh.isEmpty()) return new Result("-1", "解锁者为空,无法解锁报告!");
LabPat labPat0 = commonUtil.getLabPatOne(jyrq, yq, ybh);
String jgbz0 = labPat0.getJgbz();
if (!"5".equals(jgbz0)) return new Result("-1", "未锁定报告解锁失败!");
if (!commonUtil.getUserPower(yq, yhdh, 10)) {
if (commonUtil.getUserPower(yq, yhdh, 17)) {
if(yhdh.equals(labPat0.getYhdh())||yhdh.equals(labPat0.getHdys())||yhdh.equals(labPat0.getConfirmer())){
}else{
return new Result("-1", "当前解锁者无权对本仪器报告解锁!");
}
}else {
return new Result("-1", "当前解锁者无权对本仪器报告解锁!");
}
}
commonUtil.updateLabPatJgbz(jyrq, yq, ybh, LabPatConstants.DEFAULT);
lisWorkUtils.setComLog(jyrq, yq, ybh, yhdh, "ULOCK", "解锁报告");
return new Result("0", "成功");
default:
}
return new Result("-1","未定义审核方式");
}
private Result checkcbbg(Date jyrq, String yq, String ybh, String hdys,int problemId) {
String yq1=getFirstInstrid(yq);
if(yq1==null)return new Result("-1","没有设置初步报告仪器");
if (hdys == null || hdys.isEmpty()) return new Result("-1", "审核者为空,无法审核!");
LabPat labPat = commonUtil.getLabPatOne(jyrq, yq, ybh);
labPat.setHdys(hdys);
List<LabResult> labResultList = commonUtil.getLabResultList(jyrq, yq1, ybh);
if (problemId < 3) {
//1,审核权限校验
if (!commonUtil.getUserPower(yq, hdys, 20)) {
return new Result("-1", "当前核对者无权对本仪器报告审核!");
}
//2:数据合法性校验
// Result result0 = beforeconfirm(labPat, labResultList, 2, problemId);
// if (!"0".equals(result0.getCode())) return result0;
}
if (problemId < 3) problemId = 3;
if (problemId < 4) {
//3:数据完整保存
// labResultList = saveallresult(labPat, labResultList);
boolean wjz = lisWorkUtils.getAlarmFlag(labResultList);
//同步主表危急值标识
String alarmflag = labPat.getAlarmflag();
if (("1".equals(alarmflag) && !wjz)) {
labPat.setAlarmflag("");
commonUtil.updateLabPat(labPat);
} else if (("".equals(alarmflag) || alarmflag == null) && wjz) {
labPat.setAlarmflag("1");
commonUtil.updateLabPat(labPat);
}
if (wjz) {
return new Result("4", lisWorkUtils.getAlarmMsg(labResultList), 4);
}
}
if (problemId < 5) problemId = 5;
if (problemId < 6) {
//医学审核条件判断
Result result = lisWorkUtils.chksample(labPat, labResultList, problemId);
if (!"0".equals(result.getCode())) return result;
}
if (problemId < 6) problemId = 6;
if (problemId < 99) {
//高级医学审核条件判断
Result result = lisWorkUtils.chksamplenew(labPat, labResultList, problemId);
if ("99".equals(result.getCode())) {
labPat.setBz(result.getMsg());
result.setCode("0");
}
if (!"0".equals(result.getCode())) return result;
}
if (problemId < 99) problemId = 99;
commonUtil.updateLabPatJgbz(jyrq, yq, ybh,LabPatConstants.FIRST);
Date shsj=new Date();
labPat.setJgbz(LabPatConstants.CONFIRM);
labPat.setYq(yq1);
labPat.setHdys(hdys);
labPat.setConfirmdt(shsj);
labPat.setConfirmer(hdys);
labPat.setDysj(shsj);
commonUtil.delLabPat(jyrq, yq, ybh);
commonUtil.insertLabPat(labPat);
Result result1 = lisWorkUtils.afterconfirm(labPat, problemId);
if (!"0".equals(result1.getCode())) return result1;
lisWorkUtils.setComLog(jyrq, yq, ybh, hdys, ComLogConstants.LG_CK3, "");
String sqh = labPat.getSqh();
if (sqh != null) {
lisWorkUtils.setlabReqsteplog(sqh, LabReqmainConstants.START, hdys);
}
return new Result("0", "审核成功!");
}
private Result checkejbg(Date jyrq, String yq, String ybh, String hdys,int problemId) {
String yq1=getSecondInstrid(yq);
if(yq1==null)return new Result("-1","没有设置初步报告仪器");
if (hdys == null || hdys.isEmpty()) return new Result("-1", "审核者为空,无法审核!");
LabPat labPat = commonUtil.getLabPatOne(jyrq, yq, ybh);
labPat.setHdys(hdys);
List<LabResult> labResultList = commonUtil.getLabResultList(jyrq, yq1, ybh);
if (problemId < 3) {
//1,审核权限校验
if (!commonUtil.getUserPower(yq, hdys, 20)) {
return new Result("-1", "当前核对者无权对本仪器报告审核!");
}
//2:数据合法性校验
// Result result0 = beforeconfirm(labPat, labResultList, 2, problemId);
// if (!"0".equals(result0.getCode())) return result0;
}
if (problemId < 3) problemId = 3;
if (problemId < 4) {
//3:数据完整保存
// labResultList = saveallresult(labPat, labResultList);
boolean wjz = lisWorkUtils.getAlarmFlag(labResultList);
//同步主表危急值标识
String alarmflag = labPat.getAlarmflag();
if (("1".equals(alarmflag) && !wjz)) {
labPat.setAlarmflag("");
commonUtil.updateLabPat(labPat);
} else if (("".equals(alarmflag) || alarmflag == null) && wjz) {
labPat.setAlarmflag("1");
commonUtil.updateLabPat(labPat);
}
if (wjz) {
return new Result("4", lisWorkUtils.getAlarmMsg(labResultList), 4);
}
}
if (problemId < 5) problemId = 5;
if (problemId < 6) {
//医学审核条件判断
Result result = lisWorkUtils.chksample(labPat, labResultList, problemId);
if (!"0".equals(result.getCode())) return result;
}
if (problemId < 6) problemId = 6;
if (problemId < 99) {
//高级医学审核条件判断
Result result = lisWorkUtils.chksamplenew(labPat, labResultList, problemId);
if ("99".equals(result.getCode())) {
labPat.setBz(result.getMsg());
result.setCode("0");
}
if (!"0".equals(result.getCode())) return result;
}
if (problemId < 99) problemId = 99;
commonUtil.updateLabPatJgbz(jyrq, yq, ybh,LabPatConstants.SECOND);
Date shsj=new Date();
labPat.setJgbz(LabPatConstants.CONFIRM);
labPat.setYq(yq1);
labPat.setHdys(hdys);
labPat.setConfirmdt(shsj);
labPat.setConfirmer(hdys);
labPat.setDysj(shsj);
commonUtil.delLabPat(jyrq, yq, ybh);
commonUtil.insertLabPat(labPat);
Result result1 = lisWorkUtils.afterconfirm(labPat, problemId);
if (!"0".equals(result1.getCode())) return result1;
lisWorkUtils.setComLog(jyrq, yq, ybh, hdys, ComLogConstants.LG_CK4, "");
String sqh = labPat.getSqh();
if (sqh != null) {
lisWorkUtils.setlabReqsteplog(sqh, LabReqmainConstants.START, hdys);
}
return new Result("0", "审核成功!");
}
private Result uncheckcbbg(Date jyrq, String yq, String ybh, String yhdh,int problemId) {
String yq1=getFirstInstrid(yq);
if(yq1==null)return new Result("-1","没有设置初步报告仪器");
if (yhdh == null || yhdh.isEmpty()) return new Result("1", "操作者为空,无法解除审核!");
LabPat labPat = commonUtil.getLabPatOne(jyrq, yq, ybh);
if (problemId < 3) {
//1,解除审核权限校验
if (!commonUtil.getUserPower(yq, yhdh, 10)) return new Result("-1", "当前操作者无权对本仪器报告解除审核!");
//2:数据合法性校验
String jgbz = labPat.getJgbz();
if ("2".equals(jgbz)) return new Result("1", "报告已终报禁止解除初步报告!");
if (!"3".equals(jgbz)) return new Result("1", "报告未初步报告,不需解除!");
}
if (problemId < 3) problemId = 3;
if (problemId < 4) {
String unconfirmlog = commonUtil.getComOptValue(yq, "unconfirmlog");
if ("1".equals(unconfirmlog)) {
return new Result("4", "请填写解除审核原因!", 4);
}
}
if (problemId < 4) problemId = 4;
//调用his报告接口,完成报告同时调用外部接口任务
if (problemId < 5) {
SetReport setReport = new SetReport();
setReport.setIp(lisWorkUtils.getIP());
setReport.setJyrq(DateFormatUtils.format(jyrq, "yyyy-MM-dd"));
setReport.setYq(yq.trim());
setReport.setYbh(ybh);
setReport.setUserid(yhdh);
setReport.setStatus(LisinterfaceNameConstants.REPORTCANCAL);
Result result = lisInterfaceUtil.invokeLisInterface(LisinterfaceNameConstants.SETREPORT, setReport);
if (result.getCode().equals("5")) {
if (problemId < 5) {
return new Result(result.getCode(), result.getMsg(), 5);
}
}
if (!result.getCode().equals("0")) return result;
}
if (problemId < 5) problemId = 5;
String sqh = labPat.getSqh();
LabReqmain labReqmain = commonUtil.getLabReqmainOne(sqh);
if (labReqmain != null) {
String zt = labReqmain.getZt();
if (!LabReqmainConstants.CANCAL.equals(zt)) {
labReqmain.setConfirmer("");
labReqmain.setConfirmtime(null);
if (LabReqmainConstants.CONFIRM.equals(zt)) {
labReqmain.setZt(LabReqmainConstants.SIGNFOR);
labReqmain.setConfirmer("");
labReqmain.setConfirmtime(null);
commonUtil.updateLabReqmain(labReqmain);
}
}
}
String msg = "取消成功!";
String sp_rebackreport = commonUtil.getHISOPT("sp_rebackreport");
if ("1".equals(sp_rebackreport)) {
if ("1".equals(labPat.getDybz())) {
msg = msg + LisUtil.LINE_SEPARATOR + "此报告为已打印报告,注意考虑是否追回";
}
LabPatwarning labPatwarning = commonUtil.getLabPatwarning(jyrq, yq1, ybh);
if (labPatwarning != null) {
if (problemId < 6) {
Date tzsj = labPatwarning.getTzsj();
long sjc = LisUtil.relativeMinute(tzsj);
if (sjc > 10) {
return new Result("4", "此报告已发布危急值结果,并且时间超过10分钟了!" + LisUtil.LINE_SEPARATOR + "请输入撤回报告组长代号和密码", 6);
}
}
//权限不足,撤回报告失败组长权限单独接口校验
// if (problemId == 6) {
// int ll_qxz = lisWorkUtilsMapper.getQXZ(yhdh);
// if (ll_qxz <= 0) {
// return new Result("-1", "权限不足,撤回报告失败!");
// }
// }
commonUtil.deleteLabPatwarning(jyrq, yq1, ybh);
commonUtil.deleteLabResultwarning(jyrq, yq1, ybh);
}
}
commonUtil.deleteLabReqreportPdffile(jyrq, yq1, ybh);
commonUtil.updateLabPatJgbz(jyrq, yq, ybh,LabPatConstants.DEFAULT);
commonUtil.updateLabPatJgbz(jyrq, yq1, ybh,LabPatConstants.DEFAULT);
String logdata = commonUtil.getLisPatlogbz(jyrq, yq, ybh);
lisWorkUtils.setComLog(jyrq, yq, ybh, yhdh, ComLogConstants.LG_UCK2, logdata);
// lisWorkUtils.setpatLog(jyrq, yq1, ybh, yhdh);
// if (sqh != null) {
// lisWorkUtils.setlabReqsteplog(sqh, LabReqmainConstants.REPORT, yhdh);
// }
if (!"取消成功!".equals(msg)) return new Result("3", msg);
return new Result("0", msg);
}
private Result uncheckejbg(Date jyrq, String yq, String ybh, String yhdh,int problemId) {
String yq1=getSecondInstrid(yq);
if(yq1==null)return new Result("-1","没有设置初步报告仪器");
if (yhdh == null || yhdh.isEmpty()) return new Result("1", "操作者为空,无法解除审核!");
LabPat labPat = commonUtil.getLabPatOne(jyrq, yq, ybh);
if (problemId < 3) {
//1,解除审核权限校验
if (!commonUtil.getUserPower(yq, yhdh, 10)) return new Result("-1", "当前操作者无权对本仪器报告解除审核!");
//2:数据合法性校验
String jgbz = labPat.getJgbz();
if ("2".equals(jgbz)) return new Result("1", "报告已终报禁止解除二报!");
if (!"4".equals(jgbz)) return new Result("1", "报告未初步报告,不需解除!");
}
if (problemId < 3) problemId = 3;
if (problemId < 4) {
String unconfirmlog = commonUtil.getComOptValue(yq, "unconfirmlog");
if ("1".equals(unconfirmlog)) {
return new Result("4", "请填写解除审核原因!", 4);
}
}
if (problemId < 4) problemId = 4;
//调用his报告接口,完成报告同时调用外部接口任务
if (problemId < 5) {
SetReport setReport = new SetReport();
setReport.setIp(lisWorkUtils.getIP());
setReport.setJyrq(DateFormatUtils.format(jyrq, "yyyy-MM-dd"));
setReport.setYq(yq.trim());
setReport.setYbh(ybh);
setReport.setUserid(yhdh);
setReport.setStatus(LisinterfaceNameConstants.REPORTCANCAL);
Result result = lisInterfaceUtil.invokeLisInterface(LisinterfaceNameConstants.SETREPORT, setReport);
if (result.getCode().equals("5")) {
if (problemId < 5) {
return new Result(result.getCode(), result.getMsg(), 5);
}
}
if (!result.getCode().equals("0")) return result;
}
if (problemId < 5) problemId = 5;
String sqh = labPat.getSqh();
LabReqmain labReqmain = commonUtil.getLabReqmainOne(sqh);
if (labReqmain != null) {
String zt = labReqmain.getZt();
if (!LabReqmainConstants.CANCAL.equals(zt)) {
labReqmain.setConfirmer("");
labReqmain.setConfirmtime(null);
if (LabReqmainConstants.CONFIRM.equals(zt)) {
labReqmain.setZt(LabReqmainConstants.SIGNFOR);
labReqmain.setConfirmer("");
labReqmain.setConfirmtime(null);
commonUtil.updateLabReqmain(labReqmain);
}
}
}
String msg = "取消成功!";
String sp_rebackreport = commonUtil.getHISOPT("sp_rebackreport");
if ("1".equals(sp_rebackreport)) {
if ("1".equals(labPat.getDybz())) {
msg = msg + LisUtil.LINE_SEPARATOR + "此报告为已打印报告,注意考虑是否追回";
}
LabPatwarning labPatwarning = commonUtil.getLabPatwarning(jyrq, yq1, ybh);
if (labPatwarning != null) {
if (problemId < 6) {
Date tzsj = labPatwarning.getTzsj();
long sjc = LisUtil.relativeMinute(tzsj);
if (sjc > 10) {
return new Result("4", "此报告已发布危急值结果,并且时间超过10分钟了!" + LisUtil.LINE_SEPARATOR + "请输入撤回报告组长代号和密码", 6);
}
}
//权限不足,撤回报告失败组长权限单独接口校验
// if (problemId == 6) {
// int ll_qxz = lisWorkUtilsMapper.getQXZ(yhdh);
// if (ll_qxz <= 0) {
// return new Result("-1", "权限不足,撤回报告失败!");
// }
// }
commonUtil.deleteLabPatwarning(jyrq, yq1, ybh);
commonUtil.deleteLabResultwarning(jyrq, yq1, ybh);
}
}
commonUtil.deleteLabReqreportPdffile(jyrq, yq1, ybh);
commonUtil.updateLabPatJgbz(jyrq, yq1, ybh,LabPatConstants.DEFAULT);
String yq2=getFirstInstrid(yq);
String jgbz =commonUtil.getLabPatJgbz(jyrq, yq2, ybh);
if("2".equals(jgbz)||"3".equals(jgbz)){
commonUtil.updateLabPatJgbz(jyrq, yq, ybh,LabPatConstants.FIRST);
}else {
commonUtil.updateLabPatJgbz(jyrq, yq, ybh, LabPatConstants.DEFAULT);
}
String logdata = commonUtil.getLisPatlogbz(jyrq, yq, ybh);
lisWorkUtils.setComLog(jyrq, yq, ybh, yhdh, ComLogConstants.LG_UCK3, logdata);
// lisWorkUtils.setpatLog(jyrq, yq1, ybh, yhdh);
// if (sqh != null) {
// lisWorkUtils.setlabReqsteplog(sqh, LabReqmainConstants.REPORT, yhdh);
// }
if (!"取消成功!".equals(msg)) return new Result("3", msg);
return new Result("0", msg);
}
} }

View File

@ -174,7 +174,6 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
int problemId = ServletUtils.getParameterToInt("problemId", 0); int problemId = ServletUtils.getParameterToInt("problemId", 0);
return lisWorkUtils.confirm1(jyrq, yq, ybh, hdys, problemId); return lisWorkUtils.confirm1(jyrq, yq, ybh, hdys, problemId);
} }
/** /**
* 保存所有结果的修正值,涉及:空结果清除,计算项目添加,添加单位,添加申请项目编码,参考值重新计算更新,结果标志重新计算更新,危急值标志计算更新 * 保存所有结果的修正值,涉及:空结果清除,计算项目添加,添加单位,添加申请项目编码,参考值重新计算更新,结果标志重新计算更新,危急值标志计算更新
* *