加盟商编码

This commit is contained in:
苏竹红
2024-04-08 19:28:11 +08:00
parent 7193807f2e
commit 3abec41269
7 changed files with 93 additions and 1 deletions

View File

@@ -1,5 +1,6 @@
package com.cool.store.dao;
import com.cool.store.dto.PendingCountDTO;
import com.cool.store.entity.LineInfoDO;
import com.cool.store.enums.ErrorCodeEnum;
import com.cool.store.enums.WorkflowStageEnum;
@@ -130,4 +131,13 @@ public class LineInfoDAO {
public List<LineInfoDO> getLineListByDevelopmentManager(String developmentManager) {
return Lists.newArrayList();
}
public PendingCountDTO pendingCount(String userId) {
if (StringUtils.isBlank(userId)){
return null;
}
PendingCountDTO pendingCount = lineInfoMapper.pendingCount(userId);
return pendingCount;
}
}

View File

@@ -1,5 +1,6 @@
package com.cool.store.mapper;
import com.cool.store.dto.PendingCountDTO;
import com.cool.store.entity.LineInfoDO;
import com.cool.store.enums.WorkflowSubStageStatusEnum;
import com.cool.store.request.LineListRequest;
@@ -63,5 +64,16 @@ public interface LineInfoMapper extends Mapper<LineInfoDO> {
void toExperiencing(@Param("lineIds") List<Long> lineIds,
@Param("code") Integer code);
/**
* 待处理数据
* @param userId
* @return
*/
PendingCountDTO pendingCount(@Param("userId") String userId);
Integer batchUpdateInterviewWorkflowStage(@Param("lineIds") List<Long> lineIds, @Param("workflowSubStage")Integer workflowSubStage, @Param("workflowSubStageStatus")Integer workflowSubStageStatus);
}

View File

@@ -335,6 +335,19 @@
</select>
<select id="pendingCount" resultType="com.cool.store.dto.PendingCountDTO">
SELECT
sum( IF ( investment_manager = #{userId} AND workflow_sub_stage_status = 5, 1, 0 ) ) AS intendPendingCount,
sum( IF ( investment_manager = #{userId} AND workflow_sub_stage_status = 20, 1, 0 ) ) AS interviewPendingCount,
sum( IF ( first_interviewer = #{userId} AND workflow_sub_stage_status IN ( 30, 35, 40 ), 1, 0 ) ) AS firstInterviewPendingCount,
sum( IF ( investment_manager = #{userId} AND workflow_sub_stage_status = 50, 1, 0 ) ) AS payStagePendingCount,
sum( IF ( investment_manager = #{userId} AND workflow_sub_stage_status IN ( 63, 70, 80 ), 1, 0 ) ) AS signingPendingCount,
sum( IF ( investment_manager = #{userId} AND workflow_sub_stage_status IN ( 85, 90 ), 1, 0 ) ) AS storeExperiencePendingCount,
sum( IF ( second_interviewer = #{userId} AND workflow_sub_stage_status IN ( 105, 110, 115 ), 1, 0 ) ) AS secondInterviewPendingCount
FROM
xfsg_line_info where deleted = 0
</select>
<select id="lineList" resultMap="BaseResultMap">
select * from xfsg_line_info a
left join xfsg_open_area_info b on a.want_shop_area_id = b.id

View File

@@ -0,0 +1,35 @@
package com.cool.store.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @Author suzhuhong
* @Date 2024/4/8 19:12
* @Version 1.0
*/
@Data
public class PendingCountDTO {
@ApiModelProperty("加盟申请待处理")
private Integer intendPendingCount;
@ApiModelProperty("邀约面谈待处理数据")
private Integer interviewPendingCount;
@ApiModelProperty("一审面试待处理数据")
private Integer firstInterviewPendingCount;
@ApiModelProperty("支付待处理数据")
private Integer payStagePendingCount;
@ApiModelProperty("意向签约待处理数据")
private Integer signingPendingCount;
@ApiModelProperty("门店实训待处理数量")
private Integer storeExperiencePendingCount;
@ApiModelProperty("二审面试待处理数据")
private Integer secondInterviewPendingCount;
@ApiModelProperty("总数")
private Integer totalCount;
public Integer getTotalCount() {
totalCount = intendPendingCount + interviewPendingCount + firstInterviewPendingCount + payStagePendingCount + signingPendingCount + storeExperiencePendingCount + secondInterviewPendingCount;
return totalCount;
}
}

View File

@@ -1,6 +1,7 @@
package com.cool.store.service;
import com.cool.store.context.LoginUserInfo;
import com.cool.store.dto.PendingCountDTO;
import com.cool.store.entity.HyPartnerLabelDO;
import com.cool.store.entity.LineInfoDO;
import com.cool.store.vo.BaseInfoVO;
@@ -98,4 +99,11 @@ public interface DeskService {
*/
Map<Long, HyPartnerLabelDO> getUserPortraitMap(List<LineInfoDO> lineInfoDOList);
/**
* 待处理数据
* @param user
* @return
*/
PendingCountDTO getPendingCount(LoginUserInfo user);
}

View File

@@ -3,6 +3,7 @@ package com.cool.store.service.impl;
import cn.hutool.core.bean.BeanUtil;
import com.cool.store.context.LoginUserInfo;
import com.cool.store.dao.*;
import com.cool.store.dto.PendingCountDTO;
import com.cool.store.entity.*;
import com.cool.store.enums.InterviewTypeEnum;
import com.cool.store.enums.WorkflowSubStageStatusEnum;
@@ -295,4 +296,10 @@ public class DeskServiceImpl implements DeskService {
return hyPartnerLabelDOS.stream().collect(Collectors.toMap(HyPartnerLabelDO::getId, x -> x));
}
@Override
public PendingCountDTO getPendingCount(LoginUserInfo user) {
PendingCountDTO pendingCount = lineInfoDAO.pendingCount(user.getUserId());
return pendingCount;
}
}

View File

@@ -2,6 +2,7 @@ package com.cool.store.controller.webb;
import com.cool.store.context.CurrentUserHolder;
import com.cool.store.context.LoginUserInfo;
import com.cool.store.dto.PendingCountDTO;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.DeskService;
import com.cool.store.vo.desk.*;
@@ -87,7 +88,13 @@ public class DeskController {
}
@ApiOperation("待处理-数据")
@GetMapping("/getPendingCount")
public ResponseResult<PendingCountDTO> getPendingCount(@RequestParam(value = "pageNumber",required = true,defaultValue = "1")Integer pageNumber,
@RequestParam(value = "pageSize",required = true,defaultValue = "10")Integer pageSize) {
LoginUserInfo userInfo = CurrentUserHolder.getUser();
return ResponseResult.success(deskService.getPendingCount(userInfo));
}
}