From 08c24a5530f6e5a9675a1cfcab22b24848adceec Mon Sep 17 00:00:00 2001 From: dubin <bindu_bean@163.com> Date: 星期二, 21 十月 2025 08:44:50 +0800 Subject: [PATCH] 联调 --- src/main/java/com/zy/asrs/service/impl/MatBarcodeServiceImpl.java | 31 +++++++++++++++++++++++++++++++ 1 files changed, 31 insertions(+), 0 deletions(-) diff --git a/src/main/java/com/zy/asrs/service/impl/MatBarcodeServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/MatBarcodeServiceImpl.java index 721ccff..b0c4610 100644 --- a/src/main/java/com/zy/asrs/service/impl/MatBarcodeServiceImpl.java +++ b/src/main/java/com/zy/asrs/service/impl/MatBarcodeServiceImpl.java @@ -112,6 +112,37 @@ if (mat.getColor().equals("鎶ュ簾")){ throw new CoolException("璇ョ墿鏂欏凡鎶ュ簾锛岃鍕跨粦瀹�"); } + HalfBarcode halfBarcode = halfBarcodeService.selectByZpallet(mat.getUnit()); + if (halfBarcode == null){ + HalfBarcode hb = new HalfBarcode(); + hb.setZpallet(mat.getUnit()); + hb.setSpecs(mat.getUnit().substring(0,1)); + hb.setAnfme(1); + if (Integer.parseInt(mat.getUnit().substring(0,1))==6){ + hb.setPrice(24-1); + }else if(Integer.parseInt(mat.getUnit().substring(0,1))==7){ + hb.setPrice(24-1); + }else if(Integer.parseInt(mat.getUnit().substring(0,1))==8){ + hb.setPrice(24-1); + } + if (!halfBarcodeService.insert(hb)){ + throw new CoolException("鏇存柊鍗婃墭淇℃伅澶辫触"); + } + }else { + if (Integer.parseInt(mat.getUnit().substring(0,1))==6){ + halfBarcode.setAnfme(halfBarcode.getAnfme() + 1); + halfBarcode.setPrice(halfBarcode.getPrice()-1); + }else if(Integer.parseInt(mat.getUnit().substring(0,1))==7){ + halfBarcode.setAnfme(halfBarcode.getAnfme() + 1); + halfBarcode.setPrice(halfBarcode.getPrice()-1); + }else if(Integer.parseInt(mat.getUnit().substring(0,1))==8){ + halfBarcode.setAnfme(halfBarcode.getAnfme() + 1); + halfBarcode.setPrice(halfBarcode.getPrice()-1); + } + if (!halfBarcodeService.half(halfBarcode)){ + throw new CoolException("鏇存柊鍗婃墭淇℃伅澶辫触"); + } + } MatBarcode mb=new MatBarcode(); mb.setZpallet(mat.getUnit()); mb.setMatnr(mat.getMatnr()); -- Gitblit v1.9.1