feat:发票回传数据处理

This commit is contained in:
苏竹红
2025-01-02 16:14:24 +08:00
parent 85ccaf5dea
commit ffbf8ed330
2 changed files with 14 additions and 7 deletions

View File

@@ -40,18 +40,23 @@ public class InvoicingServiceImpl implements InvoicingService {
if (invoicingDTO==null||invoicingDTO.getId()!=null){
throw new ServiceException(ErrorCodeEnum.PARAMS_VALIDATE_ERROR);
}
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(invoicingDTO.getShopId(), ShopSubStageEnum.SHOP_STAGE_8_5);
//待提交时候支持提交
if (shopSubStageInfo!=null&&!ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_85_1.getShopSubStageStatus().equals(shopSubStageInfo.getShopSubStageStatus())){
throw new ServiceException(ErrorCodeEnum.STATUS_NOT_SUPPORT_SUMMIT);
InvoicingDO invoicing = invoicingDAO.getByShopId(invoicingDTO.getShopId());
if (invoicing!=null){
throw new ServiceException(ErrorCodeEnum.INVOICING_EXIST);
}
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(invoicingDTO.getShopId(), ShopSubStageEnum.SHOP_STAGE_8_5);
InvoicingDO invoicingDO = new InvoicingDO();
BeanUtil.copyProperties(invoicingDTO, invoicingDO);
invoicingDO.setCreateUserId(userInfo.getUserId());
invoicingDAO.add(invoicingDO);
shopStageInfoDAO.updateShopStageInfo(invoicingDTO.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_85_3);
////如果发票回传完成 开始设计阶段与验收阶段
preparationService.contractAndBuildStoreCompletion(invoicingDTO.getShopId());
//新数据待提交时初始化 老数据已数据处理 阶段状态已完成 只做插入操作 无需初始化
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.contractAndBuildStoreCompletion(invoicingDTO.getShopId());
}
return Boolean.TRUE;
}