|
|
@@ -15,6 +15,7 @@ import com.uas.platform.core.model.Constant;
|
|
|
import com.uas.platform.core.model.PageInfo;
|
|
|
import com.uas.platform.core.persistence.criteria.CriterionExpression;
|
|
|
import com.uas.platform.core.persistence.criteria.SimpleExpression;
|
|
|
+import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
import javax.persistence.criteria.CriteriaBuilder;
|
|
|
import javax.persistence.criteria.CriteriaQuery;
|
|
|
@@ -94,7 +95,29 @@ public class VendorListServiceImpl implements VendorListService{
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- return new PageImpl<VendorList>(vendorLists, pageInfo, vendorListPage.getTotalElements());
|
|
|
+ List<VendorList> returnVendorLists = new ArrayList<>(vendorLists);
|
|
|
+ Long totalElements = vendorListPage.getTotalElements();
|
|
|
+
|
|
|
+ List<VendorListSubmit> vendorListSubmits = vendorListSubmitDao.findByBranduuidAndStatusAndVendoridIsNull(uuid, Status.SUBMITTED.value());
|
|
|
+ if (CollectionUtils.isNotEmpty(vendorListSubmits)) {
|
|
|
+ for (VendorListSubmit vendorListSubmit : vendorListSubmits) {
|
|
|
+ VendorList vendorList = new VendorList();
|
|
|
+ convertBySubmit(vendorList, vendorListSubmit);
|
|
|
+ vendorList.setIsSubmited((short) 2);
|
|
|
+
|
|
|
+ if (vendorList.getStoreuuid() != null) {
|
|
|
+ StoreIn store = storeInDao.findByUuid(vendorList.getStoreuuid());
|
|
|
+ if (store != null) {
|
|
|
+ vendorList.setStoreIn(store);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ returnVendorLists.add(vendorList);
|
|
|
+ }
|
|
|
+ totalElements += vendorListSubmits.size();
|
|
|
+// pageInfo.setPageSize(returnVendorLists.size());
|
|
|
+ }
|
|
|
+
|
|
|
+ return new PageImpl<VendorList>(returnVendorLists, pageInfo, totalElements);
|
|
|
}
|
|
|
|
|
|
private void convertBySubmit(VendorList vendorList, VendorListSubmit vendorListSubmit) {
|