@@ -84,9 +84,9 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
lineInfoDO . setWorkflowSubStageStatus ( WorkflowSubStageStatusEnum . SIGN_INTENT_AGREEMENT_63 . getCode ( ) ) ;
lineInfoMapper . updateByPrimaryKeySelective ( lineInfoDO ) ;
Map < String , String > requestMap = new HashMap < > ( ) ;
requestMap . put ( " partnerUsername " , lineInfoDO . getUsername ( ) ) ;
requestMap . put ( " partnerMobile " , lineInfoDO . getMobile ( ) ) ;
requestMap . put ( " lineId " , String . valueOf ( lineInfoDO . getId ( ) ) ) ;
requestMap . put ( " partnerUsername " , lineInfoDO . getUsername ( ) ) ;
requestMap . put ( " partnerMobile " , lineInfoDO . getMobile ( ) ) ;
requestMap . put ( " lineId " , String . valueOf ( lineInfoDO . getId ( ) ) ) ;
requestMap . put ( " submitTime " , DateUtils . dateTimeNow ( DateUtils . SPECIAL_DATE_START ) ) ;
commonService . sendMessage ( Collections . singletonList ( lineInfoDO . getInvestmentManager ( ) ) ,
MessageEnum . MESSAGE_30 ,
@@ -160,6 +160,7 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
lineInfo . setWorkflowSubStageStatus ( WorkflowSubStageStatusEnum . SIGN_INTENT_AGREEMENT_65 . getCode ( ) ) ;
lineInfo . setUpdateUserId ( userId ) ;
lineInfoDAO . updateLineInfo ( lineInfo ) ;
commonService . sendSms ( lineInfo . getMobile ( ) , SMSMsgEnum . INTENTION_PROTOCOL_FAIL ) ;
}
//待OA审核code 75 处理逻辑
if ( lineInfo . getWorkflowSubStageStatus ( ) . equals ( WorkflowSubStageStatusEnum . SIGN_INTENT_AGREEMENT_75 . getCode ( ) ) ) {
@@ -168,8 +169,8 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
lineInfoDAO . updateLineInfo ( lineInfo ) ;
//message
Map < String , String > requestMap = new HashMap < > ( ) ;
requestMap . put ( " partnerUsername " , lineInfo . getUsername ( ) ) ;
requestMap . put ( " lineId " , String . valueOf ( lineInfo . getId ( ) ) ) ;
requestMap . put ( " partnerUsername " , lineInfo . getUsername ( ) ) ;
requestMap . put ( " lineId " , String . valueOf ( lineInfo . getId ( ) ) ) ;
requestMap . put ( " submitTime " , DateUtils . dateTimeNow ( DateUtils . SPECIAL_DATE_START ) ) ;
commonService . sendMessage ( Collections . singletonList ( lineInfo . getInvestmentManager ( ) ) ,
MessageEnum . MESSAGE_31 ,
@@ -272,33 +273,39 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
@Override
public Boolean auditResult ( AuditResultRequest request ) {
try {
String kdzBus iness Id = request . getK dzBusinessId( );
String lineId = getLineId ( kdzBusinessId ) ;
if ( StringUtil . isBlank ( lineId ) ) {
throw new ServiceException ( ErrorCodeEnum . BUSINESS_ID_NOT_EXIST ) ;
}
LineInfoDO lineInfoDO = lineInfoMapper . getByLineId ( Long . valueOf ( lineId ) ) ;
if ( Objects . isNull ( lineInfoDO ) ) {
throw new ServiceException ( ErrorCodeEnum . LINE_ID_IS_NOT_EXIST ) ;
}
if ( request . getAuditResult ( ) = = 1 ) {
AuditPassRequest auditPassRequest = new AuditPassRequest ( ) ;
auditPassRequest . setLineId ( lineInfoDO . getId ( ) ) ;
auditPassRequest . setPassReason ( request . getCause ( ) ) ;
auditPassRequest . setWorkflowSubStage ( lineInfoDO . getWorkflowSubStage ( ) ) ;
commonService . getLineFlowService ( auditPassRequest . getWorkflowSubStage ( ) ) . auditPass ( auditPassRequest , null ) ;
} else if ( request . getAuditResult ( ) = = 0 ) {
AuditRejectRequest auditRejectRequest = new AuditRejectRequest ( ) ;
auditRejectRequest . setLineId ( lineInfoDO . getId ( ) ) ;
auditRejectRequest . setWorkflowSubStage ( lineInfoDO . getWorkflowSubStage ( ) ) ;
auditRejectRequest . setRejectPublicReason ( request . getCause ( ) ) ;
auditRejectRequest . setRejectRealReason ( request . getFailureCause ( ) ) ;
commonService . getLineFlowService ( auditRejectRequest . getWorkflowSubStage ( ) ) . auditReject ( auditRejectRequest , null ) ;
}
} catch ( Exception e ) {
throw new ServiceException ( ErrorCodeEnum . UNKNOWN ) ;
String kdzBusinessId = request . getKdzBusinessId ( ) ;
String l ineId = getLineId ( k dzBusinessId) ;
String redisKey = " kdzBusinessId: " + kdzBusinessId ;
if ( StringUtil . isBlank ( lineId ) ) {
throw new ServiceException ( ErrorCodeEnum . BUSINESS_ID_NOT_EXIST ) ;
}
LineInfoDO lineInfoDO = lineInfoMapper . getByLineId ( Long . valueOf ( lineId ) ) ;
if ( Objects . isNull ( lineInfoDO ) ) {
throw new ServiceException ( ErrorCodeEnum . LINE_ID_IS_NOT_EXIST ) ;
}
String auditResult = redisUtilPool . getString ( redisKey ) ;
if ( WorkflowSubStageStatusEnum . SIGN_INTENT_AGREEMENT_70 . getCode ( ) . equals ( lineInfoDO . getWorkflowSubStageStatus ( ) ) ) {
//鲜丰系统不稳定, 会出现调用成功但内部状态未更改的情况, 这时直接返回true即可
return true ;
}
if ( StringUtil . isNotBlank ( auditResult ) & & ! auditResult . equals ( String . valueOf ( request . getAuditResult ( ) ) ) ) {
throw new ServiceException ( ErrorCodeEnum . AUDIT_RESULT_FALSE ) ;
}
if ( request . getAuditResult ( ) = = 1 ) {
AuditPassRequest auditPassRequest = new AuditPassRequest ( ) ;
auditPassRequest . setLineId ( lineInfoDO . getId ( ) ) ;
auditPassRequest . setPassReason ( request . getCause ( ) ) ;
auditPassRequest . setWorkflowSubStage ( lineInfoDO . getWorkflowSubStage ( ) ) ;
commonService . getLineFlowService ( auditPassRequest . getWorkflowSubStage ( ) ) . auditPass ( auditPassRequest , null ) ;
} else if ( request . getAuditResult ( ) = = 0 ) {
AuditRejectRequest auditRejectRequest = new AuditRejectRequest ( ) ;
auditRejectRequest . setLineId ( lineInfoDO . getId ( ) ) ;
auditRejectRequest . setWorkflowSubStage ( lineInfoDO . getWorkflowSubStage ( ) ) ;
auditRejectRequest . setRejectPublicReason ( request . getCause ( ) ) ;
auditRejectRequest . setRejectRealReason ( request . getFailureCause ( ) ) ;
commonService . getLineFlowService ( auditRejectRequest . getWorkflowSubStage ( ) ) . auditReject ( auditRejectRequest , null ) ;
}
redisUtilPool . setString ( redisKey , JSONObject . toJSONString ( request . getAuditResult ( ) ) ) ;
return true ;
}