Merge remote-tracking branch 'origin/cc_20230520_partner' into cc_20230520_partner
This commit is contained in:
@@ -262,12 +262,7 @@
|
||||
<if test="currentDate!=null and currentDate!=''">
|
||||
and deadline = #{currentDate}
|
||||
</if>
|
||||
and
|
||||
(
|
||||
(workflow_stage = 1 and workflow_status = 0) or
|
||||
(workflow_stage = 2 and workflow_status = 0) or
|
||||
(workflow_stage = 3 and workflow_status = 4)
|
||||
)
|
||||
and (workflow_stage = 2 and workflow_status = 0)
|
||||
</where>
|
||||
</select>
|
||||
|
||||
@@ -299,6 +294,7 @@
|
||||
<select id="selectPartnerLineInfoAndBaseInfo" resultType="com.cool.store.dto.partner.PartnerLineInfoAndBaseInfoDTO">
|
||||
select
|
||||
a.id as id,
|
||||
a.development_director as developmentDirector,
|
||||
a.partner_id as partnerId,
|
||||
a.workflow_stage as workflowStage,
|
||||
a.line_status as lineStatus,
|
||||
|
||||
@@ -10,7 +10,7 @@ import lombok.Data;
|
||||
* @date 2023-06-13 11:18
|
||||
*/
|
||||
@Data
|
||||
public class UserCalendarsEventDTO {
|
||||
public class UserCalendarsEventDTO implements Comparable<UserCalendarsEventDTO>{
|
||||
|
||||
@ApiModelProperty("日历id")
|
||||
private String calendarId;
|
||||
@@ -34,4 +34,9 @@ public class UserCalendarsEventDTO {
|
||||
this.startTime = startTime;
|
||||
this.endTime = endTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(UserCalendarsEventDTO other) {
|
||||
return this.startTime.compareTo(other.getStartTime());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,4 +82,6 @@ public class PartnerLineInfoAndBaseInfoDTO {
|
||||
private String idCard;
|
||||
|
||||
private String education;
|
||||
|
||||
private String developmentDirector;
|
||||
}
|
||||
|
||||
@@ -19,6 +19,8 @@ public class InviteCodeDetailVO {
|
||||
private String partnerPhone;
|
||||
@ApiModelProperty("邀请码")
|
||||
private String inviteCode;
|
||||
@ApiModelProperty("门店编码")
|
||||
private String storeCode;
|
||||
@ApiModelProperty("门店名称")
|
||||
private String storeName;
|
||||
|
||||
|
||||
@@ -87,7 +87,16 @@ public class PartnerLineInfoAndBaseInfoVO {
|
||||
@ApiModelProperty("线索来源名称")
|
||||
private String channelName;
|
||||
|
||||
@ApiModelProperty("教育")
|
||||
private String education;
|
||||
|
||||
@ApiModelProperty("idCard")
|
||||
private String idCard;
|
||||
|
||||
@ApiModelProperty("开发主管")
|
||||
private String developmentDirector;
|
||||
@ApiModelProperty("开发主管名称")
|
||||
private String developmentDirectorName;
|
||||
@ApiModelProperty("开发主管手机号")
|
||||
private String developmentDirectorMobile;
|
||||
}
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
package com.cool.store.service;
|
||||
|
||||
import com.cool.store.dto.calendar.UserCalendarsEventDTO;
|
||||
import com.cool.store.exception.ApiException;
|
||||
import com.cool.store.vo.InterviewPlanVO;
|
||||
import com.cool.store.vo.InterviewScheduleInfoVO;
|
||||
import com.cool.store.vo.StageCountVO;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
@@ -38,6 +41,15 @@ public interface DeskService {
|
||||
*/
|
||||
StageCountVO getStageCountByType(String userId,String type);
|
||||
|
||||
/**
|
||||
* String userId, long startTime, long endTime
|
||||
* @param userId
|
||||
* @param startTime
|
||||
* @param endTime
|
||||
* @return
|
||||
*/
|
||||
List<UserCalendarsEventDTO> getUserCalendarsEvents(String userId, long startTime, long endTime) throws ApiException;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -5,9 +5,12 @@ import cn.hutool.core.date.DateUtil;
|
||||
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.SpecialDateRangeInterviewCountDTO;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.exception.ApiException;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.http.ISVHttpRequest;
|
||||
import com.cool.store.service.DeskService;
|
||||
import com.cool.store.service.HyPartnerInterviewPlanService;
|
||||
import com.cool.store.service.HyPartnerLineInfoService;
|
||||
@@ -21,6 +24,7 @@ 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;
|
||||
|
||||
@@ -40,6 +44,8 @@ public class DeskServiceImpl implements DeskService {
|
||||
HyPartnerInterviewPlanService hyPartnerInterviewPlanService;
|
||||
@Resource
|
||||
HyPartnerLineInfoService hyPartnerLineInfoService;
|
||||
@Resource
|
||||
private ISVHttpRequest isvHttpRequest;
|
||||
|
||||
@Override
|
||||
public InterviewPlanVO getInterviewPlan(String userId) {
|
||||
@@ -91,5 +97,11 @@ public class DeskServiceImpl implements DeskService {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UserCalendarsEventDTO> getUserCalendarsEvents(String userId, long startTime, long endTime) throws ApiException {
|
||||
List<UserCalendarsEventDTO> userCalendarsEvents = isvHttpRequest.getUserCalendarsEvents(userId, startTime, endTime);
|
||||
Collections.sort(userCalendarsEvents);
|
||||
return userCalendarsEvents;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -98,20 +98,29 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
|
||||
throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST);
|
||||
}
|
||||
PartnerLineInfoAndBaseInfoVO partnerLineInfoAndBaseInfoVO = convertPartnerLineInfoAndBaseInfoDTOToVo(partnerLineInfoAndBaseInfoDTO);
|
||||
EnterpriseUserDO userInfo = enterpriseUserDAO.getUserInfoById(partnerLineInfoAndBaseInfoDTO.getPassUserId());
|
||||
if (userInfo!=null){
|
||||
partnerLineInfoAndBaseInfoVO.setPassUserName(userInfo.getName());
|
||||
partnerLineInfoAndBaseInfoVO.setPassUserMobile(userInfo.getMobile());
|
||||
List<String> userIds = new ArrayList<>();
|
||||
if (StringUtils.isNotEmpty(partnerLineInfoAndBaseInfoDTO.getPassUserId())){
|
||||
userIds.add(partnerLineInfoAndBaseInfoDTO.getPassUserId());
|
||||
}
|
||||
if (StringUtils.isNotEmpty(partnerLineInfoAndBaseInfoVO.getInvestmentManager())){
|
||||
userIds.add(partnerLineInfoAndBaseInfoVO.getInvestmentManager());
|
||||
}
|
||||
if (StringUtils.isNotEmpty(partnerLineInfoAndBaseInfoVO.getDevelopmentDirector())){
|
||||
userIds.add(partnerLineInfoAndBaseInfoVO.getDevelopmentDirector());
|
||||
}
|
||||
|
||||
List<EnterpriseUserDO> userList = enterpriseUserDAO.getUserInfoByUserIds(userIds);
|
||||
Map<String, EnterpriseUserDO> userDOMap = userList.stream().collect(Collectors.toMap(EnterpriseUserDO::getUserId, data -> data));
|
||||
partnerLineInfoAndBaseInfoVO.setPassUserName(userDOMap.getOrDefault(partnerLineInfoAndBaseInfoVO.getPassUserId(),new EnterpriseUserDO()).getName());
|
||||
partnerLineInfoAndBaseInfoVO.setPassUserMobile(userDOMap.getOrDefault(partnerLineInfoAndBaseInfoVO.getPassUserId(),new EnterpriseUserDO()).getMobile());
|
||||
partnerLineInfoAndBaseInfoVO.setInvestmentManagerName(userDOMap.getOrDefault(partnerLineInfoAndBaseInfoVO.getInvestmentManager(),new EnterpriseUserDO()).getName());
|
||||
partnerLineInfoAndBaseInfoVO.setInvestmentManagerPhone(userDOMap.getOrDefault(partnerLineInfoAndBaseInfoVO.getInvestmentManager(),new EnterpriseUserDO()).getMobile());
|
||||
partnerLineInfoAndBaseInfoVO.setDevelopmentDirectorName(userDOMap.getOrDefault(partnerLineInfoAndBaseInfoVO.getDevelopmentDirector(),new EnterpriseUserDO()).getName());
|
||||
partnerLineInfoAndBaseInfoVO.setDevelopmentDirectorMobile(userDOMap.getOrDefault(partnerLineInfoAndBaseInfoVO.getDevelopmentDirector(),new EnterpriseUserDO()).getMobile());
|
||||
if (StringUtils.isNotEmpty(partnerLineInfoAndBaseInfoDTO.getWantShopArea())){
|
||||
HyOpenAreaInfoDO hyOpenAreaInfoDO = hyOpenAreaInfoDAO.selectById(Long.valueOf(partnerLineInfoAndBaseInfoDTO.getWantShopArea()));
|
||||
partnerLineInfoAndBaseInfoVO.setWantShopAreaName(hyOpenAreaInfoDO.getAreaPath().replace("/"," "));
|
||||
}
|
||||
EnterpriseUserDO investmentManager = enterpriseUserDAO.getUserInfoById(partnerLineInfoAndBaseInfoVO.getInvestmentManager());
|
||||
if (investmentManager!=null){
|
||||
partnerLineInfoAndBaseInfoVO.setInvestmentManagerName(investmentManager.getName());
|
||||
partnerLineInfoAndBaseInfoVO.setInvestmentManagerPhone(investmentManager.getMobile());
|
||||
}
|
||||
return partnerLineInfoAndBaseInfoVO;
|
||||
}
|
||||
|
||||
@@ -640,6 +649,11 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
|
||||
}
|
||||
userId = userIdList.get(++i);
|
||||
}
|
||||
//上次分配的招商经理 记录
|
||||
if ("intent".equals(type)){
|
||||
hyIntendDevZoneInfoDO.setLastAllotUserId(userId);
|
||||
hyIntendDevZoneInfoDAO.updateByPrimaryKeySelective(hyIntendDevZoneInfoDO);
|
||||
}
|
||||
return userId;
|
||||
}
|
||||
|
||||
@@ -761,6 +775,7 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
|
||||
partnerLineInfoAndBaseInfoVO.setLiveArea(partnerLineInfoAndBaseInfoDTO.getLiveArea());
|
||||
partnerLineInfoAndBaseInfoVO.setIdCard(partnerLineInfoAndBaseInfoDTO.getIdCard());
|
||||
partnerLineInfoAndBaseInfoVO.setChannelName(partnerLineInfoAndBaseInfoDTO.getChannelName());
|
||||
partnerLineInfoAndBaseInfoVO.setDevelopmentDirector(partnerLineInfoAndBaseInfoDTO.getDevelopmentDirector());
|
||||
if (StringUtil.isNotEmpty(partnerLineInfoAndBaseInfoDTO.getCertifyFile())){
|
||||
partnerLineInfoAndBaseInfoVO.setPassCertifyFile(JSONObject.parseArray(partnerLineInfoAndBaseInfoDTO.getCertifyFile(), String.class));
|
||||
}
|
||||
|
||||
@@ -88,6 +88,7 @@ public class PartnerUserInfoServiceImpl implements PartnerUserInfoService {
|
||||
InviteCodeDetailVO inviteCodeDetailVO = new InviteCodeDetailVO();
|
||||
inviteCodeDetailVO.setInviteCode(hyPartnerUserInfoDO.getInviteCode());
|
||||
inviteCodeDetailVO.setStoreName(hyPartnerUserInfoDO.getRecommendPartnerName());
|
||||
inviteCodeDetailVO.setStoreCode(hyPartnerUserInfoDO.getShopCode());
|
||||
inviteCodeDetailVO.setPartnerPhone(hyPartnerUserInfoDO.getRecommendPartnerMobile());
|
||||
inviteCodeDetailVO.setPartnerName(hyPartnerUserInfoDO.getShopName());
|
||||
return inviteCodeDetailVO;
|
||||
|
||||
@@ -43,8 +43,6 @@ public class DeskController {
|
||||
@Resource
|
||||
HyPartnerBaseInfoService hyPartnerBaseInfoService;
|
||||
@Resource
|
||||
private ISVHttpRequest isvHttpRequest;
|
||||
@Resource
|
||||
EnterpriseUserService enterpriseUserService;
|
||||
@Resource
|
||||
PartnerUserInfoService partnerUserInfoService;
|
||||
@@ -78,7 +76,7 @@ public class DeskController {
|
||||
public ResponseResult<List<UserCalendarsEventDTO>> getUserCalendarsEvents(@RequestParam(value = "startTime") Long startTime,
|
||||
@RequestParam(value = "endTime") Long endTime) throws ApiException {
|
||||
String userId = CurrentUserHolder.getUserId();
|
||||
return ResponseResult.success(isvHttpRequest.getUserCalendarsEvents(userId,startTime,endTime));
|
||||
return ResponseResult.success(deskService.getUserCalendarsEvents(userId,startTime,endTime));
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user