From 08692701ff73a721ed6411aa830fe6707433eac6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=91=A3=E5=93=B2=E5=A5=87?= <13840175730@139.com> Date: Wed, 25 Dec 2024 17:06:12 +0800 Subject: [PATCH] =?UTF-8?q?1.=E7=82=89=E6=89=B9=E5=8F=B7=E5=85=BC=E5=AE=B9?= =?UTF-8?q?=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dsic/gj_erp/controller/zyjh/ZyjhController.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/dsic/gj_erp/controller/zyjh/ZyjhController.java b/src/main/java/com/dsic/gj_erp/controller/zyjh/ZyjhController.java index 6502eb7..3abdd67 100644 --- a/src/main/java/com/dsic/gj_erp/controller/zyjh/ZyjhController.java +++ b/src/main/java/com/dsic/gj_erp/controller/zyjh/ZyjhController.java @@ -279,10 +279,12 @@ public class ZyjhController { String mpDhsjDhh = zyjhService.getMpDhsjDhh(); for (int j = 0; j < ljList.size(); j++) { DmYdjhLj item2 = ljList.get(j); - MpDhsj mpDhsj = MpDhsj.of(item2, date, item.getSllph()); - String xh = StrUtil.padPre(j + 1 + "", 3, "0"); - mpDhsj.setDhh(mpDhsjDhh+"-"+xh); - collect.add(mpDhsj); + if (StrUtil.isNotEmpty(item.getSllph())){//兼容没有炉批号的老数据用 + MpDhsj mpDhsj = MpDhsj.of(item2, date, item.getSllph()); + String xh = StrUtil.padPre(j + 1 + "", 3, "0"); + mpDhsj.setDhh(mpDhsjDhh+"-"+xh); + collect.add(mpDhsj); + } } mpDhsjServcie.saveBatch(collect); }