diff --git a/src/main/java/com/chint/domain/aggregates/approval/ApprovalLegAddAndChangeBatch.java b/src/main/java/com/chint/domain/aggregates/approval/ApprovalLegAddAndChangeBatch.java index 1c2c7b8d..e93a6a8b 100644 --- a/src/main/java/com/chint/domain/aggregates/approval/ApprovalLegAddAndChangeBatch.java +++ b/src/main/java/com/chint/domain/aggregates/approval/ApprovalLegAddAndChangeBatch.java @@ -13,7 +13,7 @@ import java.util.Map; import java.util.Optional; import java.util.stream.Collectors; -import static com.chint.domain.aggregates.approval.ApprovalMethod.NOTIFY; +import static com.chint.domain.aggregates.approval.ApprovalMethod.APPROVE; import static com.chint.domain.aggregates.approval.ApprovalType.LEG_ADD_CHANGE_BATCH; import static com.chint.infrastructure.constant.LegConstant.LEG_APPROVAL_STATUS_PREPARE; import static com.chint.infrastructure.constant.LegConstant.LEG_APPROVAL_STATUS_SUBMIT; @@ -110,14 +110,14 @@ public class ApprovalLegAddAndChangeBatch extends ApprovalProcess { @Override public ApprovalProcess doSubmitToBpm() { //按照审批类型为行程加入不同的审批事件 - if (this.getApprovalMethod().equals(NOTIFY)) { - //所有被提交审批的被加入知会事件 - String approvalRecordNo = approvalData.getApprovalRecordNo(); - addApprovalEventAndRecord(LegApprovalEvent.notifyEvent(approvalRecordNo)); - } else { + if (this.getApprovalMethod() == null || this.getApprovalMethod().equals(APPROVE)) { //所有被提交审批的被加入审批事件 String approvalRecordNo = approvalData.getApprovalRecordNo(); addApprovalEventAndRecord(LegApprovalEvent.submit(approvalRecordNo)); + } else { + //所有被提交审批的被加入知会事件 + String approvalRecordNo = approvalData.getApprovalRecordNo(); + addApprovalEventAndRecord(LegApprovalEvent.notifyEvent(approvalRecordNo)); } bpmPlatform.submitLegAddOrChangeApproval(approvalData); return this;