Compare commits
2 Commits
e82c31b33e
...
e0e9df33a3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e0e9df33a3 | ||
|
|
44b5c4ed78 |
@ -1,5 +1,6 @@
|
|||||||
package com.czlis.interfaceCommon.utils;
|
package com.czlis.interfaceCommon.utils;
|
||||||
|
|
||||||
|
import com.czlis.common.core.domain.Result;
|
||||||
import com.czlis.common.core.domain.entity.SysLoginParam;
|
import com.czlis.common.core.domain.entity.SysLoginParam;
|
||||||
import com.czlis.common.core.domain.entity.lis.*;
|
import com.czlis.common.core.domain.entity.lis.*;
|
||||||
import com.czlis.common.utils.*;
|
import com.czlis.common.utils.*;
|
||||||
@ -359,4 +360,35 @@ public class LisWorkBase {
|
|||||||
if (labPat.getJgbz() == null) labPat.setJgbz(LabPatConstants.DEFAULT);
|
if (labPat.getJgbz() == null) labPat.setJgbz(LabPatConstants.DEFAULT);
|
||||||
return labPat;
|
return labPat;
|
||||||
}
|
}
|
||||||
|
/**判断当前样本是否可以修改**/
|
||||||
|
public boolean canmodifysample(LabPat labPat){
|
||||||
|
if(labPat==null)return true;
|
||||||
|
String jgbz=labPat.getJgbz();
|
||||||
|
if(jgbz==null||"".equals(jgbz))return true;
|
||||||
|
if("2".equals(jgbz)||"5".equals(jgbz))return false;
|
||||||
|
Date jyrq=labPat.getJyrq();
|
||||||
|
String yq=labPat.getYq();
|
||||||
|
String userno = getusername();
|
||||||
|
boolean falg=true;
|
||||||
|
//是否可以修改非今日标本
|
||||||
|
String EDITOTHERDAY=commonUtil.getComOptValue(yq,"EDITOTHERDAY");
|
||||||
|
if(!"1".equals(EDITOTHERDAY)){
|
||||||
|
//个人是否可以修改非今日标本
|
||||||
|
if (!commonUtil.getUserPower(yq, userno, 16)) {
|
||||||
|
String nd=DateUtils.getDate();
|
||||||
|
String sjyrq=DateUtils.dateTime(jyrq);
|
||||||
|
if(!sjyrq.equals(nd))falg=false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(!falg)return false;
|
||||||
|
//只可修改自己的标本
|
||||||
|
String modifyself=commonUtil.getComOptValue(yq,"modifyself");
|
||||||
|
if("1".equals(modifyself)){
|
||||||
|
if (!commonUtil.getUserPower(yq, userno, 19)) {
|
||||||
|
String yhdh=labPat.getYhdh();
|
||||||
|
if(!userno.equals(yhdh))falg=false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return falg;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -32,34 +32,7 @@ public class LisWorkcom extends LisWorkBase{
|
|||||||
LabInstrvsreqclassMapper labInstrvsreqclassMapper;
|
LabInstrvsreqclassMapper labInstrvsreqclassMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
LabReqdetailMapper labReqdetailMapper;
|
LabReqdetailMapper labReqdetailMapper;
|
||||||
public Result saveallresult(List<LabResult> labResultList) {
|
|
||||||
if(labResultList == null || labResultList.isEmpty()) return new Result("-1", "结果集为空!");
|
|
||||||
Date jyrq0 = labResultList.get(0).getJyrq();
|
|
||||||
String yq0 = labResultList.get(0).getYq();
|
|
||||||
String ybh0 = labResultList.get(0).getYbh();
|
|
||||||
if(jyrq0==null)return new Result("-1", "主键为空!");
|
|
||||||
if(yq0==null||yq0.isEmpty())return new Result("-1", "主键为空!");
|
|
||||||
if(ybh0==null||ybh0.isEmpty())return new Result("-1", "主键为空!");
|
|
||||||
for (LabResult labResult : labResultList) {
|
|
||||||
Date jyrq = labResult.getJyrq();
|
|
||||||
String yq = labResult.getYq();
|
|
||||||
String ybh = labResult.getYbh();
|
|
||||||
String xmdh = labResult.getXmdh();
|
|
||||||
if(jyrq==null)return new Result("-1", "主键为空!");
|
|
||||||
if(yq==null||yq.isEmpty())return new Result("-1", "主键为空!");
|
|
||||||
if(ybh==null||ybh.isEmpty())return new Result("-1", "主键为空!");
|
|
||||||
if(xmdh==null||xmdh.isEmpty())return new Result("-1", "主键为空!");
|
|
||||||
}
|
|
||||||
//commonUtil.delLabResultAll(jyrq0,yq0,ybh0);
|
|
||||||
for (LabResult labResult : labResultList) {
|
|
||||||
if(labResult.getChangeflag() != null && labResult.getChangeflag()==2) {
|
|
||||||
commonUtil.delLabResult(labResult);
|
|
||||||
commonUtil.insertLabResult(labResult);
|
|
||||||
labResult.setChangeflag(0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return saveresult(labResultList);
|
|
||||||
}
|
|
||||||
public Result saveallresult(Date jyrq, String yq, String ybh) {
|
public Result saveallresult(Date jyrq, String yq, String ybh) {
|
||||||
List<LabResult> labResultList = commonUtil.getLabResultList(jyrq, yq, ybh);
|
List<LabResult> labResultList = commonUtil.getLabResultList(jyrq, yq, ybh);
|
||||||
return saveresult(labResultList);
|
return saveresult(labResultList);
|
||||||
@ -727,7 +700,9 @@ public class LisWorkcom extends LisWorkBase{
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public Result changePatColumn(Date jyrq, String yq, String ybh, String column, String value) {
|
public Result changePatColumn(Date jyrq, String yq, String ybh, String column, String value) {
|
||||||
String jgbz = commonUtil.getLabPatJgbz(jyrq, yq, ybh);
|
LabPat labPat0 = commonUtil.getLabPatOne(jyrq, yq, ybh);
|
||||||
|
if(!canmodifysample(labPat0))return new Result("-1","目标标本不可修改");
|
||||||
|
String jgbz = labPat0.getJgbz();
|
||||||
if ("2".equals(jgbz)) return new Result("-1", "结果已审核禁止修改!");
|
if ("2".equals(jgbz)) return new Result("-1", "结果已审核禁止修改!");
|
||||||
if ("5".equals(jgbz)) return new Result("-1", "结果已锁定禁止修改!");
|
if ("5".equals(jgbz)) return new Result("-1", "结果已锁定禁止修改!");
|
||||||
if ("1".equals(jgbz)) return new Result("-1", "结果已初审禁止修改!");
|
if ("1".equals(jgbz)) return new Result("-1", "结果已初审禁止修改!");
|
||||||
@ -830,6 +805,7 @@ public class LisWorkcom extends LisWorkBase{
|
|||||||
String xmdh = labResult.getXmdh();
|
String xmdh = labResult.getXmdh();
|
||||||
if ("".equals(xmdh) || xmdh == null) return new Result("-1", "项目代号不能为空!");
|
if ("".equals(xmdh) || xmdh == null) return new Result("-1", "项目代号不能为空!");
|
||||||
LabPat labPat = commonUtil.getLabPatOne(jyrq, yq, ybh);
|
LabPat labPat = commonUtil.getLabPatOne(jyrq, yq, ybh);
|
||||||
|
|
||||||
if(labPat==null){
|
if(labPat==null){
|
||||||
labPat=new LabPat();
|
labPat=new LabPat();
|
||||||
labPat.setJyrq(jyrq);
|
labPat.setJyrq(jyrq);
|
||||||
@ -840,7 +816,7 @@ public class LisWorkcom extends LisWorkBase{
|
|||||||
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(!canmodifysample(labPat))return new Result("-1","目标标本不可修改");
|
||||||
boolean nowjz = checknowjz(labPat);
|
boolean nowjz = checknowjz(labPat);
|
||||||
XmInfo xmInfo = commonUtil.getXmInfo(yq, xmdh);
|
XmInfo xmInfo = commonUtil.getXmInfo(yq, xmdh);
|
||||||
List<XmAlarmdetail> getXmAlarmdetail = commonUtil.getXmAlarmdetail(yq, xmdh);
|
List<XmAlarmdetail> getXmAlarmdetail = commonUtil.getXmAlarmdetail(yq, xmdh);
|
||||||
@ -864,9 +840,11 @@ public class LisWorkcom extends LisWorkBase{
|
|||||||
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 ("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(!canmodifysample(labPat))return new Result("-1","目标标本不可修改");
|
||||||
boolean nowjz = checknowjz(labPat);
|
boolean nowjz = checknowjz(labPat);
|
||||||
changeresultf(labPat, labResult, nowjz);
|
changeresultf(labPat, labResult, nowjz);
|
||||||
return new Result("0", "保存成功");
|
return new Result("0", "保存成功");
|
||||||
@ -1017,6 +995,7 @@ public class LisWorkcom extends LisWorkBase{
|
|||||||
if (brly == null) brly = "";
|
if (brly == null) brly = "";
|
||||||
if (yljg == null || yljg.isEmpty()) yljg = commonUtil.getLabInstr(yq).getYljg();
|
if (yljg == null || yljg.isEmpty()) yljg = commonUtil.getLabInstr(yq).getYljg();
|
||||||
LabPat labPat = commonUtil.getLabPatOne(jyrq, yq, ybh);
|
LabPat labPat = commonUtil.getLabPatOne(jyrq, yq, ybh);
|
||||||
|
if(!canmodifysample(labPat))return new Result("-1","目标标本不可修改");
|
||||||
boolean newpatinfo = true;
|
boolean newpatinfo = true;
|
||||||
if (labPat != null) {
|
if (labPat != null) {
|
||||||
String jgbz = labPat.getJgbz();
|
String jgbz = labPat.getJgbz();
|
||||||
@ -1124,6 +1103,7 @@ public class LisWorkcom extends LisWorkBase{
|
|||||||
}
|
}
|
||||||
public Result newPatInfo(Date jyrq, String ybh, String sqh, String yq, int problemId) {
|
public Result newPatInfo(Date jyrq, String ybh, String sqh, String yq, int problemId) {
|
||||||
LabPat labPat = commonUtil.getLabPatOne(jyrq, yq, ybh);
|
LabPat labPat = commonUtil.getLabPatOne(jyrq, yq, ybh);
|
||||||
|
if(!canmodifysample(labPat))return new Result("-1","目标标本不可修改");
|
||||||
boolean newpatinfo = true;
|
boolean newpatinfo = true;
|
||||||
if (labPat != null) {
|
if (labPat != null) {
|
||||||
String jgbz = labPat.getJgbz();
|
String jgbz = labPat.getJgbz();
|
||||||
|
|||||||
@ -7,6 +7,7 @@ import com.czlis.common.core.domain.Result;
|
|||||||
import com.czlis.common.core.domain.entity.lis.LabPat;
|
import com.czlis.common.core.domain.entity.lis.LabPat;
|
||||||
import com.czlis.common.core.domain.entity.lis.LabResult;
|
import com.czlis.common.core.domain.entity.lis.LabResult;
|
||||||
import com.czlis.common.enums.BusinessType;
|
import com.czlis.common.enums.BusinessType;
|
||||||
|
import com.czlis.liswork.mapper.LisWorkPageInfoMapper;
|
||||||
import com.czlis.liswork.service.LisWorkOperService;
|
import com.czlis.liswork.service.LisWorkOperService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
@ -144,6 +145,12 @@ public class LisWorkOperController extends BaseController {
|
|||||||
public Result delsample(Date jyrq, String yq, String ybh) {
|
public Result delsample(Date jyrq, String yq, String ybh) {
|
||||||
return lisWorkOperService.delsample(jyrq, yq, ybh);
|
return lisWorkOperService.delsample(jyrq, yq, ybh);
|
||||||
}
|
}
|
||||||
|
@Log(title = "主界面",businessType = BusinessType.UPDATE)
|
||||||
|
@ApiOperation("指定为某样本复查结果")
|
||||||
|
@GetMapping("/setredosample")
|
||||||
|
public Result setredosample(Date jyrq, String yq, String ybh, String newyq, String newybh) {
|
||||||
|
return lisWorkOperService.setredosample(jyrq,yq,ybh,newyq,newybh);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -25,4 +25,5 @@ public interface LisWorkOperService {
|
|||||||
Result calcsample(Date jyrq, String yq, String ybh);
|
Result calcsample(Date jyrq, String yq, String ybh);
|
||||||
String getitemlmtflag(String yq, String xmdh, String csjg);
|
String getitemlmtflag(String yq, String xmdh, String csjg);
|
||||||
Result reglimit(Date jyrq, String yq, String ybh, String yhdh, String qrr, String phone, String tzfs);
|
Result reglimit(Date jyrq, String yq, String ybh, String yhdh, String qrr, String phone, String tzfs);
|
||||||
|
Result setredosample(Date jyrq, String yq, String ybh, String newyq, String newybh);
|
||||||
}
|
}
|
||||||
@ -194,4 +194,8 @@ public class LisWorkGermServiceImpl implements LisWorkGermService {
|
|||||||
commonUtil.delLabResultMed(labResultmed);
|
commonUtil.delLabResultMed(labResultmed);
|
||||||
return new Result("0","成功");
|
return new Result("0","成功");
|
||||||
}
|
}
|
||||||
|
private String getmedfalg(LabResultMed labResultmed){
|
||||||
|
|
||||||
|
return "";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,33 +5,41 @@ import com.czlis.common.core.domain.entity.lis.*;
|
|||||||
import com.czlis.common.utils.*;
|
import com.czlis.common.utils.*;
|
||||||
import com.czlis.common.core.domain.Result;
|
import com.czlis.common.core.domain.Result;
|
||||||
import com.czlis.interfaceCommon.utils.*;
|
import com.czlis.interfaceCommon.utils.*;
|
||||||
|
import com.czlis.liswork.mapper.LisWorkPageInfoMapper;
|
||||||
import com.czlis.liswork.service.LisWorkOperService;
|
import com.czlis.liswork.service.LisWorkOperService;
|
||||||
|
|
||||||
|
import com.sun.org.apache.bcel.internal.generic.RETURN;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
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;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class LisWorkOperServiceImpl implements LisWorkOperService {
|
public class LisWorkOperServiceImpl implements LisWorkOperService {
|
||||||
|
@Autowired
|
||||||
|
LisWorkPageInfoMapper lisWorkPageInfoMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
CommonUtil commonUtil;
|
CommonUtil commonUtil;
|
||||||
@Autowired
|
@Autowired
|
||||||
LisWorkUtils lisWorkUtils;
|
LisWorkUtils lisWorkUtils;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Result newPatInfo(Date jyrq, String ybh, String sqh, String yq) {
|
public Result newPatInfo(Date jyrq, String ybh, String sqh, String yq) {
|
||||||
int problemId = ServletUtils.getParameterToInt("problemId", 0);
|
int problemId = ServletUtils.getParameterToInt("problemId", 0);
|
||||||
return lisWorkUtils.newPatInfo(jyrq, ybh, sqh, yq, problemId);
|
return lisWorkUtils.newPatInfo(jyrq, ybh, sqh, yq, problemId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Result delsample(Date jyrq, String yq, String ybh) {
|
public Result delsample(Date jyrq, String yq, String ybh) {
|
||||||
int problemId = ServletUtils.getParameterToInt("problemId", 0);
|
int problemId = ServletUtils.getParameterToInt("problemId", 0);
|
||||||
String yhdh = SecurityUtils.getLoginUser().getUsername();
|
String yhdh = SecurityUtils.getLoginUser().getUsername();
|
||||||
return lisWorkUtils.delsample(jyrq, yq, ybh, yhdh, problemId);
|
return lisWorkUtils.delsample(jyrq, yq, ybh, yhdh, problemId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Result changePat(LabPat labPat) {
|
public Result changePat(LabPat labPat) {
|
||||||
int problemId = JsonParamUtils.getParameterToInt("problemId", 0);
|
int problemId = JsonParamUtils.getParameterToInt("problemId", 0);
|
||||||
@ -84,6 +92,7 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改病人信息,输入病人代号需要单独处理
|
* 修改病人信息,输入病人代号需要单独处理
|
||||||
|
*
|
||||||
* @param jyrq 检验日期
|
* @param jyrq 检验日期
|
||||||
* @param yq 仪器
|
* @param yq 仪器
|
||||||
* @param ybh 样本号
|
* @param ybh 样本号
|
||||||
@ -93,19 +102,25 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Result changePatColumn(Date jyrq, String yq, String ybh, String column, String value) {
|
public Result changePatColumn(Date jyrq, String yq, String ybh, String column, String value) {
|
||||||
|
|
||||||
int problemId = ServletUtils.getParameterToInt("problemId", 0);
|
int problemId = ServletUtils.getParameterToInt("problemId", 0);
|
||||||
if ("brdh".equals(column)) {
|
if ("brdh".equals(column)) {
|
||||||
return lisWorkUtils.newPat(jyrq, ybh, yq, value, "", "", problemId);
|
return lisWorkUtils.newPat(jyrq, ybh, yq, value, "", "", problemId);
|
||||||
}
|
}
|
||||||
if("sqh".equals(column)){return lisWorkUtils.newPatInfo(jyrq, ybh, value, yq, problemId);}
|
if ("sqh".equals(column)) {
|
||||||
|
return lisWorkUtils.newPatInfo(jyrq, ybh, value, yq, problemId);
|
||||||
|
}
|
||||||
return lisWorkUtils.changePatColumn(jyrq, yq, ybh, column, value);
|
return lisWorkUtils.changePatColumn(jyrq, yq, ybh, column, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Result newresult(LabResult labResult) {
|
public Result newresult(LabResult labResult) {
|
||||||
return lisWorkUtils.newresult(labResult);
|
return lisWorkUtils.newresult(labResult);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改结果
|
* 修改结果
|
||||||
|
*
|
||||||
* @param labResult 一行结果
|
* @param labResult 一行结果
|
||||||
* @return 返回状态
|
* @return 返回状态
|
||||||
*/
|
*/
|
||||||
@ -113,12 +128,15 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
|
|||||||
public Result changeresult(LabResult labResult) {
|
public Result changeresult(LabResult labResult) {
|
||||||
return lisWorkUtils.changeresult(labResult);
|
return lisWorkUtils.changeresult(labResult);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public Result saveReqInfo(LabReqmain labReqmain, LabPat labPat, boolean newpatinfo) {
|
public Result saveReqInfo(LabReqmain labReqmain, LabPat labPat, boolean newpatinfo) {
|
||||||
return lisWorkUtils.saveReqInfo(labReqmain, labPat, newpatinfo);
|
return lisWorkUtils.saveReqInfo(labReqmain, labPat, newpatinfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取新样本默认值
|
* 获取新样本默认值
|
||||||
|
*
|
||||||
* @param jyrq 检验日期
|
* @param jyrq 检验日期
|
||||||
* @param yq 仪器
|
* @param yq 仪器
|
||||||
* @param ybh 样本号
|
* @param ybh 样本号
|
||||||
@ -134,6 +152,7 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
|
|||||||
labPat = lisWorkUtils.loaddefault(labPat);
|
labPat = lisWorkUtils.loaddefault(labPat);
|
||||||
return new Result("0", "完成", labPat);
|
return new Result("0", "完成", labPat);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 审核报告单全流程
|
* 审核报告单全流程
|
||||||
*
|
*
|
||||||
@ -148,20 +167,50 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
|
|||||||
int problemId = ServletUtils.getParameterToInt("problemId", 0);
|
int problemId = ServletUtils.getParameterToInt("problemId", 0);
|
||||||
return lisWorkUtils.confirm(jyrq, yq, ybh, hdys, problemId);
|
return lisWorkUtils.confirm(jyrq, yq, ybh, hdys, problemId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Result confirm1(Date jyrq, String yq, String ybh, String hdys) {
|
public Result confirm1(Date jyrq, String yq, String ybh, String hdys) {
|
||||||
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存所有结果的修正值,涉及:空结果清除,计算项目添加,添加单位,添加申请项目编码,参考值重新计算更新,结果标志重新计算更新,危急值标志计算更新
|
* 保存所有结果的修正值,涉及:空结果清除,计算项目添加,添加单位,添加申请项目编码,参考值重新计算更新,结果标志重新计算更新,危急值标志计算更新
|
||||||
*
|
*
|
||||||
* @param labResult 结果集合
|
* @param labResultList 结果集合
|
||||||
* @return 返回
|
* @return 返回
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Result saveallresult(List<LabResult> labResult) {
|
public Result saveallresult(List<LabResult> labResultList) {
|
||||||
return lisWorkUtils.saveallresult(labResult);
|
if (labResultList == null || labResultList.isEmpty()) return new Result("-1", "结果集为空!");
|
||||||
|
Date jyrq0 = labResultList.get(0).getJyrq();
|
||||||
|
String yq0 = labResultList.get(0).getYq();
|
||||||
|
String ybh0 = labResultList.get(0).getYbh();
|
||||||
|
if (jyrq0 == null) return new Result("-1", "主键为空!");
|
||||||
|
if (yq0 == null || yq0.isEmpty()) return new Result("-1", "主键为空!");
|
||||||
|
if (ybh0 == null || ybh0.isEmpty()) return new Result("-1", "主键为空!");
|
||||||
|
LabPat labPat = commonUtil.getLabPatOne(jyrq0, yq0, ybh0);
|
||||||
|
if (!lisWorkUtils.canmodifysample(labPat)) return new Result("-1", "目标标本不可修改");
|
||||||
|
|
||||||
|
for (LabResult labResult : labResultList) {
|
||||||
|
Date jyrq = labResult.getJyrq();
|
||||||
|
String yq = labResult.getYq();
|
||||||
|
String ybh = labResult.getYbh();
|
||||||
|
String xmdh = labResult.getXmdh();
|
||||||
|
if (jyrq == null) return new Result("-1", "主键为空!");
|
||||||
|
if (yq == null || yq.isEmpty()) return new Result("-1", "主键为空!");
|
||||||
|
if (ybh == null || ybh.isEmpty()) return new Result("-1", "主键为空!");
|
||||||
|
if (xmdh == null || xmdh.isEmpty()) return new Result("-1", "主键为空!");
|
||||||
|
}
|
||||||
|
//commonUtil.delLabResultAll(jyrq0,yq0,ybh0);
|
||||||
|
for (LabResult labResult : labResultList) {
|
||||||
|
if (labResult.getChangeflag() != null && labResult.getChangeflag() == 2) {
|
||||||
|
commonUtil.delLabResult(labResult);
|
||||||
|
commonUtil.insertLabResult(labResult);
|
||||||
|
labResult.setChangeflag(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return lisWorkUtils.saveresult(labResultList);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -175,6 +224,7 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
|
|||||||
public Result calcsample(Date jyrq, String yq, String ybh) {
|
public Result calcsample(Date jyrq, String yq, String ybh) {
|
||||||
return lisWorkUtils.calcsample(jyrq, yq, ybh);
|
return lisWorkUtils.calcsample(jyrq, yq, ybh);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 计算项目参考值结果异常标志
|
* 计算项目参考值结果异常标志
|
||||||
*
|
*
|
||||||
@ -186,6 +236,7 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
|
|||||||
public Result saverefs(Date jyrq, String yq, String ybh) {
|
public Result saverefs(Date jyrq, String yq, String ybh) {
|
||||||
return lisWorkUtils.saverefs(jyrq, yq, ybh);
|
return lisWorkUtils.saverefs(jyrq, yq, ybh);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取常用取值结果标志
|
* 获取常用取值结果标志
|
||||||
*
|
*
|
||||||
@ -229,6 +280,7 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
|
|||||||
public Result unconfirmlog(Date jyrq, String yq, String ybh, String hdys, String reason) {
|
public Result unconfirmlog(Date jyrq, String yq, String ybh, String hdys, String reason) {
|
||||||
return lisWorkUtils.unconfirmlog(jyrq, yq, ybh, hdys, reason);
|
return lisWorkUtils.unconfirmlog(jyrq, yq, ybh, hdys, reason);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 撤销审核报告单全流程
|
* 撤销审核报告单全流程
|
||||||
*
|
*
|
||||||
@ -242,12 +294,15 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
|
|||||||
public Result unconfirm(Date jyrq, String yq, String ybh, String yhdh) {
|
public Result unconfirm(Date jyrq, String yq, String ybh, String yhdh) {
|
||||||
return lisWorkUtils.unconfirm(jyrq, yq, ybh, yhdh);
|
return lisWorkUtils.unconfirm(jyrq, yq, ybh, yhdh);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Result unconfirm1(Date jyrq, String yq, String ybh, String yhdh) {
|
public Result unconfirm1(Date jyrq, String yq, String ybh, String yhdh) {
|
||||||
return lisWorkUtils.unconfirm1(jyrq, yq, ybh, yhdh);
|
return lisWorkUtils.unconfirm1(jyrq, yq, ybh, yhdh);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 登记危急值记录
|
* 登记危急值记录
|
||||||
|
*
|
||||||
* @param jyrq 检验日期
|
* @param jyrq 检验日期
|
||||||
* @param yq 仪器
|
* @param yq 仪器
|
||||||
* @param ybh 样本号
|
* @param ybh 样本号
|
||||||
@ -263,4 +318,64 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
|
|||||||
return lisWorkUtils.reglimit(jyrq, yq, ybh, yhdh, qrr, phone, tzfs, problemId);
|
return lisWorkUtils.reglimit(jyrq, yq, ybh, yhdh, qrr, phone, tzfs, problemId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Result setredosample(Date jyrq, String yq, String ybh, String newyq, String newybh) {
|
||||||
|
if (jyrq == null) return new Result("-1", "检验日期不允许为空");
|
||||||
|
if (yq == null || "".equals(yq)) return new Result("-1", "仪器不允许为空");
|
||||||
|
if (ybh == null || "".equals(ybh)) return new Result("-1", "样本号不允许为空");
|
||||||
|
if (newyq == null || "".equals(newyq)) return new Result("-1", "目标仪器不允许为空");
|
||||||
|
if (newybh == null || "".equals(newybh)) return new Result("-1", "目标样本号不允许为空");
|
||||||
|
LabPat labPat = commonUtil.getLabPatOne(jyrq, newyq, newybh);
|
||||||
|
String jgbz = labPat.getJgbz();
|
||||||
|
if (jgbz == null || "".equals(jgbz)) return new Result("-1", "目标样本不存在");
|
||||||
|
List<LabResult> labResultlist = commonUtil.getLabResultList(jyrq, yq, ybh);
|
||||||
|
if (labResultlist.isEmpty()) return new Result("-1", "当前样本结果不存在");
|
||||||
|
if (!lisWorkUtils.canmodifysample(labPat)) return new Result("-1", "目标标本不可修改");
|
||||||
|
LabResultRe labResultRe = new LabResultRe();
|
||||||
|
labResultRe.setJyrq(jyrq);
|
||||||
|
labResultRe.setYq(newyq);
|
||||||
|
labResultRe.setYbh(newybh);
|
||||||
|
lisWorkPageInfoMapper.deleteRedo(labResultRe);
|
||||||
|
List<LabResult> labResultlist0 = commonUtil.getLabResultList(jyrq, newyq, newybh);
|
||||||
|
for (LabResult labResult : labResultlist) {
|
||||||
|
String xmdh = labResult.getXmdh();
|
||||||
|
if (xmdh != null || !xmdh.isEmpty()) {
|
||||||
|
List<LabResult> labResultlist1 = labResultlist0.stream().filter(xm -> xmdh.equals(xm.getXmdh())).collect(Collectors.toList());
|
||||||
|
if (labResultlist1.isEmpty()) {
|
||||||
|
LabResult labResult1 = labResultlist1.get(0);
|
||||||
|
String csjg1 = labResult1.getCsjg();
|
||||||
|
labResultRe.setCsjg(csjg1);
|
||||||
|
labResultRe.setXmdh(xmdh);
|
||||||
|
lisWorkPageInfoMapper.insertLabResultRe(labResultRe);
|
||||||
|
labResult1.setCsjg(labResult.getCsjg());
|
||||||
|
labResult1.setOd(labResult.getOd());
|
||||||
|
labResult1.setCutoff(labResult.getCutoff());
|
||||||
|
labResult1.setRedo_flag("1");
|
||||||
|
commonUtil.updateLabResult(labResult1);
|
||||||
|
} else {
|
||||||
|
LabResult labResult1 = new LabResult();
|
||||||
|
labResult1.setJyrq(jyrq);
|
||||||
|
labResult1.setYq(newyq);
|
||||||
|
labResult1.setYbh(newybh);
|
||||||
|
labResult1.setXmmc(labResult.getXmmc());
|
||||||
|
labResult1.setCsjg(labResult.getCsjg());
|
||||||
|
labResult1.setOd(labResult.getOd());
|
||||||
|
labResult1.setCutoff(labResult.getCutoff());
|
||||||
|
commonUtil.insertLabResult(labResult1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
commonUtil.deleteLabGraphAll(jyrq, newyq, newybh);
|
||||||
|
List<LabGraph> LabGraphlist = commonUtil.getLabGraphAll(jyrq, yq, ybh);
|
||||||
|
if (!LabGraphlist.isEmpty()) {
|
||||||
|
for (LabGraph labGraph : LabGraphlist) {
|
||||||
|
labGraph.setYq(newyq);
|
||||||
|
labGraph.setYbh(newybh);
|
||||||
|
commonUtil.insertLabGraph(labGraph);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
lisWorkUtils.saveallresult(jyrq, newyq, newybh);
|
||||||
|
return new Result("0", "成功");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user