|
@@ -95,9 +95,18 @@ public class MedCheckWorkFacade {
|
|
|
throw new CommonException(CommonErrorCode.UPDATE_INFO_FAIL, "存在未生成核查任务!");
|
|
|
}
|
|
|
|
|
|
+ //创建用户集合
|
|
|
Set<Long> creaters = list.stream().map(MedCheckInfo::getJobCreator).collect(Collectors.toSet());
|
|
|
if (creaters != null && !creaters.contains(principleId) || creaters != null && creaters.size() > 1) {
|
|
|
throw new CommonException(CommonErrorCode.UPDATE_INFO_FAIL, "只能取消本人生成任务!");
|
|
|
+ if(creaters!=null)
|
|
|
+ {
|
|
|
+ //移除当前用户如果还有其他用户
|
|
|
+ creaters.remove(principleId);
|
|
|
+ if(creaters.size()>0)
|
|
|
+ {
|
|
|
+ throw new CommonException(CommonErrorCode.UPDATE_INFO_FAIL, "无法取消他人生成任务!");
|
|
|
+ }
|
|
|
}
|
|
|
int i = medCheckInfoFacade.getBaseMapper().deleteBatchCodes(medCheckWorkVO.getBehospitalCodeList());
|
|
|
if (i != 0) {
|