选址阶段
This commit is contained in:
@@ -1,8 +1,12 @@
|
||||
package com.cool.store.dao;
|
||||
|
||||
import com.cool.store.entity.PointInfoDO;
|
||||
import com.cool.store.entity.PointTodoInfoDO;
|
||||
import com.cool.store.enums.NodeNoEnum;
|
||||
import com.cool.store.mapper.PointTodoInfoMapper;
|
||||
import com.cool.store.request.PointTodoPageRequest;
|
||||
import com.github.pagehelper.Page;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Repository;
|
||||
@@ -42,4 +46,9 @@ public class PointTodoInfoDAO {
|
||||
}
|
||||
return pointTodoInfoMapper.getPointToDoByUserIdAndPointId(userId, pointId);
|
||||
}
|
||||
|
||||
public Page<PointInfoDO> getUserTodoList(PointTodoPageRequest request) {
|
||||
PageHelper.startPage(request.getPageNum(), request.getPageSize());
|
||||
return pointTodoInfoMapper.getUserTodoList(request);
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,9 @@
|
||||
package com.cool.store.mapper;
|
||||
|
||||
import com.cool.store.entity.PointInfoDO;
|
||||
import com.cool.store.entity.PointTodoInfoDO;
|
||||
import com.cool.store.request.PointTodoPageRequest;
|
||||
import com.github.pagehelper.Page;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
@@ -46,4 +49,11 @@ public interface PointTodoInfoMapper extends Mapper<PointTodoInfoDO> {
|
||||
* @return
|
||||
*/
|
||||
PointTodoInfoDO getPointToDoByUserIdAndPointId(String userId, Long pointId);
|
||||
|
||||
/**
|
||||
* 获取待办
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
Page<PointInfoDO> getUserTodoList(@Param("request") PointTodoPageRequest request);
|
||||
}
|
||||
@@ -26,7 +26,7 @@
|
||||
</resultMap>
|
||||
|
||||
<sql id="allColumn">
|
||||
id, point_code, point_name, region_id, shop_id, line_id, point_area, longitude, latitude, address, development_manager, operate_user_id, development_time, point_status, point_score, select_status, submit_audit_count, is_line_upload
|
||||
id, point_code, point_name, region_id, shop_id, line_id, point_area, longitude, latitude, address, development_manager, operate_user_id, development_time, point_status, point_score, select_status, submit_audit_count, is_line_upload, deleted, create_time, update_time
|
||||
</sql>
|
||||
|
||||
<select id="getMyPointData" resultType="com.cool.store.vo.point.PointHomePageDataVO">
|
||||
@@ -45,6 +45,7 @@
|
||||
pi.id,
|
||||
pi.point_name,
|
||||
pi.point_code,
|
||||
pi.address,
|
||||
pi.region_id,
|
||||
pi.point_status,
|
||||
pi.point_score,
|
||||
@@ -52,7 +53,9 @@
|
||||
pi.development_manager,
|
||||
pi.operate_user_id,
|
||||
pi.development_time,
|
||||
pi.select_status
|
||||
pi.select_status,
|
||||
pi.create_time,
|
||||
pi.update_time
|
||||
from xfsg_point_info pi
|
||||
where pi.deleted = 0 and pi.development_manager = #{request.developmentManager}
|
||||
<if test="request.keyword != null and request.keyword != ''">
|
||||
@@ -64,8 +67,11 @@
|
||||
<if test="request.developmentEndTime != null and request.developmentEndTime != ''">
|
||||
<![CDATA[and pi.development_time <= #{request.developmentEndTime}]]>
|
||||
</if>
|
||||
<if test="request.pointStatus != null and request.pointStatus != ''">
|
||||
and pi.point_status = #{request.pointStatus}
|
||||
<if test="request.pointStatusList != null and request.pointStatusList.size() > 0">
|
||||
and pi.point_status in
|
||||
<foreach collection="request.pointStatusList" item="pointStatus" open="(" close=")" separator=",">
|
||||
#{pointStatus}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="request.storageStatus != null and request.storageStatus == 1">
|
||||
and pi.point_status in (4,5,6,7)
|
||||
@@ -102,8 +108,11 @@
|
||||
<include refid="allColumn"/>
|
||||
from xfsg_point_info
|
||||
where deleted = 0 and point_status in (4,5) and development_manager = #{request.developmentManager}
|
||||
<if test="request.pointStatus != null and request.pointStatus != ''">
|
||||
and point_status = #{request.pointStatus}
|
||||
<if test="request.pointStatusList != null and request.pointStatusList.size() > 0">
|
||||
and point_status in
|
||||
<foreach collection="request.pointStatusList" item="pointStatus" open="(" close=")">
|
||||
#{pointStatus}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
@@ -68,4 +68,31 @@
|
||||
<update id="updatePointTodoInfo">
|
||||
update xfsg_point_todo_info set status = if(handler_user_id = #{handlerUserId}, 1, 2), update_time = now() where point_id = #{pointId} and node_no = #{nodeNo} and cycle_count = #{cycleCount} and deleted = 0
|
||||
</update>
|
||||
|
||||
<select id="getUserTodoList" resultType="com.cool.store.entity.PointInfoDO">
|
||||
select
|
||||
b.id,
|
||||
b.point_name,
|
||||
b.point_code,
|
||||
b.point_status,
|
||||
b.point_score,
|
||||
b.development_manager,
|
||||
b.development_time,
|
||||
b.point_area,
|
||||
b.address,
|
||||
b.latitude,
|
||||
b.longitude,
|
||||
b.region_id,
|
||||
b.line_id,
|
||||
b.shop_id,
|
||||
b.select_status,
|
||||
b.operate_user_id,
|
||||
b.is_line_upload,
|
||||
b.create_time,
|
||||
b.update_time
|
||||
from
|
||||
xfsg_point_todo_info a inner join xfsg_point_info b on a.point_id = b.id
|
||||
where
|
||||
a.handler_user_id = #{request.developmentManager} and a.status = 0 and a.deleted = 0 and b.deleted = 0
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -1,12 +1,15 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import com.cool.store.common.PageBasicInfo;
|
||||
import com.cool.store.enums.point.PointStatusEnum;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.Max;
|
||||
import javax.validation.constraints.Min;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
@@ -32,7 +35,6 @@ public class PointPageRequest extends PageBasicInfo {
|
||||
@ApiModelProperty(value = "拓展专员", hidden = true)
|
||||
private String developmentManager;
|
||||
|
||||
@NotNull
|
||||
@Min(1)@Max(2)
|
||||
@ApiModelProperty("必传参数:1已入库 2暂未入库")
|
||||
private Integer storageStatus;
|
||||
@@ -40,4 +42,18 @@ public class PointPageRequest extends PageBasicInfo {
|
||||
@ApiModelProperty("1.采集中、2.已评估、3.待审核、5.已审核、6.已签约、7.已失效")
|
||||
private Integer pointStatus;
|
||||
|
||||
@ApiModelProperty(value = "铺位状态列表", hidden = true)
|
||||
private List<Integer> pointStatusList;
|
||||
|
||||
public List<Integer> getPointStatusList() {
|
||||
List<Integer> pointStatusList = new ArrayList<>();
|
||||
if (pointStatus != null) {
|
||||
pointStatusList.add(pointStatus);
|
||||
}
|
||||
if(PointStatusEnum.POINT_STATUS_3.getCode().equals(pointStatus)){
|
||||
pointStatusList.add(PointStatusEnum.POINT_STATUS_4.getCode());
|
||||
}
|
||||
return pointStatusList;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import com.cool.store.common.PageBasicInfo;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @FileName: TodoPageRequest
|
||||
* @Description:
|
||||
* @date 2024-04-11 14:30
|
||||
*/
|
||||
@Data
|
||||
public class PointTodoPageRequest extends PageBasicInfo {
|
||||
|
||||
@ApiModelProperty(value = "扩展经理", hidden = true)
|
||||
private String developmentManager;
|
||||
|
||||
}
|
||||
@@ -1,9 +1,13 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import com.cool.store.common.PageBasicInfo;
|
||||
import com.cool.store.enums.point.PointStatusEnum;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @FileName: RecommendPointPageRequest
|
||||
@@ -19,4 +23,18 @@ public class RecommendPointPageRequest extends PageBasicInfo {
|
||||
@ApiModelProperty(value = "拓展专员", hidden = true)
|
||||
private String developmentManager;
|
||||
|
||||
@ApiModelProperty(value = "铺位状态列表", hidden = true)
|
||||
private List<Integer> pointStatusList;
|
||||
|
||||
public List<Integer> getPointStatusList() {
|
||||
List<Integer> pointStatusList = new ArrayList<>();
|
||||
if (pointStatus != null) {
|
||||
pointStatusList.add(pointStatus);
|
||||
}
|
||||
if(PointStatusEnum.POINT_STATUS_3.getCode().equals(pointStatus)){
|
||||
pointStatusList.add(PointStatusEnum.POINT_STATUS_4.getCode());
|
||||
}
|
||||
return pointStatusList;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.cool.store.vo.point;
|
||||
|
||||
import com.cool.store.entity.PointDetailInfoDO;
|
||||
import com.cool.store.entity.PointInfoDO;
|
||||
import com.cool.store.enums.point.PointStatusEnum;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@@ -31,7 +32,7 @@ public class PointDetailVO {
|
||||
@ApiModelProperty("详细地址")
|
||||
private String address;
|
||||
|
||||
@ApiModelProperty("铺位状态 1.采集中、2.已评估、3.待审核、4.待审核可推荐、5.已审核、6.已签约、7.已失效")
|
||||
@ApiModelProperty("铺位状态 1.采集中、2.已评估、3.待审核、5.已审核、6.已签约、7.已失效")
|
||||
private Integer pointStatus;
|
||||
|
||||
@ApiModelProperty("铺位得分")
|
||||
@@ -236,6 +237,9 @@ public class PointDetailVO {
|
||||
result.setLatitude(pointInfo.getLatitude());
|
||||
result.setAddress(pointInfo.getAddress());
|
||||
result.setPointStatus(pointInfo.getPointStatus());
|
||||
if(PointStatusEnum.POINT_STATUS_4.getCode().equals(pointInfo.getPointStatus())){
|
||||
result.setPointStatus(PointStatusEnum.POINT_STATUS_3.getCode());
|
||||
}
|
||||
result.setPointScore(pointInfo.getPointScore());
|
||||
result.setBussinessStatus(pointDetailInfo.getBussinessStatus());
|
||||
result.setNineFlowRate(pointDetailInfo.getNineFlowRate());
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.cool.store.vo.point;
|
||||
|
||||
import com.cool.store.entity.PointDetailInfoDO;
|
||||
import com.cool.store.entity.PointInfoDO;
|
||||
import com.cool.store.enums.point.PointStatusEnum;
|
||||
import com.google.common.collect.Lists;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
@@ -30,7 +30,7 @@ public class PointPageVO {
|
||||
@ApiModelProperty("所属站区")
|
||||
private String regionNodeName;
|
||||
|
||||
@ApiModelProperty("铺位状态 1.采集中、2.已评估、3.待审核、4.待审核可推荐、5.已审核、6.已签约、7.已失效")
|
||||
@ApiModelProperty("铺位状态 1.采集中、2.已评估、3.待审核、5.已审核、6.已签约、7.已失效")
|
||||
private Integer pointStatus;
|
||||
|
||||
@ApiModelProperty("铺位得分")
|
||||
@@ -48,6 +48,15 @@ public class PointPageVO {
|
||||
@ApiModelProperty("选择状态0.未选择, 1.已被选择")
|
||||
private Integer selectStatus;
|
||||
|
||||
@ApiModelProperty("铺位地址")
|
||||
private String address;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty("更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
|
||||
|
||||
public static List<PointPageVO> convertVO(List<PointInfoDO> pointList, Map<String, String> usernameMap, Map<Long, String> regionNameMap) {
|
||||
@@ -63,11 +72,17 @@ public class PointPageVO {
|
||||
pointPageVO.setRegionId(pointInfo.getRegionId());
|
||||
pointPageVO.setRegionNodeName(regionNameMap.get(pointInfo.getRegionId()));
|
||||
pointPageVO.setPointStatus(pointInfo.getPointStatus());
|
||||
if(PointStatusEnum.POINT_STATUS_4.getCode().equals(pointInfo.getPointStatus())){
|
||||
pointPageVO.setPointStatus(PointStatusEnum.POINT_STATUS_3.getCode());
|
||||
}
|
||||
pointPageVO.setPointScore(pointInfo.getPointScore());
|
||||
pointPageVO.setPointArea(pointInfo.getPointArea());
|
||||
pointPageVO.setDevelopmentManagerUsername(usernameMap.get(pointInfo.getDevelopmentManager()));
|
||||
pointPageVO.setDevelopmentTime(pointInfo.getDevelopmentTime());
|
||||
pointPageVO.setSelectStatus(pointInfo.getSelectStatus());
|
||||
pointPageVO.setAddress(pointInfo.getAddress());
|
||||
pointPageVO.setCreateTime(pointInfo.getCreateTime());
|
||||
pointPageVO.setUpdateTime(pointInfo.getUpdateTime());
|
||||
resultList.add(pointPageVO);
|
||||
}
|
||||
return resultList;
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.cool.store.vo.point;
|
||||
|
||||
import com.cool.store.entity.PointInfoDO;
|
||||
import com.cool.store.entity.PointRecommendDO;
|
||||
import com.cool.store.enums.point.PointStatusEnum;
|
||||
import com.google.common.collect.Lists;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
@@ -35,7 +36,7 @@ public class PointRecommendPageVO {
|
||||
@ApiModelProperty("所属站区")
|
||||
private String regionNodeName;
|
||||
|
||||
@ApiModelProperty("铺位状态 1.采集中、2.已评估、3.待审核、4.待审核可推荐、5.已审核、6.已签约、7.已失效")
|
||||
@ApiModelProperty("铺位状态 1.采集中、2.已评估、3.待审核、5.已审核、6.已签约、7.已失效")
|
||||
private Integer pointStatus;
|
||||
|
||||
@ApiModelProperty("铺位得分")
|
||||
@@ -71,6 +72,9 @@ public class PointRecommendPageVO {
|
||||
recommend.setRegionId(pointInfo.getRegionId());
|
||||
recommend.setRegionNodeName(regionNameMap.get(pointInfo.getRegionId()));
|
||||
recommend.setPointStatus(pointInfo.getPointStatus());
|
||||
if(PointStatusEnum.POINT_STATUS_4.getCode().equals(pointInfo.getPointStatus())){
|
||||
recommend.setPointStatus(PointStatusEnum.POINT_STATUS_3.getCode());
|
||||
}
|
||||
recommend.setPointScore(pointInfo.getPointScore());
|
||||
recommend.setPointArea(pointInfo.getPointArea());
|
||||
recommend.setDevelopmentManagerUsername(usernameMap.get(pointInfo.getDevelopmentManager()));
|
||||
|
||||
@@ -185,4 +185,12 @@ public interface PointService {
|
||||
* @return
|
||||
*/
|
||||
Integer updateWantShopNum(UpdateWantShopNumRequest request);
|
||||
|
||||
/**
|
||||
* 获取待办列表
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
PageInfo<PointPageVO> getTodoList(PointTodoPageRequest request);
|
||||
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import com.cool.store.entity.RegionDO;
|
||||
import com.cool.store.vo.RegionPathNameVO;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface RegionService {
|
||||
|
||||
@@ -16,6 +17,13 @@ public interface RegionService {
|
||||
*/
|
||||
String getBelongWarRegionName(Long regionId);
|
||||
|
||||
/**
|
||||
* 获取所属战区
|
||||
* @param regionIds
|
||||
* @return
|
||||
*/
|
||||
Map<Long, String> getBelongWarRegionNameMap(List<Long> regionIds);
|
||||
|
||||
/**
|
||||
* 根据意向区域找大区id
|
||||
* @param wantShopAreaId
|
||||
|
||||
@@ -122,7 +122,7 @@ public class PointServiceImpl implements PointService {
|
||||
if(Objects.isNull(pointInfo) || Objects.isNull(pointDetailInfo)){
|
||||
throw new ServiceException(ErrorCodeEnum.POINT_NOT_EXIST);
|
||||
}
|
||||
if(!pointDetailInfo.isCanSubmitEvaluable()){
|
||||
if(!pointDetailInfo.isCanSubmitEvaluable() || StringUtils.isBlank(pointInfo.getPointArea())){
|
||||
throw new ServiceException(ErrorCodeEnum.POINT_NOT_COMPLETE);
|
||||
}
|
||||
Integer totalPointScore = pointDetailInfo.getTotalPointScore();
|
||||
@@ -216,7 +216,7 @@ public class PointServiceImpl implements PointService {
|
||||
if(Objects.isNull(auditSetting)){
|
||||
throw new ServiceException(ErrorCodeEnum.POINT_AUDIT_NOT_SETTING);
|
||||
}
|
||||
List<AuditNodeDTO> auditNode = dealAuditNode(auditSetting, pointInfo);
|
||||
List<AuditNodeDTO> auditNode = dealAuditNode(auditSetting, pointInfo.getRegionId(), request.getOperateUserId(), pointInfo.getDevelopmentManager());
|
||||
//获取审批节点上的数据
|
||||
List<PointAuditRecordDO> recordList = AuditNodeDTO.convertDO(pointId, submitAuditCount, auditNode);
|
||||
pointAuditRecordDAO.addPointAuditRecord(recordList);
|
||||
@@ -399,16 +399,13 @@ public class PointServiceImpl implements PointService {
|
||||
|
||||
@Override
|
||||
public PageInfo<PointPageVO> getMyPointPage(PointPageRequest request) {
|
||||
if(Objects.nonNull(request.getPointStatus()) && PointStatusEnum.POINT_STATUS_3.getCode().equals(request.getPointStatus())){
|
||||
request.setPointStatus(CommonConstants.ONE == request.getStorageStatus() ? PointStatusEnum.POINT_STATUS_4.getCode() : PointStatusEnum.POINT_STATUS_3.getCode());
|
||||
}
|
||||
List<PointPageVO> resultList = new ArrayList();
|
||||
Page<PointInfoDO> pointPage = pointInfoDAO.getMyPointPage(request);
|
||||
if(Objects.nonNull(pointPage) && CollectionUtils.isNotEmpty(pointPage.getResult())){
|
||||
List<Long> regionIds = pointPage.stream().map(PointInfoDO::getRegionId).distinct().collect(Collectors.toList());
|
||||
List<String> developmentManagers = pointPage.stream().map(PointInfoDO::getDevelopmentManager).distinct().collect(Collectors.toList());
|
||||
Map<String, String> userNameMap = enterpriseUserDAO.getUserNameMap(developmentManagers);
|
||||
Map<Long, String> regionNameMap = new HashMap<>();
|
||||
Map<Long, String> regionNameMap = regionService.getBelongWarRegionNameMap(regionIds);
|
||||
resultList = PointPageVO.convertVO(pointPage.getResult(), userNameMap, regionNameMap);
|
||||
}
|
||||
PageInfo resultPage = new PageInfo(pointPage);
|
||||
@@ -441,16 +438,13 @@ public class PointServiceImpl implements PointService {
|
||||
|
||||
@Override
|
||||
public PageInfo<PointPageVO> getRecommendPointList(RecommendPointPageRequest request) {
|
||||
if(Objects.nonNull(request.getPointStatus()) && PointStatusEnum.POINT_STATUS_3.getCode().equals(request.getPointStatus())){
|
||||
request.setPointStatus(PointStatusEnum.POINT_STATUS_4.getCode());
|
||||
}
|
||||
List<PointPageVO> resultList = new ArrayList();
|
||||
Page<PointInfoDO> pointPage = pointInfoDAO.getRecommendPointList(request);
|
||||
if(Objects.nonNull(pointPage) && CollectionUtils.isNotEmpty(pointPage.getResult())){
|
||||
List<Long> regionIds = pointPage.stream().map(PointInfoDO::getRegionId).distinct().collect(Collectors.toList());
|
||||
List<String> developmentManagers = pointPage.stream().map(PointInfoDO::getDevelopmentManager).distinct().collect(Collectors.toList());
|
||||
Map<String, String> userNameMap = enterpriseUserDAO.getUserNameMap(developmentManagers);
|
||||
Map<Long, String> regionNameMap = new HashMap<>();
|
||||
Map<Long, String> regionNameMap = regionService.getBelongWarRegionNameMap(regionIds);
|
||||
resultList = PointPageVO.convertVO(pointPage.getResult(), userNameMap, regionNameMap);
|
||||
}
|
||||
PageInfo resultPage = new PageInfo(pointPage);
|
||||
@@ -500,7 +494,23 @@ public class PointServiceImpl implements PointService {
|
||||
return lineInfoDAO.updateLineInfo(updateLine);
|
||||
}
|
||||
|
||||
public List<AuditNodeDTO> dealAuditNode(AuditSettingVO auditSetting, PointInfoDO pointInfo) {
|
||||
@Override
|
||||
public PageInfo<PointPageVO> getTodoList(PointTodoPageRequest request) {
|
||||
Page<PointInfoDO> pointPage = pointTodoInfoDAO.getUserTodoList(request);
|
||||
List<PointPageVO> resultList = new ArrayList<>();
|
||||
if(Objects.nonNull(pointPage) && CollectionUtils.isNotEmpty(pointPage.getResult())){
|
||||
List<Long> regionIds = pointPage.stream().map(PointInfoDO::getRegionId).distinct().collect(Collectors.toList());
|
||||
List<String> developmentManagers = pointPage.stream().map(PointInfoDO::getDevelopmentManager).distinct().collect(Collectors.toList());
|
||||
Map<String, String> userNameMap = enterpriseUserDAO.getUserNameMap(developmentManagers);
|
||||
Map<Long, String> regionNameMap = regionService.getBelongWarRegionNameMap(regionIds);
|
||||
resultList = PointPageVO.convertVO(pointPage.getResult(), userNameMap, regionNameMap);
|
||||
}
|
||||
PageInfo resultPage = new PageInfo(pointPage);
|
||||
resultPage.setList(resultList);
|
||||
return resultPage;
|
||||
}
|
||||
|
||||
public List<AuditNodeDTO> dealAuditNode(AuditSettingVO auditSetting, Long regionId, String operateUserId, String developmentManager) {
|
||||
List<String> roleIds = new ArrayList<>();
|
||||
//审核人
|
||||
Pair<List<String>, List<String>> firstApproval = getUserIdsAndPositionIds(auditSetting.getFirstApproval());
|
||||
@@ -520,17 +530,17 @@ public class PointServiceImpl implements PointService {
|
||||
roleIds.addAll(fifthApproval.getValue());
|
||||
}
|
||||
List<AuditNodeDTO> resultList = new ArrayList<>();
|
||||
Map<String, List<String>> userIdsMap = userAuthMappingService.getUserIdByRoleIdAndRegionId(roleIds, pointInfo.getRegionId());
|
||||
Map<String, List<String>> userIdsMap = userAuthMappingService.getUserIdByRoleIdAndRegionId(roleIds, regionId);
|
||||
List<String> firstApprovalUserIds = getUserIdsByPositionIds(firstApproval, userIdsMap);
|
||||
List<String> thirdApprovalUserIds = getUserIdsByPositionIds(thirdApproval, userIdsMap);
|
||||
List<String> fourthApprovalUserIds = getUserIdsByPositionIds(fourthApproval, userIdsMap);
|
||||
List<String> fifthApprovalUserIds = getUserIdsByPositionIds(fifthApproval, userIdsMap);
|
||||
resultList.add(new AuditNodeDTO(NodeNoEnum.NODE_NO_0.getCode(), PointAuditRecordDO.SUBMIT_TASK, Boolean.FALSE, Arrays.asList(pointInfo.getDevelopmentManager())));
|
||||
resultList.add(new AuditNodeDTO(NodeNoEnum.NODE_NO_0.getCode(), PointAuditRecordDO.SUBMIT_TASK, Boolean.FALSE, Arrays.asList(developmentManager)));
|
||||
if(CollectionUtils.isNotEmpty(firstApprovalUserIds)){
|
||||
resultList.add(new AuditNodeDTO(NodeNoEnum.NODE_NO_1.getCode(), PointAuditRecordDO.RECEIVE_TASK, Boolean.TRUE, firstApprovalUserIds));
|
||||
resultList.add(new AuditNodeDTO(NodeNoEnum.NODE_NO_2.getCode(), Arrays.asList(pointInfo.getOperateUserId())));
|
||||
resultList.add(new AuditNodeDTO(NodeNoEnum.NODE_NO_2.getCode(), Arrays.asList(operateUserId)));
|
||||
}else{
|
||||
resultList.add(new AuditNodeDTO(NodeNoEnum.NODE_NO_2.getCode(), PointAuditRecordDO.RECEIVE_TASK, Boolean.TRUE, Arrays.asList(pointInfo.getOperateUserId())));
|
||||
resultList.add(new AuditNodeDTO(NodeNoEnum.NODE_NO_2.getCode(), PointAuditRecordDO.RECEIVE_TASK, Boolean.TRUE, Arrays.asList(operateUserId)));
|
||||
}
|
||||
|
||||
if(CollectionUtils.isNotEmpty(thirdApprovalUserIds)){
|
||||
|
||||
@@ -15,6 +15,7 @@ import com.cool.store.utils.RedisConstantUtil;
|
||||
import com.cool.store.utils.RedisUtilPool;
|
||||
import com.cool.store.utils.poi.constant.Constants;
|
||||
import com.cool.store.vo.RegionPathNameVO;
|
||||
import com.google.common.collect.Maps;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
@@ -100,6 +101,18 @@ public class RegionServiceImpl implements RegionService {
|
||||
return "";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, String> getBelongWarRegionNameMap(List<Long> regionIds) {
|
||||
if(CollectionUtils.isEmpty(regionIds)){
|
||||
return Maps.newHashMap();
|
||||
}
|
||||
Map<Long, String> regionNameMap = Maps.newHashMap();
|
||||
for (Long regionId : regionIds) {
|
||||
regionNameMap.put(regionId, getBelongWarRegionName(regionId));
|
||||
}
|
||||
return regionNameMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据意向区域找大区id
|
||||
* @param wantShopAreaId
|
||||
|
||||
@@ -51,7 +51,7 @@ public class PointController {
|
||||
}
|
||||
|
||||
@ApiOperation("生成评估报告")
|
||||
@GetMapping("/generateEvaluationReport")
|
||||
@PostMapping("/generateEvaluationReport")
|
||||
public ResponseResult<Integer> generateEvaluationReport(@RequestBody PointIdRequest request) {
|
||||
return ResponseResult.success(pointService.generateEvaluationReport(request.getPointId()));
|
||||
}
|
||||
@@ -68,13 +68,13 @@ public class PointController {
|
||||
return ResponseResult.success(pointService.pointUnbind(request.getPointId()));
|
||||
}
|
||||
|
||||
@ApiOperation("配置评估报告")
|
||||
@ApiOperation("配置高德评估报告")
|
||||
@PostMapping("/addMapEvaluationReport")
|
||||
public ResponseResult<Integer> addMapEvaluationReport(@RequestBody AddMapEvaluationReportRequest request) {
|
||||
return ResponseResult.success(pointService.addMapEvaluationReport(request));
|
||||
}
|
||||
|
||||
@ApiOperation("提交审批")
|
||||
@ApiOperation("选址人员提交审批")
|
||||
@PostMapping("/submitAudit")
|
||||
public ResponseResult<Integer> submitAudit(@RequestBody @Validated SubmitPointAuditRequest request) {
|
||||
return ResponseResult.success(pointService.submitAudit(request));
|
||||
@@ -187,5 +187,11 @@ public class PointController {
|
||||
return ResponseResult.success(ShopStageVO.getShopStageList());
|
||||
}
|
||||
|
||||
@ApiOperation("获取待办列表")
|
||||
@PostMapping("/getTodoList")
|
||||
public ResponseResult<PageInfo<PointPageVO>> getTodoList(@RequestBody PointTodoPageRequest request) {
|
||||
request.setDevelopmentManager(CurrentUserHolder.getUserId());
|
||||
return ResponseResult.success(pointService.getTodoList(request));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user