From 2967846ca331d53b713ec936c245fc4c464f2ae2 Mon Sep 17 00:00:00 2001 From: anthonyywj2 <353682448@qq.com> Date: Fri, 20 May 2022 10:29:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=97=E6=AE=B5=E7=BC=BA=E6=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../entity/sync/BussinessLocalTypeEntity.java | 5 ++++ .../sync/BussinessOriginTypeEntity.java | 2 ++ .../entity/sync/BussinessTypeEntity.java | 6 +++++ .../sale/admin/thread/DlAllDataService.java | 25 ++++++++++--------- .../main/resources/application-pro.properties | 6 ++--- 5 files changed, 29 insertions(+), 15 deletions(-) diff --git a/api-admin/src/main/java/com/glxp/sale/admin/entity/sync/BussinessLocalTypeEntity.java b/api-admin/src/main/java/com/glxp/sale/admin/entity/sync/BussinessLocalTypeEntity.java index 6646891..11f389b 100644 --- a/api-admin/src/main/java/com/glxp/sale/admin/entity/sync/BussinessLocalTypeEntity.java +++ b/api-admin/src/main/java/com/glxp/sale/admin/entity/sync/BussinessLocalTypeEntity.java @@ -2,6 +2,8 @@ package com.glxp.sale.admin.entity.sync; import lombok.Data; +import java.util.Date; + @Data public class BussinessLocalTypeEntity { @@ -23,4 +25,7 @@ public class BussinessLocalTypeEntity { private boolean genUnit; private String thirdAction; private String thirdSys; + private String prefix; + private String localPrefix; + private boolean preIn; } diff --git a/api-admin/src/main/java/com/glxp/sale/admin/entity/sync/BussinessOriginTypeEntity.java b/api-admin/src/main/java/com/glxp/sale/admin/entity/sync/BussinessOriginTypeEntity.java index 149da32..fb66787 100644 --- a/api-admin/src/main/java/com/glxp/sale/admin/entity/sync/BussinessOriginTypeEntity.java +++ b/api-admin/src/main/java/com/glxp/sale/admin/entity/sync/BussinessOriginTypeEntity.java @@ -2,6 +2,8 @@ package com.glxp.sale.admin.entity.sync; import lombok.Data; +import java.util.Date; + @Data public class BussinessOriginTypeEntity { private String id; diff --git a/api-admin/src/main/java/com/glxp/sale/admin/entity/sync/BussinessTypeEntity.java b/api-admin/src/main/java/com/glxp/sale/admin/entity/sync/BussinessTypeEntity.java index 86e9ef3..f51c4ce 100644 --- a/api-admin/src/main/java/com/glxp/sale/admin/entity/sync/BussinessTypeEntity.java +++ b/api-admin/src/main/java/com/glxp/sale/admin/entity/sync/BussinessTypeEntity.java @@ -2,6 +2,8 @@ package com.glxp.sale.admin.entity.sync; import lombok.Data; +import java.util.Date; + @Data public class BussinessTypeEntity { private Integer id; @@ -51,4 +53,8 @@ public class BussinessTypeEntity { private boolean expireTip; + private String prefix; + private String localPrefix; + private boolean preIn; + } diff --git a/api-admin/src/main/java/com/glxp/sale/admin/thread/DlAllDataService.java b/api-admin/src/main/java/com/glxp/sale/admin/thread/DlAllDataService.java index 81a4314..c1b3d15 100644 --- a/api-admin/src/main/java/com/glxp/sale/admin/thread/DlAllDataService.java +++ b/api-admin/src/main/java/com/glxp/sale/admin/thread/DlAllDataService.java @@ -347,19 +347,20 @@ public class DlAllDataService { spSyncUdiResponse.setProductInfoEntityList(mProductInfoEntities); - String key = "UdiPrdoucts" + System.currentTimeMillis(); - String datas = JSON.toJSON(spSyncUdiResponse).toString(); - if (downstream.getParamValue().equals("1")) { - redisUtil.set(key, datas); - BasicExportStatusEntity myEntity = new BasicExportStatusEntity(); - myEntity.setId(key); - basicExportService.insertExportStatus(myEntity); - } else { - String path = getPath(); - String fileName = path + FileConstant.upWaitCopy_products + "UdiPrdoucts_" + key + ".LowerIn"; - FileUtils.SaveFileAs(datas, fileName); + if(CollUtil.isNotEmpty(spSyncUdiResponse.getProductInfoEntityList()) || CollUtil.isNotEmpty(spSyncUdiResponse.getUdiCompanyEntities())){ + String key = "UdiPrdoucts" + System.currentTimeMillis(); + String datas = JSON.toJSON(spSyncUdiResponse).toString(); + if (downstream.getParamValue().equals("1")) { + redisUtil.set(key, datas); + BasicExportStatusEntity myEntity = new BasicExportStatusEntity(); + myEntity.setId(key); + basicExportService.insertExportStatus(myEntity); + } else { + String path = getPath(); + String fileName = path + FileConstant.upWaitCopy_products + "UdiPrdoucts_" + key + ".LowerIn"; + FileUtils.SaveFileAs(datas, fileName); + } } - BasicExportStatusEntity basicExportStatusEntity1 = basicExportStatusEntities.get(0); basicExportStatusEntity1.setStatus(1); spGetHttp.postUpdateBasicStatus(basicExportStatusEntity1); diff --git a/api-admin/src/main/resources/application-pro.properties b/api-admin/src/main/resources/application-pro.properties index 6b4b35c..4d7a40c 100644 --- a/api-admin/src/main/resources/application-pro.properties +++ b/api-admin/src/main/resources/application-pro.properties @@ -32,10 +32,10 @@ back_file_path=D:/share/udisps/back/ spring.jackson.date-format=yyyy-MM-dd HH:mm:ss spring.jackson.time-zone=GMT+8 #UDI管理系统地址 -UDIWMS_IP=http://192.168.0.109:9991 -#UDIWMS_IP=http://127.0.0.1:9991 +#UDIWMS_IP=http://192.168.0.109:9991 +UDIWMS_IP=http://127.0.0.1:9991 #自助平台地址 -SPMS_IP=http://192.168.0.109:9996 +SPMS_IP=http://127.0.0.1:9996 #SPMS_IP=http://139.9.178.73:8080/SPMS_SERVER API_KEY=1101 API_SECRET=zBITspLNvuoEd4FaamlSoqxRHmNsmQ9L