skyouc
20 小时以前 f56457b75944ef2def631ad5ed07f302123d3f75
rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/PdaOutStockServiceImpl.java
@@ -283,7 +283,7 @@
            //taskItems为拣货明细,作参数上报
            Double summed = items.stream().mapToDouble(TaskItem::getAnfme).sum();
            //加上历史拣料数量
            Double pickQty = Math.round((orderItem.getQty() + summed) * 100) / 100.0;
            Double pickQty = Math.round((orderItem.getQty() + summed) * 1000000) / 1000000.0;
            Config config = configService.getOne(new LambdaQueryWrapper<Config>().eq(Config::getFlag, GlobalConfigCode.ALLOW_OVER_CHANGE));
            //判断是否允许超收,不允许超收添加拒收判断
            if (!Objects.isNull(config)) {
@@ -334,14 +334,17 @@
                    if (taskItem.getAnfme().compareTo(serviceOne.getAnfme()) > 0) {
                        throw new CoolException("拣货数量超出当前票号库存数量!!");
                    }
                    if (!Boolean.parseBoolean(config.getVal())) {
                        if (item.getAnfme().compareTo(item.getQty() + taskItem.getAnfme()) < 0.0) {
                        Double v = Math.round((item.getQty() + taskItem.getAnfme()) * 1000000) / 1000000.0;
                        if (item.getAnfme().compareTo(v) < 0.0) {
                            throw new CoolException("前当物料已超出可拣范围,请核对后再操作!!");
                        }
                    }
                }
                Double picQty = Math.round((item.getQty() + taskItem.getAnfme()) * 100) / 100.0;
                Double picQty = Math.round((item.getQty() + taskItem.getAnfme()) * 1000000) / 1000000.0;
                item.setQty(picQty).setOrderId(order.getId()).setOrderItemId(orderItem.getId());
                if (!taskItemService.updateById(item)) {
                    throw new CoolException("状态完成失败!!");
@@ -360,7 +363,7 @@
        List<WkOrderItem> orderItems = asnOrderItemService.list(new LambdaQueryWrapper<WkOrderItem>().eq(WkOrderItem::getOrderId, params.getOrderId()));
        Double total = orderItems.stream().mapToDouble(WkOrderItem::getQty).sum();
        Double wkQty = orderItems.stream().mapToDouble(WkOrderItem::getWorkQty).sum();
        double v = order.getWorkQty().compareTo(wkQty) < 0 ? 0.0 : Math.round((total - wkQty) * 100) / 100.0;
        double v = order.getWorkQty().compareTo(wkQty) < 0 ? 0.0 : Math.round((total - wkQty) * 1000000) / 1000000.0;
        order.setQty(total).setWorkQty(v);
        if (!asnOrderService.updateById(order)) {
            throw new CoolException("订单数量更新失败!!");