Merge remote-tracking branch 'gitee/0.8.X' into 0.8.X
This commit is contained in:
@@ -606,8 +606,18 @@ public class WmsMaterialCoilServiceImpl implements IWmsMaterialCoilService {
|
||||
if (bo.getMinAbnormalCount() != null) {
|
||||
qw.apply("COALESCE(ca.abnormal_count, 0) >= {0}", bo.getMinAbnormalCount());
|
||||
}
|
||||
//根据创建时间倒叙
|
||||
qw.orderByDesc("mc.create_time");
|
||||
// 排序:
|
||||
// - 当前端需要绑定信息(includeBindInfo=true)时:优先展示“已绑定实际库位”的钢卷(actual_warehouse_id 非空在前)
|
||||
// 再按实际库位ID升序(库位ID为自增,升序即可满足“先生成的库位在前”)
|
||||
// - 否则:保持原有创建时间倒序
|
||||
if (Boolean.TRUE.equals(bo.getOrderBy())) {
|
||||
// MySQL: false(0) < true(1),因此 "IS NULL" 升序可实现非空在前、空值在后
|
||||
qw.orderByAsc("mc.actual_warehouse_id IS NULL");
|
||||
qw.orderByAsc("mc.actual_warehouse_id");
|
||||
} else {
|
||||
//根据创建时间倒叙
|
||||
qw.orderByDesc("mc.create_time");
|
||||
}
|
||||
return qw;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user