feat(wms): 按入场钢卷号分组后按最新创建时间倒序排列
- 在钢卷查询中添加按入场钢卷号分组的功能 - 实现分组后按每组最新创建时间倒序排列 - 确保查询结果按时间顺序正确排序
This commit is contained in:
@@ -884,6 +884,8 @@ public class WmsMaterialCoilServiceImpl implements IWmsMaterialCoilService {
|
|||||||
// 按入场钢卷号分组
|
// 按入场钢卷号分组
|
||||||
if (Boolean.TRUE.equals(bo.getGroupByEnterCoilNo())) {
|
if (Boolean.TRUE.equals(bo.getGroupByEnterCoilNo())) {
|
||||||
qw.groupBy("mc.enter_coil_no");
|
qw.groupBy("mc.enter_coil_no");
|
||||||
|
// 分组后按每组最新的创建时间倒序排列
|
||||||
|
qw.orderByDesc("MAX(mc.create_time)");
|
||||||
}
|
}
|
||||||
return qw;
|
return qw;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user