Merge remote-tracking branch 'hs/dev/feat/partner1.1_20230727' into dev/feat/partner1.1_20230727

This commit is contained in:
zhangchenbiao
2023-07-25 16:58:10 +08:00
5 changed files with 39 additions and 21 deletions

View File

@@ -22,6 +22,8 @@ public interface HyInspectionMapper {
HyInspectionDO selectByPrimaryKey(Long id);
HyInspectionDO selectByInterviewPlanId(Long interviewPlanId);
int updateByPrimaryKeySelective(HyInspectionDO record);
int updateByPrimaryKey(HyInspectionDO record);

View File

@@ -28,7 +28,18 @@
<include refid="Base_Column_List" />
from hy_inspection
where id = #{id}
and deleted = 0
</select>
<!-- 使用 interviewPlanId 查询面试稽核信息 -->
<select id="selectByInterviewPlanId" resultType="com.cool.store.entity.HyInspectionDO">
select
<include refid="Base_Column_List" />
from hy_inspection
where interview_plan_id = #{interviewPlanId}
and deleted = 0
</select>
<select id="interviewInspectionGetList" resultType="com.cool.store.vo.interview.InterviewInspectionVO">
SELECT
eu.`name` AS interviewerName,

View File

@@ -217,21 +217,21 @@ public class HyPartnerIntentInfoServiceImpl implements HyPartnerIntentInfoServic
hyPartnerUserInfoDO.setWantShopArea(request.getWantShopArea());
hyPartnerUserInfoDO.setAcceptAdjustType(request.getAcceptAdjustType());
hyPartnerUserInfoDAO.updateByPrimaryKeySelective(hyPartnerUserInfoDO);
// 更新线索状态和招商经理
//是公海线索 才会修改线索状态招商经理
if (LineStatusEnum.PUBLIC_SEAS.getCode().equals(hyPartnerLineInfoDO.getLineStatus())){
Boolean flag = hyPartnerLineInfoService.assignFollowUser(request.getPartnerId(), request.getWantShopArea(), request.getAcceptAdjustType());
hyPartnerLineInfoDO.setLineStatus(flag ? LineStatusEnum.PRIVATE_SEAS.getCode() : LineStatusEnum.PUBLIC_SEAS.getCode());
if (flag){
String investmentManager = hyPartnerLineInfoService.getAssignFollowUser(request.getPartnerId(), "intent");
hyPartnerLineInfoDO.setInvestmentManager(investmentManager);
userIdList.add(investmentManager);
}
hyPartnerLineInfoDAO.updateByPrimaryKeySelective(hyPartnerLineInfoDO);
}
// 更新线索状态招商经理
//是公海线索 才会修改线索状态与招商经理
if (LineStatusEnum.PUBLIC_SEAS.getCode().equals(hyPartnerLineInfoDO.getLineStatus())){
Boolean flag = hyPartnerLineInfoService.assignFollowUser(request.getPartnerId(), request.getWantShopArea(), request.getAcceptAdjustType());
hyPartnerLineInfoDO.setLineStatus(flag ? LineStatusEnum.PRIVATE_SEAS.getCode() : LineStatusEnum.PUBLIC_SEAS.getCode());
if (flag){
String investmentManager = hyPartnerLineInfoService.getAssignFollowUser(request.getPartnerId(), "intent");
hyPartnerLineInfoDO.setInvestmentManager(investmentManager);
userIdList.add(investmentManager);
}
hyPartnerLineInfoDAO.updateByPrimaryKeySelective(hyPartnerLineInfoDO);
if(flag){//分配招商经理成功才发送分配招商经理的飞书工作通知
noticeService.sendFeiShuNotice(FeiShuNoticeMsgEnum.ALLOCATION_INVESTMENT_MANAGER,userIdList,DateUtil.formatDateTime(new Date()),hyPartnerUserInfoDO.getUsername(),hyPartnerUserInfoDO.getMobile());
}
if(flag){//分配招商经理成功才发送分配招商经理的飞书工作通知
noticeService.sendFeiShuNotice(FeiShuNoticeMsgEnum.ALLOCATION_INVESTMENT_MANAGER,userIdList,DateUtil.formatDateTime(new Date()),hyPartnerUserInfoDO.getUsername(),hyPartnerUserInfoDO.getMobile());
}
}
if(!isUpdateIntentInfo){

View File

@@ -315,17 +315,10 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
hyPartnerLineInfoDAO.updateByPrimaryKeySelective(hyPartnerLineInfoDO);
List<HyPartnerLineInfoDO> lineFollowHistoryList = hyPartnerLineInfoDAO.getLineFollowHistoryList(hyPartnerLineInfo.getPartnerId());
HyPartnerLineInfoDO newHyPartnerLineInfoDO = new HyPartnerLineInfoDO();
newHyPartnerLineInfoDO.setPartnerId(hyPartnerLineInfo.getPartnerId());
newHyPartnerLineInfoDO.setWorkflowStage(WorkflowStageEnum.INTENT.getCode());
newHyPartnerLineInfoDO.setWorkflowStatus(WorkflowStatusEnum.INTENT_0.getCode());
log.info("lineFollowHistoryList_1:{}",JSONObject.toJSONString(lineFollowHistoryList));
if (CollectionUtils.isNotEmpty(lineFollowHistoryList)){
String investmentManager = lineFollowHistoryList.get(0).getInvestmentManager();
newHyPartnerLineInfoDO.setInvestmentManager(investmentManager);
status = LineStatusEnum.PRIVATE_SEAS.getCode();
}
newHyPartnerLineInfoDO.setLineStatus(status);
hyPartnerLineInfoDAO.insertSelective(newHyPartnerLineInfoDO);

View File

@@ -8,11 +8,13 @@ import com.cool.store.dto.calendar.DeleteCalendarEventDTO;
import com.cool.store.dto.calendar.UserCalendarsEventDTO;
import com.cool.store.dto.log.ReInterviewDTO;
import com.cool.store.dto.log.RejectInterviewDTO;
import com.cool.store.entity.HyInspectionDO;
import com.cool.store.entity.HyPartnerInterviewDO;
import com.cool.store.enums.*;
import com.cool.store.exception.ApiException;
import com.cool.store.exception.ServiceException;
import com.cool.store.http.ISVHttpRequest;
import com.cool.store.mapper.HyInspectionMapper;
import com.cool.store.mapper.HyPartnerInterviewMapper;
import com.cool.store.mapper.HyPartnerInterviewPlanMapper;
import com.cool.store.request.CloseFollowRequest;
@@ -48,6 +50,9 @@ public class InterviewWorkFlowService extends WorkFlowBaseService {
@Autowired
private HyPartnerInterviewPlanMapper hyPartnerInterviewPlanMapper;
@Autowired
private HyInspectionMapper inspectionMapper;
@Autowired
private InterviewService interviewService;
@@ -85,6 +90,13 @@ public class InterviewWorkFlowService extends WorkFlowBaseService {
if(userCalendarsEventDTO == null ){
throw new ApiException(ErrorCodeEnum.FEISHU_DELETE_SCHEDULE_ERROR);
}
} else if (Integer.parseInt(WorkflowStatusEnum.INTERVIEW_6.getCode()) == interviewBaseInfo.getStatus()) {
//删除稽核信息
HyInspectionDO rawHyInspection = inspectionMapper.selectByInterviewPlanId(interviewBaseInfo.getInterviewPlanId());
HyInspectionDO hyInspection = new HyInspectionDO();
hyInspection.setId(rawHyInspection.getId());
hyInspection.setDeleted(Boolean.TRUE);
inspectionMapper.updateByPrimaryKeySelective(hyInspection);
}
interviewService.rejectInterviewAndSuspendLine(interviewBaseInfo.getId(),interviewBaseInfo.getInterviewPlanId(),null);
//记录日志