|
|
|
@ -83,12 +83,8 @@ public class EntrustAlterApplyServiceImpl extends ServiceImpl<EntrustAlterApplyM |
|
|
|
|
@Override |
|
|
|
|
public EntrustAlterApplyVO save(EntrustAlterApplyDTO dto) { |
|
|
|
|
// 对当前委托进行校验,如果有关联该委托的申请信息,判断状态如果不是已完成则提示先完成当前申请
|
|
|
|
|
List<EntrustAlterApply> preApplyInfo = super.list(Wrappers.<EntrustAlterApply>lambdaQuery().eq(EntrustAlterApply::getEntrustId, dto.getEntrustId())); |
|
|
|
|
if (CollUtil.isNotEmpty(preApplyInfo)) { |
|
|
|
|
List<EntrustAlterApply> unfinishedList = preApplyInfo.stream().filter(e -> !e.getStatus().equals(EntrustAlterApplyStatus.FINISHED.getStatus())).collect(Collectors.toList()); |
|
|
|
|
if (CollUtil.isNotEmpty(unfinishedList)) { |
|
|
|
|
throw new ValidateCodeException("该委托存在未完成的申请信息,请先完成其他申请后再进行申请修改!"); |
|
|
|
|
} |
|
|
|
|
if (isApplying(dto.getEntrustId())) { |
|
|
|
|
throw new ValidateCodeException("该委托存在未完成的申请信息,请先完成其他申请后再进行申请修改!"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
EntrustAlterApply entrustAlterApply = new EntrustAlterApply(); |
|
|
|
@ -281,6 +277,23 @@ public class EntrustAlterApplyServiceImpl extends ServiceImpl<EntrustAlterApplyM |
|
|
|
|
.set(dto.getFinished(), EntrustAlterApply::getStatus, EntrustAlterApplyStatus.FINISHED.getStatus())); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 判断当前委托是否在申请中的状态 |
|
|
|
|
* @param entrustId |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
@Override |
|
|
|
|
public Boolean isApplying(String entrustId) { |
|
|
|
|
List<EntrustAlterApply> preApplyInfo = super.list(Wrappers.<EntrustAlterApply>lambdaQuery().eq(EntrustAlterApply::getEntrustId, entrustId)); |
|
|
|
|
if (CollUtil.isNotEmpty(preApplyInfo)) { |
|
|
|
|
List<EntrustAlterApply> unfinishedList = preApplyInfo.stream().filter(e -> !e.getStatus().equals(EntrustAlterApplyStatus.FINISHED.getStatus())).collect(Collectors.toList()); |
|
|
|
|
if (CollUtil.isNotEmpty(unfinishedList)) { |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 更新鉴定要求 |
|
|
|
|
* @param entrustmentId |
|
|
|
|