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

@@ -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;
}
/**
* 通用查询