Merge #127 into master from cc_20260512_fix

feat:上传租赁合同代办

* cc_20260512_fix: (1 commits squashed)

  - feat:上传租赁合同代办

Signed-off-by: 正新 <accounts_6964c7bcd2a2c377c5bbd01b@mail.teambition.com>
Merged-by: 正新 <accounts_6964c7bcd2a2c377c5bbd01b@mail.teambition.com>

CR-link: https://codeup.aliyun.com/692ea314dec569489f6f167c/hangzhou/java/custom_zxjp/change/127
This commit is contained in:
正新
2026-05-12 08:13:22 +00:00
parent 3c52808fc5
commit 27af1561ac
4 changed files with 33 additions and 14 deletions

View File

@@ -270,11 +270,11 @@ public class ShopStageInfoDAO {
return shopStageInfoMapper.updateShopStageAndAuditInfo(shopId, shopStageInfo.getShopSubStageEnum().getShopSubStage(), shopStageInfo.getShopSubStageStatus(), isTerminated, remark, auditId);
}
public Page<RentInfoToDoVO> getRentContractToDoPage(String userId, Integer pageNum, Integer pageSize,List<String> authRegionIds,String keyword) {
public Page<RentInfoToDoVO> getRentContractToDoPage(String userId, Integer pageNum,
Integer pageSize,List<String> authRegionIds,String keyword,List<Integer> subStageStatusEnum) {
PageHelper.startPage(pageNum, pageSize);
ShopSubStageStatusEnum shopSubStageStatus = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_21;
return shopStageInfoMapper.getRentContractToDoPage(userId, shopSubStageStatus.getShopSubStageEnum().getShopSubStage(),
shopSubStageStatus.getShopSubStageStatus(),authRegionIds,keyword);
return shopStageInfoMapper.getRentContractToDoPage(userId, ShopSubStageEnum.SHOP_STAGE_2.getShopSubStage(),
subStageStatusEnum,authRegionIds,keyword);
}
public List<ShopStageInfoDO> getShopIdListByStageStatus(Integer shopSubStageStatus) {

View File

@@ -118,7 +118,7 @@ public interface ShopStageInfoMapper extends Mapper<ShopStageInfoDO> {
*/
Page<RentInfoToDoVO> getRentContractToDoPage(@Param("userId") String userId,
@Param("shopSubStage")Integer shopSubStage,
@Param("shopSubStageStatus") Integer shopSubStageStatus,
@Param("shopSubStageStatusList") List<Integer> shopSubStageStatusList,
@Param("authRegionIds") List<String> authRegionIds, @Param("keyword") String keyword);
List<ShopStageInfoDO> getShopIdListByStageStatus(@Param("shopSubStageStatus") Integer shopSubStageStatus);

View File

@@ -245,9 +245,14 @@
left join xfsg_shop_info c on a.shop_id = c.id
where c.deleted=0
and a.shop_sub_stage = #{shopSubStage}
and a.shop_sub_stage_status = #{shopSubStageStatus}
and a.deleted = 0
and b.deleted = 0
<if test="shopSubStageStatusList != null and shopSubStageStatusList.size() > 0">
and a.shop_sub_stage_status in
<foreach collection="shopSubStageStatusList" item="shopSubStageStatus" index="index" open="(" separator="," close=")">
#{shopSubStageStatus}
</foreach>
</if>
<if test="authRegionIds != null and authRegionIds.size() > 0">
and c.invest_region_id in
<foreach collection="authRegionIds" item="regionId" index="index" open="(" separator="," close=")">

View File

@@ -32,6 +32,7 @@ import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.google.common.collect.Lists;
import io.swagger.models.auth.In;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.ListUtils;
@@ -50,6 +51,9 @@ import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
import static com.cool.store.enums.point.ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_21;
import static com.cool.store.enums.point.ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_21_5;
/**
* @author zhangchenbiao
* @FileName: ShopPointServiceImpl
@@ -1235,7 +1239,7 @@ public class PointServiceImpl implements PointService {
MessageEnum.MESSAGE_15,
map);
}
return shopStageInfoDAO.updateShopStageInfo(shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_21);
return shopStageInfoDAO.updateShopStageInfo(shopId, SHOP_SUB_STAGE_STATUS_21);
}
@Override
@@ -1274,8 +1278,8 @@ public class PointServiceImpl implements PointService {
}
ShopStageInfoDO shopStageInfo = shopStageInfoDAO.getShopSubStageInfo(request.getShopId(), ShopSubStageEnum.SHOP_STAGE_2);
//招商大区总审核 或者 分部内勤审核 其他状态不能审核
if (!(shopStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_21.getShopSubStageStatus())||
shopStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_21_5.getShopSubStageStatus()))) {
if (!(shopStageInfo.getShopSubStageStatus().equals(SHOP_SUB_STAGE_STATUS_21.getShopSubStageStatus())||
shopStageInfo.getShopSubStageStatus().equals(SHOP_SUB_STAGE_STATUS_21_5.getShopSubStageStatus()))) {
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
}
@@ -1283,10 +1287,10 @@ public class PointServiceImpl implements PointService {
ShopSubStageStatusEnum subStageStatus = null;
if (AuditResultTypeEnum.PASS.getCode().equals(request.getResultType())){
if (shopStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_21.getShopSubStageStatus())){
subStageStatus = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_21_5;
if (shopStageInfo.getShopSubStageStatus().equals(SHOP_SUB_STAGE_STATUS_21.getShopSubStageStatus())){
subStageStatus = SHOP_SUB_STAGE_STATUS_21_5;
}
if (shopStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_21_5.getShopSubStageStatus())){
if (shopStageInfo.getShopSubStageStatus().equals(SHOP_SUB_STAGE_STATUS_21_5.getShopSubStageStatus())){
subStageStatus = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_23;
}
}else {
@@ -1328,7 +1332,7 @@ public class PointServiceImpl implements PointService {
ShopRentInfoDO shopRentInfo = UpdateRentContractRequest.convertDO(request);
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(request.getShopId(), ShopSubStageEnum.SHOP_STAGE_2);
if (ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_22.getShopSubStageStatus().equals(shopSubStageInfo.getShopSubStageStatus())) {
shopStageInfoDAO.updateShopStageAndAuditInfo(shopRentInfo.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_21, null);
shopStageInfoDAO.updateShopStageAndAuditInfo(shopRentInfo.getShopId(), SHOP_SUB_STAGE_STATUS_21, null);
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(shopSubStageInfo.getLineId());
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopSubStageInfo.getShopId());
if (shopInfo!=null){
@@ -1370,10 +1374,20 @@ public class PointServiceImpl implements PointService {
public PageInfo<RentInfoToDoVO> getRentContractToDoPage(String userId, Integer pageNumber, Integer pageSize,String keyword) {
List<String> authRegionIds = new ArrayList<>();
//如果是管理员 查询所有 如果是其他角色 根据管辖大区权限查询 菜单根据配置来
List<Integer> list = new ArrayList<>();
if (!sysRoleService.checkIsAdmin(userId)) {
authRegionIds = userAuthMappingService.getAuthRegionIdByUserId(userId,Boolean.TRUE);
List<SysRoleDO> sysRoleDOS = sysRoleMapper.listRoleByUserId(userId);
if (sysRoleDOS.stream().anyMatch(x -> x.getId().equals(UserRoleEnum.REGION_MANAGER.getCode()))) {
list.add(SHOP_SUB_STAGE_STATUS_21.getShopSubStageStatus());
}
if (sysRoleDOS.stream().anyMatch(x -> x.getId().equals(UserRoleEnum.BRANCH_OFFICE.getCode()))) {
list.add(SHOP_SUB_STAGE_STATUS_21_5.getShopSubStageStatus());
}
}else {
list.addAll(Arrays.asList(SHOP_SUB_STAGE_STATUS_21.getShopSubStageStatus(),SHOP_SUB_STAGE_STATUS_21_5.getShopSubStageStatus()));
}
Page<RentInfoToDoVO> todoPage = shopStageInfoDAO.getRentContractToDoPage(userId, pageNumber, pageSize,authRegionIds,keyword);
Page<RentInfoToDoVO> todoPage = shopStageInfoDAO.getRentContractToDoPage(userId, pageNumber, pageSize,authRegionIds,keyword,list);
List<RentInfoToDoVO> resultList = null;
if (Objects.nonNull(todoPage) && CollectionUtils.isNotEmpty(todoPage.getResult())) {
List<Long> shopIds = todoPage.getResult().stream().map(RentInfoToDoVO::getShopId).collect(Collectors.toList());