feat:V2.4

This commit is contained in:
苏竹红
2025-01-10 19:02:16 +08:00
parent 81b135bba6
commit 5d2afdf9c5
36 changed files with 702 additions and 322 deletions

View File

@@ -200,6 +200,8 @@ public enum ErrorCodeEnum {
INVOICING_EXIST(109016, "当前门店发票信息已存在!", null),
SHOP_STATUS_NOT_SUPPORT_HANDLER(109016, "当前门店状态为:{},不能进行结束跟进操作", null),
INSERT_OPENING_OPERATION_PLAN_AUDIT_FALSE(103001,"插入运营方案审核信息失败",null),
INSERT_OPENING_OPERATION_PLAN_FALSE(103002,"插入运营方案失败",null),

View File

@@ -1,5 +1,6 @@
package com.cool.store.dao;
import com.aliyun.openservices.shade.com.google.common.collect.Lists;
import com.cool.store.constants.CommonConstants;
import com.cool.store.dto.InvestmentCountDTO;
import com.cool.store.dto.PendingCountDTO;
@@ -204,4 +205,12 @@ public class LineInfoDAO {
public List<LineVO> getLines(String keyword){
return lineInfoMapper.getLinesByKeyword(keyword);
}
public List<LineInfoDO> getByLineIds(List<Long> lineIds){
if (CollectionUtils.isEmpty(lineIds)){
return Lists.newArrayList();
}
return lineInfoMapper.getByLineIds(lineIds);
}
}

View File

@@ -99,11 +99,11 @@ public class PointInfoDAO {
return pointInfoMapper.getRecommendPointList(request);
}
public Integer updateSelectedDevelopmentManager(Long lineId, String developmentManager) {
if(Objects.isNull(lineId) || StringUtils.isBlank(developmentManager)){
public Integer updateSelectedDevelopmentManager(Long shopId, String developmentManager) {
if(Objects.isNull(shopId) || StringUtils.isBlank(developmentManager)){
return null;
}
return pointInfoMapper.updateSelectedDevelopmentManager(lineId, developmentManager);
return pointInfoMapper.updateSelectedDevelopmentManager(shopId, developmentManager);
}
public Page<PointInfoDO> getTeamPointPage(AllPointPageRequest request) {

View File

@@ -3,6 +3,7 @@ package com.cool.store.dao;
import com.cool.store.constants.CommonConstants;
import com.cool.store.dto.point.LineCountDTO;
import com.cool.store.dto.point.MiniPointPageDTO;
import com.cool.store.dto.point.ShopCountDTO;
import com.cool.store.entity.PointRecommendDO;
import com.cool.store.enums.point.PointRecommendStatusEnum;
import com.cool.store.mapper.PointRecommendMapper;
@@ -70,6 +71,7 @@ public class PointRecommendDAO {
* @param lineIds
* @return
*/
@Deprecated
public Map<Long, Integer> getPushShopNumMap(List<Long> lineIds) {
if(CollectionUtils.isEmpty(lineIds)){
return Maps.newHashMap();
@@ -78,6 +80,15 @@ public class PointRecommendDAO {
return pushShopNumMap.stream().collect(Collectors.toMap(k->k.getLineId(), v->v.getRecommendShopNum()));
}
public Map<Long, Integer> getShopPushPointNumMap(List<Long> shopIds) {
if(CollectionUtils.isEmpty(shopIds)){
return Maps.newHashMap();
}
List<ShopCountDTO> pushShopNumMap = pointRecommendMapper.getShopPushPointNumMap(shopIds);
return pushShopNumMap.stream().collect(Collectors.toMap(k->k.getShopId(), v->v.getRecommendShopNum()));
}
/**
* 获取推荐列表
* @param lineId
@@ -90,6 +101,13 @@ public class PointRecommendDAO {
return pointRecommendMapper.getRecommendPointList(lineId);
}
public List<PointRecommendDO> getShopRecommendPointList(Long lineId) {
if(Objects.isNull(lineId)){
return Lists.newArrayList();
}
return pointRecommendMapper.getShopRecommendPointList(lineId);
}
public Integer addRecommendPoint(List<PointRecommendDO> recommendList) {
if(CollectionUtils.isEmpty(recommendList)){
return CommonConstants.ZERO;
@@ -102,8 +120,8 @@ public class PointRecommendDAO {
* @param lineId
* @return
*/
public Integer turnLineUpdateRecommendStatus(Long lineId, String developmentManager) {
return pointRecommendMapper.turnLineUpdateRecommendStatus(lineId, developmentManager);
public Integer turnLineUpdateRecommendStatus(Long shopId, String developmentManager) {
return pointRecommendMapper.turnLineUpdateRecommendStatus(shopId, developmentManager);
}
/**
@@ -116,11 +134,11 @@ public class PointRecommendDAO {
return pointRecommendMapper.getLineRecommendPointPage(request);
}
public Integer updateStatusByPointIdAndLineId(Long pointId, Long lineId){
if(Objects.isNull(pointId) || Objects.isNull(lineId)){
public Integer updateStatusByPointIdAndLineId(Long pointId,Long shopId){
if(Objects.isNull(pointId) || Objects.isNull(shopId)){
return 0;
}
return pointRecommendMapper.updateStatusByPointIdAndLineId(pointId, lineId);
return pointRecommendMapper.updateStatusByPointIdAndLineId(pointId,shopId);
}
/**
@@ -130,11 +148,11 @@ public class PointRecommendDAO {
* @param reason
* @return
*/
public Integer rejectPoint(Long lineId, Long pointId, String reason) {
if(Objects.isNull(lineId) || Objects.isNull(pointId)){
public Integer rejectPoint(Long shopId, Long pointId, String reason) {
if(Objects.isNull(shopId) || Objects.isNull(pointId)){
return CommonConstants.ZERO;
}
return pointRecommendMapper.rejectPoint(lineId, pointId, reason);
return pointRecommendMapper.rejectPoint(shopId, pointId, reason);
}
/**
@@ -148,4 +166,16 @@ public class PointRecommendDAO {
}
return pointRecommendMapper.getRecommendPointListByPointId(pointId);
}
public List<PointRecommendDO> getAllRecommendPointList(Long lineId) {
return pointRecommendMapper.getAllRecommendPointList(lineId);
}
public Boolean batchUpdateShopId(List<PointRecommendDO> recommendList) {
if (CollectionUtils.isEmpty(recommendList)){
return Boolean.TRUE;
}
return pointRecommendMapper.batchUpdateShopId(recommendList);
}
}

View File

@@ -5,12 +5,15 @@ import com.cool.store.dto.LicenseSyncDTO;
import com.cool.store.dto.Preparation.PreparationDTO;
import com.cool.store.dto.openPreparation.OpenPlanShopInfoDTO;
import com.cool.store.dto.point.LineCountDTO;
import com.cool.store.dto.point.ShopPointDTO;
import com.cool.store.entity.LineInfoDO;
import com.cool.store.entity.ShopInfoDO;
import com.cool.store.enums.ErrorCodeEnum;
import com.cool.store.exception.ServiceException;
import com.cool.store.mapper.ShopInfoMapper;
import com.cool.store.request.BranchShopRequest;
import com.cool.store.request.PlanListRequest;
import com.cool.store.request.PointLinePageRequest;
import com.cool.store.request.PreparationRequest;
import com.cool.store.request.platformBuildListRequest;
import com.cool.store.response.PlatformBuildListResponse;
@@ -193,5 +196,20 @@ public class ShopInfoDAO {
return shopInfoMapper.getShopAndStoreList(eid,shopIds);
}
public List<ShopPointDTO> getShopPointListByDevelopmentManager(PointLinePageRequest request) {
PageHelper.startPage(request.getPageNum(), request.getPageSize());
return shopInfoMapper.getShopPointListByDevelopmentManager(request);
}
public List<ShopInfoDO> selectAllDataOrByShopId(Long shopId) {
return shopInfoMapper.selectAllDataOrByShopId(shopId);
}
public Boolean batchUpdate(List<ShopInfoDO> list) {
if (CollectionUtils.isEmpty(list)){
return Boolean.FALSE;
}
return shopInfoMapper.batchUpdate(list);
}
}

View File

@@ -4,6 +4,7 @@ import com.cool.store.dto.InvestmentCountDTO;
import com.cool.store.dto.PendingCountDTO;
import com.cool.store.dto.openPreparation.PlanLineDTO;
import com.cool.store.entity.LineInfoDO;
import com.cool.store.entity.ShopInfoDO;
import com.cool.store.request.LineListRequest;
import com.cool.store.request.PartnerRequest;
import com.cool.store.request.PointLinePageRequest;
@@ -128,4 +129,5 @@ public interface LineInfoMapper extends Mapper<LineInfoDO> {
@Param("investmentManager") String investmentManager, @Param("regionId") Long regionId);
List<LineVO> getLinesByKeyword(@Param("keyword") String keyword);
}

View File

@@ -53,11 +53,11 @@ public interface PointInfoMapper extends Mapper<PointInfoDO> {
/**
* 更新铺位的拓展经理
* @param lineId
* @param shopId
* @param developmentManager
* @return
*/
Integer updateSelectedDevelopmentManager(@Param("lineId") Long lineId, @Param("developmentManager")String developmentManager);
Integer updateSelectedDevelopmentManager(@Param("shopId") Long shopId, @Param("developmentManager")String developmentManager);
/**
* 获取团队铺位

View File

@@ -2,6 +2,7 @@ package com.cool.store.mapper;
import com.cool.store.dto.point.LineCountDTO;
import com.cool.store.dto.point.MiniPointPageDTO;
import com.cool.store.dto.point.ShopCountDTO;
import com.cool.store.entity.PointRecommendDO;
import com.cool.store.request.MiniPointPageRequest;
import com.github.pagehelper.Page;
@@ -36,6 +37,13 @@ public interface PointRecommendMapper extends Mapper<PointRecommendDO> {
*/
List<LineCountDTO> getPushShopNumMap(@Param("lineIds") List<Long> lineIds);
/**
* 查询门店推送的铺位数量
* @param shopIds
* @return
*/
List<ShopCountDTO> getShopPushPointNumMap(@Param("shopIds") List<Long> shopIds);
/**
* 获取推荐列表
* @param lineId
@@ -43,6 +51,13 @@ public interface PointRecommendMapper extends Mapper<PointRecommendDO> {
*/
List<PointRecommendDO> getRecommendPointList(@Param("lineId") Long lineId);
/**
* 获取门店推荐列表
* @param shopId
* @return
*/
List<PointRecommendDO> getShopRecommendPointList(@Param("shopId") Long shopId);
/**
* 批量新增
* @param recommendList
@@ -55,7 +70,7 @@ public interface PointRecommendMapper extends Mapper<PointRecommendDO> {
* @param lineId
* @return
*/
Integer turnLineUpdateRecommendStatus(@Param("lineId") Long lineId, @Param("developmentManager")String developmentManager);
Integer turnLineUpdateRecommendStatus(@Param("shopId") Long shopId, @Param("developmentManager")String developmentManager);
/**
* 线索获取推荐铺位列表
@@ -70,7 +85,7 @@ public interface PointRecommendMapper extends Mapper<PointRecommendDO> {
* @param lineId
* @return
*/
Integer updateStatusByPointIdAndLineId(@Param("pointId") Long pointId, @Param("lineId") Long lineId);
Integer updateStatusByPointIdAndLineId(@Param("pointId") Long pointId, @Param("shopId") Long shopId);
/**
* 铺位拒绝
@@ -79,7 +94,7 @@ public interface PointRecommendMapper extends Mapper<PointRecommendDO> {
* @param reason
* @return
*/
Integer rejectPoint(@Param("lineId") Long lineId, @Param("pointId") Long pointId, @Param("reason") String reason);
Integer rejectPoint(@Param("shopId") Long shopId, @Param("pointId") Long pointId, @Param("reason") String reason);
/**
* 获取铺位推送过哪些线索
@@ -87,4 +102,14 @@ public interface PointRecommendMapper extends Mapper<PointRecommendDO> {
* @return
*/
List<PointRecommendDO> getRecommendPointListByPointId(@Param("pointId") Long pointId);
/**
* 数据处理
* @param lineId
* @return
*/
List<PointRecommendDO> getAllRecommendPointList(@Param("lineId") Long lineId);
Boolean batchUpdateShopId(@Param("recommendList") List<PointRecommendDO> recommendList);
}

View File

@@ -4,10 +4,12 @@ import com.cool.store.dto.LicenseSyncDTO;
import com.cool.store.dto.Preparation.PreparationDTO;
import com.cool.store.dto.openPreparation.OpenPlanShopInfoDTO;
import com.cool.store.dto.point.LineCountDTO;
import com.cool.store.dto.point.ShopPointDTO;
import com.cool.store.entity.PointInfoDO;
import com.cool.store.entity.ShopInfoDO;
import com.cool.store.request.BranchShopRequest;
import com.cool.store.request.PlanListRequest;
import com.cool.store.request.PointLinePageRequest;
import com.cool.store.request.PreparationRequest;
import com.cool.store.request.platformBuildListRequest;
import com.cool.store.response.PlatformBuildListResponse;
@@ -103,4 +105,16 @@ public interface ShopInfoMapper extends Mapper<ShopInfoDO> {
List<LicenseSyncDTO> getShopAndStoreList(@Param("enterpriseId") String eid , @Param("shopIds") List<Long> shopIds);
List<ShopPointDTO> getShopPointListByDevelopmentManager(@Param("request") PointLinePageRequest request);
/**
* selectAllDataOrByShopId
* @param shopId
* @return
*/
List<ShopInfoDO> selectAllDataOrByShopId(Long shopId);
Boolean batchUpdate(List<ShopInfoDO> list);
}

View File

@@ -139,7 +139,7 @@
set
development_manager = #{developmentManager}
where
line_id = #{lineId} and select_status = '1' and deleted = 0
shop_id = #{shopId} and select_status = '1' and deleted = 0
</update>
<select id="getTeamPointPage" resultMap="BaseResultMap">

View File

@@ -4,6 +4,7 @@
<resultMap id="BaseResultMap" type="com.cool.store.entity.PointRecommendDO">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="line_id" jdbcType="BIGINT" property="lineId" />
<result column="shop_id" jdbcType="BIGINT" property="shopId" />
<result column="point_id" jdbcType="BIGINT" property="pointId" />
<result column="development_manager" jdbcType="VARCHAR" property="developmentManager" />
<result column="status" jdbcType="TINYINT" property="status" />
@@ -14,7 +15,7 @@
</resultMap>
<sql id="allColumn">
id, line_id, point_id, development_manager, status, reason, deleted, create_time, update_time
id, line_id,shop_id, point_id, development_manager, status, reason, deleted, create_time, update_time
</sql>
<update id="updateShopPointRecommendStatus">
@@ -48,6 +49,20 @@
group by line_id
</select>
<select id="getShopPushPointNumMap" resultType="com.cool.store.dto.point.ShopCountDTO">
select
shop_id as shopId,
count(1) as recommendShopNum
from
xfsg_point_recommend
where
deleted = 0 and shop_id in
<foreach collection="shopIds" item="shopId" index="index" open="(" separator="," close=")">
#{shopId}
</foreach>
group by shop_id
</select>
<select id="getRecommendPointList" resultMap="BaseResultMap">
select
id,
@@ -62,10 +77,25 @@
line_id = #{lineId} and deleted = 0
</select>
<select id="getShopRecommendPointList" resultMap="BaseResultMap">
select
id,
point_id,
line_id,
development_manager,
status,
reason
from
xfsg_point_recommend
where
shop_id = #{shopId} and deleted = 0
</select>
<insert id="batchInsert">
<foreach collection="recommendList" item="item" index="index" separator=";">
insert into xfsg_point_recommend (line_id, point_id, development_manager, status)
values (#{item.lineId}, #{item.pointId}, #{item.developmentManager}, #{item.status})
insert into xfsg_point_recommend (shop_id, point_id, development_manager, status)
values (#{item.shopId}, #{item.pointId}, #{item.developmentManager}, #{item.status})
</foreach>
</insert>
@@ -76,7 +106,7 @@
deleted = if(status = 1, 1, deleted),
development_manager = if(status in (2,4), #{developmentManager}, development_manager)
where
line_id = #{lineId}
shop_id = #{shopId}
</update>
<select id="getLineRecommendPointPage" resultType="com.cool.store.dto.point.MiniPointPageDTO">
@@ -96,12 +126,12 @@
xfsg_point_recommend pr
inner join xfsg_point_info p on p.id = pr.point_id
where
p.deleted = 0 and pr.line_id = #{request.lineId} and pr.deleted = 0
p.deleted = 0 and pr.shop_id = #{request.shopId} and pr.deleted = 0
<if test="request.status != null and request.status == 1">
and pr.status = 1 and p.select_status = 0
</if>
<if test="request.status != null and request.status == 2">
and pr.status = 2 and p.select_status = 1 and p.line_id = #{request.lineId}
and pr.status = 2 and p.select_status = 1 and p.shop_id = #{request.shopId}
</if>
<if test="request.status != null and request.status == 3">
and pr.status in (5, 6)
@@ -112,7 +142,7 @@
update
xfsg_point_recommend
set
status = if(line_id = #{lineId}, 2, 3)
status = if(shop_id = #{shopId}, 2, 3)
where point_id = #{pointId} and deleted = 0 and status = 1
</update>
@@ -122,7 +152,7 @@
set
status = 5,
reason = #{reason}
where point_id = #{pointId} and line_id = #{lineId} and deleted = 0 and status = 1
where point_id = #{pointId} and shop_id = #{shopId} and deleted = 0 and status = 1
</update>
<select id="getRecommendPointListByPointId" resultMap="BaseResultMap">
@@ -133,4 +163,34 @@
where
point_id = #{pointId} and deleted = 0
</select>
<select id="getAllRecommendPointList" resultMap="BaseResultMap">
select
<include refid="allColumn"/>
from
xfsg_point_recommend
<where>
and (shop_id = 0 or shop_id is null)
<if test="lineId!=null">
and line_id = #{lineId}
</if>
</where>
</select>
<update id="batchUpdateShopId">
update xfsg_point_recommend
set
shop_id = case id
<foreach collection="recommendList" item="item" index="index" >
when #{item.id} then #{item.shopId}
</foreach>
end
where
id in
<foreach collection="recommendList" item="entity" open="(" separator="," close=")">
#{entity.id}
</foreach>
</update>
</mapper>

View File

@@ -332,5 +332,45 @@
</if>
</select>
<select id="getShopPointListByDevelopmentManager" resultType="com.cool.store.dto.point.ShopPointDTO">
select
a.id as shopId,
a.point_id as pointId,
a.shop_name as shopName,
a.want_shop_area_id as wantShopAreaId,
b.user_portrait as userPortrait,
b.id as lineId,
b.username as userName,
b.mobile as mobile,
b.investment_manager as investmentManager
from xfsg_shop_info a left join xfsg_line_info b on a.line_id = b.id
where a.deleted = 0 and a.development_manager = #{request.developmentManager} and shop_status in (0, 1)
<if test="request.keyword != null and request.keyword!=''">
and (b.username like #{request.keyword} or b.mobile like #{request.keyword})
</if>
</select>
<select id="selectAllDataOrByShopId" resultMap="BaseResultMap">
select * from xfsg_shop_info
<where>
<if test="shopId!=null">
and id = #{shopId}
</if>
</where>
</select>
<update id="batchUpdate" parameterType="list">
<foreach collection="list" item="item" index="index" open="" close="" separator=";">
UPDATE xfsg_shop_info
SET
development_manager = #{item.developmentManager},
join_mode = #{item.joinMode},
shop_status = #{item.shopStatus},
franchise_brand = #{item.franchiseBrand},
investment_manager = #{item.investmentManager},
want_shop_area_id = #{item.wantShopAreaId}
WHERE id = #{item.id}
</foreach>
</update>
</mapper>

View File

@@ -235,10 +235,7 @@
select
*
from xfsg_shop_stage_info a
<if test="investmentUserId!=null and investmentUserId!=''">
left join xfsg_line_info b on a.line_id = b.id
</if>
<if test="authRegionIds != null and authRegionIds.size() > 0">
<if test="(authRegionIds != null and authRegionIds.size() > 0) or (investmentUserId != null and investmentUserId != '')">
left join xfsg_shop_info si on a.shop_id = si.id
</if>
<where>
@@ -258,7 +255,7 @@
</foreach>
</if>
<if test="investmentUserId!=null and investmentUserId!='' and authRegionIds.size()==0">
and b.investment_manager = #{investmentUserId}
and si.investment_manager = #{investmentUserId}
</if>
<if test="authRegionIds != null and authRegionIds.size() > 0">
and si.region_id in

View File

@@ -0,0 +1,23 @@
package com.cool.store.dto.point;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @Author suzhuhong
* @Date 2025/1/8 15:41
* @Version 1.0
*/
@Data
public class ShopCountDTO {
@ApiModelProperty("门店ID")
private Long shopId;
@ApiModelProperty("推荐门店数量")
private Integer recommendShopNum;
@ApiModelProperty("选择门店数量")
private Integer selectedShopNum;
}

View File

@@ -0,0 +1,31 @@
package com.cool.store.dto.point;
import lombok.Data;
/**
* @Author suzhuhong
* @Date 2025/1/8 15:12
* @Version 1.0
*/
@Data
public class ShopPointDTO {
private Long shopId;
private Long lineId;
private Long pointId;
private String userName;
private String mobile;
private String shopName;
private Long wantShopAreaId;
private String userPortrait;
private String investmentManager;
}

View File

@@ -18,6 +18,9 @@ public class PointRecommendDO {
@Column(name = "line_id")
private Long lineId;
@Column(name = "shop_id")
private Long shopId;
/**
* 点位id
*/

View File

@@ -20,8 +20,8 @@ import java.util.stream.Collectors;
@Data
public class LineRecommendPointRequest {
@ApiModelProperty("线索id")
private Long lineId;
@ApiModelProperty("门店ID")
private Long shopId;
@ApiModelProperty("铺位ids")
private List<Long> pointIds;
@@ -30,12 +30,12 @@ public class LineRecommendPointRequest {
private String developmentManager;
public List<PointRecommendDO> convertList(){
if(Objects.isNull(this.lineId) || CollectionUtils.isEmpty(pointIds)){
if(Objects.isNull(this.shopId) || CollectionUtils.isEmpty(pointIds)){
return Lists.newArrayList();
}
return this.pointIds.stream().map(pointId -> {
PointRecommendDO pointRecommendDO = new PointRecommendDO();
pointRecommendDO.setLineId(this.lineId);
pointRecommendDO.setShopId(this.shopId);
pointRecommendDO.setDevelopmentManager(this.developmentManager);
pointRecommendDO.setPointId(pointId);
pointRecommendDO.setStatus(PointRecommendStatusEnum.POINT_RECOMMEND_STATUS_1.getCode());

View File

@@ -21,7 +21,7 @@ public class MiniPointPageRequest extends PageBasicInfo {
@ApiModelProperty("1.待选择 2.已选择 3.拒绝/失效")
private Integer status;
@ApiModelProperty(value = "线索id")
private Long lineId;
@ApiModelProperty(value = "门店线索ID")
private Long shopId;
}

View File

@@ -21,7 +21,7 @@ import java.util.stream.Collectors;
public class PointRecommendLineRequest {
@ApiModelProperty("线索ids")
private List<Long> lineIds;
private List<Long> shopIds;
@ApiModelProperty("铺位id")
private Long pointId;
@@ -30,12 +30,12 @@ public class PointRecommendLineRequest {
private String developmentManager;
public List<PointRecommendDO> convertList(){
if(Objects.isNull(this.lineIds) || CollectionUtils.isEmpty(this.lineIds) || Objects.isNull(pointId)){
if(Objects.isNull(this.shopIds) || CollectionUtils.isEmpty(this.shopIds) || Objects.isNull(pointId)){
return Lists.newArrayList();
}
return this.lineIds.stream().map(lineId -> {
return this.shopIds.stream().map(shopIds -> {
PointRecommendDO pointRecommendDO = new PointRecommendDO();
pointRecommendDO.setLineId(lineId);
pointRecommendDO.setLineId(shopIds);
pointRecommendDO.setDevelopmentManager(this.developmentManager);
pointRecommendDO.setPointId(pointId);
pointRecommendDO.setStatus(PointRecommendStatusEnum.POINT_RECOMMEND_STATUS_1.getCode());

View File

@@ -23,8 +23,8 @@ public class RejectPointRequest {
@ApiModelProperty("拒绝原因")
private String reason;
@ApiModelProperty(value = "当前线索id", hidden = true)
private Long lineId;
@ApiModelProperty(value = "门店Id")
private Long shopId;

View File

@@ -12,8 +12,8 @@ import lombok.Data;
@Data
public class TurnLineRequest {
@ApiModelProperty("线索id")
private Long lineId;
@ApiModelProperty("门店ID")
private Long shopId;
@ApiModelProperty("新的选址人员")
private String developmentManager;

View File

@@ -41,7 +41,7 @@ public class MiniPointPageVO {
@ApiModelProperty("1.待选择 2.已选择 3.已被他人选择 4.已签约 5.已拒绝 6.已失效")
private Integer recommendStatus;
public static List<MiniPointPageVO> convertVO(List<MiniPointPageDTO> pointList, Map<Long, String> regionNameMap, Long curLineId) {
public static List<MiniPointPageVO> convertVO(List<MiniPointPageDTO> pointList, Map<Long, String> regionNameMap) {
if(CollectionUtils.isEmpty(pointList)){
return Lists.newArrayList();
}

View File

@@ -0,0 +1,119 @@
package com.cool.store.vo.shop;
import com.cool.store.constants.CommonConstants;
import com.cool.store.dto.point.ShopPointDTO;
import com.cool.store.entity.HyOpenAreaInfoDO;
import com.cool.store.entity.LineInfoDO;
import com.cool.store.vo.LinePointBaseInfoVO;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Objects;
/**
* @Author suzhuhong
* @Date 2025/1/8 14:59
* @Version 1.0
*/
@Data
public class ShopPointBaseInfoVO {
@ApiModelProperty("门店ID")
private Long shopId;
@ApiModelProperty("门店名称")
private String shopName;
@ApiModelProperty("手机号")
private String mobile;
@ApiModelProperty("区域名称")
private String areaName;
@ApiModelProperty("区域路径")
private String areaPath;
@ApiModelProperty("用户标签")
private List<String> userPortraitList;
@ApiModelProperty("招商经理")
private String investmentManagerUsername;
@ApiModelProperty("已推门店")
private Integer recommendShopNum;
@ApiModelProperty("已选门店")
private Integer selectedShopNum;
public ShopPointBaseInfoVO(Long shopId, String shopName, String mobile) {
this.shopId = shopId;
this.shopName = shopName;
this.mobile = mobile;
}
public static List<ShopPointBaseInfoVO> convertList(List<ShopPointDTO> lineList, Map<String, String> userNameMap, Map<Long, String> userPortraitMap, Map<Long, HyOpenAreaInfoDO> cityMap, Map<Long, Integer> recommendShopNumMap){
List<ShopPointBaseInfoVO> resultList = new ArrayList<>();
for (ShopPointDTO shopPointDTO : lineList) {
ShopPointBaseInfoVO shopPointBaseInfoVO = new ShopPointBaseInfoVO(shopPointDTO.getShopId(), shopPointDTO.getShopName(), shopPointDTO.getMobile());
String username = userNameMap.get(shopPointDTO.getInvestmentManager());
shopPointBaseInfoVO.setInvestmentManagerUsername(username);
HyOpenAreaInfoDO areaInfo = cityMap.get(shopPointDTO.getWantShopAreaId());
if(Objects.nonNull(areaInfo)){
shopPointBaseInfoVO.setAreaName(areaInfo.getAreaName());
shopPointBaseInfoVO.setAreaPath(areaInfo.getAreaPath().replace("/", "").trim());
}
shopPointBaseInfoVO.setRecommendShopNum(recommendShopNumMap.get(shopPointDTO.getShopId()));
shopPointBaseInfoVO.setSelectedShopNum((shopPointDTO.getPointId()!=null&&shopPointDTO.getPointId()> CommonConstants.ZERO)?CommonConstants.ONE:CommonConstants.ZERO);
if(StringUtils.isNotBlank(shopPointDTO.getUserPortrait())){
List<String> userPortraitList = new ArrayList<>();
String[] parts = shopPointDTO.getUserPortrait().split(",");
for (String part : parts) {
String trimmedPart = part.trim();
if (StringUtils.isNotBlank(trimmedPart)) {
String s = userPortraitMap.get(Long.valueOf(part));
if(StringUtils.isNotBlank(s)){
userPortraitList.add(s);
}
}
}
shopPointBaseInfoVO.setUserPortraitList(userPortraitList);
}
resultList.add(shopPointBaseInfoVO);
}
return resultList;
}
public static ShopPointBaseInfoVO convert(LineInfoDO lineInfo, String username, Map<Long, String> userPortraitMap, HyOpenAreaInfoDO cityArea, Map<Long, Integer> recommendShopNumMap, Map<Long, Integer> selectedShopNumMap){
ShopPointBaseInfoVO linePointBaseInfo = new ShopPointBaseInfoVO(lineInfo.getId(), lineInfo.getUsername(), lineInfo.getMobile());
linePointBaseInfo.setInvestmentManagerUsername(username);
if(Objects.nonNull(cityArea)){
linePointBaseInfo.setAreaName(cityArea.getAreaName());
linePointBaseInfo.setAreaPath(cityArea.getAreaPath().replace("/", "").trim());
}
linePointBaseInfo.setRecommendShopNum(recommendShopNumMap.get(lineInfo.getId()));
linePointBaseInfo.setSelectedShopNum(selectedShopNumMap.get(lineInfo.getId()));
if(StringUtils.isNotBlank(lineInfo.getUserPortrait())){
List<String> userPortraitList = new ArrayList<>();
String[] parts = lineInfo.getUserPortrait().split(",");
for (String part : parts) {
String trimmedPart = part.trim();
if (StringUtils.isNotBlank(trimmedPart)) {
String s = userPortraitMap.get(Long.valueOf(part));
if(StringUtils.isNotBlank(s)){
userPortraitList.add(s);
}
}
}
linePointBaseInfo.setUserPortraitList(userPortraitList);
}
return linePointBaseInfo;
}
}

View File

@@ -29,32 +29,6 @@ public interface DeskService {
*/
PageInfo<IntendPendingVO> intendPendingList(Integer pageNum, Integer pageSize,String userId);
/**
* 面试待处理
* @param pageNum
* @param pageSize
* @param userId
* @return
*/
PageInfo<InterviewPendingVO> interviewPendingList(Integer pageNum, Integer pageSize,String userId);
/**
* 一审面试待处理
* @param pageNum
* @param pageSize
* @param user
* @return
*/
PageInfo<InterviewPendingVO> firstInterviewPendingList(Integer pageNum, Integer pageSize, LoginUserInfo user);
/**
* 二审面试待处理
* @param pageNum
* @param pageSize
* @param user
* @return
*/
PageInfo<InterviewPendingVO> secondInterviewPendingList(Integer pageNum, Integer pageSize, LoginUserInfo user);
/**
* payStagePendingList
@@ -75,14 +49,6 @@ public interface DeskService {
*/
PageInfo<SigningPendingVO> signingPendingList(Integer pageNum, Integer pageSize, LoginUserInfo user);
/**
* storeExperiencePendingList
* @param pageNum
* @param pageSize
* @param user
* @return
*/
PageInfo<StoreExperiencePendingVO> storeExperiencePendingList(Integer pageNum, Integer pageSize, LoginUserInfo user);
/**
* convertToBaseInfoVO
@@ -110,14 +76,6 @@ public interface DeskService {
InvestmentCountDTO getInvestmentCount(LoginUserInfo user);
/**
* 系统建店待处理数据
* @param pageNum
* @param pageSize
* @param user
* @return
*/
PageInfo<PreparationCommonPendingVO> systemBuildStorePendingList(Integer pageNum, Integer pageSize, LoginUserInfo user);
/**
* 缴纳加盟费待处理数据
* @param pageNum
@@ -152,15 +110,14 @@ public interface DeskService {
* @return
*/
PageInfo<PreparationCommonPendingVO> openingAndOperationPlanPendingList(Integer pageNum, Integer pageSize, LoginUserInfo user);
/**
* 首批订货清单待处理数据
* 培训清单待处理数据
* @param pageNum
* @param pageSize
* @param user
* @return
*/
PageInfo<PreparationCommonPendingVO> firstOrderListPendingList(Integer pageNum, Integer pageSize, LoginUserInfo user);
PageInfo<PreparationCommonPendingVO> trainListPendingList(Integer pageNum, Integer pageSize, LoginUserInfo user);
/**
* 信发系统

View File

@@ -4,6 +4,7 @@ import com.cool.store.request.*;
import com.cool.store.vo.LinePointBaseInfoVO;
import com.cool.store.vo.point.*;
import com.cool.store.vo.shop.RentInfoToDoVO;
import com.cool.store.vo.shop.ShopPointBaseInfoVO;
import com.github.pagehelper.PageInfo;
import java.util.List;
@@ -124,6 +125,8 @@ public interface PointService {
*/
PageInfo<LinePointBaseInfoVO> getLinePage(PointLinePageRequest request);
PageInfo<ShopPointBaseInfoVO> getShopPage(PointLinePageRequest request);
/**
* 获取单个加盟商信息
@@ -167,6 +170,13 @@ public interface PointService {
*/
List<PointRecommendPageVO> getLineRecommendPointList(Long lineId);
/**
* 获取门店推荐列表
* @param shopId
* @return
*/
List<PointRecommendPageVO> getShopRecommendPointList(Long shopId);
/**
* 获取我的可推荐铺位列表
* @param request
@@ -284,4 +294,11 @@ public interface PointService {
* @return
*/
PageInfo<RentInfoToDoVO> getRentContractToDoPage(String userId, Integer pageNumber, Integer pageSize);
/**
* 数据处理 V2.4
* @return
*/
Boolean linePointToShopPoint(Long lineId);
}

View File

@@ -7,6 +7,7 @@ import com.cool.store.vo.Preparation.PreparationScheduleVO;
import com.github.pagehelper.PageInfo;
import java.util.List;
import java.util.Map;
/**
* @Author suzhuhong
@@ -68,4 +69,11 @@ public interface PreparationService {
//阶段完成奢shop_status=1已完成
void updateShopStatus(Long shopId);
/**
* 获取店铺状态
* @param shopIds
* @return
*/
Map<Long,Integer> getShopStatus(List<Long> shopIds);
}

View File

@@ -87,8 +87,20 @@ public interface ShopService {
* 修改门店招商专员/督导
*/
Integer updateShopInvestment(Long shopId,String updateUserId,String userId);
/**
* 门店结束跟进
* @param shopId
* @return
*/
Boolean shopClose(Long shopId);
/**
* 分店列表
*/
PageInfo<BranchShopResponse> getBranchShopList(BranchShopRequest request, String userId);
Boolean dataHandle(Long shopId);
}

View File

@@ -104,98 +104,6 @@ public class DeskServiceImpl implements DeskService {
return page;
}
@Override
public PageInfo<InterviewPendingVO> interviewPendingList(Integer pageNum, Integer pageSize, String userId) {
// PageHelper.startPage(pageNum, pageSize);
// List<LineInfoDO> lineInfoDOS = lineInfoDAO.listByInvestmentManager(userId,Arrays.asList(WorkflowSubStageStatusEnum.INVITING_INTERVIEWS_20.getCode()));
// PageInfo page = new PageInfo(lineInfoDOS);
// Map<Long, HyPartnerLabelDO> userPortraitMap = this.getUserPortraitMap(lineInfoDOS);
// List<Long> wantShopAreaIds = lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getWantShopAreaId() != null).map(LineInfoDO::getWantShopAreaId).collect(Collectors.toList());
// Map<Long, String> wantShopAreaMap = hyOpenAreaInfoDAO.selectNameMapByIds(wantShopAreaIds);
// List<Long> lineIds = lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getId() != null).map(LineInfoDO::getId).collect(Collectors.toList());
// List<LineInterviewDO> interviewByLindIds = lineInterviewDAO.getInterviewByLindIds(lineIds, InterviewTypeEnum.MEET);
// Map<Long, LineInterviewDO> interviewDOMap = interviewByLindIds.stream().collect(Collectors.toMap(LineInterviewDO::getLineId, x -> x, (k1, k2) -> k1));
//
// List<InterviewPendingVO> list = new ArrayList<>();
// lineInfoDOS.forEach(x->{
// BaseInfoVO baseInfoVO = convertToBaseInfoVO(x, userPortraitMap, wantShopAreaMap);
// InterviewPendingVO interviewPendingVO = new InterviewPendingVO(baseInfoVO);
// LineInterviewDO lineInterviewDO = interviewDOMap.get(x.getId());
// if (lineInterviewDO != null){
// interviewPendingVO.setStartTime(DateUtils.parseDateToStr(DateUtils.SPECIAL_DATE_START,lineInterviewDO.getStartTime()));
// interviewPendingVO.setEndTime(DateUtils.parseDateToStr(DateUtils.SPECIAL_DATE_END,lineInterviewDO.getEndTime()));
// }
// list.add(interviewPendingVO);
// });
// page.setList(list);
return new PageInfo<>();
}
@Override
public PageInfo<InterviewPendingVO> firstInterviewPendingList(Integer pageNum, Integer pageSize, LoginUserInfo userInfo) {
// PageHelper.startPage(pageNum, pageSize);
// List<LineInfoDO> lineInfoDOS = lineInfoDAO.listByInterview(userInfo.getUserId(),InterviewTypeEnum.INTERVIEW.getCode(),
// Arrays.asList(WorkflowSubStageStatusEnum.FIRST_INTERVIEWS_30.getCode(),WorkflowSubStageStatusEnum.FIRST_INTERVIEWS_35.getCode()),WorkflowSubStageStatusEnum.FIRST_INTERVIEWS_40.getCode(),null);
// PageInfo page = new PageInfo(lineInfoDOS);
// Map<Long, HyPartnerLabelDO> userPortraitMap = this.getUserPortraitMap(lineInfoDOS);
// List<Long> wantShopAreaIds = lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getWantShopAreaId() != null).map(LineInfoDO::getWantShopAreaId).collect(Collectors.toList());
// Map<Long, String> wantShopAreaMap = hyOpenAreaInfoDAO.selectNameMapByIds(wantShopAreaIds);
// List<Long> lineIds = lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getId() != null).map(LineInfoDO::getId).collect(Collectors.toList());
// List<LineInterviewDO> interviewByLindIds = lineInterviewDAO.getInterviewByLindIds(lineIds, InterviewTypeEnum.INTERVIEW);
// Map<Long, LineInterviewDO> interviewDOMap = interviewByLindIds.stream().collect(Collectors.toMap(LineInterviewDO::getLineId, x -> x, (k1, k2) -> k1));
// List<String> userIds = lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getFirstInterviewer() != null).map(LineInfoDO::getFirstInterviewer).collect(Collectors.toList());
// Map<String, EnterpriseUserDO> userInfoMap = enterpriseUserDAO.getUserInfoMap(userIds);
//
// List<InterviewPendingVO> list = new ArrayList<>();
// lineInfoDOS.forEach(x->{
// BaseInfoVO baseInfoVO = convertToBaseInfoVO(x, userPortraitMap, wantShopAreaMap);
// InterviewPendingVO interviewPendingVO = new InterviewPendingVO(baseInfoVO);
// LineInterviewDO lineInterviewDO = interviewDOMap.get(x.getId());
// if (lineInterviewDO != null){
// interviewPendingVO.setStartTime(DateUtils.parseDateToStr(DateUtils.SPECIAL_DATE_START,lineInterviewDO.getStartTime()));
// interviewPendingVO.setEndTime(DateUtils.parseDateToStr(DateUtils.SPECIAL_DATE_END,lineInterviewDO.getEndTime()));
// interviewPendingVO.setInterviewer(userInfoMap.getOrDefault(x.getFirstInterviewer(),new EnterpriseUserDO()).getName());
// interviewPendingVO.setInterviewId(lineInterviewDO.getId());
// }
// list.add(interviewPendingVO);
// });
// page.setList(list);
return new PageInfo<>();
}
@Override
public PageInfo<InterviewPendingVO> secondInterviewPendingList(Integer pageNum, Integer pageSize, LoginUserInfo userInfo) {
// PageHelper.startPage(pageNum, pageSize);
// List<LineInfoDO> lineInfoDOS = lineInfoDAO.listByInterview(userInfo.getUserId(),InterviewTypeEnum.SECOND_INTERVIEW.getCode(),
// Arrays.asList(WorkflowSubStageStatusEnum.SECOND_INTERVIEWS_105.getCode(),WorkflowSubStageStatusEnum.SECOND_INTERVIEWS_110.getCode()), WorkflowSubStageStatusEnum.SECOND_INTERVIEWS_115.getCode(),null);
// PageInfo page = new PageInfo(lineInfoDOS);
// Map<Long, HyPartnerLabelDO> userPortraitMap = this.getUserPortraitMap(lineInfoDOS);
// List<Long> wantShopAreaIds = lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getWantShopAreaId() != null).map(LineInfoDO::getWantShopAreaId).collect(Collectors.toList());
// Map<Long, String> wantShopAreaMap = hyOpenAreaInfoDAO.selectNameMapByIds(wantShopAreaIds);
// List<Long> lineIds = lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getId() != null).map(LineInfoDO::getId).collect(Collectors.toList());
// List<LineInterviewDO> interviewByLindIds = lineInterviewDAO.getInterviewByLindIds(lineIds, InterviewTypeEnum.SECOND_INTERVIEW);
// Map<Long, LineInterviewDO> interviewDOMap = interviewByLindIds.stream().collect(Collectors.toMap(LineInterviewDO::getLineId, x -> x, (k1, k2) -> k1));
// List<String> userIds = lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getSecondInterviewer() != null).map(LineInfoDO::getSecondInterviewer).collect(Collectors.toList());
// Map<String, EnterpriseUserDO> userInfoMap = enterpriseUserDAO.getUserInfoMap(userIds);
//
//
// List<InterviewPendingVO> list = new ArrayList<>();
// lineInfoDOS.forEach(x->{
// BaseInfoVO baseInfoVO = convertToBaseInfoVO(x, userPortraitMap, wantShopAreaMap);
// InterviewPendingVO interviewPendingVO = new InterviewPendingVO(baseInfoVO);
// LineInterviewDO lineInterviewDO = interviewDOMap.get(x.getId());
// if (lineInterviewDO != null){
// interviewPendingVO.setStartTime(DateUtils.parseDateToStr(DateUtils.SPECIAL_DATE_START,lineInterviewDO.getStartTime()));
// interviewPendingVO.setEndTime(DateUtils.parseDateToStr(DateUtils.SPECIAL_DATE_END,lineInterviewDO.getEndTime()));
// interviewPendingVO.setInterviewer(userInfoMap.getOrDefault(x.getSecondInterviewer(),new EnterpriseUserDO()).getName());
// interviewPendingVO.setInterviewId(lineInterviewDO.getId());
// }
// list.add(interviewPendingVO);
// });
// page.setList(list);
return new PageInfo<>();
}
@Override
public PageInfo<PayStagePendingVO> payStagePendingList(Integer pageNum, Integer pageSize, LoginUserInfo user) {
@@ -248,38 +156,6 @@ public class DeskServiceImpl implements DeskService {
return page;
}
@Override
public PageInfo<StoreExperiencePendingVO> storeExperiencePendingList(Integer pageNum, Integer pageSize, LoginUserInfo user) {
// PageHelper.startPage(pageNum, pageSize);
// List<LineInfoDO> lineInfoDOS = lineInfoDAO.listByInvestmentManager(user.getUserId(),
// Arrays.asList(WorkflowSubStageStatusEnum.STORE_EXPERIENCE_85.getCode(),
// WorkflowSubStageStatusEnum.STORE_EXPERIENCE_95.getCode()));
// PageInfo page = new PageInfo(lineInfoDOS);
// Map<Long, HyPartnerLabelDO> userPortraitMap = this.getUserPortraitMap(lineInfoDOS);
// List<Long> wantShopAreaIds = lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getWantShopAreaId() != null).map(LineInfoDO::getWantShopAreaId).collect(Collectors.toList());
// Map<Long, String> wantShopAreaMap = hyOpenAreaInfoDAO.selectNameMapByIds(wantShopAreaIds);
// List<Long> lineIds = lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getId() != null).map(LineInfoDO::getId).collect(Collectors.toList());
// Map<Long, LeaseBaseInfoDO> infoDOMap = new HashMap<>();
// if (CollectionUtils.isNotEmpty(lineIds)){
// List<LeaseBaseInfoDO> leaseBaseInfoDOS = trainingExperienceMapper.selectByLineIds(lineIds);
// infoDOMap = leaseBaseInfoDOS.stream().collect(Collectors.toMap(LeaseBaseInfoDO::getLineId, x -> x));
// }
// List<StoreExperiencePendingVO> list = new ArrayList<>();
// Map<Long, LeaseBaseInfoDO> finalInfoDOMap = infoDOMap;
// lineInfoDOS.forEach(x->{
// BaseInfoVO baseInfoVO = convertToBaseInfoVO(x, userPortraitMap, wantShopAreaMap);
// StoreExperiencePendingVO storeExperiencePendingVO = new StoreExperiencePendingVO(baseInfoVO);
// LeaseBaseInfoDO date = finalInfoDOMap.get(x.getId());
// if (date != null && date.getExperienceStartTime() != null && date.getExperienceEndTime() != null){
// storeExperiencePendingVO.setExperienceStartTime(DateUtils.parseDateToStr(DateUtils.SPECIAL_DATE_START_1,date.getExperienceStartTime()));
// storeExperiencePendingVO.setExperienceEndTime(DateUtils.parseDateToStr(DateUtils.SPECIAL_DATE_START_2,date.getExperienceEndTime()));
// }
// list.add(storeExperiencePendingVO);
// });
// page.setList(list);
return new PageInfo<>();
}
/**
* convertToBaseInfoVO
@@ -347,10 +223,6 @@ public class DeskServiceImpl implements DeskService {
}
@Override
public PageInfo<PreparationCommonPendingVO> systemBuildStorePendingList(Integer pageNum, Integer pageSize, LoginUserInfo user) {
return null;
}
@Override
public PageInfo<PreparationCommonPendingVO> payFranchiseFeesPendingList(Integer pageNum, Integer pageSize, LoginUserInfo user) {
@@ -401,10 +273,6 @@ public class DeskServiceImpl implements DeskService {
return commonPendingVOPageInfo(pageNum, pageSize, user, ShopSubStageEnum.SHOP_STAGE_14, Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_140.getShopSubStageStatus()), Boolean.FALSE);
}
@Override
public PageInfo<PreparationCommonPendingVO> firstOrderListPendingList(Integer pageNum, Integer pageSize, LoginUserInfo user) {
return null;
}
@Override
public PageInfo<PreparationCommonPendingVO> trainListPendingList(Integer pageNum, Integer pageSize, LoginUserInfo user) {

View File

@@ -1,10 +1,12 @@
package com.cool.store.service.impl;
import cn.hutool.core.bean.BeanUtil;
import com.alibaba.fastjson.JSONObject;
import com.cool.store.constants.CommonConstants;
import com.cool.store.dao.*;
import com.cool.store.dto.point.AuditNodeDTO;
import com.cool.store.dto.point.MiniPointPageDTO;
import com.cool.store.dto.point.ShopPointDTO;
import com.cool.store.entity.*;
import com.cool.store.enums.*;
import com.cool.store.enums.point.*;
@@ -18,6 +20,7 @@ import com.cool.store.vo.AuditInfoVO;
import com.cool.store.vo.LinePointBaseInfoVO;
import com.cool.store.vo.point.*;
import com.cool.store.vo.shop.RentInfoToDoVO;
import com.cool.store.vo.shop.ShopPointBaseInfoVO;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageInfo;
import com.google.common.collect.Lists;
@@ -194,7 +197,7 @@ public class PointServiceImpl implements PointService {
* 回退选址状态
* @return
*/
private void rollbackSelectPoint(Long shopId, Long pointId){
private void rollbackSelectPoint(Long shopId, Long pointId){
//店铺回退待带选址
shopInfoDAO.unbindPoint(shopId);
//铺位回退
@@ -204,7 +207,7 @@ public class PointServiceImpl implements PointService {
//租赁合同回到未开始
Integer result = shopStageInfoDAO.updateShopStageToNotStarted(shopId, ShopSubStageEnum.SHOP_STAGE_2);
if(result > CommonConstants.ZERO){
//删除租赁合同
//删除租赁合同
shopRentInfoDAO.deleteRentContractByShopId(shopId);
}
}
@@ -455,6 +458,23 @@ public class PointServiceImpl implements PointService {
return resultPage;
}
@Override
public PageInfo<ShopPointBaseInfoVO> getShopPage(PointLinePageRequest request) {
List<ShopPointDTO> listByDevelopmentManager = shopInfoDAO.getShopPointListByDevelopmentManager(request);
List<String> userPortraitList = listByDevelopmentManager.stream().filter(x -> StringUtils.isNotEmpty(x.getUserPortrait() )).map(ShopPointDTO::getUserPortrait).collect(Collectors.toList());
List<String> investmentManagerUserIds = listByDevelopmentManager.stream().filter(x -> StringUtils.isNotEmpty(x.getInvestmentManager() )).map(ShopPointDTO::getInvestmentManager).collect(Collectors.toList());
List<Long> shopIds = listByDevelopmentManager.stream().map(ShopPointDTO::getShopId).collect(Collectors.toList());
List<Long> wantShopAreaIds = listByDevelopmentManager.stream().map(ShopPointDTO::getWantShopAreaId).collect(Collectors.toList());
Map<Long, Integer> recommendShopNumMap = pointRecommendDAO.getShopPushPointNumMap(shopIds);
Map<Long, HyOpenAreaInfoDO> cityMap = hyOpenAreaInfoDAO.getCityMap(wantShopAreaIds);
Map<String, String> userNameMap = enterpriseUserDAO.getUserNameMap(investmentManagerUserIds);
Map<Long, String> userPortraitMap = labelService.getUserPortraitMap(userPortraitList);
List<ShopPointBaseInfoVO> resultList = ShopPointBaseInfoVO.convertList(listByDevelopmentManager, userNameMap, userPortraitMap, cityMap, recommendShopNumMap);
PageInfo resultPage = new PageInfo(listByDevelopmentManager);
resultPage.setList(resultList);
return resultPage;
}
/**
* 获取单个加盟商信息
* @param lineId
@@ -553,6 +573,20 @@ public class PointServiceImpl implements PointService {
return PointRecommendPageVO.convertVO(recommendPointList, pointList, userNameMap, regionNameMap, canSubmitRentContractShopIds);
}
@Override
public List<PointRecommendPageVO> getShopRecommendPointList(Long shopId) {
List<PointRecommendDO> recommendPointList = pointRecommendDAO.getShopRecommendPointList(shopId);
List<Long> pointIds = recommendPointList.stream().map(PointRecommendDO::getPointId).distinct().collect(Collectors.toList());
List<PointInfoDO> pointList = pointInfoDAO.getPointListByIds(pointIds);
List<Long> regionIds = pointList.stream().map(PointInfoDO::getRegionId).distinct().collect(Collectors.toList());
List<String> developmentManagers = pointList.stream().map(PointInfoDO::getDevelopmentManager).distinct().collect(Collectors.toList());
List<Long> shopIds = pointList.stream().map(PointInfoDO::getShopId).distinct().collect(Collectors.toList());
List<Long> canSubmitRentContractShopIds = shopStageInfoDAO.getCanSubmitRentContractShopIds(shopIds);
Map<String, String> userNameMap = enterpriseUserDAO.getUserNameMap(developmentManagers);
Map<Long, String> regionNameMap = regionService.getBelongWarRegionNameMap(regionIds);
return PointRecommendPageVO.convertVO(recommendPointList, pointList, userNameMap, regionNameMap, canSubmitRentContractShopIds);
}
@Override
public PageInfo<PointPageVO> getRecommendPointList(RecommendPointPageRequest request) {
List<PointPageVO> resultList = new ArrayList();
@@ -583,7 +617,7 @@ public class PointServiceImpl implements PointService {
String pointNames = invalidList.stream().map(PointInfoDO::getPointName).collect(Collectors.joining(","));
throw new ServiceException(ErrorCodeEnum.ERROR_MESSAGE, pointNames + ",已失效");
}
List<PointRecommendDO> recommendPointList = pointRecommendDAO.getRecommendPointList(request.getLineId());
List<PointRecommendDO> recommendPointList = pointRecommendDAO.getShopRecommendPointList(request.getShopId());
if(CollectionUtils.isNotEmpty(recommendPointList)){
List<PointRecommendDO> recommendList = recommendPointList.stream().filter(o -> PointRecommendStatusEnum.POINT_RECOMMEND_STATUS_1.getCode().equals(o.getStatus()) ||
PointRecommendStatusEnum.POINT_RECOMMEND_STATUS_2.getCode().equals(o.getStatus()) ||
@@ -619,14 +653,14 @@ public class PointServiceImpl implements PointService {
List<PointRecommendDO> recommendList = recommendPointList.stream().filter(o -> PointRecommendStatusEnum.POINT_RECOMMEND_STATUS_2.getCode().equals(o.getStatus()) ||
PointRecommendStatusEnum.POINT_RECOMMEND_STATUS_3.getCode().equals(o.getStatus()) ||
PointRecommendStatusEnum.POINT_RECOMMEND_STATUS_4.getCode().equals(o.getStatus()))
.filter(o->request.getLineIds().contains(o.getLineId())).collect(Collectors.toList());
.filter(o->request.getShopIds().contains(o.getLineId())).collect(Collectors.toList());
if(CollectionUtils.isNotEmpty(recommendList)){
throw new ServiceException(ErrorCodeEnum.ERROR_MESSAGE, "推送失败,铺位已被选");
}
List<Long> lineIds = recommendPointList.stream().filter(o -> PointRecommendStatusEnum.POINT_RECOMMEND_STATUS_1.getCode().equals(o.getStatus())).filter(o->request.getLineIds().contains(o.getLineId())).map(PointRecommendDO::getLineId).collect(Collectors.toList());
if(CollectionUtils.isNotEmpty(lineIds)){
lineIds.retainAll(request.getLineIds());
if(CollectionUtils.isNotEmpty(lineIds)){
List<Long> shopIds = recommendPointList.stream().filter(o -> PointRecommendStatusEnum.POINT_RECOMMEND_STATUS_1.getCode().equals(o.getStatus())).filter(o->request.getShopIds().contains(o.getLineId())).map(PointRecommendDO::getLineId).collect(Collectors.toList());
if(CollectionUtils.isNotEmpty(shopIds)){
shopIds.retainAll(request.getShopIds());
if(CollectionUtils.isNotEmpty(shopIds)){
throw new ServiceException(ErrorCodeEnum.ERROR_MESSAGE, "请勿重复推送");
}
}
@@ -638,25 +672,19 @@ public class PointServiceImpl implements PointService {
@Override
@Transactional(rollbackFor = Exception.class)
public Integer turnLine(TurnLineRequest request) {
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(request.getLineId());
Long lineId = request.getLineId();
//更改线索中的拓展经理
LineInfoDO updateLineInfo = new LineInfoDO();
updateLineInfo.setId(lineId);
updateLineInfo.setDevelopmentManager(request.getDevelopmentManager());
lineInfoDAO.updateLineInfo(updateLineInfo);
//更新已被选择的铺位的拓展经理
pointInfoDAO.updateSelectedDevelopmentManager(lineId, request.getDevelopmentManager());
String wantShopName = hyOpenAreaInfoDAO.selectNameMapById(lineInfo.getWantShopAreaId());
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(request.getShopId());
Long shopId = request.getShopId();
//更改门店中的拓展经理
ShopInfoDO shopInfoDO = new ShopInfoDO();
shopInfoDO.setId(shopId);
shopInfoDO.setDevelopmentManager(request.getDevelopmentManager());
shopInfoDAO.updateShopInfo(shopInfoDO);
//更新已被选择的铺位的拓展经理
pointInfoDAO.updateSelectedDevelopmentManager(shopId, request.getDevelopmentManager());
Map<String, String> messageMap = new HashMap<>();
messageMap.put("lineId", String.valueOf(lineId));
messageMap.put("partnerUsername", lineInfo.getUsername());
messageMap.put("partnerMobile", lineInfo.getMobile());
messageMap.put("wantShopName", wantShopName);
commonService.sendMessage(Arrays.asList(request.getDevelopmentManager()), MessageEnum.MESSAGE_14, messageMap);
//删除未选择的推荐铺位
return pointRecommendDAO.turnLineUpdateRecommendStatus(lineId, request.getDevelopmentManager());
return pointRecommendDAO.turnLineUpdateRecommendStatus(shopId, request.getDevelopmentManager());
}
@Override
@@ -697,7 +725,7 @@ public class PointServiceImpl implements PointService {
if(Objects.nonNull(pointPage) && CollectionUtils.isNotEmpty(pointPage.getResult())){
List<Long> regionIds = pointPage.getResult().stream().map(MiniPointPageDTO::getRegionId).distinct().collect(Collectors.toList());
Map<Long, String> regionNameMap = regionService.getBelongWarRegionNameMap(regionIds);
resultList = MiniPointPageVO.convertVO(pointPage, regionNameMap, request.getLineId());
resultList = MiniPointPageVO.convertVO(pointPage, regionNameMap);
}
PageInfo resultPage = new PageInfo(pointPage);
resultPage.setList(resultList);
@@ -758,11 +786,10 @@ public class PointServiceImpl implements PointService {
updateStatusList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_20);
Map<String, String> templateParam = new HashMap<>();
templateParam.put("pointName", pointInfo.getAddress());
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(request.getLineId());
}
updateStatusList.add(selectStatus);
shopStageInfoDAO.batchUpdateShopStageStatus(shopId, updateStatusList);
return pointRecommendDAO.updateStatusByPointIdAndLineId(pointId, lineId);
return pointRecommendDAO.updateStatusByPointIdAndLineId(pointId, shopId);
} catch (ServiceException e) {
throw e;
} finally {
@@ -772,7 +799,7 @@ public class PointServiceImpl implements PointService {
@Override
@Transactional(rollbackFor = Exception.class)
public Integer lineRejectPoint(RejectPointRequest request){
return pointRecommendDAO.rejectPoint(request.getLineId(), request.getPointId(), request.getReason());
return pointRecommendDAO.rejectPoint(request.getShopId(), request.getPointId(), request.getReason());
}
@@ -808,6 +835,7 @@ public class PointServiceImpl implements PointService {
shopInfoDAO.updateShopInfo(shopInfo);
PointRecommendDO pointRecommendDO = new PointRecommendDO();
pointRecommendDO.setLineId(lineId);
pointRecommendDO.setShopId(request.getShopId());
pointRecommendDO.setDevelopmentManager(lineInfo.getDevelopmentManager());
pointRecommendDO.setPointId(pointId);
pointRecommendDO.setStatus(PointRecommendStatusEnum.POINT_RECOMMEND_STATUS_2.getCode());
@@ -1002,6 +1030,67 @@ public class PointServiceImpl implements PointService {
return resultPage;
}
@Override
@Transactional
public Boolean linePointToShopPoint(Long lineId) {
//查询所有的推荐 如果传入的lineId 则查询该线索的所有推荐
List<PointRecommendDO> allRecommendPointList = pointRecommendDAO.getAllRecommendPointList(lineId);
if (CollectionUtils.isEmpty(allRecommendPointList)){
return Boolean.TRUE;
}
List<PointRecommendDO> recommendList = new ArrayList<>();
List<PointRecommendDO> updateList = new ArrayList<>();
allRecommendPointList.forEach(recommend -> {
//如果是待选择
if(PointRecommendStatusEnum.POINT_RECOMMEND_STATUS_1.getCode().equals(recommend.getStatus())||
PointRecommendStatusEnum.POINT_RECOMMEND_STATUS_5.getCode().equals(recommend.getStatus())||
PointRecommendStatusEnum.POINT_RECOMMEND_STATUS_6.getCode().equals(recommend.getStatus())){
//将单条加盟商数据 分配到各个门店商
Long tempLineId = recommend.getLineId();
List<ShopInfoDO> shopList = shopInfoDAO.getShopList(tempLineId);
for (ShopInfoDO shopInfoDO : shopList) {
PointRecommendDO tempPointRecommendDO = new PointRecommendDO();
BeanUtil.copyProperties(recommend,tempPointRecommendDO);
tempPointRecommendDO.setShopId(shopInfoDO.getId());
recommendList.add(tempPointRecommendDO);
}
}
//已选 已被他人选择
if(PointRecommendStatusEnum.POINT_RECOMMEND_STATUS_2.getCode().equals(recommend.getStatus())){
//查询该加盟商选择的这个店
ShopInfoDO shopInfoByPointId = shopInfoDAO.getShopInfoByPointId(recommend.getLineId(), recommend.getPointId());
recommend.setShopId(shopInfoByPointId.getId());
updateList.add(recommend);
}
if(PointRecommendStatusEnum.POINT_RECOMMEND_STATUS_3.getCode().equals(recommend.getStatus())){
List<PointRecommendDO> recommendPointListByPointId = pointRecommendDAO.getRecommendPointListByPointId(recommend.getPointId());
for (PointRecommendDO pointRecommendDO: recommendPointListByPointId) {
//表示当前门店已选址
if (pointRecommendDO.getLineId().equals(recommend.getLineId())){
continue;
}
List<ShopInfoDO> shopList = shopInfoDAO.getShopList(pointRecommendDO.getLineId());
for (ShopInfoDO shopInfoDO : shopList) {
PointRecommendDO tempPointRecommendDO = new PointRecommendDO();
BeanUtil.copyProperties(recommend,tempPointRecommendDO);
tempPointRecommendDO.setShopId(shopInfoDO.getId());
recommendList.add(tempPointRecommendDO);
}
}
}
});
if (CollectionUtils.isNotEmpty(updateList)){
pointRecommendDAO.batchUpdateShopId(updateList);
}
if (CollectionUtils.isNotEmpty(recommendList)){
log.info("linePointToShopPoint recommendList:{}", JSONObject.toJSONString(recommendList));
pointRecommendDAO.addRecommendPoint(recommendList);
}
return Boolean.TRUE;
}
public List<AuditNodeDTO> dealAuditNode(AuditSettingVO auditSetting, Long regionId, String developmentManager) {
List<String> roleIds = new ArrayList<>();
//审核人

View File

@@ -286,16 +286,28 @@ public class PreparationServiceImpl implements PreparationService {
public void updateShopStatus(Long shopId) {
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
if (shopInfo.getShopStage().equals(ShopStatusEnum.ING.getCode())){
Integer all = shopStageInfoDAO.allNumber(shopId, CommonConstants.ZERO);
Integer finish = shopStageInfoDAO.allNumber(shopId, CommonConstants.ONE);
if (all.equals(finish)){
ShopInfoDO shopInfoDO = new ShopInfoDO();
shopInfoDO.setId(shopId);
shopInfoDO.setShopStage(ShopStatusEnum.DONE.getCode());
shopInfoDAO.updateShopInfo(shopInfoDO);
}
Map<Long,Integer> map= getShopStatus(Arrays.asList(shopId));
Integer shopStatus = map.get(shopId);
ShopInfoDO shopInfoDO = new ShopInfoDO();
shopInfoDO.setId(shopId);
shopInfoDO.setShopStage(shopStatus);
shopInfoDAO.updateShopInfo(shopInfoDO);
}
}
@Override
public Map<Long,Integer> getShopStatus(List<Long> shopIds) {
List<ScheduleDTO> scheduleList = shopStageInfoDAO.getScheduleList(shopIds);
Map<Long,Integer> map = new HashMap<>();
scheduleList.forEach(x->{
if (x.getTotalColumn().equals(x.getCompletionColumn())){
map.put(x.getShopId(),ShopStatusEnum.DONE.getCode());
}else {
map.put(x.getShopId(),ShopStatusEnum.ING.getCode());
}
});
return map;
}
}

View File

@@ -5,9 +5,11 @@ import com.cool.store.dao.*;
import com.cool.store.dto.Preparation.PreparationDTO;
import com.cool.store.dto.Preparation.ScheduleDTO;
import com.cool.store.dto.RegionNode;
import com.cool.store.dto.openPreparation.PlanLineDTO;
import com.cool.store.entity.*;
import com.cool.store.enums.*;
import com.cool.store.enums.point.*;
import com.cool.store.enums.point.ShopStatusEnum;
import com.cool.store.exception.ServiceException;
import com.cool.store.mapper.RegionMapper;
import com.cool.store.request.*;
@@ -24,12 +26,14 @@ import com.cool.store.vo.shop.ShopStageInfoVO;
import com.cool.store.vo.shop.StageShopCountVO;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.time.LocalDate;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
@@ -43,6 +47,7 @@ import static com.cool.store.enums.ErrorCodeEnum.UPDATE_INVESTMENT_MANAGER_FAIL;
* @date 2024-04-11 10:26
*/
@Service
@Slf4j
public class ShopServiceImpl implements ShopService {
@Resource
private SysRoleService sysRoleService;
@@ -74,6 +79,8 @@ public class ShopServiceImpl implements ShopService {
private TransferLogService transferLogService;
@Resource
private RegionService regionService;
@Resource
PreparationService preparationService;
@Override
@@ -118,7 +125,7 @@ public class ShopServiceImpl implements ShopService {
public List<MiniShopPageVO> getShopList(Long lineId, String userId) {
List<Long> authRegions = new ArrayList<>();
if (StringUtils.isNotBlank(userId) && !sysRoleService.checkIsAdmin(userId)) {
for (String region : userAuthMappingService.getAuthRegionIdAndSubRegionIdByUserId(userId)) {
for (String region : userAuthMappingService.getAuthRegionIdAndSubRegionIdByUserId(userId)){
authRegions.add(Long.valueOf(region));
}
}
@@ -201,8 +208,6 @@ public class ShopServiceImpl implements ShopService {
addShop.setPartnerId(lineInfo.getPartnerId());
addShop.setShopName(shopName);
addShop.setSupervisorUserId(lineInfo.getInvestmentManager());
addShop.setInvestmentManager(lineInfo.getInvestmentManager());
addShop.setDevelopmentManager(lineInfo.getInvestmentManager());
addShopList.add(addShop);
}
shopInfoDAO.batchAddShop(addShopList);
@@ -238,14 +243,9 @@ public class ShopServiceImpl implements ShopService {
request.setInvestmentManagerUserId(userId);
}
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(request.getLineId());
if (lineInfo.getWorkflowSubStageStatus() < WorkflowSubStageStatusEnum.PAY_DEPOSIT_45.getCode()) {
throw new ServiceException(ErrorCodeEnum.LINE_STATUS_NOT_ALLOW_OPERATE);
}
List<ShopInfoDO> shopList = shopInfoDAO.getShopList(lineInfo.getId());
if (!CollectionUtils.isEmpty(shopList)) {
lineInfo.setWantShopNum(lineInfo.getWantShopNum() + 1);
lineInfoDAO.updateLineInfo(lineInfo);
}
Integer wantShopNum = lineInfo.getWantShopNum() + 1;
lineInfo.setWantShopNum(wantShopNum);
lineInfoDAO.updateLineInfo(lineInfo);
ShopInfoDO shopInfoDO = request.toDO(request, lineInfo.getPartnerId());
shopInfoDO.setCreateUserId(userId);
Long shopId = shopInfoDAO.addShopInfo(shopInfoDO);
@@ -313,6 +313,22 @@ public class ShopServiceImpl implements ShopService {
return shopInfoDAO.updateShopInfo(shopInfo);
}
@Override
public Boolean shopClose(Long shopId) {
log.info("shopClose shopId:{}", shopId);
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
if (Objects.nonNull(shopInfo)){
throw new ServiceException(ErrorCodeEnum.PARAMS_VALIDATE_ERROR);
}
//只有跟进中才能结束跟进
if (ShopStatusEnum.ING.getCode()!=shopInfo.getShopStatus()){
throw new ServiceException(ErrorCodeEnum.SHOP_STATUS_NOT_SUPPORT_HANDLER, ShopStatusEnum.getDesc(shopInfo.getShopStatus()));
}
shopInfo.setShopStatus(ShopStatusEnum.ABANDON.getCode());
shopInfoDAO.updateShopInfo(shopInfo);
return Boolean.TRUE;
}
@Override
public PageInfo<BranchShopResponse> getBranchShopList(BranchShopRequest request, String userId) {
if (!sysRoleService.checkIsAdmin(userId)) {
@@ -371,4 +387,47 @@ public class ShopServiceImpl implements ShopService {
return new PageInfo<>(responses);
}
/**
* 数据处理
* @param shopId
* @return
*/
@Override
public Boolean dataHandle(Long shopId){
log.info("------dataHandle start-----");
boolean hasNext = true;
int pageNum = 1;
int pageSize = 50;
while (hasNext) {
PageHelper.startPage(pageNum, pageSize);
List<ShopInfoDO> shopInfoDOS = shopInfoDAO.selectAllDataOrByShopId(shopId);
if (CollectionUtils.isEmpty(shopInfoDOS)) {
log.info("------dataHandle end------");
return Boolean.TRUE;
}
List<Long> lineIds = shopInfoDOS.stream().map(ShopInfoDO::getLineId).collect(Collectors.toList());
List<LineInfoDO> lines = lineInfoDAO.getByLineIds(lineIds);
//转为map
Map<Long, LineInfoDO> lineMap = lines.stream().collect(Collectors.toMap(LineInfoDO::getId, line -> line));
List<Long> shopIds = shopInfoDOS.stream().map(ShopInfoDO::getId).collect(Collectors.toList());
Map<Long, Integer> shopStatus = preparationService.getShopStatus(shopIds);
for (ShopInfoDO shopInfoDO : shopInfoDOS) {
LineInfoDO lineInfoDO = lineMap.get(shopInfoDO.getLineId());
shopInfoDO.setDevelopmentManager(lineInfoDO.getDevelopmentManager());
shopInfoDO.setShopStatus(shopStatus.get(shopInfoDO.getId()));
shopInfoDO.setJoinMode(lineInfoDO.getJoinMode());
shopInfoDO.setFranchiseBrand(lineInfoDO.getFranchiseBrand());
shopInfoDO.setInvestmentManager(lineInfoDO.getInvestmentManager());
shopInfoDO.setWantShopAreaId(lineInfoDO.getWantShopAreaId());
}
shopInfoDAO.batchUpdate(shopInfoDOS);
hasNext = shopInfoDOS.size() >= pageSize;
pageNum++;
}
return Boolean.TRUE;
}
}

View File

@@ -39,29 +39,6 @@ public class DeskController {
return ResponseResult.success(deskService.intendPendingList(pageNumber,pageSize,userInfo.getUserId()));
}
@ApiOperation("待处理-邀约面谈")
@GetMapping("/interviewPendingList")
public ResponseResult<PageInfo<InterviewPendingVO>> interviewPendingList(@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.interviewPendingList(pageNumber,pageSize,userInfo.getUserId()));
}
@ApiOperation("待处理-一审")
@GetMapping("/firstInterviewPendingList")
public ResponseResult<PageInfo<InterviewPendingVO>> firstInterviewPendingList(@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.firstInterviewPendingList(pageNumber,pageSize,userInfo));
}
@ApiOperation("待处理-二审")
@GetMapping("/secondInterviewPendingList")
public ResponseResult<PageInfo<InterviewPendingVO>> secondInterviewPendingList(@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.secondInterviewPendingList(pageNumber,pageSize,userInfo));
}
@ApiOperation("待处理-缴纳意向金")
@@ -80,13 +57,6 @@ public class DeskController {
return ResponseResult.success(deskService.signingPendingList(pageNumber,pageSize,userInfo));
}
@ApiOperation("待处理-实训体验")
@GetMapping("/storeExperiencePendingList")
public ResponseResult<PageInfo<StoreExperiencePendingVO>> storeExperiencePendingList(@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.storeExperiencePendingList(pageNumber,pageSize,userInfo));
}
@ApiOperation("待处理-数据")
@@ -105,13 +75,6 @@ public class DeskController {
return ResponseResult.success(deskService.getInvestmentCount(userInfo));
}
@ApiOperation("待处理-系统建店")
@GetMapping("/systemBuildStorePendingList")
public ResponseResult<PageInfo<PreparationCommonPendingVO>> systemBuildStorePendingList(@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.systemBuildStorePendingList(pageNumber,pageSize,userInfo));
}
@ApiOperation("待处理-支付加盟费保证金")
@GetMapping("/payFranchiseFeesPendingList")
public ResponseResult<PageInfo<PreparationCommonPendingVO>> payFranchiseFeesPendingList(@RequestParam(value = "pageNumber",required = true,defaultValue = "1")Integer pageNumber,
@@ -141,13 +104,6 @@ public class DeskController {
LoginUserInfo userInfo = CurrentUserHolder.getUser();
return ResponseResult.success(deskService.openingAndOperationPlanPendingList(pageNumber,pageSize,userInfo));
}
@ApiOperation("待处理-首批订货清单")
@GetMapping("/firstOrderListPendingList")
public ResponseResult<PageInfo<PreparationCommonPendingVO>> firstOrderListPendingList(@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.firstOrderListPendingList(pageNumber,pageSize,userInfo));
}
@ApiOperation("待处理-培训登记")
@GetMapping("/trainListPendingList")

View File

@@ -123,4 +123,11 @@ public class PCShopController {
String userId = CurrentUserHolder.getUserId();
return ResponseResult.success(shopService.getBranchShopList(request, userId));
}
@ApiOperation("门店结束跟进")
@GetMapping("/shopClose")
public ResponseResult<Boolean> shopClose(@RequestParam("shopId")Long shopId) {
return ResponseResult.success(shopService.shopClose(shopId));
}
}

View File

@@ -2,11 +2,13 @@ package com.cool.store.controller.webb;
import com.alibaba.fastjson.JSONObject;
import com.cool.store.context.CurrentUserHolder;
import com.cool.store.dto.point.ShopPointDTO;
import com.cool.store.request.*;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.PointService;
import com.cool.store.vo.LinePointBaseInfoVO;
import com.cool.store.vo.point.*;
import com.cool.store.vo.shop.ShopPointBaseInfoVO;
import com.cool.store.vo.shop.ShopStageVO;
import com.github.pagehelper.PageInfo;
import io.swagger.annotations.Api;
@@ -126,6 +128,14 @@ public class PointController {
return ResponseResult.success(pointService.getLinePage(request));
}
@ApiOperation("查询我负责的门店列表-门店的选址经理是我")
@PostMapping("/getShopPage")
public ResponseResult<PageInfo<ShopPointBaseInfoVO>> getShopPage(@RequestBody PointLinePageRequest request) {
request.setDevelopmentManager(CurrentUserHolder.getUserId());
return ResponseResult.success(pointService.getShopPage(request));
}
@ApiOperation("获取单个加盟商选址数据")
@GetMapping("/getLineInfo")
public ResponseResult<LinePointBaseInfoVO> getLineInfo(@RequestParam("lineId") Long lineId) {
@@ -158,12 +168,20 @@ public class PointController {
return ResponseResult.success(pointService.getPointAllAuditRecord(pointId));
}
@ApiOperation("获取加盟商的推荐铺位列表")
@ApiOperation("获取加盟商的推荐铺位列表-V2.4废弃")
@GetMapping("/getLineRecommendPointList")
@Deprecated
public ResponseResult<List<PointRecommendPageVO>> getLineRecommendPointList(@RequestParam("lineId")Long lineId) {
return ResponseResult.success(pointService.getLineRecommendPointList(lineId));
}
@ApiOperation("获取门店的推荐铺位列表-V2.4新增")
@GetMapping("/getShopRecommendPointList")
public ResponseResult<List<PointRecommendPageVO>> getShopRecommendPointList(@RequestParam("shopId")Long shopId) {
return ResponseResult.success(pointService.getShopRecommendPointList(shopId));
}
@ApiOperation("选址人员获取可推荐铺位列表")
@PostMapping("/getRecommendPointList")
public ResponseResult<PageInfo<PointPageVO>> getRecommendPointList(@RequestBody @Validated RecommendPointPageRequest request) {
@@ -171,21 +189,21 @@ public class PointController {
return ResponseResult.success(pointService.getRecommendPointList(request));
}
@ApiOperation("加盟商详情推送铺位")
@ApiOperation("加盟商详情推送铺位->v2.4 门店详情推荐铺位")
@PostMapping("/lineRecommendPoint")
public ResponseResult<Integer> lineRecommendPoint(@RequestBody @Validated LineRecommendPointRequest request) {
request.setDevelopmentManager(CurrentUserHolder.getUserId());
return ResponseResult.success(pointService.lineRecommendPoint(request));
}
@ApiOperation("铺位详情推送加盟商")
@ApiOperation("铺位详情推送加盟商->v2.4 铺位详情推送门店")
@PostMapping("/pointRecommendLine")
public ResponseResult<Integer> pointRecommendLine(@RequestBody @Validated PointRecommendLineRequest request) {
request.setDevelopmentManager(CurrentUserHolder.getUserId());
return ResponseResult.success(pointService.pointRecommendLine(request));
}
@ApiOperation("选址人员转让加盟商")
@ApiOperation("选址人员转让加盟商->v2.4 选址人员转让门店选址经理")
@PostMapping("/turnLine")
public ResponseResult<Integer> turnLine(@RequestBody @Validated TurnLineRequest request) {
return ResponseResult.success(pointService.turnLine(request));

View File

@@ -59,8 +59,6 @@ public class MiniShopController {
@ApiOperation("获取推荐给我的铺位")
@PostMapping("/getLineRecommendPointPage")
public ResponseResult<PageInfo<MiniPointPageVO>> getLineRecommendPointPage(@RequestBody MiniPointPageRequest request) {
Long lineId = PartnerUserHolder.getUser().getLineId();
request.setLineId(lineId);
return ResponseResult.success(pointService.getLineRecommendPointPage(request));
}
@@ -82,8 +80,6 @@ public class MiniShopController {
@ApiOperation("拒绝铺位")
@PostMapping("/rejectPoint")
public ResponseResult<Integer> lineRejectPoint(@RequestBody @Validated RejectPointRequest request) {
Long lineId = PartnerUserHolder.getUser().getLineId();
request.setLineId(lineId);
return ResponseResult.success(pointService.lineRejectPoint(request));
}

View File

@@ -21,6 +21,7 @@ import com.cool.store.response.ResponseResult;
import com.cool.store.response.xfsgFirstOderListResponse;
import com.cool.store.service.AliyunService;
import com.cool.store.service.CoolStoreStartFlowService;
import com.cool.store.service.PointService;
import com.cool.store.service.RegionService;
import com.cool.store.utils.poi.ExcelUtil;
import com.cool.store.utils.poi.StringUtils;
@@ -259,6 +260,13 @@ public class TestController {
}
@Resource
PointService pointService;
@GetMapping("/linePointToShopPoint")
public ResponseResult linePointToShopPoint(@RequestParam("shopId")Long shopId){
return ResponseResult.success(pointService.linePointToShopPoint(shopId));
}
}