wangyc 7 лет назад
Родитель
Сommit
bb4421479a

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

@@ -18,7 +18,6 @@ import com.uas.platform.b2c.prod.commodity.dao.GoodsDao;
 import com.uas.platform.b2c.prod.commodity.dao.PCBDao;
 import com.uas.platform.b2c.prod.commodity.dao.ProductDao;
 import com.uas.platform.b2c.prod.commodity.model.Goods;
-import com.uas.platform.b2c.prod.commodity.model.Product;
 import com.uas.platform.b2c.prod.product.brand.dao.BrandDao;
 import com.uas.platform.b2c.prod.product.component.dao.ComponentDao;
 import com.uas.platform.b2c.prod.product.component.dao.ComponentGoodsDao;
@@ -30,6 +29,17 @@ 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;
@@ -42,18 +52,6 @@ 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;
-
 /**
  * 搜索索引
  *
@@ -192,88 +190,6 @@ public class SearcherServiceImpl implements SearcherService {
 		return map;
 	}
 	/**
-     * 智能搜索批次
-     *
-     * @param keyword
-     * @param page
-     * @return
-     * @throws InterruptedException
-     * @throws IOException
-     */
-    @SuppressWarnings("unchecked")
-    @Override
-    public ModelMap searchComponentGoods(String keyword, PageParams page , HttpServletRequest request) {
-        if (this.deviceResolver.resolveDevice(request).isMobile()) {
-            SystemSession.setUser((User)request.getSession().getAttribute("user"));
-            if (null != SystemSession.getUser() && null!= SystemSession.getUser().getUserUU()){
-                SearchHistory searchHistory = null;
-                List<SearchHistory> searchHistories = searchHistoryDao.findByKeywordAndUserUUAndUserEnuu(keyword,SystemSession.getUser().getUserUU(),SystemSession.getUser().getEnterprise() != null ?SystemSession.getUser().getEnterprise().getUu():null);
-                if (searchHistories.size()>0){
-                    searchHistory = searchHistories.get(0);
-                }else {
-                    searchHistory = new SearchHistory();
-                }
-                searchHistory.setKeyword(keyword);
-                searchHistory.setSearchTime(new Date(System.currentTimeMillis()));
-                searchHistory.setUserUU(SystemSession.getUser().getUserUU());
-                searchHistory.setUserEnuu(SystemSession.getUser().getEnterprise() != null ?SystemSession.getUser().getEnterprise().getUu():null);
-                searchHistoryDao.save(searchHistory);
-                searchHistories = searchHistoryDao.findByUserUUAndUserEnuuOrderBySearchTimeDesc(SystemSession.getUser().getUserUU(),SystemSession.getUser().getEnterprise() != null ?SystemSession.getUser().getEnterprise().getUu():null);
-                if (searchHistories.size()>10){
-                    searchHistoryDao.delete(searchHistories.subList(10,searchHistories.size()));
-                }
-            }
-        }
-        ModelMap map = new ModelMap();
-        Map<String,Object> results = null;
-        //Map<String, Object> results = new HashMap<>();
-        try {
-            results = searchService.getGoodsIds(keyword, convertPageParams(page));
-        } catch (SearchException e) {
-            throwSystemException(e);
-        }
-        //统计精准匹配到品牌的数量(便于展示唯一的品牌)
-        ModelMap brandMap = searchBrand(keyword,null);
-        List<Map<String, Object>> brands = (List)brandMap.get("brands");
-        if (!CollectionUtils.isEmpty(brands)) {
-            for (Map<String, Object> brand : brands){
-                if (keyword.equalsIgnoreCase(brand.get("nameCn").toString()) || keyword.equalsIgnoreCase(brand.get("nameEn").toString())){
-                    map.put("brands",brand);
-                    brandDao.addSearchCount(brand.get("uuid").toString());
-                }
-            }
-        }
-        if ((int)results.get("total") == 0){
-            map.put("total", results.get("total"));// 搜索结果总数
-            map.put("page", results.get("page"));// 当前页面
-            map.put("size", results.get("size"));// 每页个数
-            map.put("components", new ArrayList<>());// 当前页器件内容
-            return map;
-        }
-        List<Integer> componentIds = (List<Integer>)results.get("componentIds");
-        List<Integer> goodsIds = (List<Integer>)results.get("goodsIds");
-        List<ComponentGoods> components = new ArrayList<>();
-        if (!CollectionUtils.isEmpty(componentIds)) {
-            for (int i = 0 ;i < componentIds.size() ; i++){
-                Long cid = null;
-                if(!StringUtils.isEmpty
-                        (componentIds.get(i)))  {
-                    cid = Long.valueOf(componentIds.get(i).toString());
-                }
-                Long gid = goodsIds.get(i) == null ? 0L : Long.valueOf(goodsIds.get(i).toString());
-                if((cid == null) && (gid != 0L)) {
-                    Goods goods = goodsDao.findOne(gid);
-                    if(goods != null) {
-                        components.add(new ComponentGoods(goods));
-                    }
-                }else if(cid != null){
-                    ComponentGoods componentGoods = componentGoodsDao.findByCmpIdAndGoId(cid, gid);
-                    if (componentGoods != null){
-                        components.add(componentGoods);
-                    }
-                }
-            }
-            map.put("components", components);// 当前页器件内容
 	 * 智能搜索批次
 	 *
 	 * @param keyword
@@ -361,7 +277,7 @@ public class SearcherServiceImpl implements SearcherService {
             if (components.get(0).getCode().equals(keyword)) {
                 componentDao.addSearchCount(components.get(0).getUuid());
             }
-        }
+		}
 
         map.put("total", results.get("total"));// 搜索结果总数
         map.put("page", results.get("page"));// 当前页面

+ 56 - 1
src/main/java/com/uas/platform/b2c/prod/commodity/controller/ReleaseProductByBatchController.java

@@ -153,7 +153,19 @@ public class ReleaseProductByBatchController {
     @RequestMapping(value = "/batchRelease", method = RequestMethod.POST)
     public String batchRelease(String batch) {
         logger.log("批量上架模块", "批量发布指定批次:" + batch + "的上架内容");
-        return releaseProductByBatchService.publishByBatch(batch);
+        return releaseProductByBatchService.publishByBatch(batch, false);
+    }
+
+    /**
+     * 通过batch批量发布产品(pcb)
+     *
+     * @param batch the batch 发布的批次号
+     * @return string
+     */
+    @RequestMapping(value = "/batchRelease/pcb", method = RequestMethod.POST)
+    public String batchPCBRelease(String batch) {
+        logger.log("批量上架模块", "批量发布指定批次:" + batch + "的上架内容");
+        return releaseProductByBatchService.publishByBatch(batch, true);
     }
 
     /**
@@ -303,6 +315,49 @@ public class ReleaseProductByBatchController {
         return releaseProductByBatchService.getPageReleaseProductByBatch(info, batch);
     }
 
+    /**
+     * 导出不合格的数据(pcb)
+     *
+     * @param batch   the batch 批次号
+     * @param request the request 请求对象
+     * @param isAjax  the is ajax 是否是ajax 请求
+     * @return model and view
+     */
+    @RequestMapping(value = "/release/failure/pcb/xls", method = RequestMethod.GET)
+    public ModelAndView exportPcbOrderses(String batch, HttpServletRequest request, @RequestParam(defaultValue = "false") Boolean isAjax, String currency, Integer isPerson) {
+        ModelAndView modelAndView = new ModelAndView();
+        HttpSession session = request.getSession();
+        Object loading = session.getAttribute("load-error-ing");
+        if (isAjax) {
+            MappingJackson2JsonView view = new MappingJackson2JsonView();
+            Map attributes = new HashMap();
+            if (loading == null || !Boolean.valueOf(loading.toString())) {
+                attributes.put("load", false);
+            } else if (Boolean.valueOf(loading.toString())) {
+                attributes.put("load", true);
+            }
+            view.setAttributesMap(attributes);
+            modelAndView.setView(view);
+            return modelAndView;
+        }
+        if (loading == null || !Boolean.valueOf(loading.toString())) {
+            session.setAttribute("load-error-ing", true);
+        }
+        modelAndView.addObject("data", releaseProductByBatchService.findFailureReleaseProductByBatch(batch));
+        String url ="";
+
+        if (Currency.USD.equals(currency)) {
+            url = "classpath:jxls-tpl/trade/releasePCBByBatchError-usd";
+        } else {
+            url = "classpath:jxls-tpl/trade/releasePCBByBatchError-rmb";
+        }
+
+        modelAndView.setView(new JxlsExcelView(url, "导入失败产品-优软商城"));
+        logger.log("批量上架模块", "以Excel形式导出批量上架商品匹配不合格的数据");
+        session.setAttribute("load-error-ing", false);
+        return modelAndView;
+    }
+
     /**
      * 导出不合格的数据
      *

+ 7 - 0
src/main/java/com/uas/platform/b2c/prod/commodity/dao/PCBDao.java

@@ -73,6 +73,13 @@ public interface PCBDao extends  JpaSpecificationExecutor<PCB>, JpaRepository<PC
     @Query("select distinct pcb.kindid from PCB pcb where pcb.productid in (select p.id from Product p where p.enUU = :enUU)")
     public Set<Long> findByEnUU(@Param("enUU") Long enUU);
 
+    /**
+     * 通过物料id获取pcb信息
+     * @param productid
+     * @return
+     */
+    public List<PCB> findByProductid(Long productid);
+
     /**
      * 根据类目查找物料id
      * @param kindIds

+ 16 - 0
src/main/java/com/uas/platform/b2c/prod/commodity/dao/PcbPropertyvalueDao.java

@@ -0,0 +1,16 @@
+package com.uas.platform.b2c.prod.commodity.dao;
+
+import com.uas.platform.b2c.prod.commodity.model.PCBPropertyValue;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
+import org.springframework.stereotype.Repository;
+
+/**
+ * Created by wangyc on 2018/6/8.
+ *
+ * @version 2018/6/8 15:40 wangyc
+ */
+@Repository
+public interface PcbPropertyvalueDao extends JpaSpecificationExecutor<PCBPropertyValue>, JpaRepository<PCBPropertyValue, Long> {
+
+}

+ 8 - 0
src/main/java/com/uas/platform/b2c/prod/commodity/dao/ReleaseProductByBatchDao.java

@@ -82,6 +82,14 @@ public interface ReleaseProductByBatchDao
     @Procedure(procedureName = "PRODUCT_RELEASE_VALID_V2")
 	public void callValidProcedure(Long publisherUu, String batchid);
 
+	/**
+	 * 验证器件和品牌的信息pcb
+	 * @param publisherUu
+	 * @param batchid
+	 */
+	@Procedure(procedureName = "PRODUCT_RELEASE_VALID_V2_PCB")
+	public void callValidProcedurePcb(Long publisherUu, String batchid);
+
     /**
      * 创建时间 :2017年1月6日 下午8:25:57
      *

+ 9 - 0
src/main/java/com/uas/platform/b2c/prod/commodity/model/PCBPropertyValue.java

@@ -87,4 +87,13 @@ public class PCBPropertyValue implements Serializable{
     public void setValue(String value) {
         this.value = value;
     }
+
+    public PCBPropertyValue() {
+
+    }
+
+    public PCBPropertyValue(Long propertyid, String value) {
+        this.productid = propertyid;
+        this.value = value;
+    }
 }

+ 2 - 1
src/main/java/com/uas/platform/b2c/prod/commodity/service/ReleaseProductByBatchService.java

@@ -72,9 +72,10 @@ public interface ReleaseProductByBatchService {
      * 批量发布验证通过的信息
      *
      * @param batch the batch
+     * @param isPcb 是否PCB模块
      * @return string
      */
-    public String publishByBatch(String batch);
+    public String publishByBatch(String batch, boolean isPcb);
 
     /**
      * 批量批量导入个人产品库

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

@@ -20,12 +20,16 @@ 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.PCBDao;
+import com.uas.platform.b2c.prod.commodity.dao.PcbPropertyvalueDao;
 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.PCB;
+import com.uas.platform.b2c.prod.commodity.model.PCBPropertyValue;
 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;
@@ -37,6 +41,7 @@ import com.uas.platform.b2c.prod.commodity.util.SheetUtil;
 import com.uas.platform.b2c.prod.product.common.service.CreateNumberService;
 import com.uas.platform.b2c.prod.product.kind.dao.KindInfoDao;
 import com.uas.platform.b2c.prod.product.kind.model.KindInfo;
+import com.uas.platform.b2c.prod.product.property.dao.PropertyDao;
 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;
@@ -70,6 +75,7 @@ import javax.persistence.criteria.CriteriaQuery;
 import javax.persistence.criteria.Predicate;
 import javax.persistence.criteria.Root;
 import org.apache.commons.collections.CollectionUtils;
+import org.apache.commons.collections.map.HashedMap;
 import org.apache.poi.hssf.usermodel.HSSFCell;
 import org.apache.poi.hssf.usermodel.HSSFDateUtil;
 import org.apache.poi.ss.usermodel.Cell;
@@ -134,6 +140,20 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 	@Autowired
 	private KindInfoDao kindInfoDao;
 
+	@Autowired
+	private PCBDao pcbDao;
+
+	@Autowired
+	private PropertyDao propertyDao;
+
+	@Autowired
+	private PcbPropertyvalueDao pcbPropertyvalueDao;
+
+	private static final String SIZE = "尺寸";
+	private static final String COLOR = "颜色";
+	private static final String THICKCOPPER = "铜厚";
+	private static final String THICK = "厚度";
+
 	@Value("#{sys.productServiceIp}")
 	private String productServiceIp;
 
@@ -251,7 +271,13 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 			}
 		}
 		commonDao.save(addList, ReleaseProductByBatch.class);
-		releaseProductByBatchDao.callValidProcedure(enUU, batch);
+
+		if (isPcb) {
+			releaseProductByBatchDao.callValidProcedurePcb(enUU, batch);
+		} else {
+			releaseProductByBatchDao.callValidProcedure(enUU, batch);
+		}
+
 		Integer filter = releaseProductByBatchDao.getCountOfImportFail(userUU, batch, failCode);
 		Integer failure = releaseProductByBatchDao.getCountPublisherUuAndBatchAndReleaseCode(userUU, batch, ReleaseStatus.failure.value());
 		Integer success = releaseProductByBatchDao.getCountPublisherUuAndBatchAndReleaseCode(userUU, batch, ReleaseStatus.success.value());
@@ -1584,14 +1610,14 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 	}
 
 	@Override
-	public String publishByBatch(String batch) {
-
+	public String publishByBatch(String batch, boolean isPcb) {
 		List<ReleaseProductByBatch> releaseProductByBatchList =
 				releaseProductByBatchDao.findByRelbatchid(batch);
 		List<Long> productIds = null;
 		List<ProductPrivate> productPrivateList = null;
 		if (!CollectionUtils.isEmpty(releaseProductByBatchList)) {
-			List<com.uas.ps.entity.Product> products = convertProduct(releaseProductByBatchList,false);
+			Map<String, Object> map = convertProduct(releaseProductByBatchList,false, isPcb);
+			List<com.uas.ps.entity.Product> products = (List<com.uas.ps.entity.Product>) map.get("products");
 			// TODO 什么接口
 			String result = restTemplate.postForEntity(productServiceIp + "/product/update", products, String.class).getBody();
 			productIds = JSON.parseArray(result, Long.class);
@@ -1607,6 +1633,40 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 				productPrivates.add(productPrivate);
 			}
 			productPrivateList = productPrivateDao.save(productPrivates);
+
+			if (isPcb) {
+				List<PCB> pcbList = new ArrayList<>();
+				List<PCBPropertyValue> propertyValueList = new ArrayList<>();
+
+				for (Long prId : idSet) {
+					Product product = productDao.findOne(prId);
+					if (product != null) {
+						List<PCB> pcbs = pcbDao.findByProductid(prId);
+						if (CollectionUtils.isEmpty(pcbs)) {
+							PCB pcb = new PCB();
+							pcb.setProductid(prId);
+							pcb.setBrandid(product.getPbrandid());
+							pcb.setKindid(product.getKindid());
+							pcbList.add(pcb);
+						}
+					}
+
+					List<PCBPropertyValue> propertyValues = (List<PCBPropertyValue>) map.get(product.getEnUU().toString().concat(product.getProdNum()));
+					if (CollectionUtils.isNotEmpty(propertyValues)) {
+						for (PCBPropertyValue propertyValue : propertyValues) {
+							propertyValue.setProductid(prId);
+							propertyValueList.add(propertyValue);
+						}
+					}
+				}
+
+				if (CollectionUtils.isNotEmpty(pcbList)) {
+					pcbDao.save(pcbList);
+				}
+				if (CollectionUtils.isNotEmpty(propertyValueList)) {
+					pcbPropertyvalueDao.save(propertyValueList);
+				}
+			}
 		}
 		Enterprise enterprise = SystemSession.getUser().getEnterprise();
 		final Object[] obj = new Object[]{enterprise.getUu(), enterprise.getEnName(), batch};
@@ -1670,11 +1730,25 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 	}
 
 
-	private  List<com.uas.ps.entity.Product> convertProduct (List<ReleaseProductByBatch> releaseProductByBatchList, boolean isAPerson ) {
+	private  Map<String, Object> convertProduct (List<ReleaseProductByBatch> releaseProductByBatchList, boolean isAPerson , boolean isPcb) {
 		if (CollectionUtils.isEmpty(releaseProductByBatchList)) {
 			return null;
 		}
+		Map<String, Object> map = new HashedMap();
 		List<com.uas.ps.entity.Product> products = new ArrayList<>();
+		Map<String, List<PCBPropertyValue>> propertyMap = new HashedMap();
+
+		Long sizeProId = null;
+		Long colorProId = null;
+		Long thickCopperProId = null;
+		Long thickProId = null;
+		if (isPcb) {
+			sizeProId = propertyDao.findIdByLabelCn(SIZE);
+			colorProId = propertyDao.findIdByLabelCn(COLOR);
+			thickCopperProId = propertyDao.findIdByLabelCn(THICKCOPPER);
+			thickProId = propertyDao.findIdByLabelCn(THICK);
+		}
+
 		for (ReleaseProductByBatch releaseProductByBatch : releaseProductByBatchList) {
 		    if (releaseProductByBatch.getReleaseCode().equals(ReleaseStatus.failure.value()) ||
                     releaseProductByBatch.getReleaseCode().equals(ReleaseStatus.success.value())) {
@@ -1703,10 +1777,36 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
                 }
                 String batchCode = "PNUM" + createNumberService.getTimeNumber("trade$product_import_num", 8);
                 product.setCode(batchCode);
+
+				if (isPcb) {
+					List<PCBPropertyValue> propertyValues = new ArrayList<>();
+					if (!StringUtils.isEmpty(releaseProductByBatch.getSize())) {
+						PCBPropertyValue propertyValue = new PCBPropertyValue(sizeProId, releaseProductByBatch.getSize());
+						propertyValues.add(propertyValue);
+					}
+					if (!StringUtils.isEmpty(releaseProductByBatch.getColor())) {
+						PCBPropertyValue propertyValue = new PCBPropertyValue(colorProId, releaseProductByBatch.getColor());
+						propertyValues.add(propertyValue);
+					}
+					if (!StringUtils.isEmpty(releaseProductByBatch.getThickCopper())) {
+						PCBPropertyValue propertyValue = new PCBPropertyValue(thickCopperProId, releaseProductByBatch.getThickCopper());
+						propertyValues.add(propertyValue);
+					}
+					if (!StringUtils.isEmpty(releaseProductByBatch.getThick())) {
+						PCBPropertyValue propertyValue = new PCBPropertyValue(thickProId, releaseProductByBatch.getThick());
+						propertyValues.add(propertyValue);
+					}
+					if (CollectionUtils.isNotEmpty(propertyValues)) {
+						propertyMap.put(product.getEnUU().toString().concat(product.getCode()), propertyValues);
+					}
+				}
                 products.add(product);
             }
 		}
-		return products;
+
+		map.put("products", products);
+		map.put("propertyvalues", propertyMap);
+		return map;
 	}
 
 	@Override
@@ -1714,7 +1814,8 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
         List<ReleaseProductByBatch> releaseProductByBatchList =
                 releaseProductByBatchDao.findByRelbatchid(batch);
         if (!CollectionUtils.isEmpty(releaseProductByBatchList)) {
-            List<com.uas.ps.entity.Product> products = convertProduct(releaseProductByBatchList,true);
+			Map<String, Object> map = convertProduct(releaseProductByBatchList,false, false);
+			List<com.uas.ps.entity.Product> products = (List<com.uas.ps.entity.Product>) map.get("products");
             // TODO 什么接口
 			String result = restTemplate.postForEntity(productServiceIp + "/product/update", products, String.class).getBody();
             List<Long> productIds = JSON.parseArray(result, Long.class);

+ 3 - 3
src/main/java/com/uas/platform/b2c/prod/product/kind/dao/KindInfoDao.java

@@ -55,8 +55,8 @@ public interface KindInfoDao extends JpaSpecificationExecutor<KindInfo>, JpaRepo
 	 * @param childId 子类目
 	 * @return
 	 */
-	@Query(nativeQuery = true, value = "select find_in_set(:childId, findLeafKind(:parentId))")
-	public Integer existsChildByParentId(@Param("parentid") Long parentId, @Param("childId") Long childId);
+	@Query(nativeQuery = true, value = "select find_in_set(:childid, findLeafKind(:parentid))")
+	public Integer existsChildByParentId(@Param("parentid") Long parentId, @Param("childid") Long childId);
 
 	/**
 	 * 通过类目名获取类目信息
@@ -64,4 +64,4 @@ public interface KindInfoDao extends JpaSpecificationExecutor<KindInfo>, JpaRepo
 	 * @return
 	 */
 	public KindInfo findByNameCn(String name);
-}
+}

+ 7 - 0
src/main/java/com/uas/platform/b2c/prod/product/property/dao/PropertyDao.java

@@ -23,4 +23,11 @@ public interface PropertyDao extends JpaSpecificationExecutor<Property>, JpaRepo
 	 * @return 属性信息
 	 */
 	public List<Property> findByLabelEn(String labelEn);
+
+	/**
+	 * 根据属性中文名获取属性id
+	 * @param labelCn
+	 * @return
+	 */
+	public Long findIdByLabelCn(String labelCn);
 }

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


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