liding
6 天以前 6bb66501148afcd970188ed122e2ee37908e3127
feat: 报工投入用“投入重量/数量”
已修改1个文件
14 ■■■■ 文件已修改
src/main/java/com/ruoyi/production/service/impl/ProductionProductMainServiceImpl.java 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/production/service/impl/ProductionProductMainServiceImpl.java
@@ -204,9 +204,9 @@
            BigDecimal previousCompleteQty =
                    previousWorkOrder.getCompleteQuantity() == null ? BigDecimal.ZERO : previousWorkOrder.getCompleteQuantity();
            if (currentReportedQty.add(reportQty).compareTo(previousCompleteQty) > 0) {
                throw new ServiceException("本次报工数量超过上道工序可流转数量");
            }
//            if (currentReportedQty.add(reportQty).compareTo(previousCompleteQty) > 0) {
//                throw new ServiceException("本次报工数量超过上道工序可流转数量");
//            }
            List<ProductProcessRouteItem> previousItems = productProcessRouteItemMapper.selectList(
                    Wrappers.<ProductProcessRouteItem>lambdaQuery()
@@ -250,10 +250,10 @@
                    .filter(Objects::nonNull)
                    .reduce(BigDecimal.ZERO, BigDecimal::add);
        }
        if (productWorkOrder.getPlanQuantity() != null
                && currentWorkOrderReportedQty.add(reportQty).compareTo(productWorkOrder.getPlanQuantity()) > 0) {
            throw new ServiceException("本次报工数量超过工单可报数量");
        }
//        if (productWorkOrder.getPlanQuantity() != null
//                && currentWorkOrderReportedQty.add(reportQty).compareTo(productWorkOrder.getPlanQuantity()) > 0) {
//            throw new ServiceException("本次报工数量超过工单可报数量");
//        }
        // 第五步:生成报工单号并确定报工人信息
        String productNo;