fix 门店状态已完成

This commit is contained in:
shuo.wang
2025-02-13 19:47:20 +08:00
parent 7501e0e5f3
commit 7377435498
8 changed files with 29 additions and 7 deletions

View File

@@ -258,7 +258,12 @@ public class ShopStageInfoDAO {
}
return shopStageInfoMapper.getScheduleList(shopIdList);
}
public ScheduleDTO getScheduleAll(Long shopId) {
if (Objects.isNull(shopId)) {
return null;
}
return shopStageInfoMapper.getScheduleAll(shopId);
}
public List<ScheduleDTO> getPlatformBuildList(List<Long> shopIdList) {
if (CollectionUtils.isEmpty(shopIdList)) {
return Collections.emptyList();

View File

@@ -111,6 +111,9 @@ public interface ShopStageInfoMapper extends Mapper<ShopStageInfoDO> {
List<ShopStageInfoDO> getShopIdListByStageStatus(@Param("shopSubStageStatus") Integer shopSubStageStatus);
List<ScheduleDTO> getScheduleList(@Param("shopIds") List<Long> shopIds);
ScheduleDTO getScheduleAll(@Param("shopId") Long shopId);
List<ScheduleDTO> getPlatformBuildList(@Param("shopIds") List<Long> shopIds);
List<ShopStageInfoDO> getShopContractActualCompletionTime(@Param("shopIds") List<Long> shopIds);

View File

@@ -398,4 +398,15 @@
and shop_id = #{shopId}
</if>
</select>
<select id="getScheduleAll" resultType="com.cool.store.dto.Preparation.ScheduleDTO">
select
shop_id as shopId,
max(plan_complete_time) as planCompleteTime,
count(1) as totalColumn,
sum(if(is_terminated = 1 , 1, 0)) as completionColumn
from xfsg_shop_stage_info where
shop_id = #{shopId}
</select>
</mapper>

View File

@@ -65,13 +65,13 @@ public class AuditOpeningOperationPlanImpl implements AuditOpeningOperationPlanS
Boolean flag = Boolean.FALSE;
if(OpeningOperationPlanResultTypeEnum.PASS_AUDIT.getCode().equals(request.getResultType())){
shopSubStageStatusEnum = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_143;
preparationService.updateShopStatus(request.getShopId());
flag = Boolean.TRUE;
}else {
shopSubStageStatusEnum = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_142;
}
shopStageInfoDAO.updateShopStageAndAuditInfo(request.getShopId(),
shopSubStageStatusEnum, auditId);
preparationService.updateShopStatus(request.getShopId());
if (flag){
preparationService.whetherToOpenForAcceptance(request.getShopId());
}

View File

@@ -652,7 +652,6 @@ public class DecorationServiceImpl implements DecorationService {
acceptanceInfoDO.setCreateTime(new Date());
acceptanceInfoDAO.insertSelectiveAcceptanceInfo(acceptanceInfoDO);
}
preparationService.updateShopStatus(shopId);
shopStageInfoDAO.batchUpdateShopStageStatus(shopId, Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_112, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_121));
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
LineInfoDO lineInfo = lineInfoMapper.getByLineId(shopInfo.getLineId());

View File

@@ -57,6 +57,7 @@ public class InvoicingServiceImpl implements InvoicingService {
//新数据待提交时初始化 老数据已数据处理 阶段状态已完成 只做插入操作 无需初始化
if (shopSubStageInfo!=null&&ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_85_1.getShopSubStageStatus().equals(shopSubStageInfo.getShopSubStageStatus())){
shopStageInfoDAO.updateShopStageInfo(invoicingDTO.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_85_3);
preparationService.updateShopStatus(invoicingDTO.getShopId());
}
return Boolean.TRUE;
}

View File

@@ -968,7 +968,9 @@ public class PointServiceImpl implements PointService {
// commonService.sendMessage(Arrays.asList(lineInfo.getInvestmentManager()),MessageEnum.MESSAGE_16_1,requestMap);
// }
}
return shopStageInfoDAO.updateShopStageAndAuditInfo(shopId, subStageStatus, auditId);
shopStageInfoDAO.updateShopStageAndAuditInfo(shopId, subStageStatus, auditId);
preparationService.updateShopStatus(request.getShopId());
return CommonConstants.ONE;
}
@Override

View File

@@ -286,11 +286,12 @@ public class PreparationServiceImpl implements PreparationService {
public void updateShopStatus(Long shopId) {
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
if (shopInfo.getShopStatus().equals(ShopStatusEnum.ING.getCode())){
Map<Long,Integer> map= getShopStatus(Arrays.asList(shopId));
Integer shopStatus = map.get(shopId);
ScheduleDTO scheduleAll = shopStageInfoDAO.getScheduleAll(shopId);
ShopInfoDO shopInfoDO = new ShopInfoDO();
if (scheduleAll.getTotalColumn().equals(scheduleAll.getCompletionColumn())){
shopInfoDO.setShopStatus(ShopStatusEnum.DONE.getCode());
}
shopInfoDO.setId(shopId);
shopInfoDO.setShopStatus(shopStatus);
shopInfoDAO.updateShopInfo(shopInfoDO);
}
}