feat:发票回传数据处理
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user