Merge remote-tracking branch 'origin/cc_20230520_partner' into cc_20230520_partner
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.cool.store.dao;
|
||||
|
||||
import com.cool.store.dto.partner.AdvanceLineDTO;
|
||||
import com.cool.store.dto.partner.PartnerInterviewInfoDTO;
|
||||
import com.cool.store.dto.partner.SpecialDateRangeInterviewCountDTO;
|
||||
import com.cool.store.entity.HyPartnerInterviewPlanDO;
|
||||
@@ -36,11 +37,11 @@ public class HyPartnerInterviewPlanDAO {
|
||||
* @param currentDate
|
||||
* @return
|
||||
*/
|
||||
public Integer getCurrentDateInterviewCount(String userId,String currentDate){
|
||||
public List<AdvanceLineDTO> getCurrentDateInterviewCount(String userId, String currentDate, String endDate){
|
||||
if (StringUtils.isEmpty(userId)){
|
||||
return 0;
|
||||
return new ArrayList<>();
|
||||
}
|
||||
return hyPartnerInterviewPlanMapper.getCurrentDateInterviewCount(userId,currentDate);
|
||||
return hyPartnerInterviewPlanMapper.getCurrentDateInterviewCount(userId,currentDate,endDate);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -64,11 +64,11 @@ public class HyPartnerLineInfoDAO {
|
||||
}
|
||||
|
||||
|
||||
public Integer getAdventLineCount( String userId, String currentDate){
|
||||
public List<AdvanceLineDTO> getAdventLineCount( String userId, String currentDate,String endDate){
|
||||
if (StringUtils.isEmpty(userId)){
|
||||
return 0;
|
||||
return new ArrayList<>();
|
||||
}
|
||||
return hyPartnerLineInfoMapper.getAdventLineCount(userId,currentDate);
|
||||
return hyPartnerLineInfoMapper.getAdventLineCount(userId,currentDate,endDate);
|
||||
}
|
||||
|
||||
public StageCountDTO selectStagePendingCount(String userId){
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.cool.store.mapper;
|
||||
|
||||
import com.cool.store.dto.message.RemindInterviewMsgDTO;
|
||||
import com.cool.store.dto.partner.AdvanceLineDTO;
|
||||
import com.cool.store.dto.partner.PartnerInterviewInfoDTO;
|
||||
import com.cool.store.dto.partner.SpecialDateRangeInterviewCountDTO;
|
||||
import com.cool.store.entity.HyPartnerInterviewPlanDO;
|
||||
@@ -39,7 +40,7 @@ public interface HyPartnerInterviewPlanMapper {
|
||||
* @param currentDate
|
||||
* @return
|
||||
*/
|
||||
Integer getCurrentDateInterviewCount(@Param("userId") String userId, @Param("currentDate") String currentDate);
|
||||
List<AdvanceLineDTO> getCurrentDateInterviewCount(@Param("userId") String userId, @Param("currentDate") String currentDate, String endDate);
|
||||
|
||||
/**
|
||||
* todo 当天面试数据需要修改
|
||||
|
||||
@@ -61,7 +61,7 @@ public interface HyPartnerLineInfoMapper {
|
||||
* @param currentDate
|
||||
* @return
|
||||
*/
|
||||
Integer getAdventLineCount(@Param("userId") String userId, @Param("currentDate") String currentDate);
|
||||
List<AdvanceLineDTO> getAdventLineCount(@Param("userId") String userId, @Param("currentDate") String currentDate, @Param("endDate") String endDate);
|
||||
|
||||
/**
|
||||
* 招商经理 对应各阶段待处理数据
|
||||
|
||||
@@ -255,17 +255,18 @@
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<select id="getCurrentDateInterviewCount" resultType="java.lang.Integer">
|
||||
select count(1) from hy_partner_interview_plan
|
||||
<select id="getCurrentDateInterviewCount" resultType="com.cool.store.dto.partner.AdvanceLineDTO">
|
||||
select interview_date as date,count(1) as count from hy_partner_interview_plan
|
||||
<where>
|
||||
<if test="userId!=null and userId!=''">
|
||||
and interviewer = #{userId}
|
||||
</if>
|
||||
<if test="currentDate!=null and currentDate!=''">
|
||||
and interview_date = #{currentDate}
|
||||
and interview_date BETWEEN #{currentDate} and #{endDate}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
group by interview_date
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getInterviewCount" resultType="com.cool.store.dto.partner.SpecialDateRangeInterviewCountDTO">
|
||||
|
||||
@@ -278,17 +278,18 @@
|
||||
where id = #{record.id}
|
||||
</update>
|
||||
|
||||
<select id="getAdventLineCount" resultType="java.lang.Integer">
|
||||
select count(1) from hy_partner_line_info
|
||||
<select id="getAdventLineCount" resultType="com.cool.store.dto.partner.AdvanceLineDTO">
|
||||
select DATE(deadline) as date ,count(1) as count from hy_partner_line_info
|
||||
<where>
|
||||
<if test="userId!=null and userId!=''">
|
||||
and investment_manager = #{userId}
|
||||
</if>
|
||||
<if test="currentDate!=null and currentDate!=''">
|
||||
and DATE(deadline) = #{currentDate}
|
||||
and DATE(deadline) BETWEEN #{currentDate} and #{endDate}
|
||||
</if>
|
||||
and (workflow_stage = 2 and workflow_status = 0)
|
||||
</where>
|
||||
group by DATE(deadline)
|
||||
</select>
|
||||
|
||||
<select id="selectStagePendingCount" resultType="com.cool.store.dto.partner.StageCountDTO">
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.cool.store.dto.partner;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2023/7/5 15:52
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class AdvanceLineDTO {
|
||||
|
||||
|
||||
private String date;
|
||||
|
||||
private Integer count;
|
||||
}
|
||||
@@ -7,6 +7,7 @@ import com.cool.store.vo.InterviewScheduleInfoVO;
|
||||
import com.cool.store.vo.StageCountVO;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -22,7 +23,7 @@ public interface DeskService {
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
InterviewPlanVO getInterviewPlan(String userId);
|
||||
HashMap<String, InterviewPlanVO> getInterviewPlan(String userId);
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -6,6 +6,7 @@ import com.cool.store.constants.CommonConstants;
|
||||
import com.cool.store.dao.HyPartnerInterviewPlanDAO;
|
||||
import com.cool.store.dao.HyPartnerLineInfoDAO;
|
||||
import com.cool.store.dto.calendar.UserCalendarsEventDTO;
|
||||
import com.cool.store.dto.partner.AdvanceLineDTO;
|
||||
import com.cool.store.dto.partner.SpecialDateRangeInterviewCountDTO;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.exception.ApiException;
|
||||
@@ -24,9 +25,8 @@ import org.apache.http.client.utils.DateUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
@@ -48,18 +48,35 @@ public class DeskServiceImpl implements DeskService {
|
||||
private ISVHttpRequest isvHttpRequest;
|
||||
|
||||
@Override
|
||||
public InterviewPlanVO getInterviewPlan(String userId) {
|
||||
InterviewPlanVO interviewPlanVO = new InterviewPlanVO();
|
||||
public HashMap<String, InterviewPlanVO> getInterviewPlan(String userId) {
|
||||
|
||||
String currentDate = DateUtil.format(new Date(), CoolDateUtils.DATE_FORMAT_DAY);
|
||||
Integer currentDateInterviewCount = hyPartnerInterviewPlanDAO.getCurrentDateInterviewCount(userId, currentDate);
|
||||
interviewPlanVO.setHasInterview(currentDateInterviewCount>0);
|
||||
String endDate = DateUtil.format(CoolDateUtils.getDateFormatDay(new Date(), 6), CoolDateUtils.DATE_FORMAT_DAY);
|
||||
List<AdvanceLineDTO> currentDateInterviewList = hyPartnerInterviewPlanDAO.getCurrentDateInterviewCount(userId, currentDate,endDate);
|
||||
Map<String, Integer> dateIntegerMap = currentDateInterviewList.stream().collect(Collectors.toMap(AdvanceLineDTO::getDate, AdvanceLineDTO::getCount));
|
||||
//临期数量
|
||||
Integer adventLineCount = hyPartnerLineInfoDAO.getAdventLineCount(userId, currentDate);
|
||||
interviewPlanVO.setHasAdventLine(adventLineCount>0);
|
||||
return interviewPlanVO;
|
||||
List<AdvanceLineDTO> adventLineList = hyPartnerLineInfoDAO.getAdventLineCount(userId, currentDate,endDate);
|
||||
Map<String, Integer> adventLinerMap = adventLineList.stream().collect(Collectors.toMap(AdvanceLineDTO::getDate, AdvanceLineDTO::getCount));
|
||||
|
||||
HashMap<String, InterviewPlanVO> resultMap = new HashMap<>();
|
||||
String tempDate = currentDate;
|
||||
int i = 0;
|
||||
while (true){
|
||||
tempDate = DateUtil.format(CoolDateUtils.getDateFormatDay(new Date(), i++), CoolDateUtils.DATE_FORMAT_DAY);
|
||||
Integer currentDateInterviewCount = dateIntegerMap.getOrDefault(tempDate, 0);
|
||||
Integer adventLineCount = adventLinerMap.getOrDefault(tempDate,0);
|
||||
InterviewPlanVO interviewPlanVO = new InterviewPlanVO();
|
||||
interviewPlanVO.setHasInterview(currentDateInterviewCount>0);
|
||||
interviewPlanVO.setHasAdventLine(adventLineCount>0);
|
||||
resultMap.put(tempDate,interviewPlanVO);
|
||||
if (tempDate.equals(endDate)){
|
||||
break;
|
||||
}
|
||||
}
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public InterviewScheduleInfoVO interviewSchedule(String userId,String selectedData) {
|
||||
if (StringUtils.isEmpty(userId)||selectedData==null){
|
||||
|
||||
@@ -222,9 +222,6 @@ public class HyPartnerBaseInfoServiceImpl implements HyPartnerBaseInfoService {
|
||||
oldBaseInfo.getSex(), oldBaseInfo.getBirthdate(), oldBaseInfo.getNation(), oldBaseInfo.getLiveAddress(), oldBaseInfo.getStatus());
|
||||
newBaseInfo.setStatus(oldBaseInfo.getStatus());
|
||||
hyPartnerBaseInfoDAO.updateByPrimaryKeySelective(newBaseInfo);
|
||||
// 老的身份证信息置空
|
||||
fillBaseInfoIdCard(oldBaseInfo, null, null, null, null, null, null, null, null, null);
|
||||
oldBaseInfo.setStatus(Integer.valueOf(WorkflowStatusEnum.INTENT_0.getCode()));
|
||||
//修改名称
|
||||
HyPartnerUserInfoDO hyPartnerUserInfoDO = hyPartnerUserInfoDAO.selectByPartnerId(newPartnerId);
|
||||
HyPartnerIntentInfoDO oldIntentInfo = hyPartnerIntentInfoDAO.getByPartnerIdAndLineId(oldLineInfo.getPartnerId(), oldLineInfo.getId());
|
||||
@@ -235,6 +232,9 @@ public class HyPartnerBaseInfoServiceImpl implements HyPartnerBaseInfoService {
|
||||
hyPartnerUserInfoDO.setAcceptAdjustType(oldIntentInfo.getAcceptAdjustType());
|
||||
hyPartnerUserInfoDAO.updateByPrimaryKeySelective(hyPartnerUserInfoDO);
|
||||
}
|
||||
// 老的身份证信息置空
|
||||
fillBaseInfoIdCard(oldBaseInfo, null, null, null, null, null, null, null, null, null);
|
||||
oldBaseInfo.setStatus(Integer.valueOf(WorkflowStatusEnum.INTENT_0.getCode()));
|
||||
hyPartnerBaseInfoDAO.updateByPrimaryKey(oldBaseInfo);
|
||||
hyPartnerIntentInfoDAO.updateLineId(newPartnerId,newLindId,oldLineInfo.getId());
|
||||
hyPartnerClerkDAO.updateLineId(newPartnerId,newLindId,oldLineInfo.getId());
|
||||
|
||||
@@ -21,6 +21,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -92,7 +93,7 @@ public class DeskController {
|
||||
|
||||
@GetMapping(path = "/queryInterviewPlan")
|
||||
@ApiOperation("是否有面试与临期线索")
|
||||
public ResponseResult<InterviewPlanVO> queryInterviewPlanVO(){
|
||||
public ResponseResult<HashMap<String, InterviewPlanVO>> queryInterviewPlanVO(){
|
||||
String userId = CurrentUserHolder.getUserId();
|
||||
return ResponseResult.success(deskService.getInterviewPlan(userId));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user