zc
昨天 438c1612a0b0b212e21d25249ccdebac6a326842
rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/AsnOrderServiceImpl.java
@@ -299,7 +299,7 @@
            }
            PurchaseItem service = purchaseItemService.getById(item.getId());
            Double qty = Math.round((service.getQty() + item.getAnfme()) * 10000) / 10000.0;
            Double qty = Math.round((service.getQty() + item.getAnfme()) * 100) / 100.0;
            if (qty.compareTo(service.getAnfme()) > 0) {
                throw new CoolException("新建单据数量不能大于计划数量!!");
            }
@@ -326,7 +326,7 @@
                throw new CoolException("单据不存在!!");
            }
            Double toQty = Math.round((purchaseItem.getQty() + item.getAnfme()) * 10000) / 10000.0;
            Double toQty = Math.round((purchaseItem.getQty() + item.getAnfme()) * 100) / 100.0;
            purchaseItem.setQty(toQty);
            if (!purchaseItemService.updateById(purchaseItem)) {
                throw new CoolException("PO单明细修改失败!!");
@@ -339,7 +339,7 @@
            throw new CoolException(("Asn单据明细保存失败!!"));
        }
        //任务执行完成,修改已完成数量和PO单执行状态
        Double qty = Math.round((sum + purchase.getQty()) * 10000) / 10000.0;
        Double qty = Math.round((sum + purchase.getQty()) * 100) / 100.0;
        purchase.setQty(qty)
                .setExceStatus(POExceStatus.PO_EXCE_STATUS_EXCE_ING.val);
@@ -373,7 +373,7 @@
            list.forEach(item -> {
                PurchaseItem purchaseItem = purchaseItemService.getById(item.getPoDetlId());
                if (!Objects.isNull(purchaseItem)) {
                    Double minusQty = Math.round((purchaseItem.getQty() - item.getAnfme()) * 10000) / 10000.0;
                    Double minusQty = Math.round((purchaseItem.getQty() - item.getAnfme()) * 100) / 100.0;
                    purchaseItem.setQty(minusQty);
                    if (!purchaseItemService.updateById(purchaseItem)) {
                        throw new CoolException("PO单明细更新失败!!");
@@ -386,7 +386,7 @@
            Purchase purchase = purchaseService.getOne(new LambdaQueryWrapper<Purchase>()
                    .eq(Purchase::getCode, list.stream().findFirst().get().getPoCode()));
            if (!Objects.isNull(purchase)) {
                Double qty = Math.round((purchase.getQty() - sum) * 10000) / 10000.0;
                Double qty = Math.round((purchase.getQty() - sum) * 100) / 100.0;
                purchase.setQty(qty)
                        .setExceStatus(POExceStatus.PO_EXCE_STATUS_EXCE_ING.val);