发起资质审批后刷新线索参加会销状态

This commit is contained in:
feng.li
2023-12-29 16:40:19 +08:00
parent ebba9db657
commit 159aa1d02e
4 changed files with 44 additions and 11 deletions

View File

@@ -170,4 +170,11 @@ public class HyPartnerExhibitionDAO {
} }
hyPartnerExhibitionMapper.updateStatusAfterFinishInterview(Long.parseLong(interviewPlanId)); hyPartnerExhibitionMapper.updateStatusAfterFinishInterview(Long.parseLong(interviewPlanId));
} }
public void updateStatusAfterSubmitQualification(String interviewPlanId) {
if (StringUtils.isEmpty(interviewPlanId)) {
return;
}
hyPartnerExhibitionMapper.updateStatusAfterSubmitQualification(Long.parseLong(interviewPlanId));
}
} }

View File

@@ -129,4 +129,11 @@ public interface HyPartnerExhibitionMapper {
* @return * @return
*/ */
int updateStatusAfterFinishInterview(@Param("interviewPlanId")Long interviewPlanId); int updateStatusAfterFinishInterview(@Param("interviewPlanId")Long interviewPlanId);
/**
* 资质审批通过后更新线索报名会销状态
* @param interviewPlanId
* @return
*/
int updateStatusAfterSubmitQualification(@Param("interviewPlanId") Long interviewPlanId);
} }

View File

@@ -519,4 +519,12 @@
AND interview_plan_id = #{interviewPlanId} AND interview_plan_id = #{interviewPlanId}
</update> </update>
<update id="updateStatusAfterSubmitQualification">
UPDATE hy_partner_exhibition
SET participation_status = 5
WHERE deleted = 0
AND participation_status = 4
AND interview_plan_id = #{interviewPlanId}
</update>
</mapper> </mapper>

View File

@@ -5,15 +5,14 @@ import cn.hutool.core.date.DateUtil;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.TypeReference; import com.alibaba.fastjson.TypeReference;
import com.cool.store.constants.CommonConstants;
import com.cool.store.context.CurrentUserHolder; import com.cool.store.context.CurrentUserHolder;
import com.cool.store.context.LoginUserInfo; import com.cool.store.context.LoginUserInfo;
import com.cool.store.dao.EnterpriseUserDAO; import com.cool.store.dao.EnterpriseUserDAO;
import com.cool.store.dao.HyInterviewDAO; import com.cool.store.dao.HyInterviewDAO;
import com.cool.store.dao.HyPartnerBaseInfoDAO; import com.cool.store.dao.HyPartnerBaseInfoDAO;
import com.cool.store.dao.HyPartnerExhibitionDAO;
import com.cool.store.dto.log.CreateQualifyVerifyDTO; import com.cool.store.dto.log.CreateQualifyVerifyDTO;
import com.cool.store.dto.log.LogBasicDTO; import com.cool.store.dto.log.LogBasicDTO;
import com.cool.store.dto.mdm.AccessTokenDTO;
import com.cool.store.dto.response.DictResultDTO; import com.cool.store.dto.response.DictResultDTO;
import com.cool.store.dto.response.MDMResultDTO; import com.cool.store.dto.response.MDMResultDTO;
import com.cool.store.entity.*; import com.cool.store.entity.*;
@@ -24,11 +23,18 @@ import com.cool.store.http.EventCenterHttpRequest;
import com.cool.store.http.MDMHttpRequest; import com.cool.store.http.MDMHttpRequest;
import com.cool.store.mapper.*; import com.cool.store.mapper.*;
import com.cool.store.oss.OSSServer; import com.cool.store.oss.OSSServer;
import com.cool.store.request.*; import com.cool.store.request.CloseFollowRequest;
import com.cool.store.request.data.flow.KeyText; import com.cool.store.request.CreateQualifyVerifyReq;
import com.cool.store.request.QualificationCallbackReq;
import com.cool.store.request.RpcCreateQualifyVerifyReq;
import com.cool.store.request.data.flow.SkrRelshipProve; import com.cool.store.request.data.flow.SkrRelshipProve;
import com.cool.store.service.*; import com.cool.store.service.FlowService;
import com.cool.store.utils.*; import com.cool.store.service.HyPartnerLineInfoService;
import com.cool.store.service.LogService;
import com.cool.store.service.WechatMiniAppService;
import com.cool.store.utils.CoolDateUtils;
import com.cool.store.utils.PassLetterUtils;
import com.cool.store.utils.RedisUtilPool;
import lombok.SneakyThrows; import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
@@ -38,8 +44,6 @@ import org.springframework.core.io.ByteArrayResource;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import java.io.ByteArrayInputStream; import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;
@@ -105,6 +109,9 @@ public class FlowServiceImpl implements FlowService {
@Autowired @Autowired
private MDMHttpRequest mdmHttpRequest; private MDMHttpRequest mdmHttpRequest;
@Autowired
private HyPartnerExhibitionDAO hyPartnerExhibitionDAO;
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void createQualifyVerify(CreateQualifyVerifyReq request) throws ApiException, IOException { public void createQualifyVerify(CreateQualifyVerifyReq request) throws ApiException, IOException {
@@ -229,7 +236,8 @@ public class FlowServiceImpl implements FlowService {
hyPartnerLineInfoDO.setDevelopmentDirector(request.getDevtDirectorId()); hyPartnerLineInfoDO.setDevelopmentDirector(request.getDevtDirectorId());
hyPartnerLineInfoMapper.updateByPrimaryKeySelective(hyPartnerLineInfoDO); hyPartnerLineInfoMapper.updateByPrimaryKeySelective(hyPartnerLineInfoDO);
} }
//3. 生成通过函并修改数据库相关信息
//5. 生成通过函并修改数据库相关信息
String verifyCity = hyPartnerInterviewMapper.getVerifyCityByInterviewId(request.getInterviewId()); String verifyCity = hyPartnerInterviewMapper.getVerifyCityByInterviewId(request.getInterviewId());
String[] split = verifyCity.split("/"); String[] split = verifyCity.split("/");
//根据长度来取市级行政区域 //根据长度来取市级行政区域
@@ -253,15 +261,18 @@ public class FlowServiceImpl implements FlowService {
//记录日志 //记录日志
CreateQualifyVerifyDTO log = CreateQualifyVerifyDTO.builder().mobile(operator.getMobile()).operateUserId(operator.getUserId()).operateUsername(operator.getName()).operateTime(DateUtil.format(new Date(), CoolDateUtils.DATE_FORMAT_SEC)) CreateQualifyVerifyDTO log = CreateQualifyVerifyDTO.builder().mobile(operator.getMobile()).operateUserId(operator.getUserId()).operateUsername(operator.getName()).operateTime(DateUtil.format(new Date(), CoolDateUtils.DATE_FORMAT_SEC))
.summary(request.getSummary()).qualiVerifyContent(JSON.toJSONString(partnerCertificationInfoDO)).build(); .summary(request.getSummary()).qualiVerifyContent(JSON.toJSONString(partnerCertificationInfoDO)).build();
//是否由会销发起面试 //是否由会销发起
if (request.getWhetherExhibition() == null || Boolean.FALSE.equals(request.getWhetherExhibition())) { if (request.getWhetherExhibition() == null || Boolean.FALSE.equals(request.getWhetherExhibition())) {
logService.recordBizLog(operator,hyPartnerInterviewDO.getPartnerLineId(), OperateTypeEnum.CREATE_QUALIFYVERIFY, log); logService.recordBizLog(operator,hyPartnerInterviewDO.getPartnerLineId(), OperateTypeEnum.CREATE_QUALIFYVERIFY, log);
} else { } else {
//更新线索报名会销状态
hyPartnerExhibitionDAO.updateStatusAfterSubmitQualification(request.getInterviewPlanId());
logService.recordBizLog(operator,hyPartnerInterviewDO.getPartnerLineId(), OperateTypeEnum.EXHIBITION_CREATE_QUALIFYVERIFY, log); logService.recordBizLog(operator,hyPartnerInterviewDO.getPartnerLineId(), OperateTypeEnum.EXHIBITION_CREATE_QUALIFYVERIFY, log);
} }
} }
@Override @Override
@Transactional
public void qualificationCallback(QualificationCallbackReq request) throws ApiException { public void qualificationCallback(QualificationCallbackReq request) throws ApiException {
log.info("MDM800审批成功回调request{}", JSONObject.toJSONString(request)); log.info("MDM800审批成功回调request{}", JSONObject.toJSONString(request));
//1. 信息是否完整 //1. 信息是否完整
@@ -285,7 +296,7 @@ public class FlowServiceImpl implements FlowService {
// TODO pass_reason 暂无 // TODO pass_reason 暂无
//将通过时间修改为本系统处理回调的时间,不以 request 的 modifiedTime 为准(有误) //将通过时间修改为本系统处理回调的时间,不以 request 的 modifiedTime 为准(有误)
Date passDate = new Date(); Date passDate = new Date();
//4. 向面试稽核表中新增一条信息 //4. 向面试稽核表中新增一条信息
HyInspectionDO hyInspectionDO = new HyInspectionDO(); HyInspectionDO hyInspectionDO = new HyInspectionDO();
hyInspectionDO.setInterviewPlanId(Long.parseLong(interviewPlanId)); hyInspectionDO.setInterviewPlanId(Long.parseLong(interviewPlanId));
hyInspectionDO.setCreateTime(DateUtil.formatDateTime(passDate)); hyInspectionDO.setCreateTime(DateUtil.formatDateTime(passDate));