From 063d3319e536ec894882dff6dae01fa092e856d9 Mon Sep 17 00:00:00 2001 From: "0.0" <1092404103.qq.com> Date: Sun, 8 Oct 2023 09:38:19 +0800 Subject: [PATCH 1/4] =?UTF-8?q?1.=E9=99=90=E5=88=B6=E9=87=8D=E5=A4=8D?= =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../springblade/common/utils/HttpHelper.java | 56 +++++++++++++++++++ .../DistributionStockupAppController.java | 1 + .../WarehouseGoodsAllocationController.java | 47 ++++++++++++++++ 3 files changed, 104 insertions(+) create mode 100644 blade-biz-common/src/main/java/org/springblade/common/utils/HttpHelper.java diff --git a/blade-biz-common/src/main/java/org/springblade/common/utils/HttpHelper.java b/blade-biz-common/src/main/java/org/springblade/common/utils/HttpHelper.java new file mode 100644 index 000000000..ff592c5a6 --- /dev/null +++ b/blade-biz-common/src/main/java/org/springblade/common/utils/HttpHelper.java @@ -0,0 +1,56 @@ +package org.springblade.common.utils; + +import org.apache.commons.lang.exception.ExceptionUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import javax.servlet.ServletRequest; +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.nio.charset.Charset; + +/** + * 通用http工具封装 + * + * @author lmy + */ +public class HttpHelper +{ + private static final Logger LOGGER = LoggerFactory.getLogger(HttpHelper.class); + + public static String getBodyString(ServletRequest request) + { + StringBuilder sb = new StringBuilder(); + BufferedReader reader = null; + try (InputStream inputStream = request.getInputStream()) + { + reader = new BufferedReader(new InputStreamReader(inputStream, Charset.forName("UTF-8"))); + String line = ""; + while ((line = reader.readLine()) != null) + { + sb.append(line); + } + } + catch (IOException e) + { + LOGGER.warn("getBodyString出现问题!"); + } + finally + { + if (reader != null) + { + try + { + reader.close(); + } + catch (IOException e) + { + LOGGER.error(ExceptionUtils.getMessage(e)); + } + } + } + return sb.toString(); + } +} diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java index d80c9dc71..eb7fe4291 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java @@ -24,6 +24,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.logpm.basicdata.feign.IBasicdataGoodsAreaClient; import com.logpm.distribution.bean.Resp; + import com.logpm.distribution.config.RedissonConfig; import com.logpm.distribution.dto.app.StockupDTO; import com.logpm.distribution.entity.*; diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/WarehouseGoodsAllocationController.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/WarehouseGoodsAllocationController.java index b0098f0ac..a05494c37 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/WarehouseGoodsAllocationController.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/WarehouseGoodsAllocationController.java @@ -21,6 +21,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.logpm.basicdata.entity.BasicdataWarehouseEntity; import com.logpm.basicdata.feign.IBasicdataWarehouseClient; + +import com.logpm.warehouse.config.RedissonConfig; import com.logpm.warehouse.dto.*; import com.logpm.warehouse.entity.WarehouseGoodsAllocationEntity; import com.logpm.warehouse.excel.WarehouseGoodsAllocationExcel; @@ -35,6 +37,7 @@ import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import lombok.AllArgsConstructor; import lombok.extern.log4j.Log4j2; +import org.redisson.api.RLock; import org.springblade.common.exception.CustomerException; import org.springblade.core.boot.ctrl.BladeController; import org.springblade.core.excel.util.ExcelUtil; @@ -55,6 +58,7 @@ import javax.validation.Valid; import java.util.List; import java.util.Map; import java.util.Objects; +import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; /** @@ -207,6 +211,13 @@ public class WarehouseGoodsAllocationController extends BladeController { public R uporder(@RequestBody UpdownTypeDTO updownTypeDTO) { List upShelfOrderList = updownTypeDTO.getUpShelfOrderList(); Long allocationId = updownTypeDTO.getAllocationId(); + //设置lockey + String lockKey ="lock:upPackage:" + allocationId; + RLock lock = new RedissonConfig().redisson().getLock(lockKey); + if(lock.isLocked()){ + return R.fail("该货位还在上架中!!!"); + } + lock.lock(5, TimeUnit.SECONDS); if (upShelfOrderList.size() == 0 || Objects.isNull(allocationId)) { return R.fail("参数不全"); } @@ -239,6 +250,13 @@ public class WarehouseGoodsAllocationController extends BladeController { //取出服务号 List upShelfOrderList = updownTypeDTO.getUpShelfOrderList(); Long allocationId = updownTypeDTO.getAllocationId(); + //设置lockey + String lockKey ="lock:upPackage:" + allocationId; + RLock lock = new RedissonConfig().redisson().getLock(lockKey); + if(lock.isLocked()){ + return R.fail("该货位还在上架中!!!"); + } + lock.lock(5, TimeUnit.SECONDS); Boolean b = warehouseGoodsAllocationService.selectIsStocking(allocationId); if (b){ return R.fail("备货区不可上架"); @@ -274,6 +292,13 @@ public class WarehouseGoodsAllocationController extends BladeController { //取出包条Id List upShelfPackageList = updownTypeDTO.getUpShelfPackageList(); Long allocationId = updownTypeDTO.getAllocationId(); + //设置lockey + String lockKey ="lock:upPackage:" + allocationId; + RLock lock = new RedissonConfig().redisson().getLock(lockKey); + if(lock.isLocked()){ + return R.fail("该货位还在上架中!!!"); + } + lock.lock(3, TimeUnit.SECONDS); if (upShelfPackageList.size() == 0 || Objects.isNull(allocationId)) { return R.fail("参数不全"); } @@ -287,6 +312,7 @@ public class WarehouseGoodsAllocationController extends BladeController { } R r = warehouseUpdownTypeService.upShelfPackage(upShelfPackageList, allocationId,myCurrentWarehouse.getId()); + // if (r.getCode() == 200) { // warehouseGoodsAllocationService.updateAllocationCache(allocationId.toString()); // } @@ -302,6 +328,13 @@ public class WarehouseGoodsAllocationController extends BladeController { public R upTray(@RequestBody UpdownTypeDTO updownTypeDTO) { String trayCode = updownTypeDTO.getCode();//托盘码 Long allocationId = updownTypeDTO.getAllocationId(); + //设置lockey + String lockKey ="lock:upPackage:" + allocationId; + RLock lock = new RedissonConfig().redisson().getLock(lockKey); + if(lock.isLocked()){ + return R.fail("该货位还在上架中!!!"); + } + lock.lock(5, TimeUnit.SECONDS); if (null == allocationId || StringUtil.isBlank(trayCode)) { return R.fail("参数不全"); } @@ -330,6 +363,13 @@ public class WarehouseGoodsAllocationController extends BladeController { public R upStock(@RequestBody UpdownTypeDTO updownTypeDTO) { Long allocationId = updownTypeDTO.getAllocationId();//库位Id List upShelfStockList = updownTypeDTO.getUpShelfStockList(); + //设置lockey + String lockKey ="lock:upPackage:" + allocationId; + RLock lock = new RedissonConfig().redisson().getLock(lockKey); + if(lock.isLocked()){ + return R.fail("该货位还在上架中!!!"); + } + lock.lock(5, TimeUnit.SECONDS); if (null == allocationId || upShelfStockList.size() == 0) { return R.fail("参数不全"); } @@ -360,6 +400,13 @@ public class WarehouseGoodsAllocationController extends BladeController { public R upZeroOrder(@RequestBody UpdownTypeDTO updownTypeDTO) { Long allocationId = updownTypeDTO.getAllocationId();//库位编码 List upShelfZeroOrderList = updownTypeDTO.getUpShelfZeroOrderList(); + //设置lockey + String lockKey ="lock:upPackage:" + allocationId; + RLock lock = new RedissonConfig().redisson().getLock(lockKey); + if(lock.isLocked()){ + return R.fail("该货位还在上架中!!!"); + } + lock.lock(5, TimeUnit.SECONDS); if (null == allocationId || upShelfZeroOrderList.size() == 0) { return R.fail("参数不全"); } From a2de51ca9d1a3ec3b5449b08262708437619d7f0 Mon Sep 17 00:00:00 2001 From: kilo Date: Sun, 8 Oct 2023 10:52:53 +0800 Subject: [PATCH 2/4] =?UTF-8?q?sql=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/dpm/物流租户系统.pdma.json | 1296 +++++++++++++++++++++++++- 1 file changed, 1295 insertions(+), 1 deletion(-) diff --git a/doc/dpm/物流租户系统.pdma.json b/doc/dpm/物流租户系统.pdma.json index 05feadf62..48503ca79 100644 --- a/doc/dpm/物流租户系统.pdma.json +++ b/doc/dpm/物流租户系统.pdma.json @@ -5,6 +5,7 @@ "version": "4.5.1", "createdTime": "2023-3-27 13:32:56", "updatedTime": "2023-9-26 11:11:22", + "updatedTime": "2023-9-22 16:47:40", "dbConns": [], "profile": { "default": { @@ -58432,6 +58433,1296 @@ ], "correlations": [], "indexes": [] + }, + { + "id": "32FF9787-F8F9-44E6-A3E1-CBFED42CCDD3", + "env": { + "base": { + "nameSpace": "", + "codeRoot": "" + } + }, + "defKey": "logpm_distribution_addvalue_package", + "defName": "增值服务包件表", + "comment": "", + "properties": { + "partitioned by": "(date string)", + "row format delimited": "", + "fields terminated by ','": "", + "collection items terminated by '-'": "", + "map keys terminated by ':'": "", + "store as textfile;": "" + }, + "nameTemplate": "{defKey}[{defName}]", + "notes": {}, + "headers": [ + { + "refKey": "hideInGraph", + "hideInGraph": true + }, + { + "refKey": "defKey", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "defName", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "primaryKey", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "notNull", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "autoIncrement", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "domain", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "type", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "len", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "scale", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "comment", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "refDict", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "defaultValue", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "isStandard", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "uiHint", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "extProps", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr1", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr2", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr3", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr4", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr5", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr6", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr7", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr8", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr9", + "freeze": false, + "hideInGraph": true + } + ], + "fields": [ + { + "defKey": "tenant_id", + "defName": "租户号", + "comment": "", + "type": "", + "len": 32, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": true, + "domain": "16120F75-6AA7-4483-868D-F07F511BB081", + "refDict": "", + "uiHint": "", + "id": "1097E446-7AF5-41E8-95E6-6C25EE4AD883" + }, + { + "defKey": "create_user", + "defName": "创建人", + "comment": "", + "domain": "16120F75-6AA7-4483-868D-F07F511BB081", + "type": "", + "len": 32, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": true, + "refDict": "", + "uiHint": "", + "id": "1C8F61DC-980B-4793-AFB7-E22C85536690" + }, + { + "defKey": "create_time", + "defName": "创建时间", + "comment": "", + "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": true, + "refDict": "", + "uiHint": "", + "id": "A9E6F7A7-78F6-4E28-9042-E1486878B59E" + }, + { + "defKey": "update_user", + "defName": "更新人", + "comment": "", + "domain": "16120F75-6AA7-4483-868D-F07F511BB081", + "type": "", + "len": 32, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": true, + "refDict": "", + "uiHint": "", + "id": "77EFDA36-E6D6-46F6-BF79-D277688D10E8" + }, + { + "defKey": "update_time", + "defName": "更新时间", + "comment": "", + "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": true, + "refDict": "", + "uiHint": "", + "id": "FF4E89C6-DFC0-45F6-B994-42D4237FA0F4" + }, + { + "defKey": "status", + "defName": "状态", + "comment": "", + "type": "INT", + "len": 2, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "", + "id": "3ACF69B9-E043-4097-84C2-BBC0E31472C6" + }, + { + "defKey": "is_deleted", + "defName": "是否已删除", + "comment": "", + "type": "INT", + "len": 2, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "", + "id": "70206502-C37A-4979-B03F-EC820B2E3409" + }, + { + "defKey": "create_dept", + "defName": "创建部门", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E", + "id": "9AD74B8B-B435-42DF-8BA6-93903AE6C167" + }, + { + "defKey": "id", + "defName": "主键", + "comment": "", + "type": "INT", + "len": 20, + "scale": "", + "primaryKey": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "", + "id": "2B19AC11-5C84-43B1-9EFC-ACB56CCEC179" + }, + { + "defKey": "reserve1", + "defName": "预留1", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "id": "4CDEF220-146C-4025-86C9-32E7AE86A4A7" + }, + { + "defKey": "reserve2", + "defName": "预留2", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "id": "B3EFEF1D-78F1-4155-8CF6-017E351A802C" + }, + { + "defKey": "reserve3", + "defName": "预留3", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "id": "A425F7CE-6C53-44AE-9ECC-4EC3AA8F9941" + }, + { + "defKey": "reserve4", + "defName": "预留4", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "id": "C7437F5A-5284-4073-B36F-CC5D30A69448" + }, + { + "defKey": "reserve5", + "defName": "预留5", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "id": "DDBC67DE-6247-4222-88FF-9679325F1CDC" + }, + { + "defKey": "package_id", + "defName": "包件ID", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "id": "4BF55B95-8860-45BF-9749-8A1FF9BE61F5" + }, + { + "defKey": "conditions", + "defName": "包件类型", + "comment": "1-订制品;2-库存品", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E", + "id": "7D82DA2F-274A-496D-A85D-296031510FB0" + }, + { + "defKey": "order_package_code", + "defName": "包条码", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "id": "64CFB289-4925-4CF0-93B7-B2776DA1AC64" + }, + { + "defKey": "order_code", + "defName": "订单自编号", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "id": "7C519B8C-A2BC-4871-AC5D-3312E80A9FAF" + }, + { + "defKey": "material_name", + "defName": "商配名称", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "id": "FF517130-0BA4-4A56-B9FD-27690E0D3E37" + }, + { + "defKey": "stock_article_id", + "defName": "订单ID", + "comment": "", + "type": "bigint", + "len": 255, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "", + "id": "4A46461A-7E45-48A5-9663-45A5DAF7798B" + }, + { + "defKey": "quantity", + "defName": "数量", + "comment": "", + "type": "INT", + "len": 255, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "", + "id": "59ADE4B7-C7BF-476E-9EAA-6E0258A6A9F7" + }, + { + "defKey": "reservation_id", + "defName": "客户ID", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "id": "08B6DEEF-B60E-420C-8580-1AF37EC3FCAC" + }, + { + "defKey": "addvalue_detail_id", + "defName": "增值服务详情表ID", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "id": "AD9059C6-135E-4BDB-A1CA-7F2E9CFE084A" + } + ], + "correlations": [], + "indexes": [] + }, + { + "id": "F645022F-4DC6-4781-BD0B-BE67F893BC66", + "env": { + "base": { + "nameSpace": "", + "codeRoot": "" + } + }, + "defKey": "logpm_distribution_abnormal_loadingscan", + "defName": "异常装车扫描表", + "comment": "", + "properties": { + "partitioned by": "(date string)", + "row format delimited": "", + "fields terminated by ','": "", + "collection items terminated by '-'": "", + "map keys terminated by ':'": "", + "store as textfile;": "" + }, + "nameTemplate": "{defKey}[{defName}]", + "notes": {}, + "headers": [ + { + "refKey": "hideInGraph", + "hideInGraph": true + }, + { + "refKey": "defKey", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "defName", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "primaryKey", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "notNull", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "autoIncrement", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "domain", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "type", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "len", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "scale", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "comment", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "refDict", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "defaultValue", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "isStandard", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "uiHint", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "extProps", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr1", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr2", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr3", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr4", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr5", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr6", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr7", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr8", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr9", + "freeze": false, + "hideInGraph": true + } + ], + "fields": [ + { + "defKey": "tenant_id", + "defName": "租户号", + "comment": "", + "type": "", + "len": 32, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": true, + "domain": "16120F75-6AA7-4483-868D-F07F511BB081", + "refDict": "", + "uiHint": "", + "id": "9621FA0B-0688-42CB-B77C-1A4E081384C1" + }, + { + "defKey": "create_user", + "defName": "创建人", + "comment": "", + "domain": "16120F75-6AA7-4483-868D-F07F511BB081", + "type": "", + "len": 32, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": true, + "refDict": "", + "uiHint": "", + "id": "3252F99F-73A9-4B24-919C-A4DC4D79D393" + }, + { + "defKey": "create_time", + "defName": "创建时间", + "comment": "", + "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": true, + "refDict": "", + "uiHint": "", + "id": "7B8D8E52-1FCB-4B6E-969A-B1579E72C77A" + }, + { + "defKey": "update_user", + "defName": "更新人", + "comment": "", + "domain": "16120F75-6AA7-4483-868D-F07F511BB081", + "type": "", + "len": 32, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": true, + "refDict": "", + "uiHint": "", + "id": "A96FD184-6AF0-4653-BA58-35CB32266CC9" + }, + { + "defKey": "update_time", + "defName": "更新时间", + "comment": "", + "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": true, + "refDict": "", + "uiHint": "", + "id": "31B7A8EB-3817-4C67-A7A2-30D5FE30E116" + }, + { + "defKey": "status", + "defName": "状态", + "comment": "", + "type": "INT", + "len": 2, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "", + "id": "323321C5-CCED-4164-9F11-569A8D1A902D" + }, + { + "defKey": "is_deleted", + "defName": "是否已删除", + "comment": "", + "type": "INT", + "len": 2, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "", + "id": "3F999195-18F0-4398-904E-3422E43E44C9" + }, + { + "defKey": "create_dept", + "defName": "创建部门", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E", + "id": "E62DC266-3DFC-45FC-859F-13A92C237ED3" + }, + { + "defKey": "id", + "defName": "主键", + "comment": "", + "type": "INT", + "len": 20, + "scale": "", + "primaryKey": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "", + "id": "38D448BC-5BF5-402A-AE27-49E44DDB148D" + }, + { + "defKey": "reservation_id", + "defName": "预约ID", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "id": "08AF9607-CDDF-4049-BF94-5C0CD94C2F01" + }, + { + "defKey": "delivery_list_id", + "defName": "配送管理ID", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "id": "03B45F2D-E685-4279-BDF0-7FC1FBC1C865" + }, + { + "defKey": "package_id", + "defName": "包件ID", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "id": "509D4433-7DEF-49F1-82C7-6E6FFBE3D893" + }, + { + "defKey": "stock_article_id", + "defName": "订单ID", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "id": "C6A1D611-CAB1-4564-B33D-26FDB00274D3" + }, + { + "defKey": "sacn_user", + "defName": "扫描操作人", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "id": "FC9FAE6C-C04F-40A9-9F6C-81A7A3175507" + }, + { + "defKey": "scan_time", + "defName": "扫描操作时间", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "id": "6376918F-FF5F-4C1E-B63C-623838095E39" + }, + { + "defKey": "package_code", + "defName": "包条码", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "id": "9DAAF005-3CDE-4BDE-BBDF-F35B6DBBD9E7" + }, + { + "defKey": "train_number", + "defName": "车次号", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "id": "1B79F706-D7E9-4EE3-A8DD-7DDF8078DE4E" + }, + { + "defKey": "driver_id", + "defName": "司机ID", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "id": "41500EC6-99CB-48D6-8572-810E4CB9C46A" + }, + { + "defKey": "driver_name", + "defName": "司机名称", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "id": "A5C05D8D-930D-402E-86DF-A5A80E7E4F81" + }, + { + "defKey": "vehicle_id", + "defName": "车辆ID", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "id": "763D4733-1179-4B0C-9771-D0C014EA5007" + }, + { + "defKey": "vehicle_name", + "defName": "车牌号", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "id": "7E58FDB6-D18F-4F65-9CBB-C0936E49F91D" + }, + { + "defKey": "driver_phone", + "defName": "司机电话", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "id": "0647540C-0F29-40A8-8EAB-2A145CB4FEBB" + }, + { + "defKey": "warehouse_id", + "defName": "仓库Id", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "id": "A518A8A8-DD90-4F84-8C2C-FF8EAF9DAF9E" + }, + { + "defKey": "warehouse_name", + "defName": "仓库名称", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "id": "FE3A8C2C-2DB6-45E3-B6F2-6CED98372239" + }, + { + "defKey": "auditing_user", + "defName": "审核人", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "id": "22998C1F-5910-424C-9D5C-A4B3E6FA5E5C" + }, + { + "defKey": "auditing_time", + "defName": "审核时间", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "id": "D5E7B9ED-C838-4C00-8447-6680C87FCC4B" + }, + { + "defKey": "delivery_type", + "defName": "包件配送类型 1 - 商配 2-市配", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "id": "6F04C323-10B2-4D2F-AE23-FFFDFDD02697" + }, + { + "defKey": "remarks", + "defName": "备注", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "id": "3C93B302-77BC-4174-A371-FA0F4636E014" + }, + { + "defKey": "auditing_status", + "defName": "审核状态 1-未审核 2- 已审核 3 - 异常", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "id": "C5ED3B3A-D640-45F6-A18E-B1EB6FD9AE4D" + }, + { + "defKey": "loading_quantity", + "defName": "装车数量", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "id": "C0EC902F-32AF-4B22-937D-AF318B5F5123" + }, + { + "defKey": "reserve1", + "defName": "预留1", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "id": "5538F893-D43A-48BC-99D1-6DD4A13E4618" + }, + { + "defKey": "reserve2", + "defName": "预留2", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "id": "BE1B533B-B3AE-4F22-AAA2-4C09DF7A17FB" + }, + { + "defKey": "reserve3", + "defName": "预留3", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "id": "831E163C-BC61-48FA-84EA-129485A55A48" + }, + { + "defKey": "reserve4", + "defName": "预留4", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "id": "2A7A07FC-6D9E-423D-93E2-DBF96C4DC86B" + }, + { + "defKey": "reserve5", + "defName": "预留5", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "id": "F6961937-EA32-4AA8-8700-6D6BD661542D" + } + ], + "correlations": [], + "indexes": [] } ], "views": [], @@ -58583,6 +59874,9 @@ "341855F6-28A8-48FC-A5AF-7B69F2916907", "34520BCA-7B04-4B57-949B-D386718B529D", "76FCF47B-9E5A-4A5B-A6F5-D541FD35A6AC" + "34520BCA-7B04-4B57-949B-D386718B529D", + "32FF9787-F8F9-44E6-A3E1-CBFED42CCDD3", + "F645022F-4DC6-4781-BD0B-BE67F893BC66" ], "refViews": [], "refDiagrams": [], @@ -59118,4 +60412,4 @@ } } ] -} \ No newline at end of file +} From be51e88cfc1b202fb6486e61d1b00ef732bffc66 Mon Sep 17 00:00:00 2001 From: "0.0" <1092404103.qq.com> Date: Sun, 8 Oct 2023 11:43:51 +0800 Subject: [PATCH 3/4] =?UTF-8?q?1.=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BasicdataGoodsAreaController.java | 2 +- .../excel/BasicdatavisualizationSheetOne.java | 2 +- .../BasicdatavisualizationSheetThree.java | 2 +- .../excel/BasicdatavisualizationSheetTwo.java | 2 +- .../BasicdatavisualizationZreoSheetOne.java | 69 ++++++++++++++++++ .../BasicdatavisualizationZreoSheetTwo.java | 71 +++++++++++++++++++ .../service/IBasicdataGoodsAreaService.java | 2 +- .../impl/BasicdataGoodsAreaServiceImpl.java | 7 +- .../warehouse/config/RedissonConfig.java | 35 +++++++++ 9 files changed, 186 insertions(+), 6 deletions(-) create mode 100644 blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/excel/BasicdatavisualizationZreoSheetOne.java create mode 100644 blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/excel/BasicdatavisualizationZreoSheetTwo.java create mode 100644 blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/config/RedissonConfig.java diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataGoodsAreaController.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataGoodsAreaController.java index 5e4f57c12..d0bf23510 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataGoodsAreaController.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataGoodsAreaController.java @@ -260,7 +260,7 @@ public class BasicdataGoodsAreaController extends BladeController { public void visualizationwarehouse(@ApiIgnore @RequestParam Map visualization, HttpServletResponse response) { Long areaId = Long.valueOf((String) visualization.get("areaId")); log.info("areaId>>>>>>>>>>>>>{}",areaId); - basicdataGoodsAreaService.visualizationwarehouse(areaId,response); + basicdataGoodsAreaService.visualizationwarehouse(1,areaId,response); //ExcelUtil.exports(response, "货区数据" + DateUtil.time(), "货区数据表", list, BasicdataGoodsAreaexportExcel.class); } diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/excel/BasicdatavisualizationSheetOne.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/excel/BasicdatavisualizationSheetOne.java index 38870aaa4..6f12f76b0 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/excel/BasicdatavisualizationSheetOne.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/excel/BasicdatavisualizationSheetOne.java @@ -9,7 +9,7 @@ import lombok.Data; import java.io.Serializable; /** - * 车辆照片信息表 Excel实体类 + * 货区导出 Excel实体类 * * @author lmy * @since 2023-09-11 diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/excel/BasicdatavisualizationSheetThree.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/excel/BasicdatavisualizationSheetThree.java index f78edac3c..8b363d688 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/excel/BasicdatavisualizationSheetThree.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/excel/BasicdatavisualizationSheetThree.java @@ -9,7 +9,7 @@ import lombok.Data; import java.io.Serializable; /** - * 车辆照片信息表 Excel实体类 + * 货区导出 Excel实体类 * * @author lmy * @since 2023-09-11 diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/excel/BasicdatavisualizationSheetTwo.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/excel/BasicdatavisualizationSheetTwo.java index e0b5193e6..a5970c265 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/excel/BasicdatavisualizationSheetTwo.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/excel/BasicdatavisualizationSheetTwo.java @@ -9,7 +9,7 @@ import lombok.Data; import java.io.Serializable; /** - * 车辆照片信息表 Excel实体类 + * 货区导出 Excel实体类 * * @author lmy * @since 2023-09-11 diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/excel/BasicdatavisualizationZreoSheetOne.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/excel/BasicdatavisualizationZreoSheetOne.java new file mode 100644 index 000000000..824535359 --- /dev/null +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/excel/BasicdatavisualizationZreoSheetOne.java @@ -0,0 +1,69 @@ +package com.logpm.basicdata.excel; + +import com.alibaba.excel.annotation.ExcelProperty; +import com.alibaba.excel.annotation.write.style.ColumnWidth; +import com.alibaba.excel.annotation.write.style.ContentRowHeight; +import com.alibaba.excel.annotation.write.style.HeadRowHeight; +import lombok.Data; + +import java.io.Serializable; + +/** + * 货区零担导出 Excel实体类 + * + * @author lmy + * @since 2023-09-11 + */ +@Data +@ColumnWidth(25) +@HeadRowHeight(20) +@ContentRowHeight(18) +public class BasicdatavisualizationZreoSheetOne implements Serializable { + + /** + * 运单号 + */ + @ColumnWidth(40) + @ExcelProperty("运单号") + private String waybillNumber; + /** + * 货物名称 + */ + @ColumnWidth(40) + @ExcelProperty("货物名称") + private String goodsName; + /** + * 托盘码 + */ + @ColumnWidth(40) + @ExcelProperty("托盘码") + private String trayCode; + + /** + * 库位号 + */ + @ColumnWidth(30) + @ExcelProperty("库位号") + private String positionInfo; + + /** + * 数量 + */ + @ColumnWidth(20) + @ExcelProperty("数量") + private String num; + + /** + * 上架时间 + */ + @ColumnWidth(20) + @ExcelProperty("上架时间") + private String upTime; + + /** + * 上架人 + */ + @ColumnWidth(20) + @ExcelProperty("上架人") + private String upUser; +} diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/excel/BasicdatavisualizationZreoSheetTwo.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/excel/BasicdatavisualizationZreoSheetTwo.java new file mode 100644 index 000000000..43e91f42b --- /dev/null +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/excel/BasicdatavisualizationZreoSheetTwo.java @@ -0,0 +1,71 @@ +package com.logpm.basicdata.excel; + +import com.alibaba.excel.annotation.ExcelProperty; +import com.alibaba.excel.annotation.write.style.ColumnWidth; +import com.alibaba.excel.annotation.write.style.ContentRowHeight; +import com.alibaba.excel.annotation.write.style.HeadRowHeight; +import lombok.Data; + +import java.io.Serializable; + +/** + * 货区零担导出 Excel实体类 + * + * @author lmy + * @since 2023-09-11 + */ +@Data +@ColumnWidth(25) +@HeadRowHeight(20) +@ContentRowHeight(18) +public class BasicdatavisualizationZreoSheetTwo implements Serializable { + + /** + * 库位号 + */ + @ColumnWidth(40) + @ExcelProperty("库位号") + private String positionInfo; + + /** + * 一级品类 + */ + @ColumnWidth(40) + @ExcelProperty("一级品类") + private String firsts; + + /** + * 二级品类 + */ + @ColumnWidth(40) + @ExcelProperty("二级品类") + private String second; + + /** + * 三级品类 + */ + @ColumnWidth(30) + @ExcelProperty("三级品类") + private String thirdProduct; + + /** + * 订单自编号 + */ + @ColumnWidth(30) + @ExcelProperty("订单自编号") + private String orderCode; + + /** + * 物料名称 + */ + @ColumnWidth(30) + @ExcelProperty("物料名称") + private String materialName; + + /** + * 数量 + */ + @ColumnWidth(20) + @ExcelProperty("数量") + private String num; +} diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataGoodsAreaService.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataGoodsAreaService.java index 494cbc04e..d9225ffd0 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataGoodsAreaService.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataGoodsAreaService.java @@ -117,7 +117,7 @@ public interface IBasicdataGoodsAreaService extends BaseService basicdatavisualizationSheetOnes = baseMapper.exportWarehouseByorderId(areaId); //sheetTwo @@ -365,9 +366,13 @@ public class BasicdataGoodsAreaServiceImpl extends BaseServiceImpl>>>>>{}",var6); return; + } + }else { + } //return warehouseGoodsAreaList; } diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/config/RedissonConfig.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/config/RedissonConfig.java new file mode 100644 index 000000000..e40cd71fe --- /dev/null +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/config/RedissonConfig.java @@ -0,0 +1,35 @@ +package com.logpm.warehouse.config; + +import org.redisson.Redisson; +import org.redisson.config.Config; +import org.springblade.core.redis.cache.BladeRedis; +import org.springblade.core.tool.utils.SpringUtil; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.data.redis.connection.RedisConnectionFactory; +import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory; + +@Configuration +public class RedissonConfig { + + @Bean + public Redisson redisson() { + // 单机模式 + Config config = new Config(); + + BladeRedis bean = SpringUtil.getBean(BladeRedis.class); + + RedisConnectionFactory connectionFactory = bean.getRedisTemplate().getConnectionFactory(); + + LettuceConnectionFactory factory = (LettuceConnectionFactory) connectionFactory; + + String hostName = factory.getHostName(); + int port = factory.getPort(); + String password = factory.getPassword(); + + config.useSingleServer().setAddress("redis://"+hostName+":"+port).setDatabase(2); + config.useSingleServer().setPassword(password); + return (Redisson) Redisson.create(config); + } + +} From 0d214b98f1a5c831da9dbc9e23581c2f5b682d07 Mon Sep 17 00:00:00 2001 From: "pref_mail@163.com" <123456> Date: Sun, 8 Oct 2023 14:03:39 +0800 Subject: [PATCH 4/4] =?UTF-8?q?1.=E4=BF=AE=E6=94=B9=E5=BF=97=E9=82=A6?= =?UTF-8?q?=E5=8C=85=E4=BB=B6=E6=95=B0=E6=8D=AE=E7=BB=9F=E8=AE=A1bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/AsyncDataServiceImpl.java | 10 +-- .../java/com/logpm/factory/TestService.java | 83 +++++++++++++++++++ 2 files changed, 88 insertions(+), 5 deletions(-) diff --git a/blade-service/logpm-factory/src/main/java/com/logpm/factory/comfac/service/impl/AsyncDataServiceImpl.java b/blade-service/logpm-factory/src/main/java/com/logpm/factory/comfac/service/impl/AsyncDataServiceImpl.java index 979510dbb..d025e18f6 100644 --- a/blade-service/logpm-factory/src/main/java/com/logpm/factory/comfac/service/impl/AsyncDataServiceImpl.java +++ b/blade-service/logpm-factory/src/main/java/com/logpm/factory/comfac/service/impl/AsyncDataServiceImpl.java @@ -889,7 +889,7 @@ public class AsyncDataServiceImpl implements IAsyncDataService { advanceEntity.setOrderTypeName(zbReceiptEntity.getOrderType()); //订单类型名称 可以为空 advanceEntity.setOrderClassName("工厂"); //订单类型 可以为空 advanceEntity.setType(FactoryConstant.ZHIBANG); - int num = mathTotalOrderPackageNum(serviceNumEntity.getCustomerCode(), zbOrderPackageEntityList); + int num = mathTotalOrderPackageNum(serviceNumEntity.getRelationOrderCode(), zbOrderPackageEntityList); advanceEntity.setTotal(num); //订单总数据 advanceEntity.setMctsTruck(StringUtil.isBlank(zbReceiptEntity.getDepartCode()) ? "" : zbReceiptEntity.getDepartCode()); //车次 advanceEntity.setMctsTruckNo(zbReceiptEntity.getCarNumber()); @@ -945,14 +945,14 @@ public class AsyncDataServiceImpl implements IAsyncDataService { /** * 按照订单合同号统计下面的包件数量 * - * @param orderNum - * @param zbOrderPackageEntityList - * @return + * @param orderNum 订单号 + * @param zbOrderPackageEntityList 订单包间集合 + * @return int */ private int mathTotalOrderPackageNum(String orderNum, List zbOrderPackageEntityList) { int totalPackageNum = 0; for (ZbOrderPackageEntity entity : zbOrderPackageEntityList) { - if (entity.getCustomerCode().equals(orderNum)) { + if (entity.getRelationOrderCode().equals(orderNum)) { totalPackageNum++; } } diff --git a/blade-service/logpm-factory/src/test/java/com/logpm/factory/TestService.java b/blade-service/logpm-factory/src/test/java/com/logpm/factory/TestService.java index 7c5f94eef..3d315880f 100644 --- a/blade-service/logpm-factory/src/test/java/com/logpm/factory/TestService.java +++ b/blade-service/logpm-factory/src/test/java/com/logpm/factory/TestService.java @@ -11,6 +11,7 @@ import com.alibaba.excel.metadata.Sheet; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; +import com.alibaba.nacos.common.utils.MD5Utils; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; import com.baomidou.mybatisplus.extension.conditions.update.UpdateChainWrapper; @@ -20,6 +21,7 @@ import com.logpm.factory.comfac.dto.UnloadCarDTO; import com.logpm.factory.excel.ExcelMode; import com.logpm.factory.excel.JpDataMode; import com.logpm.factory.mt.entity.MtFactoryOrderMain; +import com.logpm.factory.mt.entity.MtOrderLogEntity; import com.logpm.factory.mt.entity.MtPushData; import com.logpm.factory.mt.service.IMtFactoryDataService; import com.logpm.factory.mt.service.IMtFactoryOrderMainService; @@ -31,6 +33,7 @@ import com.logpm.factory.oupai.service.IFactoryPackageService; import com.logpm.factory.oupai.service.IOuPaiFactoryService; import com.logpm.factory.oupai.service.impl.OuPaiFactoryServiceImpl; import com.logpm.factory.pan.service.IPanFactoryDataService; +import com.logpm.factory.snm.bean.Resp; import com.logpm.factory.snm.vo.MTOrderPackageRelationVO; import com.logpm.factory.zb.dto.ZBReceiptDTO; import com.logpm.factory.zb.entity.ZbFactoryLogEntity; @@ -69,6 +72,7 @@ import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.commons.CommonsMultipartFile; import java.io.*; +import java.nio.charset.StandardCharsets; import java.security.NoSuchAlgorithmException; import java.text.ParseException; import java.text.SimpleDateFormat; @@ -361,5 +365,84 @@ public class TestService { zbFactoryLogService.save(zbFactoryLogEntity); } + + @Test + public void test10() throws NoSuchAlgorithmException { + // 重新获取 + String appkey = "HuiTong"; + String appsecret = "HT20230822140820"; + String userid = "5003"; + String userpwd = "mt123456*"; + long time = new Date().getTime(); + + String sign = MD5Utils.md5Hex((appkey + appsecret + time).getBytes(StandardCharsets.UTF_8)); + String pwd = MD5Utils.md5Hex(userpwd.getBytes(StandardCharsets.UTF_8)); + JSONObject jsonObject1 = new JSONObject(); + jsonObject1.put("APPKEY", appkey); + jsonObject1.put("SIGN", sign); + jsonObject1.put("USERID", userid); + jsonObject1.put("USERPWD", pwd); + jsonObject1.put("Timestamp", time); + String result = HttpRequest.post("http://www.mengtian.cn/Auth/Validate") + .header("Content-Type", "application/json").body(jsonObject1.toJSONString()).timeout(5 * 1000) + .execute() + .body(); + //获取的结果转成json对象 + JSONObject jsonObject = JSONObject.parseObject(result); + System.out.println(jsonObject.toJSONString()); + + Integer code = jsonObject.getInteger("Result"); + String access_token = jsonObject.getString("Data"); + System.out.println(access_token); + } + + @Test + public void test11() throws NoSuchAlgorithmException { + + + String url="http://www.mengtian.cn/ZXCFaHuoDan/QueRenShouHuo"; + String appkey = "HuiTong"; + String appsecret = "HT20230822140820"; + String userid = "5003"; + String userpwd = "mt123456*"; + // 发送数据 + String data ="{\"发货单编号\":\"HYLEJIA-230983\",\"确认收货时间\":\"2023-10-01 16:15:38\"}"; + + //先获取token + String token = "AMiwQcwT33JksqEfDeRFbjgRieAUo/ztCQWLfpFiEqZpvUXrv0OW1GcJPFhE+ZdmPYQo+K6rUwoJ53u58Bv85A=="; + //处理逻辑 + String result = HttpRequest.post(url) + .header("APPKEY", appkey) + .header("Authorization", token) + .header("USERID", userid) + .header("USERPWD", MD5Utils.md5Hex(userpwd.getBytes(StandardCharsets.UTF_8))) + .header("Content-Type", "application/json") + .body(data).timeout(5 * 1000) + .execute().body(); + + // 保存数据到数据库 +// MtOrderLogEntity mtOrderLogEntity = new MtOrderLogEntity(); +// mtOrderLogEntity.setReqArgs(data); +// mtOrderLogEntity.setResBody(result); +// mtOrderLogEntity.setType(type); +// mtOrderLogEntity.setRefCode(refCode); +// mtOrderLogService.save(mtOrderLogEntity); + + //把结果字符串转为json对象 + JSONObject jsonObject = JSONObject.parseObject(result); + + System.out.println(jsonObject); + if (!Objects.isNull(jsonObject)) { + Integer code = jsonObject.getInteger("Result"); + String message = jsonObject.getString("Message"); + } + + } + + @Test + public void test12(){ + + } + }