Merge branch 'master' into cc_20250211_v2.6

# Conflicts:
#	coolstore-partner-model/src/main/java/com/cool/store/dto/FranchiseFeeDTO.java
#	coolstore-partner-service/src/main/java/com/cool/store/service/impl/ExportRealizeServiceImpl.java
This commit is contained in:
shuo.wang
2025-02-26 16:33:58 +08:00
6 changed files with 106 additions and 66 deletions

View File

@@ -391,7 +391,8 @@
</select>
<select id="selectInvestmentByList" resultType="com.cool.store.entity.ShopInfoDO">
select line_id as LineId,
investment_manager as InvestmentManager
investment_manager as investmentManager,
development_manager as developmentManager
from xfsg_shop_info
where line_id in
<foreach collection="list" item="item" index="index" open="(" separator="," close=")">

View File

@@ -54,7 +54,7 @@ public class ExportBranchShopDTO {
@ColumnWidth(30)
private String firstYearStartTime;
@ExcelProperty(value = "第一年加盟结束时间",order = 10)
@ExcelProperty(value = "第一年管理费到期时间",order = 10)
@ColumnWidth(30)
private String firstYearEndTime;

View File

@@ -224,33 +224,32 @@ public class DeskServiceImpl implements DeskService {
}
@Override
public PageInfo<PreparationCommonPendingVO> payFranchiseFeesPendingList(Integer pageNum, Integer pageSize, LoginUserInfo user) {
List<Long> userRoleIds = enterpriseUserRoleMapper.getUserRoleIds(user.getUserId());
PageInfo<PreparationCommonPendingVO> pageInfo = new PageInfo<>();
if (CollectionUtils.isNotEmpty(userRoleIds)
&& (userRoleIds.contains(UserRoleEnum.SUPERVISION.getCode())
||userRoleIds.contains(UserRoleEnum.INVESTMENT_COMMISSIONER.getCode())
||userRoleIds.contains(UserRoleEnum.STRONG_INVESTMENT_COMMISSIONER.getCode()))){
pageInfo = commonPendingVOPageInfo(pageNum, pageSize, user, ShopSubStageEnum.SHOP_STAGE_7,
Collections.singletonList(SHOP_SUB_STAGE_STATUS_70.getShopSubStageStatus()), Boolean.FALSE);
List<Integer> subStageStatusList = new ArrayList<>();
if (CollectionUtils.isNotEmpty(userRoleIds)) {
if (userRoleIds.contains(UserRoleEnum.JOIN_OFFICE.getCode()) || userRoleIds.contains(UserRoleEnum.REGION_OFFICE.getCode())) {
subStageStatusList.add(SHOP_SUB_STAGE_STATUS_70.getShopSubStageStatus());
}
if (userRoleIds.contains(UserRoleEnum.BRANCH_OFFICE.getCode()) || userRoleIds.contains(UserRoleEnum.REGION_OFFICE.getCode())) {
subStageStatusList.add(SHOP_SUB_STAGE_STATUS_72.getShopSubStageStatus());
}
if (!subStageStatusList.isEmpty()) {
pageInfo = commonPendingVOPageInfo(pageNum, pageSize, user, ShopSubStageEnum.SHOP_STAGE_7,
subStageStatusList, Boolean.TRUE);
}
}
if (CollectionUtils.isNotEmpty(userRoleIds)&& userRoleIds.contains(UserRoleEnum.BRANCH_OFFICE.getCode())){
pageInfo = commonPendingVOPageInfo(pageNum, pageSize, user, ShopSubStageEnum.SHOP_STAGE_7,
Collections.singletonList(SHOP_SUB_STAGE_STATUS_72.getShopSubStageStatus()), Boolean.TRUE);
}
List<PreparationCommonPendingVO> list = pageInfo.getList();
if (CollectionUtils.isEmpty(list)){
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(DateUtils.SPECIAL_DATE_START, shopPayDoMap.getOrDefault(vo.getShopId(), new LinePayDO()).getCreateTime()));
}
Map<Long, LinePayDO> shopPayDoMap = linePayDAO.getLinePayByShopIds(shopIds, PayBusinessTypeEnum.FRANCHISE_FEE.getCode());
for (PreparationCommonPendingVO vo : list) {
vo.setSubmitTime(DateUtils.parseDateToStr(DateUtils.SPECIAL_DATE_START, shopPayDoMap.getOrDefault(vo.getShopId(), new LinePayDO()).getCreateTime()));
}
pageInfo.setList(list);
return pageInfo;
}
@@ -261,14 +260,14 @@ public class DeskServiceImpl implements DeskService {
Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_80.getShopSubStageStatus(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_85.getShopSubStageStatus()), Boolean.TRUE);
List<PreparationCommonPendingVO> list = pageInfo.getList();
if (CollectionUtils.isEmpty(list)){
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){
for (PreparationCommonPendingVO vo : list) {
vo.setSubmitTime(deskStageMap.get(vo.getShopId()).get(0).getActualCompleteTime());
}
pageInfo.setList(list);
@@ -299,14 +298,14 @@ public class DeskServiceImpl implements DeskService {
PageInfo<PreparationCommonPendingVO> pageInfo = 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)){
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_8.getShopSubStage());
doThing(deskStageMap, subStageList);
for (PreparationCommonPendingVO vo :list){
for (PreparationCommonPendingVO vo : list) {
vo.setSubmitTime(deskStageMap.get(vo.getShopId()).get(0).getActualCompleteTime());
}
pageInfo.setList(list);
@@ -320,14 +319,14 @@ public class DeskServiceImpl implements DeskService {
PageInfo<PreparationCommonPendingVO> pageInfo = 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)){
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_8.getShopSubStage());
doThing(deskStageMap, subStageList);
for (PreparationCommonPendingVO vo :list){
for (PreparationCommonPendingVO vo : list) {
vo.setSubmitTime(deskStageMap.get(vo.getShopId()).get(0).getActualCompleteTime());
}
pageInfo.setList(list);
@@ -341,14 +340,14 @@ public class DeskServiceImpl implements DeskService {
PageInfo<PreparationCommonPendingVO> pageInfo = 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)){
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_8.getShopSubStage());
doThing(deskStageMap, subStageList);
for (PreparationCommonPendingVO vo :list){
for (PreparationCommonPendingVO vo : list) {
vo.setSubmitTime(deskStageMap.get(vo.getShopId()).get(0).getActualCompleteTime());
}
pageInfo.setList(list);
@@ -361,14 +360,14 @@ public class DeskServiceImpl implements DeskService {
PageInfo<PreparationCommonPendingVO> pageInfo = 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)){
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_8.getShopSubStage());
doThing(deskStageMap, subStageList);
for (PreparationCommonPendingVO vo :list){
for (PreparationCommonPendingVO vo : list) {
vo.setSubmitTime(deskStageMap.get(vo.getShopId()).get(0).getActualCompleteTime());
}
pageInfo.setList(list);
@@ -380,14 +379,14 @@ public class DeskServiceImpl implements DeskService {
PageInfo<PreparationCommonPendingVO> pageInfo = commonPendingVOPageInfo(pageNum, pageSize, user, ShopSubStageEnum.SHOP_STAGE_9,
Arrays.asList(SHOP_SUB_STAGE_STATUS_90.getShopSubStageStatus()), Boolean.TRUE);
List<PreparationCommonPendingVO> list = pageInfo.getList();
if (CollectionUtils.isEmpty(list)){
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_8.getShopSubStage());
doThing(deskStageMap, subStageList);
for (PreparationCommonPendingVO vo :list){
for (PreparationCommonPendingVO vo : list) {
vo.setSubmitTime(deskStageMap.get(vo.getShopId()).get(0).getActualCompleteTime());
}
pageInfo.setList(list);
@@ -396,11 +395,11 @@ 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,
PageInfo<PreparationCommonPendingVO> pageInfo = 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)){
if (CollectionUtils.isEmpty(list)) {
return pageInfo;
}
List<Long> shopIds = list.stream().map(PreparationCommonPendingVO::getShopId).collect(Collectors.toList());
@@ -424,7 +423,7 @@ public class DeskServiceImpl implements DeskService {
deskStageMap.put(decorationDesignInfoDO.getShopId(), deskStages);
}
}
for (PreparationCommonPendingVO vo :list){
for (PreparationCommonPendingVO vo : list) {
for (DeskStageDTO deskStageDTO : deskStageMap.get(vo.getShopId())) {
if (vo.getSubStageStatus().equals(deskStageDTO.getShopSubStageStatus())) {
vo.setSubmitTime(deskStageDTO.getActualCompleteTime());
@@ -439,10 +438,10 @@ public class DeskServiceImpl implements DeskService {
@Override
public PageInfo<PreparationCommonPendingVO> fitmentPendingList(Integer pageNum, Integer pageSize, LoginUserInfo user) {
PageInfo<PreparationCommonPendingVO> pageInfo = commonPendingVOPageInfo(pageNum, pageSize, user, ShopSubStageEnum.SHOP_STAGE_12,
PageInfo<PreparationCommonPendingVO> pageInfo = 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)){
if (CollectionUtils.isEmpty(list)) {
return pageInfo;
}
List<Long> shopIds = list.stream().map(PreparationCommonPendingVO::getShopId).collect(Collectors.toList());
@@ -454,7 +453,7 @@ public class DeskServiceImpl implements DeskService {
dto.setShopSubStageStatus(SHOP_SUB_STAGE_STATUS_122.getShopSubStageStatus());
deskStageMap.put(acceptanceInfoDO.getShopId(), Collections.singletonList(dto));
}
for (PreparationCommonPendingVO vo :list){
for (PreparationCommonPendingVO vo : list) {
for (DeskStageDTO deskStageDTO : deskStageMap.get(vo.getShopId())) {
if (vo.getSubStageStatus().equals(deskStageDTO.getShopSubStageStatus())) {
vo.setSubmitTime(deskStageDTO.getActualCompleteTime());

View File

@@ -28,6 +28,8 @@ import com.cool.store.utils.poi.StringUtils;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import io.swagger.annotations.ApiModelProperty;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
@@ -138,7 +140,9 @@ public class ExportRealizeServiceImpl implements ExportRealizeService {
dto.setFirstYearStartTime(DateUtils.parseDateToStr(SPECIAL_DATE_START_1, franchiseFeeDTO.getFirstYearStartTime()));
dto.setFirstYearEndTime(DateUtils.parseDateToStr(SPECIAL_DATE_START_1, franchiseFeeDTO.getFirstYearEndTime()));
String total = (new BigInteger(franchiseFeeDTO.getPerformanceBond()).add(new BigInteger(franchiseFeeDTO.getFirstYearFee()))
.add(new BigInteger(franchiseFeeDTO.getYearFranchiseFee())).add(new BigInteger(franchiseFeeDTO.getLoanMargin())).toString());
.add(new BigInteger(franchiseFeeDTO.getFirstYearManagementFee()))
.add(new BigInteger(franchiseFeeDTO.getYearFranchiseFee()))
.add(new BigInteger(franchiseFeeDTO.getLoanMargin())).toString());
dto.setTotalAmountContributions(total);
dto.setFranchiseFeeBill(franchiseFeeDTO.getYearFranchiseFee());
dto.setLoanMargin(franchiseFeeDTO.getLoanMargin());

View File

@@ -102,16 +102,30 @@ public class LineServiceImpl implements LineService {
}
List<ShopInfoDO> shopInfoDOS = shopInfoDAO.selectInvestmentByLines(Collections.singletonList(lineInfo.getId()));
Set<String> userIds = shopInfoDOS.stream().map(ShopInfoDO::getInvestmentManager).collect(Collectors.toSet());
Set<String> developmentMserIds = shopInfoDOS.stream().map(ShopInfoDO::getDevelopmentManager).collect(Collectors.toSet());
userIds.add(lineInfo.getInvestmentManager());
Set<String> userIds = new HashSet<>();
//门店的招生和选址人远
Set<String> shopInvestmentMserIds = shopInfoDOS.stream().map(ShopInfoDO::getInvestmentManager).filter(StringUtils::isNotBlank).collect(Collectors.toSet());
Set<String> developmentMserIds = shopInfoDOS.stream().map(ShopInfoDO::getDevelopmentManager).filter(StringUtils::isNotBlank).collect(Collectors.toSet());
//把线索的招商,选址专员放一起
shopInvestmentMserIds.add(lineInfo.getInvestmentManager());
if (StringUtils.isNotBlank(lineInfo.getDevelopmentManager())){
developmentMserIds.add(lineInfo.getDevelopmentManager());
}
userIds.addAll(shopInvestmentMserIds);
userIds.addAll(developmentMserIds);
Map<String, String> userNameMap = enterpriseUserDAO.getUserNameMap(new ArrayList<>(userIds));
StringBuilder investmentManagerName = new StringBuilder();
for (String userId : userIds) {
investmentManagerName.append(userNameMap.get(userId)).append(",");
for (String userId : shopInvestmentMserIds) {
if (StringUtils.isBlank(userId)){
continue;
}
if (investmentManagerName.length() == 0) {
investmentManagerName.append(userNameMap.get(userId));
} else {
investmentManagerName.append(",").append(userNameMap.get(userId));
}
}
result.setInvestmentManagerName(investmentManagerName.substring(0, investmentManagerName.length() - 1));
result.setInvestmentManagerName(investmentManagerName.toString());
// if (StringUtil.isNotEmpty(lineInfo.getInvestmentManager())){
// EnterpriseUserDO user = enterpriseUserDAO.getUserInfoById(lineInfo.getInvestmentManager());
// result.setInvestmentManagerName(user.getName());
@@ -144,9 +158,16 @@ public class LineServiceImpl implements LineService {
BeanUtil.copyProperties(lineInfo, result);
StringBuilder developmentManagerName = new StringBuilder();
for (String userId : developmentMserIds) {
developmentManagerName.append(userNameMap.get(userId)).append(",");
if (StringUtils.isBlank(userId)){
continue;
}
if (developmentManagerName.length() == 0) {
developmentManagerName.append(userNameMap.get(userId));
} else {
developmentManagerName.append(",").append(userNameMap.get(userId));
}
}
result.setDevelopmentManager(investmentManagerName.substring(0, investmentManagerName.length() - 1));
result.setDevelopmentManager(developmentManagerName.toString());
return result;
}
@@ -270,8 +291,8 @@ public class LineServiceImpl implements LineService {
Map<Long, Set<String>> investmentManagerIdMapByLineId = shopInfoDOS.stream().collect(Collectors.groupingBy(ShopInfoDO::getLineId, Collectors.mapping(ShopInfoDO::getInvestmentManager, Collectors.toSet())));
Map<Long, Set<String>> developmentManagerMap = shopInfoDOS.stream().collect(Collectors.groupingBy(ShopInfoDO::getLineId, Collectors.mapping(ShopInfoDO::getDevelopmentManager, Collectors.toSet())));
Set<String> investmentManagerIds = shopInfoDOS.stream().map(ShopInfoDO::getInvestmentManager).collect(Collectors.toSet());
Set<String> developmentManagerIds = shopInfoDOS.stream().map(ShopInfoDO::getInvestmentManager).collect(Collectors.toSet());
Set<String> investmentManagerIds = shopInfoDOS.stream().filter(x -> StringUtils.isNotBlank(x.getInvestmentManager())).map(ShopInfoDO::getInvestmentManager).collect(Collectors.toSet());
Set<String> developmentManagerIds = shopInfoDOS.stream().filter(x -> StringUtils.isNotBlank(x.getDevelopmentManager())).map(ShopInfoDO::getDevelopmentManager).collect(Collectors.toSet());
Map<Long, HyPartnerLabelDO> userPortraitMap = deskService.getUserPortraitMap(lineInfoDOS);
List<Long> wantShopAreaIdList = lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getWantShopAreaId() != null).map(LineInfoDO::getWantShopAreaId).collect(Collectors.toList());
Map<Long, String> wantShopAreaMap = hyOpenAreaInfoDAO.selectNameMapByIds(wantShopAreaIdList);
@@ -305,22 +326,35 @@ public class LineServiceImpl implements LineService {
Set<String> userIdSet = investmentManagerIdMapByLineId.getOrDefault(x.getId(), new HashSet<>());
userIdSet.add(x.getInvestmentManager());
for (String s : userIdSet) {
investmentManagerUserName.append(userNameMap.get(s)).append(",");
if (investmentManagerUserName.length() == 0) {
investmentManagerUserName.append(userNameMap.get(s));
} else {
investmentManagerUserName.append(",").append(userNameMap.get(s));
}
}
StringBuilder developmentManagerUserName = new StringBuilder();
Set<String> developmentManagerIdsSet = developmentManagerMap.getOrDefault(x.getId(), new HashSet<>());
developmentManagerIdsSet.add(x.getDevelopmentManager());
if (StringUtils.isNotBlank(x.getDevelopmentManager())) {
developmentManagerIdsSet.add(x.getDevelopmentManager());
}
for (String s : developmentManagerIdsSet) {
developmentManagerUserName.append(userNameMap.get(s)).append(",");
if (StringUtils.isBlank(s)) {
continue;
}
if (developmentManagerUserName.length() == 0) {
developmentManagerUserName.append(userNameMap.get(s));
} else {
developmentManagerUserName.append(",").append(userNameMap.get(s));
}
}
partnerListVO.setUpdateTime(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, x.getUpdateTime()));
partnerListVO.setLineSourceName(channelMapByIds.get(x.getLineSource()));
partnerListVO.setJoinStatus(x.getJoinStatus());
partnerListVO.setJoinMode(x.getJoinMode());
partnerListVO.setPartnerNum(x.getPartnerNum());
partnerListVO.setInvestmentManagerUserName(investmentManagerUserName.substring(0, investmentManagerUserName.length() - 1));
partnerListVO.setInvestmentManagerUserName(investmentManagerUserName.toString());
partnerListVO.setUpdateUserName(userNameMap.get(x.getUpdateUserId()));
partnerListVO.setDevelopmentManagerUserName(developmentManagerUserName.substring(0, developmentManagerUserName.length() - 1));
partnerListVO.setDevelopmentManagerUserName(developmentManagerUserName.toString());
partnerListVO.setWantShopNum(x.getWantShopNum());
result.add(partnerListVO);
});

View File

@@ -246,6 +246,7 @@ public class PointServiceImpl implements PointService {
@Override
@Transactional(rollbackFor = Exception.class)
public Integer submitAudit(SubmitPointAuditRequest request) {
Long pointId = request.getPointId();
PointInfoDO pointInfo = pointInfoDAO.getPointInfoById(pointId);
if(Objects.isNull(pointInfo)){
@@ -257,6 +258,15 @@ public class PointServiceImpl implements PointService {
log.error("铺位详细信息不存在");
throw new ServiceException(ErrorCodeEnum.POINT_NOT_EXIST);
}
//处理子任务审核记录表
AuditSettingVO auditSetting = getAuditSetting();
if(Objects.isNull(auditSetting)){
throw new ServiceException(ErrorCodeEnum.POINT_AUDIT_NOT_SETTING);
}
List<AuditNodeDTO> auditNode = dealAuditNode(auditSetting, pointInfo.getRegionId(), pointInfo.getDevelopmentManager());
if(auditNode.size()==CommonConstants.ONE){
throw new ServiceException(ErrorCodeEnum.CONFIRM_THE_APPROVER);
}
int submitAuditCount = pointInfo.getSubmitAuditCount() + 1;
PointInfoDO updatePoint = new PointInfoDO();
updatePoint.setId(pointId);
@@ -267,15 +277,6 @@ public class PointServiceImpl implements PointService {
updatePointDetail.setDevelopmentManagerSign(request.getDevelopmentManagerSign());
updatePointDetail.setDevelopmentManagerSignTime(new Date());
pointDetailInfoDAO.updatePointDetailInfo(updatePointDetail);
//处理子任务审核记录表
AuditSettingVO auditSetting = getAuditSetting();
if(Objects.isNull(auditSetting)){
throw new ServiceException(ErrorCodeEnum.POINT_AUDIT_NOT_SETTING);
}
List<AuditNodeDTO> auditNode = dealAuditNode(auditSetting, pointInfo.getRegionId(), pointInfo.getDevelopmentManager());
if(auditNode.size()==CommonConstants.ONE){
throw new ServiceException(ErrorCodeEnum.CONFIRM_THE_APPROVER);
}
//获取审批节点上的数据
List<PointAuditRecordDO> recordList = AuditNodeDTO.convertDO(pointId, submitAuditCount, auditNode);
pointAuditRecordDAO.addPointAuditRecord(recordList);
@@ -950,9 +951,10 @@ public class PointServiceImpl implements PointService {
throw new ServiceException(ErrorCodeEnum.SHOP_STAGE_NOT_OPERATE);
}
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(shopInfo.getLineId());
if(!request.getOperateUserId().equals(lineInfo.getDevelopmentManager())){
throw new ServiceException(ErrorCodeEnum.NO_PERMISSION);
}
//正新放开限制
// if(!request.getOperateUserId().equals(lineInfo.getDevelopmentManager())){
// throw new ServiceException(ErrorCodeEnum.NO_PERMISSION);
// }
Long auditId = shopAuditInfoDAO.addAuditInfo(AuditRentContractRequest.convert(request, AuditTypeEnum.UPLOAD_RENT_CONTRACT));
ShopSubStageStatusEnum subStageStatus = AuditResultTypeEnum.PASS.getCode().equals(request.getResultType()) ? ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_23 : ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_22;