feat(WmsMaterialCoil): 添加按发货时间倒序排序功能
- 在WmsMaterialCoilBo中新增exportTimeBy字段用于控制排序方式 - 实现按发货时间倒序排序的逻辑分支 - 当exportTimeBy为true时按mc.export_time倒序排列 - 保持原有的异常排序和创建时间排序逻辑
This commit is contained in:
@@ -366,5 +366,11 @@ public class WmsMaterialCoilBo extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private Boolean groupByEnterCoilNo;
|
private Boolean groupByEnterCoilNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否按发货时间倒序排序(true=按export_time倒序)
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Boolean exportTimeBy;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -878,6 +878,9 @@ public class WmsMaterialCoilServiceImpl implements IWmsMaterialCoilService {
|
|||||||
// 按异常排序:异常的钢卷在前按创建时间倒序,没异常的钢卷在后按创建时间倒序
|
// 按异常排序:异常的钢卷在前按创建时间倒序,没异常的钢卷在后按创建时间倒序
|
||||||
qw.orderByAsc("CASE WHEN COALESCE(ca.abnormal_count, 0) > 0 THEN 0 ELSE 1 END");
|
qw.orderByAsc("CASE WHEN COALESCE(ca.abnormal_count, 0) > 0 THEN 0 ELSE 1 END");
|
||||||
qw.orderByDesc("mc.create_time");
|
qw.orderByDesc("mc.create_time");
|
||||||
|
} else if (Boolean.TRUE.equals(bo.getExportTimeBy())) {
|
||||||
|
// 按发货时间倒序排序
|
||||||
|
qw.orderByDesc("mc.export_time");
|
||||||
} else {
|
} else {
|
||||||
//根据创建时间倒叙
|
//根据创建时间倒叙
|
||||||
qw.orderByDesc("mc.create_time");
|
qw.orderByDesc("mc.create_time");
|
||||||
|
|||||||
Reference in New Issue
Block a user