审核回调接口逻辑修改
This commit is contained in:
@@ -14,5 +14,5 @@ import java.io.IOException;
|
||||
public interface FlowService {
|
||||
void createQualifyVerify(CreateQualifyVerifyReq request) throws ApiException, IOException;
|
||||
|
||||
void qualificationCallback(QualificationCallbackReq request);
|
||||
void qualificationCallback(QualificationCallbackReq request) throws ApiException;
|
||||
}
|
||||
|
||||
@@ -23,13 +23,11 @@ import com.cool.store.mapper.HyPartnerCertificationInfoMapper;
|
||||
import com.cool.store.mapper.HyPartnerInterviewMapper;
|
||||
import com.cool.store.mapper.HyPartnerLineInfoMapper;
|
||||
import com.cool.store.oss.OSSServer;
|
||||
import com.cool.store.request.CreateQualifyVerifyReq;
|
||||
import com.cool.store.request.QualificationCallbackReq;
|
||||
import com.cool.store.request.RpcCreateQualifyVerifyReq;
|
||||
import com.cool.store.request.RpcGetMdmTokenReq;
|
||||
import com.cool.store.request.*;
|
||||
import com.cool.store.request.data.flow.KeyText;
|
||||
import com.cool.store.request.data.flow.SkrRelshipProve;
|
||||
import com.cool.store.service.FlowService;
|
||||
import com.cool.store.service.HyPartnerLineInfoService;
|
||||
import com.cool.store.service.LogService;
|
||||
import com.cool.store.utils.*;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -92,6 +90,9 @@ public class FlowServiceImpl implements FlowService {
|
||||
|
||||
@Autowired
|
||||
private LogService logService;
|
||||
|
||||
@Autowired
|
||||
private HyPartnerLineInfoService hyPartnerLineInfoService;
|
||||
@Override
|
||||
@Transactional
|
||||
public void createQualifyVerify(CreateQualifyVerifyReq request) throws ApiException, IOException {
|
||||
@@ -218,7 +219,7 @@ public class FlowServiceImpl implements FlowService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void qualificationCallback(QualificationCallbackReq request) {
|
||||
public void qualificationCallback(QualificationCallbackReq request) throws ApiException {
|
||||
log.info("MDM800审批成功回调,request{}", JSONObject.toJSONString(request));
|
||||
//1. 信息是否完整
|
||||
if (null == request.getInstanceStatus() || "".equals(request.getInstanceStatus())) {
|
||||
@@ -226,11 +227,15 @@ public class FlowServiceImpl implements FlowService {
|
||||
throw new ServiceException("MDM回调错误!");
|
||||
}
|
||||
//根据审核流程 id 获取面试会议相关 id
|
||||
String interviewId = hyPartnerCertificationInfoMapper.getInterviewIdByQualifyVerifyId(request.getInstanceId());
|
||||
String interviewPlanId = hyPartnerCertificationInfoMapper.getInterviewPlanIdByQualifyVerifyId(request.getInstanceId());
|
||||
if (StringUtils.isEmpty(interviewPlanId)) {
|
||||
// String interviewId = hyPartnerCertificationInfoMapper.getInterviewIdByQualifyVerifyId(request.getInstanceId());
|
||||
// String interviewPlanId = hyPartnerCertificationInfoMapper.getInterviewPlanIdByQualifyVerifyId(request.getInstanceId());
|
||||
HyPartnerInterviewDO hyPartnerInterviewDO = hyPartnerInterviewMapper.getInterviewInfoByQualifyVerifyId(request.getInstanceId());
|
||||
if (hyPartnerInterviewDO == null || hyPartnerInterviewDO.getInterviewPlanId() == null) {
|
||||
throw new ServiceException(ErrorCodeEnum.INTERVIEW_NOT_EXIST);
|
||||
}
|
||||
String interviewId = hyPartnerInterviewDO.getId().toString();
|
||||
String interviewPlanId = hyPartnerInterviewDO.getInterviewPlanId().toString();
|
||||
Long partnerLineId = hyPartnerInterviewDO.getPartnerLineId();
|
||||
//审核通过
|
||||
if ("FINISHED".equals(request.getInstanceStatus())) {
|
||||
//更新面试状态
|
||||
@@ -257,6 +262,11 @@ public class FlowServiceImpl implements FlowService {
|
||||
// TODO 4. 修改流程状态到下一阶段 4 分配选址开发经理
|
||||
//审核未通过
|
||||
} else if ("CANCELED".equals(request.getInstanceStatus())) {
|
||||
CloseFollowRequest closeFollowRequest = new CloseFollowRequest();
|
||||
closeFollowRequest.setRejectRealReason("资质审核流程拒绝");
|
||||
closeFollowRequest.setLineId(partnerLineId);
|
||||
closeFollowRequest.setType("reject");
|
||||
hyPartnerLineInfoService.closeOrPassFollow(null,closeFollowRequest);
|
||||
interviewDAO.updateInterviewWorkflowStatus(interviewPlanId, WorkflowStatusEnum.INTERVIEW_7);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -322,6 +322,11 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean closeOrPassFollow(LoginUserInfo user,CloseFollowRequest closeFollowRequest) throws ApiException {
|
||||
//该方法中user可能为空,注意处理空指针的情况
|
||||
if(user == null){
|
||||
user = new LoginUserInfo();
|
||||
}
|
||||
|
||||
HyPartnerLineInfoDO hyPartnerLineInfoDO = hyPartnerLineInfoDAO.selectByPrimaryKeySelective(closeFollowRequest.getLineId());
|
||||
if (hyPartnerLineInfoDO==null){
|
||||
throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST);
|
||||
|
||||
Reference in New Issue
Block a user