Parcourir la source

Merge remote-tracking branch 'origin/feature/yc-mobile_maimai-0525' into feature/yc-mobile_maimai-0525

wangyc il y a 7 ans
Parent
commit
7ab532db87
29 fichiers modifiés avec 317 ajouts et 162 suppressions
  1. 14 0
      src/main/java/com/uas/platform/b2c/common/account/model/Enterprise.java
  2. 14 0
      src/main/java/com/uas/platform/b2c/common/account/model/User.java
  3. 10 0
      src/main/java/com/uas/platform/b2c/common/search/constant/SearchUrl.java
  4. 12 0
      src/main/java/com/uas/platform/b2c/common/search/controller/SearcherController.java
  5. 26 0
      src/main/java/com/uas/platform/b2c/common/search/rpc/service/Impl/SearchServiceImpl.java
  6. 2 0
      src/main/java/com/uas/platform/b2c/common/search/rpc/service/SearchService.java
  7. 8 0
      src/main/java/com/uas/platform/b2c/common/search/service/SearcherService.java
  8. 28 11
      src/main/java/com/uas/platform/b2c/common/search/service/impl/SearcherServiceImpl.java
  9. 2 2
      src/main/java/com/uas/platform/b2c/fa/payment/service/impl/InstallmentStoreServiceImpl.java
  10. 24 19
      src/main/java/com/uas/platform/b2c/prod/commodity/constant/ModifyConstant.java
  11. 10 31
      src/main/java/com/uas/platform/b2c/prod/commodity/service/impl/ReleaseProductByBatchServiceImpl.java
  12. 4 3
      src/main/java/com/uas/platform/b2c/trade/vendor/controller/VendorIntroductionController.java
  13. 8 6
      src/main/java/com/uas/platform/b2c/trade/vendor/service/VendorIntroductionService.java
  14. 103 58
      src/main/java/com/uas/platform/b2c/trade/vendor/service/impl/VendorIntroductionServiceImpl.java
  15. BIN
      src/main/resources/jxls-tpl/trade/goods.xls
  16. BIN
      src/main/resources/jxls-tpl/trade/products-error.xls
  17. BIN
      src/main/resources/jxls-tpl/trade/products.xls
  18. BIN
      src/main/resources/jxls-tpl/trade/releaseByBatch-rmb.xls
  19. BIN
      src/main/resources/jxls-tpl/trade/releaseByBatchError-rmb.xls
  20. BIN
      src/main/resources/jxls-tpl/trade/releaseByBatchError-usd.xls
  21. BIN
      src/main/resources/jxls-tpl/trade/releasebyBatch-usd.xls
  22. 5 1
      src/main/webapp/resources/js/vendor/controllers/forstore/vendor_upload_ctrl.js
  23. 18 20
      src/main/webapp/resources/view/usercenter/forstore/buyer_transfer.html
  24. 1 1
      src/main/webapp/resources/view/usercenter/forstore/seekPurchase.html
  25. 3 3
      src/main/webapp/resources/view/vendor/forstore/purchaseOffer.html
  26. 3 3
      src/main/webapp/resources/view/vendor/forstore/seekPurchase.html
  27. 10 1
      src/main/webapp/resources/view/vendor/forstore/vendor_material.html
  28. 2 2
      src/main/webapp/resources/view/vendor/forstore/vendor_store_maintain.html
  29. 10 1
      src/main/webapp/resources/view/vendor/forstore/vendor_upload.html

+ 14 - 0
src/main/java/com/uas/platform/b2c/common/account/model/Enterprise.java

@@ -189,6 +189,20 @@ public class Enterprise implements Serializable {
 	@Transient
 	private Integer receiptStatus;
 
+	/**
+	 * 企业简介
+	 */
+	@Column(name = "en_description", length = 1000)
+	private String description;
+
+	public String getDescription() {
+		return description;
+	}
+
+	public void setDescription(String description) {
+		this.description = description;
+	}
+
 	public String getAccessSecret() {
 		return accessSecret;
 	}

+ 14 - 0
src/main/java/com/uas/platform/b2c/common/account/model/User.java

@@ -226,6 +226,12 @@ public class User implements Serializable {
 	@Column(name = "user_emlstatus")
 	private Integer emailValidCode;
 
+	/**
+	 * 微信openId
+	 */
+	@Column(name = "user_openid")
+	private String openId;
+
 	public Long getLastLoginTime() {
 		return lastLoginTime;
 	}
@@ -534,4 +540,12 @@ public class User implements Serializable {
 	public void setIdRemarks(String idRemarks) {
 		this.idRemarks = idRemarks;
 	}
+
+	public String getOpenId() {
+		return openId;
+	}
+
+	public void setOpenId(String openId) {
+		this.openId = openId;
+	}
 }

+ 10 - 0
src/main/java/com/uas/platform/b2c/common/search/constant/SearchUrl.java

@@ -17,6 +17,16 @@ public class SearchUrl {
      */
     public static final String PRODUCT_ID_URL = "/search/productIds?enUU={enUU}&keyword={keyword}&page={page}&size={size}&type={type}";
 
+    /**
+     * 标准型号联想(物料)
+     */
+    public static final String PRODUCT_SIMILAR_PCMPCODE_URL = "/search/product/similarPCmpCodes?keyword={keyword}";
+
+    /**
+     * 类目联想(物料)
+     */
+    public static final String PRODUCT_SIMILAR_KIND_URL = "/search/product/similarKind?keyword={keyword}";
+
     /**
      * 获取类目的数据
      *

+ 12 - 0
src/main/java/com/uas/platform/b2c/common/search/controller/SearcherController.java

@@ -281,6 +281,18 @@ public class SearcherController {
 		return  searcherService.getSimilarKeywords(keyword);
 	}
 
+	/**
+	 * 根据输入获取联想词(包括型号、类目、品牌,按顺序获取)
+	 *
+	 * @param keyword 关键词
+	 * @return 获取联想词(包括型号、类目、品牌)
+	 */
+	@RequestMapping(value = "/product/similarKeywords", method = RequestMethod.GET)
+	@ResponseBody
+	public Map<String,Object> getProductSimilarKeywords(String keyword) {
+		return  searcherService.getProductSimilarKeywords(keyword);
+	}
+
 	/**
 	 * 根据输入获取联想词(器件)
 	 * 

+ 26 - 0
src/main/java/com/uas/platform/b2c/common/search/rpc/service/Impl/SearchServiceImpl.java

@@ -257,6 +257,32 @@ public class SearchServiceImpl implements SearchService{
         }
     }
 
+    @Override
+    public Map<String,Object> getProductSimilarKeywords(String keyword) throws SearchException {
+        Map<String, Object> map = new HashedMap();
+        map.put("keyword", keyword);
+        String pCmpCode = restTemplate.getForObject(sysConf.getSearchUrl() + SearchUrl.PRODUCT_SIMILAR_PCMPCODE_URL, String.class, map);
+        String pBrandEn = restTemplate.getForObject(sysConf.getSearchUrl() + SearchUrl.SIMILAR_BRAND_URL, String.class, map);
+        String kind = restTemplate.getForObject(sysConf.getSearchUrl() + SearchUrl.PRODUCT_SIMILAR_KIND_URL, String.class, map);
+        if(StringUtils.isEmpty(pCmpCode) && StringUtils.isEmpty(pBrandEn) && StringUtils.isEmpty(kind)) {
+            return null;
+        }else {
+            try {
+                List<Object> reMapPCmpCode = FastjsonUtils.fromJsonArray(pCmpCode);
+                List<Object> reMapPBrandEn = FastjsonUtils.fromJsonArray(pBrandEn);
+                List<Object> reMapKind = FastjsonUtils.fromJsonArray(kind);
+                map.clear();
+                map.put("pCmpCode",reMapPCmpCode);
+                map.put("pBrandEn",reMapPBrandEn);
+                map.put("kind",reMapKind);
+                return map;
+            }catch (Exception e) {
+                e.printStackTrace();
+                return null;
+            }
+        }
+    }
+
     @Override
     public List<Map<String, Object>> getSimilarComponents(String keyword) throws SearchException {
         Map<String, Object> map = new HashedMap();

+ 2 - 0
src/main/java/com/uas/platform/b2c/common/search/rpc/service/SearchService.java

@@ -37,6 +37,8 @@ public interface SearchService {
 
     Map<String,Object> getSimilarKeywords(String keyword) throws SearchException;
 
+    Map<String,Object> getProductSimilarKeywords(String keyword) throws SearchException;
+
     List<Map<String, Object>> getSimilarComponents(String keyword) throws SearchException;
 
     List<Map<String, Object>> getSimilarBrands(String keyword) throws SearchException;

+ 8 - 0
src/main/java/com/uas/platform/b2c/common/search/service/SearcherService.java

@@ -119,6 +119,14 @@ public interface SearcherService {
 	 */
 	public Map<String,Object> getSimilarKeywords(String keyword);
 
+	/**
+	 * 根据输入获取联想词(包括器件、类目、品牌,按顺序获取)
+	 *
+	 * @param keyword 关键词
+	 * @return 联想词
+	 */
+	Map<String,Object> getProductSimilarKeywords(String keyword);
+
 	/**
 	 * 根据输入的原厂型号获取联想词
 	 * 

+ 28 - 11
src/main/java/com/uas/platform/b2c/common/search/service/impl/SearcherServiceImpl.java

@@ -26,17 +26,6 @@ import com.uas.platform.core.exception.SystemException;
 import com.uas.platform.core.model.PageInfo;
 import com.uas.platform.core.model.PageParams;
 import com.uas.search.exception.SearchException;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Set;
-import javax.servlet.http.HttpServletRequest;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -49,6 +38,18 @@ import org.springframework.ui.ModelMap;
 import org.springframework.util.CollectionUtils;
 import org.springframework.util.StringUtils;
 
+import javax.servlet.http.HttpServletRequest;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+
 /**
  * 搜索索引
  *
@@ -379,6 +380,22 @@ public class SearcherServiceImpl implements SearcherService {
         return result;
     }
 
+    @Override
+    public Map<String, Object> getProductSimilarKeywords(String keyword) {
+        Map<String, Object> result = null;
+        try {
+            result = searchService.getProductSimilarKeywords(keyword);
+        } catch (SearchException e) {
+            throwSystemException(e);
+        }
+        for (Entry<String, Object> entry : result.entrySet()) {
+            if (((List) entry.getValue()).size() > 8) {
+                entry.setValue(((List) entry.getValue()).subList(0, 8));
+            }
+        }
+        return result;
+    }
+
     @Override
     public List<Map<String, Object>> getSimilarComponents(String componentCode) {
         List<Map<String, Object>> components = new ArrayList<>();

+ 2 - 2
src/main/java/com/uas/platform/b2c/fa/payment/service/impl/InstallmentStoreServiceImpl.java

@@ -90,9 +90,9 @@ public class InstallmentStoreServiceImpl implements InstallmentStoreService{
 
         InstallmentStore installmentStore = installmentStoreDao.findByEnuuAndEnable(SystemSession.getUser().getEnterprise().getUu(), (short) 1);
         if (installmentStore == null) {
-            return "fail";
-        } else {
             return "success";
+        } else {
+            return "fail";
         }
     }
 }

+ 24 - 19
src/main/java/com/uas/platform/b2c/prod/commodity/constant/ModifyConstant.java

@@ -23,12 +23,12 @@ public class ModifyConstant {
     /**
      * The constant TOTAL_ROW.
      */
-    public static final int TOTAL_COLUMN = 21;
+    public static final int TOTAL_COLUMN = 22;
 
     /**
      * The constant MAX_TOTAL_COLUMN.
      */
-    public static final int MAX_TOTAL_COLUMN = 22;
+    public static final int MAX_TOTAL_COLUMN = 23;
 
     /**
      * 产品编码
@@ -50,88 +50,93 @@ public class ModifyConstant {
      */
     public static final int PRODUCT_BRAND = 3;
 
+    /**
+     * The constant PRODUCT_BRAND.
+     */
+    public static final int PRODUCT_SPEC = 4;
+
     /**
      * The constant PRODUCE_DATE.
      */
-    public static final int PRODUCE_DATE = 4;
+    public static final int PRODUCE_DATE = 5;
 
     /**
      * The constant PACKAGE_METHOD.
      */
-    public static final int PACKAGE_METHOD = 5;
+    public static final int PACKAGE_METHOD = 6;
 
     /**
      * The constant MIN_DELIVERY.
      */
-    public static final int MIN_DELIVERY = 6;
+    public static final int MIN_DELIVERY = 7;
 
     /**
      * The constant MAX_DELIVERY.
      */
-    public static final int MAX_DELIVERY = 7;
+    public static final int MAX_DELIVERY = 8;
 
     /**
      * The constant BREAK_UP.
      */
-    public static final int BREAK_UP = 8;
+    public static final int BREAK_UP = 9;
 
     /**
      * The constant PACKAGE_NUMBER.
      */
-    public static final int PACKAGE_NUMBER = 9;
+    public static final int PACKAGE_NUMBER = 10;
 
     /**
      * 最小起订量
      */
-    public static final int BUY_MIN_QTY = 10;
+    public static final int BUY_MIN_QTY = 11;
 
     /**
      * 分段价格开始
      */
-    public static final int PRICE_FIRST = 11;
+    public static final int PRICE_FIRST = 12;
 
     /**
      * 第二个分段
      */
-    public static final int QTY_SECOND_START = 12;
+    public static final int QTY_SECOND_START = 13;
 
     /**
      * 第二个分段
      */
-    public static final int PRICE_SECOND = 13;
+    public static final int PRICE_SECOND = 14;
 
     /**
      * 第三个分段
      */
-    public static final int QTY_THIRD_START = 14;
+    public static final int QTY_THIRD_START = 15;
 
     /**
      * 第三个分段
      */
-    public static final int PRICE_THIRD = 15;
+    public static final int PRICE_THIRD = 16;
 
     /**
      * The constant SALE_METHOD.
      */
-    public static final int SALE_METHOD = 16;
+    public static final int SALE_METHOD = 17;
 
     /**
      * The constant RESERVE_NUMBER.
      */
-    public static final int RESERVE_NUMBER = 17;
+    public static final int RESERVE_NUMBER = 18;
 
     /**
      * The constant CUSTOM_LABEL.
      */
-    public static final int CUSTOM_LABEL = 18;
+    public static final int CUSTOM_LABEL = 19;
 
     /**
      * The constant SALE_STATUS.
      */
-    public static final int SALE_STATUS = 19;
+    public static final int SALE_STATUS = 20;
 
     /**
      * The constant MATCH_STATUS.
      */
-    public static final int MATCH_STATUS = 20;
+    public static final int MATCH_STATUS = 21;
 }

+ 10 - 31
src/main/java/com/uas/platform/b2c/prod/commodity/service/impl/ReleaseProductByBatchServiceImpl.java

@@ -12,22 +12,9 @@ import com.uas.platform.b2c.core.support.SystemSession;
 import com.uas.platform.b2c.core.utils.NumberUtil;
 import com.uas.platform.b2c.core.utils.RegexConstant;
 import com.uas.platform.b2c.core.utils.StringUtilB2C;
-import com.uas.platform.b2c.prod.commodity.constant.DoubleConstant;
-import com.uas.platform.b2c.prod.commodity.constant.ErrorInfoConstant;
-import com.uas.platform.b2c.prod.commodity.constant.ModifyConstant;
-import com.uas.platform.b2c.prod.commodity.constant.ShortConstant;
-import com.uas.platform.b2c.prod.commodity.constant.UploadConstant;
-import com.uas.platform.b2c.prod.commodity.dao.GoodsDao;
-import com.uas.platform.b2c.prod.commodity.dao.ProductDao;
-import com.uas.platform.b2c.prod.commodity.dao.ProductPersonDao;
-import com.uas.platform.b2c.prod.commodity.dao.ProductPrivateDao;
-import com.uas.platform.b2c.prod.commodity.dao.ReleaseProductByBatchDao;
-import com.uas.platform.b2c.prod.commodity.model.Goods;
-import com.uas.platform.b2c.prod.commodity.model.GoodsQtyPrice;
-import com.uas.platform.b2c.prod.commodity.model.Product;
-import com.uas.platform.b2c.prod.commodity.model.ProductPerson;
-import com.uas.platform.b2c.prod.commodity.model.ProductPrivate;
-import com.uas.platform.b2c.prod.commodity.model.ReleaseProductByBatch;
+import com.uas.platform.b2c.prod.commodity.constant.*;
+import com.uas.platform.b2c.prod.commodity.dao.*;
+import com.uas.platform.b2c.prod.commodity.model.*;
 import com.uas.platform.b2c.prod.commodity.service.GoodsService;
 import com.uas.platform.b2c.prod.commodity.service.ReleaseProductByBatchService;
 import com.uas.platform.b2c.prod.commodity.util.GoodsUtil;
@@ -45,11 +32,7 @@ import com.uas.platform.core.persistence.criteria.SimpleExpression;
 import org.apache.commons.collections.CollectionUtils;
 import org.apache.poi.hssf.usermodel.HSSFCell;
 import org.apache.poi.hssf.usermodel.HSSFDateUtil;
-import org.apache.poi.ss.usermodel.Cell;
-import org.apache.poi.ss.usermodel.DateUtil;
-import org.apache.poi.ss.usermodel.Row;
-import org.apache.poi.ss.usermodel.Sheet;
-import org.apache.poi.ss.usermodel.Workbook;
+import org.apache.poi.ss.usermodel.*;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.dao.DataAccessException;
@@ -72,16 +55,7 @@ import java.sql.SQLException;
 import java.sql.Statement;
 import java.text.DateFormat;
 import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
+import java.util.*;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
@@ -455,6 +429,7 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 		} else {
 			goods.setSelfSale("1");
 		}
+		goods.setSpec(aBatch.getSpec());
 		goods.setStatus(aBatch.getStatus());
 	}
 
@@ -480,6 +455,10 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 				rowNum, ModifyConstant.PRODUCT_CODE);
 		aProduct.setCode(StringUtilB2C.getStr(codeValue));
 
+		Object specValue = readWorkBookCell(row.getCell(ModifyConstant.PRODUCT_SPEC), Cell.CELL_TYPE_STRING,
+				rowNum, ModifyConstant.PRODUCT_SPEC);
+		aProduct.setSpec(StringUtilB2C.getStr(specValue));
+
 		Cell productCell = row.getCell(ModifyConstant.PRODUCE_DATE);
 		if (productCell != null && productCell.getCellType() == 0) {
 			if (HSSFDateUtil.isCellDateFormatted(productCell)) {

+ 4 - 3
src/main/java/com/uas/platform/b2c/trade/vendor/controller/VendorIntroductionController.java

@@ -34,16 +34,17 @@ public class VendorIntroductionController {
 
 
     /**
-     * 根据关键词(非必填)获取供应商资源列表
+     * 根据关键词(非必填)精确匹配来获取供应商资源列表
      *
      * @param size  the params 一页的大小
 	 * @param page 第几页
      * @param keyword the keyword  搜索关键字
+	 * @param field 字段   kind  类目 cmpCode 型号  brand 品牌
      * @return the Page<VendorIntroduction> 返回一页的数据
      */
     @RequestMapping(value = "/vendor/list", method = RequestMethod.GET)
-	public Page<VendorIntroduction> getVendorIntroductionList(int page, int size, String keyword) {
-		return vendorIntroductionService.getVendorIntroduction(page, size, keyword);
+	public Page<VendorIntroduction> getVendorIntroductionList(int page, int size, String keyword, String field) {
+		return vendorIntroductionService.getVendorIntroduction(page, size, keyword, field);
 	}
 
 	/**

+ 8 - 6
src/main/java/com/uas/platform/b2c/trade/vendor/service/VendorIntroductionService.java

@@ -12,13 +12,15 @@ public interface VendorIntroductionService {
 
 
     /**
-     * 获取供应商资源列表
-     * @param page 页码
-     * @param size 每页大小
-     * @param keyword  关键词
-     * @return 供应商资源page
+     * 根据关键词(非必填)精确匹配来获取供应商资源列表
+     *
+     * @param size  the params 一页的大小
+     * @param page 第几页
+     * @param keyword the keyword  搜索关键字
+     * @param field 字段   kind  类目 cmpCode 型号  brand 品牌
+     * @return the Page<VendorIntroduction> 返回一页的数据
      */
-    Page<VendorIntroduction> getVendorIntroduction(int page, int size, String keyword);
+    Page<VendorIntroduction> getVendorIntroduction(int page, int size, String keyword, String field);
 
     /**
      * 根据vendUU获取企业物料列表

+ 103 - 58
src/main/java/com/uas/platform/b2c/trade/vendor/service/impl/VendorIntroductionServiceImpl.java

@@ -34,28 +34,67 @@ public class VendorIntroductionServiceImpl implements VendorIntroductionService
 	private SearchService searchService;
 
 	/**
-	 * 获取供应商资源列表
-	 * @param page    页码
-	 * @param size    每页大小
-	 * @param keyword 关键词
-	 * @return 供应商资源page
-     * @version 2018年5月15日 11:53:06 增加限制,要求营业执照号长度大于12才显示
+	 * 类目
+	 */
+	private static final String KIND_EQUAL = "kind";
+
+	/**
+	 * 型号
+	 */
+	private static final String PCMPCODE_EQUAL = "pCmpCode";
+
+	/**
+	 * 品牌
+	 */
+	private static final String PBRANDEN_EQUAL = "pBrandEn";
+
+	/**
+	 * 根据关键词(非必填)精确匹配来获取供应商资源列表
+	 *
+	 * @param size  the params 一页的大小
+	 * @param page 第几页
+	 * @param keyword the keyword  搜索关键字
+	 * @param field 字段   kind  类目 cmpCode 型号  brand 品牌
+	 * @return the Page<VendorIntroduction> 返回一页的数据
 	 */
 	@Override
-	public Page<VendorIntroduction> getVendorIntroduction(int page, int size, String keyword) {
+	public Page<VendorIntroduction> getVendorIntroduction(int page, int size, String keyword, String field) {
 		long start = System.currentTimeMillis();
+		String enterpriseCondition = " 1=1 ";
+		String productCondition = "";
+		// 拼接查询条件
 		if (!StringUtils.isEmpty(keyword)) {
             keyword = keyword.trim();
+			enterpriseCondition = "(en_name like '%" + keyword + "%' or en_address like '%" + keyword + "%' or en_industry like '% "
+					+ keyword + "%')";
+            if (!StringUtils.isEmpty(field)) {
+            	switch (field) {
+					case KIND_EQUAL :
+						productCondition = "pr_kind = '" + keyword + "'";
+						break;
+					case PCMPCODE_EQUAL :
+						productCondition = "pr_pcmpcode = '" + keyword + "'";
+						break;
+					case PBRANDEN_EQUAL :
+						productCondition = "pr_pbranden = '" + keyword + "'";
+						break;
+				}
+			}
         }
         Long enUU = 0L;
         if (null != SystemSession.getUser() && null != SystemSession.getUser().getEnterprise()) {
             enUU = SystemSession.getUser().getEnterprise().getUu();
         }
 		// 查询所有企业个数
-		Integer total = getTotalCount(enUU, keyword);
+		Integer total = getTotalCount(enUU, enterpriseCondition, productCondition);
 		// 查询企业
-		List<VendorIntroduction> vendorIntroductions = getEnterpriseWithCondition(enUU, keyword, page, size);
-//		System.out.println("查找完企业UU" + (System.currentTimeMillis() - start));
+		List<VendorIntroduction> vendorIntroductions;
+		if (!StringUtils.isEmpty(productCondition)) {
+			vendorIntroductions = getEnterpriseWithProductCondition(enUU, enterpriseCondition, productCondition,  page, size);
+		} else {
+			vendorIntroductions = getEnterpriseWithoutProductCondition(enUU, enterpriseCondition,  page, size);
+		}
+		System.out.println("查找完企业UU" + (System.currentTimeMillis() - start));
 		return new Page<VendorIntroduction>(page, size, vendorIntroductions, total);
 	}
 
@@ -103,91 +142,97 @@ public class VendorIntroductionServiceImpl implements VendorIntroductionService
 	/**
 	 * 获取供应商资源信息
 	 * @param enUU 本企业UU
-	 * @param keyword 关键词
+	 * @param enterpriseCondition 企业搜索条件
+	 * @param productCondition 物料搜索条件
 	 * @param page 页码
 	 * @param size 尺寸
 	 * @return
 	 */
-	private List<VendorIntroduction> getEnterpriseWithCondition(Long enUU, String keyword, int page, int size) {
+	private List<VendorIntroduction> getEnterpriseWithProductCondition(Long enUU, String enterpriseCondition, String productCondition, int page, int size) {
+		StringBuilder enterpriseSql = new StringBuilder();
+		// 查询所有符合条件的enUU的语句,按待售物料数量排序
+		String enUUSql = getEnUUGroupByEnUUOrderByCount(enUU, enterpriseCondition, productCondition);
+		// 获取企业sql
+		enterpriseSql.append("select en.en_uu enUU, en.en_name enName, en.en_shortname enShortname, en.en_address enAddress, en.en_tel enTel, " +
+				" en.en_email enEmail, en.en_corporation enCorporation, en.en_businesscode enBusinesscode, en.en_industry enIndustry, en.en_Businessscope enBusinessScope " +
+				",st.st_uuid,st.st_status from sec$enterprises en left join store$info st on st.st_enuu = en.en_uu right join (").append(enUUSql)
+				.append(" ) a on en.en_uu = a.en_uu order by en.en_weight desc, counts desc");
+		// 查找非供应商的卖当前商品的企业UU
+		StringBuilder vendorIntroductionUusSql = new StringBuilder();
+		// 行数 控制
+		String rownumSql = ") s order by isStore desc,prodCounts desc,enUU asc limit " + (page - 1) * size + "," + size ;
+		vendorIntroductionUusSql.append("select s.*, if( st_uuid is not null and st_status = 'OPENED', 1, 0) isStore");
+		vendorIntroductionUusSql.append(",(select count(1) from ( select pr_enuu from v$product$private where ").append(productCondition)
+				.append(" and ifnull(pr_b2cenabled, 1) = 1 and pr_pbranden is not null and pr_pcmpcode is not null) p1 where pr_enuu = enUU) prodCounts");
+		vendorIntroductionUusSql.append(" from (").append(enterpriseSql).append(rownumSql);
+		System.out.println("ens:" + vendorIntroductionUusSql);
+		return commonDao.query(vendorIntroductionUusSql.toString(), VendorIntroduction.class);
+	}
+
+	/**
+	 * 获取供应商资源信息
+	 * @param enUU 本企业UU
+	 * @param enterpriseCondition 企业搜索条件
+	 * @param page 页码
+	 * @param size 尺寸
+	 * @return
+	 */
+	private List<VendorIntroduction> getEnterpriseWithoutProductCondition(Long enUU, String enterpriseCondition, int page, int size) {
 		StringBuilder enterpriseSql = new StringBuilder();
-//		// 查询所有符合条件的enUU的语句,按待售物料数量排序
-//		String enUUSql = getEnUUGroupByEnUUOrderByCount(enUU, keyword);
 		// 获取企业sql
 		enterpriseSql.append("select en.en_uu enUU, en.en_name enName, en.en_shortname enShortname, en.en_address enAddress, en.en_tel enTel, " +
 				"en.en_email enEmail, en.en_corporation enCorporation, en.en_businesscode enBusinesscode, en.en_industry enIndustry, en.en_Businessscope enBusinessScope " +
 				",st.st_enuu,st.st_status from sec$enterprises en left join store$info st on st.st_enuu = en.en_uu where en_name not like '%测试%' and en_name not like '%test%' " +
 				"and (length(en_businesscode) > 12 or en_name like '%香港%' or en_name like '%HONG KONG%' or en_area like '%香港%') and " +
 				" (en_name not REGEXP '^[0-9]*$' and (en_name like '%ltd%' or en_name like '%limited%' or en_name like '%tcl%' or en_name not regexp '[\\u4e00-\\u9fa5_a-zA-Z0-9]')) and en_uu <> ")
-			.append(enUU);
-		if (!StringUtils.isEmpty(keyword)) {
-			enterpriseSql.append(" and (en_name like '%").append(keyword).append("%' or en_address like '%").append(keyword).append("%' or en_industry like '%").append(keyword)
-			.append("%')");
-		}
+				.append(enUU).append(" and ").append(enterpriseCondition);
 		// rownum 控制
 		String rownumSql = ") s order by isStore desc,enUU asc limit " + (page - 1) * size + "," + size ;
-//		// 查询企业简要物料信息语句
-//		String prodInfoSql = "select wm_concat(pr_title || (case when pr_brand is not null then '(' || pr_brand || ')' else ' ' end)) from v$product$private where pr_enuu=en_uu and "
-//				+ " and pr_issale = 1 and pr_b2cenabled = 1 and rownum<5 ";
 		// 查询企业是否开店语句
-		// 查找非供应商的卖当前商品的企业UU
-		// (select 1 from v$product$private where ifnull(pr_b2cenabled, 1) = 1 and pr_issale = 1 and pr_pbranden is not null and pr_pcmpcode is not null and pr_enuu = enUU limit 0,1) hasProduct
 		String vendorIntroductionUusSql = "select s.*, if( st_enuu is not null and st_status = 'OPENED', 1, 0) isStore from ("
 				+ enterpriseSql + rownumSql;
-//		String vendorIntroductionUusSql = "select s.*,( " + prodInfoSql + ") productInfo, (" + storeSql +
-//				") isStore from (select t.*,rownum as r1 from (" + enterpriseSql + rownumSql;
-//        System.out.println("ens:" + vendorIntroductionUusSql);
 		return commonDao.query(vendorIntroductionUusSql, VendorIntroduction.class);
 	}
 
 	/**
 	 * 获取所有符合条件企业数量
 	 * @param enUU  本企业UU
-	 * @param keyword 关键词
+	 * @param enterpriseCondition 企业过滤条件
+	 * @param productCondition 物料过滤条件
 	 * @return
 	 */
-	private Integer getTotalCount(Long enUU, String keyword) {
+	private Integer getTotalCount(Long enUU, String enterpriseCondition, String productCondition) {
 		StringBuilder enCountSql = new StringBuilder();
-		// 含名称、地址、、行业、经营范围搜索 物料型号、名称
-		if (!StringUtils.isEmpty(keyword)) {
-			String keywordSql = getKeywordSql(enUU, keyword);
-			enCountSql.append("select count(1) from (").append(keywordSql);
-		} else {
-			enCountSql.append("select count(1) from (select en_uu,count(1) from sec$enterprises where en_name not like '%测试%' " +
-					" and en_name not like '%test%' and (length(en_businesscode) > 12 or en_name like '%香港%' or en_name like '%HONG KONG%' or en_area like '%香港%')" +
-					" and (en_name not REGEXP '^[0-9]*$' and (en_name like '%ltd%' or en_name like '%limited%' or en_name like '%tcl%' or en_name not regexp '[\\u4e00-\\u9fa5_a-zA-Z0-9]')) and en_uu <> ").append(enUU);
+		enCountSql.append("select count(1) from (select en_uu,count(1) from (select en_uu from sec$enterprises where en_name not like '%测试%' " +
+				" and en_name not like '%test%' and (length(en_businesscode) > 12 or en_name like '%香港%' or en_name like '%HONG KONG%' " +
+				" or en_area like '%香港%')and (en_name not REGEXP '^[0-9]*$' and (en_name like '%ltd%' or en_name like '%limited%' or " +
+				" en_name like '%tcl%' or en_name not regexp '[\\u4e00-\\u9fa5_a-zA-Z0-9]') and ").append(enterpriseCondition).append(") and en_uu <> ")
+				.append(enUU).append(") e ");
+		if (!StringUtils.isEmpty(productCondition)) {
+			enCountSql.append("right join ( select pr_enuu from v$product$private where ").append(productCondition).append(") p on pr_enuu = en_uu");
 		}
 		enCountSql.append(" group by en_uu )a");
-//        System.out.println("en_count:" + enCountSql.toString());
+        System.out.println("en_count:" + enCountSql.toString());
 		return commonDao.queryForObject(enCountSql.toString(), Integer.class);
 	}
 
-	/**
-	 * 拼接关键词Sql
-	 * @param enUU
-	 * @param keyword
-	 * @return
-	 */
-	private String getKeywordSql(Long enUU, String keyword) {
-		return "select en_uu,count(1) as counts from sec$enterprises where en_name not like '%测试%' " +
-				"and lower(en_name) not like '%test%' and (length(en_businesscode) > 12 or en_name like '%香港%' or en_name like '%HONG KONG%' or en_area like '%香港%') and (en_name like '%"
-				+ keyword + "%' or en_address like '%" + keyword + "%' or en_industry like '%" + keyword + "%') and en_uu <> " + enUU +
-                " and (en_name not regexp '^[0-9]*$' and (en_name like '%ltd%' or en_name like '%limited%' or en_name like '%tcl%' or en_name not regexp '[\\u4e00-\\u9fa5a-zA-Z0-9]'))";
-	}
-
 	/**
 	 * 拼接所有待售物料所属企业UU,按enUU分组,按物料数量倒序
 	 * @param enUU 当前企业UU
-	 * @param keyword 搜索关键词
+	 * @param enterpriseCondition 企业过滤条件
+	 * @param productCondition 物料匹配条件
 	 * @return
 	 */
-	private String getEnUUGroupByEnUUOrderByCount(Long enUU, String keyword) {
+	private String getEnUUGroupByEnUUOrderByCount(Long enUU, String enterpriseCondition, String productCondition) {
 		StringBuilder enUUSql = new StringBuilder();
 		// 含名称、企业执照号、地址、邮箱、电话、行业、经营范围搜索
-		if (!StringUtils.isEmpty(keyword)) {
-			enUUSql.append(getKeywordSql(enUU, keyword));
-		} else {
-			enUUSql.append("select en_uu, count(1) as counts from (select * from sec$enterprises where en_name not like '%测试%' " +
-					" and lower(en_name) not like '%test%') en where en.en_uu <> ").append(enUU);
+		enUUSql.append("select en_uu, count(1) as counts from (select en_uu from sec$enterprises where en_name not like '%测试%' " +
+				" and en_name not like '%test%' and (length(en_businesscode) > 12 or en_name like '%香港%' or en_name like '%HONG KONG%' " +
+				" or en_area like '%香港%')and (en_name not REGEXP '^[0-9]*$' and (en_name like '%ltd%' or en_name like '%limited%' or " +
+				" en_name like '%tcl%' or en_name not regexp '[\\u4e00-\\u9fa5_a-zA-Z0-9]')) and ").append(enterpriseCondition).append(" and en_uu <> ").append(enUU)
+				.append(") e");
+		if (!StringUtils.isEmpty(productCondition)) {
+			enUUSql.append(" right join ( select pr_enuu from v$product$private where ").append(productCondition).append(") p on pr_enuu = en_uu");
 		}
 		enUUSql.append(" group by en_uu order by count(1) desc ");
 		return enUUSql.toString();

BIN
src/main/resources/jxls-tpl/trade/goods.xls


BIN
src/main/resources/jxls-tpl/trade/products-error.xls


BIN
src/main/resources/jxls-tpl/trade/products.xls


BIN
src/main/resources/jxls-tpl/trade/releaseByBatch-rmb.xls


BIN
src/main/resources/jxls-tpl/trade/releaseByBatchError-rmb.xls


BIN
src/main/resources/jxls-tpl/trade/releaseByBatchError-usd.xls


BIN
src/main/resources/jxls-tpl/trade/releasebyBatch-usd.xls


+ 5 - 1
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_upload_ctrl.js

@@ -274,7 +274,11 @@ define([ 'app/app' ], function(app) {
 				// if(!message) {
 				// 	message = '没有提交任何信息'
 				// }
-				toaster.pop('info', '提示', '上传完成');
+                if ($scope.result.filter && $scope.result.filter > 0) {
+                    toaster.pop('warning', '警告', '存在导入失败产品,可下载导入失败表格查看详情');
+                } else {
+                    toaster.pop('success', '提示', '上传完成');
+                }
 				$scope.relTableParams.page(1);
 				$scope.relTableParams.reload();
                 if ($rootScope.$$productOn.tab === 'bathOnPerson') {

+ 18 - 20
src/main/webapp/resources/view/usercenter/forstore/buyer_transfer.html

@@ -3,25 +3,24 @@
 <div class="user_right fr">
 	<div class="down-payment">
 		<div class="content">
-			<!--<div class="common-title margin-top-none">付款账户</div>-->
-			<!--<div class="payment-style">-->
-				<!--<ul>-->
-					<!--<li ng-if="buyAccount">-->
-						<!--<label class="check-act" style="margin-right: 64px;">-->
-							<!--<input type="radio" id="1" name="1" checked/>-->
-							<!--<label for="1"></label>-->
-							<!--<em class="word-in-10" ng-bind="buyAccount.bankname" title="{{buyAccount.bankname}}"></em>-->
-						<!--</label>-->
-						<!--<div ng-bind="buyAccount.filterAccount"></div>-->
-						<!--<div ng-bind="buyAccount.accountname"></div>-->
-						<!--<div ng-if="buyAccountInfos.length > 1"><button class="change-count" ng-click="changebuyAccount(buyAccount.id)">更换账户</button></div>-->
-					<!--</li>-->
-					<!--<li class="no-count" ng-if="!buyAccount">-->
-						<!--<span><i class="fa fa-exclamation-circle"></i>暂未设置付款账户,前往  <a href="javascript:void(0)" ng-click="editAccount()">设置付款账户</a></span>-->
-					<!--</li>-->
-				<!--</ul>-->
-			<!--</div>-->
-			<!--
+			<div class="common-title margin-top-none">付款账户</div>
+			<div class="payment-style">
+				<ul>
+					<li ng-if="buyAccount">
+						<label class="check-act" style="margin-right: 64px;">
+							<input type="radio" id="1" name="1" checked/>
+							<label for="1"></label>
+							<em class="word-in-10" ng-bind="buyAccount.bankname" title="{{buyAccount.bankname}}"></em>
+						</label>
+						<div ng-bind="buyAccount.filterAccount"></div>
+						<div ng-bind="buyAccount.accountname"></div>
+						<div ng-if="buyAccountInfos.length > 1"><button class="change-count" ng-click="changebuyAccount(buyAccount.id)">更换账户</button></div>
+					</li>
+					<li class="no-count" ng-if="!buyAccount">
+						<span><i class="fa fa-exclamation-circle"></i>暂未设置付款账户,前往  <a href="javascript:void(0)" ng-click="editAccount()">设置付款账户</a></span>
+					</li>
+				</ul>
+			</div>
 			<div class="common-title margin-top-8">收款账户</div>
 			<div class="payment-style">
 				<ul class="payment-80">
@@ -65,7 +64,6 @@
 					</li>
 				</ul>
 			</div>
-			-->
 			<div class="common-title margin-top-8" ng-if="type == 'PAIDTOVENDOR'">分期付款明细</div>
 			<div class="payment-detail" ng-if="type == 'PAIDTOVENDOR'">
 				<ul>

+ 1 - 1
src/main/webapp/resources/view/usercenter/forstore/seekPurchase.html

@@ -1010,7 +1010,7 @@
                 <th width="260">型号/规格</th>
                 <th width="110">采购数量(PCS)</th>
                 <th width="120">状态/截止时间</th>
-                <th width="136">操作</th>
+                <th width="140">操作</th>
             </tr>
             </thead>
             <tbody ng-repeat="seek in seekListData.content" ng-class="{'active': seek.$status && (seek.$status == 1 || seek.$status == 2)}">

+ 3 - 3
src/main/webapp/resources/view/vendor/forstore/purchaseOffer.html

@@ -662,12 +662,12 @@
         <table ng-table="seekPurchaseTableParams">
             <thead>
             <tr>
-                <th width="178">买家/发布时间</th>
+                <th width="180">买家/发布时间</th>
                 <th width="245">类目/品牌</th>
                 <th width="245">型号/规格</th>
                 <th width="110">采购数量(PCS)</th>
-                <th width="124">剩余时间</th>
-                <th width="88">操作</th>
+                <th width="130">剩余时间</th>
+                <th width="90">操作</th>
             </tr>
             </thead>
             <tbody ng-repeat="seek in $data track by $index" ng-class="{'active': seek.$active, 'hover': seek.$hover && (seek.status == 201 || seek.status == 202)}">

+ 3 - 3
src/main/webapp/resources/view/vendor/forstore/seekPurchase.html

@@ -699,12 +699,12 @@
         <table ng-table="seekPurchaseTableParams">
             <thead>
                 <tr>
-                    <th width="178">买家/发布时间</th>
+                    <th width="180">买家/发布时间</th>
                     <th width="245">类目/品牌</th>
                     <th width="245">型号/规格</th>
                     <th width="110">采购数量(PCS)</th>
-                    <th width="124">剩余时间</th>
-                    <th width="88">操作</th>
+                    <th width="130">剩余时间</th>
+                    <th width="90">操作</th>
                 </tr>
             </thead>
             <tbody ng-repeat="seek in seekListData track by $index" ng-class="{'active': seek.$active}">

+ 10 - 1
src/main/webapp/resources/view/vendor/forstore/vendor_material.html

@@ -379,7 +379,8 @@
 		font-size: 12px;
 		line-height: 35px;
 		/* margin-top: 5px; */
-		padding-right: 22px
+		padding-right: 22px;
+		overflow: hidden;
 	}
 	.device .tab{
 		padding-bottom: 20px;
@@ -1930,6 +1931,13 @@
 	.edit-replace-box .content .content-line .form-item input.error {
 		border-color: #e30e16;
 	}
+	/*上架30分钟提示*/
+	.record-line .tip {
+		padding-left: 30px;
+		float: left;
+		font-size: 14px;
+		color: #f60e0e;
+	}
 </style>
 <div class="user_right fr">
 	<!--货品管理-->
@@ -2467,6 +2475,7 @@
 						<!--<strong class="text-inverse">*</strong>商城暂未收录的 品牌/器件,”原厂型号“将会显示为空且不可上架售卖,<br/>-->
 						<!--如需上架可先点击 【匹配】按钮,若匹配不成功,可前往<a ui-sref="vendor_brand_apply" target="_blank"> 品牌申请/</a><a ui-sref="vendor_component_apply" target="_blank">器件申请</a>,提出申请-->
 					<!--</div>-->
+					<div class="tip">* 上架成功30分钟后,方可被客户搜索到,并在业产品库展示。</div>
 					<div ng-if="currenctMaterial.length != 0">显示 {{(param.page - 1) * 10 + 1}}-
 						<span ng-if="param.currentPage == materialAll.totalPages" ng-bind="materialAll.totalElements"></span>
 						<span ng-if="param.currentPage != materialAll.totalPages" ng-bind="param.page * param.count"></span>, 共: <span ng-bind="materialAll.totalElements" style="color: #5078cb;"></span> 个</div>

+ 2 - 2
src/main/webapp/resources/view/vendor/forstore/vendor_store_maintain.html

@@ -699,7 +699,7 @@
 			</div>-->
 			<div class="row com_row">
 				<div class="col-md-2 custom_col">
-					<span>简&nbsp;&nbsp;&nbsp;&nbsp;介<strong class="text-inverse">*</strong></span>
+					<span>主营产品<strong class="text-inverse">*</strong></span>
 				</div>
 				<div class="col-md-10 custom_col">
 					<textarea class="form-control" style="border-radius: inherit;resize: none;height: 200px;" title="description" ng-model="sampleStore.description" maxlength="500" required></textarea>
@@ -715,7 +715,7 @@
 			</div>-->
 			<div class="row com_row" style="margin-top: 10px;">
 				<div class="col-md-2 custom_col">
-					<span>企业地址<strong class="text-inverse">*</strong></span>
+					<span>店铺地址<strong class="text-inverse">*</strong></span>
 				</div>
 				<div class="col-md-10 custom_col">
 					<input type="text" class="form-control" style="border-radius: inherit;" title="address" ng-model="sampleStore.enterprise.address" maxlength="50"/>

+ 10 - 1
src/main/webapp/resources/view/vendor/forstore/vendor_upload.html

@@ -517,6 +517,12 @@
     .com_tab ul li.active:after{
         display: block
     }
+    /*上架30分钟提示*/
+    .device .load_next .tip {
+        margin-left: 15px;
+        font-size: 14px;
+        color: #f60e0e;
+    }
 </style>
 <div class="user_right fr">
     <!--货品管理-->
@@ -686,7 +692,10 @@
                             </tbody>
                         </table>
                         <div style="margin-top: -40px;" ng-if="$$productOn.tab == 'bathOn'">3、如核对信息无误之后,点击确认发布</div>
-                        <span class="blue-bg publish" href="javascript:void(0)" ng-click="publish($event)" ng-disabled="!pageParams.totalElements" ng-show="$$productOn.tab == 'bathOn'"><span>确认上架</span></span>
+                        <div>
+                            <span class="blue-bg publish" href="javascript:void(0)" ng-click="publish($event)" ng-disabled="!pageParams.totalElements" ng-show="$$productOn.tab == 'bathOn'"><span>确认上架</span></span>
+                            <b class="tip" ng-show="$$productOn.tab == 'bathOn'">* 上架成功30分钟后,方可被客户搜索到,并在业产品库展示。</b>
+                        </div>
                     </div>
                 </div>
                 <!--<div class="load_next">-->