lh_dev_fifo
wangwei 4 days ago
parent 0439e73ac1
commit 10e31148a6

@ -192,7 +192,18 @@ public class IoOrderController extends BaseController {
}
// 使用List的sort方法对list进行排序
list.sort((o1, o2) -> Integer.compare(o2.getInvoiceStatus(), o1.getInvoiceStatus()));
// 对列表进行排序
list.sort((a, b) -> {
// 判断a是否满足优先条件
boolean aPriority = "0".equals(a.getCheckStatus()) && a.getInvoiceStatus() == 2;
// 判断b是否满足优先条件
boolean bPriority = "0".equals(b.getCheckStatus()) && b.getInvoiceStatus() == 2;
// 优先条件对比
if (aPriority && !bPriority) return -1; // a优先
if (!aPriority && bPriority) return 1; // b优先
return 0; // 其他情况保持原顺序(稳定排序)
});
PageInfo<IoOrderResponse> pageInfo = new PageInfo<>(list);
return ResultVOUtils.page(pageInfo);
}

@ -67,13 +67,9 @@ public class IoOrderResponse {
*/
private Integer dealStatus;
/**
* -1: "草稿",
* 1: "等待处理",
* 1: "等待处理",
* 2: "等待校验",
* 3: "校验异常",
* 4: "校验成功",
* 0 : 1:
*/
private String checkStatus;

Loading…
Cancel
Save