From 9afe11946b69f3d22798d84adaaf462ab5e2d254 Mon Sep 17 00:00:00 2001 From: anthonywj Date: Tue, 18 Jul 2023 09:21:19 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E6=89=B9=E6=AC=A1=E5=8F=B7=E4=B8=BA?= =?UTF-8?q?=E7=A9=BA=E6=97=B6=E6=8F=92=E5=85=A5=E5=BA=93=E5=AD=98=E5=87=BA?= =?UTF-8?q?=E7=8E=B0=E7=A9=BA=E5=AD=97=E7=AC=A6=E4=B8=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/glxp/api/entity/basic/UdiEntity.java | 2 ++ .../java/com/glxp/api/util/udi/FilterUdiUtils.java | 12 ++++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/glxp/api/entity/basic/UdiEntity.java b/src/main/java/com/glxp/api/entity/basic/UdiEntity.java index af3d42ecb..6c7fd40e5 100644 --- a/src/main/java/com/glxp/api/entity/basic/UdiEntity.java +++ b/src/main/java/com/glxp/api/entity/basic/UdiEntity.java @@ -1,5 +1,7 @@ package com.glxp.api.entity.basic; +import cn.hutool.core.util.StrUtil; + /** * @author 彭于晏 * @date 2020/9/22. diff --git a/src/main/java/com/glxp/api/util/udi/FilterUdiUtils.java b/src/main/java/com/glxp/api/util/udi/FilterUdiUtils.java index 05f50f7b8..69f602f19 100644 --- a/src/main/java/com/glxp/api/util/udi/FilterUdiUtils.java +++ b/src/main/java/com/glxp/api/util/udi/FilterUdiUtils.java @@ -109,7 +109,7 @@ public class FilterUdiUtils { String expireDate = ""; String serialNo = null; String udi = ""; - String[] spilts = data.split("#",data.length()); + String[] spilts = data.split("#", data.length()); if (spilts != null && spilts.length >= 5) { udi = spilts[1]; produceDate = spilts[2]; @@ -117,9 +117,13 @@ public class FilterUdiUtils { batchNo = spilts[4]; if (spilts.length > 6) { serialNo = spilts[5]; - if (serialNo != null && serialNo.equals("")) { - serialNo = null; - } + } + + if (StrUtil.isEmpty(batchNo)) { + batchNo = null; + } + if (StrUtil.isEmpty(serialNo)) { + serialNo = null; } } From 0c7b4455c4bc79e4c9c6e77900de1a4dd535cf0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=96=9B=E5=AE=87?= <2433098676@qq.com> Date: Tue, 18 Jul 2023 09:38:10 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E5=90=8C=E6=AD=A5=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=EF=BC=8C=E5=90=8C=E6=AD=A5=E8=87=B3=E8=87=AA?= =?UTF-8?q?=E5=8A=A9=E5=B9=B3=E5=8F=B0=E6=88=96=E7=AE=A1=E7=90=86=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F=E7=9A=84=E6=89=AB=E7=A0=81=E5=8D=95=E6=8D=AE=E5=8F=AA?= =?UTF-8?q?=E8=83=BD=E5=8D=95=E7=BA=BF=E9=80=89=E6=8B=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../glxp/api/controller/sync/SyncDataSetController.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/java/com/glxp/api/controller/sync/SyncDataSetController.java b/src/main/java/com/glxp/api/controller/sync/SyncDataSetController.java index dbf15d44c..ed63fc404 100644 --- a/src/main/java/com/glxp/api/controller/sync/SyncDataSetController.java +++ b/src/main/java/com/glxp/api/controller/sync/SyncDataSetController.java @@ -1,6 +1,7 @@ package com.glxp.api.controller.sync; import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.util.IdUtil; import cn.hutool.json.JSONUtil; import com.glxp.api.annotation.AuthRuleAnnotation; import com.glxp.api.constant.Constant; @@ -65,12 +66,19 @@ public class SyncDataSetController { syncDataSetEntity.setUpdateTime(new Date()); syncDataSetEntity.setId(1); List busTypes = syncDataSetResponse.getBusTypes(); + //重新生成id防止插入时单据类型被覆盖 + for (SyncDataBustypeEntity s:busTypes) { + s.setId(IdUtil.getSnowflakeNextId()); + } syncDataBustypeService.deleteAll(1); if (CollUtil.isNotEmpty(busTypes)) { syncDataBustypeService.inserts(busTypes); } List toInBusTypes = syncDataSetResponse.getToInBusTypes(); + for (SyncDataBustypeEntity s : toInBusTypes) { + s.setId(IdUtil.getSnowflakeNextId()); + } syncDataBustypeService.deleteAll(2); if (CollUtil.isNotEmpty(toInBusTypes)) { syncDataBustypeService.inserts(toInBusTypes); From a9d68d304893092f57ea8be23f81c26b3efbb716 Mon Sep 17 00:00:00 2001 From: anthonywj Date: Tue, 18 Jul 2023 10:28:50 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E5=8D=95=E6=8D=AE=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E6=8F=90=E4=BA=A4=E8=87=B3=E7=AC=AC=E4=B8=89=E6=96=B9=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/glxp/api/service/inout/impl/IoOrderServiceImpl.java | 2 +- src/main/resources/application-dev.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/glxp/api/service/inout/impl/IoOrderServiceImpl.java b/src/main/java/com/glxp/api/service/inout/impl/IoOrderServiceImpl.java index a7acdee02..e7a6b7bbd 100644 --- a/src/main/java/com/glxp/api/service/inout/impl/IoOrderServiceImpl.java +++ b/src/main/java/com/glxp/api/service/inout/impl/IoOrderServiceImpl.java @@ -901,7 +901,7 @@ public class IoOrderServiceImpl implements IoOrderService { ThrOrderUploadBustypesEntity thrOrderUploadBustypesEntity = thrOrderUploadBustypesService.findByAction(orderEntity.getAction()); if (thrOrderUploadBustypesEntity == null) { log.error(billNo + ":" + orderEntity.getAction() + "单据类型未设置自动上传"); - return ResultVOUtils.error(500, billNo + ":" + orderEntity.getAction() + "单据类型未设置自动上传"); + continue; } if (!thrOrderUploadBustypesEntity.getOrderSource().contains(orderEntity.getFromType() + "")) { log.error(billNo + ":" + "单据来源不允许自动提交"); diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml index eda745787..3ec5dc035 100644 --- a/src/main/resources/application-dev.yml +++ b/src/main/resources/application-dev.yml @@ -4,7 +4,7 @@ server: spring: datasource: driver-class-name: com.p6spy.engine.spy.P6SpyDriver - jdbc-url: jdbc:p6spy:mysql://127.0.0.1:3306/udi_wms_pzh?allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true + jdbc-url: jdbc:p6spy:mysql://127.0.0.1:3306/udi_wms_pt?allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true username: root password: 123456 hikari: From f82de3c9d8c02a371b44fca0b16765f2edf127ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91=E6=98=8E=E6=A2=81?= <2429105222@qq.com> Date: Tue, 18 Jul 2023 11:50:30 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E5=90=88=E5=B9=B6=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/application-dev.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml index eda745787..bf7be33a2 100644 --- a/src/main/resources/application-dev.yml +++ b/src/main/resources/application-dev.yml @@ -4,7 +4,7 @@ server: spring: datasource: driver-class-name: com.p6spy.engine.spy.P6SpyDriver - jdbc-url: jdbc:p6spy:mysql://127.0.0.1:3306/udi_wms_pzh?allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true + jdbc-url: jdbc:p6spy:mysql://127.0.0.1:3306/udi_wms_wmd?allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true username: root password: 123456 hikari: