gongchunyi
2026-09-28 5599c23fa95fea51cab371e6615e83c44d0f7a95
fix: 允许下发数量超出
已修改1个文件
6 ■■■■■ 文件已修改
src/main/java/com/ruoyi/production/service/impl/ProductionPlanServiceImpl.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/production/service/impl/ProductionPlanServiceImpl.java
@@ -123,9 +123,9 @@
        if (assignedQuantity == null || assignedQuantity.compareTo(BigDecimal.ZERO) <= 0) {
            throw new ServiceException("下发失败,下发数量必须大于0");
        }
        if (assignedQuantity.compareTo(totalRequiredQuantity) > 0) {
            throw new ServiceException("下发失败,下发数量不能大于计划剩余需求总量");
        }
//        if (assignedQuantity.compareTo(totalRequiredQuantity) > 0) {
//            throw new ServiceException("下发失败,下发数量不能大于计划剩余需求总量");
//        }
        // 按计划顺序分摊下发数量,收集实际参与下发的计划 ID
        BigDecimal remainingForOrderBind = assignedQuantity;