主程序
This commit is contained in:
parent
e0e9df33a3
commit
a2d94ed107
@ -173,7 +173,9 @@ public class CommonUtil {
|
|||||||
}
|
}
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public int updateLabPatJgbz(Date jyrq, String yq, String ybh,String jgbz){return updateLabPatByColumn(jyrq,yq,ybh,"jgbz",jgbz);}
|
public int updateLabPatJgbz(Date jyrq, String yq, String ybh,String jgbz){return updateLabPatByColumn(jyrq,yq,ybh,"jgbz",jgbz);}
|
||||||
public int updateLabPatByColumn(Date jyrq, String yq, String ybh,String column,String jgbz){return labPatMapper.updateLabPatByColumn(jyrq,yq,ybh,column,jgbz);}
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public int updateLabPatByColumn(Date jyrq, String yq, String ybh,String column,String jgbz){
|
||||||
|
return labPatMapper.updateLabPatByColumn(jyrq,yq,ybh,column,jgbz);}
|
||||||
|
|
||||||
public int getCountByKey(Date jyrq, String yq, String ybh) {
|
public int getCountByKey(Date jyrq, String yq, String ybh) {
|
||||||
return labPatMapper.getCountByKey(jyrq, yq, ybh);
|
return labPatMapper.getCountByKey(jyrq, yq, ybh);
|
||||||
|
|||||||
@ -151,6 +151,17 @@ public class LisWorkOperController extends BaseController {
|
|||||||
public Result setredosample(Date jyrq, String yq, String ybh, String newyq, String newybh) {
|
public Result setredosample(Date jyrq, String yq, String ybh, String newyq, String newybh) {
|
||||||
return lisWorkOperService.setredosample(jyrq,yq,ybh,newyq,newybh);
|
return lisWorkOperService.setredosample(jyrq,yq,ybh,newyq,newybh);
|
||||||
}
|
}
|
||||||
|
@Log(title = "主界面")
|
||||||
|
@ApiOperation("锁定报告")
|
||||||
|
@GetMapping("/locksample")
|
||||||
|
public Result locksample(Date jyrq, String yq, String ybh, String yhdh) {
|
||||||
|
return lisWorkOperService.locksample(jyrq, yq, ybh, yhdh);
|
||||||
|
}
|
||||||
|
@Log(title = "主界面")
|
||||||
|
@ApiOperation("解锁报告")
|
||||||
|
@GetMapping("/unlocksample")
|
||||||
|
public Result unlocksample(Date jyrq, String yq, String ybh, String yhdh) {
|
||||||
|
return lisWorkOperService.unlocksample(jyrq, yq, ybh, yhdh);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -26,4 +26,6 @@ public interface LisWorkOperService {
|
|||||||
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);
|
Result setredosample(Date jyrq, String yq, String ybh, String newyq, String newybh);
|
||||||
|
Result locksample(Date jyrq, String yq, String ybh, String yhdh);
|
||||||
|
Result unlocksample(Date jyrq, String yq, String ybh, String yhdh);
|
||||||
}
|
}
|
||||||
@ -4,6 +4,7 @@ package com.czlis.liswork.service.impl;
|
|||||||
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.*;
|
||||||
import com.czlis.common.core.domain.Result;
|
import com.czlis.common.core.domain.Result;
|
||||||
|
import com.czlis.interfaceCommon.constants.LabPatConstants;
|
||||||
import com.czlis.interfaceCommon.utils.*;
|
import com.czlis.interfaceCommon.utils.*;
|
||||||
import com.czlis.liswork.mapper.LisWorkPageInfoMapper;
|
import com.czlis.liswork.mapper.LisWorkPageInfoMapper;
|
||||||
import com.czlis.liswork.service.LisWorkOperService;
|
import com.czlis.liswork.service.LisWorkOperService;
|
||||||
@ -341,7 +342,7 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
|
|||||||
String xmdh = labResult.getXmdh();
|
String xmdh = labResult.getXmdh();
|
||||||
if (xmdh != null || !xmdh.isEmpty()) {
|
if (xmdh != null || !xmdh.isEmpty()) {
|
||||||
List<LabResult> labResultlist1 = labResultlist0.stream().filter(xm -> xmdh.equals(xm.getXmdh())).collect(Collectors.toList());
|
List<LabResult> labResultlist1 = labResultlist0.stream().filter(xm -> xmdh.equals(xm.getXmdh())).collect(Collectors.toList());
|
||||||
if (labResultlist1.isEmpty()) {
|
if (!labResultlist1.isEmpty()) {
|
||||||
LabResult labResult1 = labResultlist1.get(0);
|
LabResult labResult1 = labResultlist1.get(0);
|
||||||
String csjg1 = labResult1.getCsjg();
|
String csjg1 = labResult1.getCsjg();
|
||||||
labResultRe.setCsjg(csjg1);
|
labResultRe.setCsjg(csjg1);
|
||||||
@ -357,7 +358,7 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
|
|||||||
labResult1.setJyrq(jyrq);
|
labResult1.setJyrq(jyrq);
|
||||||
labResult1.setYq(newyq);
|
labResult1.setYq(newyq);
|
||||||
labResult1.setYbh(newybh);
|
labResult1.setYbh(newybh);
|
||||||
labResult1.setXmmc(labResult.getXmmc());
|
labResult1.setXmdh(labResult.getXmdh());
|
||||||
labResult1.setCsjg(labResult.getCsjg());
|
labResult1.setCsjg(labResult.getCsjg());
|
||||||
labResult1.setOd(labResult.getOd());
|
labResult1.setOd(labResult.getOd());
|
||||||
labResult1.setCutoff(labResult.getCutoff());
|
labResult1.setCutoff(labResult.getCutoff());
|
||||||
@ -378,4 +379,40 @@ public class LisWorkOperServiceImpl implements LisWorkOperService {
|
|||||||
return new Result("0", "成功");
|
return new Result("0", "成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Result locksample(Date jyrq, String yq, String ybh, String yhdh) {
|
||||||
|
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", "成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Result unlocksample(Date jyrq, String yq, String ybh, String yhdh) {
|
||||||
|
if (yhdh == null || yhdh.isEmpty()) return new Result("-1", "解锁者为空,无法解锁报告!");
|
||||||
|
LabPat labPat = commonUtil.getLabPatOne(jyrq, yq, ybh);
|
||||||
|
String jgbz = labPat.getJgbz();
|
||||||
|
if (!"5".equals(jgbz)) return new Result("-1", "未锁定报告解锁失败!");
|
||||||
|
if (!commonUtil.getUserPower(yq, yhdh, 10)) {
|
||||||
|
if (commonUtil.getUserPower(yq, yhdh, 17)) {
|
||||||
|
if(yhdh.equals(labPat.getYhdh())||yhdh.equals(labPat.getHdys())||yhdh.equals(labPat.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", "成功");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user