feat(mill): 新增二级-三级钢卷异常挂接与撤回功能

- 新增钢卷异常信息管理模块,包含实体类、服务接口、控制器和MyBatis映射文件
- 新增二级-三级钢卷异常挂接/撤回关系管理模块,支持挂接和撤回操作
- 在WmsCoilAbnormal实体类中新增sourceSystem字段,用于标识异常数据来源
- 实现bindToThird方法:将二级异常数据挂接到三级系统,自动匹配钢卷并创建关联关系
- 实现withdrawFromThird方法:从三级系统撤回已挂接的异常数据,更新关联状态
- 提供完整的CRUD接口和权限控制,支持异常数据的增删改查和导出功能
This commit is contained in:
2026-06-03 15:30:50 +08:00
parent 80d33d9a3b
commit 0b02122015
14 changed files with 1588 additions and 1 deletions

View File

@@ -0,0 +1,345 @@
package com.ruoyi.mill.domain;
import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* 钢卷异常信息对象 mill_coil_abnormal
*
* @author ruoyi
* @date 2026-06-03
*/
public class MillCoilAbnormal extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键ID */
private Long abnormalId;
/** 当前钢卷号 */
@Excel(name = "当前钢卷号")
private String currentCoilNo;
/** 产线名称 */
@Excel(name = "产线名称")
private String productionLine;
/** 位置(上下,操作侧,中间,驱动侧) */
@Excel(name = "位置", readConverterExp = "上=下,操作侧,中间,驱动侧")
private String position;
/** 缺陷长度 */
@Excel(name = "缺陷长度")
private BigDecimal length;
/** 缺陷开始位置 */
@Excel(name = "缺陷开始位置")
private BigDecimal startPosition;
/** 缺陷结束位置 */
@Excel(name = "缺陷结束位置")
private BigDecimal endPosition;
/** 缺陷代码S=表面缺陷、E=边部问题、M=尺寸问题、G=收卷问题) */
@Excel(name = "缺陷代码", readConverterExp = "S==表面缺陷、E=边部问题、M=尺寸问题、G=收卷问题")
private String defectCode;
/** 缺陷类型(更详细的缺陷分类,如划痕、边裂、厚度超标等) */
@Excel(name = "缺陷类型", readConverterExp = "更=详细的缺陷分类,如划痕、边裂、厚度超标等")
private String defectType;
/** 缺陷率百分比如0.05表示5% */
@Excel(name = "缺陷率", readConverterExp = "百=分比如0.05表示5%")
private BigDecimal defectRate;
/** 缺陷重量单位kg */
@Excel(name = "缺陷重量", readConverterExp = "单=位kg")
private BigDecimal defectWeight;
/** 程度(轻微、重度、严重) */
@Excel(name = "程度", readConverterExp = "轻=微、重度、严重")
private String degree;
/** 判级 */
@Excel(name = "判级")
private String judgeLevel;
/** 判级人 */
@Excel(name = "判级人")
private String judgeBy;
/** 判级时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "判级时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date judgeTime;
/** 主标记1=是0=否) */
@Excel(name = "主标记", readConverterExp = "1==是0=否")
private Long mainMark;
/** 整卷标记1=是0=否) */
@Excel(name = "整卷标记", readConverterExp = "1==是0=否")
private Long wholeCoilMark;
/** 删除标志0=正常1=已删除) */
private Integer delFlag;
/** 上下板面 */
@Excel(name = "上下板面")
private String plateSurface;
/** 附件路径(多个用英文逗号分隔) */
@Excel(name = "附件路径", readConverterExp = "多=个用英文逗号分隔")
private String attachmentFiles;
/** 匹配到的三级系统钢卷ID */
@Excel(name = "匹配到的三级系统钢卷ID")
private Long thirdCoilId;
public void setAbnormalId(Long abnormalId)
{
this.abnormalId = abnormalId;
}
public Long getAbnormalId()
{
return abnormalId;
}
public void setCurrentCoilNo(String currentCoilNo)
{
this.currentCoilNo = currentCoilNo;
}
public String getCurrentCoilNo()
{
return currentCoilNo;
}
public void setProductionLine(String productionLine)
{
this.productionLine = productionLine;
}
public String getProductionLine()
{
return productionLine;
}
public void setPosition(String position)
{
this.position = position;
}
public String getPosition()
{
return position;
}
public void setLength(BigDecimal length)
{
this.length = length;
}
public BigDecimal getLength()
{
return length;
}
public void setStartPosition(BigDecimal startPosition)
{
this.startPosition = startPosition;
}
public BigDecimal getStartPosition()
{
return startPosition;
}
public void setEndPosition(BigDecimal endPosition)
{
this.endPosition = endPosition;
}
public BigDecimal getEndPosition()
{
return endPosition;
}
public void setDefectCode(String defectCode)
{
this.defectCode = defectCode;
}
public String getDefectCode()
{
return defectCode;
}
public void setDefectType(String defectType)
{
this.defectType = defectType;
}
public String getDefectType()
{
return defectType;
}
public void setDefectRate(BigDecimal defectRate)
{
this.defectRate = defectRate;
}
public BigDecimal getDefectRate()
{
return defectRate;
}
public void setDefectWeight(BigDecimal defectWeight)
{
this.defectWeight = defectWeight;
}
public BigDecimal getDefectWeight()
{
return defectWeight;
}
public void setDegree(String degree)
{
this.degree = degree;
}
public String getDegree()
{
return degree;
}
public void setJudgeLevel(String judgeLevel)
{
this.judgeLevel = judgeLevel;
}
public String getJudgeLevel()
{
return judgeLevel;
}
public void setJudgeBy(String judgeBy)
{
this.judgeBy = judgeBy;
}
public String getJudgeBy()
{
return judgeBy;
}
public void setJudgeTime(Date judgeTime)
{
this.judgeTime = judgeTime;
}
public Date getJudgeTime()
{
return judgeTime;
}
public void setMainMark(Long mainMark)
{
this.mainMark = mainMark;
}
public Long getMainMark()
{
return mainMark;
}
public void setWholeCoilMark(Long wholeCoilMark)
{
this.wholeCoilMark = wholeCoilMark;
}
public Long getWholeCoilMark()
{
return wholeCoilMark;
}
public void setDelFlag(Integer delFlag)
{
this.delFlag = delFlag;
}
public Integer getDelFlag()
{
return delFlag;
}
public void setPlateSurface(String plateSurface)
{
this.plateSurface = plateSurface;
}
public String getPlateSurface()
{
return plateSurface;
}
public void setAttachmentFiles(String attachmentFiles)
{
this.attachmentFiles = attachmentFiles;
}
public String getAttachmentFiles()
{
return attachmentFiles;
}
public void setThirdCoilId(Long thirdCoilId)
{
this.thirdCoilId = thirdCoilId;
}
public Long getThirdCoilId()
{
return thirdCoilId;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("abnormalId", getAbnormalId())
.append("currentCoilNo", getCurrentCoilNo())
.append("productionLine", getProductionLine())
.append("position", getPosition())
.append("length", getLength())
.append("startPosition", getStartPosition())
.append("endPosition", getEndPosition())
.append("defectCode", getDefectCode())
.append("defectType", getDefectType())
.append("defectRate", getDefectRate())
.append("defectWeight", getDefectWeight())
.append("degree", getDegree())
.append("judgeLevel", getJudgeLevel())
.append("judgeBy", getJudgeBy())
.append("judgeTime", getJudgeTime())
.append("mainMark", getMainMark())
.append("wholeCoilMark", getWholeCoilMark())
.append("remark", getRemark())
.append("delFlag", getDelFlag())
.append("createTime", getCreateTime())
.append("createBy", getCreateBy())
.append("updateTime", getUpdateTime())
.append("updateBy", getUpdateBy())
.append("plateSurface", getPlateSurface())
.append("attachmentFiles", getAttachmentFiles())
.append("thirdCoilId", getThirdCoilId())
.toString();
}
}

View File

@@ -0,0 +1,177 @@
package com.ruoyi.mill.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* 二级-三级钢卷异常挂接/撤回关系对象 mill_coil_abnormal_relation
*
* @author ruoyi
* @date 2026-06-03
*/
public class MillCoilAbnormalRelation extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 关系ID */
private Long relationId;
/** 二级系统异常ID */
@Excel(name = "二级系统异常ID")
private Long secondAbnormalId;
/** 三级系统钢卷ID */
@Excel(name = "三级系统钢卷ID")
private Long thirdCoilId;
/** 【关键】三级表的异常ID */
@Excel(name = "【关键】三级表的异常ID")
private Long thirdAbnormalId;
/** 匹配时使用的钢卷号 */
@Excel(name = "匹配时使用的钢卷号")
private String currentCoilNo;
/** 状态1=已挂接2=已撤回 */
@Excel(name = "状态1=已挂接2=已撤回")
private Long bindStatus;
/** 挂接时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "挂接时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date bindTime;
/** 撤回时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "撤回时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date withdrawTime;
/** 操作人 */
@Excel(name = "操作人")
private String operateUser;
/** 操作备注(撤回原因) */
@Excel(name = "操作备注", readConverterExp = "撤=回原因")
private String operateRemark;
public void setRelationId(Long relationId)
{
this.relationId = relationId;
}
public Long getRelationId()
{
return relationId;
}
public void setSecondAbnormalId(Long secondAbnormalId)
{
this.secondAbnormalId = secondAbnormalId;
}
public Long getSecondAbnormalId()
{
return secondAbnormalId;
}
public void setThirdCoilId(Long thirdCoilId)
{
this.thirdCoilId = thirdCoilId;
}
public Long getThirdCoilId()
{
return thirdCoilId;
}
public void setThirdAbnormalId(Long thirdAbnormalId)
{
this.thirdAbnormalId = thirdAbnormalId;
}
public Long getThirdAbnormalId()
{
return thirdAbnormalId;
}
public void setCurrentCoilNo(String currentCoilNo)
{
this.currentCoilNo = currentCoilNo;
}
public String getCurrentCoilNo()
{
return currentCoilNo;
}
public void setBindStatus(Long bindStatus)
{
this.bindStatus = bindStatus;
}
public Long getBindStatus()
{
return bindStatus;
}
public void setBindTime(Date bindTime)
{
this.bindTime = bindTime;
}
public Date getBindTime()
{
return bindTime;
}
public void setWithdrawTime(Date withdrawTime)
{
this.withdrawTime = withdrawTime;
}
public Date getWithdrawTime()
{
return withdrawTime;
}
public void setOperateUser(String operateUser)
{
this.operateUser = operateUser;
}
public String getOperateUser()
{
return operateUser;
}
public void setOperateRemark(String operateRemark)
{
this.operateRemark = operateRemark;
}
public String getOperateRemark()
{
return operateRemark;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("relationId", getRelationId())
.append("secondAbnormalId", getSecondAbnormalId())
.append("thirdCoilId", getThirdCoilId())
.append("thirdAbnormalId", getThirdAbnormalId())
.append("currentCoilNo", getCurrentCoilNo())
.append("bindStatus", getBindStatus())
.append("bindTime", getBindTime())
.append("withdrawTime", getWithdrawTime())
.append("operateUser", getOperateUser())
.append("operateRemark", getOperateRemark())
.append("createTime", getCreateTime())
.toString();
}
}

View File

@@ -36,6 +36,7 @@ public class WmsCoilAbnormal extends BaseEntity {
private Integer wholeCoilMark;
private String attachmentFiles;
private Integer delFlag;
private Integer sourceSystem;
// 关联字段
private String coilNo; // 从 wms_material_coil 带出