From b9d4ccd59dac857323a59249a4104b88f6339fad Mon Sep 17 00:00:00 2001 From: xudawei Date: Fri, 7 Feb 2025 14:00:42 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20(REQ-3300)=20VisaHelper=E4=BF=9D?= =?UTF-8?q?=E5=AD=98=E6=93=8D=E4=BD=9C=E6=97=A5=E5=BF=97=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cn/axzo/nanopart/visa/server/service/VisaHelper.java | 5 ++++- .../server/service/impl/ChangeRecordServiceImpl.java | 9 ++------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/visa/visa-server/src/main/java/cn/axzo/nanopart/visa/server/service/VisaHelper.java b/visa/visa-server/src/main/java/cn/axzo/nanopart/visa/server/service/VisaHelper.java index 87538520..56fa8151 100644 --- a/visa/visa-server/src/main/java/cn/axzo/nanopart/visa/server/service/VisaHelper.java +++ b/visa/visa-server/src/main/java/cn/axzo/nanopart/visa/server/service/VisaHelper.java @@ -33,7 +33,10 @@ public class VisaHelper { //oldContext为空,newContext不为空,则是新增; // 操作日志:只有状态变更,没有属性变更日志 if (Objects.isNull(oldContext) && Objects.nonNull(newContext)) { - changeRecordLogService.batchAddLog(newContext.getChangeRecord().getId(), newContext.getStatus().getLogType(), VisaLogParam.builder().build()); + changeRecordLogService.batchAddLog(newContext.getChangeRecord().getId(), newContext.getStatus().getLogType(), VisaLogParam.builder() + .personId(newContext.getPersonId()) + .ouId(newContext.getOuId()) + .workspaceId(newContext.getWorkspaceId()).build()); changeRecordService.changeDbStatus(newContext.getChangeRecord().getId(), VisaStatusEnum.allStatus(), newContext.getStatus()); return; } diff --git a/visa/visa-server/src/main/java/cn/axzo/nanopart/visa/server/service/impl/ChangeRecordServiceImpl.java b/visa/visa-server/src/main/java/cn/axzo/nanopart/visa/server/service/impl/ChangeRecordServiceImpl.java index fedfa60d..af33273e 100644 --- a/visa/visa-server/src/main/java/cn/axzo/nanopart/visa/server/service/impl/ChangeRecordServiceImpl.java +++ b/visa/visa-server/src/main/java/cn/axzo/nanopart/visa/server/service/impl/ChangeRecordServiceImpl.java @@ -56,7 +56,6 @@ import cn.axzo.nanopart.visa.server.rpc.ApolloConstructionAreaGateway; import cn.axzo.nanopart.visa.server.rpc.DrawingMajorGateway; import cn.axzo.nanopart.visa.server.rpc.MsgCenterGateway; import cn.axzo.nanopart.visa.server.rpc.OrganizationalUnitGateway; -import cn.axzo.nanopart.visa.server.rpc.VisaCooperateShipGateway; import cn.axzo.nanopart.visa.server.rpc.VisaOrganizationalNodeUserGateway; import cn.axzo.nanopart.visa.server.rpc.VisaProfileGateway; import cn.axzo.nanopart.visa.server.rpc.VisaProjectApiGateway; @@ -210,7 +209,7 @@ public class ChangeRecordServiceImpl extends ServiceImpl preStatusList = this.buildPreStatusAndLog(request.getUpdateStatus()); + List preStatusList = this.buildPreStatus(request.getUpdateStatus()); // 2 更新状态 this.updateVisaStatus(request.getVisaId(), preStatusList, request.getUpdateStatus()); // 3 新增日志 @@ -269,12 +268,8 @@ public class ChangeRecordServiceImpl extends ServiceImpl buildPreStatusAndLog(VisaStatusEnum updateStatus) { + private List buildPreStatus(VisaStatusEnum updateStatus) { List preStatusList; switch (updateStatus) { case DECIDING: