Merge branch 'cc_20250521_fix1' into 'master'

feat:财务数据区分

See merge request hangzhou/java/custom_zxjp!91
This commit is contained in:
苏竹红
2025-05-21 09:46:30 +00:00
4 changed files with 41 additions and 7 deletions

View File

@@ -337,8 +337,8 @@ public class ShopStageInfoDAO {
public List<ShopStageInfoDO> getSpecialShopStageInfo(List<Long> shopIds, Integer shopSubStage, public List<ShopStageInfoDO> getSpecialShopStageInfo(List<Long> shopIds, Integer shopSubStage,
List<Integer> shopSubStageStatusList, List<Integer> shopSubStageStatusList,
String investmentUserId, String investmentUserId,
List<String> authRegionIds) { List<String> authRegionIds,Boolean ownShopFlag) {
return shopStageInfoMapper.getSpecialShopStageInfo(shopIds, shopSubStage, shopSubStageStatusList, investmentUserId, authRegionIds); return shopStageInfoMapper.getSpecialShopStageInfo(shopIds, shopSubStage, shopSubStageStatusList, investmentUserId, authRegionIds,ownShopFlag);
} }
/** /**

View File

@@ -146,7 +146,9 @@ public interface ShopStageInfoMapper extends Mapper<ShopStageInfoDO> {
List<ShopStageInfoDO> getSpecialShopStageInfo(@Param("shopIds") List<Long> shopIds, List<ShopStageInfoDO> getSpecialShopStageInfo(@Param("shopIds") List<Long> shopIds,
@Param("shopSubStage") Integer shopSubStage, @Param("shopSubStage") Integer shopSubStage,
@Param("shopSubStageStatusList") List<Integer> shopSubStageStatusList, @Param("shopSubStageStatusList") List<Integer> shopSubStageStatusList,
@Param("investmentUserId") String investmentUserId, @Param("authRegionIds") List<String> authRegionIds); @Param("investmentUserId") String investmentUserId,
@Param("authRegionIds") List<String> authRegionIds,
@Param("ownShopFlag") Boolean ownShopFlag);
List<ShopStageInfoDO> getSubStageList(@Param("shopIds") List<Long> shopIds,@Param("shopSubStage") Integer shopSubStage); List<ShopStageInfoDO> getSubStageList(@Param("shopIds") List<Long> shopIds,@Param("shopSubStage") Integer shopSubStage);
List<ShopStageInfoDO> getSubStages(@Param("shopIds") List<Long> shopIds,@Param("shopSubStage") Integer shopSubStage); List<ShopStageInfoDO> getSubStages(@Param("shopIds") List<Long> shopIds,@Param("shopSubStage") Integer shopSubStage);

View File

@@ -331,6 +331,14 @@
#{regionId} #{regionId}
</foreach> </foreach>
</if> </if>
<if test="ownShopFlag!=null">
<if test="ownShopFlag">
and si.join_mode = 3
</if>
<if test="!ownShopFlag">
and si.join_mode != 3
</if>
</if>
order by a.update_time desc order by a.update_time desc
</where> </where>

View File

@@ -558,11 +558,20 @@ public class DeskServiceImpl implements DeskService {
@Override @Override
public PageInfo<PreparationCommonPendingVO> buildInformationPendingList(Integer pageNum, Integer pageSize, LoginUserInfo user) { public PageInfo<PreparationCommonPendingVO> buildInformationPendingList(Integer pageNum, Integer pageSize, LoginUserInfo user) {
List<Long> userRoleIds = enterpriseUserRoleMapper.getUserRoleIds(user.getUserId()); List<Long> userRoleIds = enterpriseUserRoleMapper.getUserRoleIds(user.getUserId());
//如果不是财务角色或者即是财务又是自有店财务 则不需要标识
Boolean ownShopFlag = null;
if (userRoleIds.contains(UserRoleEnum.FINANCE.getCode())&&userRoleIds.contains(UserRoleEnum.OWN_SHOP_OFFICE.getCode())){
ownShopFlag = null;
}else if(userRoleIds.contains(UserRoleEnum.FINANCE.getCode())){
ownShopFlag = Boolean.FALSE;
}else if (userRoleIds.contains(UserRoleEnum.OWN_SHOP_OFFICE.getCode())){
ownShopFlag = Boolean.TRUE;
}
List<Integer> subStageStatusList = new ArrayList<>(); List<Integer> subStageStatusList = new ArrayList<>();
if (userRoleIds.contains(UserRoleEnum.LOGISTICS.getCode())) { if (userRoleIds.contains(UserRoleEnum.LOGISTICS.getCode())) {
subStageStatusList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_151.getShopSubStageStatus()); subStageStatusList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_151.getShopSubStageStatus());
} }
if (userRoleIds.contains(UserRoleEnum.FINANCE.getCode())) { if (userRoleIds.contains(UserRoleEnum.FINANCE.getCode())||userRoleIds.contains(UserRoleEnum.OWN_SHOP_OFFICE.getCode())) {
subStageStatusList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_152.getShopSubStageStatus()); subStageStatusList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_152.getShopSubStageStatus());
} }
if (userRoleIds.contains(UserRoleEnum.HEAD_OF_DIVISION.getCode()) || userRoleIds.contains(UserRoleEnum.REGIONAL_MANAGER.getCode())) { if (userRoleIds.contains(UserRoleEnum.HEAD_OF_DIVISION.getCode()) || userRoleIds.contains(UserRoleEnum.REGIONAL_MANAGER.getCode())) {
@@ -582,7 +591,7 @@ public class DeskServiceImpl implements DeskService {
subStageStatusList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_154.getShopSubStageStatus()); subStageStatusList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_154.getShopSubStageStatus());
subStageStatusList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_155.getShopSubStageStatus()); subStageStatusList.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_155.getShopSubStageStatus());
} }
return commonPendingVOPageInfo(pageNum, pageSize, isAdmin ? null : user, ShopSubStageEnum.SHOP_STAGE_15, subStageStatusList, isAdmin ? Boolean.FALSE : Boolean.TRUE); return commonPendingVOPage(pageNum, pageSize, isAdmin ? null : user, ShopSubStageEnum.SHOP_STAGE_15, subStageStatusList, isAdmin ? Boolean.FALSE : Boolean.TRUE,ownShopFlag);
} }
@Override @Override
@@ -635,6 +644,21 @@ public class DeskServiceImpl implements DeskService {
return new PageInfo<>(); return new PageInfo<>();
} }
/**
* 通用查询
* @param pageNum
* @param pageSize
* @param user
* @param shopSubStageEnum
* @param subStageStatusList
* @param filterFlag
* @return
*/
private PageInfo<PreparationCommonPendingVO> commonPendingVOPageInfo(Integer pageNum, Integer pageSize, LoginUserInfo user, ShopSubStageEnum shopSubStageEnum, List<Integer> subStageStatusList, Boolean filterFlag){
return this.commonPendingVOPage(pageNum,pageSize,user,shopSubStageEnum,subStageStatusList,filterFlag,null);
}
/** /**
* 通用查询 * 通用查询
* *
@@ -645,7 +669,7 @@ public class DeskServiceImpl implements DeskService {
* @param subStageStatusList * @param subStageStatusList
* @return * @return
*/ */
private PageInfo<PreparationCommonPendingVO> commonPendingVOPageInfo(Integer pageNum, Integer pageSize, LoginUserInfo user, ShopSubStageEnum shopSubStageEnum, List<Integer> subStageStatusList, Boolean filterFlag) { private PageInfo<PreparationCommonPendingVO> commonPendingVOPage(Integer pageNum, Integer pageSize, LoginUserInfo user, ShopSubStageEnum shopSubStageEnum, List<Integer> subStageStatusList, Boolean filterFlag,Boolean ownShopFlag) {
//user.getJobNumber() //user.getJobNumber()
List<String> authRegionIds = new ArrayList<>(); List<String> authRegionIds = new ArrayList<>();
if (filterFlag) { if (filterFlag) {
@@ -655,7 +679,7 @@ public class DeskServiceImpl implements DeskService {
} }
PageHelper.startPage(pageNum, pageSize); PageHelper.startPage(pageNum, pageSize);
List<ShopStageInfoDO> specialShopStageInfo = shopStageInfoDAO.getSpecialShopStageInfo(null, shopSubStageEnum.getShopSubStage(), List<ShopStageInfoDO> specialShopStageInfo = shopStageInfoDAO.getSpecialShopStageInfo(null, shopSubStageEnum.getShopSubStage(),
subStageStatusList, user == null ? null : user.getUserId(), authRegionIds); subStageStatusList, user == null ? null : user.getUserId(), authRegionIds,ownShopFlag);
PageInfo result = new PageInfo<>(specialShopStageInfo); PageInfo result = new PageInfo<>(specialShopStageInfo);
List<Long> shopIds = specialShopStageInfo.stream().map(ShopStageInfoDO::getShopId).collect(Collectors.toList()); List<Long> shopIds = specialShopStageInfo.stream().map(ShopStageInfoDO::getShopId).collect(Collectors.toList());
List<Long> lineIds = specialShopStageInfo.stream().map(ShopStageInfoDO::getLineId).collect(Collectors.toList()); List<Long> lineIds = specialShopStageInfo.stream().map(ShopStageInfoDO::getLineId).collect(Collectors.toList());