feat(wms): 新增钢卷异常数量筛选功能
- 在WmsMaterialCoilBo中添加minAbnormalCount字段用于筛选异常数量 - 修改SQL查询逻辑,关联wms_coil_abnormal表统计异常数量 - 在WmsMaterialCoilServiceImpl中实现基于异常数量的筛选条件 - 更新mapper文件以支持异常数量字段的查询和展示
This commit is contained in:
@@ -155,5 +155,10 @@ public class WmsMaterialCoilBo extends BaseEntity {
|
||||
*/
|
||||
private String packagingRequirement;
|
||||
|
||||
/**
|
||||
* 最小异常数量(用于筛选异常数量 >= 此值的钢卷)
|
||||
*/
|
||||
private Integer minAbnormalCount;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -329,6 +329,10 @@ public class WmsMaterialCoilServiceImpl implements IWmsMaterialCoilService {
|
||||
//根据开始时间和结束时间筛选修改时间
|
||||
qw.ge(bo.getStartTime() != null, "mc.update_time", bo.getStartTime());
|
||||
qw.le(bo.getEndTime() != null, "mc.update_time", bo.getEndTime());
|
||||
//根据异常数量筛选(大于等于指定值)
|
||||
if (bo.getMinAbnormalCount() != null) {
|
||||
qw.apply("COALESCE(ca.abnormal_count, 0) >= {0}", bo.getMinAbnormalCount());
|
||||
}
|
||||
//根据创建时间倒叙
|
||||
qw.orderByDesc("mc.create_time");
|
||||
return qw;
|
||||
|
||||
Reference in New Issue
Block a user