init(): 初始化通讯类
This commit is contained in:
@@ -0,0 +1,12 @@
|
|||||||
|
package com.fizz.business.anno;
|
||||||
|
|
||||||
|
import com.fizz.business.constants.enums.OpcMessageType;
|
||||||
|
|
||||||
|
import java.lang.annotation.*;
|
||||||
|
|
||||||
|
@Target(ElementType.TYPE)
|
||||||
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
@Documented
|
||||||
|
public @interface OpcMessageHandlerType {
|
||||||
|
OpcMessageType value();
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
package com.fizz.business.constants.enums;
|
||||||
|
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@AllArgsConstructor
|
||||||
|
|
||||||
|
public enum OpcMessageType {
|
||||||
|
|
||||||
|
ENTRY_MOVEMENT("入口移动"),
|
||||||
|
APP_MEASURE("测量值电文"),
|
||||||
|
EXIT_CUT("出口剪切"),
|
||||||
|
EXIT_MOVEMENT("出口移动"),
|
||||||
|
EXIT_MEASURE("出口测量");
|
||||||
|
|
||||||
|
private final String type;
|
||||||
|
}
|
||||||
@@ -1,152 +1,120 @@
|
|||||||
package com.fizz.business.domain;
|
package com.fizz.business.domain;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
|
||||||
import com.fizz.business.constants.enums.NextUnitEnum;
|
|
||||||
import com.fizz.business.constants.enums.OperModeEnum;
|
|
||||||
import com.fizz.business.constants.enums.PlanStatusEnum;
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.sql.Timestamp;
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@TableName("crm_pdi_plan")
|
@TableName("crm_pdi_plan")
|
||||||
public class CrmPdiPlan implements Serializable {
|
public class CrmPdiPlan implements Serializable {
|
||||||
|
|
||||||
@TableId(type = IdType.AUTO)
|
private static final long serialVersionUID = 1L;
|
||||||
@Schema(description = "id")
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
@Schema(description = "序号")
|
@TableId
|
||||||
private Integer seqid;
|
private Long id; // 主键ID
|
||||||
|
|
||||||
@Schema(description = "多火轧制次数")
|
private Integer seqid; // 主键ID
|
||||||
private Integer operid;
|
private String coilid; // 钢卷号
|
||||||
|
private Integer picklingCount; // 酸洗次数
|
||||||
@Schema(description = "轧制模式")
|
private Integer dummyCoilFlag; // 虚卷标识
|
||||||
private Integer operMode;
|
private Integer seqno; // 顺序号
|
||||||
|
private Integer status; // 状态
|
||||||
@Schema(description = "钢卷id")
|
private String planid; // 计划ID
|
||||||
private String coilid;
|
private String planType; // 计划类型
|
||||||
|
private BigDecimal yieldPoint; // 屈服点
|
||||||
@Schema(description = "热轧卷ID")
|
private BigDecimal entryWeight; // 入口重量(t)
|
||||||
private String hotCoilid;
|
private BigDecimal entryThick; // 入口厚度(mm)
|
||||||
|
private BigDecimal entryWidth; // 入口宽度(mm)
|
||||||
@Schema(description = "道次数")
|
private BigDecimal entryLength; // 入口长度(mm)
|
||||||
private Integer passno;
|
private BigDecimal entryOuterDiameter; // 入口外径(mm)
|
||||||
|
private BigDecimal entryInnerDiameter; // 入口内径(mm)
|
||||||
@Schema(description = "退火厚度")
|
private BigDecimal exitInnerDiameter; // 出口内径(mm)
|
||||||
private Double annealThick;
|
private String steelGrade; // 钢种
|
||||||
|
private String exitCoilid; // 出口卷号
|
||||||
@Schema(description = "入口厚度")
|
private Integer tlvFlag; // 张力平整标识
|
||||||
private Double entryThick;
|
private String orderNo; // 订单号
|
||||||
|
private String custommerCode; // 客户代码
|
||||||
@Schema(description = "入口宽度")
|
private BigDecimal orderThick; // 订单厚度(mm)
|
||||||
private Double entryWidth;
|
private BigDecimal orderWidth; // 订单宽度(mm)
|
||||||
|
private BigDecimal orderLenLow; // 订单长度下限(mm)
|
||||||
@Schema(description = "入口重量")
|
private BigDecimal orderLenUp; // 订单长度上限(mm)
|
||||||
private Double entryWeight;
|
private BigDecimal orderWt; // 订单重量(t)
|
||||||
|
private BigDecimal orderWtLow; // 订单重量下限(t)
|
||||||
@Schema(description = "入口长度")
|
private BigDecimal orderWtUp; // 订单重量上限(t)
|
||||||
private Double entryLength;
|
private BigDecimal orderMetCoatTop; // 订单镀层上
|
||||||
|
private BigDecimal orderMetCoatBot; // 订单镀层下
|
||||||
@Schema(description = "入口内径")
|
private String finalUse; // 最终用途
|
||||||
private Integer entryInnerDiameter;
|
private String hotCoilCode; // 热卷代码
|
||||||
|
private BigDecimal exitLengthTar; // 出口目标长度(mm)
|
||||||
@Schema(description = "入口外径")
|
private BigDecimal exitLengthTolMax; // 出口长度公差最大值(mm)
|
||||||
private Integer entryOuterDiameter;
|
private BigDecimal exitLengthTolMin; // 出口长度公差最小值(mm)
|
||||||
|
private BigDecimal exitThickTar; // 出口目标厚度(mm)
|
||||||
@Schema(description = "出口卷号")
|
private BigDecimal exitThickTolMax; // 出口厚度公差最大值(mm)
|
||||||
private String exitCoilid;
|
private BigDecimal exitThickTolMin; // 出口厚度公差最小值(mm)
|
||||||
|
private BigDecimal exitWidthTar; // 出口目标宽度(mm)
|
||||||
@Schema(description = "下工序代码")
|
private BigDecimal exitWidthTolMax; // 出口宽度公差最大值(mm)
|
||||||
private String nextUnit;
|
private BigDecimal exitWidthTolMin; // 出口宽度公差最小值(mm)
|
||||||
|
private String nextWholeBacklogCode; // 下道全流程积压代码
|
||||||
@Schema(description = "分切数量")
|
private String prevWholeBacklogCode; // 上道全流程积压代码
|
||||||
private Integer splitNum;
|
private String exitWtMode; // 出口重量模式
|
||||||
|
private Integer splitNum; // 分卷数量
|
||||||
@Schema(description = "分切模式")
|
private BigDecimal exitWeight1; // 出口重量1
|
||||||
private Integer cutMode;
|
private BigDecimal exitWeight2; // 出口重量2
|
||||||
|
private BigDecimal exitWeight3; // 出口重量3
|
||||||
@Schema(description = "出口重量1")
|
private BigDecimal exitWeight4; // 出口重量4
|
||||||
private Double exitValue1;
|
private BigDecimal exitWeight5; // 出口重量5
|
||||||
|
private BigDecimal exitWeight6; // 出口重量6
|
||||||
@Schema(description = "出口重量2")
|
private String headSampleMode; // 头部取样模式
|
||||||
private Double exitValue2;
|
private String headSamplePosition; // 头部取样位置
|
||||||
|
private BigDecimal headSampleLength; // 头部取样长度(mm)
|
||||||
@Schema(description = "出口重量3")
|
private String headSamplePlace; // 头部取样地点
|
||||||
private Double exitValue3;
|
private Integer headSampleNum; // 头部取样数量
|
||||||
|
private String tailSampleMode; // 尾部取样模式
|
||||||
@Schema(description = "出口重量4")
|
private String tailSamplePosition; // 尾部取样位置
|
||||||
private Double exitValue4;
|
private BigDecimal tailSampleLength; // 尾部取样长度(mm)
|
||||||
|
private String tailSamplePlace; // 尾部取样地点
|
||||||
@Schema(description = "出口重量5")
|
private Integer tailSampleNum; // 尾部取样数量
|
||||||
private Double exitValue5;
|
private LocalDateTime timestamp; // 时间戳
|
||||||
|
private LocalDateTime onlineDate; // 上线时间
|
||||||
@Schema(description = "出口重量6")
|
private LocalDateTime startDate; // 开始时间
|
||||||
private Double exitValue6;
|
private LocalDateTime endDate; // 结束时间
|
||||||
|
private LocalDateTime furInDate; // 进炉时间
|
||||||
@Schema(description = "出口重量")
|
private LocalDateTime furOutDate; // 出炉时间
|
||||||
private Double exitWeight;
|
private LocalDateTime createTime; // 创建时间
|
||||||
|
private LocalDateTime updateTime; // 更新时间
|
||||||
@Schema(description = "出口长度")
|
private String surfaceVice; // 副面
|
||||||
private Double exitLength;
|
private String weldCode; // 焊缝代码
|
||||||
|
private Integer spmFlag; // SPM标识
|
||||||
@Schema(description = "出口厚度")
|
private BigDecimal spmElongation; // SPM延伸率(%)
|
||||||
private Double exitThick;
|
private BigDecimal spmRollforce; // SPM轧制力
|
||||||
|
private String spmProcessType; // SPM工艺类型
|
||||||
@Schema(description = "出口宽度")
|
private String spmControlMode; // SPM控制模式
|
||||||
private Double exitWidth;
|
private BigDecimal spmBendingForce; // SPM弯曲力
|
||||||
|
private BigDecimal spmCrimpingRollMesh; // SPM咬入辊目
|
||||||
@Schema(description = "钢种")
|
private BigDecimal spmBillyRollMesh; // SPM精轧辊目
|
||||||
private String grade;
|
private Integer trimFlag; // 切边标识
|
||||||
|
private String tlvMode; // 张力平整模式
|
||||||
@Schema(description = "屈服强度")
|
private BigDecimal tlvElongation; // 张力平整延伸率(%)
|
||||||
private Integer yieldStrength;
|
private Integer chromating; // 钝化标识
|
||||||
|
private String coatingCode; // 镀层代码
|
||||||
@Schema(description = "抗拉强度")
|
private Integer oilingFlag; // 涂油标识
|
||||||
private Integer tensileStrength;
|
private String oilingType; // 涂油类型
|
||||||
|
private BigDecimal oilingTop; // 涂油上
|
||||||
@Schema(description = "状态")
|
private BigDecimal oilingBottom; // 涂油下
|
||||||
private String status;
|
private String heatCycle; // 热循环
|
||||||
|
private String coatingSelection; // 镀层选择
|
||||||
@Schema(description = "计划号")
|
private String coatingType; // 镀层类型
|
||||||
private String planNo;
|
private String chemTreatMode; // 化学处理模式
|
||||||
|
private BigDecimal aimWeightTop; // 目标重量上
|
||||||
@Schema(description = "压下率")
|
private BigDecimal aimWeightBottom; // 目标重量下
|
||||||
private Double reductionRate;
|
private BigDecimal maxTolWeightTop; // 最大公差重量上
|
||||||
|
private BigDecimal maxTolWeightBottom; // 最大公差重量下
|
||||||
@Schema(description = "热卷温度")
|
private BigDecimal headendGaugeLength; // 头端测厚长度(mm)
|
||||||
private Double hotCoilTemp;
|
private BigDecimal tailendGaugeLength; // 尾端测厚长度(mm)
|
||||||
|
private String origin; // 产地
|
||||||
@Schema(description = "厚度正偏差")
|
private String originCoilid; // 原卷号
|
||||||
private Double entryThickMaxtol;
|
|
||||||
|
|
||||||
@Schema(description = "厚度正偏差")
|
|
||||||
private Double entryThickMintol;
|
|
||||||
|
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
|
||||||
@Schema(description = "计划日期")
|
|
||||||
private LocalDateTime createTime;
|
|
||||||
|
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
|
||||||
@Schema(description = "记录日期")
|
|
||||||
private LocalDateTime insdate;
|
|
||||||
|
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
|
||||||
@Schema(description = "上线时间")
|
|
||||||
private LocalDateTime onlineTime;
|
|
||||||
|
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
|
||||||
@Schema(description = "开始日期")
|
|
||||||
private LocalDateTime startDate;
|
|
||||||
|
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
|
||||||
@Schema(description = "结束日期")
|
|
||||||
private LocalDateTime endDate;
|
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,134 @@
|
|||||||
|
package com.fizz.business.domain.msg;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ApiModel(description = "后处理段测量电文")
|
||||||
|
public class AppMeasureCoatMessage extends OpcMessage {
|
||||||
|
|
||||||
|
@ApiModelProperty("系统计数器 (ms)")
|
||||||
|
private Integer systemCounter;
|
||||||
|
|
||||||
|
@ApiModelProperty("钢带位置 (m),0 表示头部在参考点 (weld detector 2)")
|
||||||
|
private BigDecimal stripLocation;
|
||||||
|
|
||||||
|
@ApiModelProperty("测量次数 / 宽度")
|
||||||
|
private Integer measurementCount;
|
||||||
|
|
||||||
|
@ApiModelProperty("上层平均涂层重量 (g/m²)")
|
||||||
|
private BigDecimal avrCoatingWeightTop;
|
||||||
|
|
||||||
|
@ApiModelProperty("上层标准涂层重量 (g/m²)")
|
||||||
|
private BigDecimal stdCoatingWeightTop;
|
||||||
|
|
||||||
|
@ApiModelProperty("上层最大涂层重量 (g/m²)")
|
||||||
|
private BigDecimal maxCoatingWeightTop;
|
||||||
|
|
||||||
|
@ApiModelProperty("上层最小涂层重量 (g/m²)")
|
||||||
|
private BigDecimal minCoatingWeightTop;
|
||||||
|
|
||||||
|
@ApiModelProperty("下层平均涂层重量 (g/m²)")
|
||||||
|
private BigDecimal avrCoatingWeightBottom;
|
||||||
|
|
||||||
|
@ApiModelProperty("下层标准涂层重量 (g/m²)")
|
||||||
|
private BigDecimal stdCoatingWeightBottom;
|
||||||
|
|
||||||
|
@ApiModelProperty("下层最大涂层重量 (g/m²)")
|
||||||
|
private BigDecimal maxCoatingWeightBottom;
|
||||||
|
|
||||||
|
@ApiModelProperty("下层最小涂层重量 (g/m²)")
|
||||||
|
private BigDecimal minCoatingWeightBottom;
|
||||||
|
|
||||||
|
@ApiModelProperty("气刀压力")
|
||||||
|
private BigDecimal airKnifePressure;
|
||||||
|
|
||||||
|
@ApiModelProperty("气刀流量")
|
||||||
|
private BigDecimal airKnifeFlow;
|
||||||
|
|
||||||
|
@ApiModelProperty("气刀间隙")
|
||||||
|
private BigDecimal airKnifeGap;
|
||||||
|
|
||||||
|
@ApiModelProperty("TM出口钢带速度 (m/min)")
|
||||||
|
private BigDecimal stripSpeedTmExit;
|
||||||
|
|
||||||
|
@ApiModelProperty("钢带张力 BR5 – TM (daN)")
|
||||||
|
private BigDecimal tensionBr5Tm;
|
||||||
|
|
||||||
|
@ApiModelProperty("钢带张力 TM – BR6 (daN)")
|
||||||
|
private BigDecimal tensionTmBr6;
|
||||||
|
|
||||||
|
@ApiModelProperty("钢带张力 BR5 – BR6 (daN)")
|
||||||
|
private BigDecimal tensionBr5Br6;
|
||||||
|
|
||||||
|
@ApiModelProperty("TM mask (0x0001 tempering, 0x0002 type, 0x0004 pure water, 0x0008 water+detergent, 0x0010 control mode)")
|
||||||
|
private Integer tmMask;
|
||||||
|
|
||||||
|
@ApiModelProperty("TM延伸率 (%)")
|
||||||
|
private BigDecimal tmElongation;
|
||||||
|
|
||||||
|
@ApiModelProperty("操作侧辊压力 (kN)")
|
||||||
|
private BigDecimal rollForceOperator;
|
||||||
|
|
||||||
|
@ApiModelProperty("驱动侧辊压力 (kN)")
|
||||||
|
private BigDecimal rollForceDrive;
|
||||||
|
|
||||||
|
@ApiModelProperty("电机扭矩 (kNm)")
|
||||||
|
private BigDecimal motorTorque;
|
||||||
|
|
||||||
|
@ApiModelProperty("总弯曲力 (kN)")
|
||||||
|
private BigDecimal bendingForce;
|
||||||
|
|
||||||
|
@ApiModelProperty("防卷翘辊 - 网距 (mm)")
|
||||||
|
private BigDecimal antiCrimpingRollMesh;
|
||||||
|
|
||||||
|
@ApiModelProperty("Billy Roll - 网距 (mm)")
|
||||||
|
private BigDecimal billyRollMesh;
|
||||||
|
|
||||||
|
@ApiModelProperty("备用字段 1")
|
||||||
|
private BigDecimal spare1;
|
||||||
|
|
||||||
|
@ApiModelProperty("备用字段 2")
|
||||||
|
private BigDecimal spare2;
|
||||||
|
|
||||||
|
@ApiModelProperty("备用字段 3")
|
||||||
|
private BigDecimal spare3;
|
||||||
|
|
||||||
|
@ApiModelProperty("钢带张力 TL – BR7 (calc., daN)")
|
||||||
|
private BigDecimal tensionTlBr7;
|
||||||
|
|
||||||
|
@ApiModelProperty("钢带张力 BR6 – BR7 (calc., daN)")
|
||||||
|
private BigDecimal tensionBr6Br7;
|
||||||
|
|
||||||
|
@ApiModelProperty("拉矫机投用")
|
||||||
|
private Integer tlFlag;
|
||||||
|
|
||||||
|
@ApiModelProperty("TL延伸率 (%)")
|
||||||
|
private BigDecimal tlElongation;
|
||||||
|
|
||||||
|
@ApiModelProperty("Leveling Unit N°1 - 网距 (mm)")
|
||||||
|
private BigDecimal levelingUnit1Mesh;
|
||||||
|
|
||||||
|
@ApiModelProperty("Leveling Unit N°2 - 网距 (mm)")
|
||||||
|
private BigDecimal levelingUnit2Mesh;
|
||||||
|
|
||||||
|
@ApiModelProperty("Anti Cross Bow Unit - 网距 (mm)")
|
||||||
|
private BigDecimal antiCrossBowUnitMesh;
|
||||||
|
|
||||||
|
@ApiModelProperty("AFP段钢带张力 BR7 – BR8 (N/mm²)")
|
||||||
|
private BigDecimal tensionBr7Br8;
|
||||||
|
|
||||||
|
@ApiModelProperty("AFP段钢带速度 (m/min)")
|
||||||
|
private BigDecimal stripSpeedAfp;
|
||||||
|
|
||||||
|
@ApiModelProperty("钝化标记 1开启,2耐指纹,3干膜润滑剂")
|
||||||
|
private Integer coatingFlag;
|
||||||
|
|
||||||
|
@ApiModelProperty("AFP段钢带温度 (℃)")
|
||||||
|
private Integer stripTempAfp;
|
||||||
|
}
|
||||||
@@ -0,0 +1,74 @@
|
|||||||
|
package com.fizz.business.domain.msg;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ApiModel(description = "入口段测量电文")
|
||||||
|
public class AppMeasureEntryMessage extends OpcMessage {
|
||||||
|
|
||||||
|
@ApiModelProperty("系统计数器")
|
||||||
|
private Integer systemCounter;
|
||||||
|
|
||||||
|
@ApiModelProperty("入口钢卷标识")
|
||||||
|
private String entryCoilId;
|
||||||
|
|
||||||
|
@ApiModelProperty("钢带位置 (m),0 表示头部在参考点 (Welder)")
|
||||||
|
private BigDecimal stripLocation;
|
||||||
|
|
||||||
|
@ApiModelProperty("支付卷号,1 或 2")
|
||||||
|
private Integer payOffReelNumber;
|
||||||
|
|
||||||
|
@ApiModelProperty("钢带张力 POR – BR1 (daN)")
|
||||||
|
private BigDecimal tensionPorBr1;
|
||||||
|
|
||||||
|
@ApiModelProperty("钢带张力 BR1 – BR2 (daN)")
|
||||||
|
private BigDecimal tensionBr1Br2;
|
||||||
|
|
||||||
|
@ApiModelProperty("钢带张力 BR2 – BR3 (daN)")
|
||||||
|
private BigDecimal tensionBr2Br3;
|
||||||
|
|
||||||
|
@ApiModelProperty("钢带速度 (m/min)")
|
||||||
|
private BigDecimal stripSpeed;
|
||||||
|
|
||||||
|
@ApiModelProperty("入口活套位置最大值 (m)")
|
||||||
|
private BigDecimal entryLooperPositionMax;
|
||||||
|
|
||||||
|
@ApiModelProperty("入口活套位置最小值 (m)")
|
||||||
|
private BigDecimal entryLooperPositionMin;
|
||||||
|
|
||||||
|
@ApiModelProperty("当前实际活套位置 (m)")
|
||||||
|
private BigDecimal entryLooperPositionCurrent;
|
||||||
|
|
||||||
|
@ApiModelProperty("清洗电压 (V)")
|
||||||
|
private BigDecimal cleaningVoltage;
|
||||||
|
|
||||||
|
@ApiModelProperty("清洗电流 (A)")
|
||||||
|
private BigDecimal cleaningCurrent;
|
||||||
|
|
||||||
|
@ApiModelProperty("碱液浓度")
|
||||||
|
private BigDecimal alkaliConcentration;
|
||||||
|
|
||||||
|
@ApiModelProperty("碱液温度 (℃)")
|
||||||
|
private BigDecimal alkaliTemperature;
|
||||||
|
|
||||||
|
@ApiModelProperty("漂洗电导率")
|
||||||
|
private BigDecimal rinseConductivity;
|
||||||
|
|
||||||
|
@ApiModelProperty("漂洗温度 (℃)")
|
||||||
|
private BigDecimal rinseTemperature;
|
||||||
|
|
||||||
|
@ApiModelProperty("烘干温度 (℃)")
|
||||||
|
private BigDecimal dryingTemperature;
|
||||||
|
|
||||||
|
@ApiModelProperty("热风流量 (m3/h)")
|
||||||
|
private BigDecimal hotAirFlow;
|
||||||
|
|
||||||
|
@ApiModelProperty("热风压力 (Pa)")
|
||||||
|
private BigDecimal hotAirPressure;
|
||||||
|
}
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
package com.fizz.business.domain.msg;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ApiModel(description = "出口段/工艺段测量电文")
|
||||||
|
public class AppMeasureExitMessage extends OpcMessage {
|
||||||
|
|
||||||
|
@ApiModelProperty("系统计数器 (ms)")
|
||||||
|
private Integer systemCounter;
|
||||||
|
|
||||||
|
@ApiModelProperty("钢带位置 (m),0 表示头部在参考点 (weld detector 3)")
|
||||||
|
private BigDecimal stripLocation;
|
||||||
|
|
||||||
|
@ApiModelProperty("钢带张力 BR8 – BR9 (daN)")
|
||||||
|
private BigDecimal tensionBr8Br9;
|
||||||
|
|
||||||
|
@ApiModelProperty("出口活套位置 (m)")
|
||||||
|
private BigDecimal deliveryLooperPosition;
|
||||||
|
|
||||||
|
@ApiModelProperty("出口活套最大可用百分比 (%)")
|
||||||
|
private BigDecimal exitLooperMaxPercent;
|
||||||
|
|
||||||
|
@ApiModelProperty("出口活套最小可用百分比 (%)")
|
||||||
|
private BigDecimal exitLooperMinPercent;
|
||||||
|
|
||||||
|
@ApiModelProperty("出口活套当前百分比 (%)")
|
||||||
|
private BigDecimal exitLooperCurrentPercent;
|
||||||
|
|
||||||
|
@ApiModelProperty("涂油标志 (0=no, 1=yes)")
|
||||||
|
private Integer oilingFlag;
|
||||||
|
|
||||||
|
@ApiModelProperty("上层涂油量 (g/m²)")
|
||||||
|
private BigDecimal oilingAmountTop;
|
||||||
|
|
||||||
|
@ApiModelProperty("下层涂油量 (g/m²)")
|
||||||
|
private BigDecimal oilingAmountBottom;
|
||||||
|
|
||||||
|
@ApiModelProperty("钢带张力 BR9 – TR (daN)")
|
||||||
|
private BigDecimal tensionBr9Tr;
|
||||||
|
|
||||||
|
@ApiModelProperty("出口段钢带速度 (m/min)")
|
||||||
|
private BigDecimal speedExitSection;
|
||||||
|
|
||||||
|
@ApiModelProperty("钢卷长度 (m)")
|
||||||
|
private BigDecimal coilLength;
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,71 @@
|
|||||||
|
package com.fizz.business.domain.msg;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ApiModel(description = "退火炉段测量电文")
|
||||||
|
public class AppMeasureFurnaceMessage extends OpcMessage {
|
||||||
|
|
||||||
|
@ApiModelProperty("系统计数器 (ms)")
|
||||||
|
private Integer systemCounter;
|
||||||
|
|
||||||
|
@ApiModelProperty("入口钢卷标识")
|
||||||
|
private String entryCoilId;
|
||||||
|
|
||||||
|
@ApiModelProperty("钢带位置 (m),0 表示头部在参考点 (weld detector 1)")
|
||||||
|
private BigDecimal stripLocation;
|
||||||
|
|
||||||
|
@ApiModelProperty("钢带张力 BR3 (daN)")
|
||||||
|
private BigDecimal tensionBr3;
|
||||||
|
|
||||||
|
@ApiModelProperty("钢带张力 N°1 Furnace (daN)")
|
||||||
|
private BigDecimal tensionFurnace1;
|
||||||
|
|
||||||
|
@ApiModelProperty("钢带张力 N°2 Furnace (daN)")
|
||||||
|
private BigDecimal tensionFurnace2;
|
||||||
|
|
||||||
|
@ApiModelProperty("钢带速度 Furnace Entry (m/min)")
|
||||||
|
private BigDecimal stripSpeed;
|
||||||
|
|
||||||
|
@ApiModelProperty("Furnace 延伸率 (%)")
|
||||||
|
private BigDecimal furnaceElongation;
|
||||||
|
|
||||||
|
@ApiModelProperty("PHF-出口钢带温度 (℃)")
|
||||||
|
private BigDecimal phfExitStripTemp;
|
||||||
|
|
||||||
|
@ApiModelProperty("RTF-出口钢带温度 (℃)")
|
||||||
|
private BigDecimal rtfExitStripTemp;
|
||||||
|
|
||||||
|
@ApiModelProperty("JCS-出口钢带温度 (℃)")
|
||||||
|
private BigDecimal jcsExitStripTemp;
|
||||||
|
|
||||||
|
@ApiModelProperty("SCS-出口钢带温度 (℃)")
|
||||||
|
private BigDecimal scsExitStripTemp;
|
||||||
|
|
||||||
|
@ApiModelProperty("PHF 露点 (℃)")
|
||||||
|
private BigDecimal phfDewPoint;
|
||||||
|
|
||||||
|
@ApiModelProperty("RTF 露点 (℃)")
|
||||||
|
private BigDecimal rtfDewPoint;
|
||||||
|
|
||||||
|
@ApiModelProperty("天然气耗量 (m3)")
|
||||||
|
private BigDecimal gasConsumption;
|
||||||
|
|
||||||
|
@ApiModelProperty("钢带张力 BR4 – BR5 (daN)")
|
||||||
|
private BigDecimal tensionBr4Br5;
|
||||||
|
|
||||||
|
@ApiModelProperty("炉锅温度 (℃)")
|
||||||
|
private Integer potTemperature;
|
||||||
|
|
||||||
|
@ApiModelProperty("冷却塔钢带温度 (℃)")
|
||||||
|
private Integer coolingTowerStripTemp;
|
||||||
|
|
||||||
|
@ApiModelProperty("锌锅功率 (kW)")
|
||||||
|
private BigDecimal zincPotPower;
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
package com.fizz.business.domain.msg;
|
||||||
|
|
||||||
|
public class AppMeasureMessage extends OpcMessage {
|
||||||
|
|
||||||
|
AppMeasureEntryMessage appMeasureEntryMessage;
|
||||||
|
AppMeasureFurnaceMessage appMeasureFurnaceMessage;
|
||||||
|
AppMeasureCoatMessage appMeasureCoatMessage;
|
||||||
|
AppMeasureExitMessage appMeasureExitMessage;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
package com.fizz.business.domain.msg;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
public class EntryMovementMessage extends OpcMessage {
|
||||||
|
private Integer counter;
|
||||||
|
private Integer materialPlaceSource;
|
||||||
|
private Integer materialPlaceDestination;
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
package com.fizz.business.domain.msg;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ApiModel(description = "出口剪切电文")
|
||||||
|
public class ExitCutMessage extends OpcMessage {
|
||||||
|
|
||||||
|
@ApiModelProperty("计数器")
|
||||||
|
private Integer counter;
|
||||||
|
|
||||||
|
@ApiModelProperty("剪切类型:0=split, 1=weldSeam, 2=stripBreak")
|
||||||
|
private Integer cutType;
|
||||||
|
|
||||||
|
@ApiModelProperty("剪切时卷取长度 (m)")
|
||||||
|
private BigDecimal cutLength;
|
||||||
|
|
||||||
|
@ApiModelProperty("计算卷取外径 (mm)")
|
||||||
|
private BigDecimal outerDiameter;
|
||||||
|
|
||||||
|
@ApiModelProperty("下一个焊缝到飞剪的距离 (m)")
|
||||||
|
private BigDecimal leftLength;
|
||||||
|
|
||||||
|
@ApiModelProperty("breakPosition,含义待定")
|
||||||
|
private BigDecimal breakPosition;
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
package com.fizz.business.domain.msg;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ApiModel(description = "出口称重电文")
|
||||||
|
public class ExitMeasureMessage extends OpcMessage {
|
||||||
|
|
||||||
|
@ApiModelProperty("计数器")
|
||||||
|
private Integer counter;
|
||||||
|
|
||||||
|
@ApiModelProperty("重量 (kg)")
|
||||||
|
private BigDecimal weight;
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
package com.fizz.business.domain.msg;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ApiModel(description = "出口移动电文")
|
||||||
|
public class ExitMovementMessage extends OpcMessage {
|
||||||
|
|
||||||
|
@ApiModelProperty("计数器")
|
||||||
|
private Integer counter;
|
||||||
|
|
||||||
|
@ApiModelProperty("Material Place Source")
|
||||||
|
private Integer materialPlaceSource;
|
||||||
|
|
||||||
|
@ApiModelProperty("Material Place Destination")
|
||||||
|
private Integer materialPlaceDestination;
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
package com.fizz.business.domain.msg;
|
||||||
|
|
||||||
|
import com.fizz.business.constants.enums.OpcMessageType;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public abstract class OpcMessage {
|
||||||
|
private Integer messageId; // 电文ID
|
||||||
|
private Integer length; // 电文长度
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package com.fizz.business.service;
|
||||||
|
|
||||||
|
import com.fizz.business.domain.msg.OpcMessage;
|
||||||
|
|
||||||
|
public interface OpcMessageHandler<T extends OpcMessage> {
|
||||||
|
void handle(T message);
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
package com.fizz.business.service.hanle;
|
||||||
|
|
||||||
|
import com.fizz.business.anno.OpcMessageHandlerType;
|
||||||
|
import com.fizz.business.constants.enums.OpcMessageType;
|
||||||
|
import com.fizz.business.domain.msg.AppMeasureExitMessage;
|
||||||
|
import com.fizz.business.domain.msg.AppMeasureMessage;
|
||||||
|
import com.fizz.business.service.OpcMessageHandler;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
@OpcMessageHandlerType(OpcMessageType.APP_MEASURE)
|
||||||
|
public class AppMeasureHandler implements OpcMessageHandler<AppMeasureMessage> {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void handle(AppMeasureMessage message) {
|
||||||
|
// 处理出口段测量逻辑
|
||||||
|
System.out.println("处理 APP_MEASURE_EXIT 消息: " + message);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package com.fizz.business.service.hanle;
|
||||||
|
|
||||||
|
import com.fizz.business.domain.msg.EntryMovementMessage;
|
||||||
|
import com.fizz.business.service.OpcMessageHandler;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class EntryMovementHandler implements OpcMessageHandler<EntryMovementMessage> {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void handle(EntryMovementMessage message) {
|
||||||
|
System.out.println("处理入口移动消息: " + message);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
package com.fizz.business.service.hanle;
|
||||||
|
|
||||||
|
import com.fizz.business.domain.msg.ExitCutMessage;
|
||||||
|
import com.fizz.business.service.OpcMessageHandler;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class ExitCutHandler implements OpcMessageHandler<ExitCutMessage> {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void handle(ExitCutMessage message) {
|
||||||
|
// 出口剪切逻辑处理
|
||||||
|
System.out.println("处理 EXIT_CUT 消息: " + message);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package com.fizz.business.service.hanle;
|
||||||
|
|
||||||
|
import com.fizz.business.domain.msg.ExitMeasureMessage;
|
||||||
|
import com.fizz.business.service.OpcMessageHandler;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class ExitMeasureHandler implements OpcMessageHandler<ExitMeasureMessage> {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void handle(ExitMeasureMessage message) {
|
||||||
|
// 出口称重逻辑处理
|
||||||
|
System.out.println("处理 EXIT_MEASURE 消息: " + message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
package com.fizz.business.service.hanle;
|
||||||
|
|
||||||
|
import com.fizz.business.domain.msg.ExitMovementMessage;
|
||||||
|
import com.fizz.business.service.OpcMessageHandler;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class ExitMovementHandler implements OpcMessageHandler<ExitMovementMessage> {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void handle(ExitMovementMessage message) {
|
||||||
|
// 出口移动逻辑处理
|
||||||
|
System.out.println("处理 EXIT_MOVEMENT 消息: " + message);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
package com.fizz.business.service.hanle;
|
||||||
|
|
||||||
|
import com.fizz.business.anno.OpcMessageHandlerType;
|
||||||
|
import com.fizz.business.constants.enums.OpcMessageType;
|
||||||
|
import com.fizz.business.domain.msg.OpcMessage;
|
||||||
|
import com.fizz.business.service.OpcMessageHandler;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.context.ApplicationContext;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class OpcMessageDispatcher {
|
||||||
|
|
||||||
|
private final Map<OpcMessageType, OpcMessageHandler<? extends OpcMessage>> handlerMap = new HashMap<>();
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public OpcMessageDispatcher(ApplicationContext context) {
|
||||||
|
Map<String, OpcMessageHandler> beans = context.getBeansOfType(OpcMessageHandler.class);
|
||||||
|
beans.values().forEach(handler -> {
|
||||||
|
OpcMessageHandlerType annotation = handler.getClass().getAnnotation(OpcMessageHandlerType.class);
|
||||||
|
if (annotation != null) {
|
||||||
|
handlerMap.put(annotation.value(), handler);
|
||||||
|
} else {
|
||||||
|
throw new IllegalStateException("Handler " + handler.getClass().getSimpleName() + " 未标注 @OpcMessageHandlerType");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
public <T extends OpcMessage> void dispatch(OpcMessageType type, T message) {
|
||||||
|
OpcMessageHandler<T> handler = (OpcMessageHandler<T>) handlerMap.get(type);
|
||||||
|
if (handler != null) {
|
||||||
|
handler.handle(message);
|
||||||
|
} else {
|
||||||
|
System.out.println("未注册的 OPC 消息类型: " + type);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
package com.fizz.business.service.hanle;
|
||||||
|
|
||||||
|
|
||||||
|
import com.fizz.business.constants.enums.OpcMessageType;
|
||||||
|
import com.fizz.business.domain.msg.OpcMessage;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class OpcReceiverHandler {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private OpcMessageDispatcher dispatcher;
|
||||||
|
|
||||||
|
// 统一入口
|
||||||
|
public void onMessageReceived(OpcMessageType type, OpcMessage message) {
|
||||||
|
dispatcher.dispatch(type, message);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user