Files
klp-oa/klp-wms/src/main/java/com/klp/service/IWmsMaterialWarningService.java
Joshi 7aaa59cee1 feat(wms): 添加钢卷长度厚度偏差自动告警功能
- 在IWmsMaterialWarningService接口中新增checkAndInsertWarnings方法定义
- 在WmsMaterialCoilServiceImpl中注入materialWarningService依赖
- 在钢卷新增、更新、拆分等操作后自动触发偏差检查和告警插入
- 实现doCheckAndInsertWarnings方法进行长度和厚度偏差计算
- 添加checkLength方法验证长度偏差是否超过10%
- 添加checkThickness方法验证厚度偏差包括偏薄ERROR和偏厚WARNING
- 实现批量插入告警记录并添加异常处理和日志记录
2026-06-06 16:24:35 +08:00

59 lines
1.7 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package com.klp.service;
import com.klp.domain.WmsMaterialCoil;
import com.klp.domain.WmsMaterialWarning;
import com.klp.domain.vo.WmsMaterialWarningVo;
import com.klp.domain.bo.WmsMaterialWarningBo;
import com.klp.common.core.page.TableDataInfo;
import com.klp.common.core.domain.PageQuery;
import java.util.Collection;
import java.util.List;
/**
* 钢卷通用维度告警(长度/厚度/宽度Service接口
*
* @author klp
* @date 2026-06-06
*/
public interface IWmsMaterialWarningService {
/**
* 查询钢卷通用维度告警(长度/厚度/宽度)
*/
WmsMaterialWarningVo queryById(Long warningId);
/**
* 查询钢卷通用维度告警(长度/厚度/宽度)列表
*/
TableDataInfo<WmsMaterialWarningVo> queryPageList(WmsMaterialWarningBo bo, PageQuery pageQuery);
/**
* 查询钢卷通用维度告警(长度/厚度/宽度)列表
*/
List<WmsMaterialWarningVo> queryList(WmsMaterialWarningBo bo);
/**
* 新增钢卷通用维度告警(长度/厚度/宽度)
*/
Boolean insertByBo(WmsMaterialWarningBo bo);
/**
* 修改钢卷通用维度告警(长度/厚度/宽度)
*/
Boolean updateByBo(WmsMaterialWarningBo bo);
/**
* 校验并批量删除钢卷通用维度告警(长度/厚度/宽度)信息
*/
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
/**
* 检查钢卷长度/厚度偏差并批量插入告警记录
* 在 calculateTheoretical 计算出理论长度和理论厚度后调用
*
* @param coil 钢卷实体(需已填充 theoreticalLength/theoreticalThickness/actualLength/actualThickness/coilId
*/
void checkAndInsertWarnings(WmsMaterialCoil coil);
}