This commit is contained in:
shuo.wang
2025-05-07 16:53:33 +08:00
parent de80b0779f
commit 87e0af9448
6 changed files with 59 additions and 9 deletions

View File

@@ -41,7 +41,7 @@ public enum UserRoleEnum {
KUAI_SHOU_CUSTOMER(360000000L,"快手客服"), KUAI_SHOU_CUSTOMER(360000000L,"快手客服"),
XIN_FA_SYS_CUSTOMER(370000000L,"信发系统客服"), XIN_FA_SYS_CUSTOMER(370000000L,"信发系统客服"),
TENT_PASS_CUSTOMER(380000000L,"营帐通客服"), TENT_PASS_CUSTOMER(380000000L,"营帐通客服"),
DESIGN_CUSTOMER(390000000L,"设计客服"), DESIGN_CUSTOMER(390000000L,"设计"),
CONSTRUCTION_CUSTOMER(400000000L,"立规内勤"), CONSTRUCTION_CUSTOMER(400000000L,"立规内勤"),
BRANCH_OFFICE(1724233283449L,"分部内勤"), BRANCH_OFFICE(1724233283449L,"分部内勤"),
JOIN_OFFICE(1719278230274L,"加盟内勤"), JOIN_OFFICE(1719278230274L,"加盟内勤"),

View File

@@ -2,6 +2,7 @@ package com.cool.store.dao;
import com.cool.store.entity.DecorationDesignInfoDO; import com.cool.store.entity.DecorationDesignInfoDO;
import com.cool.store.mapper.DecorationDesignInfoMapper; import com.cool.store.mapper.DecorationDesignInfoMapper;
import com.cool.store.utils.StringUtil;
import com.cool.store.vo.desk.PreparationCommonPendingVO; import com.cool.store.vo.desk.PreparationCommonPendingVO;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.apache.xmlbeans.impl.xb.xsdschema.Public; import org.apache.xmlbeans.impl.xb.xsdschema.Public;

View File

@@ -74,4 +74,13 @@ public class DecorationMeasureDAO {
} }
return decorationMeasureMapper.getShopIdListByDesignUserIdAndShopStage(userId); return decorationMeasureMapper.getShopIdListByDesignUserIdAndShopStage(userId);
} }
//有 设计组长 和 设计师 查询 指定当前用户和 阶段为 900 待分配设计师 阶段为 901 设计中 设计表关联查询
public List<PreparationCommonPendingVO> getShopIdListByDesignUserIdOrQuotationAndShopStage(String userId) {
if (StringUtil.isBlank(userId)){
return new ArrayList<>();
}
return decorationMeasureMapper.getShopIdListByDesignUserIdOrQuotationAndShopStage(userId);
}
} }

View File

@@ -20,4 +20,6 @@ public interface DecorationMeasureMapper extends Mapper<DecorationMeasureDO> {
List<PreparationCommonPendingVO> selectByMeasureUserIdAndShopStage(@Param("measureUserId") String measureUserId); List<PreparationCommonPendingVO> selectByMeasureUserIdAndShopStage(@Param("measureUserId") String measureUserId);
List<PreparationCommonPendingVO> getShopIdListByDesignUserIdAndShopStage(@Param("userId") String userId); List<PreparationCommonPendingVO> getShopIdListByDesignUserIdAndShopStage(@Param("userId") String userId);
List<PreparationCommonPendingVO> getShopIdListByDesignUserIdOrQuotationAndShopStage(@Param("userId") String userId);
} }

View File

@@ -75,6 +75,31 @@
and c.deleted = 0 and c.deleted = 0
order by b.update_time desc order by b.update_time desc
</select> </select>
<select id="getShopIdListByDesignUserIdOrQuotationAndShopStage" resultType="com.cool.store.vo.desk.PreparationCommonPendingVO">
select
c.shop_name as storeName,
c.shop_code as ShopCode,
c.detail_address as shopAddress,
c.investment_manager as investmentManagerId,
c.id as shopId,
c.line_id as lineId,
c.region_id as regionId,
c.store_type as storeType,
b.shop_stage as stage,
b.shop_sub_stage as subStage,
b.shop_sub_stage_status as subStageStatus,
b.update_time as updateTime
from xfsg_decoration_measure a
left join xfsg_shop_stage_info b on a.shop_id = b.shop_id
left join xfsg_shop_info c on a.shop_id = c.id
left join xfsg_decoration_design_info d on a.shop_id = d.shop_id
where
and ((b.shop_sub_stage_status = 900 and a.design_user_id = #{userId}) or ((b.shop_sub_stage_status = 901 and d.design_user_id = #{userId}))
and c.deleted = 0
order by b.update_time desc
</select>
</mapper> </mapper>

View File

@@ -407,14 +407,8 @@ public class DeskServiceImpl implements DeskService {
return commonPendingVOPageInfo(pageNum, pageSize, isAdmin ? null : user, ShopSubStageEnum.SHOP_STAGE_9, subStageStatusList, isAdmin ? Boolean.FALSE : Boolean.TRUE); return commonPendingVOPageInfo(pageNum, pageSize, isAdmin ? null : user, ShopSubStageEnum.SHOP_STAGE_9, subStageStatusList, isAdmin ? Boolean.FALSE : Boolean.TRUE);
} else { } else {
List<PreparationCommonPendingVO> list = new ArrayList<>(); List<PreparationCommonPendingVO> list = new ArrayList<>();
if (userRoleIds.contains(UserRoleEnum.HEAD_OF_DESIGN.getCode())) { list = getDesignPendingVO(pageNum, pageSize, user, userRoleIds);
PageHelper.startPage(pageNum, pageSize);
list = decorationMeasureDAO.getShopIdListByDesignUserIdAndShopStage(user.getUserId());
}
if (userRoleIds.contains(UserRoleEnum.DESIGN_CUSTOMER.getCode())) {
PageHelper.startPage(pageNum, pageSize);
list = decorationDesignInfoDAO.getByQuotationUserIdAndShopStage(user.getUserId());
}
if (CollectionUtils.isEmpty(list)) { if (CollectionUtils.isEmpty(list)) {
return new PageInfo<>(); return new PageInfo<>();
} }
@@ -444,6 +438,25 @@ public class DeskServiceImpl implements DeskService {
} }
} }
private List<PreparationCommonPendingVO> getDesignPendingVO(Integer pageNum, Integer pageSize, LoginUserInfo user, List<Long> userRoleIds) {
//只有设计组长 查询 指定当前用户和阶段为 900 待分配设计师
if (userRoleIds.contains(UserRoleEnum.HEAD_OF_DESIGN.getCode()) && !userRoleIds.contains(UserRoleEnum.DESIGN_CUSTOMER.getCode())) {
PageHelper.startPage(pageNum, pageSize);
return decorationMeasureDAO.getShopIdListByDesignUserIdAndShopStage(user.getUserId());
}
//只有设计师 查询 指定当前用户和阶段为 901 设计中
if (userRoleIds.contains(UserRoleEnum.DESIGN_CUSTOMER.getCode()) && !userRoleIds.contains(UserRoleEnum.HEAD_OF_DESIGN.getCode())) {
PageHelper.startPage(pageNum, pageSize);
return decorationDesignInfoDAO.getByQuotationUserIdAndShopStage(user.getUserId());
}
//有 设计组长 和 设计师 查询 指定当前用户和 阶段为 900 待分配设计师 阶段为 901 设计中
if (userRoleIds.contains(UserRoleEnum.DESIGN_CUSTOMER.getCode()) && userRoleIds.contains(UserRoleEnum.HEAD_OF_DESIGN.getCode())) {
PageHelper.startPage(pageNum, pageSize);
return decorationMeasureDAO.getShopIdListByDesignUserIdOrQuotationAndShopStage(user.getUserId());
}
return null;
}
@Override @Override
public PageInfo<PreparationCommonPendingVO> constructionPendingList(Integer pageNum, Integer pageSize, LoginUserInfo user) { public PageInfo<PreparationCommonPendingVO> constructionPendingList(Integer pageNum, Integer pageSize, LoginUserInfo user) {
PageInfo<PreparationCommonPendingVO> pageInfo = commonPendingVOPageInfo(pageNum, pageSize, user, ShopSubStageEnum.SHOP_STAGE_11, PageInfo<PreparationCommonPendingVO> pageInfo = commonPendingVOPageInfo(pageNum, pageSize, user, ShopSubStageEnum.SHOP_STAGE_11,