Merge #19 into master from cc_20251223_orgChange
组织架构迁移
* cc_20251223_orgChange: (32 commits squashed)
- fix:角色枚举值变更
- fix:待办-缴纳加盟费/保证金中,删除企微督导查询权限,督导查询权限改为招商经理;待办-建店资料中,删除企微督导查询权限
- fix:开店管理-查询我负责的招商经理或运营顾问为当前用户的;查询我管辖的如果当前用户是招商经理则查招商区域
- feat:组织架构切换调整
- Merge remote-tracking branch 'origin/cc_20251223_orgChange' into cc_20251223_orgChange
- feat:门店详情新增招商所属大区 运营顾问
- fix:获取可选择的大区新增type字段
- Merge remote-tracking branch 'origin/cc_20251223_orgChange' into cc_20251223_orgChange
- feat:修改招商所属大区
- Merge remote-tracking branch 'origin/cc_20251223_orgChange' into cc_20251223_orgChange
- feat:新增分店 修改分店
- feat:operations_consultant
- fix:获取平台建店左侧小窗详情接口新增招商区域名称字段
- feat:合同开始之后需要分配才能触发后续阶段
- Merge remote-tracking branch 'origin/cc_20251223_orgChange' into cc_20251223_orgChange
- fix:新增招商区域名称字段
- Merge remote-tracking branch 'origin/cc_20251223_orgChange' into cc_20251223_orgChange
- fix:大区查询添加enableFlag字段
- Merge remote-tracking branch 'origin/cc_20251223_orgChange' into cc_20251223_orgChange
- fix:代办查询bug修改
- fix:字段缺失补充
- Merge branch 'master' into cc_20251223_orgChange
# Conflicts:
#	coolstore-partner-common/src/main/java/com/cool/store/enums/UserRoleEnum.java
#	coolstore-partner-service/src/main/java/com/cool/store/service/impl/ShopServiceImpl.java
#	coolstore-partner-web/src/main/java/com/cool/store/controller/webb/DeskController.java
- fix:修改基本资料bug
- fix:线索列表接口新增招商所属区域名称字段
- fix:加盟商资质审核通过自动建店时带出招商所属区域
- fix:补充提交
- fix:修改开店详情接口修改招商所属区域
- fix:工作台待办返回招商区域名称字段
- fix:开店详情接口招商所属区域id为0的数据返回null
- fix:字段补充
- fix:招商所属大区字段补充
- fix:字段补充
Signed-off-by: 王非凡 <accounts_67eba0c5fee9c49c80c8e2b4@mail.teambition.com>
Reviewed-by: 苏竹红 <570057076@qq.com>
Merged-by: 苏竹红 <570057076@qq.com>
CR-link: https://codeup.aliyun.com/692ea314dec569489f6f167c/hangzhou/java/custom_zxjp/change/19
This commit is contained in:
@@ -302,6 +302,7 @@ public enum ErrorCodeEnum {
|
|||||||
PRODUCTS_SALES_COMPLETED(1511034,"含有销售完成的产品,无法批量报销",null),
|
PRODUCTS_SALES_COMPLETED(1511034,"含有销售完成的产品,无法批量报销",null),
|
||||||
STORE_IS_EXIST(1511035,"该门店已存在",null),
|
STORE_IS_EXIST(1511035,"该门店已存在",null),
|
||||||
FEE_NOT_CONSISTENT(1511036,"合同金额与缴费账单金额不一致,请确定!",null),
|
FEE_NOT_CONSISTENT(1511036,"合同金额与缴费账单金额不一致,请确定!",null),
|
||||||
|
OPERATIONS_CONSULTANT_ASSIGNED(1511037,"OPERATIONS_CONSULTANT_ASSIGNED",null),
|
||||||
|
|
||||||
|
|
||||||
MESSAGE_TEMPLATE_NOT_SUPPORT_EDIT(1610001,"当前消息已发布,不支持编辑!",null),
|
MESSAGE_TEMPLATE_NOT_SUPPORT_EDIT(1610001,"当前消息已发布,不支持编辑!",null),
|
||||||
|
|||||||
@@ -20,10 +20,11 @@ public enum UserRoleEnum {
|
|||||||
TRAINER(150000000L, "训练"),
|
TRAINER(150000000L, "训练"),
|
||||||
XFSG_CLERK(160000000L, "店员"),
|
XFSG_CLERK(160000000L, "店员"),
|
||||||
XFSG_SHOPOWNER(170000000L, "店长"),
|
XFSG_SHOPOWNER(170000000L, "店长"),
|
||||||
SUPERVISION(180000000L, "督导"),
|
// 原督导
|
||||||
|
SUPERVISION(180000000L, "运营顾问"),
|
||||||
SELECT_SITE_LEADER(190000000L, "选址组长"),
|
SELECT_SITE_LEADER(190000000L, "选址组长"),
|
||||||
SELECT_SITE_MANAGER(200000000L, "选址经理"),
|
SELECT_SITE_MANAGER(200000000L, "选址经理"),
|
||||||
INVESTMENT_MANAGER(210000000L, "招商经理"),
|
// INVESTMENT_MANAGER(210000000L, "招商经理"),
|
||||||
HEADQUARTERS_LEADER(220000000L, "总部负责人"),
|
HEADQUARTERS_LEADER(220000000L, "总部负责人"),
|
||||||
HR(230000000L, "HR"),
|
HR(230000000L, "HR"),
|
||||||
DESIGN_MANAGER(240000000L, "品牌设计高级经理"),
|
DESIGN_MANAGER(240000000L, "品牌设计高级经理"),
|
||||||
@@ -71,6 +72,7 @@ public enum UserRoleEnum {
|
|||||||
JING_DONG_HEADQUARTERS_BUILD_CUSTOMER(510000000L,"京东总部建店客服"),
|
JING_DONG_HEADQUARTERS_BUILD_CUSTOMER(510000000L,"京东总部建店客服"),
|
||||||
FRANCHISEES(530000000L,"加盟商"),
|
FRANCHISEES(530000000L,"加盟商"),
|
||||||
SERVICE_PACKAGE_DEDICATED(1762761165005L,"服务包专用"),
|
SERVICE_PACKAGE_DEDICATED(1762761165005L,"服务包专用"),
|
||||||
|
INVESTMENT_MANGER(1765266125369L, "招商经理"),
|
||||||
OPERATION_GENERAL_CONSULTANT(1764642515446L,"运营片区总顾问"),
|
OPERATION_GENERAL_CONSULTANT(1764642515446L,"运营片区总顾问"),
|
||||||
ORDER_GROUP(1766387359609L,"订单组"),
|
ORDER_GROUP(1766387359609L,"订单组"),
|
||||||
;
|
;
|
||||||
|
|||||||
@@ -27,8 +27,8 @@ public class BigRegionDAO {
|
|||||||
@Resource
|
@Resource
|
||||||
BigRegionMapper bigRegionMapper;
|
BigRegionMapper bigRegionMapper;
|
||||||
|
|
||||||
public List<BigRegionDTO> queryAllBigRegion(String keyword, Integer joinBrand){
|
public List<BigRegionDTO> queryAllBigRegion(String keyword, Integer joinBrand,Integer type){
|
||||||
return bigRegionMapper.queryAllBigRegion(keyword, joinBrand);
|
return bigRegionMapper.queryAllBigRegion(keyword, joinBrand,type);
|
||||||
}
|
}
|
||||||
|
|
||||||
public BigRegionDO queryOrgInfoByBigRegionAndJoinMode(Long regionId, Integer joinMode){
|
public BigRegionDO queryOrgInfoByBigRegionAndJoinMode(Long regionId, Integer joinMode){
|
||||||
|
|||||||
@@ -194,11 +194,11 @@ public class LineInfoDAO {
|
|||||||
return lineMobile.stream().filter(o->StringUtils.isNotBlank(o.getMobile())).collect(Collectors.toMap(LineInfoDO::getId, LineInfoDO::getMobile, (k1, k2)-> k1));
|
return lineMobile.stream().filter(o->StringUtils.isNotBlank(o.getMobile())).collect(Collectors.toMap(LineInfoDO::getId, LineInfoDO::getMobile, (k1, k2)-> k1));
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer batchUpdateInvestmentManager( List<Long> lineIds, Integer status, String investmentManager,Long regionId){
|
public Integer batchUpdateInvestmentManager( List<Long> lineIds, Integer status, String investmentManager,Long regionId,Long investRegionId){
|
||||||
if(CollectionUtils.isEmpty(lineIds)|| status == null|| StringUtils.isBlank(investmentManager) || regionId == null){
|
if(CollectionUtils.isEmpty(lineIds)|| status == null|| StringUtils.isBlank(investmentManager) || regionId == null){
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return lineInfoMapper.batchUpdateInvestmentManager(lineIds, status, investmentManager,regionId);
|
return lineInfoMapper.batchUpdateInvestmentManager(lineIds, status, investmentManager,regionId,investRegionId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<LineVO> getLines(String keyword){
|
public List<LineVO> getLines(String keyword){
|
||||||
|
|||||||
@@ -0,0 +1,67 @@
|
|||||||
|
package com.cool.store.dao;
|
||||||
|
|
||||||
|
import com.cool.store.entity.OperationsConsultantAssignDO;
|
||||||
|
import com.cool.store.mapper.OperationsConsultantAssignMapper;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Auther zx_szh
|
||||||
|
* @Date 2025/12/25 14:29
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Repository
|
||||||
|
public class OperationsConsultantAssignDAO {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private OperationsConsultantAssignMapper operationsConsultantAssignMapper;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增分配数据
|
||||||
|
* @param operationsConsultantAssignDO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public Integer addOperationsConsultantAssign(OperationsConsultantAssignDO operationsConsultantAssignDO){
|
||||||
|
return operationsConsultantAssignMapper.insertSelective(operationsConsultantAssignDO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据Id更新数据
|
||||||
|
* @param operationsConsultantAssignDO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public Integer updateById(OperationsConsultantAssignDO operationsConsultantAssignDO){
|
||||||
|
return operationsConsultantAssignMapper.updateByPrimaryKey(operationsConsultantAssignDO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据门店信息查询分配信息
|
||||||
|
* @param shopId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public OperationsConsultantAssignDO selectByShopId(Long shopId){
|
||||||
|
if(shopId == null){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return operationsConsultantAssignMapper.selectByShopId(shopId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取未分配的数据
|
||||||
|
* @param keyword
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<OperationsConsultantAssignDO> getNoAssign(String keyword,List<String> regionIds){
|
||||||
|
return operationsConsultantAssignMapper.getNoAssign(keyword,regionIds);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -9,6 +9,7 @@ import com.google.common.collect.Lists;
|
|||||||
import com.google.common.collect.Maps;
|
import com.google.common.collect.Maps;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.apache.commons.collections4.ListUtils;
|
import org.apache.commons.collections4.ListUtils;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
import tk.mybatis.mapper.entity.Example;
|
import tk.mybatis.mapper.entity.Example;
|
||||||
|
|
||||||
@@ -213,4 +214,12 @@ public class RegionDao {
|
|||||||
}
|
}
|
||||||
return regionMapper.getSubRegionByParentIdsAndRegionType(parentIdList, regionType);
|
return regionMapper.getSubRegionByParentIdsAndRegionType(parentIdList, regionType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<String> getSubIdsByRegionIdsAndType(List<String> regionIds,String regionType){
|
||||||
|
if (CollectionUtils.isEmpty(regionIds)){
|
||||||
|
return Lists.newArrayList();
|
||||||
|
}
|
||||||
|
return regionMapper.getSubIdsByRegionIdsAndType(regionIds, regionType);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ public interface BigRegionMapper extends Mapper<BigRegionDO> {
|
|||||||
* @param keyword
|
* @param keyword
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<BigRegionDTO> queryAllBigRegion(@Param("keyword") String keyword, @Param("joinBrand") Integer joinBrand);
|
List<BigRegionDTO> queryAllBigRegion(@Param("keyword") String keyword, @Param("joinBrand") Integer joinBrand, @Param("type") Integer type);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据所属大区与加盟模式查询新管家信息
|
* 根据所属大区与加盟模式查询新管家信息
|
||||||
|
|||||||
@@ -126,7 +126,9 @@ public interface LineInfoMapper extends Mapper<LineInfoDO> {
|
|||||||
*/
|
*/
|
||||||
Integer batchUpdateInvestmentManager(@Param("lineIds") List<Long> lineIds,
|
Integer batchUpdateInvestmentManager(@Param("lineIds") List<Long> lineIds,
|
||||||
@Param("status") Integer status,
|
@Param("status") Integer status,
|
||||||
@Param("investmentManager") String investmentManager, @Param("regionId") Long regionId);
|
@Param("investmentManager") String investmentManager,
|
||||||
|
@Param("regionId") Long regionId,
|
||||||
|
@Param("investRegionId") Long investRegionId);
|
||||||
|
|
||||||
List<LineVO> getLinesByKeyword(@Param("keyword") String keyword);
|
List<LineVO> getLinesByKeyword(@Param("keyword") String keyword);
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
package com.cool.store.mapper;
|
||||||
|
|
||||||
|
import com.cool.store.entity.OperationsConsultantAssignDO;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import tk.mybatis.mapper.common.Mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface OperationsConsultantAssignMapper extends Mapper<OperationsConsultantAssignDO> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据门店查询运营顾问分配信息
|
||||||
|
* @param shopId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
OperationsConsultantAssignDO selectByShopId(Long shopId);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取待分配
|
||||||
|
* @param keyword
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<OperationsConsultantAssignDO> getNoAssign(@Param("keyword") String keyword, @Param("regionIds") List<String> regionIds);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -118,4 +118,8 @@ public interface RegionMapper {
|
|||||||
|
|
||||||
|
|
||||||
List<RegionDO> getSubRegionByParentIdsAndRegionType( @Param("parentIds")List<Long> parentIds, @Param("regionType")String regionType);
|
List<RegionDO> getSubRegionByParentIdsAndRegionType( @Param("parentIds")List<Long> parentIds, @Param("regionType")String regionType);
|
||||||
|
|
||||||
|
|
||||||
|
List<String> getSubIdsByRegionIdsAndType(@Param("regionIds") List<String> regionIds, @Param("regionType")String regionType);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,6 +32,7 @@
|
|||||||
region_id as regionId,
|
region_id as regionId,
|
||||||
region_name as regionName,
|
region_name as regionName,
|
||||||
group_name as groupName,
|
group_name as groupName,
|
||||||
|
enable_flag as enableFlag,
|
||||||
store_manage_region_id as storeManageRegionId
|
store_manage_region_id as storeManageRegionId
|
||||||
FROM `xfsg_big_region`
|
FROM `xfsg_big_region`
|
||||||
<where>
|
<where>
|
||||||
@@ -41,7 +42,11 @@
|
|||||||
<if test="joinBrand != null">
|
<if test="joinBrand != null">
|
||||||
and join_brand = #{joinBrand}
|
and join_brand = #{joinBrand}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="type != null">
|
||||||
|
and type = #{type}
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
|
order by enable_flag desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="queryOrgInfoByBigRegionAndJoinMode" resultMap="BaseResultMap">
|
<select id="queryOrgInfoByBigRegionAndJoinMode" resultMap="BaseResultMap">
|
||||||
@@ -69,5 +74,13 @@
|
|||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
|
<choose>
|
||||||
|
<when test="request.type == null or request.type == 1">
|
||||||
|
AND type = 1
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
AND type = 2
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -33,6 +33,7 @@
|
|||||||
<result column="partner_num" jdbcType="VARCHAR" property="partnerNum" />
|
<result column="partner_num" jdbcType="VARCHAR" property="partnerNum" />
|
||||||
<result column="big_region_id" jdbcType="BIGINT" property="bigRegionId" />
|
<result column="big_region_id" jdbcType="BIGINT" property="bigRegionId" />
|
||||||
<result column="franchise_brand" jdbcType="VARCHAR" property="franchiseBrand" />
|
<result column="franchise_brand" jdbcType="VARCHAR" property="franchiseBrand" />
|
||||||
|
<result column="invest_region_id" jdbcType="BIGINT" property="investRegionId" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<insert id="insertOrUpdate" parameterType="com.cool.store.entity.LineInfoDO" useGeneratedKeys="true" keyProperty="id">
|
<insert id="insertOrUpdate" parameterType="com.cool.store.entity.LineInfoDO" useGeneratedKeys="true" keyProperty="id">
|
||||||
INSERT INTO xfsg_line_info
|
INSERT INTO xfsg_line_info
|
||||||
@@ -46,6 +47,9 @@
|
|||||||
<if test="param.regionId != null">
|
<if test="param.regionId != null">
|
||||||
region_id,
|
region_id,
|
||||||
</if>
|
</if>
|
||||||
|
<if test="param.investRegionId != null">
|
||||||
|
invest_region_id,
|
||||||
|
</if>
|
||||||
<if test="param.bigRegionId != null">
|
<if test="param.bigRegionId != null">
|
||||||
big_region_id,
|
big_region_id,
|
||||||
</if>
|
</if>
|
||||||
@@ -141,6 +145,9 @@
|
|||||||
<if test="param.regionId != null">
|
<if test="param.regionId != null">
|
||||||
#{param.regionId},
|
#{param.regionId},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="param.investRegionId != null">
|
||||||
|
#{param.investRegionId},
|
||||||
|
</if>
|
||||||
<if test="param.bigRegionId != null">
|
<if test="param.bigRegionId != null">
|
||||||
#{param.bigRegionId},
|
#{param.bigRegionId},
|
||||||
</if>
|
</if>
|
||||||
@@ -234,6 +241,9 @@
|
|||||||
<if test="param.regionId != null">
|
<if test="param.regionId != null">
|
||||||
region_id = #{param.regionId},
|
region_id = #{param.regionId},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="param.investRegionId != null">
|
||||||
|
invest_region_id = #{param.investRegionId},
|
||||||
|
</if>
|
||||||
<if test="param.bigRegionId != null">
|
<if test="param.bigRegionId != null">
|
||||||
big_region_id = #{param.bigRegionId},
|
big_region_id = #{param.bigRegionId},
|
||||||
</if>
|
</if>
|
||||||
@@ -637,7 +647,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<update id="batchUpdateInvestmentManager">
|
<update id="batchUpdateInvestmentManager">
|
||||||
update xfsg_line_info set line_status = #{status} , investment_manager = #{investmentManager} ,region_id = #{regionId} where id in
|
update xfsg_line_info set line_status = #{status} , investment_manager = #{investmentManager} ,region_id = #{regionId},invest_region_id = #{investRegionId} where id in
|
||||||
<foreach collection="lineIds" item="lineId" open="(" separator="," close=")">
|
<foreach collection="lineIds" item="lineId" open="(" separator="," close=")">
|
||||||
#{lineId}
|
#{lineId}
|
||||||
</foreach>
|
</foreach>
|
||||||
|
|||||||
@@ -0,0 +1,42 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.cool.store.mapper.OperationsConsultantAssignMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.cool.store.entity.OperationsConsultantAssignDO">
|
||||||
|
<!--
|
||||||
|
WARNING - @mbg.generated
|
||||||
|
-->
|
||||||
|
<id column="id" jdbcType="BIGINT" property="id" />
|
||||||
|
<result column="shop_id" jdbcType="BIGINT" property="shopId" />
|
||||||
|
<result column="region_id" jdbcType="BIGINT" property="regionId" />
|
||||||
|
<result column="assign_status" jdbcType="TINYINT" property="assignStatus" />
|
||||||
|
<result column="created_time" jdbcType="TIMESTAMP" property="createdTime" />
|
||||||
|
<result column="updated_time" jdbcType="TIMESTAMP" property="updatedTime" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<select id="selectByShopId" resultMap="BaseResultMap">
|
||||||
|
select * from zxjp_operations_consultant_assign
|
||||||
|
<where>
|
||||||
|
<if test="shopId!=null">
|
||||||
|
and shop_id = #{shopId}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getNoAssign" resultMap="BaseResultMap">
|
||||||
|
select * from zxjp_operations_consultant_assign zoca
|
||||||
|
left join xfsg_shop_info xsi on zoca.shop_id = xsi.id
|
||||||
|
<where>
|
||||||
|
and zoca.assign_status = 0
|
||||||
|
<if test="keyword!=null and keyword!=''">
|
||||||
|
and (xsi.shop_name like concat('%', #{keyword}, '%') or xsi.shop_code like concat('%', #{keyword}, '%'))
|
||||||
|
</if>
|
||||||
|
<if test="regionIds!=null and regionIds.size>0">
|
||||||
|
<foreach collection="regionIds" item="regionId" open="and xsi.region_id in (" close=")" separator=",">
|
||||||
|
#{regionId}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
order by zoca.id desc
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -450,4 +450,22 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="getSubIdsByRegionIdsAndType" resultType="String">
|
||||||
|
select
|
||||||
|
id
|
||||||
|
from
|
||||||
|
region_${enterpriseId}
|
||||||
|
where
|
||||||
|
deleted = 0
|
||||||
|
<if test="regionType!=null">
|
||||||
|
and region_type = #{regionType}
|
||||||
|
</if>
|
||||||
|
and
|
||||||
|
<foreach collection="regionIds" separator=" or " open="(" close=")" item="region" >
|
||||||
|
region_path like concat("%/", #{region}, "/%")
|
||||||
|
</foreach>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -39,6 +39,8 @@
|
|||||||
<result column="shop_decoration_attributes" jdbcType="INTEGER" property="shopDecorationAttributes"/>
|
<result column="shop_decoration_attributes" jdbcType="INTEGER" property="shopDecorationAttributes"/>
|
||||||
<result column="hqt_shop_id" jdbcType="VARCHAR" property="hqtShopId"/>
|
<result column="hqt_shop_id" jdbcType="VARCHAR" property="hqtShopId"/>
|
||||||
<result column="store_id" jdbcType="VARCHAR" property="storeId"/>
|
<result column="store_id" jdbcType="VARCHAR" property="storeId"/>
|
||||||
|
<result column="invest_region_id" jdbcType="BIGINT" property="investRegionId"/>
|
||||||
|
<result column="operations_consultant" jdbcType="VARCHAR" property="operationsConsultant"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="allColumn">
|
<sql id="allColumn">
|
||||||
@@ -47,17 +49,17 @@
|
|||||||
shop_code, store_num, shop_manager_user_id, supervisor_user_id,
|
shop_code, store_num, shop_manager_user_id, supervisor_user_id,
|
||||||
plan_open_time, cur_progress, shop_type, shop_stage, deleted, create_time, update_time,
|
plan_open_time, cur_progress, shop_type, shop_stage, deleted, create_time, update_time,
|
||||||
join_mode,detail_address,franchise_brand,development_manager,want_shop_area_id,investment_manager,shop_status,create_user_id,update_user_id,store_type
|
join_mode,detail_address,franchise_brand,development_manager,want_shop_area_id,investment_manager,shop_status,create_user_id,update_user_id,store_type
|
||||||
, province,province_code,city,city_code,district,district_code,manager_region_id,shop_decoration_attributes,hqt_shop_id,store_id
|
, province,province_code,city,city_code,district,district_code,manager_region_id,shop_decoration_attributes,hqt_shop_id,store_id, invest_region_id, operations_consultant
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<insert id="batchAddShop" useGeneratedKeys="true" keyProperty="id" keyColumn="id">
|
<insert id="batchAddShop" useGeneratedKeys="true" keyProperty="id" keyColumn="id">
|
||||||
insert into xfsg_shop_info(region_id, line_id, partner_id, shop_name,
|
insert into xfsg_shop_info(region_id, line_id, partner_id, shop_name,
|
||||||
store_num,supervisor_user_id,create_time,join_mode,franchise_brand,
|
store_num,supervisor_user_id,create_time,join_mode,franchise_brand,
|
||||||
development_manager,want_shop_area_id,investment_manager,store_id) values
|
development_manager,want_shop_area_id,investment_manager,store_id,invest_region_id) values
|
||||||
<foreach collection="shopInfoList" item="shop" separator=",">
|
<foreach collection="shopInfoList" item="shop" separator=",">
|
||||||
(#{shop.regionId}, #{shop.lineId}, #{shop.partnerId}, #{shop.shopName},
|
(#{shop.regionId}, #{shop.lineId}, #{shop.partnerId}, #{shop.shopName},
|
||||||
#{shop.storeNum},#{shop.supervisorUserId},#{shop.createTime},#{shop.joinMode},#{shop.franchiseBrand},#{shop.developmentManager},
|
#{shop.storeNum},#{shop.supervisorUserId},#{shop.createTime},#{shop.joinMode},#{shop.franchiseBrand},#{shop.developmentManager},
|
||||||
#{shop.wantShopAreaId},#{shop.investmentManager},#{shop.storeId})
|
#{shop.wantShopAreaId},#{shop.investmentManager},#{shop.storeId},#{shop.investRegionId})
|
||||||
</foreach>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
@@ -312,7 +314,8 @@
|
|||||||
a.shop_status as shopStatus,
|
a.shop_status as shopStatus,
|
||||||
a.detail_address as shopAddress,
|
a.detail_address as shopAddress,
|
||||||
a.manager_region_id as managerRegionId,
|
a.manager_region_id as managerRegionId,
|
||||||
a.store_id as storeId
|
a.store_id as storeId,
|
||||||
|
a.invest_region_id as investRegionId
|
||||||
from xfsg_shop_info a left join xfsg_line_info b on a.line_id = b.id
|
from xfsg_shop_info a left join xfsg_line_info b on a.line_id = b.id
|
||||||
<if test="request.contractStartTime !=null and request.contractEndTime != null">
|
<if test="request.contractStartTime !=null and request.contractEndTime != null">
|
||||||
left join xfsg_sign_franchise c on a.id = c.shop_id
|
left join xfsg_sign_franchise c on a.id = c.shop_id
|
||||||
@@ -370,7 +373,7 @@
|
|||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
<if test="request.flag == 1">
|
<if test="request.flag == 1">
|
||||||
and a.investment_manager = #{userId}
|
and (a.investment_manager = #{userId} or a.operations_consultant = #{userId})
|
||||||
</if>
|
</if>
|
||||||
<if test="request.authRegionIds != null and request.authRegionIds.size() > 0">
|
<if test="request.authRegionIds != null and request.authRegionIds.size() > 0">
|
||||||
and a.region_id in
|
and a.region_id in
|
||||||
@@ -378,6 +381,12 @@
|
|||||||
#{regionId}
|
#{regionId}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
|
<if test="request.authInvestRegionIds != null and request.authInvestRegionIds.size() > 0">
|
||||||
|
and a.invest_region_id in
|
||||||
|
<foreach collection="request.authInvestRegionIds" item="investRegionId" index="index" open="(" separator="," close=")">
|
||||||
|
#{investRegionId}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
order by a.update_time desc
|
order by a.update_time desc
|
||||||
</select>
|
</select>
|
||||||
<select id="getShopListByRegion" resultType="com.cool.store.entity.ShopInfoDO">
|
<select id="getShopListByRegion" resultType="com.cool.store.entity.ShopInfoDO">
|
||||||
|
|||||||
@@ -57,5 +57,5 @@ public class PreparationDTO {
|
|||||||
|
|
||||||
private String storeId;
|
private String storeId;
|
||||||
|
|
||||||
|
private Long investRegionId;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,5 +15,8 @@ public class BigRegionDTO {
|
|||||||
private String regionName;
|
private String regionName;
|
||||||
|
|
||||||
private String groupName;
|
private String groupName;
|
||||||
|
|
||||||
private Long storeManageRegionId;
|
private Long storeManageRegionId;
|
||||||
|
|
||||||
|
private Integer enableFlag;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,6 +21,9 @@ public class LineInfoDO {
|
|||||||
@Column(name = "region_id")
|
@Column(name = "region_id")
|
||||||
private Long regionId;
|
private Long regionId;
|
||||||
|
|
||||||
|
@Column(name = "invest_region_id")
|
||||||
|
private Long investRegionId;
|
||||||
|
|
||||||
@Column(name = "big_region_id")
|
@Column(name = "big_region_id")
|
||||||
private Long bigRegionId;
|
private Long bigRegionId;
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,45 @@
|
|||||||
|
package com.cool.store.entity;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import javax.persistence.*;
|
||||||
|
|
||||||
|
@Table(name = "zxjp_operations_consultant_assign")
|
||||||
|
@Data
|
||||||
|
public class OperationsConsultantAssignDO {
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门店ID
|
||||||
|
*/
|
||||||
|
@Column(name = "shop_id")
|
||||||
|
private Long shopId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 区域ID
|
||||||
|
*/
|
||||||
|
@Column(name = "region_id")
|
||||||
|
private Long regionId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分配状态(0-待分配,1-已分配)
|
||||||
|
*/
|
||||||
|
@Column(name = "assign_status")
|
||||||
|
private Integer assignStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@Column(name = "created_time")
|
||||||
|
private Date createdTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
@Column(name = "updated_time")
|
||||||
|
private Date updatedTime;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -161,4 +161,10 @@ public class ShopInfoDO {
|
|||||||
// 门店id
|
// 门店id
|
||||||
@Column(name = "store_id")
|
@Column(name = "store_id")
|
||||||
private String storeId;
|
private String storeId;
|
||||||
|
|
||||||
|
@Column(name = "invest_region_id")
|
||||||
|
private Long investRegionId;
|
||||||
|
|
||||||
|
@Column(name = "operations_consultant")
|
||||||
|
private String operationsConsultant;
|
||||||
}
|
}
|
||||||
@@ -48,6 +48,9 @@ public class AddBranchShopRequest {
|
|||||||
@ApiModelProperty("所属管理区域id")
|
@ApiModelProperty("所属管理区域id")
|
||||||
private Long managerRegionId;
|
private Long managerRegionId;
|
||||||
|
|
||||||
|
@ApiModelProperty("招商所属区域 20251224新增")
|
||||||
|
private Long investRegionId;
|
||||||
|
|
||||||
public ShopInfoDO toDO(AddBranchShopRequest request, LineInfoDO lineInfo) {
|
public ShopInfoDO toDO(AddBranchShopRequest request, LineInfoDO lineInfo) {
|
||||||
ShopInfoDO shopInfoDO = new ShopInfoDO();
|
ShopInfoDO shopInfoDO = new ShopInfoDO();
|
||||||
shopInfoDO.setLineId(request.getLineId());
|
shopInfoDO.setLineId(request.getLineId());
|
||||||
@@ -65,6 +68,7 @@ public class AddBranchShopRequest {
|
|||||||
shopInfoDO.setPartnerId(lineInfo.getPartnerId());
|
shopInfoDO.setPartnerId(lineInfo.getPartnerId());
|
||||||
shopInfoDO.setFranchiseBrand(request.getFranchiseBrand());
|
shopInfoDO.setFranchiseBrand(request.getFranchiseBrand());
|
||||||
shopInfoDO.setManagerRegionId(request.getManagerRegionId());
|
shopInfoDO.setManagerRegionId(request.getManagerRegionId());
|
||||||
|
shopInfoDO.setInvestRegionId(request.getInvestRegionId());
|
||||||
return shopInfoDO;
|
return shopInfoDO;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.cool.store.request;
|
package com.cool.store.request;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import javax.validation.constraints.Max;
|
import javax.validation.constraints.Max;
|
||||||
@@ -26,7 +27,12 @@ public class AddLineRequest {
|
|||||||
//'1-社会加盟模式/加盟部加盟店 2-强加盟模式/加盟公司加盟店 3-加盟公司自有店',
|
//'1-社会加盟模式/加盟部加盟店 2-强加盟模式/加盟公司加盟店 3-加盟公司自有店',
|
||||||
private Integer joinMode;
|
private Integer joinMode;
|
||||||
|
|
||||||
|
@ApiModelProperty("招商经理")
|
||||||
private String investmentManagerUserId;
|
private String investmentManagerUserId;
|
||||||
|
|
||||||
|
@ApiModelProperty("运营所属大区")
|
||||||
private Long regionId;
|
private Long regionId;
|
||||||
|
|
||||||
|
@ApiModelProperty("招商所属大区-1224新增")
|
||||||
|
private Long investRegionId;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,25 @@
|
|||||||
|
package com.cool.store.request;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Auther zx_szh
|
||||||
|
* @Date 2025/12/25 17:58
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class AssignOperationConsultantRequest {
|
||||||
|
|
||||||
|
@ApiModelProperty("ID")
|
||||||
|
@NotNull(message = "门店ID不能为空")
|
||||||
|
private Long shopId;
|
||||||
|
|
||||||
|
@ApiModelProperty("运营顾问")
|
||||||
|
@NotBlank(message = "运营顾问不能为空")
|
||||||
|
private String operationConsultantUserId;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
package com.cool.store.request;
|
||||||
|
|
||||||
|
import com.cool.store.common.PageBasicInfo;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Auther zx_szh
|
||||||
|
* @Date 2025/12/25 15:17
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class AssignPendingRequest extends PageBasicInfo {
|
||||||
|
|
||||||
|
@ApiModelProperty("关键字")
|
||||||
|
private String keyword;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -38,5 +38,7 @@ public class BranchShopDetailRequest {
|
|||||||
private Integer storeType;
|
private Integer storeType;
|
||||||
@ApiModelProperty("所属管理区域id")
|
@ApiModelProperty("所属管理区域id")
|
||||||
private Long managerRegionId;
|
private Long managerRegionId;
|
||||||
|
@ApiModelProperty("招商所属大区 20251224-新增")
|
||||||
|
private Long investRegionId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import com.cool.store.common.PageBasicInfo;
|
|||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import javax.validation.constraints.NotBlank;
|
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -49,4 +48,7 @@ public class BranchShopRequest extends PageBasicInfo{
|
|||||||
private Date contractStartTime;
|
private Date contractStartTime;
|
||||||
@ApiModelProperty("合同结束时间")
|
@ApiModelProperty("合同结束时间")
|
||||||
private Date contractEndTime;
|
private Date contractEndTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "招商区域", hidden = true)
|
||||||
|
private List<String> authInvestRegionIds;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.cool.store.request;
|
package com.cool.store.request;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -18,4 +19,7 @@ public class DistributionInvestmentRequest {
|
|||||||
|
|
||||||
private Long regionId;
|
private Long regionId;
|
||||||
|
|
||||||
|
@ApiModelProperty("招商所属区域-1024 新增")
|
||||||
|
private Long investRegionId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,4 +15,9 @@ public class QueryBigRegionRequest{
|
|||||||
private String keyword;
|
private String keyword;
|
||||||
|
|
||||||
private List<String> groupNameList;
|
private List<String> groupNameList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类型 1-运营管理组织 2-招商组织
|
||||||
|
*/
|
||||||
|
private Integer type;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,4 +31,7 @@ public class UpdateLineRequest {
|
|||||||
@ApiModelProperty("加盟品牌")
|
@ApiModelProperty("加盟品牌")
|
||||||
private String franchiseBrand;
|
private String franchiseBrand;
|
||||||
|
|
||||||
|
@ApiModelProperty("招商所属大区-1224新增")
|
||||||
|
private Long investRegionId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,6 +56,19 @@ public class BranchShopDetailResponse {
|
|||||||
@ApiModelProperty("所属大区id")
|
@ApiModelProperty("所属大区id")
|
||||||
private Long regionId;
|
private Long regionId;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty("招商所属大区id")
|
||||||
|
private Long investRegionId;
|
||||||
|
|
||||||
|
@ApiModelProperty("招商所属大区名称")
|
||||||
|
private String investRegionName;
|
||||||
|
|
||||||
|
@ApiModelProperty("运营顾问")
|
||||||
|
private String operationsConsultant;
|
||||||
|
|
||||||
|
@ApiModelProperty("运营顾问")
|
||||||
|
private String operationsConsultantName;
|
||||||
|
|
||||||
@ApiModelProperty("意向开店区域")
|
@ApiModelProperty("意向开店区域")
|
||||||
private String wantRegionName;
|
private String wantRegionName;
|
||||||
|
|
||||||
|
|||||||
@@ -63,6 +63,11 @@ public class BranchShopResponse {
|
|||||||
|
|
||||||
private String storeId;
|
private String storeId;
|
||||||
|
|
||||||
|
@ApiModelProperty("招商所属大区")
|
||||||
|
private Long investRegionId;
|
||||||
|
|
||||||
|
@ApiModelProperty("招商所属大区名称")
|
||||||
|
private String investRegionName;
|
||||||
|
|
||||||
public void setDays() {
|
public void setDays() {
|
||||||
if (this.openingActivityEndTime==null){
|
if (this.openingActivityEndTime==null){
|
||||||
|
|||||||
@@ -35,6 +35,12 @@ public class LineInfoVO {
|
|||||||
@ApiModelProperty("战区名称")
|
@ApiModelProperty("战区名称")
|
||||||
private String regionName;
|
private String regionName;
|
||||||
|
|
||||||
|
@ApiModelProperty("招商所属大区ID")
|
||||||
|
private Long investRegionId;
|
||||||
|
|
||||||
|
@ApiModelProperty("招商所属大区名称")
|
||||||
|
private String investRegionName;
|
||||||
|
|
||||||
@ApiModelProperty("大区ID")
|
@ApiModelProperty("大区ID")
|
||||||
private Long largeRegionId;
|
private Long largeRegionId;
|
||||||
|
|
||||||
|
|||||||
@@ -29,6 +29,9 @@ public class LineListVO extends BaseInfoVO{
|
|||||||
@ApiModelProperty("更新人名称")
|
@ApiModelProperty("更新人名称")
|
||||||
private String updateUserName;
|
private String updateUserName;
|
||||||
|
|
||||||
|
@ApiModelProperty("招商所属区域名称")
|
||||||
|
private String investRegionName;
|
||||||
|
|
||||||
public LineListVO(){}
|
public LineListVO(){}
|
||||||
|
|
||||||
public LineListVO(BaseInfoVO baseInfoVO) {
|
public LineListVO(BaseInfoVO baseInfoVO) {
|
||||||
|
|||||||
@@ -54,4 +54,6 @@ public class PlatformBuildInfoVO {
|
|||||||
@ApiModelProperty("招商经理名称")
|
@ApiModelProperty("招商经理名称")
|
||||||
private String investmentManagerName;
|
private String investmentManagerName;
|
||||||
|
|
||||||
|
@ApiModelProperty("招商所属大区名称")
|
||||||
|
private String investRegionName;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,45 @@
|
|||||||
|
package com.cool.store.vo.desk;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Auther zx_szh
|
||||||
|
* @Date 2025/12/25 15:04
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class OperationsConsultantAssignVO {
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
@ApiModelProperty("门店ID")
|
||||||
|
private Long shopId;
|
||||||
|
@ApiModelProperty("门店名称")
|
||||||
|
private String shopName;
|
||||||
|
@ApiModelProperty("门店编码")
|
||||||
|
private String shopCode;
|
||||||
|
@ApiModelProperty("招商所属大区")
|
||||||
|
private Long investRegionId;
|
||||||
|
@ApiModelProperty("招商所属大区名称")
|
||||||
|
private String investRegionName;
|
||||||
|
@ApiModelProperty("运营所属大区")
|
||||||
|
private Long regionId;
|
||||||
|
@ApiModelProperty("运营所属大区名称")
|
||||||
|
private String regionName;
|
||||||
|
@ApiModelProperty("招商经理")
|
||||||
|
private String investmentManager;
|
||||||
|
@ApiModelProperty("招商经理名称")
|
||||||
|
private String investmentManagerName;
|
||||||
|
@ApiModelProperty("加盟商名称")
|
||||||
|
private String partnerName;
|
||||||
|
@ApiModelProperty("门店类型 【门店类型】:0-无展示门店、1-餐厅店、2-普通门店")
|
||||||
|
private Integer storeType;
|
||||||
|
@ApiModelProperty("签约类型 ")
|
||||||
|
private Integer signType;
|
||||||
|
@ApiModelProperty("加盟模式")
|
||||||
|
private Integer joinMode;
|
||||||
|
@ApiModelProperty("手机号")
|
||||||
|
private String partnerPhone;
|
||||||
|
@ApiModelProperty("店铺地址")
|
||||||
|
private String shopAddress;
|
||||||
|
}
|
||||||
@@ -59,4 +59,10 @@ public class PreparationCommonPendingVO {
|
|||||||
|
|
||||||
@ApiModelProperty("加盟品牌")
|
@ApiModelProperty("加盟品牌")
|
||||||
private String franchiseBrand;
|
private String franchiseBrand;
|
||||||
|
|
||||||
|
@ApiModelProperty("招商所属大区ID")
|
||||||
|
private Long investRegionId;
|
||||||
|
|
||||||
|
@ApiModelProperty("招商所属大区名称")
|
||||||
|
private String investRegionName;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -69,6 +69,12 @@ public class MiniShopPageVO {
|
|||||||
@ApiModelProperty("所属管理区域name")
|
@ApiModelProperty("所属管理区域name")
|
||||||
private String managerRegionName;
|
private String managerRegionName;
|
||||||
|
|
||||||
|
@ApiModelProperty("招商所属大区id")
|
||||||
|
private Long investRegionId;
|
||||||
|
|
||||||
|
@ApiModelProperty("招商所属大区名称")
|
||||||
|
private String investRegionName;
|
||||||
|
|
||||||
public MiniShopPageVO(Long shopId, String shopName, String shopCode, Boolean flag, Long pointId, Long regionId, String regionName) {
|
public MiniShopPageVO(Long shopId, String shopName, String shopCode, Boolean flag, Long pointId, Long regionId, String regionName) {
|
||||||
this.shopId = shopId;
|
this.shopId = shopId;
|
||||||
this.shopName = shopName;
|
this.shopName = shopName;
|
||||||
@@ -110,6 +116,8 @@ public class MiniShopPageVO {
|
|||||||
miniShopPageVO.setShopStatus(shopInfo.getShopStatus());
|
miniShopPageVO.setShopStatus(shopInfo.getShopStatus());
|
||||||
miniShopPageVO.setManagerRegionId(shopInfo.getManagerRegionId());
|
miniShopPageVO.setManagerRegionId(shopInfo.getManagerRegionId());
|
||||||
miniShopPageVO.setManagerRegionName(regionNameMap.getOrDefault(shopInfo.getManagerRegionId(), ""));
|
miniShopPageVO.setManagerRegionName(regionNameMap.getOrDefault(shopInfo.getManagerRegionId(), ""));
|
||||||
|
miniShopPageVO.setInvestRegionId(shopInfo.getInvestRegionId());
|
||||||
|
miniShopPageVO.setInvestRegionName(regionNameMap.get(shopInfo.getInvestRegionId()));
|
||||||
resultList.add(miniShopPageVO);
|
resultList.add(miniShopPageVO);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,11 +21,11 @@ public interface BigRegionService {
|
|||||||
* @param keyword 关键字
|
* @param keyword 关键字
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<BigRegionDTO> queryAllBigRegion(String keyword, Integer joinBrand);
|
List<BigRegionDTO> queryAllBigRegion(String keyword, Integer joinBrand,Integer type);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据门店所属大区和加盟模式查询新管家对应组织信息
|
* 根据门店所属大区和加盟模式查询新管家对应组织信息
|
||||||
* 注意 加盟模式费门店加盟模式 而是针对加盟自有店 如果是加盟自有店 则传1 其他店传1
|
* 注意 加盟模式费门店加盟模式 而是针对加盟自有店 如果是加盟自有店 则传1 其他店传0
|
||||||
* @param regionId
|
* @param regionId
|
||||||
* @param joinMode
|
* @param joinMode
|
||||||
* @return
|
* @return
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import com.cool.store.dto.InvestmentCountDTO;
|
|||||||
import com.cool.store.dto.PendingCountDTO;
|
import com.cool.store.dto.PendingCountDTO;
|
||||||
import com.cool.store.entity.HyPartnerLabelDO;
|
import com.cool.store.entity.HyPartnerLabelDO;
|
||||||
import com.cool.store.entity.LineInfoDO;
|
import com.cool.store.entity.LineInfoDO;
|
||||||
|
import com.cool.store.request.AssignPendingRequest;
|
||||||
import com.cool.store.request.BusinessRemarkRequest;
|
import com.cool.store.request.BusinessRemarkRequest;
|
||||||
import com.cool.store.request.DeskRequest;
|
import com.cool.store.request.DeskRequest;
|
||||||
import com.cool.store.vo.BaseInfoVO;
|
import com.cool.store.vo.BaseInfoVO;
|
||||||
@@ -209,4 +210,12 @@ public interface DeskService {
|
|||||||
*/
|
*/
|
||||||
PageInfo<PreparationCommonPendingVO> posEntryListPendingList(DeskRequest deskRequest, LoginUserInfo user );
|
PageInfo<PreparationCommonPendingVO> posEntryListPendingList(DeskRequest deskRequest, LoginUserInfo user );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询运营顾问待分配门店信息
|
||||||
|
* @param request
|
||||||
|
* @param user
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
PageInfo<OperationsConsultantAssignVO> assignPendingList(AssignPendingRequest request,LoginUserInfo user);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,7 @@
|
|||||||
package com.cool.store.service;
|
package com.cool.store.service;
|
||||||
|
|
||||||
import com.cool.store.context.LoginUserInfo;
|
import com.cool.store.context.LoginUserInfo;
|
||||||
import com.cool.store.request.AddSignFranchiseRequest;
|
import com.cool.store.request.*;
|
||||||
import com.cool.store.request.AuditApproveRequest;
|
|
||||||
import com.cool.store.request.AuditResultRequest;
|
|
||||||
import com.cool.store.request.HqtBuildRequest;
|
|
||||||
import com.cool.store.response.AddSignFranchiseResponse;
|
import com.cool.store.response.AddSignFranchiseResponse;
|
||||||
import com.cool.store.response.ResponseResult;
|
import com.cool.store.response.ResponseResult;
|
||||||
|
|
||||||
@@ -54,4 +51,11 @@ public interface SignFranchiseService {
|
|||||||
Integer dateHandle();
|
Integer dateHandle();
|
||||||
|
|
||||||
HqtBuildRequest getHqtBuildRequest(Long shopId);
|
HqtBuildRequest getHqtBuildRequest(Long shopId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分配运营顾问
|
||||||
|
* @param request
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Boolean assignOperationConsultant(AssignOperationConsultantRequest request);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,6 +34,13 @@ public interface UserAuthMappingService {
|
|||||||
*/
|
*/
|
||||||
List<String> getAuthRegionIdAndSubRegionIdByUserId(String userId);
|
List<String> getAuthRegionIdAndSubRegionIdByUserId(String userId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取所有管辖下的区域ID 不包含门店
|
||||||
|
* @param userId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<String> getAuthRegionIdByUserId(String userId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取用户授权的所有门店id
|
* 获取用户授权的所有门店id
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -25,8 +25,8 @@ public class BigRegionServiceImpl implements BigRegionService {
|
|||||||
BigRegionDAO bigRegionDAO;
|
BigRegionDAO bigRegionDAO;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<BigRegionDTO> queryAllBigRegion(String keyword, Integer joinBrand){
|
public List<BigRegionDTO> queryAllBigRegion(String keyword, Integer joinBrand,Integer type) {
|
||||||
return bigRegionDAO.queryAllBigRegion(keyword, joinBrand);
|
return bigRegionDAO.queryAllBigRegion(keyword, joinBrand,type);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -1170,7 +1170,7 @@ public class DataHandlerServerImpl implements DataHandlerServer {
|
|||||||
shopInfoDO.setManagerRegionId(isCreateStoreDTO.getPid());
|
shopInfoDO.setManagerRegionId(isCreateStoreDTO.getPid());
|
||||||
updateList.add(shopInfoDO);
|
updateList.add(shopInfoDO);
|
||||||
}
|
}
|
||||||
List<BigRegionDTO> bigRegionDTOS = bigRegionDAO.queryAllBigRegion(null, null);
|
List<BigRegionDTO> bigRegionDTOS = bigRegionDAO.queryAllBigRegion(null, null,null);
|
||||||
Map<Long, BigRegionDTO> bigRegionDTOMap = bigRegionDTOS.stream().collect(Collectors.toMap(BigRegionDTO::getRegionId, x -> x));
|
Map<Long, BigRegionDTO> bigRegionDTOMap = bigRegionDTOS.stream().collect(Collectors.toMap(BigRegionDTO::getRegionId, x -> x));
|
||||||
//XX大区 正烧鸡
|
//XX大区 正烧鸡
|
||||||
List<Long> storeManageIds = bigRegionDTOS.stream().filter(x -> x.getStoreManageRegionId() != null).map(BigRegionDTO::getStoreManageRegionId).collect(Collectors.toList());
|
List<Long> storeManageIds = bigRegionDTOS.stream().filter(x -> x.getStoreManageRegionId() != null).map(BigRegionDTO::getStoreManageRegionId).collect(Collectors.toList());
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package com.cool.store.service.impl;
|
package com.cool.store.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
|
||||||
import com.cool.store.context.LoginUserInfo;
|
import com.cool.store.context.LoginUserInfo;
|
||||||
import com.cool.store.dao.*;
|
import com.cool.store.dao.*;
|
||||||
import com.cool.store.dto.DeskStageDTO;
|
import com.cool.store.dto.DeskStageDTO;
|
||||||
@@ -19,20 +18,19 @@ import com.cool.store.exception.ServiceException;
|
|||||||
import com.cool.store.mapper.EnterpriseUserRoleMapper;
|
import com.cool.store.mapper.EnterpriseUserRoleMapper;
|
||||||
import com.cool.store.mapper.IntentAgreementMapper;
|
import com.cool.store.mapper.IntentAgreementMapper;
|
||||||
import com.cool.store.mapper.TrainingExperienceMapper;
|
import com.cool.store.mapper.TrainingExperienceMapper;
|
||||||
|
import com.cool.store.request.AssignPendingRequest;
|
||||||
import com.cool.store.request.BusinessRemarkRequest;
|
import com.cool.store.request.BusinessRemarkRequest;
|
||||||
import com.cool.store.request.DeskRequest;
|
import com.cool.store.request.DeskRequest;
|
||||||
import com.cool.store.service.DeskService;
|
import com.cool.store.service.DeskService;
|
||||||
import com.cool.store.service.RegionService;
|
import com.cool.store.service.RegionService;
|
||||||
import com.cool.store.service.SysRoleService;
|
import com.cool.store.service.SysRoleService;
|
||||||
import com.cool.store.service.UserAuthMappingService;
|
import com.cool.store.service.UserAuthMappingService;
|
||||||
|
import com.cool.store.utils.BeanUtil;
|
||||||
import com.cool.store.utils.StringUtil;
|
import com.cool.store.utils.StringUtil;
|
||||||
import com.cool.store.utils.poi.DateUtils;
|
import com.cool.store.utils.poi.DateUtils;
|
||||||
import com.cool.store.vo.BaseInfoVO;
|
import com.cool.store.vo.BaseInfoVO;
|
||||||
import com.cool.store.vo.LabelBaseInfoVO;
|
import com.cool.store.vo.LabelBaseInfoVO;
|
||||||
import com.cool.store.vo.desk.IntendPendingVO;
|
import com.cool.store.vo.desk.*;
|
||||||
import com.cool.store.vo.desk.PayStagePendingVO;
|
|
||||||
import com.cool.store.vo.desk.PreparationCommonPendingVO;
|
|
||||||
import com.cool.store.vo.desk.SigningPendingVO;
|
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
@@ -43,6 +41,7 @@ import javax.annotation.Resource;
|
|||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
import static com.cool.store.enums.WorkflowSubStageStatusEnum.INTENT_5;
|
import static com.cool.store.enums.WorkflowSubStageStatusEnum.INTENT_5;
|
||||||
import static com.cool.store.enums.point.ShopSubStageStatusEnum.*;
|
import static com.cool.store.enums.point.ShopSubStageStatusEnum.*;
|
||||||
@@ -101,6 +100,10 @@ public class DeskServiceImpl implements DeskService {
|
|||||||
private ShopStageRemarkInfoDAO shopStageRemarkInfoDAO;
|
private ShopStageRemarkInfoDAO shopStageRemarkInfoDAO;
|
||||||
@Resource
|
@Resource
|
||||||
ShopAccountDAO shopAccountDAO;
|
ShopAccountDAO shopAccountDAO;
|
||||||
|
@Resource
|
||||||
|
OperationsConsultantAssignDAO operationsConsultantAssignDAO;
|
||||||
|
@Resource
|
||||||
|
private RegionDao regionDao;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageInfo<IntendPendingVO> intendPendingList(Integer pageNum, Integer pageSize, String userId, String keyword) {
|
public PageInfo<IntendPendingVO> intendPendingList(Integer pageNum, Integer pageSize, String userId, String keyword) {
|
||||||
@@ -263,8 +266,8 @@ public class DeskServiceImpl implements DeskService {
|
|||||||
PageInfo<PreparationCommonPendingVO> pageInfo = new PageInfo<>();
|
PageInfo<PreparationCommonPendingVO> pageInfo = new PageInfo<>();
|
||||||
List<Integer> subStageStatusList = new ArrayList<>();
|
List<Integer> subStageStatusList = new ArrayList<>();
|
||||||
if (CollectionUtils.isNotEmpty(userRoleIds)) {
|
if (CollectionUtils.isNotEmpty(userRoleIds)) {
|
||||||
//督导代填
|
// 招商经理代填
|
||||||
if (userRoleIds.contains(UserRoleEnum.QW_SUPERVISION.getCode()) || userRoleIds.contains(UserRoleEnum.SUPERVISION.getCode())) {
|
if (userRoleIds.contains(UserRoleEnum.INVESTMENT_MANGER.getCode())) {
|
||||||
pageInfo = commonPendingVOPageInfo(deskRequest, user, ShopSubStageEnum.SHOP_STAGE_7,
|
pageInfo = commonPendingVOPageInfo(deskRequest, user, ShopSubStageEnum.SHOP_STAGE_7,
|
||||||
Arrays.asList(SHOP_SUB_STAGE_STATUS_71.getShopSubStageStatus(), SHOP_SUB_STAGE_STATUS_72.getShopSubStageStatus()), Boolean.FALSE);
|
Arrays.asList(SHOP_SUB_STAGE_STATUS_71.getShopSubStageStatus(), SHOP_SUB_STAGE_STATUS_72.getShopSubStageStatus()), Boolean.FALSE);
|
||||||
} else {
|
} else {
|
||||||
@@ -499,7 +502,7 @@ public class DeskServiceImpl implements DeskService {
|
|||||||
@Override
|
@Override
|
||||||
public PageInfo<PreparationCommonPendingVO> buildInformationPendingList(DeskRequest deskRequest, LoginUserInfo user) {
|
public PageInfo<PreparationCommonPendingVO> buildInformationPendingList(DeskRequest deskRequest, LoginUserInfo user) {
|
||||||
List<Long> userRoleIds = enterpriseUserRoleMapper.getUserRoleIds(user.getUserId());
|
List<Long> userRoleIds = enterpriseUserRoleMapper.getUserRoleIds(user.getUserId());
|
||||||
if (userRoleIds.contains(UserRoleEnum.QW_SUPERVISION.getCode()) || userRoleIds.contains(UserRoleEnum.SUPERVISION.getCode())) {
|
if (userRoleIds.contains(UserRoleEnum.SUPERVISION.getCode())) {
|
||||||
return commonPendingVOPageInfo(deskRequest, user, ShopSubStageEnum.SHOP_STAGE_15,
|
return commonPendingVOPageInfo(deskRequest, user, ShopSubStageEnum.SHOP_STAGE_15,
|
||||||
Collections.singletonList(SHOP_SUB_STAGE_STATUS_150.getShopSubStageStatus()), Boolean.FALSE);
|
Collections.singletonList(SHOP_SUB_STAGE_STATUS_150.getShopSubStageStatus()), Boolean.FALSE);
|
||||||
}
|
}
|
||||||
@@ -678,7 +681,7 @@ public class DeskServiceImpl implements DeskService {
|
|||||||
Set<String> investmentUserIds = shopInfoList.stream().map(ShopInfoDO::getInvestmentManager).collect(Collectors.toSet());
|
Set<String> investmentUserIds = shopInfoList.stream().map(ShopInfoDO::getInvestmentManager).collect(Collectors.toSet());
|
||||||
List<PointInfoDO> pointListByIds = pointInfoDAO.getPointListByIds(pointId);
|
List<PointInfoDO> pointListByIds = pointInfoDAO.getPointListByIds(pointId);
|
||||||
Map<Long, PointInfoDO> pointMap = pointListByIds.stream().collect(Collectors.toMap(PointInfoDO::getId, Function.identity()));
|
Map<Long, PointInfoDO> pointMap = pointListByIds.stream().collect(Collectors.toMap(PointInfoDO::getId, Function.identity()));
|
||||||
List<Long> regionIds = shopInfoList.stream().map(ShopInfoDO::getRegionId).distinct().collect(Collectors.toList());
|
List<Long> regionIds = shopInfoList.stream().flatMap(v -> Stream.of(v.getRegionId(), v.getInvestRegionId())).distinct().collect(Collectors.toList());
|
||||||
List<String> developmentManagers = shopInfoList.stream().filter(x -> StringUtil.isNotEmpty(x.getShopManagerUserId())).map(ShopInfoDO::getShopManagerUserId).distinct().collect(Collectors.toList());
|
List<String> developmentManagers = shopInfoList.stream().filter(x -> StringUtil.isNotEmpty(x.getShopManagerUserId())).map(ShopInfoDO::getShopManagerUserId).distinct().collect(Collectors.toList());
|
||||||
Set< String> userIds=new HashSet<>();
|
Set< String> userIds=new HashSet<>();
|
||||||
userIds.addAll(investmentUserIds);
|
userIds.addAll(investmentUserIds);
|
||||||
@@ -717,12 +720,76 @@ public class DeskServiceImpl implements DeskService {
|
|||||||
preparationCommonPendingVO.setShopManagerUserName(userNameMap.getOrDefault(shopInfoDO.getShopManagerUserId(), ""));
|
preparationCommonPendingVO.setShopManagerUserName(userNameMap.getOrDefault(shopInfoDO.getShopManagerUserId(), ""));
|
||||||
preparationCommonPendingVO.setRegionNodeName(regionNameMap.getOrDefault(shopInfoDO.getRegionId(), ""));
|
preparationCommonPendingVO.setRegionNodeName(regionNameMap.getOrDefault(shopInfoDO.getRegionId(), ""));
|
||||||
preparationCommonPendingVO.setFranchiseBrand(shopInfoDO.getFranchiseBrand());
|
preparationCommonPendingVO.setFranchiseBrand(shopInfoDO.getFranchiseBrand());
|
||||||
|
preparationCommonPendingVO.setInvestRegionId(shopInfoDO.getInvestRegionId());
|
||||||
|
preparationCommonPendingVO.setInvestRegionName(regionNameMap.get(shopInfoDO.getInvestRegionId()));
|
||||||
list.add(preparationCommonPendingVO);
|
list.add(preparationCommonPendingVO);
|
||||||
});
|
});
|
||||||
result.setList(list);
|
result.setList(list);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageInfo<OperationsConsultantAssignVO> assignPendingList(AssignPendingRequest request,LoginUserInfo user) {
|
||||||
|
//查询管辖范围内的数据
|
||||||
|
List<String> authRegionIds = new ArrayList<>();
|
||||||
|
if (!sysRoleService.checkIsAdmin(user.getUserId())) {
|
||||||
|
authRegionIds = userAuthMappingService.getAuthRegionIdByUserId(user.getUserId());
|
||||||
|
}
|
||||||
|
PageHelper.startPage(request.getPageNum(), request.getPageSize());
|
||||||
|
List<OperationsConsultantAssignDO> noAssignList = operationsConsultantAssignDAO.getNoAssign(request.getKeyword(), authRegionIds);
|
||||||
|
if (CollectionUtils.isEmpty(noAssignList)) {
|
||||||
|
return new PageInfo<>();
|
||||||
|
}
|
||||||
|
PageInfo<OperationsConsultantAssignDO> operationsConsultantAssignDOPageInfo = new PageInfo<>(noAssignList);
|
||||||
|
PageInfo<OperationsConsultantAssignVO> page = BeanUtil.toPage(operationsConsultantAssignDOPageInfo, OperationsConsultantAssignVO.class);
|
||||||
|
List<Long> shopIdList = noAssignList.stream().map(OperationsConsultantAssignDO::getShopId).collect(Collectors.toList());
|
||||||
|
List<ShopInfoDO> shopList = shopInfoDAO.getShopListByIds(shopIdList);
|
||||||
|
Map<Long, ShopInfoDO> shopInfoDOMap = shopList.stream().collect(Collectors.toMap(ShopInfoDO::getId, data -> data));
|
||||||
|
Set<Long> regionIdList = shopList.stream().map(ShopInfoDO::getRegionId).collect(Collectors.toSet());
|
||||||
|
regionIdList.addAll(shopList.stream().map(ShopInfoDO::getInvestRegionId).collect(Collectors.toSet()));
|
||||||
|
|
||||||
|
Map<Long, String> regionNameMap = regionDao.getRegionNameMap(new ArrayList<>(regionIdList));
|
||||||
|
|
||||||
|
Set<String> userIds = shopList.stream().map(ShopInfoDO::getInvestmentManager).collect(Collectors.toSet());
|
||||||
|
|
||||||
|
Map<String, String> userNameMap = enterpriseUserDAO.getUserNameMap(new ArrayList<>(userIds));
|
||||||
|
|
||||||
|
List<Long> lineIds = shopList.stream().map(ShopInfoDO::getLineId).collect(Collectors.toList());
|
||||||
|
List<PlanLineDTO> lines = lineInfoDAO.getLines(lineIds);
|
||||||
|
Map<Long, PlanLineDTO> lineMap = lines.stream().collect(Collectors.toMap(PlanLineDTO::getLineId, line -> line));
|
||||||
|
|
||||||
|
List<SignFranchiseDO> signTypeList = signFranchiseDAO.getSignType(shopIdList);
|
||||||
|
Map<Long, Integer> signTypoMap = signTypeList.stream().collect(Collectors.toMap(SignFranchiseDO::getShopId, SignFranchiseDO::getSignType));
|
||||||
|
|
||||||
|
List<OperationsConsultantAssignVO> list = new ArrayList<>();
|
||||||
|
|
||||||
|
noAssignList.forEach(x -> {
|
||||||
|
OperationsConsultantAssignVO operationsConsultantAssignVO = new OperationsConsultantAssignVO();
|
||||||
|
operationsConsultantAssignVO.setShopId(x.getShopId());
|
||||||
|
operationsConsultantAssignVO.setId(x.getId());
|
||||||
|
ShopInfoDO shopInfoDO = shopInfoDOMap.get(x.getShopId());
|
||||||
|
operationsConsultantAssignVO.setShopId(x.getShopId());
|
||||||
|
operationsConsultantAssignVO.setShopName(shopInfoDO.getShopName());
|
||||||
|
operationsConsultantAssignVO.setShopCode(shopInfoDO.getShopCode());
|
||||||
|
operationsConsultantAssignVO.setJoinMode(shopInfoDO.getJoinMode());
|
||||||
|
operationsConsultantAssignVO.setStoreType(shopInfoDO.getStoreType());
|
||||||
|
operationsConsultantAssignVO.setSignType(signTypoMap.get(x.getShopId()));
|
||||||
|
operationsConsultantAssignVO.setRegionId(shopInfoDO.getRegionId());
|
||||||
|
operationsConsultantAssignVO.setRegionName(regionNameMap.get(shopInfoDO.getRegionId()));
|
||||||
|
operationsConsultantAssignVO.setInvestmentManager(shopInfoDO.getInvestmentManager());
|
||||||
|
operationsConsultantAssignVO.setInvestmentManagerName(userNameMap.get(shopInfoDO.getInvestmentManager()));
|
||||||
|
operationsConsultantAssignVO.setInvestRegionId(shopInfoDO.getInvestRegionId());
|
||||||
|
operationsConsultantAssignVO.setInvestRegionName(regionNameMap.get(shopInfoDO.getInvestRegionId()));
|
||||||
|
PlanLineDTO lineDTO = lineMap.getOrDefault(shopInfoDO.getLineId(), new PlanLineDTO());
|
||||||
|
operationsConsultantAssignVO.setPartnerName(lineDTO.getUsername());
|
||||||
|
operationsConsultantAssignVO.setPartnerPhone(lineDTO.getMobile());
|
||||||
|
operationsConsultantAssignVO.setShopAddress(shopInfoDO.getDetailAddress());
|
||||||
|
list.add(operationsConsultantAssignVO);
|
||||||
|
});
|
||||||
|
page.setList(list);
|
||||||
|
return page;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通用查询
|
* 通用查询
|
||||||
@@ -772,7 +839,7 @@ public class DeskServiceImpl implements DeskService {
|
|||||||
Set<String> investmentUserIds = shopInfoList.stream().map(ShopInfoDO::getInvestmentManager).collect(Collectors.toSet());
|
Set<String> investmentUserIds = shopInfoList.stream().map(ShopInfoDO::getInvestmentManager).collect(Collectors.toSet());
|
||||||
List<PointInfoDO> pointListByIds = pointInfoDAO.getPointListByIds(pointId);
|
List<PointInfoDO> pointListByIds = pointInfoDAO.getPointListByIds(pointId);
|
||||||
Map<Long, PointInfoDO> pointMap = pointListByIds.stream().collect(Collectors.toMap(PointInfoDO::getId, Function.identity()));
|
Map<Long, PointInfoDO> pointMap = pointListByIds.stream().collect(Collectors.toMap(PointInfoDO::getId, Function.identity()));
|
||||||
List<Long> regionIds = shopInfoList.stream().map(ShopInfoDO::getRegionId).distinct().collect(Collectors.toList());
|
List<Long> regionIds = shopInfoList.stream().flatMap(v -> Stream.of(v.getRegionId(), v.getInvestRegionId())).distinct().collect(Collectors.toList());
|
||||||
List<String> developmentManagers = shopInfoList.stream().filter(x -> StringUtil.isNotEmpty(x.getShopManagerUserId())).map(ShopInfoDO::getShopManagerUserId).distinct().collect(Collectors.toList());
|
List<String> developmentManagers = shopInfoList.stream().filter(x -> StringUtil.isNotEmpty(x.getShopManagerUserId())).map(ShopInfoDO::getShopManagerUserId).distinct().collect(Collectors.toList());
|
||||||
Set< String> userIds=new HashSet<>();
|
Set< String> userIds=new HashSet<>();
|
||||||
userIds.addAll(investmentUserIds);
|
userIds.addAll(investmentUserIds);
|
||||||
@@ -819,6 +886,8 @@ public class DeskServiceImpl implements DeskService {
|
|||||||
preparationCommonPendingVO.setRegionNodeName(regionNameMap.getOrDefault(shopInfoDO.getRegionId(), ""));
|
preparationCommonPendingVO.setRegionNodeName(regionNameMap.getOrDefault(shopInfoDO.getRegionId(), ""));
|
||||||
preparationCommonPendingVO.setUpdateTime(x.getUpdateTime());
|
preparationCommonPendingVO.setUpdateTime(x.getUpdateTime());
|
||||||
preparationCommonPendingVO.setFranchiseBrand(shopInfoDO.getFranchiseBrand());
|
preparationCommonPendingVO.setFranchiseBrand(shopInfoDO.getFranchiseBrand());
|
||||||
|
preparationCommonPendingVO.setInvestRegionId(shopInfoDO.getInvestRegionId());
|
||||||
|
preparationCommonPendingVO.setInvestRegionName(regionNameMap.get(shopInfoDO.getInvestRegionId()));
|
||||||
list.add(preparationCommonPendingVO);
|
list.add(preparationCommonPendingVO);
|
||||||
});
|
});
|
||||||
result.setList(list);
|
result.setList(list);
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ import javax.annotation.Resource;
|
|||||||
import java.text.MessageFormat;
|
import java.text.MessageFormat;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author suzhuhong
|
* @Author suzhuhong
|
||||||
@@ -148,9 +149,11 @@ public class LineServiceImpl implements LineService {
|
|||||||
// }
|
// }
|
||||||
if (lineInfo.getRegionId() != null && lineInfo.getRegionId() != 0) {
|
if (lineInfo.getRegionId() != null && lineInfo.getRegionId() != 0) {
|
||||||
Long bigRegionIdByAreaId = regionService.getBigRegionIdByAreaId(lineInfo.getWantShopAreaId());
|
Long bigRegionIdByAreaId = regionService.getBigRegionIdByAreaId(lineInfo.getWantShopAreaId());
|
||||||
Map<Long, String> regionNameMap = regionDao.getRegionNameMap(Arrays.asList(bigRegionIdByAreaId, lineInfo.getRegionId()));
|
Map<Long, String> regionNameMap = regionDao.getRegionNameMap(Arrays.asList(bigRegionIdByAreaId, lineInfo.getRegionId(),lineInfo.getInvestRegionId()));
|
||||||
result.setRegionId(lineInfo.getRegionId());
|
result.setRegionId(lineInfo.getRegionId());
|
||||||
result.setRegionName(regionNameMap.get(lineInfo.getRegionId()));
|
result.setRegionName(regionNameMap.get(lineInfo.getRegionId()));
|
||||||
|
result.setInvestRegionId(lineInfo.getInvestRegionId());
|
||||||
|
result.setInvestRegionName(regionNameMap.get(lineInfo.getInvestRegionId()));
|
||||||
}
|
}
|
||||||
LineAuditInfoDO lineAuditInfoDO = lineAuditInfoDAO.getAuditInfoByLineId(lineInfo.getId());
|
LineAuditInfoDO lineAuditInfoDO = lineAuditInfoDAO.getAuditInfoByLineId(lineInfo.getId());
|
||||||
if (lineAuditInfoDO != null) {
|
if (lineAuditInfoDO != null) {
|
||||||
@@ -221,7 +224,7 @@ public class LineServiceImpl implements LineService {
|
|||||||
List<String> userIds = lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getInvestmentManager() != null).map(LineInfoDO::getInvestmentManager).collect(Collectors.toList());
|
List<String> userIds = lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getInvestmentManager() != null).map(LineInfoDO::getInvestmentManager).collect(Collectors.toList());
|
||||||
userIds.addAll(lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getUpdateUserId() != null).map(LineInfoDO::getUpdateUserId).collect(Collectors.toList()));
|
userIds.addAll(lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getUpdateUserId() != null).map(LineInfoDO::getUpdateUserId).collect(Collectors.toList()));
|
||||||
Map<String, String> userNameMap = enterpriseUserDAO.getUserNameMap(userIds);
|
Map<String, String> userNameMap = enterpriseUserDAO.getUserNameMap(userIds);
|
||||||
List<Long> regionIds = lineInfoDOS.stream().filter(x -> x.getRegionId() != null).map(LineInfoDO::getRegionId).collect(Collectors.toList());
|
List<Long> regionIds = lineInfoDOS.stream().filter(x -> x.getRegionId() != null).flatMap(x -> Stream.of(x.getRegionId(), x.getInvestRegionId())).collect(Collectors.toList());
|
||||||
Map<Long, String> regionNameMap = regionDao.getRegionNameMap(regionIds);
|
Map<Long, String> regionNameMap = regionDao.getRegionNameMap(regionIds);
|
||||||
List<LineListVO> result = new ArrayList<>();
|
List<LineListVO> result = new ArrayList<>();
|
||||||
lineInfoDOS.forEach(x -> {
|
lineInfoDOS.forEach(x -> {
|
||||||
@@ -229,6 +232,7 @@ public class LineServiceImpl implements LineService {
|
|||||||
LineListVO lineListVO = new LineListVO(baseInfoVO);
|
LineListVO lineListVO = new LineListVO(baseInfoVO);
|
||||||
if (regionNameMap != null) {
|
if (regionNameMap != null) {
|
||||||
lineListVO.setRegionName(regionNameMap.get(x.getRegionId()));
|
lineListVO.setRegionName(regionNameMap.get(x.getRegionId()));
|
||||||
|
lineListVO.setInvestRegionName(regionNameMap.get(x.getInvestRegionId()));
|
||||||
}
|
}
|
||||||
lineListVO.setCreateTime(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, x.getCreateTime()));
|
lineListVO.setCreateTime(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, x.getCreateTime()));
|
||||||
lineListVO.setUpdateTime(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, x.getUpdateTime()));
|
lineListVO.setUpdateTime(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, x.getUpdateTime()));
|
||||||
@@ -438,6 +442,7 @@ public class LineServiceImpl implements LineService {
|
|||||||
lineInfo.setJoinMode(updateLineRequest.getJoinMode());
|
lineInfo.setJoinMode(updateLineRequest.getJoinMode());
|
||||||
lineInfo.setRegionId(updateLineRequest.getRegionId());
|
lineInfo.setRegionId(updateLineRequest.getRegionId());
|
||||||
lineInfo.setWantShopAreaId(updateLineRequest.getWantShopAreaId());
|
lineInfo.setWantShopAreaId(updateLineRequest.getWantShopAreaId());
|
||||||
|
lineInfo.setInvestRegionId(updateLineRequest.getInvestRegionId());
|
||||||
lineInfo.setUsername(updateLineRequest.getLineName());
|
lineInfo.setUsername(updateLineRequest.getLineName());
|
||||||
lineInfo.setUpdateTime(new Date());
|
lineInfo.setUpdateTime(new Date());
|
||||||
lineInfo.setUpdateUserId(userInfo.getUserId());
|
lineInfo.setUpdateUserId(userInfo.getUserId());
|
||||||
@@ -452,7 +457,7 @@ public class LineServiceImpl implements LineService {
|
|||||||
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||||
}
|
}
|
||||||
//批量更新线索
|
//批量更新线索
|
||||||
lineInfoDAO.batchUpdateInvestmentManager(request.getLineIds(), LineStatusEnum.PRIVATE_SEAS.getCode(), request.getInvestmentManagerId(), request.getRegionId());
|
lineInfoDAO.batchUpdateInvestmentManager(request.getLineIds(), LineStatusEnum.PRIVATE_SEAS.getCode(), request.getInvestmentManagerId(), request.getRegionId(),request.getInvestRegionId());
|
||||||
return Boolean.TRUE;
|
return Boolean.TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -542,10 +547,7 @@ public class LineServiceImpl implements LineService {
|
|||||||
lineInfoDO.setUsername(addLineRequest.getUserName());
|
lineInfoDO.setUsername(addLineRequest.getUserName());
|
||||||
lineInfoDO.setLineSource(Integer.valueOf(UserChannelEnum.ADD.getCode()));
|
lineInfoDO.setLineSource(Integer.valueOf(UserChannelEnum.ADD.getCode()));
|
||||||
lineInfoDO.setPartnerId(hyPartnerUserInfoDO.getPartnerId());
|
lineInfoDO.setPartnerId(hyPartnerUserInfoDO.getPartnerId());
|
||||||
// if (addLineRequest.getJoinMode()==1){
|
lineInfoDO.setInvestRegionId(addLineRequest.getInvestRegionId());
|
||||||
// Long regionId = regionAreaConfigDao.getByWantShopAreaId(addLineRequest.getWantShopAreaId());
|
|
||||||
// lineInfoDO.setRegionId(regionId);
|
|
||||||
// }
|
|
||||||
lineInfoDO.setRegionId(addLineRequest.getRegionId());
|
lineInfoDO.setRegionId(addLineRequest.getRegionId());
|
||||||
lineInfoDO.setInvestmentManager(getInvestmentManagerUserId(addLineRequest, userInfo));
|
lineInfoDO.setInvestmentManager(getInvestmentManagerUserId(addLineRequest, userInfo));
|
||||||
lineInfoDO.setCreateUserId(userInfo.getUserId());
|
lineInfoDO.setCreateUserId(userInfo.getUserId());
|
||||||
|
|||||||
@@ -276,7 +276,7 @@ public class PlatformBuildServiceImpl implements PlatformBuildService {
|
|||||||
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(shopInfo.getLineId());
|
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(shopInfo.getLineId());
|
||||||
List<ScheduleDTO> shopContractActualCompletionTime = shopStageInfoDAO.getPlatformBuildList(Collections.singletonList(shopId));
|
List<ScheduleDTO> shopContractActualCompletionTime = shopStageInfoDAO.getPlatformBuildList(Collections.singletonList(shopId));
|
||||||
PlatformBuildInfoVO platformBuildInfoVO = new PlatformBuildInfoVO();
|
PlatformBuildInfoVO platformBuildInfoVO = new PlatformBuildInfoVO();
|
||||||
Map<Long, String> regionNameMap = regionService.getBelongWarRegionNameMap(Collections.singletonList(shopInfo.getRegionId()));
|
Map<Long, String> regionNameMap = regionService.getBelongWarRegionNameMap(Arrays.asList(shopInfo.getRegionId(), shopInfo.getInvestRegionId()));
|
||||||
String investmentManager = enterpriseUserDAO.getUserName(lineInfo.getInvestmentManager());
|
String investmentManager = enterpriseUserDAO.getUserName(lineInfo.getInvestmentManager());
|
||||||
PointInfoDO pointInfoDO = pointInfoDAO.getPointInfoById(shopInfo.getPointId());
|
PointInfoDO pointInfoDO = pointInfoDAO.getPointInfoById(shopInfo.getPointId());
|
||||||
platformBuildInfoVO.setShopId(shopId);
|
platformBuildInfoVO.setShopId(shopId);
|
||||||
@@ -299,6 +299,7 @@ public class PlatformBuildServiceImpl implements PlatformBuildService {
|
|||||||
|
|
||||||
}
|
}
|
||||||
platformBuildInfoVO.setInvestmentManagerName(investmentManager);
|
platformBuildInfoVO.setInvestmentManagerName(investmentManager);
|
||||||
|
platformBuildInfoVO.setInvestRegionName(regionNameMap.get(shopInfo.getInvestRegionId()));
|
||||||
return platformBuildInfoVO;
|
return platformBuildInfoVO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,15 +5,14 @@ import com.cool.store.constants.CommonConstants;
|
|||||||
import com.cool.store.dao.*;
|
import com.cool.store.dao.*;
|
||||||
import com.cool.store.dto.Preparation.PreparationDTO;
|
import com.cool.store.dto.Preparation.PreparationDTO;
|
||||||
import com.cool.store.dto.Preparation.ScheduleDTO;
|
import com.cool.store.dto.Preparation.ScheduleDTO;
|
||||||
import com.cool.store.dto.RegionNode;
|
|
||||||
import com.cool.store.dto.ShopNameAndCodeDTO;
|
import com.cool.store.dto.ShopNameAndCodeDTO;
|
||||||
import com.cool.store.dto.UserDTO;
|
import com.cool.store.dto.UserDTO;
|
||||||
import com.cool.store.dto.openPreparation.PlanLineDTO;
|
|
||||||
import com.cool.store.entity.*;
|
import com.cool.store.entity.*;
|
||||||
import com.cool.store.enums.*;
|
import com.cool.store.enums.*;
|
||||||
import com.cool.store.enums.point.*;
|
import com.cool.store.enums.point.*;
|
||||||
import com.cool.store.enums.point.ShopStatusEnum;
|
import com.cool.store.enums.point.ShopStatusEnum;
|
||||||
import com.cool.store.exception.ServiceException;
|
import com.cool.store.exception.ServiceException;
|
||||||
|
import com.cool.store.mapper.EnterpriseUserRoleMapper;
|
||||||
import com.cool.store.mapper.RegionMapper;
|
import com.cool.store.mapper.RegionMapper;
|
||||||
import com.cool.store.request.*;
|
import com.cool.store.request.*;
|
||||||
import com.cool.store.response.BranchShopDetailResponse;
|
import com.cool.store.response.BranchShopDetailResponse;
|
||||||
@@ -25,13 +24,11 @@ import com.cool.store.utils.NumberConverter;
|
|||||||
import com.cool.store.utils.RandomEightCharCodeUtils;
|
import com.cool.store.utils.RandomEightCharCodeUtils;
|
||||||
import com.cool.store.utils.poi.DateUtils;
|
import com.cool.store.utils.poi.DateUtils;
|
||||||
import com.cool.store.utils.poi.StringUtils;
|
import com.cool.store.utils.poi.StringUtils;
|
||||||
import com.cool.store.vo.BaseInfoVO;
|
|
||||||
import com.cool.store.vo.shop.MiniShopPageVO;
|
import com.cool.store.vo.shop.MiniShopPageVO;
|
||||||
import com.cool.store.vo.shop.ShopStageInfoVO;
|
import com.cool.store.vo.shop.ShopStageInfoVO;
|
||||||
import com.cool.store.vo.shop.StageShopCountVO;
|
import com.cool.store.vo.shop.StageShopCountVO;
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
import com.google.common.collect.Lists;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.apache.commons.collections4.ListUtils;
|
import org.apache.commons.collections4.ListUtils;
|
||||||
@@ -41,10 +38,10 @@ import org.springframework.stereotype.Service;
|
|||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.time.LocalDate;
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
import static com.cool.store.enums.ErrorCodeEnum.*;
|
import static com.cool.store.enums.ErrorCodeEnum.*;
|
||||||
import static com.cool.store.enums.UserRoleEnum.*;
|
import static com.cool.store.enums.UserRoleEnum.*;
|
||||||
@@ -113,6 +110,8 @@ public class ShopServiceImpl implements ShopService {
|
|||||||
@Resource
|
@Resource
|
||||||
EnterpriseService enterpriseService;
|
EnterpriseService enterpriseService;
|
||||||
@Resource
|
@Resource
|
||||||
|
EnterpriseUserRoleMapper enterpriseUserRoleMapper;
|
||||||
|
@Resource
|
||||||
ShopAccountService shopAccountService;
|
ShopAccountService shopAccountService;
|
||||||
@Resource
|
@Resource
|
||||||
PushService pushService;
|
PushService pushService;
|
||||||
@@ -146,6 +145,7 @@ public class ShopServiceImpl implements ShopService {
|
|||||||
shopInfo.setShopName("店铺" + NumberConverter.convertArabicToChinese(i + 1));
|
shopInfo.setShopName("店铺" + NumberConverter.convertArabicToChinese(i + 1));
|
||||||
shopInfo.setCreateTime(new Date());
|
shopInfo.setCreateTime(new Date());
|
||||||
shopInfo.setInvestmentManager(lineInfo.getInvestmentManager());
|
shopInfo.setInvestmentManager(lineInfo.getInvestmentManager());
|
||||||
|
shopInfo.setInvestRegionId(lineInfo.getInvestRegionId());
|
||||||
addShopList.add(shopInfo);
|
addShopList.add(shopInfo);
|
||||||
}
|
}
|
||||||
shopInfoDAO.batchAddShop(addShopList);
|
shopInfoDAO.batchAddShop(addShopList);
|
||||||
@@ -201,7 +201,7 @@ public class ShopServiceImpl implements ShopService {
|
|||||||
Map<Long, ScheduleDTO> scheduleMap = scheduleList.stream().collect(Collectors.toMap(ScheduleDTO::getShopId, x -> x));
|
Map<Long, ScheduleDTO> scheduleMap = scheduleList.stream().collect(Collectors.toMap(ScheduleDTO::getShopId, x -> x));
|
||||||
List<ShopStageInfoDO> subStageList = shopStageInfoDAO.getSubStageList(shopIds, ShopSubStageEnum.SHOP_STAGE_8.getShopSubStage());
|
List<ShopStageInfoDO> subStageList = shopStageInfoDAO.getSubStageList(shopIds, ShopSubStageEnum.SHOP_STAGE_8.getShopSubStage());
|
||||||
Map<Long, ShopStageInfoDO> stageMap = subStageList.stream().collect(Collectors.toMap(ShopStageInfoDO::getShopId, Function.identity()));
|
Map<Long, ShopStageInfoDO> stageMap = subStageList.stream().collect(Collectors.toMap(ShopStageInfoDO::getShopId, Function.identity()));
|
||||||
List<Long> regionIds = shopList.stream().map(ShopInfoDO::getRegionId).collect(Collectors.toList());
|
List<Long> regionIds = shopList.stream().flatMap(v -> Stream.of(v.getRegionId(), v.getInvestRegionId())).collect(Collectors.toList());
|
||||||
regionIds.addAll(Optional.of(shopList).orElse(Collections.emptyList()).stream().map(ShopInfoDO::getManagerRegionId).collect(Collectors.toList()));
|
regionIds.addAll(Optional.of(shopList).orElse(Collections.emptyList()).stream().map(ShopInfoDO::getManagerRegionId).collect(Collectors.toList()));
|
||||||
Map<Long, String> regionNameMap = regionDao.getRegionNameMap(regionIds);
|
Map<Long, String> regionNameMap = regionDao.getRegionNameMap(regionIds);
|
||||||
List<String> investmentManagerIds = shopList.stream().map(ShopInfoDO::getInvestmentManager).collect(Collectors.toList());
|
List<String> investmentManagerIds = shopList.stream().map(ShopInfoDO::getInvestmentManager).collect(Collectors.toList());
|
||||||
@@ -400,16 +400,15 @@ public class ShopServiceImpl implements ShopService {
|
|||||||
if (Objects.isNull(lineInfo)) {
|
if (Objects.isNull(lineInfo)) {
|
||||||
throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST);
|
throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST);
|
||||||
}
|
}
|
||||||
EnterpriseUserDO invest = enterpriseUserDAO.getUserInfoById(shopInfo.getInvestmentManager());
|
Map<String, String> userNameMap = enterpriseUserDAO.getUserNameMap(Arrays.asList(shopInfo.getInvestmentManager(), shopInfo.getOperationsConsultant()));
|
||||||
List<ScheduleDTO> shopContractActualCompletionTime = shopStageInfoDAO.getScheduleList(Collections.singletonList(shopId));
|
List<ScheduleDTO> shopContractActualCompletionTime = shopStageInfoDAO.getScheduleList(Collections.singletonList(shopId));
|
||||||
RegionDO shopRegion = regionDao.getRegionById(shopInfo.getRegionId());
|
List<RegionDO> allRegionByRegionIds = regionDao.getAllRegionByRegionIds(Arrays.asList(shopInfo.getRegionId(), shopInfo.getManagerRegionId(), shopInfo.getInvestRegionId()));
|
||||||
RegionDO mapperRegionByRegionId = regionDao.getRegionById(shopInfo.getManagerRegionId());
|
Map<Long, RegionDO> regionMap = allRegionByRegionIds.stream().collect(Collectors.toMap(RegionDO::getId, data -> data));
|
||||||
String wantShopArea = hyOpenAreaInfoDAO.selectNameMapById(shopInfo.getWantShopAreaId());
|
|
||||||
HyOpenAreaInfoDO hyOpenAreaInfoDO = hyOpenAreaInfoDAO.selectById(shopInfo.getWantShopAreaId());
|
HyOpenAreaInfoDO hyOpenAreaInfoDO = hyOpenAreaInfoDAO.selectById(shopInfo.getWantShopAreaId());
|
||||||
BranchShopDetailResponse response = new BranchShopDetailResponse();
|
BranchShopDetailResponse response = new BranchShopDetailResponse();
|
||||||
response.setManagerRegionId(shopInfo.getManagerRegionId());
|
response.setManagerRegionId(shopInfo.getManagerRegionId());
|
||||||
if (Objects.nonNull(mapperRegionByRegionId)) {
|
if (shopInfo.getManagerRegionId()!=null) {
|
||||||
response.setManagerRegionName(mapperRegionByRegionId.getName());
|
response.setManagerRegionName(regionMap.getOrDefault(shopInfo.getManagerRegionId(),new RegionDO()).getName());
|
||||||
}
|
}
|
||||||
response.setUsername(lineInfo.getUsername());
|
response.setUsername(lineInfo.getUsername());
|
||||||
response.setMobile(lineInfo.getMobile());
|
response.setMobile(lineInfo.getMobile());
|
||||||
@@ -428,12 +427,22 @@ public class ShopServiceImpl implements ShopService {
|
|||||||
response.setPlanCompletionTime(scheduleDTO.getPlanCompleteTime());
|
response.setPlanCompletionTime(scheduleDTO.getPlanCompleteTime());
|
||||||
}
|
}
|
||||||
response.setInvestmentManagerId(shopInfo.getInvestmentManager());
|
response.setInvestmentManagerId(shopInfo.getInvestmentManager());
|
||||||
response.setInvestmentManagerName(invest.getName());
|
response.setInvestmentManagerName(userNameMap.get(shopInfo.getInvestmentManager()));
|
||||||
|
response.setOperationsConsultant(shopInfo.getOperationsConsultant());
|
||||||
|
response.setOperationsConsultantName(userNameMap.get(shopInfo.getOperationsConsultant()));
|
||||||
|
response.setInvestRegionId(Long.valueOf(0).equals(shopInfo.getInvestRegionId()) ? null : shopInfo.getInvestRegionId());
|
||||||
|
if (shopInfo.getInvestRegionId() != null) {
|
||||||
|
response.setInvestRegionName(regionMap.getOrDefault(shopInfo.getInvestRegionId(),new RegionDO()).getName());
|
||||||
|
}
|
||||||
response.setRegionId(shopInfo.getRegionId());
|
response.setRegionId(shopInfo.getRegionId());
|
||||||
|
if (shopInfo.getRegionId()!=null){
|
||||||
|
response.setRegionName(regionMap.getOrDefault(shopInfo.getRegionId(),new RegionDO()).getName());
|
||||||
|
}
|
||||||
response.setWantRegionId(shopInfo.getWantShopAreaId());
|
response.setWantRegionId(shopInfo.getWantShopAreaId());
|
||||||
response.setRegionName(shopRegion.getName());
|
if (hyOpenAreaInfoDO != null) {
|
||||||
response.setWantRegionName(wantShopArea);
|
response.setWantRegionName(hyOpenAreaInfoDO.getAreaName());
|
||||||
response.setWantRegionParentId(hyOpenAreaInfoDO.getParentId());
|
response.setWantRegionParentId(hyOpenAreaInfoDO.getParentId());
|
||||||
|
}
|
||||||
response.setPointId(shopInfo.getPointId());
|
response.setPointId(shopInfo.getPointId());
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
@@ -467,8 +476,9 @@ public class ShopServiceImpl implements ShopService {
|
|||||||
shopInfo.setFranchiseBrand(request.getFranchiseBrand());
|
shopInfo.setFranchiseBrand(request.getFranchiseBrand());
|
||||||
shopInfo.setStoreType(request.getStoreType());
|
shopInfo.setStoreType(request.getStoreType());
|
||||||
shopInfo.setManagerRegionId(request.getManagerRegionId());
|
shopInfo.setManagerRegionId(request.getManagerRegionId());
|
||||||
|
shopInfo.setInvestRegionId(request.getInvestRegionId());
|
||||||
Integer f = shopInfoDAO.updateShopInfo(shopInfo);
|
Integer f = shopInfoDAO.updateShopInfo(shopInfo);
|
||||||
if (StringUtils.compare(request.getShopCode().trim(), oldShopCode) != 0) {
|
if (StringUtils.isNotBlank(request.getShopCode()) && StringUtils.compare(request.getShopCode().trim(), oldShopCode) != 0) {
|
||||||
try {
|
try {
|
||||||
log.info("门店编码发生修改,推送新管家");
|
log.info("门店编码发生修改,推送新管家");
|
||||||
ZxjpApiRequest data = shopAccountService.getData(request.getShopId(), DownSystemTypeEnum.XGJ);
|
ZxjpApiRequest data = shopAccountService.getData(request.getShopId(), DownSystemTypeEnum.XGJ);
|
||||||
@@ -530,12 +540,20 @@ public class ShopServiceImpl implements ShopService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageInfo<BranchShopResponse> getBranchShopList(BranchShopRequest request, String userId) {
|
public PageInfo<BranchShopResponse> getBranchShopList(BranchShopRequest request, String userId) {
|
||||||
|
// 2为我管辖的
|
||||||
if (request.getFlag().equals(CommonConstants.TWO)) {
|
if (request.getFlag().equals(CommonConstants.TWO)) {
|
||||||
if (!sysRoleService.checkIsAdmin(userId)) {
|
if (!sysRoleService.checkIsAdmin(userId)) {
|
||||||
request.setAuthRegionIds(userAuthMappingService.getAuthRegionIdAndSubRegionIdByUserId(userId));
|
List<String> authRegionIds = userAuthMappingService.getAuthRegionIdAndSubRegionIdByUserId(userId);
|
||||||
if (CollectionUtils.isEmpty(request.getAuthRegionIds())) {
|
if (CollectionUtils.isEmpty(authRegionIds)) {
|
||||||
return new PageInfo<>();
|
return new PageInfo<>();
|
||||||
}
|
}
|
||||||
|
List<Long> userRoleIds = enterpriseUserRoleMapper.getUserRoleIds(userId);
|
||||||
|
// 招商经理查询招商区域invest_region_id,否则查询运营区域region_id
|
||||||
|
if (userRoleIds.contains(UserRoleEnum.INVESTMENT_MANGER.getCode())) {
|
||||||
|
request.setAuthInvestRegionIds(authRegionIds);
|
||||||
|
} else {
|
||||||
|
request.setAuthRegionIds(authRegionIds);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (CollectionUtils.isNotEmpty(request.getRegionIds())) {
|
if (CollectionUtils.isNotEmpty(request.getRegionIds())) {
|
||||||
@@ -557,7 +575,9 @@ public class ShopServiceImpl implements ShopService {
|
|||||||
if (CollectionUtils.isEmpty(preparations)) {
|
if (CollectionUtils.isEmpty(preparations)) {
|
||||||
return new PageInfo<>();
|
return new PageInfo<>();
|
||||||
}
|
}
|
||||||
List<Long> regionIds = preparations.stream().map(PreparationDTO::getRegionId).collect(Collectors.toList());
|
List<Long> regionIds = preparations.stream()
|
||||||
|
.flatMap(v -> Stream.of(v.getRegionId(), v.getInvestRegionId()))
|
||||||
|
.collect(Collectors.toList());
|
||||||
regionIds.addAll(Optional.of(preparations).orElse(Collections.emptyList()).stream().map(PreparationDTO::getManagerRegionId).collect(Collectors.toList()));
|
regionIds.addAll(Optional.of(preparations).orElse(Collections.emptyList()).stream().map(PreparationDTO::getManagerRegionId).collect(Collectors.toList()));
|
||||||
List<Long> wantShopAreaIds = preparations.stream().map(PreparationDTO::getWantShopAreaId).collect(Collectors.toList());
|
List<Long> wantShopAreaIds = preparations.stream().map(PreparationDTO::getWantShopAreaId).collect(Collectors.toList());
|
||||||
List<String> investmentManagerIds = preparations.stream().map(PreparationDTO::getInvestmentManager).collect(Collectors.toList());
|
List<String> investmentManagerIds = preparations.stream().map(PreparationDTO::getInvestmentManager).collect(Collectors.toList());
|
||||||
@@ -596,6 +616,8 @@ public class ShopServiceImpl implements ShopService {
|
|||||||
response.setDays();
|
response.setDays();
|
||||||
response.setManagerRegionId(dto.getManagerRegionId());
|
response.setManagerRegionId(dto.getManagerRegionId());
|
||||||
response.setManagerRegionName(regionNameMap.getOrDefault(dto.getManagerRegionId(), ""));
|
response.setManagerRegionName(regionNameMap.getOrDefault(dto.getManagerRegionId(), ""));
|
||||||
|
response.setInvestRegionId(dto.getInvestRegionId());
|
||||||
|
response.setInvestRegionName(regionNameMap.getOrDefault(dto.getInvestRegionId(), ""));
|
||||||
responses.add(response);
|
responses.add(response);
|
||||||
}
|
}
|
||||||
pageInfo.setList(responses);
|
pageInfo.setList(responses);
|
||||||
|
|||||||
@@ -149,6 +149,8 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
|||||||
ShopDecorationAssignDAO shopDecorationAssignDAO;
|
ShopDecorationAssignDAO shopDecorationAssignDAO;
|
||||||
@Resource
|
@Resource
|
||||||
private SimpleMessageService simpleMessageService;
|
private SimpleMessageService simpleMessageService;
|
||||||
|
@Resource
|
||||||
|
private OperationsConsultantAssignDAO operationsConsultantAssignDAO;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -518,8 +520,21 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
|||||||
lineInfoDO.setJoinStatus(CommonConstants.TWO);
|
lineInfoDO.setJoinStatus(CommonConstants.TWO);
|
||||||
lineInfoMapper.insertOrUpdate(lineInfoDO);
|
lineInfoMapper.insertOrUpdate(lineInfoDO);
|
||||||
shopStageInfoDAO.updateShopStageInfo(shopId, SHOP_SUB_STAGE_STATUS_84);
|
shopStageInfoDAO.updateShopStageInfo(shopId, SHOP_SUB_STAGE_STATUS_84);
|
||||||
//初始化数据
|
//初始化数据 如果是正新鸡排 需要手动分配 其他品牌直接开始 且将招商经理给到运营经理
|
||||||
preparationService.contractAndBuildStoreCompletion(request.getShopId());
|
if (FranchiseBrandEnum.ZXJP.getCode()==Integer.valueOf(shopInfoDO.getFranchiseBrand())){
|
||||||
|
log.info("zxjp_assign shopId:{}",shopId);
|
||||||
|
//新增分配信息
|
||||||
|
OperationsConsultantAssignDO operationsConsultantAssignDO = new OperationsConsultantAssignDO();
|
||||||
|
operationsConsultantAssignDO.setShopId(shopId);
|
||||||
|
operationsConsultantAssignDO.setAssignStatus(0);
|
||||||
|
operationsConsultantAssignDO.setRegionId(shopInfoDO.getRegionId());
|
||||||
|
operationsConsultantAssignDAO.addOperationsConsultantAssign(operationsConsultantAssignDO);
|
||||||
|
}else {
|
||||||
|
//其他品牌直接开始 且将招商经理给到运营经理
|
||||||
|
shopInfoDO.setOperationsConsultant(shopInfoDO.getInvestmentManager());
|
||||||
|
shopInfoDAO.updateShopInfo(shopInfoDO);
|
||||||
|
preparationService.contractAndBuildStoreCompletion(request.getShopId());
|
||||||
|
}
|
||||||
|
|
||||||
//推送数据
|
//推送数据
|
||||||
contractCallbackDTO = pushContractRequest(shopInfoDO, request.getShopId());
|
contractCallbackDTO = pushContractRequest(shopInfoDO, request.getShopId());
|
||||||
@@ -684,6 +699,25 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
|||||||
return request;
|
return request;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Boolean assignOperationConsultant(AssignOperationConsultantRequest request) {
|
||||||
|
//查询分配信息
|
||||||
|
OperationsConsultantAssignDO operationsConsultantAssignDO = operationsConsultantAssignDAO.selectByShopId(request.getShopId());
|
||||||
|
if (operationsConsultantAssignDO == null){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.PARAMS_VALIDATE_ERROR);
|
||||||
|
}
|
||||||
|
if (operationsConsultantAssignDO.getAssignStatus()==1){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.OPERATIONS_CONSULTANT_ASSIGNED);
|
||||||
|
}
|
||||||
|
//已分配
|
||||||
|
operationsConsultantAssignDO.setAssignStatus(1);
|
||||||
|
operationsConsultantAssignDAO.updateById(operationsConsultantAssignDO);
|
||||||
|
//分配之后 开始以下阶段
|
||||||
|
preparationService.contractAndBuildStoreCompletion(request.getShopId());
|
||||||
|
return Boolean.TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
public AddSignFranchiseResponse from(SignFranchiseDO signFranchiseDO,
|
public AddSignFranchiseResponse from(SignFranchiseDO signFranchiseDO,
|
||||||
Long shopId) {
|
Long shopId) {
|
||||||
AddSignFranchiseResponse addSignFranchiseResponse = new AddSignFranchiseResponse();
|
AddSignFranchiseResponse addSignFranchiseResponse = new AddSignFranchiseResponse();
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import com.cool.store.context.LoginUserInfo;
|
|||||||
import com.cool.store.dao.EnterpriseUserDAO;
|
import com.cool.store.dao.EnterpriseUserDAO;
|
||||||
import com.cool.store.dao.EnterpriseUserRoleDao;
|
import com.cool.store.dao.EnterpriseUserRoleDao;
|
||||||
import com.cool.store.dao.RegionAreaConfigDao;
|
import com.cool.store.dao.RegionAreaConfigDao;
|
||||||
|
import com.cool.store.dao.RegionDao;
|
||||||
import com.cool.store.dto.UserDTO;
|
import com.cool.store.dto.UserDTO;
|
||||||
import com.cool.store.entity.*;
|
import com.cool.store.entity.*;
|
||||||
import com.cool.store.enums.*;
|
import com.cool.store.enums.*;
|
||||||
@@ -78,6 +79,8 @@ public class UserAuthMappingServiceImpl implements UserAuthMappingService {
|
|||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private EnterpriseUserRoleDao enterpriseUserRoleDao;
|
private EnterpriseUserRoleDao enterpriseUserRoleDao;
|
||||||
|
@Autowired
|
||||||
|
private RegionDao regionDao;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -102,6 +105,20 @@ public class UserAuthMappingServiceImpl implements UserAuthMappingService {
|
|||||||
return regionIds;
|
return regionIds;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<String> getAuthRegionIdByUserId(String userId) {
|
||||||
|
List<UserAuthMappingDO> userAuthMapping = listUserAuthMappingByUserId(userId);
|
||||||
|
if (CollectionUtils.isEmpty(userAuthMapping)) {
|
||||||
|
return Lists.newArrayList();
|
||||||
|
}
|
||||||
|
List<String> regionIds = userAuthMapping.stream().map(UserAuthMappingDO::getMappingId).collect(Collectors.toList());
|
||||||
|
List<String> subRegionIds = regionDao.getSubIdsByRegionIdsAndType(regionIds, "path");
|
||||||
|
if (CollectionUtils.isNotEmpty(subRegionIds)) {
|
||||||
|
regionIds.addAll(subRegionIds);
|
||||||
|
}
|
||||||
|
return regionIds;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<String> getAuthStoreIdAndSubRegionIdByUserId(String userId) {
|
public List<String> getAuthStoreIdAndSubRegionIdByUserId(String userId) {
|
||||||
List<UserAuthMappingDO> userAuthMapping = listUserAuthMappingByUserId(userId);
|
List<UserAuthMappingDO> userAuthMapping = listUserAuthMappingByUserId(userId);
|
||||||
|
|||||||
@@ -29,8 +29,9 @@ public class BigRegionController {
|
|||||||
@PostMapping("/queryAllBigRegion")
|
@PostMapping("/queryAllBigRegion")
|
||||||
@ApiOperation("获取所有可选择的大区")
|
@ApiOperation("获取所有可选择的大区")
|
||||||
public ResponseResult<List<BigRegionDTO>> queryContentInfo(@RequestParam(required = false) String keyword,
|
public ResponseResult<List<BigRegionDTO>> queryContentInfo(@RequestParam(required = false) String keyword,
|
||||||
@RequestParam(required = false) Integer joinBrand) {
|
@RequestParam(required = false) Integer joinBrand,
|
||||||
return ResponseResult.success(bigRegionService.queryAllBigRegion(keyword, joinBrand));
|
@RequestParam(required = true)Integer type) {
|
||||||
|
return ResponseResult.success(bigRegionService.queryAllBigRegion(keyword, joinBrand,type));
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/queryBigRegion")
|
@PostMapping("/queryBigRegion")
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import com.cool.store.context.CurrentUserHolder;
|
|||||||
import com.cool.store.context.LoginUserInfo;
|
import com.cool.store.context.LoginUserInfo;
|
||||||
import com.cool.store.dto.InvestmentCountDTO;
|
import com.cool.store.dto.InvestmentCountDTO;
|
||||||
import com.cool.store.dto.PendingCountDTO;
|
import com.cool.store.dto.PendingCountDTO;
|
||||||
|
import com.cool.store.request.AssignPendingRequest;
|
||||||
import com.cool.store.request.BusinessRemarkRequest;
|
import com.cool.store.request.BusinessRemarkRequest;
|
||||||
import com.cool.store.request.DeskRequest;
|
import com.cool.store.request.DeskRequest;
|
||||||
import com.cool.store.response.ResponseResult;
|
import com.cool.store.response.ResponseResult;
|
||||||
@@ -247,6 +248,10 @@ public class DeskController {
|
|||||||
return ResponseResult.success(deskService.submitBusinessRemark(request,userInfo));
|
return ResponseResult.success(deskService.submitBusinessRemark(request,userInfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation("待处理-查询运营顾问待分配门店信息")
|
||||||
|
@PostMapping("/assignPendingList")
|
||||||
|
public ResponseResult<PageInfo<OperationsConsultantAssignVO>> assignPendingList(@RequestBody AssignPendingRequest request) {
|
||||||
|
LoginUserInfo userInfo = CurrentUserHolder.getUser();
|
||||||
|
return ResponseResult.success(deskService.assignPendingList(request, userInfo));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ package com.cool.store.controller.webb;
|
|||||||
import com.cool.store.context.CurrentUserHolder;
|
import com.cool.store.context.CurrentUserHolder;
|
||||||
import com.cool.store.context.LoginUserInfo;
|
import com.cool.store.context.LoginUserInfo;
|
||||||
import com.cool.store.request.AddSignFranchiseRequest;
|
import com.cool.store.request.AddSignFranchiseRequest;
|
||||||
|
import com.cool.store.request.AssignOperationConsultantRequest;
|
||||||
import com.cool.store.request.AuditApproveRequest;
|
import com.cool.store.request.AuditApproveRequest;
|
||||||
import com.cool.store.response.AddSignFranchiseResponse;
|
import com.cool.store.response.AddSignFranchiseResponse;
|
||||||
import com.cool.store.response.ResponseResult;
|
import com.cool.store.response.ResponseResult;
|
||||||
@@ -67,4 +68,12 @@ public class PCSignFranchiseController {
|
|||||||
return ResponseResult.success(signFranchiseService.dateHandle());
|
return ResponseResult.success(signFranchiseService.dateHandle());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation("分配运营顾问")
|
||||||
|
@PostMapping("/assignOperationConsultant")
|
||||||
|
public ResponseResult<Boolean> assignOperationConsultant(@RequestBody @Validated AssignOperationConsultantRequest request) {
|
||||||
|
return ResponseResult.success(signFranchiseService.assignOperationConsultant(request));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user