master
杨海航 4 months ago
parent f1361ac84d
commit 154772ec66
  1. 14
      src/main/java/digital/laboratory/platform/entrustment/service/impl/EntrustAlterApplyServiceImpl.java
  2. 4
      src/main/java/digital/laboratory/platform/entrustment/service/impl/EntrustmentIdentificationMaterialServiceImpl.java
  3. 4
      src/main/java/digital/laboratory/platform/entrustment/service/impl/EntrustmentServiceImpl.java

@ -160,7 +160,7 @@ public class EntrustAlterApplyServiceImpl extends ServiceImpl<EntrustAlterApplyM
}
EntrustAlterApply oldInfo = super.getById(dto.getId());
DLPUser user = SecurityUtils.getUser();
if (oldInfo.getApplicant().equals(user.getId())) {
if (!oldInfo.getApplicant().equals(user.getId())) {
throw new ValidateCodeException("请勿修改其他人的申请信息!");
}
if (dto.getOpCode() == 1 && oldInfo.getStatus().equals(EntrustAlterApplyStatus.SUBMITTED_WAIT_APPROVE.getStatus())) {
@ -183,7 +183,7 @@ public class EntrustAlterApplyServiceImpl extends ServiceImpl<EntrustAlterApplyM
List<EntrustAlterApplyVO> entrustAlterAppliesVOS = baseMapper.getEntrustAlterApplyVOList(Wrappers.<EntrustAlterApply>query().in("eaa.id",ids));
DLPUser user = SecurityUtils.getUser();
entrustAlterAppliesVOS.forEach(e -> {
if (e.getApplicant().equals(user.getId())) {
if (!e.getApplicant().equals(user.getId())) {
throw new ValidateCodeException("请勿修改其他人的申请信息!");
}
if (e.getStatus().equals(EntrustAlterApplyStatus.WAIT_SUBMIT_APPLY.getStatus())) {
@ -207,8 +207,8 @@ public class EntrustAlterApplyServiceImpl extends ServiceImpl<EntrustAlterApplyM
String entrustmentId = entrustment.getId();
CaseEvent oldCaseInfo = caseEventService.getById(entrustment.getCaseId());
caseEventService.update(Wrappers.<CaseEvent>lambdaUpdate().eq(CaseEvent::getId, entrustment.getCaseId()).set(CaseEvent::getCaseBrief, dto.getCaseBrief()));
// 添加更新记录 | - 代表换行
updateRecordBuilder.append("操作记录:").append("-该委托案件的案件简要由 [").append(oldCaseInfo.getCaseBrief()).append("] 更改为 [").append(dto.getCaseBrief()).append("] 。");
// 添加更新记录 | <br> 代表换行
updateRecordBuilder.append("操作记录:").append("<br>该委托案件的案件简要由 [").append(oldCaseInfo.getCaseBrief()).append("] 更改为 [").append(dto.getCaseBrief()).append("] 。");
// 2.修改检材 信息
// 这里之所以要取未更新前的信息是为了留痕
Map<String, EntrustmentIdentificationMaterial> oldInfoMap = entrustmentIdentificationMaterialService.list(Wrappers.<EntrustmentIdentificationMaterial>lambdaQuery()
@ -236,10 +236,10 @@ public class EntrustAlterApplyServiceImpl extends ServiceImpl<EntrustAlterApplyM
continue;
}
if (index == 1) {
updateRecordBuilder.append("-检材信息的更新记录:");
updateRecordBuilder.append("<br>检材信息的更新记录:");
}
updateRecordBuilder
.append("-")
.append("<br>")
.append(index++)
.append(".原检材编号为 [")
.append(oldMaterial.getImNo())
@ -352,7 +352,7 @@ public class EntrustAlterApplyServiceImpl extends ServiceImpl<EntrustAlterApplyM
throw new ValidateCodeException("申请记录不存在!");
}
DLPUser user = SecurityUtils.getUser();
if (entrustAlterApply.getApplicant().equals(user.getId())) {
if (!entrustAlterApply.getApplicant().equals(user.getId())) {
throw new ValidateCodeException("请勿修改其他人的申请信息!");
}
if (!entrustAlterApply.getStatus().equals(EntrustAlterApplyStatus.APPLY_SUCCESS.getStatus())) {

@ -625,6 +625,7 @@ public class EntrustmentIdentificationMaterialServiceImpl extends ServiceImpl<En
if (!flag) {
throw new RuntimeException(String.format("检材均已受理,无法进行修改保存!"));
}
List<EntrustmentIdentificationMaterial> resultList = new ArrayList<>();
for (EntrustmentIdentificationMaterial identificationMaterial : materialList) {
// 检查委托原来的状态
@ -748,8 +749,9 @@ public class EntrustmentIdentificationMaterialServiceImpl extends ServiceImpl<En
if (im == null) {
throw new RuntimeException(String.format("没有找到 id 为 %s 的检材", identificationMaterial.getId()));
}
resultList.add(im);
}
return materialList;
return resultList;
}
@Override

@ -692,8 +692,8 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
}
eg.setTotalSampleDes(totalSampleMass.setScale(2, BigDecimal.ROUND_HALF_UP) + item.getUnit());
} else {
eg.setAnalysisSampleDes(item.getSample1RepeatWeigh() + "克");
eg.setRetainedSampleDes(item.getSample2RepeatWeigh() + "克");
eg.setAnalysisSampleDes(item.getSample1RepeatWeigh() + item.getUnit());
eg.setRetainedSampleDes(item.getSample2RepeatWeigh() + item.getUnit());
eg.setTotalSampleDes((item.getSample1RepeatWeigh() == null ? new BigDecimal(0) : item.getSample1RepeatWeigh()).add(item.getSample2RepeatWeigh() == null ? new BigDecimal(0) : item.getSample2RepeatWeigh()).setScale(2, BigDecimal.ROUND_HALF_UP) + "克");
}
materialListForBookVoList.add(eg);

Loading…
Cancel
Save