批量打印

This commit is contained in:
tangw 2026-07-08 18:07:51 +08:00
parent 449b0173b0
commit 309b0003a5
3 changed files with 20 additions and 8 deletions

View File

@ -363,9 +363,9 @@ public class LisWorkBase {
}
}
}
String yhdh = SecurityUtils.getLoginUser().getUsername();
String yhdh = getusername();
if (labPat.getYhdh() == null || labPat.getYhdh().isEmpty())
labPat.setYhdh(SecurityUtils.getLoginUser().getUsername());
labPat.setYhdh(yhdh);
labPat.setLastuser(yhdh);
labPat.setLastdt(ldt_now);
Integer shcs = labPat.getShcs();

View File

@ -72,7 +72,6 @@ public class BatchAdjustServiceImpl implements BatchAdjustService {
labPat.setYq(yq);
labPat.setYbh(ybh);
labPat.setLastuser(userId);
labPat.setJgbz("1");
labPat.setLastdt(commonUtil.getCurrentTime());
commonUtil.updateLabPat(labPat);
}

View File

@ -53,7 +53,17 @@ public class BatchInServiceImpl implements BatchInService {
List<String> ybhList = (List) result.getData();
List<String> resultList = new ArrayList<>();
for (String ybh : ybhList) {
boolean newPat=false;
LabPat labPatOne = commonUtil.getLabPatOne(batchInVO.getJyrq(), batchInVO.getYq(), ybh);
if(labPatOne==null){
newPat=true;
labPatOne.setJyrq(batchInVO.getJyrq());
labPatOne.setYbh(ybh);
labPatOne.setYq(batchInVO.getYq());
labPatOne.setJgbz("0");
labPatOne.setYhdh(batchInVO.getYhdh());
}
if(!lisWorkcom.canmodifysample(labPatOne)) return new Result("-1","样本号:"+ybh+",没有修改权限!");
List<LabInputmdlDetail> labInputmdlDetailList = batchInVO.getLabInputmdlDetailList();
for (LabInputmdlDetail labInputmdlDetail : labInputmdlDetailList) {
@ -73,9 +83,6 @@ public class BatchInServiceImpl implements BatchInService {
//labResult1.setJgbz("M");
applicationContext.getBean(BatchInServiceImpl.class).updateLabResult(labResult1);
//增加计算项目
lisWorkcom.calcsample(batchInVO.getJyrq(), yq, ybh);
}
//更新标本上传标志和操作员
@ -83,12 +90,18 @@ public class BatchInServiceImpl implements BatchInService {
labPat.setLastuser(batchInVO.getYhdh());
labPat.setLastdt(commonUtil.getCurrentTime());
labPat.setJgbz("0");
labPat.setYblx(batchInVO.getYblx());
if(!"".equals(batchInVO.getYblx())&&batchInVO.getYblx()!=null)labPat.setYblx(batchInVO.getYblx());
labPat.setJyrq(batchInVO.getJyrq());
labPat.setYq(yq);
labPat.setYbh(ybh);
commonUtil.updateLabPat(labPat);
if(newPat){
commonUtil.insertLabPat(labPat);
}else{
commonUtil.updateLabPat(labPat);
}
resultList.add("样本号:"+ybh+",添加成功!");
//增加计算项目
lisWorkcom.calcsample(batchInVO.getJyrq(), yq, ybh);
//写日志
lisWorkcom.setpatLog(batchInVO.getJyrq(), yq, batchInVO.getYbh(), batchInVO.getYhdh());
}