条件控制

This commit is contained in:
苏竹红
2024-07-16 16:29:52 +08:00
parent 5d46a10b4f
commit 5b29cdd0f9
2 changed files with 7 additions and 1 deletions

View File

@@ -197,6 +197,9 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
if (lineInfo == null){
throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST);
}
if ( !WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_70.getCode().equals(lineInfo.getWorkflowSubStageStatus())) {
throw new ServiceException(ErrorCodeEnum.LINE_STATUS_NOT_ALLOW_OPERATE);
}
LineInfoDO updateLine = new LineInfoDO();
updateLine.setId(lineInfo.getId());
updateLine.setWorkflowStage(WorkflowStageEnum.STORE.getCode());

View File

@@ -78,11 +78,14 @@ public class LinePayServiceImpl implements LinePayService {
@Override
public Boolean skipPay(Long lineId, LoginUserInfo user) {
log.info("skipIntentAgreement lineId:{},操作人:{}",lineId,user.getName());
log.info("skipPay lineId:{},操作人:{}",lineId,user.getName());
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(lineId);
if (lineInfo == null) {
throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST);
}
if ( !WorkflowSubStageStatusEnum.PAY_DEPOSIT_45.getCode().equals(lineInfo.getWorkflowSubStageStatus())) {
throw new ServiceException(ErrorCodeEnum.LINE_STATUS_NOT_ALLOW_OPERATE);
}
lineInfo.setWorkflowSubStage(WorkflowSubStageEnum.SIGN_INTENT_AGREEMENT.getCode());
lineInfo.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_70.getCode());
lineInfo.setUpdateTime(new Date());