From a22fbfb1ad6ada374d160c18eafa1f11174428e4 Mon Sep 17 00:00:00 2001 From: yjz <3131811435@qq.com> Date: Thu, 1 Feb 2024 19:23:36 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=BE=81=E6=B1=82=E6=84=8F=E8=A7=81?= =?UTF-8?q?=E6=B5=81=E7=A8=8B):=2080192?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../entity/ProcessFbConsultationUserLink.java | 26 ++++++++----- ...cessFbStandardConsultationServiceImpl.java | 37 +++++++++++++++++-- 2 files changed, 50 insertions(+), 13 deletions(-) diff --git a/laws-modules/src/main/java/com/jero/modules/activiti/process/fb/entity/ProcessFbConsultationUserLink.java b/laws-modules/src/main/java/com/jero/modules/activiti/process/fb/entity/ProcessFbConsultationUserLink.java index 60841f8f..a932f23d 100644 --- a/laws-modules/src/main/java/com/jero/modules/activiti/process/fb/entity/ProcessFbConsultationUserLink.java +++ b/laws-modules/src/main/java/com/jero/modules/activiti/process/fb/entity/ProcessFbConsultationUserLink.java @@ -1,23 +1,17 @@ package com.jero.modules.activiti.process.fb.entity; -import java.io.Serializable; -import java.io.UnsupportedEncodingException; -import java.util.Date; -import java.math.BigDecimal; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; -import lombok.Data; -import com.fasterxml.jackson.annotation.JsonFormat; -import org.springframework.format.annotation.DateTimeFormat; -import org.jeecgframework.poi.excel.annotation.Excel; -import com.jero.common.aspect.annotation.Dict; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import lombok.Data; import lombok.EqualsAndHashCode; import lombok.experimental.Accessors; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.jeecgframework.poi.excel.annotation.Excel; + +import java.io.Serializable; /** @@ -66,4 +60,16 @@ public class ProcessFbConsultationUserLink implements Serializable { @Excel(name = "父执行实例流id", width = 15) @ApiModelProperty(value = "父执行实例流id") private java.lang.String parentExecutionId; + /**部门主管级领导原始办理人*/ + @Excel(name = "部门主管级领导原始办理人", width = 15) + @ApiModelProperty(value = "部门主管级领导原始办理人") + private java.lang.String originDepartLeaderId; + /**模块负责人原始办理人*/ + @Excel(name = "模块负责人原始办理人", width = 15) + @ApiModelProperty(value = "模块负责人原始办理人") + private java.lang.String originModuleOwnerId; + /**设计工程师原始办理人*/ + @Excel(name = "设计工程师原始办理人", width = 15) + @ApiModelProperty(value = "设计工程师原始办理人") + private java.lang.String originDesignEngineerId; } diff --git a/laws-modules/src/main/java/com/jero/modules/activiti/process/fb/service/impl/ProcessFbStandardConsultationServiceImpl.java b/laws-modules/src/main/java/com/jero/modules/activiti/process/fb/service/impl/ProcessFbStandardConsultationServiceImpl.java index 412d08aa..32ca9ce8 100644 --- a/laws-modules/src/main/java/com/jero/modules/activiti/process/fb/service/impl/ProcessFbStandardConsultationServiceImpl.java +++ b/laws-modules/src/main/java/com/jero/modules/activiti/process/fb/service/impl/ProcessFbStandardConsultationServiceImpl.java @@ -351,7 +351,8 @@ public class ProcessFbStandardConsultationServiceImpl extends ServiceImpl() .eq(ProcessFbConsultationUserLink::getBusinessId, projectId) .eq(ProcessFbConsultationUserLink::getDesignEngineerId, CurrentUserUtil.getId()) - .set(ProcessFbConsultationUserLink::getDesignEngineerId, toUserId)); + .set(ProcessFbConsultationUserLink::getDesignEngineerId, toUserId) + .set(ProcessFbConsultationUserLink::getOriginDesignEngineerId, CurrentUserUtil.getId())); } // 模块负责人分发/模块负责人汇总填写意见 if (ConsultationTaskKey.MODULE_OWNER_START.equals(taskDefinitionKey) @@ -362,7 +363,8 @@ public class ProcessFbStandardConsultationServiceImpl extends ServiceImpl() .eq(ProcessFbConsultationUserLink::getBusinessId, projectId) .eq(ProcessFbConsultationUserLink::getModuleOwnerId, CurrentUserUtil.getId()) - .set(ProcessFbConsultationUserLink::getModuleOwnerId, toUserId)); + .set(ProcessFbConsultationUserLink::getModuleOwnerId, toUserId) + .set(ProcessFbConsultationUserLink::getOriginModuleOwnerId, CurrentUserUtil.getId())); runtimeService.setVariable(executionId, "moduleOwner", toUserId); } @@ -374,7 +376,8 @@ public class ProcessFbStandardConsultationServiceImpl extends ServiceImpl() .eq(ProcessFbConsultationUserLink::getBusinessId, projectId) .eq(ProcessFbConsultationUserLink::getDepartLeaderId, CurrentUserUtil.getId()) - .set(ProcessFbConsultationUserLink::getDepartLeaderId, toUserId)); + .set(ProcessFbConsultationUserLink::getDepartLeaderId, toUserId) + .set(ProcessFbConsultationUserLink::getOriginDepartLeaderId, CurrentUserUtil.getId())); runtimeService.setVariable(executionId, "departLeader", toUserId); } @@ -417,6 +420,16 @@ public class ProcessFbStandardConsultationServiceImpl extends ServiceImpl() + .eq(ProcessApprovalRecord::getTaskId, taskId) + .isNotNull(ProcessApprovalRecord::getTransferBy)); + // 如果转办过 + if (!Objects.isNull(processApprovalRecord)){ + linkQueryWrapper.eq(ProcessFbConsultationUserLink::getOriginDepartLeaderId, + processApprovalRecord.getOriginUserId()); + } userLinks = processFbConsultationUserLinkService.list(linkQueryWrapper); if (CollectionUtils.isNotEmpty(userLinks)) { userLink = userLinks.get(0); @@ -817,8 +830,11 @@ public class ProcessFbStandardConsultationServiceImpl extends ServiceImpl removeWrapper = new LambdaQueryWrapper<>(); + if (StringUtils.isNotBlank(userLink.getId())){ + removeWrapper.eq(ProcessFbConsultationUserLink::getId, userLink.getId()); + } removeWrapper.eq(ProcessFbConsultationUserLink::getBusinessId, processInfoVO.getBusinessId()); removeWrapper.eq(ProcessFbConsultationUserLink::getDepartLeaderId, CurrentUserUtil.getId()); processFbConsultationUserLinkService.remove(removeWrapper); // 删除原先存储的关联 @@ -1053,6 +1075,7 @@ public class ProcessFbStandardConsultationServiceImpl extends ServiceImpl removeWrapper = new LambdaQueryWrapper<>(); + if (StringUtils.isNotBlank(userLink.getId())){ + removeWrapper.eq(ProcessFbConsultationUserLink::getId, userLink.getId()); + } removeWrapper.eq(ProcessFbConsultationUserLink::getBusinessId, processInfoVO.getBusinessId()); removeWrapper.eq(ProcessFbConsultationUserLink::getDepartLeaderId, CurrentUserUtil.getId()); processFbConsultationUserLinkService.remove(removeWrapper); // 删除原先存储的关联 @@ -1107,6 +1135,7 @@ public class ProcessFbStandardConsultationServiceImpl extends ServiceImpl