|
|
@@ -11,6 +11,7 @@ import com.uas.platform.b2b.model.*;
|
|
|
import com.uas.platform.b2b.service.BrandService;
|
|
|
import com.uas.platform.b2b.service.ComponentService;
|
|
|
import com.uas.platform.b2b.service.KindService;
|
|
|
+import com.uas.platform.b2b.service.PurchaseOrderService;
|
|
|
import com.uas.platform.b2b.support.SystemSession;
|
|
|
import com.uas.platform.core.persistence.criteria.PredicateFactory;
|
|
|
import com.uas.platform.core.persistence.criteria.PredicateUtils;
|
|
|
@@ -154,9 +155,6 @@ public class SearchServiceImpl implements com.uas.platform.b2b.search.SearchServ
|
|
|
@Autowired
|
|
|
private SaleTenderErpDao saleTenderErpDao;
|
|
|
|
|
|
- @Autowired
|
|
|
- private PagingReleaseDetailDao pagingReleaseDetailDao;
|
|
|
-
|
|
|
@Autowired
|
|
|
private VendorDao vendorDao;
|
|
|
|
|
|
@@ -199,7 +197,8 @@ public class SearchServiceImpl implements com.uas.platform.b2b.search.SearchServ
|
|
|
@Autowired
|
|
|
private SaleTenderQuestionDao saleTenderQuestionDao;
|
|
|
|
|
|
-
|
|
|
+ @Autowired
|
|
|
+ private PurchaseOrderService purchaseOrderService;
|
|
|
|
|
|
/**
|
|
|
* 联想词size
|
|
|
@@ -274,6 +273,15 @@ public class SearchServiceImpl implements com.uas.platform.b2b.search.SearchServ
|
|
|
public SPage<PurchaseOrderAll> searchPurchaseOrderIds(String keyword, PageParams pageParams) {
|
|
|
SPage<Long> idsPage = searchService.searchIds(keyword, Table_name.PURC$ORDERS, pageParams);
|
|
|
List<PurchaseOrderAll> content = purchaseOrderAllDao.findAll(idsPage.getContent());
|
|
|
+ if (!CollectionUtils.isEmpty(content)) {
|
|
|
+ for (PurchaseOrderAll orderAll : content) {
|
|
|
+ if (!CollectionUtils.isEmpty(orderAll.getOrderItems())) {
|
|
|
+ for (PurchaseOrderAllItem item : orderAll.getOrderItems()) {
|
|
|
+ item.setLatestReplyQty(purchaseOrderService.findLastReplyQty(item.getId()));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
sortByProperty(content, PurchaseOrderAll.class, "id", idsPage.getContent());
|
|
|
return toSPage(idsPage, content);
|
|
|
}
|
|
|
@@ -654,6 +662,15 @@ public class SearchServiceImpl implements com.uas.platform.b2b.search.SearchServ
|
|
|
public SPage<PurchaseOrderTodo> searchPurchaseTodoOrderIds(String keyword, PageParams pageParams) {
|
|
|
SPage<Long> idsPage = searchService.searchIds(keyword, Table_name.PURC$ORDERS, pageParams);
|
|
|
List<PurchaseOrderTodo> content = purchaseOrderTodoDao.findAll(idsPage.getContent());
|
|
|
+ if (!CollectionUtils.isEmpty(content)) {
|
|
|
+ for (PurchaseOrderTodo order : content) {
|
|
|
+ if (!CollectionUtils.isEmpty(order.getOrderItems())) {
|
|
|
+ for (PurchaseOrderTodoItem item : order.getOrderItems()) {
|
|
|
+ item.setLatestReplyQty(purchaseOrderService.findLastReplyQty(item.getId()));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
sortByProperty(content, PurchaseOrderTodo.class, "id", idsPage.getContent());
|
|
|
return toSPage(idsPage, content);
|
|
|
}
|
|
|
@@ -665,6 +682,15 @@ public class SearchServiceImpl implements com.uas.platform.b2b.search.SearchServ
|
|
|
public SPage<PurchaseOrderDone> searchPurchaseDoneOrderIds(String keyword, PageParams pageParams) {
|
|
|
SPage<Long> idsPage = searchService.searchIds(keyword, Table_name.PURC$ORDERS, pageParams);
|
|
|
List<PurchaseOrderDone> content = purchaseOrderDoneDao.findAll(idsPage.getContent());
|
|
|
+ if (!CollectionUtils.isEmpty(content)) {
|
|
|
+ for (PurchaseOrderDone order : content) {
|
|
|
+ if (!CollectionUtils.isEmpty(order.getOrderItems())) {
|
|
|
+ for (PurchaseOrderDoneItem item : order.getOrderItems()) {
|
|
|
+ item.setLatestReplyQty(purchaseOrderService.findLastReplyQty(item.getId()));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
sortByProperty(content, PurchaseOrderDone.class, "id", idsPage.getContent());
|
|
|
return toSPage(idsPage, content);
|
|
|
}
|
|
|
@@ -676,6 +702,15 @@ public class SearchServiceImpl implements com.uas.platform.b2b.search.SearchServ
|
|
|
public SPage<PurchaseOrderEnd> searchaPurchaseEndOrderIds(String keyword, PageParams pageParams) {
|
|
|
SPage<Long> idsPage = searchService.searchIds(keyword, Table_name.PURC$ORDERS, pageParams);
|
|
|
List<PurchaseOrderEnd> content = purchaseOrderEndDao.findAll(idsPage.getContent());
|
|
|
+ if (!CollectionUtils.isEmpty(content)) {
|
|
|
+ for (PurchaseOrderEnd order : content) {
|
|
|
+ if (!CollectionUtils.isEmpty(order.getOrderItems())) {
|
|
|
+ for (PurchaseOrderEndItem item : order.getOrderItems()) {
|
|
|
+ item.setLatestReplyQty(purchaseOrderService.findLastReplyQty(item.getId()));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
sortByProperty(content, PurchaseOrderEnd.class, "id", idsPage.getContent());
|
|
|
return toSPage(idsPage, content);
|
|
|
}
|
|
|
@@ -691,6 +726,15 @@ public class SearchServiceImpl implements com.uas.platform.b2b.search.SearchServ
|
|
|
public SPage<PurchaseOrderReceived> searchPurchaseReceivedOrderIds(String keyword, PageParams pageParams) {
|
|
|
SPage<Long> idsPage = searchService.searchIds(keyword, Table_name.PURC$ORDERS, pageParams);
|
|
|
List<PurchaseOrderReceived> content = purchaseOrderReceivedDao.findAll(idsPage.getContent());
|
|
|
+ if (!CollectionUtils.isEmpty(content)) {
|
|
|
+ for (PurchaseOrderReceived order : content) {
|
|
|
+ if (!CollectionUtils.isEmpty(order.getOrderItems())) {
|
|
|
+ for (PurchaseOrderReceivedItem item : order.getOrderItems()) {
|
|
|
+ item.setLatestReplyQty(purchaseOrderService.findLastReplyQty(item.getId()));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
sortByProperty(content, PurchaseOrderReceived.class, "id", idsPage.getContent());
|
|
|
return toSPage(idsPage, content);
|
|
|
}
|
|
|
@@ -702,6 +746,15 @@ public class SearchServiceImpl implements com.uas.platform.b2b.search.SearchServ
|
|
|
public SPage<PurchaseOrderWaiting> searchPurchaseWaitingOrderIds(String keyword, PageParams pageParams) {
|
|
|
SPage<Long> idsPage = searchService.searchIds(keyword, Table_name.PURC$ORDERS, pageParams);
|
|
|
List<PurchaseOrderWaiting> content = purchaseOrderWaitingDao.findAll(idsPage.getContent());
|
|
|
+ if (!CollectionUtils.isEmpty(content)) {
|
|
|
+ for (PurchaseOrderWaiting order : content) {
|
|
|
+ if (!CollectionUtils.isEmpty(order.getOrderItems())) {
|
|
|
+ for (PurchaseOrderWaitingItem item : order.getOrderItems()) {
|
|
|
+ item.setLatestReplyQty(purchaseOrderService.findLastReplyQty(item.getId()));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
sortByProperty(content, PurchaseOrderWaiting.class, "id", idsPage.getContent());
|
|
|
return toSPage(idsPage, content);
|
|
|
}
|