Browse Source

Merge branch 'hotfix-0622-yuj' into dev

yujia 7 years ago
parent
commit
a6e0b4592d
36 changed files with 232 additions and 211 deletions
  1. BIN
      jpg
  2. 24 12
      src/main/java/com/uas/platform/b2c/common/weixin/model/MessageModel.java
  3. 2 2
      src/main/java/com/uas/platform/b2c/common/weixin/service/impl/WeChatServiceImpl.java
  4. 3 3
      src/main/java/com/uas/platform/b2c/external/erp/product/service/impl/ComponentSubmitUasServiceImpl.java
  5. 1 1
      src/main/java/com/uas/platform/b2c/external/erp/product/service/impl/KindServiceImpl.java
  6. 3 3
      src/main/java/com/uas/platform/b2c/prod/commodity/constant/ErrorInfoConstant.java
  7. 4 4
      src/main/java/com/uas/platform/b2c/prod/commodity/dao/GoodsDao.java
  8. 20 16
      src/main/java/com/uas/platform/b2c/prod/commodity/service/impl/GoodsServiceImpl.java
  9. 1 59
      src/main/java/com/uas/platform/b2c/prod/commodity/service/impl/ProductServiceImpl.java
  10. 2 2
      src/main/java/com/uas/platform/b2c/prod/commodity/service/impl/ReleaseProductByBatchServiceImpl.java
  11. 1 1
      src/main/java/com/uas/platform/b2c/prod/product/common/api/CompareController.java
  12. 1 1
      src/main/java/com/uas/platform/b2c/prod/product/component/controller/ComponentController.java
  13. 14 11
      src/main/java/com/uas/platform/b2c/prod/product/component/service/impl/ComponentServiceImpl.java
  14. 13 13
      src/main/java/com/uas/platform/b2c/prod/product/component/service/impl/ComponentSubmitServiceImpl.java
  15. 3 3
      src/main/java/com/uas/platform/b2c/prod/product/kind/api/KindController.java
  16. 2 2
      src/main/java/com/uas/platform/b2c/prod/product/kind/controller/KindAdviceController.java
  17. 14 14
      src/main/java/com/uas/platform/b2c/prod/product/kind/controller/KindController.java
  18. 1 1
      src/main/java/com/uas/platform/b2c/prod/product/kind/model/KindInfo.java
  19. 4 4
      src/main/java/com/uas/platform/b2c/prod/product/kind/service/impl/KindConcernServiceImpl.java
  20. 49 31
      src/main/java/com/uas/platform/b2c/prod/product/kind/service/impl/KindServiceImpl.java
  21. BIN
      src/main/resources/jxls-tpl/product/componentBatchMaintenance.xls
  22. BIN
      src/main/resources/jxls-tpl/trade/releasePCBByBatch-rmb.xls
  23. BIN
      src/main/resources/jxls-tpl/trade/releasePCBByBatchError-rmb.xls
  24. BIN
      src/main/resources/jxls-tpl/trade/releasePCBByBatchError-usd.xls
  25. BIN
      src/main/resources/jxls-tpl/trade/releasePCBbyBatch-usd.xls
  26. 6 6
      src/main/webapp/resources/js/vendor/app.js
  27. 14 2
      src/main/webapp/resources/js/vendor/controllers/forstore/purchasAttendtion_ctrl.js
  28. 1 1
      src/main/webapp/resources/view/usercenter/forstore/bomDetail.html
  29. 2 2
      src/main/webapp/resources/view/usercenter/forstore/seekPurchase.html
  30. 36 6
      src/main/webapp/resources/view/vendor/forstore/purchasAttendtion.html
  31. 1 1
      src/main/webapp/resources/view/vendor/forstore/purchaseOffer.html
  32. 2 2
      src/main/webapp/resources/view/vendor/forstore/seekPurchase.html
  33. 2 2
      src/main/webapp/resources/view/vendor/forstore/vendor_material.html
  34. 2 2
      src/main/webapp/resources/view/vendor/forstore/vendor_material_person.html
  35. 3 3
      src/main/webapp/resources/view/vendor/forstore/vendor_onSale.html
  36. 1 1
      src/main/webapp/resources/view/vendor/forstore/vendor_upload.html

BIN
jpg


+ 24 - 12
src/main/java/com/uas/platform/b2c/common/weixin/model/MessageModel.java

@@ -1,8 +1,7 @@
 package com.uas.platform.b2c.common.weixin.model;
 
 /**
- * @author liusw
- * @date 2018-05-29 20:14
+ * 消息
  */
 public class MessageModel {
     /**
@@ -71,29 +70,42 @@ public class MessageModel {
     private String consumerApp;
 
     /**
-     * 询价名称
+     * 询价方信息
      */
-    private String name;
+    private String buyerName;
+
+    /**
+     * 供应商信息
+     */
+    private String vendName;
 
     /**
      * 型号
      */
     private String cmpCode;
 
-    public String getCmpCode() {
-        return cmpCode;
+    public String getBuyerName() {
+        return buyerName;
     }
 
-    public void setCmpCode(String cmpCode) {
-        this.cmpCode = cmpCode;
+    public void setBuyerName(String buyerName) {
+        this.buyerName = buyerName;
     }
 
-    public String getName() {
-        return name;
+    public String getVendName() {
+        return vendName;
     }
 
-    public void setName(String name) {
-        this.name = name;
+    public void setVendName(String vendName) {
+        this.vendName = vendName;
+    }
+
+    public String getCmpCode() {
+        return cmpCode;
+    }
+
+    public void setCmpCode(String cmpCode) {
+        this.cmpCode = cmpCode;
     }
 
     public String getType() {

+ 2 - 2
src/main/java/com/uas/platform/b2c/common/weixin/service/impl/WeChatServiceImpl.java

@@ -103,8 +103,8 @@ public class WeChatServiceImpl implements WeChatService{
                 WechatTemplateMsg wechatTemplateMsg = new WechatTemplateMsg();
                 wechatTemplateMsg.setTemplate_id(WeChatUtil.INQUIRY_TEMPLATE_ID);
 
-                params.put("first", WechatTemplateMsg.item("尊敬的用户,您所在的企业(" + messageModel.getName() + ")有一条新的询价单", null));
-                params.put("keyword1", WechatTemplateMsg.item(messageModel.getName(), "#173177"));
+                params.put("first", WechatTemplateMsg.item("尊敬的用户,您所在的企业(" + messageModel.getVendName() + ")有一条新的询价单", null));
+                params.put("keyword1", WechatTemplateMsg.item(messageModel.getBuyerName(), "#173177"));
                 params.put("keyword2", WechatTemplateMsg.item("点击查看详情", "#173177"));
                 params.put("keyword3", WechatTemplateMsg.item("点击查看详情", "#173177"));
                 params.put("remark", WechatTemplateMsg.item(WeChatUtil.TEMPLATE_REMARK.replace("cmpCode", messageModel.getCmpCode()), null));

+ 3 - 3
src/main/java/com/uas/platform/b2c/external/erp/product/service/impl/ComponentSubmitUasServiceImpl.java

@@ -77,18 +77,18 @@ public class ComponentSubmitUasServiceImpl implements ComponentSubmitUasService
             // 验证类目是否正确
             if (componentSubmit.getKindid() == null) {
                 if (componentSubmit.getKindName() == null) {
-                    throw new B2CException("类目名不可为空");
+                    throw new B2CException("物料名称(类目)不可为空");
                 }
                 List<Kind> existKind = kindDao.findByNameCn(componentSubmit.getKindName());
                 if (!CollectionUtils.isEmpty(existKind)) {
                     componentSubmit.setKindid(existKind.get(0).getId());
                 } else {
-                    throw new B2CException("器件申请中所选类目不存在");
+                    throw new B2CException("器件申请中所选物料名称(类目)不存在");
                 }
             }
             Kind kind = kindDao.findOne(componentSubmit.getKindid());
             if (kind == null) {
-                throw new B2CException("器件申请中所选类目不存在");
+                throw new B2CException("器件申请中所选物料名称(类目)不存在");
             }
             componentSubmit.setKind(kind);
 

+ 1 - 1
src/main/java/com/uas/platform/b2c/external/erp/product/service/impl/KindServiceImpl.java

@@ -76,7 +76,7 @@ public class KindServiceImpl implements KindService {
     private List<Kind> getParentsByChildId(Long childId, List<Kind> container) {
         Kind child = kindDao.findOne(childId);
         if (child == null) {
-            throw new IllegalOperatorException("要获取的父类目不存在");
+            throw new IllegalOperatorException("要获取的父物料名称(类目)不存在");
         }
         if (child.getParentid() != 0) {
             getParentsByChildId(child.getParentid(), container);

+ 3 - 3
src/main/java/com/uas/platform/b2c/prod/commodity/constant/ErrorInfoConstant.java

@@ -35,10 +35,10 @@ public enum  ErrorInfoConstant {
 
     BRAND_LENGTH_INFO("英文/中文品牌名称不能超过50个字符或25个汉字"),
     BRAND_EMPTY_INFO("英文/中文品牌名称不能为空"),
-    KIND_EMPTY_INFO("类目(产品名称)不能为空"),
-    KIND_LENGTH_INFO("类目(产品名称)不能超过20个字符"),
+    KIND_EMPTY_INFO("物料名称(类目)不能为空"),
+    KIND_LENGTH_INFO("物料名称(类目)不能超过20个字符"),
     // PCB模块使用
-    KIND_UNSTANDARD("类目(产品名称)不是商城标准类目"),
+    KIND_UNSTANDARD("物料名称(类目)不是商城标准类目"),
     BREAK_UP_INFO("请选择可拆卖情况是或否"),
     RESERVE_NUMBER_INFO("库存须填写小于10亿的正整数"),
     PRODUCE_DATE_INFO("生产日期不能为空"),

+ 4 - 4
src/main/java/com/uas/platform/b2c/prod/commodity/dao/GoodsDao.java

@@ -800,14 +800,14 @@ public interface GoodsDao extends JpaSpecificationExecutor<Goods>, JpaRepository
      * @param kind
      * @return
      */
-    @Query(nativeQuery = true, value = "select * from trade$goods where br_name_uuid is not null and ki_name=:kind and go_status = 601 limit 0,5")
+    @Query(nativeQuery = true, value = "select * from trade$goods where br_name_uuid is not null and ki_name=:kind and go_status = 601 limit 0,8")
     List<Goods> findByKindNameCnAndBrandIsNotNull(@Param("kind")String kind);
 
     /**
-     * 通过类目id获取品牌uuid不为空的前5个批次
-     * @param kindIds 类目id
+     * 通过类目名称获取品牌uuid不为空的前5个批次
+     * @param kinds 类目名称
      * @return
      */
-    @Query(nativeQuery = true, value = "select * from trade$goods where br_name_uuid is not null and ki_name in (:kind) and go_status = 601 limit 0,5")
+    @Query(nativeQuery = true, value = "select * from trade$goods where br_name_uuid is not null and ki_name in (:kind) and go_status = 601 limit 0,8")
     List<Goods> findInKindNamesAndBrandIsNotNull(@Param("kind")List<String> kinds);
 }

+ 20 - 16
src/main/java/com/uas/platform/b2c/prod/commodity/service/impl/GoodsServiceImpl.java

@@ -3972,7 +3972,7 @@ public class GoodsServiceImpl implements GoodsService {
             if (!StringUtils.isEmpty(kindid)) {
                 KindInfo kind = kindInfoDao.findOne(Long.valueOf(kindid));
                 if (kind == null) {
-                    throw new IllegalOperatorException("此类目信息不存在,请重新确认类目信息");
+                    throw new IllegalOperatorException("此物料名称(类目)信息不存在,请重新确认物料名称(类目)信息");
                 }
                 // 通过品牌类目信息获取物料id
                 productIds = pcbDao.findProductIdByKindidAndBrandid(kind.getId(), brand.getId());
@@ -4139,22 +4139,26 @@ public class GoodsServiceImpl implements GoodsService {
         List<KindInfo> kindInfos = kindInfoDao.findByParentid(3825L);
         if (CollectionUtils.isNotEmpty(kindInfos)) {
             for (KindInfo kindInfo : kindInfos) {
-                if (kindInfo.getIsLeaf().equals(Constant.YES)) {
-                    List<Goods> goods = goodsDao.findByKindNameCnAndBrandIsNotNull(kindInfo.getNameCn());
-                    if (CollectionUtils.isNotEmpty(goods)) {
-                        map.put(kindInfo.getNameCn(), goods);
-                    }
-                } else {
-                    List<KindInfo> kindInfoChildren = kindInfoDao.findByParentid(kindInfo.getId());
-                    if (!CollectionUtils.isEmpty(kindInfoChildren)) {
-                        List<String> names = new ArrayList<>();
-                        for (KindInfo child : kindInfoChildren) {
-                            names.add(child.getNameCn());
+                // 目前仅展示PCB材料、PCB耗材、PCB设备
+                String secondName = kindInfo.getNameCn();
+                if ("PCB材料".equals(secondName) || "PCB耗材".equals(secondName) || "PCB设备".equals(secondName)) {
+                    if (kindInfo.getIsLeaf().equals(Constant.YES)) {
+                        List<Goods> goods = goodsDao.findByKindNameCnAndBrandIsNotNull(kindInfo.getNameCn());
+                        if (CollectionUtils.isNotEmpty(goods)) {
+                            map.put(kindInfo.getNameCn(), goods);
                         }
-                        if (CollectionUtils.isNotEmpty(names)) {
-                            List<Goods> goods = goodsDao.findInKindNamesAndBrandIsNotNull(names);
-                            if (CollectionUtils.isNotEmpty(goods)) {
-                                map.put(kindInfo.getNameCn(), goods);
+                    } else {
+                        List<KindInfo> kindInfoChildren = kindInfoDao.findByParentid(kindInfo.getId());
+                        if (!CollectionUtils.isEmpty(kindInfoChildren)) {
+                            List<String> names = new ArrayList<>();
+                            for (KindInfo child : kindInfoChildren) {
+                                names.add(child.getNameCn());
+                            }
+                            if (CollectionUtils.isNotEmpty(names)) {
+                                List<Goods> goods = goodsDao.findInKindNamesAndBrandIsNotNull(names);
+                                if (CollectionUtils.isNotEmpty(goods)) {
+                                    map.put(kindInfo.getNameCn(), goods);
+                                }
                             }
                         }
                     }

+ 1 - 59
src/main/java/com/uas/platform/b2c/prod/commodity/service/impl/ProductServiceImpl.java

@@ -57,43 +57,6 @@ import com.uas.platform.b2c.prod.commodity.service.GoodsService;
 import com.uas.platform.b2c.prod.commodity.service.ProductService;
 import com.uas.platform.b2c.prod.commodity.service.ReleaseProductByBatchService;
 import com.uas.platform.b2c.prod.commodity.service.UASBatchPutOnPropertyService;
-import com.uas.platform.b2c.prod.commodity.dao.GoodsDao;
-import com.uas.platform.b2c.prod.commodity.dao.GoodsHistoryDao;
-import com.uas.platform.b2c.prod.commodity.dao.MatchModelDao;
-import com.uas.platform.b2c.prod.commodity.dao.ProductDao;
-import com.uas.platform.b2c.prod.commodity.dao.ProductDetailDao;
-import com.uas.platform.b2c.prod.commodity.dao.ProductMatchResultDao;
-import com.uas.platform.b2c.prod.commodity.dao.ProductModifyHistoryDao;
-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.ProductReplaceDao;
-import com.uas.platform.b2c.prod.commodity.dao.ProductStandardPutOnInfoDao;
-import com.uas.platform.b2c.prod.commodity.dao.ProductStoreStatusDao;
-import com.uas.platform.b2c.prod.commodity.dao.StockInOutHistDao;
-import com.uas.platform.b2c.prod.commodity.dao.V_ProductPersonDao;
-import com.uas.platform.b2c.prod.commodity.dao.V_ProductPrivateDao;
-import com.uas.platform.b2c.prod.commodity.model.Goods;
-import com.uas.platform.b2c.prod.commodity.model.GoodsHistory;
-import com.uas.platform.b2c.prod.commodity.model.GoodsQtyPrice;
-import com.uas.platform.b2c.prod.commodity.model.MatchModel;
-import com.uas.platform.b2c.prod.commodity.model.Product;
-import com.uas.platform.b2c.prod.commodity.model.ProductDetail;
-import com.uas.platform.b2c.prod.commodity.model.ProductMatchResult;
-import com.uas.platform.b2c.prod.commodity.model.ProductModifyHistory;
-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.ProductReplace;
-import com.uas.platform.b2c.prod.commodity.model.ProductStandardPutOnInfo;
-import com.uas.platform.b2c.prod.commodity.model.ProductStoreStatus;
-import com.uas.platform.b2c.prod.commodity.model.StockInOutHist;
-import com.uas.platform.b2c.prod.commodity.model.UASBatchPutOnProperty;
-import com.uas.platform.b2c.prod.commodity.model.V_ProductPerson;
-import com.uas.platform.b2c.prod.commodity.model.V_ProductPrivate;
-import com.uas.platform.b2c.prod.commodity.service.GoodsHistoryService;
-import com.uas.platform.b2c.prod.commodity.service.GoodsService;
-import com.uas.platform.b2c.prod.commodity.service.ProductService;
-import com.uas.platform.b2c.prod.commodity.service.ReleaseProductByBatchService;
-import com.uas.platform.b2c.prod.commodity.service.UASBatchPutOnPropertyService;
 import com.uas.platform.b2c.prod.commodity.type.ProductConstant;
 import com.uas.platform.b2c.prod.commodity.util.GoodsUtil;
 import com.uas.platform.b2c.prod.product.brand.dao.BrandDao;
@@ -105,7 +68,6 @@ import com.uas.platform.b2c.prod.product.component.modal.Component;
 import com.uas.platform.b2c.prod.product.component.modal.ComponentSubmit;
 import com.uas.platform.b2c.prod.product.kind.dao.KindInfoDao;
 import com.uas.platform.b2c.prod.product.kind.model.Kind;
-import com.uas.platform.b2c.prod.product.kind.model.KindInfo;
 import com.uas.platform.b2c.prod.store.model.StoreIn;
 import com.uas.platform.b2c.prod.store.model.StoreStatus;
 import com.uas.platform.b2c.prod.store.service.StoreInService;
@@ -127,7 +89,6 @@ import com.uas.platform.b2c.trade.support.ResultMap;
 import com.uas.platform.core.exception.IllegalOperatorException;
 import com.uas.platform.core.model.Constant;
 import com.uas.platform.core.model.PageInfo;
-import com.uas.platform.core.model.PageParams;
 import com.uas.platform.core.model.Type;
 import com.uas.platform.core.persistence.criteria.LogicalExpression;
 import com.uas.platform.core.persistence.criteria.PredicateUtils;
@@ -168,25 +129,6 @@ import org.springframework.transaction.annotation.Transactional;
 import org.springframework.util.StringUtils;
 import org.springframework.web.client.RestTemplate;
 
-import javax.persistence.criteria.CriteriaBuilder;
-import javax.persistence.criteria.CriteriaQuery;
-import javax.persistence.criteria.Predicate;
-import javax.persistence.criteria.Root;
-import java.lang.reflect.Field;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.sql.Statement;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-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.concurrent.ConcurrentHashMap;
-
 /**
  * Created by wangyc on 2017/5/26.
  */
@@ -1588,7 +1530,7 @@ public class ProductServiceImpl implements ProductService {
         if (CollectionUtils.isEmpty(componentMatched)) {// 提交申请为非标准器件则转成器件申请
             Kind kind = (Kind)jsonObject.get("kind");
             if (kind == null || kind.getId() == null)
-                throw new IllegalOperatorException("请选择商城类目");
+                throw new IllegalOperatorException("请选择商城物料名称(类目)");
             String attach = jsonObject.getString("attach");
             if (attach == null)
                 throw new IllegalOperatorException("请上传规格书");

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

@@ -711,7 +711,7 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 			}
 			Object codeCellObj = readWorkBookCell(headerRow.getCell(UploadConstant.PRODUCT_CODE), Cell.CELL_TYPE_STRING,
 					0, UploadConstant.PRODUCT_CODE);
-			if (!"产品型号".equals(StringUtilB2C.getStr(codeCellObj))) {
+			if (!"型号".equals(StringUtilB2C.getStr(codeCellObj))) {
 				throw new IllegalOperatorException("您上传的信息列信息不正确,请与模板的列做比较");
 			}
 
@@ -731,7 +731,7 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 			}
 			Object codeCellObj = readWorkBookCell(headerRow.getCell(UploadConstant.PRODUCT_CODE), Cell.CELL_TYPE_STRING,
 					0, UploadConstant.PRODUCT_CODE);
-			if (!"产品型号".equals(StringUtilB2C.getStr(codeCellObj))) {
+			if (!"型号".equals(StringUtilB2C.getStr(codeCellObj))) {
 				throw new IllegalOperatorException("您上传的信息列信息不正确,请与模板的列做比较");
 			}
 			Object priceCellObj = readWorkBookCell(headerRow.getCell(UploadConstant.PRICE_START), Cell.CELL_TYPE_STRING,

+ 1 - 1
src/main/java/com/uas/platform/b2c/prod/product/common/api/CompareController.java

@@ -57,7 +57,7 @@ public class CompareController {
 		// 同一子类目判定
 		if (!CollectionUtils.isEmpty(componentInfos)) {
 			if (!componentInfos.get(0).getKindid().equals(component.getKindid())) {
-				throw new IllegalOperatorException("不是相同子类目下的产品不可以一起对比");
+				throw new IllegalOperatorException("不是相同子物料名称(类目)下的产品不可以一起对比");
 			}
 		}
 		// 重复判定

+ 1 - 1
src/main/java/com/uas/platform/b2c/prod/product/component/controller/ComponentController.java

@@ -100,7 +100,7 @@ public class ComponentController {
 	 */
 	@RequestMapping(value = "/codeAndKindId/{code}", method = RequestMethod.GET)
 	public List<Component> getComponentByCodeAndKindId(@PathVariable("code") String code, Long kindId) {
-		logger.log("器件信息", "获取器件信息", "通过原厂型号:" + code + " 和类目id: " + kindId + " 获取器件简要信息");
+		logger.log("器件信息", "获取器件信息", "通过原厂型号:" + code + " 和物料名称(类目)id: " + kindId + " 获取器件简要信息");
 		return componentService.findByCodeAndKindId(code, kindId);
 	}
 

+ 14 - 11
src/main/java/com/uas/platform/b2c/prod/product/component/service/impl/ComponentServiceImpl.java

@@ -2,6 +2,7 @@ package com.uas.platform.b2c.prod.product.component.service.impl;
 
 import com.uas.platform.b2c.common.account.model.User;
 import com.uas.platform.b2c.common.search.rpc.service.SearchService;
+import com.uas.platform.b2c.common.search.util.PageParams;
 import com.uas.platform.b2c.core.config.SysConf;
 import com.uas.platform.b2c.core.constant.SplitChar;
 import com.uas.platform.b2c.prod.commodity.dao.GoodsDao;
@@ -30,8 +31,17 @@ import com.uas.platform.core.model.Type;
 import com.uas.platform.core.persistence.criteria.CriterionExpression.Operator;
 import com.uas.platform.core.persistence.criteria.PredicateUtils;
 import com.uas.platform.core.persistence.criteria.SimpleExpression;
-import com.uas.platform.b2c.common.search.util.PageParams;
-import com.uas.platform.b2c.common.search.util.PageParams.FilterField;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import javax.persistence.criteria.CriteriaBuilder;
+import javax.persistence.criteria.CriteriaQuery;
+import javax.persistence.criteria.Predicate;
+import javax.persistence.criteria.Root;
+import javax.servlet.http.HttpServletRequest;
 import org.apache.commons.collections.CollectionUtils;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -44,13 +54,6 @@ import org.springframework.transaction.annotation.Transactional;
 import org.springframework.ui.ModelMap;
 import org.springframework.util.StringUtils;
 
-import javax.persistence.criteria.CriteriaBuilder;
-import javax.persistence.criteria.CriteriaQuery;
-import javax.persistence.criteria.Predicate;
-import javax.persistence.criteria.Root;
-import javax.servlet.http.HttpServletRequest;
-import java.util.*;
-
 @Service
 @Transactional
 public class ComponentServiceImpl implements ComponentService {
@@ -515,7 +518,7 @@ public class ComponentServiceImpl implements ComponentService {
 		List<Component> components = new ArrayList<Component>();
 		Kind targetKind = kindDao.findOne(kindId);
 		if (targetKind == null) {
-			throw new IllegalOperatorException("目标类目不存在");
+			throw new IllegalOperatorException("目标物料名称(类目)不存在");
 		}
 		Long oldKindId = null;
 		for (String uuid : uuids) {
@@ -531,7 +534,7 @@ public class ComponentServiceImpl implements ComponentService {
 		}
 		Kind resourceKind = kindDao.findOne(oldKindId);
 		if (resourceKind == null) {
-			throw new IllegalOperatorException("原类目不存在");
+			throw new IllegalOperatorException("原物料名称(类目)不存在");
 		}
 		resourceKind.setCount(resourceKind.getCount() - components.size());
 		targetKind.setCount(targetKind.getCount() + components.size());

+ 13 - 13
src/main/java/com/uas/platform/b2c/prod/product/component/service/impl/ComponentSubmitServiceImpl.java

@@ -131,10 +131,10 @@ public class ComponentSubmitServiceImpl implements ComponentSubmitService {
 		if (componentSubmit.getKindid() != null) {
 			Kind kind = kindDao.findOne(componentSubmit.getKindid());
 			if (kind == null) {
-				throw new IllegalOperatorException("器件申请中所选类目不存在");
+				throw new IllegalOperatorException("器件申请中所选物料名称(类目)不存在");
 			}
 		} else {
-			throw new IllegalOperatorException("器件申请中所选类目不存在");
+			throw new IllegalOperatorException("器件申请中所选物料名称(类目)不存在");
 		}
 		if (componentSubmit.getBrandid() != null) {
 			Brand brand = brandDao.findOne(componentSubmit.getBrandid());
@@ -158,7 +158,7 @@ public class ComponentSubmitServiceImpl implements ComponentSubmitService {
 			// 验证同类目下器件code不允许重名
 			List<Component> componentsKind = componentDao.findByCodeAndKindid(componentSubmit.getCode(), componentSubmit.getKindid());
 			if (!CollectionUtils.isEmpty(componentsKind)) {
-				throw new IllegalOperatorException("此类目下的该原厂型号器件已存在");
+				throw new IllegalOperatorException("此物料名称(类目)下的该原厂型号器件已存在");
 			}
 			componentSubmit.setVersion((short) 1);
 			String suffixStr = "";
@@ -172,7 +172,7 @@ public class ComponentSubmitServiceImpl implements ComponentSubmitService {
 			Component existComponent = componentDao.findByUuid(componentSubmit.getUuid());
 			if (existComponent != null) {
 				if (!existComponent.getKindid().equals(componentSubmit.getKindid())) {
-					throw new IllegalOperatorException("此器件申请与原版本器件类目不符,不可审核通过");
+					throw new IllegalOperatorException("此器件申请与原版本器件物料名称(类目)不符,不可审核通过");
 				}
 				if (componentSubmit.getVersion() == null || componentSubmit.getVersion() != existComponent.getVersion()) {
 					throw new IllegalOperatorException("此器件申请版本号不正确");
@@ -373,8 +373,8 @@ public class ComponentSubmitServiceImpl implements ComponentSubmitService {
 		Row headerRow = sheet.getRow(0);
 		if (headerRow.getCell(0) != null && headerRow.getCell(1) != null && headerRow.getCell(2) != null && headerRow.getCell(3) != null && headerRow.getCell(4) != null
 				&& headerRow.getCell(5) != null) {
-			if (headerRow.getCell(0).getStringCellValue().trim().equals("一级类目") && headerRow.getCell(1).getStringCellValue().trim().equals("二级类目")
-					&& headerRow.getCell(2).getStringCellValue().trim().equals("三级类目") && headerRow.getCell(3).getStringCellValue().trim().equals("品牌")
+			if (headerRow.getCell(0).getStringCellValue().trim().equals("一级物料名称(类目)") && headerRow.getCell(1).getStringCellValue().trim().equals("二级物料名称(类目)")
+					&& headerRow.getCell(2).getStringCellValue().trim().equals("三级物料名称(类目)") && headerRow.getCell(3).getStringCellValue().trim().equals("品牌")
 					&& headerRow.getCell(4).getStringCellValue().trim().equals("原厂型号") && headerRow.getCell(5).getStringCellValue().trim().equals("参考网址")) {
 				if (headerRow != null) {
 					for (int r = 1; r <= rowNum; r++) {
@@ -713,8 +713,8 @@ public class ComponentSubmitServiceImpl implements ComponentSubmitService {
 				List<Object> header = headers.get(0).subList(0, 9);
 				List<Object> exceptHeader = new ArrayList<Object>();
 				exceptHeader.add("型号");
-				exceptHeader.add("商城类目");
-				exceptHeader.add("目标类目");
+				exceptHeader.add("商城物料名称(类目)");
+				exceptHeader.add("目标物料名称(类目)");
 				exceptHeader.add("商城品牌");
 				exceptHeader.add("来源网址");
 				exceptHeader.add("规格书");
@@ -746,7 +746,7 @@ public class ComponentSubmitServiceImpl implements ComponentSubmitService {
 						throw new IllegalOperatorException("上传文件必须大于0行小于10000行");
 					}
 				} else {
-					throw new IllegalOperatorException("表头格式错误,前8列应为 \'型号\',\'商城类目\',\'目标类目\',\'商城品牌\',\'来源网址\',\'规格书\',\'图片\',\'描述\'");
+					throw new IllegalOperatorException("表头格式错误,前8列应为 \'型号\',\'商城物料名称(类目)\',\'目标物料名称(类目)\',\'商城品牌\',\'来源网址\',\'规格书\',\'图片\',\'描述\'");
 				}
 			} else {
 				throw new IllegalOperatorException("表头信息错误,请核对后再上传");
@@ -822,11 +822,11 @@ public class ComponentSubmitServiceImpl implements ComponentSubmitService {
 			if (b2cKindName != null && StringUtils.hasText(b2cKindName.toString())) {
 				List<Kind> kinds = kindDao.findByNameCn(b2cKindName.toString().trim());
 				if (CollectionUtils.isEmpty(kinds)) {
-					throw new IllegalOperatorException("商城类目不存在");
+					throw new IllegalOperatorException("商城物料名称(类目)不存在");
 				}
 				commonData.put("b2cKind", kinds.get(0));
 			} else {
-				throw new IllegalOperatorException("商城类目为空");
+				throw new IllegalOperatorException("商城物料名称(类目)为空");
 			}
 
 			// 目标类目
@@ -834,7 +834,7 @@ public class ComponentSubmitServiceImpl implements ComponentSubmitService {
 			if (kindName != null &&  StringUtils.hasText(kindName.toString())) {
 				commonData.put("kindName", kindName.toString().trim());
 			} else {
-				throw new IllegalOperatorException("目标类目为空");
+				throw new IllegalOperatorException("目标物料名称(类目)为空");
 			}
 
 			// 商城品牌
@@ -908,7 +908,7 @@ public class ComponentSubmitServiceImpl implements ComponentSubmitService {
 		// 对应商城类目
 		Kind kind = kindDao.findOne(kindCrawl.getB2cKiId());
 		if (kind == null) {
-			throw new IllegalOperatorException("对应参数关系商城类目不存在");
+			throw new IllegalOperatorException("对应参数关系商城物料名称(类目)不存在");
 		}
 
 		// 写入器件数据

+ 3 - 3
src/main/java/com/uas/platform/b2c/prod/product/kind/api/KindController.java

@@ -40,8 +40,8 @@ public class KindController {
 	 */
 	@RequestMapping("/{kindIds}")
 	@ResponseBody
-	@ApiOperation(value = "根据多个ID获取多个类目信息", httpMethod = "GET", notes = "允许获取多个分类,用逗号,分开")
-	@ControllerUsageLog(module = "根据多个ID获取多个类目信息", detail = "")
+	@ApiOperation(value = "根据多个ID获取多个物料名称(类目)信息", httpMethod = "GET", notes = "允许获取多个分类,用逗号,分开")
+	@ControllerUsageLog(module = "根据多个ID获取多个物料名称(类目)信息", detail = "")
 	public Iterable<Kind> getProductKind(@ApiParam(required = true, value = "id数组") @PathVariable("kindIds") String kindIds) {
 		return kindService.getProductKinds(kindIds);
 	}
@@ -54,7 +54,7 @@ public class KindController {
 	 */
 	@RequestMapping(value = "/{parentId}/children", method = RequestMethod.GET)
 	@ResponseBody
-	@ControllerUsageLog(module = "产品模块", detail = "获取类目的子类目")
+	@ControllerUsageLog(module = "产品模块", detail = "获取物料名称(类目)的子物料名称(类目)")
 	public List<Kind> getProductKinds(@PathVariable("parentId") Long parentId) {
 		return kindService.getChildProductKinds(parentId);
 	}

+ 2 - 2
src/main/java/com/uas/platform/b2c/prod/product/kind/controller/KindAdviceController.java

@@ -39,7 +39,7 @@ public class KindAdviceController {
 	@ResponseBody
 	public void submit(@RequestBody String json) {
 		KindAdvice advice = FastjsonUtils.fromJson(json, KindAdvice.class);
-		logger.log("类目建议", "保存类目建议", "保存类目建议,原因" + advice.getReason());
+		logger.log("物料名称(类目)建议", "保存物料名称(类目)建议", "保存物料名称(类目)建议,原因" + advice.getReason());
 		kindAdviceService.save(advice);
 	}
 
@@ -52,7 +52,7 @@ public class KindAdviceController {
 	@ResponseBody
 	public Page<KindAdvice> getAllAdvice(PageParams params) {
 		PageInfo info = new PageInfo(params);
-		logger.log("类目建议", "获取类目建议", "分页获取类目建议信息");
+		logger.log("物料名称(类目)建议", "获取物料名称(类目)建议", "分页获取物料名称(类目)建议信息");
 		return kindAdviceService.findAll(info);
 	}
 }

+ 14 - 14
src/main/java/com/uas/platform/b2c/prod/product/kind/controller/KindController.java

@@ -44,7 +44,7 @@ public class KindController {
 	public Kind save(Long parentId, @RequestBody String json) {
 		Kind kind = FastjsonUtils.fromJson(json, Kind.class);
 		kind = kindService.save(parentId, kind);
-		logger.log("类目管理", "新增类目", "新增类目,类目名:" + kind.getNameCn(), kind.getNameCn(), kind.getId());
+		logger.log("物料名称(类目)管理", "新增物料名称(类目)", "新增物料名称(类目)物料名称(类目)名:" + kind.getNameCn(), kind.getNameCn(), kind.getId());
 		return kind;
 	}
 
@@ -59,11 +59,11 @@ public class KindController {
 	 */
 	@RequestMapping(value = "/{kindId}", method = RequestMethod.POST)
 	@ResponseBody
-	@ApiOperation(value = "修改类目信息", httpMethod = "POST")
-	public Kind update(@ApiParam(required = true, value = "类目ID") @PathVariable("kindId") Long kindId, @ApiParam(required = true, value = "提交的数据") @RequestBody String json) {
+	@ApiOperation(value = "修改物料名称(类目)信息", httpMethod = "POST")
+	public Kind update(@ApiParam(required = true, value = "物料名称(类目)ID") @PathVariable("kindId") Long kindId, @ApiParam(required = true, value = "提交的数据") @RequestBody String json) {
 		Kind kind = FastjsonUtils.fromJson(json, Kind.class);
 		kind = kindService.updateKind(kindId, kind);
-		logger.log("类目管理", "修改类目", "修改类目名:" + kind.getNameCn(), kind.getNameCn(), kindId);
+		logger.log("物料名称(类目)管理", "修改物料名称(类目)", "修改物料名称(类目)名:" + kind.getNameCn(), kind.getNameCn(), kindId);
 		return kind;
 	}
 
@@ -75,7 +75,7 @@ public class KindController {
 	@RequestMapping(value = "/{kindId}", method = RequestMethod.DELETE)
 	@ResponseBody
 	public void delete(@PathVariable("kindId") Long kindId) {
-		logger.log("类目管理", "删除类目", "删除类目id:" + kindId);
+		logger.log("物料名称(类目)管理", "删除物料名称(类目)", "删除物料名称(类目)id:" + kindId);
 		kindService.delete(kindId);
 	}
 
@@ -90,7 +90,7 @@ public class KindController {
 	@RequestMapping(value = "/number", method = RequestMethod.POST, params = "operate=exchange")
 	@ResponseBody
 	public void exchangeNumber(Long preId, Long postId) {
-		logger.log("类目管理", "修改类目排序", "类目id顺序交换:" + preId + " 和 " + postId);
+		logger.log("物料名称(类目)管理", "修改物料名称(类目)排序", "物料名称(类目)id顺序交换:" + preId + " 和 " + postId);
 		kindService.exchangeNumber(preId, postId);
 	}
 
@@ -104,7 +104,7 @@ public class KindController {
 	@ResponseBody
 	public List<KindProperty> updateProperties(@PathVariable("kindId") Long kindId, @RequestBody String json) {
 		List<KindProperty> properties = FastjsonUtils.fromJsonArray(json, KindProperty.class);
-		logger.log("类目管理", "修改类目属性", "修改类目属性,类目id:" + kindId);
+		logger.log("物料名称(类目)管理", "修改物料名称(类目)属性", "修改物料名称(类目)属性,物料名称(类目)id:" + kindId);
 		return kindService.updateProperties(kindId, properties);
 	}
 
@@ -118,7 +118,7 @@ public class KindController {
 	@RequestMapping(value = "/kindCount/reset", method = RequestMethod.GET)
 	@ResponseBody
 	public void resetComponentCountGroupByKind() {
-		logger.log("类目管理", "统计类目下器件数量");
+		logger.log("物料名称(类目)管理", "统计物料名称(类目)下器件数量");
 		kindService.setKindCountByComponentActive();
 	}
 
@@ -132,7 +132,7 @@ public class KindController {
 	@RequestMapping(value = "/kindPropertyValues/reset", method = RequestMethod.GET)
 	@ResponseBody
 	public void resetKindPropertyValues() {
-		logger.log("类目管理", "类目标准属性可能值计算");
+		logger.log("物料名称(类目)管理", "物料名称(类目)标准属性可能值计算");
 		kindService.resetKindPropertyValues();
 	}
 
@@ -154,7 +154,7 @@ public class KindController {
 	 */
 	@RequestMapping(value = "/kindProperty/{kindPropertyId}", method = RequestMethod.DELETE)
 	public KindProperty deleteKindProperty(@PathVariable("kindPropertyId") Long kindPropertyId) {
-		logger.log("类目属性管理", "删除类目属性", "类目属性id:" + kindPropertyId);
+		logger.log("物料名称(类目)属性管理", "删除物料名称(类目)属性", "物料名称(类目)属性id:" + kindPropertyId);
 		return kindService.deleteKindProperty(kindPropertyId);
 	}
 
@@ -167,7 +167,7 @@ public class KindController {
 	@RequestMapping(value = "/kindProperty/add", method = RequestMethod.PUT)
 	public KindProperty addKindProperty(@RequestBody String json) {
 		KindProperty kindProperty = FastjsonUtils.fromJson(json, KindProperty.class);
-		logger.log("类目属性管理", "增加类目属性", "增加类目属性,属性id:" + kindProperty.getPropertyId() + ",属性名:" + kindProperty.getProperty().getLabelCn());
+		logger.log("物料名称(类目)属性管理", "增加物料名称(类目)属性", "增加物料名称(类目)属性,属性id:" + kindProperty.getPropertyId() + ",属性名:" + kindProperty.getProperty().getLabelCn());
 		return kindService.addKindProperty(kindProperty);
 	}
 
@@ -180,7 +180,7 @@ public class KindController {
 	@RequestMapping(value = "/kindProperty/update", method = RequestMethod.PUT)
 	public KindProperty updateKindProperty(@RequestBody String json) {
 		KindProperty kindProperty = FastjsonUtils.fromJson(json, KindProperty.class);
-		logger.log("类目属性管理", "更新类目属性", "更新类目属性,属性id: " + kindProperty.getPropertyId());
+		logger.log("物料名称(类目)属性管理", "更新物料名称(类目)属性", "更新物料名称(类目)属性,属性id: " + kindProperty.getPropertyId());
 		return kindService.updateKindProperty(kindProperty);
 	}
 
@@ -195,7 +195,7 @@ public class KindController {
 	 */
 	@RequestMapping(value = "/kindProperty/changeDetno", method = RequestMethod.PUT)
 	public List<KindProperty> changeDetno(Long activeId, Long passiveId) {
-		logger.log("类目属性管理", "调整类目属性顺序", "属性id : " + activeId + ",属性id: " + passiveId);
+		logger.log("物料名称(类目)属性管理", "调整物料名称(类目)属性顺序", "属性id : " + activeId + ",属性id: " + passiveId);
 		return kindService.changeDetno(activeId, passiveId);
 	}
 
@@ -208,7 +208,7 @@ public class KindController {
 	 */
 	@RequestMapping(value = "/kindProperty/changeKindProperty")
 	public KindProperty changeKindProperty(String labelCn, Long kindPropertyId) {
-		logger.log("类目属性管理", "更换类目属性", "类目属性id:" + kindPropertyId + ",替换成属性: " + labelCn);
+		logger.log("物料名称(类目)属性管理", "更换物料名称(类目)属性", "物料名称(类目)属性id:" + kindPropertyId + ",替换成属性: " + labelCn);
 		return kindService.changeKindProperty(labelCn, kindPropertyId);
 	}
 

+ 1 - 1
src/main/java/com/uas/platform/b2c/prod/product/kind/model/KindInfo.java

@@ -188,7 +188,7 @@ public class KindInfo {
 	public static KindInfo getAllKind(){
 		KindInfo allKind = new KindInfo();
 		allKind.setIsLeaf((short) 1);
-		allKind.setNameCn("所有类目");
+		allKind.setNameCn("所有物料名称(类目)");
 		allKind.setLevel((short) 0);
 		allKind.setParentid(0L);
 		return allKind;

+ 4 - 4
src/main/java/com/uas/platform/b2c/prod/product/kind/service/impl/KindConcernServiceImpl.java

@@ -65,7 +65,7 @@ public class KindConcernServiceImpl implements KindConcernService {
             }
             if (StringUtils.isEmpty(kindConcern.getNameCn())) {
                 map.put("success", false);
-                map.put("message", "传入类目名称为空");
+                map.put("message", "传入物料名称(类目)为空");
                 return map;
             }
             kindConcern.setDate(new Date());
@@ -108,7 +108,7 @@ public class KindConcernServiceImpl implements KindConcernService {
             }
             if (StringUtils.isEmpty(kindConcern.getNameCn())) {
                 map.put("success", false);
-                map.put("message", "传入类目名称为空");
+                map.put("message", "传入物料名称(类目)为空");
                 return map;
             }
             KindConcern concern = kindConcernDao.findOne(kindConcern.getId());
@@ -267,13 +267,13 @@ public class KindConcernServiceImpl implements KindConcernService {
             List<KindConcern> kindConcerns = kindConcernDao.findAll(ids);
             if (CollectionUtils.isEmpty(kindConcerns)) {
                 map.put("success", false);
-                map.put("message", "未找到符合对应的类目关注记录");
+                map.put("message", "未找到符合对应的物料名称(类目)关注记录");
                 return map;
             }
             for (KindConcern kindConcern : kindConcerns) {
                 if (!enUU.equals(kindConcern.getEnUU())) {
                     map.put("success", false);
-                    map.put("message", "存在不属于当前企业的类目关注记录,无法删除");
+                    map.put("message", "存在不属于当前企业的物料名称(类目)关注记录,无法删除");
                     return map;
                 }
             }

+ 49 - 31
src/main/java/com/uas/platform/b2c/prod/product/kind/service/impl/KindServiceImpl.java

@@ -1,13 +1,26 @@
 package com.uas.platform.b2c.prod.product.kind.service.impl;
 
+import com.uas.platform.b2c.core.support.view.JxlsExcelView;
+import com.uas.platform.b2c.core.utils.FastjsonUtils;
+import com.uas.platform.b2c.core.utils.PathUtils;
 import com.uas.platform.b2c.prod.commodity.dao.PCBDao;
 import com.uas.platform.b2c.prod.commodity.model.PCBPropertyValue;
 import com.uas.platform.b2c.prod.product.brand.dao.BrandInfoDao;
 import com.uas.platform.b2c.prod.product.brand.modal.BrandInfo;
 import com.uas.platform.b2c.prod.product.component.dao.ComponentDao;
 import com.uas.platform.b2c.prod.product.component.modal.Component;
-import com.uas.platform.b2c.prod.product.kind.dao.*;
-import com.uas.platform.b2c.prod.product.kind.model.*;
+import com.uas.platform.b2c.prod.product.kind.dao.KindContrastDao;
+import com.uas.platform.b2c.prod.product.kind.dao.KindDao;
+import com.uas.platform.b2c.prod.product.kind.dao.KindInfoDao;
+import com.uas.platform.b2c.prod.product.kind.dao.KindPropertyDao;
+import com.uas.platform.b2c.prod.product.kind.dao.KindPropertyValueDao;
+import com.uas.platform.b2c.prod.product.kind.model.Kind;
+import com.uas.platform.b2c.prod.product.kind.model.KindCrawl;
+import com.uas.platform.b2c.prod.product.kind.model.KindInfo;
+import com.uas.platform.b2c.prod.product.kind.model.KindProperty;
+import com.uas.platform.b2c.prod.product.kind.model.KindPropertyOption;
+import com.uas.platform.b2c.prod.product.kind.model.KindPropertyUnit;
+import com.uas.platform.b2c.prod.product.kind.model.KindPropertyValues;
 import com.uas.platform.b2c.prod.product.kind.service.KindService;
 import com.uas.platform.b2c.prod.product.property.dao.PropertyCrawlDao;
 import com.uas.platform.b2c.prod.product.property.dao.PropertyDao;
@@ -15,16 +28,28 @@ import com.uas.platform.b2c.prod.product.property.dao.PropertyValueDao;
 import com.uas.platform.b2c.prod.product.property.model.Property;
 import com.uas.platform.b2c.prod.product.property.model.PropertyCrawl;
 import com.uas.platform.b2c.prod.product.property.model.PropertyValue;
-import com.uas.platform.b2c.core.utils.FastjsonUtils;
-import com.uas.platform.b2c.core.utils.PathUtils;
-import com.uas.platform.b2c.core.support.view.JxlsExcelView;
 import com.uas.platform.core.exception.IllegalOperatorException;
 import com.uas.platform.core.model.Constant;
 import com.uas.platform.core.model.PageInfo;
 import com.uas.platform.core.model.PageParams;
 import com.uas.platform.core.util.ArrayUtils;
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.IOException;
+import java.util.ArrayList;
+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 javax.persistence.criteria.CriteriaBuilder;
+import javax.persistence.criteria.CriteriaQuery;
+import javax.persistence.criteria.Predicate;
+import javax.persistence.criteria.Root;
 import org.apache.commons.collections.CollectionUtils;
-import org.apache.velocity.runtime.directive.Foreach;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.dao.InvalidDataAccessApiUsageException;
@@ -35,13 +60,6 @@ import org.springframework.transaction.annotation.Transactional;
 import org.springframework.util.StringUtils;
 import org.springframework.web.servlet.ModelAndView;
 
-import javax.persistence.criteria.CriteriaBuilder;
-import javax.persistence.criteria.CriteriaQuery;
-import javax.persistence.criteria.Predicate;
-import javax.persistence.criteria.Root;
-import java.io.*;
-import java.util.*;
-
 @Service
 public class KindServiceImpl implements KindService {
 
@@ -128,10 +146,10 @@ public class KindServiceImpl implements KindService {
 		} else {
 			parent = kindDao.findOne(parentid);
 			if (parent == null) {
-				throw new IllegalOperatorException("不可在不存在类目下添加子类目");
+				throw new IllegalOperatorException("不可在不存在物料名称(类目)下添加子物料名称(类目)");
 			} 
 			if (parent.getLevel() == 3) {
-				throw new IllegalOperatorException("不允许在三级类目下添加子类目");
+				throw new IllegalOperatorException("不允许在三级物料名称(类目)下添加子物料名称(类目)");
 			}
 			if (parent.getIsLeaf() == 1) {
 				// 如果parent是叶子节点,且带有标准器件,则禁止新增
@@ -147,7 +165,7 @@ public class KindServiceImpl implements KindService {
 		// 验证父类目下是否已存在相同的类目,存在则无法保存
 		List<Kind> exists = kindDao.findByParentidAndNameCn(parentid, kind.getNameCn());
 		if (CollectionUtils.isNotEmpty(exists)) {
-			throw new IllegalOperatorException("父类目下存在相同类目,无法保存");
+			throw new IllegalOperatorException("父物料名称(类目)下存在相同物料名称(类目),无法保存");
 		}
 
 		kind.setIsLeaf(Constant.YES);
@@ -305,7 +323,7 @@ public class KindServiceImpl implements KindService {
 			throw new IllegalArgumentException();
 		}
 		if (!preKind.getParentid().equals(postKind.getParentid())) {
-			throw new IllegalOperatorException("交换顺序的类目不属于同一父类目");
+			throw new IllegalOperatorException("交换顺序的物料名称(类目)不属于同一父物料名称(类目)");
 		}
 		// 交换序号,同时对序号为空的类目作默认赋值
 		short lastNumber = kindDao.findLastNumberByParentid(preKind.getParentid());
@@ -334,18 +352,18 @@ public class KindServiceImpl implements KindService {
 	public void delete(Long kindId) {
 		Kind kind = kindDao.findOne(kindId);
 		if (kind == null) {
-			throw new IllegalArgumentException("要删除的类目不存在");
+			throw new IllegalArgumentException("要删除的物料名称(类目)不存在");
 		}
 
 		// 不是叶子类目,不允许删除
 		if (!kind.isLeaf()) {
-			throw new IllegalOperatorException("您要删除的类目含有子类目,不可以删除");
+			throw new IllegalOperatorException("您要删除的物料名称(类目)含有子物料名称(类目),不可以删除");
 		}
 		// 检测有没有有效器件带有这个属性
 		try {
 			kindDao.delete(kind);
 		} catch (Exception e) {
-			throw new IllegalOperatorException("此类目下有有效的标准器件,禁止删除类目属性");
+			throw new IllegalOperatorException("此物料名称(类目)下有有效的标准器件,禁止删除物料名称(类目)属性");
 		}
 		// 如果父节点没有了子节点了,修改父节点为叶子节点
 		List<Kind> bothers = getChildProductKinds(kind.getParentid());
@@ -368,7 +386,7 @@ public class KindServiceImpl implements KindService {
 	private List<Kind> getParentsByChildId(Long childId, List<Kind> container) {
 		Kind child = kindDao.findOne(childId);
 		if (child == null) {
-			throw new IllegalOperatorException("要获取的父类目不存在");
+			throw new IllegalOperatorException("要获取的父物料名称(类目)不存在");
 		}
 		if (child.getParentid() != 0) {
 			getParentsByChildId(child.getParentid(), container);
@@ -409,7 +427,7 @@ public class KindServiceImpl implements KindService {
 			addCount(kindid, count);
 		}
 		long endTimeDate = new Date().getTime();
-		System.out.println("类目所属器件数量统计共耗时: " + (endTimeDate - starTimeDate) + "毫秒");
+		System.out.println("物料名称(类目)所属器件数量统计共耗时: " + (endTimeDate - starTimeDate) + "毫秒");
 	}
 
 	@Override
@@ -596,7 +614,7 @@ public class KindServiceImpl implements KindService {
 			kindPropertyDao.save(kindProperty_T);
 		}
 		long endTimeDate = new Date().getTime();
-		System.out.println("类目标准属性的可能值全部洗一遍共耗时: " + (endTimeDate - startTimeDate) + "毫秒");
+		System.out.println("物料名称(类目)标准属性的可能值全部洗一遍共耗时: " + (endTimeDate - startTimeDate) + "毫秒");
 	}
 
 	/**
@@ -688,7 +706,7 @@ public class KindServiceImpl implements KindService {
 
 				}
 				long endTimeDate = new Date().getTime();
-				System.out.println("对于新增的类目属性的值,计算时间是:" + (startTimeDate - endTimeDate) + "毫秒");
+				System.out.println("对于新增的物料名称(类目)属性的值,计算时间是:" + (startTimeDate - endTimeDate) + "毫秒");
 			}
 		});
 		t.start();
@@ -775,7 +793,7 @@ public class KindServiceImpl implements KindService {
 	public List<KindInfo> getStructruingKinds(Long id) {
 		KindInfo kindInfo = kindInfoDao.findOne(id);
 		if (kindInfo == null) {
-			throw new IllegalOperatorException("类目不存在");
+			throw new IllegalOperatorException("物料名称(类目)不存在");
 		}
 		return findStructingKinds(id);
 	}
@@ -923,7 +941,7 @@ public class KindServiceImpl implements KindService {
 		Kind kind = kindDao.findOne(kindProperty.getKindId());
 		for (KindProperty kp : kind.getProperties()) {
 			if (kp.getPropertyId().equals(kindProperty.getPropertyId())) {
-				throw new IllegalOperatorException("此类目中已有属性" + kindProperty.getProperty().getLabelCn() + ",请不要重复添加");
+				throw new IllegalOperatorException("此物料名称(类目)中已有属性" + kindProperty.getProperty().getLabelCn() + ",请不要重复添加");
 			}
 			if (kp.getDetno() >= kindProperty.getDetno()) {
 				kp.setDetno((short) (kp.getDetno() + 1));
@@ -963,10 +981,10 @@ public class KindServiceImpl implements KindService {
 		KindProperty active = kindPropertyDao.findOne(activeId);
 		KindProperty passive = kindPropertyDao.findOne(passiveId);
 		if (active == null || passive == null) {
-			throw new IllegalOperatorException("当前操作的类目属性不存在");
+			throw new IllegalOperatorException("当前操作的物料名称(类目)属性不存在");
 		}
 		if (!(active.getKindId().equals(passive.getKindId()))) {
-			throw new IllegalOperatorException("当前操作的类目属性不属于同一类目");
+			throw new IllegalOperatorException("当前操作的物料名称(类目)属性不属于同一物料名称(类目)");
 		}
 		short actNo = active.getDetno();
 		short passNo = passive.getDetno();
@@ -995,7 +1013,7 @@ public class KindServiceImpl implements KindService {
 	public KindProperty changeKindProperty(String labelCn, Long kindPropertyId) {
 		KindProperty kindProperty = kindPropertyDao.findOne(kindPropertyId);
 		if (kindProperty == null) {
-			throw new IllegalOperatorException("该类目属性不存在");
+			throw new IllegalOperatorException("该物料名称(类目)属性不存在");
 		}
 		final Long oldPropertyId = kindProperty.getPropertyId();
 		final Long kindId = kindProperty.getKindId();
@@ -1055,7 +1073,7 @@ public class KindServiceImpl implements KindService {
 					}
 				}
 				long endTime = new Date().getTime();
-				System.out.println("对于更改的类目属性的值,计算时间是:" + (startTime - endTime) + "毫秒");
+				System.out.println("对于更改的物料名称(类目)属性的值,计算时间是:" + (startTime - endTime) + "毫秒");
 			}
 		});
 		t.start();
@@ -1255,7 +1273,7 @@ public class KindServiceImpl implements KindService {
 	private List<KindInfo> getPCBParentsByChildId(Long childId, List<KindInfo> container) {
 		KindInfo child = kindInfoDao.findOne(childId);
 		if (child == null) {
-			throw new IllegalOperatorException("要获取的父类目不存在");
+			throw new IllegalOperatorException("要获取的父物料名称(类目)不存在");
 		}
 		if (child.getParentid() != 0) {
 			getPCBParentsByChildId(child.getParentid(), container);

BIN
src/main/resources/jxls-tpl/product/componentBatchMaintenance.xls


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


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


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


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


+ 6 - 6
src/main/webapp/resources/js/vendor/app.js

@@ -709,12 +709,12 @@ define([ 'angularAMD', 'ngLocal', 'common/services', 'common/directives', 'commo
 						$state.go('vendor_store_maintain');
 					}
 				}
-                // 是否pcb
-                // StoreInfo.isPcb({enuu: $rootScope.userInfo.enterprise.uu}, function (res) {
-                //     $rootScope.isPcbStore = res.data == 1;
-                // }, function (error) {
-                // });
-				$rootScope.isPcbStore = false;
+                是否pcb
+                StoreInfo.isPcb({enuu: $rootScope.userInfo.enterprise.uu}, function (res) {
+                    $rootScope.isPcbStore = res.data == 1;
+                }, function (error) {
+                });
+				// $rootScope.isPcbStore = false;
 			}).error(function (error) {
 				toaster.pop('error', '获取登录信息失败');
 			})

+ 14 - 2
src/main/webapp/resources/js/vendor/controllers/forstore/purchasAttendtion_ctrl.js

@@ -92,9 +92,19 @@ define(['app/app'], function (app) {
                 }
               }
             }
-            ComputedAttendFn(_arr)
+            if (_arr.length === 0) {
+              toaster.pop('warnning', '警告', "未勾选任何条目");
+            } else {
+              ComputedAttendFn(_arr)
+            }
           }
-
+          document.onkeydown = function (ev) {
+            var onEvent = ev || event;
+            if (onEvent.keyCode === 13 && $scope.keyWord !== '' && $scope.keyWord.trim() !== '') {
+              $scope.seekPurchaseTableParams.page(1);
+              $scope.seekPurchaseTableParams.reload();
+            }
+          };
           // 批量关注或者 批量取消
           function ComputedAttendFn(arr) {
             if ($scope.Attend_tab === 'isAttend') {
@@ -102,6 +112,7 @@ define(['app/app'], function (app) {
                 if (data.success) {
                   $scope.seekPurchaseTableParams.page($scope.page);
                   $scope.seekPurchaseTableParams.reload();
+                  $scope.checkBoxAll = false
                   toaster.pop('success', '取消关注成功');
                 } else {
                   toaster.pop('error', data.message);
@@ -112,6 +123,7 @@ define(['app/app'], function (app) {
                 if (data.success) {
                   $scope.seekPurchaseTableParams.page($scope.page);
                   $scope.seekPurchaseTableParams.reload();
+                  $scope.checkBoxAll = false
                   toaster.pop('success', '关注成功');
                 } else {
                   toaster.pop('error', data.message);

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

@@ -663,7 +663,7 @@
                     <div class="row-wrap il-content">
                         <div class="il-box-large il-box">
                             <div title="{{seek.inbrand}}"  style="width: 100%"  class="fl item size-middle"><span>品牌:</span><div class="content" style="width:135px">{{seek.inbrand || '-'}}</div></div>
-                            <div title="{{seek.prodTitle | nullStrFilter}}" style="width: 100%"  class="fl bottom item size-middle"><span>类目(产品名称):</span><div class="content" style="width:135px">{{(seek.prodTitle || '-') | nullStrFilter}}</div></div>
+                            <div title="{{seek.prodTitle | nullStrFilter}}" style="width: 100%"  class="fl bottom item size-middle"><span>物料名称(类目):</span><div class="content" style="width:135px">{{(seek.prodTitle || '-') | nullStrFilter}}</div></div>
                         </div>
                     </div>
                 </td>

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

@@ -941,7 +941,7 @@
                     </ul>
                 </div>
                 <div class="form-block">
-                    <span><i>*</i>类目(产品名称)</span>
+                    <span><i>*</i>物料名称(类目)</span>
                     <input type="text" class="form-group" ng-model="applyObj.prodTitle" ng-class="{'error': !validObj.prodTitle}" ng-change="onProdTitleInput()" ng-blur="checkProdTitle()">
                 </div>
                 <div class="form-block">
@@ -1078,7 +1078,7 @@
                     <div class="row-wrap il-content">
                         <div class="il-box-large il-box">
                             <div title="{{seek.inbrand}}" class="fl item size-middle"><span>品牌:</span><div class="content">{{seek.inbrand || '-'}}</div></div>
-                            <div title="{{seek.prodTitle | nullStrFilter}}" class="fl bottom item size-middle"><span>类目(产品名称):</span><div class="content">{{(seek.prodTitle || '-') | nullStrFilter}}</div></div>
+                            <div title="{{seek.prodTitle | nullStrFilter}}" class="fl bottom item size-middle"><span>物料名称(类目):</span><div class="content">{{(seek.prodTitle || '-') | nullStrFilter}}</div></div>
                         </div>
                     </div>
                 </td>

+ 36 - 6
src/main/webapp/resources/view/vendor/forstore/purchasAttendtion.html

@@ -33,7 +33,7 @@
     border: 1px solid #908f8f;
     display: inline-block;
     vertical-align: top;
-    margin-top: 13px;
+    margin: 13px 0 0 0;
   }
   .seek-purchase-content thead tr {
     line-height: 38px;
@@ -128,7 +128,29 @@
     /* margin-top: 5px; */
     padding-right: 22px
   }
-
+ .no-price{
+    width:100%;
+    height:150px;
+    display:inline-flex;
+    justify-content: center;
+    align-items: center;
+    background: white;
+  }
+ .no-price p{
+    padding-top:10px;
+    font-size: 14px;
+    color: #999;
+    margin-left:15px;
+    line-height: 28px;
+    width:140px;
+  }
+ .no-price p a{
+    color: #5078cb;
+    display: block;
+    background: url(static/img/all/icon_nianxian.jpg)no-repeat;
+    background-position: 0px 7px;
+    padding-left: 25px;
+  }
 
 </style>
 <div class="user_right fr seek-purchase">
@@ -152,7 +174,7 @@
   <div class="seek-purchase-content">
     <div class="search-check">
       <div class="search fl">
-        <input type="text" class="form-control ng-pristine ng-untouched ng-valid" ng-model="keyWord" placeholder="请输入您要搜索的类目(产品名称)">
+        <input type="text" class="form-control ng-pristine ng-untouched ng-valid" ng-model="keyWord" placeholder="请输入您要搜索的物料名称(类目)">
         <button ng-click="onSearch()">搜索</button>
       </div>
       <div class="check fr">
@@ -165,11 +187,11 @@
           <th width="80" class="onCheckBoxClick" ng-click="onCheckBoxClick()">
             <input ng-checked="checkBoxAll" type="checkbox" class="checkbox">{{checkBoxAll ? '取消全选': '全选'}}</th>
           <th width="80">序号</th>
-          <th width="556">类目(产品名称)</th>
+          <th width="556">物料名称(类目)</th>
           <th width="310">操作</th>
         </tr>
       </thead>
-      <tbody>
+      <tbody ng-if="totalElements > 0">
         <tr ng-repeat="item in AttendListData">
           <th ng-click="onCheckBoxOnce(item, $index)"><input type="checkbox" class="checkbox" ng-checked="item.checkBox === true"></th>
           <th>{{$index + 1}}</th>
@@ -178,7 +200,15 @@
         </tr>
       </tbody>
     </table>
-    <div class="record-line text-right ng-binding ng-scope" ng-if="currenctGoods.length != 0">显示 1-
+    <div class="no-price ng-scope" ng-if="totalElements === 0">
+      <img src="static/img/all/empty-cart.png">
+      <p>
+        暂无关注商机
+        <br>
+        <a ng-click="toggleAttend('isAttend')" >马上去逛一逛</a>
+      </p>
+    </div>
+    <div class="record-line text-right ng-binding ng-scope" ng-if="totalElements > 0">显示 1-
       <span ng-bind="endNumber" class="ng-binding">10</span>, 共: <span style="color: #5078cb;" class="ng-binding">{{totalElements}}</span> 个
     </div>
   </div>

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

@@ -697,7 +697,7 @@
                     <div class="row-wrap il-content">
                         <div class="il-box-large il-box">
                             <div title="{{seek.inbrand}}" style="width: 100%" class="fl item size-middle"><span>品牌:</span><div class="content" style="width:135px">{{seek.inbrand || '-'}}</div></div>
-                            <div title="{{seek.prodTitle | nullStrFilter}}" style="width: 100%" class="fl item bottom size-middle"><span>类目(产品名称):</span><div class="content" style="width:135px">{{(seek.prodTitle || '-') | nullStrFilter}}</div></div>
+                            <div title="{{seek.prodTitle | nullStrFilter}}" style="width: 100%" class="fl item bottom size-middle"><span>物料名称(类目):</span><div class="content" style="width:135px">{{(seek.prodTitle || '-') | nullStrFilter}}</div></div>
                         </div>
                     </div>
                 </td>

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

@@ -808,7 +808,7 @@
                         <div class="row-wrap il-content">
                             <div class="il-box-large il-box">
                                 <div title="{{seek.inbrand}}" style="width: 100%" class="fl item size-middle"><span>品牌:</span><div class="content" style="width:134px">{{seek.inbrand || '-'}}</div></div>
-                                <div title="{{seek.prodTitle | nullStrFilter}}" style="width: 100%" class="fl item size-middle bottom"><span>类目(产品名称):</span><div class="content" style="width:134px">{{(seek.prodTitle || '-') | nullStrFilter}}</div></div>
+                                <div title="{{seek.prodTitle | nullStrFilter}}" style="width: 100%" class="fl item size-middle bottom"><span>物料名称(类目):</span><div class="content" style="width:134px">{{(seek.prodTitle || '-') | nullStrFilter}}</div></div>
                             </div>
                         </div>
                     </td>
@@ -893,7 +893,7 @@
                 </div>
                 <div class="content-line">
                     <div class="form-item form-left text-line">
-                        <span>类目(产品名称):</span><span class="text" ng-bind="inquiryItem.prodTitle || '-'" title="{{inquiryItem.prodTitle || '-'}}"></span>
+                        <span>物料名称(类目):</span><span class="text" ng-bind="inquiryItem.prodTitle || '-'" title="{{inquiryItem.prodTitle || '-'}}"></span>
                     </div>
                 </div>
                 <div class="content-line">

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

@@ -2016,7 +2016,7 @@
 						</th>
 						<th width="40">序号</th>
 						<th width="120">品牌</th>
-						<th width="140">类目(产品名称)</th>
+						<th width="140">物料名称(类目)</th>
 						<th width="170">型号</th>
 						<th width="100">规格</th>
 						<th width="80">单位</th>
@@ -2561,7 +2561,7 @@
 						<thead>
 						<tr>
 							<th width="60">序号</th>
-							<th width="120">类目(产品名称)</th>
+							<th width="120">物料名称(类目)</th>
 							<th width="120">品牌</th>
 							<th width="100">型号</th>
 							<!--<th width="100">封装</th>-->

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

@@ -1860,7 +1860,7 @@
 					<tr>
 						<th width="80">序号</th>
 						<th width="150">品牌</th>
-						<th width="180">类目(产品名称)</th>
+						<th width="180">物料名称(类目)</th>
 						<th width="200">型号</th>
 						<!--<th width="100">单位</th>-->
 						<th width="80">规格</th>
@@ -2383,7 +2383,7 @@
 						<thead>
 						<tr>
 							<th width="60">序号</th>
-							<th width="120">类目(产品名称)</th>
+							<th width="120">物料名称(类目)</th>
 							<th width="120">品牌</th>
 							<th width="100">型号</th>
 							<th width="100">封装</th>

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

@@ -1096,8 +1096,8 @@
                             <div class="fr wid135">
                                 <p ng-if="!commodity.uuid">品牌: <em ng-bind="commodity.brandNameEn" title="{{commodity.brandNameEn}}">NXP</em></a></p>
                                 <p ng-if="commodity.uuid" name="brand-a"><a href="product/brand/{{commodity.branduuid}}" style="margin: 0; color: #333;" target="_blank">品牌: <em ng-bind="commodity.brandNameEn" title="{{commodity.brandNameEn}}">NXP</em></a></p>
-                                <p ng-if="!commodity.uuid">类目(产品名称): <em ng-bind="commodity.kindNameCn || '-'" title="{{commodity.kindNameCn}}"></em></a></p>
-                                <p ng-if="commodity.uuid" name="kind-a"><a href="product/kind/{{commodity.kindUuid}}" style="margin: 0; color: #333;" target="_blank">类目(产品名称): <em ng-bind="commodity.kindNameCn || '-'" title="{{commodity.kindNameCn}}"></em></a></p>
+                                <p ng-if="!commodity.uuid">物料名称(类目): <em ng-bind="commodity.kindNameCn || '-'" title="{{commodity.kindNameCn}}"></em></a></p>
+                                <p ng-if="commodity.uuid" name="kind-a"><a href="product/kind/{{commodity.kindUuid}}" style="margin: 0; color: #333;" target="_blank">物料名称(类目): <em ng-bind="commodity.kindNameCn || '-'" title="{{commodity.kindNameCn}}"></em></a></p>
                                 <p>型号: <em class="href" ng-bind="commodity.code" title="{{commodity.code}}"  ng-click="goToBatchDetail($event, commodity)">LPC1112</em></p>
                                 <p>规格: <em ng-bind="commodity.spec  || '-'" title="{{commodity.spec}}">LPC1112</em></p>
                                 <!--<div class="margin0">-->
@@ -1199,7 +1199,7 @@
                                     </div>
                                     <div class="fr wid135">
                                         <p>品牌: <em ng-bind="commodity.brandNameEn" title="{{commodity.brandNameEn}}">NXP</em></p>
-                                        <p>类目(产品名称): <em ng-bind="commodity.kindNameCn || '-'" title="{{commodity.kindNameCn}}"></em></p>
+                                        <p>物料名称(类目): <em ng-bind="commodity.kindNameCn || '-'" title="{{commodity.kindNameCn}}"></em></p>
                                         <p>型号: <em ng-bind="commodity.code" title="{{commodity.code}}">LPC1112</em></p>
                                         <p>规格: <em ng-bind="commodity.spec || '-'" title="{{commodity.spec}}">LPC1112</em></p>
                                         <!--<p>-->

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

@@ -638,7 +638,7 @@
                                     </td>
                                     <td style="padding-left: 10px;">
                                         <div class="text-more">品牌:&nbsp;<em title="{{batchCommodity.b2cBranden || '空'}}" ng-bind="batchCommodity.b2cBranden || '空'"></em></div>
-                                        <div class="text-more">类目(产品名称):&nbsp;<em title="{{batchCommodity.kindName || '空'}}" ng-bind="batchCommodity.kindName || '空'"></em></div>
+                                        <div class="text-more">物料名称(类目):&nbsp;<em title="{{batchCommodity.kindName || '空'}}" ng-bind="batchCommodity.kindName || '空'"></em></div>
                                         <div class="text-more">型号:&nbsp;<em title="{{batchCommodity.b2cCode || '空'}}" ng-bind="batchCommodity.b2cCode || '空'"></em></div>
                                         <div class="text-more">规格:&nbsp;<em title="{{batchCommodity.spec || '空'}}" ng-bind="batchCommodity.spec || '空'"></em></div>
                                     </td>