diff --git a/int-core/src/main/java/com/foreverwin/iep/integration/controller/ShopOrderStatisticTransController.java b/int-core/src/main/java/com/foreverwin/iep/integration/controller/ShopOrderStatisticTransController.java index 7edccda..fc4cdda 100644 --- a/int-core/src/main/java/com/foreverwin/iep/integration/controller/ShopOrderStatisticTransController.java +++ b/int-core/src/main/java/com/foreverwin/iep/integration/controller/ShopOrderStatisticTransController.java @@ -160,9 +160,12 @@ public class ShopOrderStatisticTransController { InvokeResponse invokeResponse = new InvokeResponse(); List newList = new ArrayList<>(); for (ZShoporderStatisticsTransaction statisticsTransaction : shoporderStatisticsTransactionList) { + if(StringUtils.isEmpty(statisticsTransaction.getSid())){ + throw BusinessException.build("此笔数据还未报工无需取消报工"); + } // 重新校验一遍是否已经报过工,防止重复报工 ZShoporderStatisticsTransaction targetObj = zShoporderStatisticsTransactionMapper.selectById(statisticsTransaction.getSid()); - if (!"S".equals(targetObj.getSyncStatus())) { + if (targetObj==null || !"S".equals(targetObj.getSyncStatus())) { throw BusinessException.build("工单" + targetObj.getShopOrder() + "还未报工无需取消报工"); } else { newList.add(targetObj);