Kaynağa Gözat

Merge remote-tracking branch 'upsteam/master'

zhh 3 yıl önce
ebeveyn
işleme
b9cd23f8c3
26 değiştirilmiş dosya ile 460 ekleme ve 512 silme
  1. 42 47
      kmall-admin/src/main/java/com/kmall/admin/controller/GoodsController.java
  2. 0 2
      kmall-admin/src/main/java/com/kmall/admin/controller/ProductStoreRelaController.java
  3. 1 1
      kmall-admin/src/main/java/com/kmall/admin/dao/ProductStoreRelaDao.java
  4. 2 0
      kmall-admin/src/main/java/com/kmall/admin/dao/vip/Mall2PointsRulesDao.java
  5. 51 0
      kmall-admin/src/main/java/com/kmall/admin/dto/GoodsDto.java
  6. 2 2
      kmall-admin/src/main/java/com/kmall/admin/dto/Mall2RulesDto.java
  7. 3 3
      kmall-admin/src/main/java/com/kmall/admin/dto/StoreGoodsDto.java
  8. 51 0
      kmall-admin/src/main/java/com/kmall/admin/entity/GoodsEntity.java
  9. 67 183
      kmall-admin/src/main/java/com/kmall/admin/service/impl/GoodsServiceImpl.java
  10. 5 4
      kmall-admin/src/main/java/com/kmall/admin/service/impl/OrderServiceImpl.java
  11. 1 48
      kmall-admin/src/main/java/com/kmall/admin/service/impl/ProductStoreRelaServiceImpl.java
  12. 3 19
      kmall-admin/src/main/java/com/kmall/admin/service/impl/vip/Mall2PointsRulesServiceImpl.java
  13. 15 19
      kmall-admin/src/main/resources/XmlTemplate/GoodsDtoList.xml
  14. 21 3
      kmall-admin/src/main/resources/mybatis/mapper/GoodsDao.xml
  15. 4 5
      kmall-admin/src/main/resources/mybatis/mapper/GoodsSpecificationDao.xml
  16. 1 1
      kmall-admin/src/main/resources/mybatis/mapper/PickUpCodeDao.xml
  17. 12 6
      kmall-admin/src/main/resources/mybatis/mapper/ProductStoreRelaDao.xml
  18. 8 0
      kmall-admin/src/main/resources/mybatis/mapper/vip/Mall2PointsRulesDao.xml
  19. 104 104
      kmall-admin/src/main/webapp/WEB-INF/page/shop/goods.html
  20. 44 40
      kmall-admin/src/main/webapp/WEB-INF/page/shop/storeProductStock.html
  21. 8 8
      kmall-admin/src/main/webapp/WEB-INF/page/vip/mall2pointsrules.html
  22. 2 2
      kmall-admin/src/main/webapp/js/mk/mall2RulesDetil.js
  23. 7 7
      kmall-admin/src/main/webapp/js/shop/goods.js
  24. 1 4
      kmall-admin/src/main/webapp/js/shop/storeProductStock.js
  25. 5 4
      kmall-admin/src/main/webapp/js/vip/mall2pointsrules.js
  26. BIN
      kmall-admin/src/main/webapp/statics/file/goods_export_yyyy_mm_dd_v1.0.0.xls

+ 42 - 47
kmall-admin/src/main/java/com/kmall/admin/controller/GoodsController.java

@@ -74,7 +74,6 @@ public class GoodsController {
     @RequiresPermissions("goods:list")
     public R list(@RequestParam Map<String, Object> params) {
         ParamUtils.setQueryPowerByRoleType(params, "storeKey", "merchSn", "thirdPartyMerchCode");
-//        ParamUtils.setName(params, "name");
         String lastSaleTime = (String) params.get("lastSaleTime");
         if(org.apache.commons.lang.StringUtils.isNotEmpty(lastSaleTime)) {
             try {
@@ -375,43 +374,54 @@ public class GoodsController {
         fileDir.mkdirs();
         File saveFile = new File(fileDir, fileName);//将压缩包解析到指定位置
         List<String>list = new ArrayList<>();
+
         try {
             file.transferTo(saveFile);
             String newFilePath = filePath + fileName;
             File zipFile = new File(newFilePath);
             unZipFiles(zipFile, path,list,type);//解压文件,获取文件路径
-
-            System.out.println(JSON.toJSONString(list));
         } catch (Exception e) {
             e.printStackTrace();
-
-            System.out.println("解压执行失败");
-            throw e ;
+            log.info("解压执行失败");
+            throw e;
+        }finally {
+            //程序结束时,删除临时文件
+            deleteFiles(filePath);//删除压缩包文件夹
+            deleteFiles(path);//删除解压文件夹**
         }
-        //程序结束时,删除临时文件
-        deleteFiles(filePath);//删除压缩包文件夹
-        deleteFiles(path);//删除解压文件夹**
 
-        Map<String, Object> jsonMap = new HashMap<String, Object>();
+        log.info(JSON.toJSONString(list));
+        Map<String, Object> jsonMap = new HashMap<>();
         jsonMap.put("ret",list);
         return jsonMap;
     }
 
     public void unZipFiles(File srcFile, String destDirPath, List<String> list, int type) throws RuntimeException {
         long start = System.currentTimeMillis();
-        // 判断源文件是否存在
-        if (!srcFile.exists()) {
-            throw new RuntimeException(srcFile.getPath() + "所指文件不存在");
-        }
-        // 开始解压
         ZipFile zipFile = null;
         try {
+            // 判断源文件是否存在
+            if (!srcFile.exists()) {
+                throw new RuntimeException(srcFile.getPath() + "所指文件不存在");
+            }
+            // 开始解压
             zipFile = new ZipFile(srcFile);
+            zipFile.getEncoding();
             Enumeration<?> entries = zipFile.getEntries();
+            List<ZipEntry> entryList = new ArrayList<>();
             while (entries.hasMoreElements()) {
                 ZipEntry entry = (ZipEntry) entries.nextElement();
-                System.out.println("解压" + entry.getName());
+                log.info("解压" + entry.getName());
+                entryList.add(entry);
                 // 如果是文件夹,就创建个文件夹
+            }
+            if(null==entryList){
+                throw new RRException("文件夹内无图片信息,请检查后重试");
+            }
+            if(entryList.size()>100){
+                throw new RRException("最多上传100张图片");
+            }
+            for(ZipEntry entry : entryList){
                 if (entry.isDirectory()) {
                     String dirPath = destDirPath + "/" + entry.getName();
                     File dir = new File(dirPath);
@@ -434,37 +444,32 @@ public class GoodsController {
                         fos.write(buf, 0, len);
                     }
 
-
                     MultipartFile mulFileByPath = getMulFileByPath(destDirPath + "/" + entry.getName());
+                    long fileSize = mulFileByPath.getSize();
+                    int maxSize = 1 * 1024 * 1024;
+                    if (fileSize > maxSize) {
+                        throw new RRException("商品图片过大(最大1M),请检查!");
+                    }
+
+
                     //上传文件
                     String url = FileManager.upload(mulFileByPath);
                     list.add(url);
-
-
                     if(type == 1){
-                        String sku = entry.getName().split("/")[1].split("\\.")[0];
-                        GoodsEntity goodsEntity = goodsService.queryBySku(sku);
-                        goodsEntity.setPrimaryPicUrl(url);
-                        goodsEntity.setListPicUrl(url);
-                        goodsService.updateForImgUrl(goodsEntity);
-                    }else if(type == 2){
-                        String barCode = entry.getName().split("/")[1];
-                        GoodsEntity goodsEntity = goodsService.queryByBarcode(barCode);
+                        String barcode = entry.getName().split("\\.")[0];
+                        if (null==barcode||"".equals(barcode)) {
+                            throw new RRException("文件为:" + barcode + "的商品命名格式不正确,请检查!");
+                        }
+                        GoodsEntity goodsEntity = goodsService.queryByBarcode(barcode);
                         goodsEntity.setPrimaryPicUrl(url);
                         goodsEntity.setListPicUrl(url);
                         goodsService.updateForImgUrl(goodsEntity);
                     }
-
-
-
-
                     //保存文件信息
                     SysOssEntity ossEntity = new SysOssEntity();
                     ossEntity.setUrl(url);
                     ossEntity.setCreateDate(new Date());
                     sysOssService.save(ossEntity);
-
-
                     // 关流顺序,先打开的后关闭
                     fos.close();
                     is.close();
@@ -472,7 +477,9 @@ public class GoodsController {
             }
             long end = System.currentTimeMillis();
             System.out.println("解压完成,耗时:" + (end - start) +" ms");
-        } catch (Exception e) {
+        }catch (RRException e) {
+            throw new RRException(e.getMessage(), e);
+        }catch (Exception e) {
             throw new RuntimeException("unzip error from ZipUtils", e);
         } finally {
             if(zipFile != null){
@@ -485,6 +492,7 @@ public class GoodsController {
         }
     }
 
+
     private static MultipartFile getMulFileByPath(String picPath) {
         FileItem fileItem = createFileItem(picPath);
         MultipartFile mfile = new CommonsMultipartFile(fileItem);
@@ -548,19 +556,6 @@ public class GoodsController {
         file.delete();
     }
 
-
-    /*@RequestMapping("/scannInfo")
-    @RequiresPermissions("goods:scannInfo")
-    public R scannInfo(@RequestParam Map<String, Object> params) {
-        String goodsSn = (String)params.get("goodsSn");
-        GoodsEntity goods = goodsService.queryObjectByGoodsSnAndBizType(goodsSn);
-        if(goods == null) {
-            return R.error("商品信息不存在");
-        }
-        List<OfflineCartEntity> cartEntityList = offlineCartService.offlineGoodsCart(goods);
-
-        return R.ok().put("cartEntityList", cartEntityList);
-    }*/
     @RequestMapping("/scannInfo/{prodBarcode}")
     @RequiresPermissions("goods:scannInfo")
     public R scannInfo(@PathVariable("prodBarcode")String prodBarcode) {

+ 0 - 2
kmall-admin/src/main/java/com/kmall/admin/controller/ProductStoreRelaController.java

@@ -49,7 +49,6 @@ public class ProductStoreRelaController {
     @ResponseBody
     public R list(@RequestParam Map<String, Object> params) {
         ParamUtils.setQueryPowerByRoleType(params, "storeId", "merchSn", "thirdPartyMerchCode");
-//        ParamUtils.setName(params, "goodsName");
         String lastSaleTime = (String) params.get("lastSaleTime");
         if(org.apache.commons.lang.StringUtils.isNotEmpty(lastSaleTime)) {
             try {
@@ -244,7 +243,6 @@ public class ProductStoreRelaController {
     }
 
     @RequestMapping("/qrcodeCanvas/{id}")
-//    @RequiresPermissions("mkstoreprom:qrcodeCanvas")
     @ResponseBody
     public R qrcodeCanvas(@PathVariable("id") Integer id) {
         SysUserEntity user = ShiroUtils.getUserEntity();

+ 1 - 1
kmall-admin/src/main/java/com/kmall/admin/dao/ProductStoreRelaDao.java

@@ -115,7 +115,7 @@ public interface ProductStoreRelaDao extends BaseDao<ProductStoreRelaEntity> {
 
     void updateProductStoreRulesDetil(Integer[] mprIds);
 
-    Long queryproductStoreByName(@Param("sku")String sku,@Param("storeId")Long storeId);
+    String queryproductStoreByName(@Param("sku")String sku,@Param("storeId")Long storeId);
 
     ProductStoreRelaEntity queryByGoodsIdAndStoreIdHkMall(@Param("storeId") Long storeId, @Param("goodsId") Long goodsId);
 

+ 2 - 0
kmall-admin/src/main/java/com/kmall/admin/dao/vip/Mall2PointsRulesDao.java

@@ -35,4 +35,6 @@ public interface Mall2PointsRulesDao extends BaseDao<Mall2PointsRulesEntity> {
     List<Mall2RulesDto> querymall2PointsRulesDetil(Long id);
 
     int querymall2PointsRulesDetilTotal(Long id);
+
+    void deleteRulesDetil(Integer[] mprIds);
 }

+ 51 - 0
kmall-admin/src/main/java/com/kmall/admin/dto/GoodsDto.java

@@ -135,6 +135,17 @@ public class GoodsDto implements Serializable {
     private String firstLevel;
     private String secondLevel;
 
+    //仓库编码
+    private String warehouseSn;
+    //货主编码
+    private String consignorSn;
+    //仓储系统商品ID
+    private String warehousSysGoodId;
+    //库存类型
+    private String inventoryType;
+    //残品等级(非残次品则不填)
+    private String defectiveProductsGrade;
+
     public String getCounterPrice() {
         return counterPrice;
     }
@@ -601,4 +612,44 @@ public class GoodsDto implements Serializable {
     public void setSecondLevel(String secondLevel) {
         this.secondLevel = secondLevel;
     }
+
+    public String getWarehouseSn() {
+        return warehouseSn;
+    }
+
+    public void setWarehouseSn(String warehouseSn) {
+        this.warehouseSn = warehouseSn;
+    }
+
+    public String getConsignorSn() {
+        return consignorSn;
+    }
+
+    public void setConsignorSn(String consignorSn) {
+        this.consignorSn = consignorSn;
+    }
+
+    public String getWarehousSysGoodId() {
+        return warehousSysGoodId;
+    }
+
+    public void setWarehousSysGoodId(String warehousSysGoodId) {
+        this.warehousSysGoodId = warehousSysGoodId;
+    }
+
+    public String getInventoryType() {
+        return inventoryType;
+    }
+
+    public void setInventoryType(String inventoryType) {
+        this.inventoryType = inventoryType;
+    }
+
+    public String getDefectiveProductsGrade() {
+        return defectiveProductsGrade;
+    }
+
+    public void setDefectiveProductsGrade(String defectiveProductsGrade) {
+        this.defectiveProductsGrade = defectiveProductsGrade;
+    }
 }

+ 2 - 2
kmall-admin/src/main/java/com/kmall/admin/dto/Mall2RulesDto.java

@@ -14,8 +14,8 @@ public class Mall2RulesDto {
     private String pointsRulesName;
     //积分生成规则分类id(门店,商品类别,商品)
     private Integer pointsRulesType;
-    //门店ID,商品ID,商品分类ID
-    private Long rulesId;
+    //门店ID,商品sku,商品分类ID
+    private String rulesId;
     //商品门店名称
     private String storeName;
     //当导入商品时,对应的商品门店ID

+ 3 - 3
kmall-admin/src/main/java/com/kmall/admin/dto/StoreGoodsDto.java

@@ -29,7 +29,7 @@ public class StoreGoodsDto implements Serializable {
     /**
      * 出区数
      */
-    private String exitRegionNumber;
+    private Integer exitRegionNumber;
 
     public String getBatchSn() {
         return batchSn;
@@ -151,11 +151,11 @@ public class StoreGoodsDto implements Serializable {
         this.uniqueIdentifier = uniqueIdentifier;
     }
 
-    public String getExitRegionNumber() {
+    public Integer getExitRegionNumber() {
         return exitRegionNumber;
     }
 
-    public void setExitRegionNumber(String exitRegionNumber) {
+    public void setExitRegionNumber(Integer exitRegionNumber) {
         this.exitRegionNumber = exitRegionNumber;
     }
 }

+ 51 - 0
kmall-admin/src/main/java/com/kmall/admin/entity/GoodsEntity.java

@@ -279,6 +279,17 @@ public class GoodsEntity implements Serializable {
      */
     private BigDecimal goodsTaxes;
 
+    //仓库编码
+    private String warehouseSn;
+    //货主编码
+    private String consignorSn;
+    //仓储系统商品ID
+    private String warehousSysGoodId;
+    //库存类型
+    private String inventoryType;
+    //残品等级(非残次品则不填)
+    private String defectiveProductsGrade;
+
     public GoodsEntity() {
     }
 
@@ -1282,6 +1293,46 @@ public class GoodsEntity implements Serializable {
         this.exitRegionNumber = exitRegionNumber;
     }
 
+    public String getWarehouseSn() {
+        return warehouseSn;
+    }
+
+    public void setWarehouseSn(String warehouseSn) {
+        this.warehouseSn = warehouseSn;
+    }
+
+    public String getConsignorSn() {
+        return consignorSn;
+    }
+
+    public void setConsignorSn(String consignorSn) {
+        this.consignorSn = consignorSn;
+    }
+
+    public String getWarehousSysGoodId() {
+        return warehousSysGoodId;
+    }
+
+    public void setWarehousSysGoodId(String warehousSysGoodId) {
+        this.warehousSysGoodId = warehousSysGoodId;
+    }
+
+    public String getInventoryType() {
+        return inventoryType;
+    }
+
+    public void setInventoryType(String inventoryType) {
+        this.inventoryType = inventoryType;
+    }
+
+    public String getDefectiveProductsGrade() {
+        return defectiveProductsGrade;
+    }
+
+    public void setDefectiveProductsGrade(String defectiveProductsGrade) {
+        this.defectiveProductsGrade = defectiveProductsGrade;
+    }
+
     /**
      * 重写hashCode方法,用作排序
      */

+ 67 - 183
kmall-admin/src/main/java/com/kmall/admin/service/impl/GoodsServiceImpl.java

@@ -193,8 +193,8 @@ public class GoodsServiceImpl implements GoodsService {
         builder.put("goodsDesc", "商品描述");
         builder.put("isOnSale", "上架");
         builder.put("isHot", "热销");
-        builder.put("englishName", "商品英文名称");
-        builder.put("plu", "PLU");
+        //builder.put("englishName", "商品英文名称");
+//        builder.put("plu", "PLU");
 
 
         R r = ValidatorUtil.isEmpty(builder.build(), valideDate);
@@ -206,13 +206,13 @@ public class GoodsServiceImpl implements GoodsService {
                 builder.put("sku", "SKU");
                 builder.put("goodsRate", "商品税率");
 //                builder.put("retailPrice", "零售价");
-                builder.put("brand", "产品品牌");
+//                builder.put("brand", "产品品牌");
                 builder.put("unitCode", "计量单位代码");
-                builder.put("cusGoodsCode", "海关商品编码");
-                builder.put("ciqProdModel", "国检规格型号");
+                //builder.put("cusGoodsCode", "海关商品编码");
+//              builder.put("ciqProdModel", "国检规格型号");
                 builder.put("oriCntCode", "原产国代码");
-                builder.put("cusDeclEle", "海关申报要素");
-                builder.put("cusRecCode", "海关备案编号");
+//                builder.put("cusDeclEle", "海关申报要素");
+                //builder.put("cusRecCode", "海关备案编号");
             }
             r = ValidatorUtil.isEmpty(builder.build(), valideDate);
             if (Integer.valueOf(r.get("code").toString()) != 0) {
@@ -234,10 +234,10 @@ public class GoodsServiceImpl implements GoodsService {
             throw new RRException(r.get("msg").toString());
         }
         // 商品轮播图
-        List<GoodsGalleryEntity> galleryEntityList = goods.getGoodsImgList();
-        if (galleryEntityList == null || galleryEntityList.size() <= 0) {
-            throw new RRException("至少添加一张商品轮播图!");
-        }
+//        List<GoodsGalleryEntity> galleryEntityList = goods.getGoodsImgList();
+//        if (galleryEntityList == null || galleryEntityList.size() <= 0) {
+//            throw new RRException("至少添加一张商品轮播图!");
+//        }
 //        List<GoodsEntity> prodbarGoodsList = goodsDao.queryObjectByProdBarcode(goods.getProdBarcode(),goods.getMerchSn(),null);
 //        if(prodbarGoodsList != null && prodbarGoodsList.size() > 0){
 //            throw new RRException("不能有重复的产品条码信息!");
@@ -274,14 +274,14 @@ public class GoodsServiceImpl implements GoodsService {
         Long id = goods.getId();
 
         // 添加商品轮播图
-        for (int i=0;i<galleryEntityList.size();i++) {
-            GoodsGalleryEntity galleryEntity =galleryEntityList.get(i);
-            galleryEntity.setMerchSn(goods.getMerchSn());
-            galleryEntity.setGoodsId(id);
-            galleryEntity.setSortOrder((i+1));
-            galleryEntity.setFileType("0");//图片
-            goodsGalleryDao.save(galleryEntity);
-        }
+//        for (int i=0;i<galleryEntityList.size();i++) {
+//            GoodsGalleryEntity galleryEntity =galleryEntityList.get(i);
+//            galleryEntity.setMerchSn(goods.getMerchSn());
+//            galleryEntity.setGoodsId(id);
+//            galleryEntity.setSortOrder((i+1));
+//            galleryEntity.setFileType("0");//图片
+//            goodsGalleryDao.save(galleryEntity);
+//        }
         if(org.apache.commons.lang.StringUtils.isNotEmpty(goods.getVideoUrl())){
             GoodsGalleryEntity galleryEntity = new GoodsGalleryEntity();
             galleryEntity.setMerchSn(goods.getMerchSn());
@@ -380,13 +380,13 @@ public class GoodsServiceImpl implements GoodsService {
                 builder.put("sku", "SKU");
                 builder.put("goodsRate", "商品税率");
 //                builder.put("retailPrice", "零售价");
-                builder.put("brand", "产品品牌");
+//                builder.put("brand", "产品品牌");
                 builder.put("unitCode", "计量单位代码");
-                builder.put("cusGoodsCode", "海关商品编码");
-                builder.put("ciqProdModel", "国检规格型号");
+                //builder.put("cusGoodsCode", "海关商品编码");
+                //builder.put("ciqProdModel", "国检规格型号");
                 builder.put("oriCntCode", "原产国代码");
-                builder.put("cusRecCode", "海关备案编号");
-                builder.put("cusDeclEle", "海关申报要素");
+                //builder.put("cusRecCode", "海关备案编号");
+                //builder.put("cusDeclEle", "海关申报要素");
             }
             r = ValidatorUtil.isEmpty(builder.build(), valideDate);
             if (Integer.valueOf(r.get("code").toString()) != 0) {
@@ -776,32 +776,23 @@ public class GoodsServiceImpl implements GoodsService {
         SysUserEntity user = ShiroUtils.getUserEntity();
         String merchSn = user.getMerchSn();
         boolean isFail = false;
-        List<String> failSameSkuList = new ArrayList<>(), failHotGoodsSnList = new ArrayList<>(),
-//                failSuppGoodsSnList = new ArrayList<>(),
-                failUnitGoodsSnList = new ArrayList<>(), failNationGoodsSnList = new ArrayList<>(),
-//                failProdbarGoodsSnList = new ArrayList<>(),
-                 failTypeGoodsSnList = new ArrayList<>(), failMerchGoodsSnList = new ArrayList<>(),
-//                failCateL2GoodsSnList = new ArrayList<>(),
-//                failCateGoodsSnList = new ArrayList<>(),
-//                failBrandGoodsSnList = new ArrayList<>(),
-//                failFreightGoodsSnList = new ArrayList<>(),
+        List<String> failSameSkuList = new ArrayList<>(),
+                failUnitGoodsSnList = new ArrayList<>(),
+                failNationGoodsSnList = new ArrayList<>(),
+                 failTypeGoodsSnList = new ArrayList<>(),
+                failMerchGoodsSnList = new ArrayList<>(),
+
                 failMerchUserGoodsSnList = new ArrayList<>();
         List<String> failGoodsSnList = new ArrayList<>();
         List<String> failGoodsTypeList = new ArrayList<>();
-//        List<String> failFreightList = new ArrayList<>();
-
 
         // 定义需要批量插入的list
-        List<ProductEntity> insertProductList = new LinkedList<>();
-        List<GoodsSpecificationEntity> insertSpecificationList = new LinkedList<>();
         List<MngChangeEntity> insertMngChangeList = new LinkedList<>();
         List<GoodsEntity> insertGoodsList = new LinkedList<>();
-        List<SupplierEntity> insertSupplierList = new LinkedList<>();
 
         // 定义需要批量修改的list
         List<ProductEntity> updateProductList = new LinkedList<>();
         List<GoodsSpecificationEntity> updateSpecificationList = new LinkedList<>();
-        List<GoodsEntity> updateGoodsList = new LinkedList<>();
 
         if (goodsEntityList != null && goodsEntityList.size() > 0) {
             for (int i = 0; i < goodsEntityList.size(); i++) {
@@ -811,11 +802,8 @@ public class GoodsServiceImpl implements GoodsService {
                 ImmutableBiMap.Builder builder = new ImmutableBiMap.Builder();
                 builder.put("goodsSn", "商品编码");
                 builder.put("thirdPartyMerchCode", "第三方商户代码");
-//                builder.put("categoryName", "商品分类");
                 builder.put("goodsBizType", "货品业务类型");
                 builder.put("name", "商品名称");
-//                builder.put("brandName", "商品品牌名称");
-//                builder.put("defaultFreight", "运费");
                 builder.put("isOnSaleStr", "上架");
                 builder.put("goodsUnit", "商品单位");
                 builder.put("isHotStr", "热销");
@@ -832,13 +820,13 @@ public class GoodsServiceImpl implements GoodsService {
                         // 海关信息,普通货物可不添加
                         builder.put("goodsRate", "商品税率");
                         builder.put("sku", "SKU");
-                        builder.put("brand", "产品品牌");
+//                        builder.put("brand", "产品品牌");
                         builder.put("unitName", "计量单位");
                         builder.put("oriCntName", "原产国");
-                        builder.put("cusGoodsCode", "海关商品编码");
-                        builder.put("ciqProdModel", "国检规格型号");
-                        builder.put("cusDeclEle", "海关申报要素");
-                        builder.put("cusRecCode", "海关备案编号");
+                        //builder.put("cusGoodsCode", "海关商品编码");
+                        //builder.put("ciqProdModel", "国检规格型号");
+                        //builder.put("cusDeclEle", "海关申报要素");
+                        //builder.put("cusRecCode", "海关备案编号");
                     }
                     r = ValidatorUtil.isEmpty(builder.build(), valideDate);
                     if (Integer.valueOf(r.get("code").toString()) != 0) {
@@ -878,7 +866,6 @@ public class GoodsServiceImpl implements GoodsService {
                 map.put("goodsBizType", goodsDto.getGoodsBizType());
                 List<GoodsEntity> list = querySame(map);
                 if (list != null && list.size() != 0) {
-//                    isFail = true;
                     if(goodsDto.getSku()!=null) {
                         failSameSkuList.add(goodsDto.getSku());
                     }
@@ -886,23 +873,11 @@ public class GoodsServiceImpl implements GoodsService {
                     failGoodsTypeList.add(goodsDto.getGoodsBizType());
                 }
                 goodsEntity.setProdBarcode(goodsDto.getProdBarcode());
-                //热销商品校验
-                if (Dict.orderBizType.item_02.getItem().equals(goodsDto.getGoodsBizType())
-                        || Dict.orderBizType.item_10.getItem().equals(goodsDto.getGoodsBizType())) {
-                    if(goodsDto.getIsHotStr().equalsIgnoreCase("1")){
-                        isFail = true;
-                        failHotGoodsSnList.add(goodsDto.getGoodsSn());
-                    }
-                }
                 if(thirdMerchantBizEntity != null) {
                     SupplierEntity supplierEntity = supplierDao.queryObjectByName(goodsDto.getSupplierName(), thirdMerchantBizEntity.getMerchSn(),thirdMerchantBizEntity.getThirdPartyMerchCode());
                     if (supplierEntity == null) {
                         //导入没有查到供货商,执行新增
                         MerchEntity merchEntity = merchDao.findByMerchSn(thirdMerchantBizEntity.getMerchSn());
-//                        if(null == merchEntity || !StringUtils.isNotEmpty(goodsDto.getSupplierFlag())){
-//                            isFail = true;
-//                            failSuppGoodsSnList.add(goodsDto.getGoodsSn());
-//                        }
 
                         supplierEntity = new SupplierEntity();
                         supplierEntity.setLevelMerchSn(merchEntity.getMerchSn());
@@ -913,10 +888,8 @@ public class GoodsServiceImpl implements GoodsService {
                         supplierEntity.setIsShow("0");
 
                         // TODO 这里改成批量插入 SupplierEntity
-//                        insertSupplierList.add(supplierEntity);
                         //新增商品供货信息
                         supplierDao.save(supplierEntity);
-//                        supplierEntity = supplierDao.queryObjectByName(goodsDto.getSupplierName(), thirdMerchantBizEntity.getMerchSn(),thirdMerchantBizEntity.getThirdPartyMerchCode());
                         goodsEntity.setSupplierId(supplierEntity.getId());
                     } else {
                         goodsEntity.setSupplierId(supplierEntity.getId());
@@ -928,12 +901,9 @@ public class GoodsServiceImpl implements GoodsService {
                  */
                 // 获取品牌唯一简码
                 checkBrand(goodsDto, goodsEntity);
-
-
                 // 获取二级分类id
                 checkCategory(goodsDto, goodsEntity);
 
-
                 if (!Dict.orderBizType.item_11.getItem().equals(goodsDto.getGoodsBizType())) {
                     SysCusUnitCodeEntity sysCusUnitCodeEntity = sysCusUnitCodeDao.queryObjectByName(goodsDto.getUnitName());
                     if (sysCusUnitCodeEntity == null) {
@@ -962,8 +932,6 @@ public class GoodsServiceImpl implements GoodsService {
 
                 goodsEntity.setIsOnSale(Integer.parseInt(goodsDto.getIsOnSaleStr()));
                 goodsEntity.setIsHot(Integer.parseInt(goodsDto.getIsHotStr()));
-//                goodsEntity.setRetailPrice(BigDecimal.valueOf(Integer.valueOf(goodsDto.getRetailPrice())));
-//                goodsEntity.setMarketPrice(BigDecimal.valueOf(Integer.valueOf(goodsDto.getMarketPrice())));
                 goodsEntity.setGoodsSn(goodsDto.getGoodsSn());
                 goodsEntity.setSku(goodsDto.getSku());
                 goodsEntity.setName(goodsDto.getName());
@@ -982,12 +950,17 @@ public class GoodsServiceImpl implements GoodsService {
                 goodsEntity.setUpdateTime(new Date());
                 goodsEntity.setModTime(new Date());
                 goodsEntity.setGoodsNumber(Integer.parseInt(goodsDto.getGoodsNumber()));
-                goodsEntity.setPlu(goodsDto.getPlu());
-                goodsEntity.setMychemId(goodsDto.getMychemId());
+                //新加字段1208
+                goodsEntity.setWarehouseSn(goodsDto.getWarehouseSn());
+                goodsEntity.setConsignorSn(goodsDto.getConsignorSn());
+                goodsEntity.setWarehousSysGoodId(goodsDto.getWarehousSysGoodId());
+                goodsEntity.setConsignorSn(goodsDto.getConsignorSn());
+                goodsEntity.setInventoryType(goodsDto.getInventoryType());
+                goodsEntity.setDefectiveProductsGrade(goodsDto.getDefectiveProductsGrade());
+
 
                 if(!isFail){
                     GoodsEntity goods = goodsDao.queryObjectBySn(goodsDto.getGoodsSn());
-
                     MngChangeEntity mngChangeEntity = new MngChangeEntity();
                     mngChangeEntity.setThirdPartyMerchCode(goodsEntity.getThirdPartyMerchCode());
                     mngChangeEntity.setChangeReason("更新商户商品总库存");
@@ -998,6 +971,7 @@ public class GoodsServiceImpl implements GoodsService {
                     mngChangeEntity.setIsValid(0);
                     mngChangeEntity.setMerchSn(goodsEntity.getMerchSn());
 
+                    //新增、修改商品表
                     if(goods!=null) {// 修改商品
                         mngChangeEntity.setOriginalNum(goods.getGoodsNumber());//原库存数
                         mngChangeEntity.setValidNum(goods.getGoodsNumber() + Integer.parseInt(goodsDto.getGoodsNumber()));//可用数
@@ -1009,7 +983,6 @@ public class GoodsServiceImpl implements GoodsService {
                         goodsEntity.setGoodsNumber(goods.getGoodsNumber()+Integer.parseInt(goodsDto.getGoodsNumber()));
 
                         // TODO 这里改成批量修改 GoodsEntity
-//                        updateGoodsList.add(goodsEntity);
                         goodsDao.update(goodsEntity);
                     }else{
                         mngChangeEntity.setOriginalNum(0);//原库存数
@@ -1022,23 +995,8 @@ public class GoodsServiceImpl implements GoodsService {
                         insertGoodsList.add(goodsEntity);
                         mngChangeEntity.setGoodsId(goodsEntity.getId().intValue());
                     }
-
-
                     // TODO 这里改成批量插入 MngChangeEntity
-
-//                    mngChangeDao.save(mngChangeEntity);
                     insertMngChangeList.add(mngChangeEntity);
-//                    // 保税商品修改各个门店商品价格
-//                    if (!Dict.orderBizType.item_11.getItem().equals(goodsDto.getGoodsBizType())) {
-//                        List<ProductStoreRelaEntity> productStoreRelaEntityList = productStoreRelaDao.queryByGoodsId(goodsDto.getId());
-//                        if (productStoreRelaEntityList != null && productStoreRelaEntityList.size() > 0) {
-//                            for (ProductStoreRelaEntity productStoreRela : productStoreRelaEntityList) {
-//                                productStoreRela.setMarketPrice(goodsEntity.getMarketPrice());
-//                                productStoreRela.setRetailPrice(goodsEntity.getRetailPrice());
-//                                productStoreRelaDao.update(productStoreRela);
-//                            }
-//                        }
-//                    }
                     // 修改产品
                     ProductEntity product = productDao.queryObjectByGoodsIdAndStoreId(String.valueOf(goodsEntity.getId()), "");
 
@@ -1055,15 +1013,14 @@ public class GoodsServiceImpl implements GoodsService {
 
                             // TODO 这里改成批量插入 GoodsSpecificationEntity
                             goodsSpecificationDao.save(goodsSpecification);
-//                            insertSpecificationList.add(goodsSpecification);
-                        }else {
-                            goodsSpecification.setValue(goodsDto.getCiqProdModel());
-                            goodsSpecification.setId(specificationEntity.getId());
-
-                            // TODO 这里改成批量更新 GoodsSpecificationEntity
-//                            goodsSpecificationDao.update(goodsSpecification);
-                            updateSpecificationList.add(goodsSpecification);
                         }
+                            //                           {
+//                            goodsSpecification.setValue(goodsDto.getCiqProdModel());
+                            goodsSpecification.setId(specificationEntity.getId());
+//
+//                            // TODO 这里改成批量更新 GoodsSpecificationEntity
+//                            updateSpecificationList.add(goodsSpecification);
+//                        }
                         if(product == null){
                             product = new ProductEntity();
                             product.setGoodsSn(goodsDto.getGoodsSn());
@@ -1072,38 +1029,18 @@ public class GoodsServiceImpl implements GoodsService {
                             product.setGoodsNumber(goodsEntity.getGoodsNumber());
                             product.setGoodsSpecificationNameValue(goodsSpecification.getValue());
                             product.setGoodsSpecificationIds(goodsSpecification.getId().toString());
-
                             // TODO 这里改成批量插入 ProductEntity
-//                            insertProductList.add(product);
                             productDao.save(product);
                         }else{
                             product.setGoodsSpecificationIds(goodsSpecification.getId().toString());
                             product.setGoodsSpecificationNameValue(goodsSpecification.getValue());
-
                             // TODO 这里改成批量更新 ProductEntity
                             updateProductList.add(product);
-//                            productDao.update(product);
                         }
                     }
                 }
             }
 
-            // 批量插入数据
-//            if(insertProductList != null && insertProductList.size() > 0) {
-//                // 长度限制,如果大于50,就分多次插入
-//                if(insertProductList.size() > 50){
-//                    List<List<ProductEntity>> partition = Lists.partition(insertProductList, 50);
-//                    for (List<ProductEntity> productEntities : partition) {
-//                        productDao.saveBatch(productEntities);
-//                    }
-//                }else{
-//                    productDao.saveBatch(insertProductList);;
-//
-//                }
-//            }
-//            if(insertSpecificationList != null && insertSpecificationList.size() > 0) {
-//                goodsSpecificationDao.saveBatch(insertSpecificationList);
-//            }
             if(insertMngChangeList != null && insertMngChangeList.size() > 0 ){
                 if(insertMngChangeList.size() > 50){
                     List<List<MngChangeEntity>> partition = Lists.partition(insertMngChangeList, 50);
@@ -1115,21 +1052,8 @@ public class GoodsServiceImpl implements GoodsService {
 
                 }
             }
-//            if(insertGoodsList != null && insertGoodsList.size() > 0 ){
-//                goodsDao.saveBatch(insertGoodsList);
-//            }
-//            if(insertSupplierList != null && insertSupplierList.size() > 0 ){
-//                if(insertSupplierList.size() > 50){
-//                    List<List<SupplierEntity>> partition = Lists.partition(insertSupplierList, 50);
-//                    for (List<SupplierEntity> supplierEntities : partition) {
-//                        supplierDao.saveBatch(supplierEntities);
-//                    }
-//                }else{
-//                    supplierDao.saveBatch(insertSupplierList);
-//
-//                }
-//            }
-            // 批量更新数据
+
+            // 批量更新数据mall_product
             if(updateProductList != null && updateProductList.size() > 0 ){
 
                 if(updateProductList.size() > 50){
@@ -1141,27 +1065,18 @@ public class GoodsServiceImpl implements GoodsService {
                     productDao.updateBatch(updateProductList);
                 }
             }
+            // 批量更新数据mall_goods_specification  商品对应规格表值表
             if(updateSpecificationList != null && updateSpecificationList.size() > 0 ){
                 if(updateSpecificationList.size() > 50){
                     List<List<GoodsSpecificationEntity>> partition = Lists.partition(updateSpecificationList, 50);
                     for (List<GoodsSpecificationEntity> goodsSpecificationEntities : partition) {
                         goodsSpecificationDao.updateBatch(goodsSpecificationEntities);
                     }
-                }else{
-                    goodsSpecificationDao.updateBatch(updateSpecificationList);
                 }
-            }
-//            if(updateGoodsList != null && updateGoodsList.size() > 0 ){
-//                if(updateGoodsList.size() > 50){
-//                    List<List<GoodsEntity>> partition = Lists.partition(updateGoodsList, 50);
-//                    for (List<GoodsEntity> goodsEntities : partition) {
-//                        goodsDao.updateBatch(goodsEntities);
-//                    }
-//                }else{
-//                    goodsDao.updateBatch(updateGoodsList);
+//                else{
+//                    goodsSpecificationDao.updateBatch(updateSpecificationList);
 //                }
-//            }
-
+            }
 
 
             ExportExceptionDataEntity exportExceptionDataEntity = new ExportExceptionDataEntity();
@@ -1192,11 +1107,11 @@ public class GoodsServiceImpl implements GoodsService {
                 goodsUtils.save(exportExceptionDataEntity);
                 throw new RRException("导入数据异常,异常信息请在商品管理》》商品导入异常数据中查看检查");
             }
-            if(failHotGoodsSnList != null && failHotGoodsSnList.size() > 0){
-                exportExceptionDataEntity.setExportExceptionData("请检查业务类型为【保税补货或保税展示】的商品,商品编码【"+failHotGoodsSnList+"】的商品不能设置为热销!");
-                goodsUtils.save(exportExceptionDataEntity);
-                throw new RRException("导入数据异常,异常信息请在商品管理》》商品导入异常数据中查看检查");
-            }
+//            if(failHotGoodsSnList != null && failHotGoodsSnList.size() > 0){
+//                exportExceptionDataEntity.setExportExceptionData("请检查业务类型为【保税补货或保税展示】的商品,商品编码【"+failHotGoodsSnList+"】的商品不能设置为热销!");
+//                goodsUtils.save(exportExceptionDataEntity);
+//                throw new RRException("导入数据异常,异常信息请在商品管理》》商品导入异常数据中查看检查");
+//            }
 
             if(failUnitGoodsSnList != null && failUnitGoodsSnList.size() > 0){
                 exportExceptionDataEntity.setExportExceptionData("计算单位信息请在商城配置》计算单位中维护,不存在的商品编码【" + failUnitGoodsSnList + "】");
@@ -1209,39 +1124,8 @@ public class GoodsServiceImpl implements GoodsService {
                 throw new RRException("导入数据异常,异常信息请在商品管理》》商品导入异常数据中查看检查");
             }
 
-
-            // 将插入的商品和更新的商品放到一个list中
-            List<GoodsEntity> goodsEntities = new LinkedList<>();
-            goodsEntities.addAll(insertGoodsList);
-            goodsEntities.addAll(updateGoodsList);
-
-            List<KtoEccsEntity> ktoEccsEntities = new LinkedList<>();
-            if(goodsEntities.size() > 0){
-                for (GoodsEntity goodsEntity : goodsEntities) {
-                    KtoEccsEntity ktoEccsEntity = new KtoEccsEntity();
-                    ktoEccsEntity.setRequestData(JSON.toJSONString(goodsEntity));
-                    ktoEccsEntity.setRequestType("01");
-                    ktoEccsEntity.setSendStatus("00");
-                    ktoEccsEntity.setCreaterSn(user.getUserId()+"");
-                    ktoEccsEntity.setCreateTime(new Date());
-
-                    ktoEccsEntities.add(ktoEccsEntity);
-                }
-
-            }
-            if(ktoEccsEntities.size() > 0){
-                if(ktoEccsEntities.size() > 50){
-                    List<List<KtoEccsEntity>> partition = Lists.partition(ktoEccsEntities, 50);
-                    for (List<KtoEccsEntity> ktoEccs : partition) {
-                        ktoEccsService.saveBatch(ktoEccs);
-                    }
-                }else{
-                    ktoEccsService.saveBatch(ktoEccsEntities);
-                }
-            }
-
         }else{
-            throw new RRException("导入数据为空,或者检查商品编码数据是否为空");
+            throw new RRException("导入数据为出错,请检查数据是否按要求填写");
         }
         return 1;
     }
@@ -1449,13 +1333,13 @@ public class GoodsServiceImpl implements GoodsService {
                         // 海关信息,普通货物可不添加
                         builder.put("goodsRate", "商品税率");
                         builder.put("sku", "SKU");
-                        builder.put("brand", "产品品牌");
+//                        builder.put("brand", "产品品牌");
                         builder.put("unitName", "计量单位");
                         builder.put("oriCntName", "原产国");
                         builder.put("cusGoodsCode", "海关商品编码");
-                        builder.put("ciqProdModel", "国检规格型号");
-                        builder.put("cusDeclEle", "海关申报要素");
-                        builder.put("cusRecCode", "海关备案编号");
+                        //builder.put("ciqProdModel", "国检规格型号");
+//                        builder.put("cusDeclEle", "海关申报要素");
+                        //builder.put("cusRecCode", "海关备案编号");
                     }
                     r = ValidatorUtil.isEmpty(builder.build(), valideDate);
                     if (Integer.valueOf(r.get("code").toString()) != 0) {

+ 5 - 4
kmall-admin/src/main/java/com/kmall/admin/service/impl/OrderServiceImpl.java

@@ -903,7 +903,7 @@ public class OrderServiceImpl implements OrderService {
             Integer stockNum = 0;
             if (null != storeRelaEntity.getStockNum()) {
                 stockNum = storeRelaEntity.getStockNum();
-                resetStoreGoodsStock(stockNum, storeRelaEntity, orderGoodsEntity, sellVolume, changeReason, user);//还原门店库存
+                resetStoreGoodsStock(order.getOrderSn(),stockNum, storeRelaEntity, orderGoodsEntity, sellVolume, changeReason, user);//还原门店库存
             }
         }
     }
@@ -937,11 +937,11 @@ public class OrderServiceImpl implements OrderService {
                 //普通商品不受共享库存影响,直接取门店配置库存
                 //该商品所属第三方商户不是共享库存
                 if (goodsEntity.getIsStockShare().equalsIgnoreCase(Dict.isStockShare.item_0.getItem())) {
-                    resetStoreGoodsStock(stockNum, storeRelaEntity, orderGoodsEntity, sellVolume, changeReason, user);//还原门店库存
+                    resetStoreGoodsStock(order.getOrderSn(),stockNum, storeRelaEntity, orderGoodsEntity, sellVolume, changeReason, user);//还原门店库存
                 } else {
                     //该商品所属第三方商户是共享库存,但商品业务类型不是00保税备货
                     if (!goodsEntity.getGoodsBizType().equalsIgnoreCase(Dict.orderBizType.item_00.getItem())) {
-                        resetStoreGoodsStock(stockNum, storeRelaEntity, orderGoodsEntity, sellVolume, changeReason, user);//还原门店库存
+                        resetStoreGoodsStock(order.getOrderSn(),stockNum, storeRelaEntity, orderGoodsEntity, sellVolume, changeReason, user);//还原门店库存
                     }
                 }
             }
@@ -1060,7 +1060,7 @@ public class OrderServiceImpl implements OrderService {
      * @param changeReason
      * @param user
      */
-    private void resetStoreGoodsStock(Integer stockNum, ProductStoreRelaEntity storeRelaEntity,
+    private void resetStoreGoodsStock(String orderSn,Integer stockNum, ProductStoreRelaEntity storeRelaEntity,
                                       OrderGoodsEntity orderGoodsEntity, BigDecimal sellVolume, String changeReason, SysUserEntity user) {
         storeRelaEntity.setSellVolume(Integer.parseInt(sellVolume.toString())); // 减退库存
         storeRelaEntity.setStockNum(stockNum + orderGoodsEntity.getNumber());//库存数量
@@ -1076,6 +1076,7 @@ public class OrderServiceImpl implements OrderService {
         }
         StoreMngChangeEntity storeMngChangeEntity = new StoreMngChangeEntity();
         storeMngChangeEntity.setChangeType(Dict.changeType.item_0.getItem());
+        storeMngChangeEntity.setOrderSn(orderSn);
         storeMngChangeEntity.setChangeReason(changeReason);
         storeMngChangeEntity.setGoodsId(Integer.parseInt(String.valueOf(storeRelaEntity.getGoodsId())));
         storeMngChangeEntity.setStoreId(Integer.parseInt(String.valueOf(storeRelaEntity.getStoreId())));

+ 1 - 48
kmall-admin/src/main/java/com/kmall/admin/service/impl/ProductStoreRelaServiceImpl.java

@@ -900,15 +900,11 @@ public class ProductStoreRelaServiceImpl implements ProductStoreRelaService {
     public int uploadExcel(List<StoreGoodsDto> storeGoodsDtoList) {
         if (storeGoodsDtoList != null && storeGoodsDtoList.size() > 0) {
 
-
-            SysUserEntity user = ShiroUtils.getUserEntity();
-            List<KtoEccsEntity> ktoEccsEntities = new LinkedList<>();
-
             for (int i = 0; i < storeGoodsDtoList.size(); i++) {
                 StoreGoodsDto storeGoodsDto = storeGoodsDtoList.get(i);
                 ProductStoreRelaEntity storeRelaEntity = new ProductStoreRelaEntity();
                 StoreEntity store = storeDao.queryObjectByName(storeGoodsDto.getStoreName().trim());
-
+                storeRelaEntity.setExitRegionNumber(storeGoodsDto.getExitRegionNumber());
                 storeRelaEntity.setStoreId(store.getId());
                 GoodsEntity goodsEntity = goodsDao.queryObjectBySn(storeGoodsDto.getGoodsSn());
                 if (goodsEntity != null) {
@@ -1044,32 +1040,7 @@ public class ProductStoreRelaServiceImpl implements ProductStoreRelaService {
                     }
                 }
 
-
-
-
                 checkBrand(storeGoodsDto, storeRelaEntity);
-
-
-                /*FreightEntity freightEntity = freightDao.queryFreightByFreightNameAndStoreId(storeGoodsDto.getFreightName(), store.getId());
-                if (freightEntity != null) {
-                    storeRelaEntity.setFreightId(freightEntity.getId());
-                }else{
-                    throw new RRException("商品[" + storeGoodsDto.getGoodsSn() + "]的运费模板输入有误");
-                }*/
-                // 如果底线价大于零售价
-//                if (new BigDecimal(storeGoodsDto.getBottomLinePrice()).compareTo(new BigDecimal(storeGoodsDto.getRetailPrice())) == 1) {
-//                    throw new RRException("商品[" + storeGoodsDto.getGoodsSn() + "]的底线价不可以大于零售价");
-//                }
-                // 查询批次号是否存在
-//                GoodsBatchEntity goodsBatchEntity = goodsBatchDao.queryByBatchSnAndSku(storeGoodsDto.getBatchSn(), goodsEntity.getSku());
-//                if (goodsBatchEntity!=null){
-//                    storeRelaEntity.setBatchSn(goodsBatchEntity.getBatchSn());
-//                    Date batchExpireDate = goodsBatchEntity.getBatchExpireDate();
-//                    SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-//                    storeRelaEntity.setBatchExpireDate(sdf.format(batchExpireDate));
-//                }else{
-////                    throw new RRException("商品[" + storeGoodsDto.getGoodsSn() + "]的批次号不存在");
-//                }
                 storeRelaEntity.setMarketPrice(new BigDecimal(storeGoodsDto.getMarketPrice()));
                 storeRelaEntity.setRetailPrice(new BigDecimal(storeGoodsDto.getRetailPrice()));
                 storeRelaEntity.setBottomLinePrice(storeGoodsDto.getBottomLinePrice());
@@ -1084,26 +1055,8 @@ public class ProductStoreRelaServiceImpl implements ProductStoreRelaService {
                     ((ProductStoreRelaService) AopContext.currentProxy()).update(storeRelaEntity);
                 }
 
-
-                KtoEccsEntity ktoEccsEntity = new KtoEccsEntity();
-                ktoEccsEntity.setRequestData(JSON.toJSONString(storeRelaEntity));
-                ktoEccsEntity.setRequestType("02");
-                ktoEccsEntity.setSendStatus("00");
-                ktoEccsEntity.setCreaterSn(user.getUserId()+"");
-                ktoEccsEntity.setCreateTime(new Date());
-                ktoEccsEntities.add(ktoEccsEntity);
             }
 
-            if(ktoEccsEntities.size() > 0){
-                if(ktoEccsEntities.size() > 50){
-                    List<List<KtoEccsEntity>> partition = Lists.partition(ktoEccsEntities, 50);
-                    for (List<KtoEccsEntity> ktoEccs : partition) {
-                        ktoEccsService.saveBatch(ktoEccs);
-                    }
-                }else{
-                    ktoEccsService.saveBatch(ktoEccsEntities);
-                }
-            }
 
         }else{
             throw new RRException("导入数据为空,或者检查数据是否为空");

+ 3 - 19
kmall-admin/src/main/java/com/kmall/admin/service/impl/vip/Mall2PointsRulesServiceImpl.java

@@ -87,11 +87,11 @@ public class Mall2PointsRulesServiceImpl implements Mall2PointsRulesService {
                 switch (pointsType) {
                     //门店
                     case 0:
-                        mall2RulesDto.setRulesId(storeDao.queryObjectRulesByName(mall2RulesDto.getPointsRulesName().trim()));
+                        mall2RulesDto.setRulesId(storeDao.queryObjectRulesByName(mall2RulesDto.getPointsRulesName().trim())+"");
                         break;
                     //商品类别
                     case 1:
-                        mall2RulesDto.setRulesId(categoryDao.queryObjectCategoryByName(mall2RulesDto.getPointsRulesName().trim()));
+                        mall2RulesDto.setRulesId(categoryDao.queryObjectCategoryByName(mall2RulesDto.getPointsRulesName().trim())+"");
                         break;
                     //商品
                     case 2:
@@ -137,23 +137,7 @@ public class Mall2PointsRulesServiceImpl implements Mall2PointsRulesService {
      */
     @Override
     public void deleteDetil(Integer[] mprIds,Long typeId) {
-        Integer pointsType = mall2PointsRulesDao.queryRulesDetilId(typeId);
-        switch (pointsType) {
-            //门店
-            case 0:
-                storeDao.updateStoreRulesDetil(mprIds);
-                break;
-            //商品类别
-            case 1:
-                categoryDao.updateCategoryRulesDetil(mprIds);
-                break;
-            //商品
-            case 2:
-                productStoreRelaDao.updateProductStoreRulesDetil(mprIds);
-                break;
-            default:
-                break;
-        }
+        mall2PointsRulesDao.deleteRulesDetil(mprIds);
     }
 
     /**

+ 15 - 19
kmall-admin/src/main/resources/XmlTemplate/GoodsDtoList.xml

@@ -7,34 +7,30 @@
             <section startRow="1" endRow="1">
                 <mapping row="1" col="0">GoodsDto.goodsSn</mapping>
                 <mapping row="1" col="1">GoodsDto.thirdPartyMerchCode</mapping>
-                <!--<mapping row="1" col="2">GoodsDto.categoryName</mapping>-->
                 <mapping row="1" col="2">GoodsDto.goodsBizType</mapping>
                 <mapping row="1" col="3">GoodsDto.name</mapping>
                 <mapping row="1" col="4">GoodsDto.prodBarcode</mapping>
                 <mapping row="1" col="5">GoodsDto.supplierName</mapping>
                 <mapping row="1" col="6">GoodsDto.supplierFlag</mapping>
                 <mapping row="1" col="7">GoodsDto.sku</mapping>
-                <!--<mapping row="1" col="8">GoodsDto.brandName</mapping>-->
-                <!--<mapping row="1" col="7">GoodsDto.defaultFreight</mapping>-->
                 <mapping row="1" col="8">GoodsDto.isOnSaleStr</mapping>
                 <mapping row="1" col="9">GoodsDto.goodsUnit</mapping>
                 <mapping row="1" col="10">GoodsDto.isHotStr</mapping>
-                <mapping row="1" col="11">GoodsDto.cusGoodsCode</mapping>
-                <mapping row="1" col="12">GoodsDto.ciqProdModel</mapping>
-                <mapping row="1" col="13">GoodsDto.goodsRate</mapping>
-                <!--<mapping row="1" col="16">GoodsDto.marketPrice</mapping>-->
-                <!--<mapping row="1" col="14">GoodsDto.retailPrice</mapping>-->
-                <mapping row="1" col="14">GoodsDto.brand</mapping>
-                <mapping row="1" col="15">GoodsDto.uniqueIdentifier</mapping>
-                <mapping row="1" col="16">GoodsDto.unitName</mapping>
-                <mapping row="1" col="17">GoodsDto.oriCntName</mapping>
-                <mapping row="1" col="18">GoodsDto.cusDeclEle</mapping>
-                <mapping row="1" col="19">GoodsDto.cusRecCode</mapping>
-                <mapping row="1" col="20">GoodsDto.goodsNumber</mapping>
-                <mapping row="1" col="21">GoodsDto.plu</mapping>
-                <mapping row="1" col="22">GoodsDto.mychemId</mapping>
-                <mapping row="1" col="23">GoodsDto.firstLevel</mapping>
-                <mapping row="1" col="24">GoodsDto.secondLevel</mapping>
+                <mapping row="1" col="11">GoodsDto.goodsRate</mapping>
+                <mapping row="1" col="12">GoodsDto.brand</mapping>
+                <mapping row="1" col="13">GoodsDto.uniqueIdentifier</mapping>
+                <mapping row="1" col="14">GoodsDto.unitName</mapping>
+                <mapping row="1" col="15">GoodsDto.oriCntName</mapping>
+                <mapping row="1" col="16">GoodsDto.cusDeclEle</mapping>
+                <mapping row="1" col="17">GoodsDto.cusRecCode</mapping>
+                <mapping row="1" col="18">GoodsDto.goodsNumber</mapping>
+                <mapping row="1" col="19">GoodsDto.firstLevel</mapping>
+                <mapping row="1" col="20">GoodsDto.secondLevel</mapping>
+                <mapping row="1" col="21">GoodsDto.warehouseSn</mapping>
+                <mapping row="1" col="22">GoodsDto.consignorSn</mapping>
+                <mapping row="1" col="23">GoodsDto.warehousSysGoodId</mapping>
+                <mapping row="1" col="24">GoodsDto.inventoryType</mapping>
+                <mapping row="1" col="25">GoodsDto.defectiveProductsGrade</mapping>
             </section>
             <loopbreakcondition>
                 <rowcheck offset="0">

+ 21 - 3
kmall-admin/src/main/resources/mybatis/mapper/GoodsDao.xml

@@ -553,7 +553,13 @@
 			`legal_unit2_qty`,
 			`cosm_threshold_value`,
 			`to_be_restored`,
-			`tstm`)
+			`tstm`,
+			warehouse_sn,
+			consignor_sn,
+			warehous_sys_good_id,
+			inventory_type,
+			defective_products_grade
+			)
 		values(
 			#{merchSn},
             #{thirdPartyMerchCode},
@@ -618,7 +624,13 @@
 			#{legalUnit2Qty},
 			#{cosmThresholdValue},
 			0,
-			#{tstm})
+			#{tstm},
+			#{warehouseSn},
+			#{consignorSn},
+			#{warehousSysGoodId},
+			#{inventoryType},
+			#{defectiveProductsGrade}
+			)
     </insert>
 
     <update id="update" parameterType="com.kmall.admin.entity.GoodsEntity">
@@ -688,7 +700,13 @@
             <if test="legalUnit1Qty != null">`legal_unit1_qty` = #{legalUnit1Qty},</if>
             <if test="legalUnit2Qty != null">`legal_unit2_qty` = #{legalUnit2Qty},</if>
             <if test="cosmThresholdValue != null">`cosm_threshold_value` = #{cosmThresholdValue},</if>
-            <if test="toBeRestored != null">`to_be_restored` = #{toBeRestored}</if>
+            <if test="toBeRestored != null">`to_be_restored` = #{toBeRestored},</if>
+
+            <if test="warehouseSn != null">`warehouse_sn` = #{warehouseSn},</if>
+            <if test="consignorSn != null">`consignor_sn` = #{consignorSn},</if>
+            <if test="warehousSysGoodId != null">`warehous_sys_good_id` = #{warehousSysGoodId},</if>
+            <if test="inventoryType != null">`inventory_type` = #{inventoryType},</if>
+            <if test="defectiveProductsGrade != null">`defective_products_grade` = #{defectiveProductsGrade}</if>
         </set>
         where id = #{id}
     </update>

+ 4 - 5
kmall-admin/src/main/resources/mybatis/mapper/GoodsSpecificationDao.xml

@@ -145,13 +145,12 @@
 
     <update id="updateBatch" parameterType="java.util.List">
         <foreach collection="list" item="item" index="index" open="" close="" separator=";">
-
             update mall_goods_specification
             <set>
-                <if test="item.goodsId != null">`goods_id` = #{item.goodsId},</if>
-                <if test="item.specificationId != null">`specification_id` = #{item.specificationId},</if>
-                <if test="item.value != null">`value` = #{item.value},</if>
-                <if test="item.picUrl != null">`pic_url` = #{item.picUrl}</if>
+                `goods_id` = #{item.goodsId},
+                `specification_id` = #{item.specificationId},
+                `value` = #{item.value},
+                 pic_url = #{item.picUrl}
             </set>
             where id = #{item.id}
         </foreach>

+ 1 - 1
kmall-admin/src/main/resources/mybatis/mapper/PickUpCodeDao.xml

@@ -156,7 +156,7 @@
 
 
 	<update id="updateHkNoticeMsgPickUpCode" parameterType="java.util.List">
-		update mall_pick_up_code
+		update mall_order
 		<trim prefix="set" suffixOverrides=",">
 
 			<trim prefix="pick_up_code_status =case" suffix="end,">

+ 12 - 6
kmall-admin/src/main/resources/mybatis/mapper/ProductStoreRelaDao.xml

@@ -385,7 +385,7 @@
 
     <insert id="save" parameterType="com.kmall.admin.entity.ProductStoreRelaEntity" useGeneratedKeys="true"
             keyProperty="id">
-		insert into mall_product_store_rela(
+		    insert into mall_product_store_rela(
 			`store_id`,
 			`merch_sn`,
 			`product_id`,
@@ -442,7 +442,8 @@
         <if test="bottomLinePrice != null" >
             bottom_line_price,
         </if>
-            to_be_restored
+            to_be_restored,
+            exit_region_number
         )
 		values(
             #{storeId},
@@ -501,7 +502,8 @@
         <if test="bottomLinePrice != null" >
             #{bottomLinePrice,jdbcType=VARCHAR},
         </if>
-        0
+        0,
+        #{exitRegionNumber}
         )
 	</insert>
 
@@ -568,7 +570,10 @@
                 last_sale_time = #{lastSaleTime,jdbcType=TIMESTAMP},
             </if>
             <if test="toBeRestored != null" >
-                to_be_restored = #{toBeRestored,jdbcType=VARCHAR}
+                to_be_restored = #{toBeRestored,jdbcType=VARCHAR},
+            </if>
+            <if test="exitRegionNumber != null" >
+                exit_region_number = #{exitRegionNumber}
             </if>
         </set>
         where id = #{id}
@@ -823,6 +828,7 @@
         b.goods_number goodsNumber,
         b.third_party_merch_code thirdPartyMerchCode,
         mb.is_stock_share isStockShare,
+        a.exit_region_number as exitRegionNumber,
         supplier_third_id, a.hot_sort_num
         from mall_product_store_rela a
         left join mall_goods b on a.goods_id = b.id
@@ -944,9 +950,9 @@
         </foreach>
     </update>
 
-    <select id="queryproductStoreByName" resultType="java.lang.Long">
+    <select id="queryproductStoreByName" resultType="java.lang.String">
         select
-            a.id
+            a.sku
         from mall_product_store_rela a
         where a.sku = #{sku} and a.store_id= #{storeId}
     </select>

+ 8 - 0
kmall-admin/src/main/resources/mybatis/mapper/vip/Mall2PointsRulesDao.xml

@@ -89,6 +89,7 @@
 		values(
 			#{mprId},
 			#{pointsType},
+			#{ratio},
 			#{pointsBeginTime},
 			#{pointsEndTime},
 			#{isValid},
@@ -195,4 +196,11 @@
 		where father_id = #{id}
 	</select>
 
+	<delete id="deleteRulesDetil">
+		delete from mall2_points_rules_detil where father_id in
+		<foreach item="mprId" collection="array" open="(" separator="," close=")">
+			#{mprId}
+		</foreach>
+	</delete>
+
 </mapper>

+ 104 - 104
kmall-admin/src/main/webapp/WEB-INF/page/shop/goods.html

@@ -85,9 +85,9 @@
                 <i-col span="3">
                     <i-input v-model="q.name" @on-enter="query" placeholder="名称"/>
                 </i-col>
-                <i-col span="3">
-                    <i-input v-model="q.englishName" @on-enter="query" placeholder="英文名称"/>
-                </i-col>
+<!--                <i-col span="3">-->
+<!--                    <i-input v-model="q.englishName" @on-enter="query" placeholder="英文名称"/>-->
+<!--                </i-col>-->
 
                 <!--<i-col span="3">-->
                 <!--<i-input v-model="q.plu" @on-enter="query" placeholder="PLU"/>-->
@@ -182,19 +182,19 @@
                         <i-button type="ghost" icon="ios-cloud-upload-outline">商品图片批量导入</i-button>
                     </Upload>
                 </i-col>
-                <i-col style="display: inline-grid;">
-                    <Upload :show-upload-list="false" :on-success="uploadExcelSuccess" :on-error="uploadExcelError" :on-format-error="uploadExcelFormatError"
-                            :on-progress="uploadExcelProgress"
-                            :format="['xls','xlsx','zip']"
-                            action="../goods/generalGoodsImgUploadByZip">
-                        <i-button type="ghost" icon="ios-cloud-upload-outline">商品图片(文件夹)批量导入</i-button>
-                    </Upload>
-                </i-col>
+<!--                <i-col style="display: inline-grid;">-->
+<!--                    <Upload :show-upload-list="false" :on-success="uploadExcelSuccess" :on-error="uploadExcelError" :on-format-error="uploadExcelFormatError"-->
+<!--                            :on-progress="uploadExcelProgress"-->
+<!--                            :format="['xls','xlsx','zip']"-->
+<!--                            action="../goods/generalGoodsImgUploadByZip">-->
+<!--                        <i-button type="ghost" icon="ios-cloud-upload-outline">商品图片(文件夹)批量导入</i-button>-->
+<!--                    </Upload>-->
+<!--                </i-col>-->
                 #end
                 #if($shiro.hasPermission("goods:down"))
                 &nbsp;&nbsp;&nbsp;&nbsp;
                 <a href="../statics/file/goods_export_yyyy_mm_dd_v1.0.0.xls">商品模板下载</a>&nbsp;&nbsp;&nbsp;&nbsp;
-<!--                <a href="../statics/file/general_goods_export_yyyy_mm_dd_v1.0.0.xls">普货商品模板下载</a>-->
+<!--                <a href="../statics/file/goods_img.zip">商品图片批量导入示例下载</a>-->
                 #end
             </div>
         </Row>
@@ -258,12 +258,12 @@
                     <Form-item label="名称" prop="name">
                         <i-input v-model="goods.name" placeholder="名称"/>
                     </Form-item>
-                    <Form-item label="英文名称" prop="englishName">
-                        <i-input v-model="goods.englishName" placeholder="英文名称"/>
-                    </Form-item>
-                    <Form-item label="PLU" prop="plu">
-                        <i-input v-model="goods.plu" placeholder="PLU"/>
-                    </Form-item>
+<!--                    <Form-item label="英文名称" prop="englishName">-->
+<!--                        <i-input v-model="goods.englishName" placeholder="英文名称"/>-->
+<!--                    </Form-item>-->
+<!--                    <Form-item label="PLU" prop="plu">-->
+<!--                        <i-input v-model="goods.plu" placeholder="PLU"/>-->
+<!--                    </Form-item>-->
                     <Form-item label="商品单位" prop="goodsUnit">
                         <i-input v-model="goods.goodsUnit" placeholder="商品单位" style="width: 268px;"/>
                     </Form-item>
@@ -302,12 +302,12 @@
                     <!--<Form-item label="商品总库存" prop="goodsNumber" v-show="isStockShare">-->
                         <!--<Input-number :min="1" :step="1" v-model="goods.goodsNumber" placeholder="商品总库存" style="width: 268px;"/>-->
                     <!--</Form-item>-->
-                    <Form-item label="日常价" prop="dailyPrice">
-                        <Input-number :min="0.01" :step="0.01" v-model="goods.dailyPrice" placeholder="日常价" style="width: 268px;"/>
-                    </Form-item>
-                    <Form-item label="成本价" prop="costPrice">
-                        <Input-number :min="0.01" :step="0.01" v-model="goods.costPrice" placeholder="成本价" style="width: 268px;"/>
-                    </Form-item>
+<!--                    <Form-item label="日常价" prop="dailyPrice">-->
+<!--                        <Input-number :min="0.01" :step="0.01" v-model="goods.dailyPrice" placeholder="日常价" style="width: 268px;"/>-->
+<!--                    </Form-item>-->
+<!--                    <Form-item label="成本价" prop="costPrice">-->
+<!--                        <Input-number :min="0.01" :step="0.01" v-model="goods.costPrice" placeholder="成本价" style="width: 268px;"/>-->
+<!--                    </Form-item>-->
                     <Form-item label="商品总库存" prop="goodsNumber">
                         <Input-number :min="0" :step="1" v-model="goods.goodsNumber" placeholder="商品总库存" style="width: 268px;"/>
                     </Form-item>
@@ -370,34 +370,34 @@
                             <span style="margin-left: 140px;color: red;font-size: 12px;">* 尺寸建议200x200(正方形模式)像素以内,大小100k以内</span>
                         </i-col>
                     </Row>
-                <Row>
-                    <i-col span="16">
-                        <Form-item label="上传视频" prop="listPicUrl">
-                            <i-input v-model="goods.videoUrl" placeholder="主视频" readonly/>
-                        </Form-item>
-                    </i-col>
-                    <i-col span="4">
-                        <Form-item :label-width="1">
-                            <Upload style="width: 300px;" action="../sys/oss/upload" :format="['mp4']"
-                                    max-size="1024"
-                                    :on-success="handleSuccessListVideoUrl" :on-format-error="handleVideoFormatError"
-                                    :show-upload-list="false"
-                                    :on-exceeded-size="handleVideoMaxSize">
-                                <i-button icon="ios-cloud-upload-outline">本地上传</i-button>
-                            </Upload>
-                        </Form-item>
-                    </i-col>
-                    <i-col span="4">
-                        <Form-item :label-width="1">
-                            <i-button icon="eye" @click="eyeImageListVideoUrl">预览视频</i-button>
-                        </Form-item>
-                    </i-col>
-                </Row>
-                <Row>
-                    <i-col span="16" style="margin-top: -30px;">
-                            <span style="margin-left: 140px;color: red;font-size: 12px;">* 视频不能超过1M,视频时限20秒内,支持mp4视频格式</span>
-                    </i-col>
-                </Row>
+<!--                <Row>-->
+<!--                    <i-col span="16">-->
+<!--                        <Form-item label="上传视频" prop="listPicUrl">-->
+<!--                            <i-input v-model="goods.videoUrl" placeholder="主视频" readonly/>-->
+<!--                        </Form-item>-->
+<!--                    </i-col>-->
+<!--                    <i-col span="4">-->
+<!--                        <Form-item :label-width="1">-->
+<!--                            <Upload style="width: 300px;" action="../sys/oss/upload" :format="['mp4']"-->
+<!--                                    max-size="1024"-->
+<!--                                    :on-success="handleSuccessListVideoUrl" :on-format-error="handleVideoFormatError"-->
+<!--                                    :show-upload-list="false"-->
+<!--                                    :on-exceeded-size="handleVideoMaxSize">-->
+<!--                                <i-button icon="ios-cloud-upload-outline">本地上传</i-button>-->
+<!--                            </Upload>-->
+<!--                        </Form-item>-->
+<!--                    </i-col>-->
+<!--                    <i-col span="4">-->
+<!--                        <Form-item :label-width="1">-->
+<!--                            <i-button icon="eye" @click="eyeImageListVideoUrl">预览视频</i-button>-->
+<!--                        </Form-item>-->
+<!--                    </i-col>-->
+<!--                </Row>-->
+<!--                <Row>-->
+<!--                    <i-col span="16" style="margin-top: -30px;">-->
+<!--                            <span style="margin-left: 140px;color: red;font-size: 12px;">* 视频不能超过1M,视频时限20秒内,支持mp4视频格式</span>-->
+<!--                    </i-col>-->
+<!--                </Row>-->
                 <!--</i-form>-->
             </Tab-Pane>
             <Tab-Pane label="海关信息" name="name2">
@@ -412,30 +412,30 @@
                         </i-option>
                     </i-select>
                 </Form-item>
-                    <Form-item label="海关备案编号" prop="cusRecCode">
-                        <i-input v-model="goods.cusRecCode" placeholder="海关备案编号"/>
-                    </Form-item>
+<!--                    <Form-item label="海关备案编号" prop="cusRecCode">-->
+<!--                        <i-input v-model="goods.cusRecCode" placeholder="海关备案编号"/>-->
+<!--                    </Form-item>-->
                     <Form-item label="计量单位" prop="unitCode">
                         <i-select v-model="goods.unitCode" filterable placeholder="计量单位"
                                   label-in-value>
                             <i-option v-for="cusUnitCode in cusUnitCodeList" :value="cusUnitCode.code" :key="cusUnitCode.sn">{{cusUnitCode.name}}</i-option>
                         </i-select>
                     </Form-item>
-                    <Form-item label="海关商品编码" prop="cusGoodsCode">
-                        <i-input v-model="goods.cusGoodsCode" placeholder="海关商品编码"/>
-                    </Form-item>
-                    <Form-item label="国检规格型号" prop="ciqProdModel" >
-                        <i-input v-model="goods.ciqProdModel" placeholder="国检规格型号"/>
-                    </Form-item>
+<!--                    <Form-item label="海关商品编码" prop="cusGoodsCode">-->
+<!--                        <i-input v-model="goods.cusGoodsCode" placeholder="海关商品编码"/>-->
+<!--                    </Form-item>-->
+<!--                    <Form-item label="国检规格型号" prop="ciqProdModel" >-->
+<!--                        <i-input v-model="goods.ciqProdModel" placeholder="国检规格型号"/>-->
+<!--                    </Form-item>-->
                     <Form-item label="原产国" prop="oriCntCode">
                         <i-select v-model="goods.oriCntCode" filterable placeholder="原产国"
                                   label-in-value>
                             <i-option v-for="cusNationCode in cusNationCodeList" :value="cusNationCode.code" :key="cusNationCode.sn">{{cusNationCode.name}}</i-option>
                         </i-select>
                     </Form-item>
-                    <Form-item label="海关申报要素" prop="cusDeclEle">
-                        <i-input v-model="goods.cusDeclEle" placeholder="海关申报要素"/>
-                    </Form-item>
+<!--                    <Form-item label="海关申报要素" prop="cusDeclEle">-->
+<!--                        <i-input v-model="goods.cusDeclEle" placeholder="海关申报要素"/>-->
+<!--                    </Form-item>-->
                 <Form-item label="毛重,kg" prop="grossWeight">
                     <Input-number :min="0" :step="0" v-model="goods.grossWeight" placeholder="毛重" style="width: 268px;"/>
                 </Form-item>
@@ -480,46 +480,46 @@
                     </table>
                 &lt;!&ndash;</i-form>&ndash;&gt;
             </Tab-Pane>-->
-            <Tab-Pane label="详细描述" name="name4">
-                <template>
-                    <div class="upload-list" v-for="item in uploadList">
-                        <template v-if="item.status === 'finished'">
-                            <img :src="item.imgUrl"/>
-                            <div class="upload-list-cover">
-                                <Icon type="ios-eye-outline" @click.native="handleView(item.imgUrl)"></Icon>
-                                <Icon type="ios-trash-outline" @click.native="handleRemove(item)"></Icon>
-                            </div>
-                        </template>
-                        <template v-else>
-                            <Progress v-if="item.showProgress" :percent="item.percentage" hide-info></Progress>
-                        </template>
-                    </div>
-                    <Upload
-                            ref="upload"
-                            :show-upload-list="false"
-                            :default-file-list="uploadList"
-                            :on-success="handleSuccess"
-                            :format="['jpg','jpeg','png']"
-                            :max-size="100"
-                            :on-format-error="handleFormatError"
-                            :on-exceeded-size="handleMaxSize"
-                            :before-upload="handleBeforeUpload"
-                            multiple
-                            type="drag"
-                            action="../sys/oss/upload"
-                            style="display: inline-block;width:58px;">
-                        <div style="width: 58px;height:58px;line-height: 58px;">
-                            <Icon type="camera" size="20"></Icon>
-                        </div>
-                    </Upload>
-                    <Modal title="查看图片" v-model="visible">
-                        <img :src="imgName" v-if="visible" style="width: 100%"/>
-                    </Modal>
-                    <div style="display: inline-block;">
-                        <span style="color: red;font-size: 20px;display: block;">(仅用于线上业务商品详情录入)</span>
-                        <span style="color: red;font-size: 12px;">* 商品详情轮播图,尺寸建议750x750(正方形模式)像素以内,大小100k以内</span>
-                    </div>
-                </template>
+            <Tab-Pane label="商品详细描述" name="name4" >
+<!--                <template>-->
+<!--                    <div class="upload-list" v-for="item in uploadList">-->
+<!--                        <template v-if="item.status === 'finished'">-->
+<!--                            <img :src="item.imgUrl"/>-->
+<!--                            <div class="upload-list-cover">-->
+<!--                                <Icon type="ios-eye-outline" @click.native="handleView(item.imgUrl)"></Icon>-->
+<!--                                <Icon type="ios-trash-outline" @click.native="handleRemove(item)"></Icon>-->
+<!--                            </div>-->
+<!--                        </template>-->
+<!--                        <template v-else>-->
+<!--                            <Progress v-if="item.showProgress" :percent="item.percentage" hide-info></Progress>-->
+<!--                        </template>-->
+<!--                    </div>-->
+<!--                    <Upload-->
+<!--                            ref="upload"-->
+<!--                            :show-upload-list="false"-->
+<!--                            :default-file-list="uploadList"-->
+<!--                            :on-success="handleSuccess"-->
+<!--                            :format="['jpg','jpeg','png']"-->
+<!--                            :max-size="100"-->
+<!--                            :on-format-error="handleFormatError"-->
+<!--                            :on-exceeded-size="handleMaxSize"-->
+<!--                            :before-upload="handleBeforeUpload"-->
+<!--                            multiple-->
+<!--                            type="drag"-->
+<!--                            action="../sys/oss/upload"-->
+<!--                            style="display: inline-block;width:58px;">-->
+<!--                        <div style="width: 58px;height:58px;line-height: 58px;">-->
+<!--                            <Icon type="camera" size="20"></Icon>-->
+<!--                        </div>-->
+<!--                    </Upload>-->
+<!--                    <Modal title="查看图片" v-model="visible">-->
+<!--                        <img :src="imgName" v-if="visible" style="width: 100%"/>-->
+<!--                    </Modal>-->
+<!--                    <div style="display: inline-block;">-->
+<!--                        <span style="color: red;font-size: 20px;display: block;">(仅用于线上业务商品详情录入)</span>-->
+<!--                        <span style="color: red;font-size: 12px;">* 商品详情轮播图,尺寸建议750x750(正方形模式)像素以内,大小100k以内</span>-->
+<!--                    </div>-->
+<!--                </template>-->
                 <div id="goodsDesc"></div>
             </Tab-Pane>
             <!--<Tab-Pane label="参数" name="name5">-->

+ 44 - 40
kmall-admin/src/main/webapp/WEB-INF/page/shop/storeProductStock.html

@@ -119,12 +119,12 @@
                 #if($shiro.hasPermission("productstorerela:update"))
                 <i-button type="warning" @click="update" v-show="!isSupplierShowByThirdSn||roleType"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</i-button>
                 #end
-                #if($shiro.hasPermission("productstorerela:save"))
-                <i-button type="info" @click="addSupplierGoods" v-show="isSupplierShowByThirdSn"><i class="fa fa-plus"></i>&nbsp;新增供货商商品</i-button>
-                #end
-                #if($shiro.hasPermission("productstorerela:update"))
-                <i-button type="warning" @click="updateSupplierGoods" v-show="isSupplierShowByThirdSn"><i class="fa fa-pencil-square-o"></i>&nbsp;修改供货商商品</i-button>
-                #end
+<!--                #if($shiro.hasPermission("productstorerela:save"))-->
+<!--                <i-button type="info" @click="addSupplierGoods" v-show="isSupplierShowByThirdSn"><i class="fa fa-plus"></i>&nbsp;新增供货商商品</i-button>-->
+<!--                #end-->
+<!--                #if($shiro.hasPermission("productstorerela:update"))-->
+<!--                <i-button type="warning" @click="updateSupplierGoods" v-show="isSupplierShowByThirdSn"><i class="fa fa-pencil-square-o"></i>&nbsp;修改供货商商品</i-button>-->
+<!--                #end-->
                 #if($shiro.hasPermission("productstorerela:delete"))
                 <i-button type="error" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</i-button>
                 #end
@@ -138,14 +138,14 @@
                     </Upload>
                 </i-col>
                 #end
-                <i-col style="display: inline-grid;">
-                    <Upload :show-upload-list="false" :on-success="uploadExcelSuccess" :on-format-error="uploadExcelFormatError"
-                            :on-progress="uploadExcelProgress"
-                            :format="['xls','xlsx']"
-                            action="../productstorerela/productStoreRelaUploadByCover">
-                        <i-button type="ghost" icon="ios-cloud-upload-outline">门店商品导入(修改库存)</i-button>
-                    </Upload>
-                </i-col>
+<!--                <i-col style="display: inline-grid;">-->
+<!--                    <Upload :show-upload-list="false" :on-success="uploadExcelSuccess" :on-format-error="uploadExcelFormatError"-->
+<!--                            :on-progress="uploadExcelProgress"-->
+<!--                            :format="['xls','xlsx']"-->
+<!--                            action="../productstorerela/productStoreRelaUploadByCover">-->
+<!--                        <i-button type="ghost" icon="ios-cloud-upload-outline">门店商品导入(修改库存)</i-button>-->
+<!--                    </Upload>-->
+<!--                </i-col>-->
                 #if($shiro.hasPermission("productstorerela:down"))
                 &nbsp;&nbsp;&nbsp;<a href="../statics/file/store_goods_export_yyyy_mm_dd_v1.0.0.xls">门店商品模板下载</a>&nbsp;&nbsp;&nbsp;&nbsp;
                 #end
@@ -244,36 +244,40 @@
                 <Input-number :min="0.01" :step="0.01" v-model="productStoreRela.bottomLinePrice" placeholder="底线价"
                               style="width: 268px;"/>
             </Form-item>
+            <Form-item v-if="showInput" label="出区数" prop="exitRegionNumber">
+                <i-input v-model="productStoreRela.exitRegionNumber" placeholder="出区数"
+                         style="width: 268px;"/>
+            </Form-item>
             <Form-item v-if="showInput&&isHotShow" label="热销商品排序" prop="hotSortNum">
                 <i-input v-model="productStoreRela.hotSortNum" placeholder="热销商品排序"
                          style="width: 268px;"/>
             </Form-item>
-            <div v-if="showInput" v-for="(item,index) in attributeEntityList" v-show="item.isDelete==0" style="margin-left: 16px;">
-                <div class="row">
-                    <div class="col-md-3">
-                        <label class="ivu-form-item-label">属性:</label>
-                        <div class="col-md-7 input-icon right">
-                            <i-select v-model="item.attributeId" filterable>
-                                <i-option v-for="attribute in attributes" :value="attribute.id"
-                                          :key="attribute.id">{{attribute.name}}
-                                </i-option>
-                            </i-select>
-                        </div>
-                    </div>
-                    <div class="col-md-3">
-                        <label class="ivu-form-item-label">属性值:</label>
-                        <div class="col-md-7 input-icon right">
-                            <i-input type="text" v-model="item.value"/>
-                        </div>
-                    </div>
-                    <button v-if="index == 0" class="btn btn-primary btn-sm" type="button" @click="addAttrRow">
-                        <i class="fa fa-plus"></i>
-                    </button>
-                    <button class="btn red btn-sm" type="button" @click="delAttrRow(index)">
-                        <i class="fa fa-trash-o"></i>
-                    </button>
-                </div>
-            </div>
+<!--            <div v-if="showInput" v-for="(item,index) in attributeEntityList" v-show="item.isDelete==0" style="margin-left: 16px;">-->
+<!--                <div class="row">-->
+<!--                    <div class="col-md-3">-->
+<!--                        <label class="ivu-form-item-label">属性:</label>-->
+<!--                        <div class="col-md-7 input-icon right">-->
+<!--                            <i-select v-model="item.attributeId" filterable>-->
+<!--                                <i-option v-for="attribute in attributes" :value="attribute.id"-->
+<!--                                          :key="attribute.id">{{attribute.name}}-->
+<!--                                </i-option>-->
+<!--                            </i-select>-->
+<!--                        </div>-->
+<!--                    </div>-->
+<!--                    <div class="col-md-3">-->
+<!--                        <label class="ivu-form-item-label">属性值:</label>-->
+<!--                        <div class="col-md-7 input-icon right">-->
+<!--                            <i-input type="text" v-model="item.value"/>-->
+<!--                        </div>-->
+<!--                    </div>-->
+<!--                    <button v-if="index == 0" class="btn btn-primary btn-sm" type="button" @click="addAttrRow">-->
+<!--                        <i class="fa fa-plus"></i>-->
+<!--                    </button>-->
+<!--                    <button class="btn red btn-sm" type="button" @click="delAttrRow(index)">-->
+<!--                        <i class="fa fa-trash-o"></i>-->
+<!--                    </button>-->
+<!--                </div>-->
+<!--            </div>-->
         </i-form>
         <div style="padding-left: 20px;padding-top: 20px">
             <i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button>

+ 8 - 8
kmall-admin/src/main/webapp/WEB-INF/page/vip/mall2pointsrules.html

@@ -41,20 +41,20 @@
                     </i-option>
                 </i-select>
             </Form-item>
-            <Form-item label="积分金额" prop="pointsRulesMoney">
-                <i-input v-model="mall2PointsRules.pointsRulesMoney" placeholder="积分金额"/>
-            </Form-item>
-            <Form-item label="对应积分数" prop="pointsRulesNum">
-                <i-input v-model="mall2PointsRules.pointsRulesNum" placeholder="对应积分数"/>
-            </Form-item>
+<!--            <Form-item label="积分金额" prop="pointsRulesMoney">-->
+<!--                <i-input v-model="mall2PointsRules.pointsRulesMoney" placeholder="积分金额"/>-->
+<!--            </Form-item>-->
+<!--            <Form-item label="对应积分数" prop="pointsRulesNum">-->
+<!--                <i-input v-model="mall2PointsRules.pointsRulesNum" placeholder="对应积分数"/>-->
+<!--            </Form-item>-->
             <Form-item label="适用开始时间" prop="pointsBeginTime">
                 <i-input type="date"  v-model="mall2PointsRules.pointsBeginTime" placeholder="积分规则适用开始时间"/>
             </Form-item>
             <Form-item label="适用结束时间" prop="pointsEndTime">
                 <i-input type="date"  v-model="mall2PointsRules.pointsEndTime" placeholder="积分规则适用结束时间"/>
             </Form-item>
-            <Form-item label="积分比例" prop="pointsProportion">
-                <i-input v-model="mall2PointsRules.pointsProportion" placeholder="积分比例" />
+            <Form-item label="积分比例" prop="ratio">
+                <i-input v-model="mall2PointsRules.ratio" placeholder="积分比例" />
             </Form-item>
             <Form-item label="是否有效" prop="isValid">
                 <i-select v-model="mall2PointsRules.isValid" placeholder="是否有效"

+ 2 - 2
kmall-admin/src/main/webapp/js/mk/mall2RulesDetil.js

@@ -31,10 +31,10 @@ $(function () {
 					if (value === '0' || value === 0) {
 						return '门店';
 					}
-					if (value == '1') {
+					if (value == '1' || value === 1) {
 						return '商品类别';
 					}
-					if (value == '2') {
+					if (value == '2' || value === 2) {
 						return '门店商品';
 					}
 

+ 7 - 7
kmall-admin/src/main/webapp/js/shop/goods.js

@@ -6,12 +6,12 @@ $(function () {
             // {label: 'ID', name: 'id', index: 'id', width: 60, key: true},
             {label: '商户名称', name: 'merchName', index: 'merchName', width: 100, align: 'center'},
             {label: '第三方商户编号', name: 'thirdPartyMerchCode', index: 'thirdPartyMerchCode', width: 160, align: 'center'},
-            {label: '海关商品编码', name: 'hsCode', index: 'hs_code', width: 180, align: 'center'},
-            {label: '料件号', name: 'sku', index: 'sku', width: 180, align: 'center'},
+            // {label: '海关商品编码', name: 'cusGoodsCode', index: 'cus_goods_code', width: 180, align: 'center'},
+            // {label: '料件号', name: 'sku', index: 'sku', width: 180, align: 'center'},
             {label: 'sku', name: 'sku', index: 'sku', width: 180, align: 'center'},
-            {label: 'PLU', name: 'plu', index: 'plu', width: 180, align: 'center'},
-            {label: 'mychemId', name: 'mychemId', index: 'mychemId', width: 180, align: 'center'},
-            {label: '英文名称', name: 'englishName', index: 'englishName', width: 180, align: 'center'},
+            // {label: 'PLU', name: 'plu', index: 'plu', width: 180, align: 'center'},
+            // {label: 'mychemId', name: 'mychemId', index: 'mychemId', width: 180, align: 'center'},
+            // {label: '英文名称', name: 'englishName', index: 'englishName', width: 180, align: 'center'},
             {label: '产品条码', name: 'prodBarcode', index: 'prod_barcode', width: 160, align: 'center'},
             // {label: '商品类型', name: 'categoryName', index: 'category_id', width: 40, align: 'center'},
             {label: '名称', name: 'name', index: 'name', width: 500, align: 'left'},
@@ -46,8 +46,8 @@ $(function () {
             //     }
             //
             //     }},
-            {label: '日常价', name: 'dailyPrice', index: 'dailyPrice', width: 100, align: 'right'},
-            {label: '成本价', name: 'costPrice', index: 'costPrice', width: 100, align: 'right'},
+            // {label: '日常价', name: 'dailyPrice', index: 'dailyPrice', width: 100, align: 'right'},
+            // {label: '成本价', name: 'costPrice', index: 'costPrice', width: 100, align: 'right'},
             // {label: '零售价格', name: 'retailPrice', index: 'retail_price', width: 80, align: 'center'},
             // {label: '市场价', name: 'marketPrice', index: 'market_price', width: 80, align: 'center'},
             {

+ 1 - 4
kmall-admin/src/main/webapp/js/shop/storeProductStock.js

@@ -704,10 +704,7 @@ var vm = new Vue({
             console.log(file)
             console.log(fileList)
             console.log("上传中")
-            exportMsg = this.$Message.loading({
-                content: 'Loading...',
-                duration: 0
-            });
+
             // setTimeout(msg, 3000);
         },
         handleSubmit: function (name) {

+ 5 - 4
kmall-admin/src/main/webapp/js/vip/mall2pointsrules.js

@@ -9,17 +9,18 @@ $(function () {
 					if (value === '0' || value === 0) {
 						return '门店';
 					}
-					if (value == '1') {
+					if (value == '1' || value === 1) {
 						return '商品类别';
 					}
-					if (value == '2') {
+					if (value == '2' || value === 2) {
 						return '门店商品';
 					}
 
 				}
 			},
-			{label: '积分金额', name: 'pointsRulesMoney', index: 'points_rules_money', width: 80},
-			{label: '对应积分数', name: 'pointsRulesNum', index: 'points_rules_num', width: 80},
+			// {label: '积分金额', name: 'pointsRulesMoney', index: 'points_rules_money', width: 80},
+			// {label: '对应积分数', name: 'pointsRulesNum', index: 'points_rules_num', width: 80},
+			{label: '对应积分数', name: 'ratio', index: 'ratio', width: 80},
 			{
 				label: '规则适用开始时间', name: 'pointsBeginTime', index: 'points_begin_time',align:"center", width: 200, formatter: function (value) {
 					return transDate(value, 'yyyy-MM-dd');

BIN
kmall-admin/src/main/webapp/statics/file/goods_export_yyyy_mm_dd_v1.0.0.xls