|
|
|
@ -703,28 +703,31 @@ public class IoOrderServiceImpl implements IoOrderService {
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
private List<IoOrderEntity> getAllOrder(IoOrderEntity order) {
|
|
|
|
|
Set<String> billNos = new HashSet<>();
|
|
|
|
|
billNos.add(order.getBillNo());
|
|
|
|
|
|
|
|
|
|
getLinkedBillNo(order.getBillNo(), billNos);
|
|
|
|
|
|
|
|
|
|
//去除本单的单据号
|
|
|
|
|
Iterator<String> iterator = billNos.iterator();
|
|
|
|
|
while (iterator.hasNext()) {
|
|
|
|
|
if (iterator.next().equals(order.getBillNo())) {
|
|
|
|
|
iterator.remove();
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ArrayList<IoOrderEntity> orders = new ArrayList<>();
|
|
|
|
|
if (CollUtil.isNotEmpty(billNos)) {
|
|
|
|
|
List<IoOrderEntity> list = orderDao.selectList(new QueryWrapper<IoOrderEntity>().in("billNo", billNos).orderByDesc("id"));
|
|
|
|
|
orders.addAll(list);
|
|
|
|
|
}
|
|
|
|
|
// Set<String> billNos = new HashSet<>();
|
|
|
|
|
// billNos.add(order.getBillNo());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<IoOrderEntity> orderEntities = orderDao.selectList(new QueryWrapper<IoOrderEntity>().eq("relKey", order.getRelKey()));
|
|
|
|
|
|
|
|
|
|
// getLinkedBillNo(order.getBillNo(), billNos);
|
|
|
|
|
//
|
|
|
|
|
// //去除本单的单据号
|
|
|
|
|
// Iterator<String> iterator = billNos.iterator();
|
|
|
|
|
// while (iterator.hasNext()) {
|
|
|
|
|
// if (iterator.next().equals(order.getBillNo())) {
|
|
|
|
|
// iterator.remove();
|
|
|
|
|
// break;
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// ArrayList<IoOrderEntity> orders = new ArrayList<>();
|
|
|
|
|
// if (CollUtil.isNotEmpty(billNos)) {
|
|
|
|
|
// List<IoOrderEntity> list = orderDao.selectList(new QueryWrapper<IoOrderEntity>().in("billNo", billNos).orderByDesc("id"));
|
|
|
|
|
// orders.addAll(list);
|
|
|
|
|
// }
|
|
|
|
|
//将查询入口单据放在第一位的顺序
|
|
|
|
|
orders.add(0, order);
|
|
|
|
|
return orders;
|
|
|
|
|
// orders.add(0, order);
|
|
|
|
|
return orderEntities;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|