From fe086ce317990d32b4a7de704686dbb15ece4006 Mon Sep 17 00:00:00 2001 From: anthonywj Date: Wed, 29 Mar 2023 20:26:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E7=B1=BB=E5=9E=8Bint->String?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/constant/BasicProcessStatus.java | 20 +++++++++---------- .../sync/BasicDownloadController.java | 16 +++++++-------- .../entity/sync/BasicExportStatusEntity.java | 2 +- .../entity/sync/BasicUploadStatusEntity.java | 2 +- .../req/sync/BasicExportStatusRequest.java | 2 +- 5 files changed, 21 insertions(+), 21 deletions(-) diff --git a/api-admin/src/main/java/com/glxp/sale/admin/constant/BasicProcessStatus.java b/api-admin/src/main/java/com/glxp/sale/admin/constant/BasicProcessStatus.java index 35a8988..3e3a31b 100644 --- a/api-admin/src/main/java/com/glxp/sale/admin/constant/BasicProcessStatus.java +++ b/api-admin/src/main/java/com/glxp/sale/admin/constant/BasicProcessStatus.java @@ -24,16 +24,16 @@ public class BasicProcessStatus { //导出数据类型 - public static final int BASIC_UDI = 1; //耗材字典 - public static final int BASIC_INV = 2; //仓库字典 - public static final int BASIC_CORP = 3; //往来单位 - public static final int BASIC_THIRD_PRODUCTS = 4; //往来单位 - public static final int BASIC_THIRD_CORP = 5; //往来单位 - public static final int BASIC_THIRD_ORDER = 6; //往来单位 - public static final int NEW_ALL_DATA = 7; - public static final int NEW_ALL_BUS = 8; - public static final int NEW_ALL_ORDER = 9; - public static final int NEW_ALL_UDIS = 10; + public static final String BASIC_UDI = "1"; //耗材字典 + public static final String BASIC_INV = "2"; //仓库字典 + public static final String BASIC_CORP = "3"; //往来单位 + public static final String BASIC_THIRD_PRODUCTS = "4"; //往来单位 + public static final String BASIC_THIRD_CORP = "5"; //往来单位 + public static final String BASIC_THIRD_ORDER = "6"; //往来单位 + public static final String NEW_ALL_DATA = "7"; + public static final String NEW_ALL_BUS = "8"; + public static final String NEW_ALL_ORDER = "9"; + public static final String NEW_ALL_UDIS = "10"; public static final int IMPORT_LOG_TYPE_ORDER = 1;//单据 diff --git a/api-admin/src/main/java/com/glxp/sale/admin/controller/sync/BasicDownloadController.java b/api-admin/src/main/java/com/glxp/sale/admin/controller/sync/BasicDownloadController.java index 5aa9f46..d70d644 100644 --- a/api-admin/src/main/java/com/glxp/sale/admin/controller/sync/BasicDownloadController.java +++ b/api-admin/src/main/java/com/glxp/sale/admin/controller/sync/BasicDownloadController.java @@ -74,37 +74,37 @@ public class BasicDownloadController { @PostMapping("/spssync/basic/udiinfo/downloadByStatus") public BaseResponse downloadByStatus(@RequestBody BasicExportStatusRequest basicExportStatusRequest) { log.info("查询下载未更新信息"); - if (basicExportStatusRequest.getType() == BasicProcessStatus.BASIC_UDI) {//基础信息下载 + if (basicExportStatusRequest.getType().equals(BasicProcessStatus.BASIC_UDI)) {//基础信息下载 String data = (String) redisUtil.get(basicExportStatusRequest.getId() + ""); UdiRelevanceExportJsonResponse udiRelevanceExportJsonResponse = JSONObject.parseObject(data, new TypeReference() { }); basicExportService.finished(basicExportStatusRequest.getId()); return ResultVOUtils.success(udiRelevanceExportJsonResponse); - } else if (basicExportStatusRequest.getType() == BasicProcessStatus.BASIC_CORP) {//基础信息下载 + } else if (basicExportStatusRequest.getType().equals(BasicProcessStatus.BASIC_CORP)) {//基础信息下载 String data = (String) redisUtil.get(basicExportStatusRequest.getId() + ""); BasicUnitMaintainExportResponse basicUnitMaintainExportResponse = JSONObject.parseObject(data, new TypeReference() { }); basicExportService.finished(basicExportStatusRequest.getId()); return ResultVOUtils.success(basicUnitMaintainExportResponse); - } else if (basicExportStatusRequest.getType() == BasicProcessStatus.BASIC_INV) {//基础信息下载 + } else if (basicExportStatusRequest.getType().equals(BasicProcessStatus.BASIC_INV)) {//基础信息下载 String data = (String) redisUtil.get(basicExportStatusRequest.getId() + ""); InvWarehouseExportResponse invWarehouseExportResponse = JSONObject.parseObject(data, new TypeReference() { }); basicExportService.finished(basicExportStatusRequest.getId()); return ResultVOUtils.success(invWarehouseExportResponse); - } else if (basicExportStatusRequest.getType() == BasicProcessStatus.NEW_ALL_DATA) {//基础信息下载 + } else if (basicExportStatusRequest.getType().equals(BasicProcessStatus.NEW_ALL_DATA)) {//基础信息下载 SpsSyncDataResponse spsSyncDataResponse = (SpsSyncDataResponse) redisUtil.get(basicExportStatusRequest.getId() + ""); basicExportService.finished(basicExportStatusRequest.getId()); return ResultVOUtils.success(spsSyncDataResponse); - } else if (basicExportStatusRequest.getType() == BasicProcessStatus.NEW_ALL_BUS) {//单据类型 + } else if (basicExportStatusRequest.getType().equals(BasicProcessStatus.NEW_ALL_BUS)) {//单据类型 SpsSyncBusResponse spsSyncDataResponse = (SpsSyncBusResponse) redisUtil.get(basicExportStatusRequest.getId() + ""); basicExportService.finished(basicExportStatusRequest.getId()); return ResultVOUtils.success(spsSyncDataResponse); - } else if (basicExportStatusRequest.getType() == BasicProcessStatus.NEW_ALL_ORDER) {//单据 + } else if (basicExportStatusRequest.getType().equals(BasicProcessStatus.NEW_ALL_ORDER)) {//单据 SpsSyncOrderResponse spsSyncDataResponse = (SpsSyncOrderResponse) redisUtil.get(basicExportStatusRequest.getId() + ""); basicExportService.finished(basicExportStatusRequest.getId()); return ResultVOUtils.success(spsSyncDataResponse); - } else if (basicExportStatusRequest.getType() == BasicProcessStatus.NEW_ALL_UDIS) {//国家库信息 + } else if (basicExportStatusRequest.getType().equals(BasicProcessStatus.NEW_ALL_UDIS)) {//国家库信息 BasicExportStatusEntity basicExportStatusEntity = basicExportService.findById(basicExportStatusRequest.getId()); String data = (String) redisUtil.get(basicExportStatusRequest.getId() + ""); SpSyncUdiResponse spSyncUdiResponse = null; @@ -131,4 +131,4 @@ public class BasicDownloadController { return ResultVOUtils.error(500, "更新成功!"); } -} \ No newline at end of file +} diff --git a/api-admin/src/main/java/com/glxp/sale/admin/entity/sync/BasicExportStatusEntity.java b/api-admin/src/main/java/com/glxp/sale/admin/entity/sync/BasicExportStatusEntity.java index 1f41cdf..68b3bb3 100644 --- a/api-admin/src/main/java/com/glxp/sale/admin/entity/sync/BasicExportStatusEntity.java +++ b/api-admin/src/main/java/com/glxp/sale/admin/entity/sync/BasicExportStatusEntity.java @@ -10,7 +10,7 @@ public class BasicExportStatusEntity { private String taskId; private String idDatas; private Integer status; - private Integer type; + private String type; /** * 传输状态 1.接口 2.文件 */ diff --git a/api-admin/src/main/java/com/glxp/sale/admin/entity/sync/BasicUploadStatusEntity.java b/api-admin/src/main/java/com/glxp/sale/admin/entity/sync/BasicUploadStatusEntity.java index 72bdfda..d19a475 100644 --- a/api-admin/src/main/java/com/glxp/sale/admin/entity/sync/BasicUploadStatusEntity.java +++ b/api-admin/src/main/java/com/glxp/sale/admin/entity/sync/BasicUploadStatusEntity.java @@ -13,7 +13,7 @@ public class BasicUploadStatusEntity { private String taskId; private String idDatas; private Integer status; - private Integer type; + private String type; /** * 传输状态 1.接口 2.文件 */ diff --git a/api-admin/src/main/java/com/glxp/sale/admin/req/sync/BasicExportStatusRequest.java b/api-admin/src/main/java/com/glxp/sale/admin/req/sync/BasicExportStatusRequest.java index e59e291..5f9013c 100644 --- a/api-admin/src/main/java/com/glxp/sale/admin/req/sync/BasicExportStatusRequest.java +++ b/api-admin/src/main/java/com/glxp/sale/admin/req/sync/BasicExportStatusRequest.java @@ -7,7 +7,7 @@ import lombok.Data; public class BasicExportStatusRequest extends ListPageRequest { private String id; private Integer status; - private Integer type; + private String type; private Integer scheduleType; private String idDatas; private String taskId;