feat(mill): 添加换辊记录管理功能
- 新增换辊记录领域模型 MesRollChange 和 MesRollStandby - 实现换辊记录服务接口 IMesRollChangeService 和 IMesRollStandbyService - 添加换辊记录控制器 MesRollChangeController 提供 REST API - 实现换辊记录数据访问层 MesRollChangeMapper 和映射配置文件 - 添加换辊记录业务逻辑实现类 MesRollChangeServiceImpl - 实现查询当前在机轧辊和轧辊工作绩效统计功能 - 扩展轧辊信息 Mapper 支持条件更新轧辊状态操作
This commit is contained in:
@@ -0,0 +1,95 @@
|
||||
package com.ruoyi.mill.mapper;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import com.ruoyi.mill.domain.MesRollChange;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 换辊记录Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-06-09
|
||||
*/
|
||||
public interface MesRollChangeMapper
|
||||
{
|
||||
/**
|
||||
* 查询换辊记录
|
||||
*
|
||||
* @param changeId 换辊记录主键
|
||||
* @return 换辊记录
|
||||
*/
|
||||
public MesRollChange selectMesRollChangeByChangeId(Long changeId);
|
||||
|
||||
/**
|
||||
* 查询换辊记录列表
|
||||
*
|
||||
* @param mesRollChange 换辊记录
|
||||
* @return 换辊记录集合
|
||||
*/
|
||||
public List<MesRollChange> selectMesRollChangeList(MesRollChange mesRollChange);
|
||||
|
||||
/**
|
||||
* 新增换辊记录
|
||||
*
|
||||
* @param mesRollChange 换辊记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertMesRollChange(MesRollChange mesRollChange);
|
||||
|
||||
/**
|
||||
* 修改换辊记录
|
||||
*
|
||||
* @param mesRollChange 换辊记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateMesRollChange(MesRollChange mesRollChange);
|
||||
|
||||
/**
|
||||
* 删除换辊记录
|
||||
*
|
||||
* @param changeId 换辊记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMesRollChangeByChangeId(Long changeId);
|
||||
|
||||
/**
|
||||
* 批量删除换辊记录
|
||||
*
|
||||
* @param changeIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMesRollChangeByChangeIds(Long[] changeIds);
|
||||
|
||||
/**
|
||||
* 查询指定机架当前各辊位状态(最近一次换辊记录)
|
||||
*
|
||||
* @param lineId 产线ID
|
||||
* @param standNo 机架号
|
||||
* @return 各辊位编号+辊径+换辊时间
|
||||
*/
|
||||
public Map<String, Object> selectCurrentStateByStand(@Param("lineId") Long lineId, @Param("standNo") String standNo);
|
||||
|
||||
/**
|
||||
* 查询指定机架+辊位的最新换辊记录
|
||||
*
|
||||
* @param lineId 产线ID
|
||||
* @param standNo 机架号
|
||||
* @param posType 辊位类型(upperWr/lowerWr/upperBr/lowerBr)
|
||||
* @return 换辊记录
|
||||
*/
|
||||
public MesRollChange selectLatestByStandAndPosition(@Param("lineId") Long lineId,
|
||||
@Param("standNo") String standNo,
|
||||
@Param("posType") String posType);
|
||||
|
||||
/**
|
||||
* 统计指定时间范围内的钢卷产量(长度/卷数/重量)
|
||||
*
|
||||
* @param startTime 起始时间
|
||||
* @param endTime 结束时间(null表示至今)
|
||||
* @return 统计结果: workLength, coilCount, totalWeight
|
||||
*/
|
||||
public Map<String, Object> selectCoilStats(@Param("startTime") Date startTime,
|
||||
@Param("endTime") Date endTime);
|
||||
}
|
||||
@@ -34,4 +34,12 @@ public interface MesRollInfoMapper {
|
||||
int incrementGrindCount(@Param("rollId") Long rollId, @Param("diaAfter") BigDecimal diaAfter);
|
||||
|
||||
int updateCurrentDia(@Param("rollId") Long rollId, @Param("currentDia") BigDecimal currentDia);
|
||||
|
||||
/**
|
||||
* 条件更新轧辊状态 — 仅当当前状态为 oldStatus 时才更新为 newStatus
|
||||
* 用于清空备辊时安全回退:避免把已上机的轧辊状态改错
|
||||
*/
|
||||
int updateStatusByRollNoIfStatus(@Param("rollNo") String rollNo,
|
||||
@Param("newStatus") String newStatus,
|
||||
@Param("oldStatus") String oldStatus);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
package com.ruoyi.mill.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.mill.domain.MesRollStandby;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 下批轧辊(待换上)Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-06-09
|
||||
*/
|
||||
public interface MesRollStandbyMapper
|
||||
{
|
||||
/**
|
||||
* 查询下批轧辊(待换上)
|
||||
*
|
||||
* @param standbyId 下批轧辊(待换上)主键
|
||||
* @return 下批轧辊(待换上)
|
||||
*/
|
||||
public MesRollStandby selectMesRollStandbyByStandbyId(Long standbyId);
|
||||
|
||||
/**
|
||||
* 查询下批轧辊(待换上)列表
|
||||
*
|
||||
* @param mesRollStandby 下批轧辊(待换上)
|
||||
* @return 下批轧辊(待换上)集合
|
||||
*/
|
||||
public List<MesRollStandby> selectMesRollStandbyList(MesRollStandby mesRollStandby);
|
||||
|
||||
/**
|
||||
* 新增下批轧辊(待换上)
|
||||
*
|
||||
* @param mesRollStandby 下批轧辊(待换上)
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertMesRollStandby(MesRollStandby mesRollStandby);
|
||||
|
||||
/**
|
||||
* 修改下批轧辊(待换上)
|
||||
*
|
||||
* @param mesRollStandby 下批轧辊(待换上)
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateMesRollStandby(MesRollStandby mesRollStandby);
|
||||
|
||||
/**
|
||||
* 删除下批轧辊(待换上)
|
||||
*
|
||||
* @param standbyId 下批轧辊(待换上)主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMesRollStandbyByStandbyId(Long standbyId);
|
||||
|
||||
/**
|
||||
* 批量删除下批轧辊(待换上)
|
||||
*
|
||||
* @param standbyIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMesRollStandbyByStandbyIds(Long[] standbyIds);
|
||||
|
||||
/**
|
||||
* 查询指定机架的所有备辊
|
||||
*
|
||||
* @param lineId 产线ID
|
||||
* @param standNo 机架号
|
||||
* @return 备辊列表 (VO)
|
||||
*/
|
||||
public List<MesRollStandby> selectByStand(@Param("lineId") Long lineId, @Param("standNo") String standNo);
|
||||
|
||||
/**
|
||||
* 清空指定机架的所有备辊记录
|
||||
*
|
||||
* @param lineId 产线ID
|
||||
* @param standNo 机架号
|
||||
* @return 影响行数
|
||||
*/
|
||||
public int clearByStand(@Param("lineId") Long lineId, @Param("standNo") String standNo);
|
||||
}
|
||||
Reference in New Issue
Block a user