|
|
@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSON;
|
|
|
import com.uas.platform.core.util.StringUtil;
|
|
|
import com.uas.ps.brand.entity.BrandInfo;
|
|
|
import com.uas.ps.component.entity.ComponentInfo;
|
|
|
+import com.uas.ps.core.util.StringUtils;
|
|
|
import com.uas.ps.entity.Product;
|
|
|
import com.uas.ps.entity.ProductMatchResult;
|
|
|
import com.uas.ps.entity.ProductPrivate;
|
|
|
@@ -405,6 +406,33 @@ public class ProductServiceImpl implements ProductService {
|
|
|
return kind;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 根据企业UU和物料原厂型号cmpCode和品牌获取其他有相同物料的企业号
|
|
|
+ *
|
|
|
+ * @param enUU 企业UU
|
|
|
+ * @param pCmpCode 物料原厂型号
|
|
|
+ * @param pBrandEn 品牌
|
|
|
+ * @return 存在相同物料的其他企业UU号
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public ModelMap getBusinessOpportunity(Long enUU, String pCmpCode, String pBrandEn) {
|
|
|
+ ModelMap map = new ModelMap();
|
|
|
+ try {
|
|
|
+ List<Long> enUUs;
|
|
|
+ if (!StringUtils.isEmpty(pBrandEn)) {
|
|
|
+ enUUs = productDao.getBusinessOpportunityWithPBrandEn(enUU, pCmpCode, pBrandEn);
|
|
|
+ } else {
|
|
|
+ enUUs = productDao.getBusinessOpportunityWithoutPBrandEn(enUU, pCmpCode);
|
|
|
+ }
|
|
|
+ map.put("enUUs", enUUs);
|
|
|
+ map.put("success", true);
|
|
|
+ } catch (Exception e) {
|
|
|
+ map.put("success", false);
|
|
|
+ map.put("message", e.getMessage());
|
|
|
+ }
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 更新物料信息
|
|
|
* @param data 物料资料
|