From 12a0d196e01b08d69c41dcd6d30309e74eb3b550 Mon Sep 17 00:00:00 2001 From: zhaoqiaobo <583671871@qq.com> Date: Thu, 22 Aug 2024 15:57:55 +0800 Subject: [PATCH] =?UTF-8?q?feat(all):=20=E4=BF=AE=E6=94=B9=E6=B6=88?= =?UTF-8?q?=E6=81=AF=E4=B8=BB=E4=BD=93=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../constant/broadcast/FanoutConstants.java | 59 ++++++++----------- .../common/enums/BizOperationEnums.java | 22 +++++++ .../springblade/common/enums/BrandEnums.java | 22 +------ .../common/model/NodeFanoutMsg.java | 6 ++ 4 files changed, 54 insertions(+), 55 deletions(-) create mode 100644 blade-biz-common/src/main/java/org/springblade/common/enums/BizOperationEnums.java diff --git a/blade-biz-common/src/main/java/org/springblade/common/constant/broadcast/FanoutConstants.java b/blade-biz-common/src/main/java/org/springblade/common/constant/broadcast/FanoutConstants.java index 7110caec7..94b0f9a1a 100644 --- a/blade-biz-common/src/main/java/org/springblade/common/constant/broadcast/FanoutConstants.java +++ b/blade-biz-common/src/main/java/org/springblade/common/constant/broadcast/FanoutConstants.java @@ -7,13 +7,13 @@ import org.springblade.common.constant.ModuleNameConstant; */ public abstract class FanoutConstants { - //干线 + // 干线 public interface trunkline { - //开单 - interface OPENWAYBILL{ + // 开单 + interface OPENWAYBILL { - //交换机 + // 交换机 String EXCHANGE = "fanout.trunkline.openWaybill" + ModuleNameConstant.DEVAUTH; interface QUEUE { @@ -26,10 +26,10 @@ public abstract class FanoutConstants { } - //改单 - interface UPDATEWAYBILL{ + // 改单 + interface UPDATEWAYBILL { - //交换机 + // 交换机 String EXCHANGE = "fanout.trunkline.updatewaybill" + ModuleNameConstant.DEVAUTH; interface QUEUE { @@ -41,10 +41,10 @@ public abstract class FanoutConstants { } - //包件日志 - interface PACKAGNODE{ + // 包件日志 + interface PACKAGNODE { - //交换机 + // 交换机 String EXCHANGE = "fanout.trunkline.packagenode" + ModuleNameConstant.DEVAUTH; interface QUEUE { @@ -60,15 +60,14 @@ public abstract class FanoutConstants { } - - //仓库 + // 仓库 public interface warehouse { - //打托 - interface TRAYTYPE{ + // 打托 + interface TRAYTYPE { - //交换机 + // 交换机 String EXCHANGE = "fanout.warehouse.traytype" + ModuleNameConstant.DEVAUTH; interface QUEUE { @@ -110,11 +109,10 @@ public abstract class FanoutConstants { // } + // 上架 + interface ALLOCATION { - //上架 - interface ALLOCATION{ - - //交换机 + // 交换机 String EXCHANGE = "fanout.warehouse.upshelf" + ModuleNameConstant.DEVAUTH; interface QUEUE { @@ -163,30 +161,20 @@ public abstract class FanoutConstants { */ public interface distribution { // 配送计划 - interface plan{ + interface plan { String EXCHANGE = "fanout.distribution.plan" + ModuleNameConstant.DEVAUTH; -// { -// "distributionCompany":"汇通", ##承运商 -// "driverName":"郑睿(主)", ##司机姓名 -// "id":1826509477920342017, ##任务ID -// "kind":"1", ##任务类型 1-自主 2-外协 -// "taskTime":"2024-08-22", ##任务时间 -// "trainNumber":"PSCCZNZX2024082200024", ##车次号 -// "type":"2", ##配送类型 -// "vehicleName":"川AB75115" ##车牌号 -// } + // main: {"distributionCompany":"承运商", "driverName":"司机姓名", "id":"任务ID", "kind":"任务类型 1-自主 2-外协", "taskTime":"任务时间", "trainNumber":"车次号","type":"配送类型 1商配 2市配", "vehicleName":"车牌号"} interface QUEUE { - + String REPORT = "fanout.distribution.plan.report" + ModuleNameConstant.DEVAUTH; } } - - - interface signfor{ + interface signfor { String EXCHANGE = "fanout.distribution.signfor" + ModuleNameConstant.DEVAUTH; + interface QUEUE { - String FACTORY_NODE_WORK_DISTRIBUTION_SIGNFOR_QUERY = "fanout.factory.nodework.distribution.signforquery"+ ModuleNameConstant.DEVAUTH; + String FACTORY_NODE_WORK_DISTRIBUTION_SIGNFOR_QUERY = "fanout.factory.nodework.distribution.signforquery" + ModuleNameConstant.DEVAUTH; } } @@ -194,5 +182,4 @@ public abstract class FanoutConstants { } - } diff --git a/blade-biz-common/src/main/java/org/springblade/common/enums/BizOperationEnums.java b/blade-biz-common/src/main/java/org/springblade/common/enums/BizOperationEnums.java new file mode 100644 index 000000000..47fba69cb --- /dev/null +++ b/blade-biz-common/src/main/java/org/springblade/common/enums/BizOperationEnums.java @@ -0,0 +1,22 @@ +package org.springblade.common.enums; + +import org.springblade.common.model.IDict; + +/** + * 业务操作枚举 + * + * @author zhaoqiaobo + * @create 2024-03-20 16:08 + */ +public enum BizOperationEnums implements IDict { + + ADD(1, "新增"), + MODIFY(2, "修改"), + DELETE(3, "删除"), + ; + + BizOperationEnums(Integer code, String value) { + init(code, value); + } + +} diff --git a/blade-biz-common/src/main/java/org/springblade/common/enums/BrandEnums.java b/blade-biz-common/src/main/java/org/springblade/common/enums/BrandEnums.java index b5f53f8a4..87fc9ef52 100644 --- a/blade-biz-common/src/main/java/org/springblade/common/enums/BrandEnums.java +++ b/blade-biz-common/src/main/java/org/springblade/common/enums/BrandEnums.java @@ -1,9 +1,6 @@ package org.springblade.common.enums; -import cn.hutool.core.util.EnumUtil; -import lombok.Getter; - -import java.io.Serializable; +import org.springblade.common.model.IDict; /** * 定义工厂枚举 @@ -11,8 +8,7 @@ import java.io.Serializable; * @author zhaoqiaobo * @create 2024-03-20 16:08 */ -@Getter -public enum BrandEnums implements Serializable { +public enum BrandEnums implements IDict { ZB(1, "志邦"), SNM(2, "诗尼曼"), @@ -26,20 +22,8 @@ public enum BrandEnums implements Serializable { LINSY(10, "林氏家居"), ; - private final Integer code; - private final String value; - BrandEnums(Integer code, String value) { - this.code = code; - this.value = value; - } - - public static BrandEnums getByCode(Integer code) { - return EnumUtil.getBy(BrandEnums::getCode, code); - } - - public static BrandEnums getByValue(String val) { - return EnumUtil.getBy(BrandEnums::getValue, val); + init(code, value); } } diff --git a/blade-biz-common/src/main/java/org/springblade/common/model/NodeFanoutMsg.java b/blade-biz-common/src/main/java/org/springblade/common/model/NodeFanoutMsg.java index bd6a4214a..4261709f7 100644 --- a/blade-biz-common/src/main/java/org/springblade/common/model/NodeFanoutMsg.java +++ b/blade-biz-common/src/main/java/org/springblade/common/model/NodeFanoutMsg.java @@ -6,6 +6,7 @@ import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; import org.springblade.common.constant.WorkNodeEnums; +import org.springblade.common.enums.BizOperationEnums; import java.io.Serializable; import java.util.Date; @@ -29,6 +30,11 @@ public class NodeFanoutMsg implements Serializable { */ private WorkNodeEnums node; + /** + * 业务操作 + */ + private BizOperationEnums bizOperation; + /** * 操作人 */