Merge #13 into master from cc_20251211_jinjian

feat:进件

* cc_20251211_jinjian: (3 commits squashed)

  - feat:进件

  - Merge branch 'master' into cc_20251211_jinjian

  - feat:进件

Signed-off-by: 苏竹红 <570057076@qq.com>
Merged-by: 苏竹红 <570057076@qq.com>

CR-link: https://codeup.aliyun.com/692ea314dec569489f6f167c/hangzhou/java/custom_zxjp/change/13
This commit is contained in:
2025-12-15 09:43:50 +00:00
parent 9769aba30c
commit cf5d16b822
7 changed files with 157 additions and 0 deletions

View File

@@ -7,6 +7,7 @@ import com.cool.store.enums.OpenStatusEnum;
import com.cool.store.enums.PlatformBuildEnum;
import com.cool.store.enums.ShopAccountEnum;
import com.cool.store.mapper.ShopAccountMapper;
import com.cool.store.request.DeskRequest;
import com.cool.store.utils.StringUtil;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.ibatis.annotations.Param;
@@ -191,4 +192,14 @@ public class ShopAccountDAO {
List<ShopAccountDO> shopAccountDOS = shopAccountMapper.selectAll();
return new ArrayList<>(shopAccountDOS.stream().map(ShopAccountDO::getShopId).collect(Collectors.toSet())) ;
}
/**
* 进件待办列表
* @param deskRequest
* @param systemName
* @return
*/
public List<ShopAccountDO> getEntryPendingList(DeskRequest deskRequest, String systemName){
return shopAccountMapper.getEntryPendingList(deskRequest,systemName);
}
}

View File

@@ -1,6 +1,7 @@
package com.cool.store.mapper;
import com.cool.store.entity.ShopAccountDO;
import com.cool.store.request.DeskRequest;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;
import tk.mybatis.mapper.common.Mapper;
@@ -101,5 +102,13 @@ public interface ShopAccountMapper extends Mapper<ShopAccountDO> {
Integer updateStatusDataHandle(@Param("list") List<Long> shopIds);
/**
* 进件待办列表
* @param request
* @param systemName
* @return
*/
List<ShopAccountDO> getEntryPendingList(@Param("request") DeskRequest request, @Param("systemName") String systemName);
}

View File

@@ -214,4 +214,52 @@
WHERE `password` is null and `system_name` = '火码POS'
</select>
<select id="getEntryPendingList" resultMap="BaseResultMap">
select
*
from xfsg_shop_account a
left join xfsg_shop_info si on a.shop_id = si.id
<if test="request.signTypes != null and request.signTypes.size() >0">
left join xfsg_sign_franchise sign on a.shop_id = sign.shop_id
</if>
<where>
si.deleted = 0 and si.shop_status !=2 and a.`entry_status` in (2,3,4,6)
<if test="systemName!=null and systemName!=''">
and a.system_name = #{systemName}
</if>
<if test="request.shopKeyword !=null and request.shopKeyword !=''">
and (si.shop_name like concat('%',#{request.shopKeyword},'%') or si.shop_code like concat('%',#{request.shopKeyword},'%'))
</if>
<if test="request.regionIds !=null and request.regionIds.size()>0">
and si.region_id in
<foreach collection="request.regionIds" item="regionId" index="index" open="(" separator="," close=")">
#{regionId}
</foreach>
</if>
<if test="request.storeTypes !=null and request.storeTypes.size()>0">
and si.store_type in
<foreach collection="request.storeTypes" item="storeType" index="index" open="(" separator="," close=")">
#{storeType}
</foreach>
</if>
<if test="request.signTypes !=null and request.signTypes.size()>0">
and sign.sign_type in
<foreach collection="request.signTypes" item="signType" index="index" open="(" separator="," close=")">
#{signType}
</foreach>
</if>
<if test="request.supervisorId != null and request.supervisorId!= ''">
and si.investment_manager = #{request.supervisorId}
</if>
<if test="request.joinModes !=null and request.joinModes.size()>0">
and si.join_mode in
<foreach collection="request.joinModes" item="joinMode" index="index" open="(" separator="," close=")">
#{joinMode}
</foreach>
</if>
order by a.create_time desc
</where>
</select>
</mapper>

View File

@@ -195,4 +195,12 @@ public interface DeskService {
Integer submitBusinessRemark(BusinessRemarkRequest request, LoginUserInfo user);
/**
* posEntry pos进件待处理数据
* @param deskRequest
* @param user
* @return
*/
PageInfo<PreparationCommonPendingVO> posEntryListPendingList(DeskRequest deskRequest, LoginUserInfo user );
}

View File

@@ -11,6 +11,7 @@ import com.cool.store.enums.point.ShopSubStageStatusEnum;
import com.cool.store.exception.ServiceException;
import com.cool.store.request.*;
import com.cool.store.service.DecorationDesignInfoService;
import com.cool.store.service.PreparationService;
import com.cool.store.utils.poi.StringUtils;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.stereotype.Service;
@@ -42,6 +43,8 @@ public class DecorationDesignInfoServiceImpl implements DecorationDesignInfoServ
private LineInfoDAO lineInfoDAO;
@Resource
private BuildInformationDAO buildInformationDAO;
@Resource
PreparationService preparationService;
@Override
@Transactional(rollbackFor = Exception.class)
@@ -278,6 +281,7 @@ public class DecorationDesignInfoServiceImpl implements DecorationDesignInfoServ
}
if (shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_122.getShopSubStageStatus())) {
shopStageInfoDAO.updateShopStageInfo(shopInfoDO.getId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_123);
preparationService.buildStoreAndDecorationComplete(shopInfoDO.getId());
}
// 覆盖建店资料中的门头照和内景照
BuildInformationDO buildInformation = BuildInformationDO.builder().shopId(request.getShopId()).doorPhoto(buildJson(request.getShopDoorwayPhotoUrl()))

View File

@@ -9,6 +9,7 @@ import com.cool.store.dto.PendingCountDTO;
import com.cool.store.dto.openPreparation.PlanLineDTO;
import com.cool.store.entity.*;
import com.cool.store.enums.ErrorCodeEnum;
import com.cool.store.enums.ShopAccountEnum;
import com.cool.store.enums.UserRoleEnum;
import com.cool.store.enums.WorkflowSubStageStatusEnum;
import com.cool.store.enums.point.PayBusinessTypeEnum;
@@ -98,6 +99,8 @@ public class DeskServiceImpl implements DeskService {
private PointInfoDAO pointInfoDAO;
@Autowired
private ShopStageRemarkInfoDAO shopStageRemarkInfoDAO;
@Resource
ShopAccountDAO shopAccountDAO;
@Override
public PageInfo<IntendPendingVO> intendPendingList(Integer pageNum, Integer pageSize, String userId, String keyword) {
@@ -630,6 +633,73 @@ public class DeskServiceImpl implements DeskService {
}
@Override
public PageInfo<PreparationCommonPendingVO> posEntryListPendingList(DeskRequest deskRequest, LoginUserInfo user) {
//user.getJobNumber()
PageHelper.startPage(deskRequest.getPageNum(), deskRequest.getPageSize());
List<ShopAccountDO> entryPendingList = shopAccountDAO.getEntryPendingList(deskRequest, ShopAccountEnum.HUOMA.getSystemName());
PageInfo result = new PageInfo<>(entryPendingList);
List<Long> shopIds = entryPendingList.stream().map(ShopAccountDO::getShopId).collect(Collectors.toList());
List<ShopInfoDO> shopInfoList = shopInfoDAO.getShopListByIds(shopIds);
List<Long> lineIds = shopInfoList.stream().map(ShopInfoDO::getLineId).collect(Collectors.toList());
List<PlanLineDTO> lines = lineInfoDAO.getLines(lineIds);
List<SignFranchiseDO> signType = signFranchiseDAO.getSignType(shopIds);
Map<Long, SignFranchiseDO> signTypeMap = signType.stream().collect(Collectors.toMap(SignFranchiseDO::getShopId, dto -> dto));
//将shopInfoList 转为map
Map<Long, ShopInfoDO> shopInfoMap = shopInfoList.stream().collect(Collectors.toMap(ShopInfoDO::getId, shop -> shop));
//将lines 转为map
Map<Long, PlanLineDTO> lineMap = lines.stream().collect(Collectors.toMap(PlanLineDTO::getLineId, line -> line));
List<Long> pointId = shopInfoList.stream().filter(x -> Objects.nonNull(x.getPointId())).map(ShopInfoDO::getPointId).collect(Collectors.toList());
Set<String> investmentUserIds = shopInfoList.stream().map(ShopInfoDO::getInvestmentManager).collect(Collectors.toSet());
List<PointInfoDO> pointListByIds = pointInfoDAO.getPointListByIds(pointId);
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<String> developmentManagers = shopInfoList.stream().filter(x -> StringUtil.isNotEmpty(x.getShopManagerUserId())).map(ShopInfoDO::getShopManagerUserId).distinct().collect(Collectors.toList());
Set< String> userIds=new HashSet<>();
userIds.addAll(investmentUserIds);
userIds.addAll(developmentManagers);
Map<String, String> userNameMap = enterpriseUserDAO.getUserNameMap(new ArrayList<>(userIds));
Map<Long, String> regionNameMap = regionService.getBelongWarRegionNameMap(regionIds);
List<PreparationCommonPendingVO> list = new ArrayList<>();
entryPendingList.forEach(x -> {
PreparationCommonPendingVO preparationCommonPendingVO = new PreparationCommonPendingVO();
ShopInfoDO shop = shopInfoMap.get(x.getShopId());
preparationCommonPendingVO.setLineId(shop.getLineId());
preparationCommonPendingVO.setShopId(shop.getId());
ShopInfoDO shopInfoDO = shopInfoMap.getOrDefault(x.getShopId(), new ShopInfoDO());
preparationCommonPendingVO.setStoreType(shopInfoDO.getStoreType());
if (StringUtil.isNotEmpty(shopInfoDO.getDetailAddress())) {
preparationCommonPendingVO.setShopAddress(shopInfoDO.getDetailAddress());
} else {
PointInfoDO pointInfoDO = pointMap.get(shopInfoDO.getPointId());
if (pointInfoDO != null) {
preparationCommonPendingVO.setShopAddress(pointInfoDO.getAddress());
}
}
SignFranchiseDO signFranchiseDO = signTypeMap.get(x.getShopId());
if (signFranchiseDO != null) {
preparationCommonPendingVO.setSignType(signFranchiseDO.getSignType());
preparationCommonPendingVO.setPartnershipSignatorySecond(signFranchiseDO.getPartnershipSignatorySecond());
}
preparationCommonPendingVO.setShopCode(shopInfoDO.getShopCode());
preparationCommonPendingVO.setJoinMode(shopInfoDO.getJoinMode());
preparationCommonPendingVO.setInvestmentManager(userNameMap.getOrDefault(shopInfoDO.getInvestmentManager(),""));
preparationCommonPendingVO.setStoreName(shopInfoDO.getShopName());
PlanLineDTO planLineDTO = lineMap.getOrDefault(shop.getLineId(), new PlanLineDTO());
preparationCommonPendingVO.setPartnerName(planLineDTO.getUsername());
preparationCommonPendingVO.setPartnerPhone(planLineDTO.getMobile());
preparationCommonPendingVO.setShopManagerUserName(userNameMap.getOrDefault(shopInfoDO.getShopManagerUserId(), ""));
preparationCommonPendingVO.setRegionNodeName(regionNameMap.getOrDefault(shopInfoDO.getRegionId(), ""));
preparationCommonPendingVO.setFranchiseBrand(shopInfoDO.getFranchiseBrand());
list.add(preparationCommonPendingVO);
});
result.setList(list);
return result;
}
/**
* 通用查询

View File

@@ -123,6 +123,13 @@ public class DeskController {
return ResponseResult.success(deskService.posListPendingList( deskRequest, userInfo ));
}
@ApiOperation("待处理-pos-进件待办")
@PostMapping("/posEntryListPendingList")
public ResponseResult<PageInfo<PreparationCommonPendingVO>> posEntryListPendingList(@RequestBody DeskRequest deskRequest) {
LoginUserInfo userInfo = CurrentUserHolder.getUser();
return ResponseResult.success(deskService.posEntryListPendingList(deskRequest, userInfo));
}
@ApiOperation("待处理-营帐通")
@PostMapping("/tentPassListPendingList")
public ResponseResult<PageInfo<PreparationCommonPendingVO>> tentPassListPendingList(@RequestBody DeskRequest deskRequest) {