|
|
|
@ -331,13 +331,24 @@ public class OrderServiceImpl implements OrderService {
|
|
|
|
|
//通过源单据查询所有关联的单据数据
|
|
|
|
|
public void getLinkedOrderId(String id, List<String> orderIds) {
|
|
|
|
|
List<String> list = getOneOrderById(id);
|
|
|
|
|
if (orderIds.containsAll(list)) {
|
|
|
|
|
//已经包含源单据所关联的所有的单据号
|
|
|
|
|
return;
|
|
|
|
|
} else {
|
|
|
|
|
if (!orderIds.containsAll(list)) {
|
|
|
|
|
//找出不包含在原有集合中的单据号,回调方法
|
|
|
|
|
String orderId = null;
|
|
|
|
|
boolean flag = false;
|
|
|
|
|
for (String temp : orderIds) {
|
|
|
|
|
if (!flag) {
|
|
|
|
|
for (String item : list) {
|
|
|
|
|
if (!temp.equals(item)) {
|
|
|
|
|
orderId = item;
|
|
|
|
|
flag = true;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
orderIds.addAll(list);
|
|
|
|
|
getLinkedOrderId(list.get(0), orderIds);
|
|
|
|
|
getLinkedOrderId(orderId, orderIds);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|