From c45cbe9b604afef6a1221d911946438cff2ed46a Mon Sep 17 00:00:00 2001 From: liupopo Date: Tue, 6 Dec 2022 18:04:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- base-ui/package.json | 2 +- .../biz/gdinventory/GdInventoryRest.java | 1 - .../biz/gdinventory/GdInventoryService.java | 18 +++++++++--------- .../supervise/portal/extexcel/ExcelTool.java | 2 +- 4 files changed, 11 insertions(+), 12 deletions(-) diff --git a/base-ui/package.json b/base-ui/package.json index ddefe999..e9f70fd4 100644 --- a/base-ui/package.json +++ b/base-ui/package.json @@ -4,7 +4,7 @@ "description": "A vue admin template with Element UI & axios & iconfont & permission control & lint", "author": "Pan ", "scripts": { - "dev": "vue-cli-service serve", + "dev": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve", "build:prod": "vue-cli-service build", "build:stage": "vue-cli-service build --mode staging", "preview": "node build/index.js --preview", diff --git a/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinventory/GdInventoryRest.java b/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinventory/GdInventoryRest.java index f076203e..c7d9a1fc 100644 --- a/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinventory/GdInventoryRest.java +++ b/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinventory/GdInventoryRest.java @@ -66,7 +66,6 @@ public class GdInventoryRest { @PostMapping("/upToCount") public ResultBean upToCount(@RequestParam("file") MultipartFile file) { - System.out.println("ffffff"); ResultBean rb = gdInventoryService.importAndCount(file); return ResultBean.fireSuccess(); } diff --git a/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinventory/GdInventoryService.java b/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinventory/GdInventoryService.java index b04154a8..ded2caf5 100644 --- a/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinventory/GdInventoryService.java +++ b/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinventory/GdInventoryService.java @@ -295,17 +295,17 @@ public class GdInventoryService extends ServiceImpl 0) { GdInventory gd = new GdInventory(); - gd.setOrgCode((String) r.get(0)); // 企业组织机构代码证 - gd.setWarehouseCode((String) r.get(1)); // 仓库/门店编号 - gd.setWarehouseName((String) r.get(2)); // 仓库/门店名称 - gd.setProdCode((String) r.get(3)); // 商品编码 - gd.setProdBarCode((String) r.get(4)); // 商品条码 - gd.setProdName((String) r.get(5)); // 商品名称 + gd.setOrgCode("" + r.get(0)); // 企业组织机构代码证 + gd.setWarehouseCode("" + r.get(1)); // 仓库/门店编号 + gd.setWarehouseName("" + r.get(2)); // 仓库/门店名称 + gd.setProdCode("" + r.get(3)); // 商品编码 + gd.setProdBarCode("" + r.get(4)); // 商品条码 + gd.setProdName("" + r.get(5)); // 商品名称 gd.setWarehouseType(ExcelTool.toInt(r.get(6))); // 仓库类型 gd.setProdNum(ExcelTool.toInt(r.get(7))); // 商品数量 gd.setProdValue(ExcelTool.toDouble(r.get(8))); // 商品货值 - gd.setSuppliderName((String) r.get(9)); // 供应商 - gd.setDatadate((String) r.get(10)); // 数据日期 + gd.setSuppliderName("" + r.get(9)); // 供应商 + gd.setDatadate("" + r.get(10)); // 数据日期 toInsertList.add(gd); if (1600 == num) { @@ -337,7 +337,7 @@ public class GdInventoryService extends ServiceImpl fub = fileUploadComponent.uploadFile(file); + ResultBean fub = fileUploadComponent.uploadFile(file, "kcxxcx"); String filePath = fub.getData().getFilePath(); String fp = fileUploadComponent.getUploadPath() + filePath; diff --git a/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/extexcel/ExcelTool.java b/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/extexcel/ExcelTool.java index 9d2f63db..ef7731e9 100644 --- a/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/extexcel/ExcelTool.java +++ b/yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/extexcel/ExcelTool.java @@ -66,7 +66,7 @@ public class ExcelTool { public static int toInt(Object obj) { if (obj == null) return 0; - String s = obj.toString(); + String s = ""+ obj; if (StringUtils.isBlank(s)) return 0; int rs = 0;