Merge remote-tracking branch 'origin/cc_20230520_partner' into cc_20230520_partner

This commit is contained in:
苏竹红
2023-07-03 17:25:22 +08:00
6 changed files with 38 additions and 10 deletions

View File

@@ -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;
}

View File

@@ -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);
}
}

View File

@@ -331,6 +331,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);