Browse Source

com.biutag.supervision.controller.work.NegativeController#update

feature/tsjb-1.0
wxc 4 weeks ago
parent
commit
306dfc38f6
  1. 41
      src/main/java/com/biutag/supervision/service/NegativeService.java

41
src/main/java/com/biutag/supervision/service/NegativeService.java

@ -112,7 +112,7 @@ public class NegativeService extends ServiceImpl<NegativeMapper, Negative> {
.stream().map(leaderIdCode -> {
VerifyData.BlameLeader blameLeader = new VerifyData.BlameLeader();
List<Blame> blames = blameList.stream().filter(blameObj -> leaderIdCode.equals(blameObj.getLeadIdCode())).toList();
// 取第一<EFBFBD>?
// 取第一
Blame blame = blames.get(0);
BeanUtil.copyProperties(blame, blameLeader);
blameLeader.setBlameIdCodes(blames.stream().map(Blame::getBlameIdCode).toList());
@ -133,7 +133,7 @@ public class NegativeService extends ServiceImpl<NegativeMapper, Negative> {
.setFlowActions(flowActions)
.setApproves(approveService.list(id))
.setIsFav(favService.existsByCurrentUser(id));
// 签收退<EFBFBD>?
// 签收退
if (!flows.isEmpty() && AppConstants.SIGN_RETURN_ACTION_NAME.equals(flows.get(flows.size() - 1).getActionName())) {
detail.setSignReturns(signReturnService.list(id));
}
@ -146,11 +146,11 @@ public class NegativeService extends ServiceImpl<NegativeMapper, Negative> {
if (FlowNodeEnum.isSignFlow(negative.getFlowKey())) {
detail.setMaxDuration(NumberUtil.mul(negative.getMaxSignDuration(), TimeUtil.SECONDS_OF_A_DAY).longValue());
}
// 未延<EFBFBD>?
// 未延
else if (Objects.isNull(negative.getExtensionDays())) {
detail.setMaxDuration(NumberUtil.mul(negative.getMaxHandleDuration(), TimeUtil.SECONDS_OF_A_DAY).longValue());
} else {
// 已延<EFBFBD>?
// 已延
Integer maxDuration = negative.getMaxHandleDuration() + negative.getExtensionDays();
detail.setMaxDuration(NumberUtil.mul(maxDuration, TimeUtil.SECONDS_OF_A_DAY).longValue());
}
@ -160,7 +160,7 @@ public class NegativeService extends ServiceImpl<NegativeMapper, Negative> {
negative.getExtensionDays(),
negative.getFlowKey()));
}
// 判断当前是否 是认定办结环<EFBFBD>?
// 判断当前是否 是认定办结环
if (Objects.nonNull(workId)) {
Boolean confirmationCompletionFlag = (ApprovalFlowEnum.SECOND_APPROVAL.getValue().equals(negative.getApprovalFlow()) && FlowNodeEnum.SECOND_APPROVE.getKey().equals(negative.getFlowKey()))
|| FlowNodeEnum.FIRST_APPROVE.getKey().equals(negative.getFlowKey());
@ -189,7 +189,7 @@ public class NegativeService extends ServiceImpl<NegativeMapper, Negative> {
if (StrUtil.isBlank(negativeDto.getOriginId())) {
String originId = generateOriginId(negativeDto.getProblemSourcesCode(), negativeDto.getBusinessTypeCode());
negative.setOriginId(originId); // 如果是空就生成随机的线索<EFBFBD>?
negative.setOriginId(originId); // 如果是空就生成随机的线索
}
if (StrUtil.isNotBlank(negativeDto.getBusinessTypeCode())) {
@ -206,7 +206,7 @@ public class NegativeService extends ServiceImpl<NegativeMapper, Negative> {
negative.setThreeInvolveDepartId(depart.getId());
negative.setSecondInvolveDepartId(depart.getPid());
} else {
throw new RuntimeException("涉及单位请选择二级或三级单<EFBFBD>?);
throw new RuntimeException("涉及单位请选择二级或三级单位");
}
LocalDateTime now = LocalDateTime.now();
boolean secondFlag = false;
@ -240,7 +240,7 @@ public class NegativeService extends ServiceImpl<NegativeMapper, Negative> {
log.warn("未获取到用户上下文,问题ID:{}", negative.getId());
}
}
save(negative); // 添加一<EFBFBD>?negative 数据
save(negative); // 添加一negative 数据
negativeDto.setId(negative.getId());
if (!negativeDto.getThingFiles().isEmpty()) {
List<NegativeThingFile> files = negativeDto.getThingFiles().stream().map(item -> {
@ -270,7 +270,7 @@ public class NegativeService extends ServiceImpl<NegativeMapper, Negative> {
.setProblemSourcesCode(negative.getProblemSourcesCode())
.setUpdateTime(now)
.setCreateTime(now);
workService.save(work); // 添加一<EFBFBD>?negative_work 数据 工作状<EFBFBD>?
workService.save(work); // 添加一条 negative_work 数据 工作状态
FirstDistributeData firstDistributeData = new FirstDistributeData();
BeanUtil.copyProperties(negativeDto, firstDistributeData);
@ -282,7 +282,7 @@ public class NegativeService extends ServiceImpl<NegativeMapper, Negative> {
.setWorkId(work.getId())
.setNextFlowKey(FlowNodeEnum.SECOND_SIGN.getKey())
.setData(firstDistributeData);
SpringUtil.getBean(FlowService.class).execute(actionDto); // 创建一条历史数<EFBFBD>?
SpringUtil.getBean(FlowService.class).execute(actionDto); // 创建一条历史数
return negative;
}
@ -301,10 +301,10 @@ public class NegativeService extends ServiceImpl<NegativeMapper, Negative> {
.setBusinessTypeCode(businessTypeCode)
.setPoliceType(NegativeApiDto.BusinessType.getPoliceType(item.getBusinessTypeName()))
.setPoliceTypeName(NegativeApiDto.BusinessType.getPoliceTypeName(item.getBusinessTypeName()))
// 导入的数据都是警务调<EFBFBD>?
// 导入的数据都是警务调
.setProblemSources(ProblemSourcesEnum.JWDC.getLabel())
.setProblemSourcesCode(ProblemSourcesEnum.JWDC.getValue())
// 警务调查默认<EFBFBD>?37工作<EFBFBD>?
// 警务调查默认为137工作制
.setTimeLimit(TimeLimitEnum.WORK_137.getValue())
.setMaxSignDuration(TimeLimitEnum.WORK_137.getMaxSignDuration())
.setMaxHandleDuration(TimeLimitEnum.WORK_137.getMaxHandleDuration())
@ -341,7 +341,7 @@ public class NegativeService extends ServiceImpl<NegativeMapper, Negative> {
.setCurrentProcessingObject(String.format("%s专班", dept.getShortName()));
}
}
// jwpy直接算现场督察大<EFBFBD>?
// jwpy直接算现场督察大
negative.setIssuingDepartId(JWPY_DEPARTID);
negative.setIssuingDepartName(JWPY_DEPART_NAME);
save(negative);
@ -373,7 +373,7 @@ public class NegativeService extends ServiceImpl<NegativeMapper, Negative> {
.setCreateTime(now);
workService.save(firstWork);
} else {
log.error("未匹配上单位:{}<EFBFBD>?code: {}", item.getDepartName(), item.getDepartCode());
log.error("未匹配上单位:{}code: {}", item.getDepartName(), item.getDepartCode());
departId = AppConstants.ROOT_DEPART_ID;
departName = AppConstants.ROOT_DEPART_NAME;
roleCode = RoleCodeEnum.FIRST_ADMIN.getCode();
@ -417,17 +417,17 @@ public class NegativeService extends ServiceImpl<NegativeMapper, Negative> {
public boolean remove(String id) {
removeById(id);
negativeHistoryService.removeById(id);
// 工作<EFBFBD>?
// 工作
workService.remove(new LambdaQueryWrapper<NegativeWork>().eq(NegativeWork::getNegativeId, id));
// 收藏<EFBFBD>?
// 收藏
favService.remove(new LambdaQueryWrapper<NegativeFav>().eq(NegativeFav::getNegativeId, id));
// 事件详情描述<EFBFBD>?
// 事件详情描述
thingFileService.remove(new LambdaQueryWrapper<NegativeThingFile>().eq(NegativeThingFile::getNegativeId, id));
// 涉及人员
blameService.remove(id);
// 核查附件
fileService.remove(new LambdaQueryWrapper<NegativeFile>().eq(NegativeFile::getNegtiveId, id));
// 签收退<EFBFBD>?
// 签收退
signReturnService.remove(new LambdaQueryWrapper<NegativeSignReturn>().eq(NegativeSignReturn::getNegativeId, id));
// 申请延期
extensionApplyService.remove(new LambdaQueryWrapper<NegativeExtensionApply>().eq(NegativeExtensionApply::getNegativeId, id));
@ -442,7 +442,7 @@ public class NegativeService extends ServiceImpl<NegativeMapper, Negative> {
if (CollUtil.isEmpty(histories) || CollUtil.isEmpty(applys)) {
return;
}
// 1. 按部<EFBFBD>?
// 1. 按部
Map<String, NegativeHistory> countersignHistoryMap = new HashMap<>();
for (NegativeHistory history : histories) {
if ("提交会签".equals(history.getActionName()) && StrUtil.isNotBlank(history.getDepartName())) {
@ -452,7 +452,7 @@ public class NegativeService extends ServiceImpl<NegativeMapper, Negative> {
if (countersignHistoryMap.isEmpty()) {
return;
}
// 2. 回填会签人信<EFBFBD>? 校验部门
// 2. 回填会签人信 校验部门
for (CountersignApply apply : applys) {
List<NegativeCountersign> countersigns = apply.getCountersigns();
if (CollUtil.isEmpty(countersigns)) {
@ -527,5 +527,4 @@ public class NegativeService extends ServiceImpl<NegativeMapper, Negative> {
}
}

Loading…
Cancel
Save