Merge branch 'cc_20250521_fix' into 'master'

Cc 20250521 fix

See merge request hangzhou/java/custom_zxjp!92
This commit is contained in:
苏竹红
2025-05-21 09:47:06 +00:00
10 changed files with 47 additions and 145 deletions

View File

@@ -258,6 +258,7 @@ public enum ErrorCodeEnum {
BANK_EXIST(151007,"当前银行已存在,请直接选择!",null),
EXPORT_LIMIT_5000(151008,"导出数据不能超过5000条请增加筛选条件减少导出数量",null),
REGION_INTERSECTION_IS_NULL(151011,"所选所属大区/分公司,不在所选集团下",null),
CHECK_PAYER_ERROR(151012,"缴费人必须是签约人,请重新填写!",null),
;

View File

@@ -353,7 +353,7 @@
#{code}
</foreach>
</if>
order by update_time desc
</select>

View File

@@ -16,6 +16,8 @@ public class MiniShopsResponse {
private String shopName;
@ApiModelProperty("店铺编码")
private String shopCode;
@ApiModelProperty("云流水编码")
private String ylsCode;
@ApiModelProperty("店铺详细地址")
private String detailAddress;
}

View File

@@ -3,6 +3,7 @@ package com.cool.store.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
import java.util.List;
/**
@@ -45,6 +46,7 @@ public class BaseInfoVO {
@ApiModelProperty("加盟模式")
private Integer joinMode;
public BaseInfoVO(){}
/**
* 写一个构造方法 参数是BaseInfoVO

View File

@@ -20,6 +20,8 @@ public class IntendPendingVO extends BaseInfoVO {
@ApiModelProperty("加盟模式 1-社会加盟模式 2-强加盟模式")
private Integer joinMode;
private Date updateTime;
public IntendPendingVO(){}
public IntendPendingVO(BaseInfoVO baseInfoVO) {

View File

@@ -4,6 +4,8 @@ import com.cool.store.vo.BaseInfoVO;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
* @Author suzhuhong
* @Date 2024/4/1 16:37
@@ -14,7 +16,7 @@ public class PayStagePendingVO extends BaseInfoVO {
@ApiModelProperty("缴费时间 2024年04月23日 16:00")
private String payTime;
private Date updateTime;
public PayStagePendingVO(){};
public PayStagePendingVO(BaseInfoVO baseInfoVO) {

View File

@@ -4,6 +4,8 @@ import com.cool.store.vo.BaseInfoVO;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
* @Author suzhuhong
* @Date 2024/4/1 16:55
@@ -14,6 +16,7 @@ public class SigningPendingVO extends BaseInfoVO {
@ApiModelProperty("提交时间 2024年04月23日 16:00")
private String submitTime;
private Date updateTime;
public SigningPendingVO(){};

View File

@@ -107,6 +107,7 @@ public class DeskServiceImpl implements DeskService {
IntendPendingVO intendPendingVO = new IntendPendingVO(baseInfoVO);
intendPendingVO.setJoinTime(new Date());
intendPendingVO.setJoinMode(x.getJoinMode());
intendPendingVO.setUpdateTime(x.getUpdateTime());
list.add(intendPendingVO);
});
@@ -133,7 +134,7 @@ public class DeskServiceImpl implements DeskService {
if (linePayDO != null && linePayDO.getPayTime() != null) {
payStagePendingVO.setPayTime(DateUtils.parseDateToStr(SPECIAL_DATE_START, linePayDO.getPayTime()));
}
payStagePendingVO.setUpdateTime(x.getUpdateTime());
list.add(payStagePendingVO);
});
@@ -161,6 +162,7 @@ public class DeskServiceImpl implements DeskService {
if (date != null) {
signingPendingVO.setSubmitTime(DateUtils.parseDateToStr(SPECIAL_DATE_START, date));
}
signingPendingVO.setUpdateTime(x.getUpdateTime());
list.add(signingPendingVO);
});
page.setList(list);
@@ -197,6 +199,7 @@ public class DeskServiceImpl implements DeskService {
baseInfoVO.setUserPortraitList(labelBaseInfoList);
baseInfoVO.setJoinMode(lineInfoDO.getJoinMode());
baseInfoVO.setWantShopAreaName(wantShopAreaMap.get(lineInfoDO.getWantShopAreaId()));
return baseInfoVO;
}
@@ -252,16 +255,6 @@ public class DeskServiceImpl implements DeskService {
subStageStatusList, Boolean.TRUE);
}
}
List<PreparationCommonPendingVO> list = pageInfo.getList();
if (CollectionUtils.isEmpty(list)) {
return pageInfo;
}
List<Long> shopIds = list.stream().map(PreparationCommonPendingVO::getShopId).collect(Collectors.toList());
Map<Long, LinePayDO> shopPayDoMap = linePayDAO.getLinePayByShopIds(shopIds, PayBusinessTypeEnum.FRANCHISE_FEE.getCode());
for (PreparationCommonPendingVO vo : list) {
vo.setSubmitTime(DateUtils.parseDateToStr(SPECIAL_DATE_START, shopPayDoMap.getOrDefault(vo.getShopId(), new LinePayDO()).getCreateTime()));
}
pageInfo.setList(list);
return pageInfo;
}
@@ -269,19 +262,6 @@ public class DeskServiceImpl implements DeskService {
public PageInfo<PreparationCommonPendingVO> signingOfFranchiseContractPendingList(Integer pageNum, Integer pageSize, LoginUserInfo user) {
PageInfo<PreparationCommonPendingVO> pageInfo = commonPendingVOPageInfo(pageNum, pageSize, user, ShopSubStageEnum.SHOP_STAGE_8,
Arrays.asList(SHOP_SUB_STAGE_STATUS_80.getShopSubStageStatus(), SHOP_SUB_STAGE_STATUS_85.getShopSubStageStatus(), SHOP_SUB_STAGE_STATUS_83.getShopSubStageStatus()), Boolean.TRUE);
List<PreparationCommonPendingVO> list = pageInfo.getList();
if (CollectionUtils.isEmpty(list)) {
return pageInfo;
}
List<Long> shopIds = list.stream().map(PreparationCommonPendingVO::getShopId).collect(Collectors.toList());
Map<Long, List<DeskStageDTO>> deskStageMap = new HashMap<>();
List<ShopStageInfoDO> subStageList = shopStageInfoDAO.getSubStages(shopIds, ShopSubStageEnum.SHOP_STAGE_7.getShopSubStage());
doThing(deskStageMap, subStageList);
for (PreparationCommonPendingVO vo : list) {
vo.setSubmitTime(deskStageMap.get(vo.getShopId()).get(0).getActualCompleteTime());
}
pageInfo.setList(list);
return pageInfo;
}
@@ -306,91 +286,32 @@ public class DeskServiceImpl implements DeskService {
@Override
public PageInfo<PreparationCommonPendingVO> xinFaListPendingList(Integer pageNum, Integer pageSize, LoginUserInfo user) {
PageInfo<PreparationCommonPendingVO> pageInfo = commonPendingVOPageInfo(pageNum, pageSize, null, ShopSubStageEnum.SHOP_STAGE_23,
return commonPendingVOPageInfo(pageNum, pageSize, null, ShopSubStageEnum.SHOP_STAGE_23,
Collections.singletonList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_230.getShopSubStageStatus()), Boolean.FALSE);
List<PreparationCommonPendingVO> list = pageInfo.getList();
if (CollectionUtils.isEmpty(list)) {
return pageInfo;
}
List<Long> shopIds = list.stream().map(PreparationCommonPendingVO::getShopId).collect(Collectors.toList());
Map<Long, List<DeskStageDTO>> deskStageMap = new HashMap<>();
List<ShopStageInfoDO> subStageList = shopStageInfoDAO.getSubStages(shopIds, ShopSubStageEnum.SHOP_STAGE_15.getShopSubStage());
doThing(deskStageMap, subStageList);
for (PreparationCommonPendingVO vo : list) {
if (deskStageMap.get(vo.getShopId()) != null) {
vo.setSubmitTime(deskStageMap.get(vo.getShopId()).get(0).getActualCompleteTime());
}
}
pageInfo.setList(list);
return pageInfo;
}
@Override
public PageInfo<PreparationCommonPendingVO> posListPendingList(Integer pageNum, Integer pageSize, LoginUserInfo user) {
PageInfo<PreparationCommonPendingVO> pageInfo = commonPendingVOPageInfo(pageNum, pageSize, null, ShopSubStageEnum.SHOP_STAGE_16,
return commonPendingVOPageInfo(pageNum, pageSize, null, ShopSubStageEnum.SHOP_STAGE_16,
Collections.singletonList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_160.getShopSubStageStatus()), Boolean.FALSE);
List<PreparationCommonPendingVO> list = pageInfo.getList();
if (CollectionUtils.isEmpty(list)) {
return pageInfo;
}
List<Long> shopIds = list.stream().map(PreparationCommonPendingVO::getShopId).collect(Collectors.toList());
Map<Long, List<DeskStageDTO>> deskStageMap = new HashMap<>();
List<ShopStageInfoDO> subStageList = shopStageInfoDAO.getSubStages(shopIds, ShopSubStageEnum.SHOP_STAGE_15.getShopSubStage());
doThing(deskStageMap, subStageList);
for (PreparationCommonPendingVO vo : list) {
if (deskStageMap.get(vo.getShopId()) != null) {
vo.setSubmitTime(deskStageMap.get(vo.getShopId()).get(0).getActualCompleteTime());
}
}
pageInfo.setList(list);
return pageInfo;
}
@Override
public PageInfo<PreparationCommonPendingVO> tentPassListPendingList(Integer pageNum, Integer pageSize, LoginUserInfo user) {
PageInfo<PreparationCommonPendingVO> pageInfo = commonPendingVOPageInfo(pageNum, pageSize, null, ShopSubStageEnum.SHOP_STAGE_24,
return commonPendingVOPageInfo(pageNum, pageSize, null, ShopSubStageEnum.SHOP_STAGE_24,
Collections.singletonList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_240.getShopSubStageStatus()), Boolean.FALSE);
List<PreparationCommonPendingVO> list = pageInfo.getList();
if (CollectionUtils.isEmpty(list)) {
return pageInfo;
}
List<Long> shopIds = list.stream().map(PreparationCommonPendingVO::getShopId).collect(Collectors.toList());
Map<Long, List<DeskStageDTO>> deskStageMap = new HashMap<>();
List<ShopStageInfoDO> subStageList = shopStageInfoDAO.getSubStages(shopIds, ShopSubStageEnum.SHOP_STAGE_15.getShopSubStage());
doThing(deskStageMap, subStageList);
for (PreparationCommonPendingVO vo : list) {
if (deskStageMap.get(vo.getShopId()) != null) {
vo.setSubmitTime(deskStageMap.get(vo.getShopId()).get(0).getActualCompleteTime());
}
}
pageInfo.setList(list);
return pageInfo;
}
@Override
public PageInfo<PreparationCommonPendingVO> orderSysPendingList(Integer pageNum, Integer pageSize, LoginUserInfo user) {
PageInfo<PreparationCommonPendingVO> pageInfo = commonPendingVOPageInfo(pageNum, pageSize, null, ShopSubStageEnum.SHOP_STAGE_17,
return commonPendingVOPageInfo(pageNum, pageSize, null, ShopSubStageEnum.SHOP_STAGE_17,
Collections.singletonList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_170.getShopSubStageStatus()), Boolean.FALSE);
List<PreparationCommonPendingVO> list = pageInfo.getList();
if (CollectionUtils.isEmpty(list)) {
return pageInfo;
}
List<Long> shopIds = list.stream().map(PreparationCommonPendingVO::getShopId).collect(Collectors.toList());
Map<Long, List<DeskStageDTO>> deskStageMap = new HashMap<>();
List<ShopStageInfoDO> subStageList = shopStageInfoDAO.getSubStages(shopIds, ShopSubStageEnum.SHOP_STAGE_15.getShopSubStage());
doThing(deskStageMap, subStageList);
for (PreparationCommonPendingVO vo : list) {
if (deskStageMap.get(vo.getShopId()) != null) {
vo.setSubmitTime(deskStageMap.get(vo.getShopId()).get(0).getActualCompleteTime());
}
}
pageInfo.setList(list);
return pageInfo;
}
@Override
@@ -467,67 +388,17 @@ public class DeskServiceImpl implements DeskService {
@Override
public PageInfo<PreparationCommonPendingVO> constructionPendingList(Integer pageNum, Integer pageSize, LoginUserInfo user) {
PageInfo<PreparationCommonPendingVO> pageInfo = commonPendingVOPageInfo(pageNum, pageSize, user, ShopSubStageEnum.SHOP_STAGE_11,
return commonPendingVOPageInfo(pageNum, pageSize, user, ShopSubStageEnum.SHOP_STAGE_11,
Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_110.getShopSubStageStatus(),
ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_111.getShopSubStageStatus()), Boolean.TRUE);
List<PreparationCommonPendingVO> list = pageInfo.getList();
if (CollectionUtils.isEmpty(list)) {
return pageInfo;
}
List<Long> shopIds = list.stream().filter(o -> Objects.equals(o.getSubStageStatus(), SHOP_SUB_STAGE_STATUS_111.getShopSubStageStatus())).map(PreparationCommonPendingVO::getShopId).collect(Collectors.toList());
Map<Long, List<DeskStageDTO>> deskStageMap = new HashMap<>();
List<Long> shopIds1 = list.stream().filter(o -> Objects.equals(o.getSubStageStatus(), SHOP_SUB_STAGE_STATUS_110.getShopSubStageStatus())).map(PreparationCommonPendingVO::getShopId).collect(Collectors.toList());
List<ShopStageInfoDO> subStageList = shopStageInfoDAO.getSubStages(shopIds1, ShopSubStageEnum.SHOP_STAGE_9.getShopSubStage());
doThing(deskStageMap, subStageList);
//施工待提交阶段提交的表单用作施工中的提交时间
Map<Long, Date> constructionMap = new HashMap<>();
List<DecorationDesignInfoDO> byIds = decorationDesignInfoDAO.getByIds(shopIds);
if (byIds != null) {
constructionMap = byIds.stream().collect(Collectors.toMap(DecorationDesignInfoDO::getShopId, DecorationDesignInfoDO::getConstructionCreateTime));
}
for (PreparationCommonPendingVO vo : list) {
if (vo.getSubStageStatus().equals(SHOP_SUB_STAGE_STATUS_110.getShopSubStageStatus()) && deskStageMap.get(vo.getShopId()) != null) {
if (deskStageMap.get(vo.getShopId()) != null) {
vo.setSubmitTime(deskStageMap.get(vo.getShopId()).get(0).getActualCompleteTime());
}
} else if (vo.getSubStageStatus().equals(SHOP_SUB_STAGE_STATUS_111.getShopSubStageStatus())) {
vo.setSubmitTime(DateUtils.parseDateToStr(SPECIAL_DATE_START, constructionMap.get(vo.getShopId())));
}
}
pageInfo.setList(list);
return pageInfo;
}
@Override
public PageInfo<PreparationCommonPendingVO> fitmentPendingList(Integer pageNum, Integer pageSize, LoginUserInfo user) {
PageInfo<PreparationCommonPendingVO> pageInfo = commonPendingVOPageInfo(pageNum, pageSize, user, ShopSubStageEnum.SHOP_STAGE_12,
return commonPendingVOPageInfo(pageNum, pageSize, user, ShopSubStageEnum.SHOP_STAGE_12,
Collections.singletonList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_122.getShopSubStageStatus()), Boolean.FALSE);
List<PreparationCommonPendingVO> list = pageInfo.getList();
if (CollectionUtils.isEmpty(list)) {
return pageInfo;
}
List<Long> shopIds = list.stream().map(PreparationCommonPendingVO::getShopId).collect(Collectors.toList());
Map<Long, List<DeskStageDTO>> deskStageMap = new HashMap<>();
List<AcceptanceInfoDO> acceptanceInfoDOList = acceptanceInfoDAO.selectByShopIds(shopIds);
for (AcceptanceInfoDO acceptanceInfoDO : acceptanceInfoDOList) {
DeskStageDTO dto = new DeskStageDTO();
dto.setActualCompleteTime(DateUtils.parseDateToStr(DateUtils.SPECIAL_DATE_START, acceptanceInfoDO.getCreateTime()));
dto.setShopSubStageStatus(SHOP_SUB_STAGE_STATUS_122.getShopSubStageStatus());
deskStageMap.put(acceptanceInfoDO.getShopId(), Collections.singletonList(dto));
}
for (PreparationCommonPendingVO vo : list) {
for (DeskStageDTO deskStageDTO : deskStageMap.get(vo.getShopId())) {
if (vo.getSubStageStatus().equals(deskStageDTO.getShopSubStageStatus())) {
vo.setSubmitTime(deskStageDTO.getActualCompleteTime());
break;
}
}
}
pageInfo.setList(list);
return pageInfo;
}
@Override
@@ -637,7 +508,6 @@ public class DeskServiceImpl implements DeskService {
preparationCommonPendingVO.setPartnerPhone(lineInfoDO.getMobile());
preparationCommonPendingVO.setRegionNodeName(regionNameMap.getOrDefault(preparationCommonPendingVO.getRegionId(), ""));
preparationCommonPendingVO.setInvestmentManager(userNameMap.getOrDefault(preparationCommonPendingVO.getInvestmentManager(), ""));
preparationCommonPendingVO.setSubmitTime(DateUtils.parseDateToStr(SPECIAL_DATE_START, preparationCommonPendingVO.getUpdateTime()));
}
return new PageInfo<>(list);
}
@@ -733,6 +603,7 @@ public class DeskServiceImpl implements DeskService {
preparationCommonPendingVO.setPartnerPhone(planLineDTO.getMobile());
preparationCommonPendingVO.setShopManagerUserName(userNameMap.getOrDefault(shopInfoDO.getShopManagerUserId(), ""));
preparationCommonPendingVO.setRegionNodeName(regionNameMap.getOrDefault(shopInfoDO.getRegionId(), ""));
preparationCommonPendingVO.setUpdateTime(x.getUpdateTime());
list.add(preparationCommonPendingVO);
});
result.setList(list);
@@ -803,6 +674,7 @@ public class DeskServiceImpl implements DeskService {
preparationCommonPendingVO.setSubStage(x.getShopSubStage());
preparationCommonPendingVO.setSubStageStatus(x.getShopSubStageStatus());
preparationCommonPendingVO.setSubmitTime(DateUtils.parseDateToStr(SPECIAL_DATE_START, x.getCreateTime()));
preparationCommonPendingVO.setUpdateTime(x.getUpdateTime());
preparationCommonPendingVO.setStoreName(shopInfoDO.getShopName());
PlanLineDTO planLineDTO = lineMap.getOrDefault(shopInfoDO.getLineId(), new PlanLineDTO());
preparationCommonPendingVO.setPartnerName(planLineDTO.getUsername());

View File

@@ -143,6 +143,10 @@ public class LinePayServiceImpl implements LinePayService {
if (request.getLineId() != null) {
lineInfo = lineInfoDAO.getLineInfo(request.getLineId());
}
//缴纳加盟费检验缴费人必须是签约人
if(PayBusinessTypeEnum.FRANCHISE_FEE.getCode().equals(request.getPayBusinessType()) && !lineInfo.getUsername().trim().equals(request.getPayUserName().trim())){
throw new ServiceException(ErrorCodeEnum.CHECK_PAYER_ERROR);
}
LinePayDO linePayDO = linePayDAO.getByLineIdAndPayTypeAndShopId(request.getLineId(), request.getPayBusinessType(), request.getShopId());
linePayDO = checkAndFill(linePayDO, request, partnerUser);
Long payId = linePayDO.getId();

View File

@@ -589,7 +589,21 @@ public class ShopServiceImpl implements ShopService {
@Override
public List<MiniShopsResponse> getShopListSuccessOpen(Long lineId) {
return shopInfoDAO.getShopListSuccessOpen(eid, lineId);
LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(lineId);
List<StoreDO> storeDOS = storeDao.listByMobile(lineInfoDO.getMobile());
if (CollectionUtils.isEmpty(storeDOS)){
return new ArrayList<>();
}
List<MiniShopsResponse> responses = new ArrayList<>();
for (StoreDO storeDO : storeDOS){
MiniShopsResponse response = new MiniShopsResponse();
response.setShopName(storeDO.getStoreName());
response.setShopCode(storeDO.getStoreNum());
response.setYlsCode("ZXA8_"+storeDO.getStoreNum());
response.setDetailAddress(storeDO.getStoreAddress());
responses.add(response);
}
return responses;
}
@Override
@@ -841,7 +855,7 @@ public class ShopServiceImpl implements ShopService {
/**
* 获取招商经理信息
* @param lineInfo
* @param
* @return
*/
private List<UserDTO> getUserFromInvestmentManager(String userId) {