更新
This commit is contained in:
+7
-7
@@ -160,7 +160,7 @@ public class EntrustAlterApplyServiceImpl extends ServiceImpl<EntrustAlterApplyM
|
|||||||
}
|
}
|
||||||
EntrustAlterApply oldInfo = super.getById(dto.getId());
|
EntrustAlterApply oldInfo = super.getById(dto.getId());
|
||||||
DLPUser user = SecurityUtils.getUser();
|
DLPUser user = SecurityUtils.getUser();
|
||||||
if (oldInfo.getApplicant().equals(user.getId())) {
|
if (!oldInfo.getApplicant().equals(user.getId())) {
|
||||||
throw new ValidateCodeException("请勿修改其他人的申请信息!");
|
throw new ValidateCodeException("请勿修改其他人的申请信息!");
|
||||||
}
|
}
|
||||||
if (dto.getOpCode() == 1 && oldInfo.getStatus().equals(EntrustAlterApplyStatus.SUBMITTED_WAIT_APPROVE.getStatus())) {
|
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));
|
List<EntrustAlterApplyVO> entrustAlterAppliesVOS = baseMapper.getEntrustAlterApplyVOList(Wrappers.<EntrustAlterApply>query().in("eaa.id",ids));
|
||||||
DLPUser user = SecurityUtils.getUser();
|
DLPUser user = SecurityUtils.getUser();
|
||||||
entrustAlterAppliesVOS.forEach(e -> {
|
entrustAlterAppliesVOS.forEach(e -> {
|
||||||
if (e.getApplicant().equals(user.getId())) {
|
if (!e.getApplicant().equals(user.getId())) {
|
||||||
throw new ValidateCodeException("请勿修改其他人的申请信息!");
|
throw new ValidateCodeException("请勿修改其他人的申请信息!");
|
||||||
}
|
}
|
||||||
if (e.getStatus().equals(EntrustAlterApplyStatus.WAIT_SUBMIT_APPLY.getStatus())) {
|
if (e.getStatus().equals(EntrustAlterApplyStatus.WAIT_SUBMIT_APPLY.getStatus())) {
|
||||||
@@ -207,8 +207,8 @@ public class EntrustAlterApplyServiceImpl extends ServiceImpl<EntrustAlterApplyM
|
|||||||
String entrustmentId = entrustment.getId();
|
String entrustmentId = entrustment.getId();
|
||||||
CaseEvent oldCaseInfo = caseEventService.getById(entrustment.getCaseId());
|
CaseEvent oldCaseInfo = caseEventService.getById(entrustment.getCaseId());
|
||||||
caseEventService.update(Wrappers.<CaseEvent>lambdaUpdate().eq(CaseEvent::getId, entrustment.getCaseId()).set(CaseEvent::getCaseBrief, dto.getCaseBrief()));
|
caseEventService.update(Wrappers.<CaseEvent>lambdaUpdate().eq(CaseEvent::getId, entrustment.getCaseId()).set(CaseEvent::getCaseBrief, dto.getCaseBrief()));
|
||||||
// 添加更新记录 | - 代表换行
|
// 添加更新记录 | <br> 代表换行
|
||||||
updateRecordBuilder.append("操作记录:").append("-该委托案件的案件简要由 [").append(oldCaseInfo.getCaseBrief()).append("] 更改为 [").append(dto.getCaseBrief()).append("] 。");
|
updateRecordBuilder.append("操作记录:").append("<br>该委托案件的案件简要由 [").append(oldCaseInfo.getCaseBrief()).append("] 更改为 [").append(dto.getCaseBrief()).append("] 。");
|
||||||
// 2.修改检材 信息
|
// 2.修改检材 信息
|
||||||
// 这里之所以要取未更新前的信息是为了留痕
|
// 这里之所以要取未更新前的信息是为了留痕
|
||||||
Map<String, EntrustmentIdentificationMaterial> oldInfoMap = entrustmentIdentificationMaterialService.list(Wrappers.<EntrustmentIdentificationMaterial>lambdaQuery()
|
Map<String, EntrustmentIdentificationMaterial> oldInfoMap = entrustmentIdentificationMaterialService.list(Wrappers.<EntrustmentIdentificationMaterial>lambdaQuery()
|
||||||
@@ -236,10 +236,10 @@ public class EntrustAlterApplyServiceImpl extends ServiceImpl<EntrustAlterApplyM
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (index == 1) {
|
if (index == 1) {
|
||||||
updateRecordBuilder.append("-检材信息的更新记录:");
|
updateRecordBuilder.append("<br>检材信息的更新记录:");
|
||||||
}
|
}
|
||||||
updateRecordBuilder
|
updateRecordBuilder
|
||||||
.append("-")
|
.append("<br>")
|
||||||
.append(index++)
|
.append(index++)
|
||||||
.append(".原检材编号为 [")
|
.append(".原检材编号为 [")
|
||||||
.append(oldMaterial.getImNo())
|
.append(oldMaterial.getImNo())
|
||||||
@@ -352,7 +352,7 @@ public class EntrustAlterApplyServiceImpl extends ServiceImpl<EntrustAlterApplyM
|
|||||||
throw new ValidateCodeException("申请记录不存在!");
|
throw new ValidateCodeException("申请记录不存在!");
|
||||||
}
|
}
|
||||||
DLPUser user = SecurityUtils.getUser();
|
DLPUser user = SecurityUtils.getUser();
|
||||||
if (entrustAlterApply.getApplicant().equals(user.getId())) {
|
if (!entrustAlterApply.getApplicant().equals(user.getId())) {
|
||||||
throw new ValidateCodeException("请勿修改其他人的申请信息!");
|
throw new ValidateCodeException("请勿修改其他人的申请信息!");
|
||||||
}
|
}
|
||||||
if (!entrustAlterApply.getStatus().equals(EntrustAlterApplyStatus.APPLY_SUCCESS.getStatus())) {
|
if (!entrustAlterApply.getStatus().equals(EntrustAlterApplyStatus.APPLY_SUCCESS.getStatus())) {
|
||||||
|
|||||||
+3
-1
@@ -625,6 +625,7 @@ public class EntrustmentIdentificationMaterialServiceImpl extends ServiceImpl<En
|
|||||||
if (!flag) {
|
if (!flag) {
|
||||||
throw new RuntimeException(String.format("检材均已受理,无法进行修改保存!"));
|
throw new RuntimeException(String.format("检材均已受理,无法进行修改保存!"));
|
||||||
}
|
}
|
||||||
|
List<EntrustmentIdentificationMaterial> resultList = new ArrayList<>();
|
||||||
for (EntrustmentIdentificationMaterial identificationMaterial : materialList) {
|
for (EntrustmentIdentificationMaterial identificationMaterial : materialList) {
|
||||||
|
|
||||||
// 检查委托原来的状态
|
// 检查委托原来的状态
|
||||||
@@ -748,8 +749,9 @@ public class EntrustmentIdentificationMaterialServiceImpl extends ServiceImpl<En
|
|||||||
if (im == null) {
|
if (im == null) {
|
||||||
throw new RuntimeException(String.format("没有找到 id 为 %s 的检材", identificationMaterial.getId()));
|
throw new RuntimeException(String.format("没有找到 id 为 %s 的检材", identificationMaterial.getId()));
|
||||||
}
|
}
|
||||||
|
resultList.add(im);
|
||||||
}
|
}
|
||||||
return materialList;
|
return resultList;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
+2
-2
@@ -692,8 +692,8 @@ public class EntrustmentServiceImpl extends ServiceImpl<EntrustmentMapper, Entru
|
|||||||
}
|
}
|
||||||
eg.setTotalSampleDes(totalSampleMass.setScale(2, BigDecimal.ROUND_HALF_UP) + item.getUnit());
|
eg.setTotalSampleDes(totalSampleMass.setScale(2, BigDecimal.ROUND_HALF_UP) + item.getUnit());
|
||||||
} else {
|
} else {
|
||||||
eg.setAnalysisSampleDes(item.getSample1RepeatWeigh() + "克");
|
eg.setAnalysisSampleDes(item.getSample1RepeatWeigh() + item.getUnit());
|
||||||
eg.setRetainedSampleDes(item.getSample2RepeatWeigh() + "克");
|
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) + "克");
|
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);
|
materialListForBookVoList.add(eg);
|
||||||
|
|||||||
Reference in New Issue
Block a user