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

@@ -198,6 +198,8 @@ public enum ErrorCodeEnum {
DUPLICATE_SUBMISSION(109015, "重复提交!", null), DUPLICATE_SUBMISSION(109015, "重复提交!", null),
INVOICING_EXIST(109016, "当前门店发票信息已存在!", null),
INSERT_OPENING_OPERATION_PLAN_AUDIT_FALSE(103001,"插入运营方案审核信息失败",null), INSERT_OPENING_OPERATION_PLAN_AUDIT_FALSE(103001,"插入运营方案审核信息失败",null),
INSERT_OPENING_OPERATION_PLAN_FALSE(103002,"插入运营方案失败",null), INSERT_OPENING_OPERATION_PLAN_FALSE(103002,"插入运营方案失败",null),

View File

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