Merge remote-tracking branch 'origin/feature/REQ-3300' into feature/REQ-3300
This commit is contained in:
commit
f540de8ff0
@ -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;
|
||||
}
|
||||
|
||||
@ -211,7 +211,7 @@ public class ChangeRecordServiceImpl extends ServiceImpl<ChangeRecordDao, Change
|
||||
request.check();
|
||||
ChangeRecord changeRecord = this.getById(request.getVisaId());
|
||||
// 1 构建前置状态与日志
|
||||
List<VisaStatusEnum> preStatusList = this.buildPreStatusAndLog(request.getUpdateStatus());
|
||||
List<VisaStatusEnum> preStatusList = this.buildPreStatus(request.getUpdateStatus());
|
||||
// 2 更新状态
|
||||
this.updateVisaStatus(request.getVisaId(), preStatusList, request.getUpdateStatus());
|
||||
// 3 新增日志
|
||||
@ -270,12 +270,8 @@ public class ChangeRecordServiceImpl extends ServiceImpl<ChangeRecordDao, Change
|
||||
|
||||
/**
|
||||
* 更新前置状态
|
||||
* visaId: 变更签证单id
|
||||
* updateStatus: 更新成的状态
|
||||
* logType: 1、对于审批中的操作是必传,原因:审批流审批中,但是变更签证单的状态不变;
|
||||
* 2、对于状态会变更的则不用传logType,比如执行/作废/发起审批,原因:他们会改变变更签证单的状态
|
||||
*/
|
||||
private List<VisaStatusEnum> buildPreStatusAndLog(VisaStatusEnum updateStatus) {
|
||||
private List<VisaStatusEnum> buildPreStatus(VisaStatusEnum updateStatus) {
|
||||
List<VisaStatusEnum> preStatusList;
|
||||
switch (updateStatus) {
|
||||
case DECIDING:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user