|
|
@@ -1,10 +1,6 @@
|
|
|
package com.uas.platform.b2b.search;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
-import com.uas.sso.entity.UserSpaceDetail;
|
|
|
-import com.uas.sso.entity.UserSpaceView;
|
|
|
-import com.uas.sso.support.Page;
|
|
|
-import com.uas.sso.util.AccountUtils;
|
|
|
import com.uas.platform.b2b.core.util.SplitArray;
|
|
|
import com.uas.platform.b2b.dao.*;
|
|
|
import com.uas.platform.b2b.erp.model.B2BCustomer;
|
|
|
@@ -23,6 +19,9 @@ import com.uas.search.b2b.model.PageParams;
|
|
|
import com.uas.search.b2b.model.SPage;
|
|
|
import com.uas.search.b2b.service.SearchService.Table_name;
|
|
|
import com.uas.search.b2b.util.SearchConstants;
|
|
|
+import com.uas.sso.entity.UserSpaceView;
|
|
|
+import com.uas.sso.support.Page;
|
|
|
+import com.uas.sso.util.AccountUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.data.jpa.domain.Specification;
|
|
|
@@ -580,81 +579,6 @@ public class SearchServiceImpl implements com.uas.platform.b2b.search.SearchServ
|
|
|
SPage<Long> idsPage = searchService.searchIds(keyword, Table_name.PURC$APCHECK, pageParams);
|
|
|
List<PurchaseApCheck> content = purchaseApCheckDao.findAll(idsPage.getContent());
|
|
|
sortByProperty(content, PurchaseApCheck.class, "id", idsPage.getContent());
|
|
|
-// // 对应验退单的应收对账单详情没有物料编号字段,添加物料信息
|
|
|
-// List<PurchaseApCheckItem> prodNullList = purchaseApCheckItemDao.findByProdCodeAndProdTitle(null, null);
|
|
|
-// // 对应验退单的应收对账单详情没有物料编号字段,添加物料信息
|
|
|
-// List<PurchaseApCheckItem> saveItems = new ArrayList<>();
|
|
|
-//// for (PurchaseApCheck apCheck : content) {
|
|
|
-// Integer count = 0;
|
|
|
-// for (PurchaseApCheckItem apCheckItem : prodNullList) {
|
|
|
-// count++;
|
|
|
-// if (apCheckItem.getProdCode() != null && apCheckItem.getProdTitle() == null) {
|
|
|
-// List<Product> products = productDao.findByEnUUAndCode(apCheckItem.getApCheck().getCustUu(), apCheckItem.getProdCode());
|
|
|
-// if (!CollectionUtils.isEmpty(products)) {
|
|
|
-// Product product = products.get(0);
|
|
|
-// apCheckItem.setProdTitle(product.getTitle());
|
|
|
-// apCheckItem.setProdSpec(product.getSpec());
|
|
|
-// saveItems.add(apCheckItem);
|
|
|
-// }
|
|
|
-// } else {
|
|
|
-// // 正式b2b中来源单据只有采购验收和验退存在产品编号为空的情况,暂时制作这两种的判断
|
|
|
-// if (apCheckItem.getSourceTable().equals("purc$acceptitem") && null != apCheckItem.getSourceId()){
|
|
|
-// PurchaseAcceptItem purchaseAcceptItem = purchaseAcceptItemDao.findOne(apCheckItem.getSourceId());
|
|
|
-// if (null != purchaseAcceptItem && null != purchaseAcceptItem.getProduct()) {
|
|
|
-// Product product = purchaseAcceptItem.getProduct();
|
|
|
-// apCheckItem.setProdCode(product.getCode());
|
|
|
-// apCheckItem.setProdTitle(product.getTitle());
|
|
|
-// apCheckItem.setProdSpec(product.getSpec());
|
|
|
-// saveItems.add(apCheckItem);
|
|
|
-// } else if (null != purchaseAcceptItem && null != purchaseAcceptItem.getOrderItem()) {
|
|
|
-// PurchaseOrderItem item = purchaseAcceptItem.getOrderItem();
|
|
|
-// if (null != item.getProduct()) {
|
|
|
-// apCheckItem.setProdCode(item.getProduct().getCode());
|
|
|
-// apCheckItem.setProdTitle(item.getProduct().getTitle());
|
|
|
-// apCheckItem.setProdSpec(item.getProduct().getSpec());
|
|
|
-// saveItems.add(apCheckItem);
|
|
|
-// }
|
|
|
-// } else if (null != purchaseAcceptItem && null != purchaseAcceptItem.getProdcode()) {
|
|
|
-// List<Product> products = productDao.findByEnUUAndCode(apCheckItem.getApCheck().getCustUu(), purchaseAcceptItem.getProdcode());
|
|
|
-// if (!CollectionUtils.isEmpty(products)) {
|
|
|
-// Product product = products.get(0);
|
|
|
-// apCheckItem.setProdCode(product.getCode());
|
|
|
-// apCheckItem.setProdTitle(product.getTitle());
|
|
|
-// apCheckItem.setProdSpec(product.getSpec());
|
|
|
-// saveItems.add(apCheckItem);
|
|
|
-// }
|
|
|
-// }
|
|
|
-// } else if (apCheckItem.getSourceTable().equals("purc$returnitem") && null != apCheckItem.getSourceId()) {
|
|
|
-// PurchaseReturnItem purchaseReturnItem = purchaseReturnItemDao.findOne(apCheckItem.getSourceId());
|
|
|
-// if (null != purchaseReturnItem && null != purchaseReturnItem.getProduct()) {
|
|
|
-// Product product = purchaseReturnItem.getProduct();
|
|
|
-// apCheckItem.setProdCode(product.getCode());
|
|
|
-// apCheckItem.setProdTitle(product.getTitle());
|
|
|
-// apCheckItem.setProdSpec(product.getSpec());
|
|
|
-// saveItems.add(apCheckItem);
|
|
|
-// } else if (null != purchaseReturnItem && null != purchaseReturnItem.getOrderItem()) {
|
|
|
-// PurchaseOrderItem item = purchaseReturnItem.getOrderItem();
|
|
|
-// if (null != item.getProduct()) {
|
|
|
-// apCheckItem.setProdCode(item.getProduct().getCode());
|
|
|
-// apCheckItem.setProdTitle(item.getProduct().getTitle());
|
|
|
-// apCheckItem.setProdSpec(item.getProduct().getSpec());
|
|
|
-// saveItems.add(apCheckItem);
|
|
|
-// }
|
|
|
-// } else if (null != purchaseReturnItem && null != purchaseReturnItem.getProdCode()) {
|
|
|
-// List<Product> products = productDao.findByEnUUAndCode(apCheckItem.getApCheck().getCustUu(), purchaseReturnItem.getProdCode());
|
|
|
-// if (!CollectionUtils.isEmpty(products)) {
|
|
|
-// Product product = products.get(0);
|
|
|
-// apCheckItem.setProdCode(product.getCode());
|
|
|
-// apCheckItem.setProdTitle(product.getTitle());
|
|
|
-// apCheckItem.setProdSpec(product.getSpec());
|
|
|
-// saveItems.add(apCheckItem);
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }
|
|
|
-//// }
|
|
|
-// purchaseApCheckItemDao.save(saveItems);
|
|
|
return toSPage(idsPage, content);
|
|
|
}
|
|
|
|
|
|
@@ -1021,18 +945,6 @@ public class SearchServiceImpl implements com.uas.platform.b2b.search.SearchServ
|
|
|
return components;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-// /**
|
|
|
-// * 根据输入的类目名获取联想词
|
|
|
-// *
|
|
|
-// * @param kindName
|
|
|
-// * 类目名
|
|
|
-// * @return
|
|
|
-// */
|
|
|
-// public List<String> getSimilarKinds(String kindName) {
|
|
|
-// SPage<String> kindPages = searchService.similar(kindName, Table_name.PRODUCT$COMPONENT, SIMILAR_NUM, "");
|
|
|
-// }
|
|
|
-
|
|
|
@Override
|
|
|
public List<Map<String, Object>> getSimilarBrands(String keyword) throws Exception {
|
|
|
List<String> brandList = similarBrands(keyword);
|