Browse Source

xwh对接产品备案

xwh 4 years ago
parent
commit
3193dd431f

+ 37 - 27
kmall-admin/src/main/java/com/kmall/admin/Test.java

@@ -15,14 +15,17 @@ package com.kmall.admin;
 import cn.hutool.http.HttpRequest;
 import cn.hutool.http.HttpUtil;
 import com.alibaba.fastjson.JSON;
+import com.google.gson.Gson;
+import com.kmall.admin.dto.GoodsProductDto;
+import com.kmall.admin.dto.PdProductDtoInfo;
 import com.kmall.admin.entity.GoodsEntity;
 import com.kmall.admin.utils.CalculateTax;
+import com.kmall.admin.utils.data.response.ResponseMessage;
+import com.kmall.admin.utils.oms.OmsSign;
+import okhttp3.Request;
 
 import java.math.BigDecimal;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 
 /**
  * 名称:Test <br>
@@ -34,33 +37,40 @@ import java.util.Map;
  */
 public class Test {
     public static void main(String[] args) {
-//        String result = HttpUtil.get("https://oms.ds-bay.com/oms-controller-mgt/pdProductRecord/hsCodeMapBySkuList?skuList=ISZWCW48781");
-//        Map<String,Map> map = JSON.parseObject(result, Map.class);
-//        System.out.println(map);
-//        Map skuMap =  map.get("ISZWCW48781");
-//        System.out.println(skuMap);
-//        String cusGoodsName = (String) skuMap.get("cusGoodsName");
-//        System.out.println(cusGoodsName);
-//        String valueAddedTaxRate = (String) skuMap.get("valueAddedTaxRate");
-//        System.out.println(valueAddedTaxRate);
+        Map<String, String> sParaTemp = new TreeMap<String, String>();
+        List<GoodsProductDto> goodsProductDtoList = new ArrayList<>();
+        GoodsProductDto dto = new GoodsProductDto();
+        dto.setMerchSn("mhbs990053989883052032");
+        goodsProductDtoList.add(dto);
+        PdProductDtoInfo pdProductDtoInfo = new PdProductDtoInfo();
+        pdProductDtoInfo.setPdProductDtoList(goodsProductDtoList);
+        sParaTemp.put("data", JSON.toJSONString(pdProductDtoInfo));
+        sParaTemp.put("merchId","mhbs990053989883052032");
+        String timestamp = String.valueOf(System.currentTimeMillis()/1000);
+        sParaTemp.put("timestamp", timestamp);
+        //生成要请求给oms秘钥
+//        String sign = OmsSign.sign(sParaTemp,cus.getWaybill().get("secret-key"));
+        String sign = OmsSign.sign(sParaTemp,"IxyIvP0sJqlUZinx");
+        sParaTemp.put("sign", sign);
+        //构建Request
+        String  url = "http://127.0.0.1:8680/al/product/addPdProductList";
+        Request request = com.kmall.admin.utils.oms.OkHttpUtils.buildRequest(url, JSON.toJSONString(sParaTemp));
+        // 同步访问,返回结果字符串
+        String responseString = null;
+        try {
 
+            responseString = com.kmall.admin.utils.oms.OkHttpUtils.post(request);
 
-        // 消费税税率
-        final BigDecimal impConsumTaxRate = new BigDecimal("15");
-        // 增值税税率
-        final BigDecimal valueAddedTaxRate =new BigDecimal("13");
-        BigDecimal grandConsumerTax = new BigDecimal("214");
-        BigDecimal grandValueAddTax = new BigDecimal("0");
-        if (BigDecimal.ZERO.compareTo(grandValueAddTax)==0){
-            System.out.println(grandValueAddTax);
+        } catch (Exception e) {
+            e.printStackTrace();
         }
-        if (BigDecimal.ZERO.compareTo(grandConsumerTax)!=0) {
-            System.out.println(valueAddedTaxRate.add(impConsumTaxRate).
-                    divide(new BigDecimal(100).subtract(impConsumTaxRate), 10, BigDecimal.ROUND_HALF_UP)
-                    .multiply(new BigDecimal("0.7")).setScale(4, BigDecimal.ROUND_HALF_UP));
-        }else {
 
-            System.out.println(valueAddedTaxRate.multiply(new BigDecimal("0.7")).divide(new BigDecimal("100"), 4, BigDecimal.ROUND_HALF_UP));
+        //解析响应数据
+        Gson gson = new Gson();
+        ResponseMessage result = gson.fromJson(responseString, ResponseMessage.class);
+        if(result == null){
+            String info = "解析响应数据Result失败";
+            throw new RuntimeException(info);
         }
     }
 }

+ 211 - 0
kmall-admin/src/main/java/com/kmall/admin/controller/GoodsProductController.java

@@ -0,0 +1,211 @@
+package com.kmall.admin.controller;
+
+import java.util.*;
+
+import com.google.common.collect.ImmutableBiMap;
+import com.kmall.admin.dto.GoodsDto;
+import com.kmall.admin.dto.GoodsProductDto;
+import com.kmall.admin.entity.GoodsProductEntity;
+import com.kmall.admin.service.GoodsProductService;
+import com.kmall.common.constant.Dict;
+import com.kmall.common.constant.JxlsXmlTemplateName;
+import com.kmall.common.utils.*;
+import com.kmall.common.utils.excel.ExcelUtil;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+
+/**
+ * 产品信息备案表Controller
+ *
+ * @author emato
+ * @email admin@qhdswl.com
+ * @date 2021-01-28 16:26:42
+ */
+@Controller
+@RequestMapping("goodsproduct")
+public class GoodsProductController {
+    @Autowired
+    private GoodsProductService goodsProductService;
+
+    @Autowired
+    private ExcelUtil excelUtil;
+
+    /**
+     * 查看列表
+     */
+    @RequestMapping("/list")
+    @RequiresPermissions("goodsproduct:list")
+    @ResponseBody
+    public R list(@RequestParam Map<String, Object> params) {
+        //查询列表数据
+        Query query = new Query(params);
+
+        List<GoodsProductEntity> goodsProductList = goodsProductService.queryList(query);
+        int total = goodsProductService.queryTotal(query);
+
+        PageUtils pageUtil = new PageUtils(goodsProductList, total, query.getLimit(), query.getPage());
+
+        return R.ok().put("page", pageUtil);
+    }
+
+    /**
+     * 查看信息
+     */
+    @RequestMapping("/info/{mallGoodsProductSn}")
+    @RequiresPermissions("goodsproduct:info")
+    @ResponseBody
+    public R info(@PathVariable("mallGoodsProductSn") Integer mallGoodsProductSn) {
+        GoodsProductEntity goodsProduct = goodsProductService.queryObject(mallGoodsProductSn);
+
+        return R.ok().put("goodsProduct", goodsProduct);
+    }
+
+    /**
+     * 保存
+     */
+    @RequestMapping("/save")
+    @RequiresPermissions("goodsproduct:save")
+    @ResponseBody
+    public R save(@RequestBody GoodsProductEntity goodsProduct) {
+        goodsProductService.save(goodsProduct);
+
+        return R.ok();
+    }
+
+    /**
+     * 修改
+     */
+    @RequestMapping("/update")
+    @RequiresPermissions("goodsproduct:update")
+    @ResponseBody
+    public R update(@RequestBody GoodsProductEntity goodsProduct) {
+        goodsProductService.update(goodsProduct);
+
+        return R.ok();
+    }
+
+    /**
+     * 删除
+     */
+    @RequestMapping("/delete")
+    @RequiresPermissions("goodsproduct:delete")
+    @ResponseBody
+    public R delete(@RequestBody Integer[]mallGoodsProductSns) {
+        goodsProductService.deleteBatch(mallGoodsProductSns);
+
+        return R.ok();
+    }
+
+    /**
+     * 查看所有列表
+     */
+    @RequestMapping("/queryAll")
+    @ResponseBody
+    public R queryAll(@RequestParam Map<String, Object> params) {
+
+        List<GoodsProductEntity> list = goodsProductService.queryList(params);
+
+        return R.ok().put("list", list);
+    }
+
+
+
+
+
+    /**
+     * 上传文件
+     */
+    @RequestMapping("/upload")
+    @ResponseBody
+    public R upload(@RequestParam("file") MultipartFile file) {
+        List<GoodsProductDto> goodsProductDtoList = new ArrayList<>();//商品信息
+        try {
+            Map<String, Object> beans = new HashMap<String, Object>();
+            beans.put("GoodsProductDtoList", goodsProductDtoList);
+            if (file.isEmpty()) {
+                return R.error("文件不能为空!");
+            }
+            excelUtil.readExcel(JxlsXmlTemplateName.GOODS_PRODUCT_DTO_LIST, beans, file.getInputStream());
+        } catch (Exception e) {
+            e.printStackTrace();
+            return R.error("导入失败!");
+        }
+        if (Objects.nonNull(goodsProductDtoList) && goodsProductDtoList.size()>0){
+            for (GoodsProductDto goodsProductDto : goodsProductDtoList) {
+                Map<String, Object> valideDate = MapBeanUtil.fromObject(goodsProductDto);
+                ImmutableBiMap.Builder builder = new ImmutableBiMap.Builder();
+                builder.put("merchSn", "商户编号");
+                builder.put("sku", "sku(商品料件号)");
+                builder.put("prodBarcode", "商品条形码");
+                builder.put("prodName", "品名");
+                builder.put("prodBrand", "品牌");
+                builder.put("unitCode", "计量单位");
+                builder.put("cusGoodsCode", "商品编码");
+                builder.put("cusDeclEle", "申报要素(海关规格型号)");
+                builder.put("oriCntCode", "原产国代码");
+                builder.put("ciqProdModel", "规格型号");
+                builder.put("ciqMainEle", "主要成分");
+                builder.put("declCurrencyCode", "申报币种代码");
+                builder.put("netWeight", "单个净重(g)");
+                builder.put("declPrice", "申报价格(RMB)");
+                builder.put("legalUnit1Qty", "第一法定单位数量");
+                builder.put("legalUnit2Qty", "第二法定单位数量");
+                R r = ValidatorUtil.isEmpty(builder.build(), valideDate);
+                if (Integer.valueOf(r.get("code").toString()) != 0) {
+                    throw new RRException(r.get("msg").toString());
+                }
+            }
+        }
+        try {
+            goodsProductService.uploadExcel(goodsProductDtoList);
+        }catch(Exception e){
+            return R.error(e.getMessage());
+        }
+        //上传文件
+        return R.ok();
+    }
+
+
+
+
+
+
+    /**
+     * sendSelectProduct
+     */
+    @RequestMapping("/sendSelectProduct")
+    @ResponseBody
+    public R sendSelectProduct(@RequestBody Integer[]mallGoodsProductSns) {
+        String result = goodsProductService.sendSelectProduct(mallGoodsProductSns);
+        return R.ok(result);
+    }
+
+
+
+    /**
+     * sendAllProduct
+     */
+    @RequestMapping("/sendAllProduct")
+    @ResponseBody
+    public R sendAllProduct() {
+        String result = goodsProductService.sendAllProduct();
+        return R.ok(result);
+    }
+
+
+
+
+
+
+
+
+
+
+
+
+
+}

+ 23 - 0
kmall-admin/src/main/java/com/kmall/admin/dao/GoodsProductDao.java

@@ -0,0 +1,23 @@
+package com.kmall.admin.dao;
+
+
+import com.kmall.admin.entity.GoodsProductEntity;
+import com.kmall.manager.dao.BaseDao;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 产品信息备案表Dao
+ *
+ * @author emato
+ * @email admin@qhdswl.com
+ * @date 2021-01-28 16:26:42
+ */
+public interface GoodsProductDao extends BaseDao<GoodsProductEntity> {
+
+    GoodsProductEntity selectByParams(@Param("sku") String sku,@Param("merchSn") String merchSn,
+                                      @Param("thirdMerchSn") String thirdMerchSn);
+
+    List<GoodsProductEntity> selectByMallGoodsProductSns(@Param("mallGoodsProductSns") Integer[] mallGoodsProductSns);
+}

+ 556 - 0
kmall-admin/src/main/java/com/kmall/admin/dto/GoodsProductDto.java

@@ -0,0 +1,556 @@
+package com.kmall.admin.dto;
+
+import java.io.Serializable;
+import java.util.Date;
+
+
+/**
+ * @author Scott
+ * @email
+ * @date 2017-08-13 10:41:08
+ */
+public class GoodsProductDto implements Serializable {
+    private static final long serialVersionUID = 1L;
+    private String merchSn;
+
+    private String mallGoodsProductSn;
+
+    private String prodBarcode;
+
+    private String sku;
+
+    private String cusCode;
+
+    private String cusGoodsCode;
+
+    private String prodName;
+
+    private String prodEname;
+
+    private String ciqProdModel;
+
+    private String prodTaxCode;
+
+    private String cusBizMode;
+
+    private String prodBrand;
+
+    private String oriCntCode;
+
+    private String unitCode;
+
+    private String declPrice;
+
+    private String declCurrencyCode;
+
+    private String supplierName;
+
+    private String supplierCntCode;
+
+    private String prodCompName;
+
+    private String prodCompCntCode;
+
+    private String ciqMainEle;
+
+    private String applyStandard;
+
+    private String tradeCountry;
+
+    private String ciqMonitorType;
+
+    private String outFoodCompCode;
+
+    private String compRisk;
+
+    private String isLaw;
+
+    private String isAuthen;
+
+    private String isGift;
+
+    private String remark;
+
+    private String cusDeclEle;
+
+    private String cusRecCode;
+
+    private String isCheck;
+
+    private String isValid;
+
+    private String createrSn;
+
+    private String createTime;
+
+    private String moderSn;
+
+    private String modTime;
+
+    private String tstm;
+
+    private String exField;
+
+    private String exField2;
+
+    private String exField3;
+
+    private String exField4;
+
+    private String exField5;
+
+    private String changeReason;
+
+    private String isAudit;
+
+    private String legalUnit1Qty;// 第一法定单位数量
+
+    private String legalUnit2Qty;// 第二法定单位数量
+
+    private String netWeight;// 净重
+
+    private String localEmsNo;// 园区账册编号
+
+    private String itemRecordNo;// 园内商品序号
+
+    private String grossWeight;// 毛重
+
+
+    private String emsClassCode;// 账册分类代码
+
+
+    private String thirdMerchSn;
+
+
+    public String getMerchSn() {
+        return merchSn;
+    }
+
+    public void setMerchSn(String merchSn) {
+        this.merchSn = merchSn;
+    }
+
+    public String getProdBarcode() {
+        return prodBarcode;
+    }
+
+    public void setProdBarcode(String prodBarcode) {
+        this.prodBarcode = prodBarcode;
+    }
+
+    public String getSku() {
+        return sku;
+    }
+
+    public void setSku(String sku) {
+        this.sku = sku;
+    }
+
+    public String getCusCode() {
+        return cusCode;
+    }
+
+    public void setCusCode(String cusCode) {
+        this.cusCode = cusCode;
+    }
+
+    public String getCusGoodsCode() {
+        return cusGoodsCode;
+    }
+
+    public void setCusGoodsCode(String cusGoodsCode) {
+        this.cusGoodsCode = cusGoodsCode;
+    }
+
+    public String getProdName() {
+        return prodName;
+    }
+
+    public void setProdName(String prodName) {
+        this.prodName = prodName;
+    }
+
+    public String getProdEname() {
+        return prodEname;
+    }
+
+    public void setProdEname(String prodEname) {
+        this.prodEname = prodEname;
+    }
+
+    public String getCiqProdModel() {
+        return ciqProdModel;
+    }
+
+    public void setCiqProdModel(String ciqProdModel) {
+        this.ciqProdModel = ciqProdModel;
+    }
+
+    public String getProdTaxCode() {
+        return prodTaxCode;
+    }
+
+    public void setProdTaxCode(String prodTaxCode) {
+        this.prodTaxCode = prodTaxCode;
+    }
+
+    public String getCusBizMode() {
+        return cusBizMode;
+    }
+
+    public void setCusBizMode(String cusBizMode) {
+        this.cusBizMode = cusBizMode;
+    }
+
+    public String getProdBrand() {
+        return prodBrand;
+    }
+
+    public void setProdBrand(String prodBrand) {
+        this.prodBrand = prodBrand;
+    }
+
+    public String getOriCntCode() {
+        return oriCntCode;
+    }
+
+    public void setOriCntCode(String oriCntCode) {
+        this.oriCntCode = oriCntCode;
+    }
+
+    public String getUnitCode() {
+        return unitCode;
+    }
+
+    public void setUnitCode(String unitCode) {
+        this.unitCode = unitCode;
+    }
+
+    public String getDeclPrice() {
+        return declPrice;
+    }
+
+    public void setDeclPrice(String declPrice) {
+        this.declPrice = declPrice;
+    }
+
+    public String getDeclCurrencyCode() {
+        return declCurrencyCode;
+    }
+
+    public void setDeclCurrencyCode(String declCurrencyCode) {
+        this.declCurrencyCode = declCurrencyCode;
+    }
+
+    public String getSupplierName() {
+        return supplierName;
+    }
+
+    public void setSupplierName(String supplierName) {
+        this.supplierName = supplierName;
+    }
+
+    public String getSupplierCntCode() {
+        return supplierCntCode;
+    }
+
+    public void setSupplierCntCode(String supplierCntCode) {
+        this.supplierCntCode = supplierCntCode;
+    }
+
+    public String getProdCompName() {
+        return prodCompName;
+    }
+
+    public void setProdCompName(String prodCompName) {
+        this.prodCompName = prodCompName;
+    }
+
+    public String getProdCompCntCode() {
+        return prodCompCntCode;
+    }
+
+    public void setProdCompCntCode(String prodCompCntCode) {
+        this.prodCompCntCode = prodCompCntCode;
+    }
+
+    public String getCiqMainEle() {
+        return ciqMainEle;
+    }
+
+    public void setCiqMainEle(String ciqMainEle) {
+        this.ciqMainEle = ciqMainEle;
+    }
+
+    public String getApplyStandard() {
+        return applyStandard;
+    }
+
+    public void setApplyStandard(String applyStandard) {
+        this.applyStandard = applyStandard;
+    }
+
+    public String getTradeCountry() {
+        return tradeCountry;
+    }
+
+    public void setTradeCountry(String tradeCountry) {
+        this.tradeCountry = tradeCountry;
+    }
+
+    public String getCiqMonitorType() {
+        return ciqMonitorType;
+    }
+
+    public void setCiqMonitorType(String ciqMonitorType) {
+        this.ciqMonitorType = ciqMonitorType;
+    }
+
+    public String getOutFoodCompCode() {
+        return outFoodCompCode;
+    }
+
+    public void setOutFoodCompCode(String outFoodCompCode) {
+        this.outFoodCompCode = outFoodCompCode;
+    }
+
+    public String getCompRisk() {
+        return compRisk;
+    }
+
+    public void setCompRisk(String compRisk) {
+        this.compRisk = compRisk;
+    }
+
+    public String getIsLaw() {
+        return isLaw;
+    }
+
+    public void setIsLaw(String isLaw) {
+        this.isLaw = isLaw;
+    }
+
+    public String getIsAuthen() {
+        return isAuthen;
+    }
+
+    public void setIsAuthen(String isAuthen) {
+        this.isAuthen = isAuthen;
+    }
+
+    public String getIsGift() {
+        return isGift;
+    }
+
+    public void setIsGift(String isGift) {
+        this.isGift = isGift;
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    public String getCusDeclEle() {
+        return cusDeclEle;
+    }
+
+    public void setCusDeclEle(String cusDeclEle) {
+        this.cusDeclEle = cusDeclEle;
+    }
+
+    public String getCusRecCode() {
+        return cusRecCode;
+    }
+
+    public void setCusRecCode(String cusRecCode) {
+        this.cusRecCode = cusRecCode;
+    }
+
+    public String getIsCheck() {
+        return isCheck;
+    }
+
+    public void setIsCheck(String isCheck) {
+        this.isCheck = isCheck;
+    }
+
+    public String getIsValid() {
+        return isValid;
+    }
+
+    public void setIsValid(String isValid) {
+        this.isValid = isValid;
+    }
+
+    public String getCreaterSn() {
+        return createrSn;
+    }
+
+    public void setCreaterSn(String createrSn) {
+        this.createrSn = createrSn;
+    }
+
+    public String getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(String createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getModerSn() {
+        return moderSn;
+    }
+
+    public void setModerSn(String moderSn) {
+        this.moderSn = moderSn;
+    }
+
+    public String getModTime() {
+        return modTime;
+    }
+
+    public void setModTime(String modTime) {
+        this.modTime = modTime;
+    }
+
+    public String getTstm() {
+        return tstm;
+    }
+
+    public void setTstm(String tstm) {
+        this.tstm = tstm;
+    }
+
+    public String getExField() {
+        return exField;
+    }
+
+    public void setExField(String exField) {
+        this.exField = exField;
+    }
+
+    public String getExField2() {
+        return exField2;
+    }
+
+    public void setExField2(String exField2) {
+        this.exField2 = exField2;
+    }
+
+    public String getExField3() {
+        return exField3;
+    }
+
+    public void setExField3(String exField3) {
+        this.exField3 = exField3;
+    }
+
+    public String getExField4() {
+        return exField4;
+    }
+
+    public void setExField4(String exField4) {
+        this.exField4 = exField4;
+    }
+
+    public String getExField5() {
+        return exField5;
+    }
+
+    public void setExField5(String exField5) {
+        this.exField5 = exField5;
+    }
+
+    public String getChangeReason() {
+        return changeReason;
+    }
+
+    public void setChangeReason(String changeReason) {
+        this.changeReason = changeReason;
+    }
+
+    public String getIsAudit() {
+        return isAudit;
+    }
+
+    public void setIsAudit(String isAudit) {
+        this.isAudit = isAudit;
+    }
+
+    public String getLegalUnit1Qty() {
+        return legalUnit1Qty;
+    }
+
+    public void setLegalUnit1Qty(String legalUnit1Qty) {
+        this.legalUnit1Qty = legalUnit1Qty;
+    }
+
+    public String getLegalUnit2Qty() {
+        return legalUnit2Qty;
+    }
+
+    public void setLegalUnit2Qty(String legalUnit2Qty) {
+        this.legalUnit2Qty = legalUnit2Qty;
+    }
+
+    public String getNetWeight() {
+        return netWeight;
+    }
+
+    public void setNetWeight(String netWeight) {
+        this.netWeight = netWeight;
+    }
+
+    public String getLocalEmsNo() {
+        return localEmsNo;
+    }
+
+    public void setLocalEmsNo(String localEmsNo) {
+        this.localEmsNo = localEmsNo;
+    }
+
+    public String getItemRecordNo() {
+        return itemRecordNo;
+    }
+
+    public void setItemRecordNo(String itemRecordNo) {
+        this.itemRecordNo = itemRecordNo;
+    }
+
+    public String getGrossWeight() {
+        return grossWeight;
+    }
+
+    public void setGrossWeight(String grossWeight) {
+        this.grossWeight = grossWeight;
+    }
+
+    public String getEmsClassCode() {
+        return emsClassCode;
+    }
+
+    public void setEmsClassCode(String emsClassCode) {
+        this.emsClassCode = emsClassCode;
+    }
+
+    public String getThirdMerchSn() {
+        return thirdMerchSn;
+    }
+
+    public void setThirdMerchSn(String thirdMerchSn) {
+        this.thirdMerchSn = thirdMerchSn;
+    }
+
+    public String getMallGoodsProductSn() {
+        return mallGoodsProductSn;
+    }
+
+    public void setMallGoodsProductSn(String mallGoodsProductSn) {
+        this.mallGoodsProductSn = mallGoodsProductSn;
+    }
+}

+ 18 - 0
kmall-admin/src/main/java/com/kmall/admin/dto/PdProductDtoInfo.java

@@ -0,0 +1,18 @@
+package com.kmall.admin.dto;
+
+import java.io.Serializable;
+import java.util.List;
+
+public class PdProductDtoInfo implements Serializable {
+
+
+   List<GoodsProductDto> pdProductDtoList;
+
+    public List<GoodsProductDto> getPdProductDtoList() {
+        return pdProductDtoList;
+    }
+
+    public void setPdProductDtoList(List<GoodsProductDto> pdProductDtoList) {
+        this.pdProductDtoList = pdProductDtoList;
+    }
+}

+ 727 - 0
kmall-admin/src/main/java/com/kmall/admin/entity/GoodsProductEntity.java

@@ -0,0 +1,727 @@
+package com.kmall.admin.entity;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 产品信息备案表实体
+ * 表名 mall_goods_product
+ *
+ * @author emato
+ * @email admin@qhdswl.com
+ * @date 2021-01-28 16:26:42
+ */
+public class GoodsProductEntity implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 产品信息备案编号
+     */
+    private Integer mallGoodsProductSn;
+    /**
+     * 商户编号
+     */
+    private String merchSn;
+    /**
+     * 第三方商户编号
+     */
+    private String thirdMerchSn;
+    /**
+     * 产品条码
+     */
+    private String prodBarcode;
+    /**
+     * sku
+     */
+    private String sku;
+    /**
+     * 海关商品编码
+     */
+    private String cusGoodsCode;
+    /**
+     * 中文名称
+     */
+    private String prodName;
+    /**
+     * 国检规格型号
+     */
+    private String ciqProdModel;
+    /**
+     * 品牌
+     */
+    private String prodBrand;
+    /**
+     * 原产国代码,海关编码
+     */
+    private String oriCntCode;
+    /**
+     * 计量单位代码,参见海关编码
+     */
+    private String unitCode;
+    /**
+     * 申报价格
+     */
+    private BigDecimal declPrice;
+    /**
+     * 申报币种代码,参见海关编码
+     */
+    private String declCurrencyCode;
+    /**
+     * 供应商企业名称,非必送
+     */
+    private String supplierName;
+    /**
+     * 供货商企业国别代码,非必送,海关编码
+     */
+    private String supplierCntCode;
+    /**
+     * 生产企业名称
+     */
+    private String prodCompName;
+    /**
+     * 生产企业国别名称
+     */
+    private String prodCompCntCode;
+    /**
+     * 主要成分
+     */
+    private String ciqMainEle;
+    /**
+     * 国检监管类别,
+             0101:3C目录内
+             0102:HS编码涉及3C但在3C目录外
+             0201:普通食品、化妆品及一般要求
+             0202:保健食品
+             0203:有检疫要求(含肉、含蛋、含乳等)的深加工食品
+             0204:备案管理的化妆品(婴幼儿化妆品除外)
+             0205:实施注册管理的进口婴幼儿乳粉、实施备案管理的进口婴幼儿化妆品
+             0206:其他有特殊检验检疫监管要求的食品
+             0301:一次性卫生用品
+             0401:医学微生物、人体组、生物制品、血液及其制品、环保微生物菌剂
+             9999:其他产品)
+     */
+    private String ciqMonitorType;
+    /**
+     * 是否法检   0:否 1:是
+     */
+    private String isLaw;
+    /**
+     * 是否赠品 0:否 1:是
+     */
+    private String isGift;
+    /**
+     * 海关申报要素,报统一版
+     */
+    private String cusDeclEle;
+    /**
+     * 创建人编号
+     */
+    private String createrSn;
+    /**
+     * 创建时间,yyyy-MM-dd HH:mm:ss
+     */
+    private Date createTime;
+    /**
+     * 修改人编号
+     */
+    private String moderSn;
+    /**
+     * 修改时间,yyyy-MM-dd HH:mm:ss
+     */
+    private Date modTime;
+    /**
+     * 时间戳
+     */
+    private Date tstm;
+    /**
+     * 
+     */
+    private String exField;
+    /**
+     * 
+     */
+    private String exField2;
+    /**
+     * 
+     */
+    private String exField3;
+    /**
+     * 
+     */
+    private String exField4;
+    /**
+     * 
+     */
+    private String exField5;
+    /**
+     * 第一法定单位数量
+     */
+    private BigDecimal legalUnit1Qty;
+    /**
+     * 净重,kg
+     */
+    private BigDecimal netWeight;
+    /**
+     * 第二法定单位数量
+     */
+    private BigDecimal legalUnit2Qty;
+    /**
+     * 毛重,kg
+     */
+    private BigDecimal grossWeight;
+    /**
+     * 园区账册编号
+     */
+    private String localEmsNo;
+    /**
+     * 园区商品序号
+     */
+    private String itemRecordNo;
+    /**
+     * 账册分类代码
+     */
+    private String emsClassCode;
+
+
+    private String isSend;
+
+
+    public String getIsSend() {
+        return isSend;
+    }
+
+    public void setIsSend(String isSend) {
+        this.isSend = isSend;
+    }
+
+    /**
+     * 设置:产品信息备案编号
+     */
+    public void setMallGoodsProductSn(Integer mallGoodsProductSn) {
+        this.mallGoodsProductSn = mallGoodsProductSn;
+    }
+
+    /**
+     * 获取:产品信息备案编号
+     */
+    public Integer getMallGoodsProductSn() {
+        return mallGoodsProductSn;
+    }
+    /**
+     * 设置:商户编号
+     */
+    public void setMerchSn(String merchSn) {
+        this.merchSn = merchSn;
+    }
+
+    /**
+     * 获取:商户编号
+     */
+    public String getMerchSn() {
+        return merchSn;
+    }
+    /**
+     * 设置:第三方商户编号
+     */
+    public void setThirdMerchSn(String thirdMerchSn) {
+        this.thirdMerchSn = thirdMerchSn;
+    }
+
+    /**
+     * 获取:第三方商户编号
+     */
+    public String getThirdMerchSn() {
+        return thirdMerchSn;
+    }
+    /**
+     * 设置:产品条码
+     */
+    public void setProdBarcode(String prodBarcode) {
+        this.prodBarcode = prodBarcode;
+    }
+
+    /**
+     * 获取:产品条码
+     */
+    public String getProdBarcode() {
+        return prodBarcode;
+    }
+    /**
+     * 设置:sku
+     */
+    public void setSku(String sku) {
+        this.sku = sku;
+    }
+
+    /**
+     * 获取:sku
+     */
+    public String getSku() {
+        return sku;
+    }
+    /**
+     * 设置:海关商品编码
+     */
+    public void setCusGoodsCode(String cusGoodsCode) {
+        this.cusGoodsCode = cusGoodsCode;
+    }
+
+    /**
+     * 获取:海关商品编码
+     */
+    public String getCusGoodsCode() {
+        return cusGoodsCode;
+    }
+    /**
+     * 设置:中文名称
+     */
+    public void setProdName(String prodName) {
+        this.prodName = prodName;
+    }
+
+    /**
+     * 获取:中文名称
+     */
+    public String getProdName() {
+        return prodName;
+    }
+    /**
+     * 设置:国检规格型号
+     */
+    public void setCiqProdModel(String ciqProdModel) {
+        this.ciqProdModel = ciqProdModel;
+    }
+
+    /**
+     * 获取:国检规格型号
+     */
+    public String getCiqProdModel() {
+        return ciqProdModel;
+    }
+    /**
+     * 设置:品牌
+     */
+    public void setProdBrand(String prodBrand) {
+        this.prodBrand = prodBrand;
+    }
+
+    /**
+     * 获取:品牌
+     */
+    public String getProdBrand() {
+        return prodBrand;
+    }
+    /**
+     * 设置:原产国代码,海关编码
+     */
+    public void setOriCntCode(String oriCntCode) {
+        this.oriCntCode = oriCntCode;
+    }
+
+    /**
+     * 获取:原产国代码,海关编码
+     */
+    public String getOriCntCode() {
+        return oriCntCode;
+    }
+    /**
+     * 设置:计量单位代码,参见海关编码
+     */
+    public void setUnitCode(String unitCode) {
+        this.unitCode = unitCode;
+    }
+
+    /**
+     * 获取:计量单位代码,参见海关编码
+     */
+    public String getUnitCode() {
+        return unitCode;
+    }
+    /**
+     * 设置:申报价格
+     */
+    public void setDeclPrice(BigDecimal declPrice) {
+        this.declPrice = declPrice;
+    }
+
+    /**
+     * 获取:申报价格
+     */
+    public BigDecimal getDeclPrice() {
+        return declPrice;
+    }
+    /**
+     * 设置:申报币种代码,参见海关编码
+     */
+    public void setDeclCurrencyCode(String declCurrencyCode) {
+        this.declCurrencyCode = declCurrencyCode;
+    }
+
+    /**
+     * 获取:申报币种代码,参见海关编码
+     */
+    public String getDeclCurrencyCode() {
+        return declCurrencyCode;
+    }
+    /**
+     * 设置:供应商企业名称,非必送
+     */
+    public void setSupplierName(String supplierName) {
+        this.supplierName = supplierName;
+    }
+
+    /**
+     * 获取:供应商企业名称,非必送
+     */
+    public String getSupplierName() {
+        return supplierName;
+    }
+    /**
+     * 设置:供货商企业国别代码,非必送,海关编码
+     */
+    public void setSupplierCntCode(String supplierCntCode) {
+        this.supplierCntCode = supplierCntCode;
+    }
+
+    /**
+     * 获取:供货商企业国别代码,非必送,海关编码
+     */
+    public String getSupplierCntCode() {
+        return supplierCntCode;
+    }
+    /**
+     * 设置:生产企业名称
+     */
+    public void setProdCompName(String prodCompName) {
+        this.prodCompName = prodCompName;
+    }
+
+    /**
+     * 获取:生产企业名称
+     */
+    public String getProdCompName() {
+        return prodCompName;
+    }
+    /**
+     * 设置:生产企业国别名称
+     */
+    public void setProdCompCntCode(String prodCompCntCode) {
+        this.prodCompCntCode = prodCompCntCode;
+    }
+
+    /**
+     * 获取:生产企业国别名称
+     */
+    public String getProdCompCntCode() {
+        return prodCompCntCode;
+    }
+    /**
+     * 设置:主要成分
+     */
+    public void setCiqMainEle(String ciqMainEle) {
+        this.ciqMainEle = ciqMainEle;
+    }
+
+    /**
+     * 获取:主要成分
+     */
+    public String getCiqMainEle() {
+        return ciqMainEle;
+    }
+    /**
+     * 设置:国检监管类别,
+             0101:3C目录内
+             0102:HS编码涉及3C但在3C目录外
+             0201:普通食品、化妆品及一般要求
+             0202:保健食品
+             0203:有检疫要求(含肉、含蛋、含乳等)的深加工食品
+             0204:备案管理的化妆品(婴幼儿化妆品除外)
+             0205:实施注册管理的进口婴幼儿乳粉、实施备案管理的进口婴幼儿化妆品
+             0206:其他有特殊检验检疫监管要求的食品
+             0301:一次性卫生用品
+             0401:医学微生物、人体组、生物制品、血液及其制品、环保微生物菌剂
+             9999:其他产品)
+     */
+    public void setCiqMonitorType(String ciqMonitorType) {
+        this.ciqMonitorType = ciqMonitorType;
+    }
+
+    /**
+     * 获取:国检监管类别,
+             0101:3C目录内
+             0102:HS编码涉及3C但在3C目录外
+             0201:普通食品、化妆品及一般要求
+             0202:保健食品
+             0203:有检疫要求(含肉、含蛋、含乳等)的深加工食品
+             0204:备案管理的化妆品(婴幼儿化妆品除外)
+             0205:实施注册管理的进口婴幼儿乳粉、实施备案管理的进口婴幼儿化妆品
+             0206:其他有特殊检验检疫监管要求的食品
+             0301:一次性卫生用品
+             0401:医学微生物、人体组、生物制品、血液及其制品、环保微生物菌剂
+             9999:其他产品)
+     */
+    public String getCiqMonitorType() {
+        return ciqMonitorType;
+    }
+    /**
+     * 设置:是否法检   0:否 1:是
+     */
+    public void setIsLaw(String isLaw) {
+        this.isLaw = isLaw;
+    }
+
+    /**
+     * 获取:是否法检   0:否 1:是
+     */
+    public String getIsLaw() {
+        return isLaw;
+    }
+    /**
+     * 设置:是否赠品 0:否 1:是
+     */
+    public void setIsGift(String isGift) {
+        this.isGift = isGift;
+    }
+
+    /**
+     * 获取:是否赠品 0:否 1:是
+     */
+    public String getIsGift() {
+        return isGift;
+    }
+    /**
+     * 设置:海关申报要素,报统一版
+     */
+    public void setCusDeclEle(String cusDeclEle) {
+        this.cusDeclEle = cusDeclEle;
+    }
+
+    /**
+     * 获取:海关申报要素,报统一版
+     */
+    public String getCusDeclEle() {
+        return cusDeclEle;
+    }
+    /**
+     * 设置:创建人编号
+     */
+    public void setCreaterSn(String createrSn) {
+        this.createrSn = createrSn;
+    }
+
+    /**
+     * 获取:创建人编号
+     */
+    public String getCreaterSn() {
+        return createrSn;
+    }
+    /**
+     * 设置:创建时间,yyyy-MM-dd HH:mm:ss
+     */
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    /**
+     * 获取:创建时间,yyyy-MM-dd HH:mm:ss
+     */
+    public Date getCreateTime() {
+        return createTime;
+    }
+    /**
+     * 设置:修改人编号
+     */
+    public void setModerSn(String moderSn) {
+        this.moderSn = moderSn;
+    }
+
+    /**
+     * 获取:修改人编号
+     */
+    public String getModerSn() {
+        return moderSn;
+    }
+    /**
+     * 设置:修改时间,yyyy-MM-dd HH:mm:ss
+     */
+    public void setModTime(Date modTime) {
+        this.modTime = modTime;
+    }
+
+    /**
+     * 获取:修改时间,yyyy-MM-dd HH:mm:ss
+     */
+    public Date getModTime() {
+        return modTime;
+    }
+    /**
+     * 设置:时间戳
+     */
+    public void setTstm(Date tstm) {
+        this.tstm = tstm;
+    }
+
+    /**
+     * 获取:时间戳
+     */
+    public Date getTstm() {
+        return tstm;
+    }
+    /**
+     * 设置:
+     */
+    public void setExField(String exField) {
+        this.exField = exField;
+    }
+
+    /**
+     * 获取:
+     */
+    public String getExField() {
+        return exField;
+    }
+    /**
+     * 设置:
+     */
+    public void setExField2(String exField2) {
+        this.exField2 = exField2;
+    }
+
+    /**
+     * 获取:
+     */
+    public String getExField2() {
+        return exField2;
+    }
+    /**
+     * 设置:
+     */
+    public void setExField3(String exField3) {
+        this.exField3 = exField3;
+    }
+
+    /**
+     * 获取:
+     */
+    public String getExField3() {
+        return exField3;
+    }
+    /**
+     * 设置:
+     */
+    public void setExField4(String exField4) {
+        this.exField4 = exField4;
+    }
+
+    /**
+     * 获取:
+     */
+    public String getExField4() {
+        return exField4;
+    }
+    /**
+     * 设置:
+     */
+    public void setExField5(String exField5) {
+        this.exField5 = exField5;
+    }
+
+    /**
+     * 获取:
+     */
+    public String getExField5() {
+        return exField5;
+    }
+    /**
+     * 设置:第一法定单位数量
+     */
+    public void setLegalUnit1Qty(BigDecimal legalUnit1Qty) {
+        this.legalUnit1Qty = legalUnit1Qty;
+    }
+
+    /**
+     * 获取:第一法定单位数量
+     */
+    public BigDecimal getLegalUnit1Qty() {
+        return legalUnit1Qty;
+    }
+    /**
+     * 设置:净重,kg
+     */
+    public void setNetWeight(BigDecimal netWeight) {
+        this.netWeight = netWeight;
+    }
+
+    /**
+     * 获取:净重,kg
+     */
+    public BigDecimal getNetWeight() {
+        return netWeight;
+    }
+    /**
+     * 设置:第二法定单位数量
+     */
+    public void setLegalUnit2Qty(BigDecimal legalUnit2Qty) {
+        this.legalUnit2Qty = legalUnit2Qty;
+    }
+
+    /**
+     * 获取:第二法定单位数量
+     */
+    public BigDecimal getLegalUnit2Qty() {
+        return legalUnit2Qty;
+    }
+    /**
+     * 设置:毛重,kg
+     */
+    public void setGrossWeight(BigDecimal grossWeight) {
+        this.grossWeight = grossWeight;
+    }
+
+    /**
+     * 获取:毛重,kg
+     */
+    public BigDecimal getGrossWeight() {
+        return grossWeight;
+    }
+    /**
+     * 设置:园区账册编号
+     */
+    public void setLocalEmsNo(String localEmsNo) {
+        this.localEmsNo = localEmsNo;
+    }
+
+    /**
+     * 获取:园区账册编号
+     */
+    public String getLocalEmsNo() {
+        return localEmsNo;
+    }
+    /**
+     * 设置:园区商品序号
+     */
+    public void setItemRecordNo(String itemRecordNo) {
+        this.itemRecordNo = itemRecordNo;
+    }
+
+    /**
+     * 获取:园区商品序号
+     */
+    public String getItemRecordNo() {
+        return itemRecordNo;
+    }
+    /**
+     * 设置:账册分类代码
+     */
+    public void setEmsClassCode(String emsClassCode) {
+        this.emsClassCode = emsClassCode;
+    }
+
+    /**
+     * 获取:账册分类代码
+     */
+    public String getEmsClassCode() {
+        return emsClassCode;
+    }
+}

+ 81 - 0
kmall-admin/src/main/java/com/kmall/admin/service/GoodsProductService.java

@@ -0,0 +1,81 @@
+package com.kmall.admin.service;
+
+
+import com.kmall.admin.dto.GoodsProductDto;
+import com.kmall.admin.entity.GoodsProductEntity;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 产品信息备案表Service接口
+ *
+ * @author emato
+ * @email admin@qhdswl.com
+ * @date 2021-01-28 16:26:42
+ */
+public interface GoodsProductService {
+
+    /**
+     * 根据主键查询实体
+     *
+     * @param mallGoodsProductSn 主键
+     * @return 实体
+     */
+    GoodsProductEntity queryObject(Integer mallGoodsProductSn);
+
+    /**
+     * 分页查询
+     *
+     * @param map 参数
+     * @return list
+     */
+    List<GoodsProductEntity> queryList(Map<String, Object> map);
+
+    /**
+     * 分页统计总数
+     *
+     * @param map 参数
+     * @return 总数
+     */
+    int queryTotal(Map<String, Object> map);
+
+    /**
+     * 保存实体
+     *
+     * @param goodsProduct 实体
+     * @return 保存条数
+     */
+    int save(GoodsProductEntity goodsProduct);
+
+    /**
+     * 根据主键更新实体
+     *
+     * @param goodsProduct 实体
+     * @return 更新条数
+     */
+    int update(GoodsProductEntity goodsProduct);
+
+    /**
+     * 根据主键删除
+     *
+     * @param mallGoodsProductSn
+     * @return 删除条数
+     */
+    int delete(Integer mallGoodsProductSn);
+
+    /**
+     * 根据主键批量删除
+     *
+     * @param mallGoodsProductSns
+     * @return 删除条数
+     */
+    int deleteBatch(Integer[]mallGoodsProductSns);
+
+    void uploadExcel(List<GoodsProductDto> goodsProductDtoList);
+
+    String sendSelectProduct(Integer[] mallGoodsProductSns);
+
+    String sendAllProduct();
+
+}

+ 245 - 0
kmall-admin/src/main/java/com/kmall/admin/service/impl/GoodsProductServiceImpl.java

@@ -0,0 +1,245 @@
+package com.kmall.admin.service.impl;
+
+import com.alibaba.fastjson.JSON;
+import com.google.gson.Gson;
+import com.kmall.admin.dao.GoodsProductDao;
+import com.kmall.admin.dto.GoodsProductDto;
+import com.kmall.admin.dto.PdProductDtoInfo;
+import com.kmall.admin.entity.GoodsProductEntity;
+import com.kmall.admin.service.GoodsProductService;
+import com.kmall.admin.utils.OkHttpUtils;
+import com.kmall.admin.utils.ShiroUtils;
+import com.kmall.admin.utils.data.response.ResponseMessage;
+import com.kmall.admin.utils.oms.OmsSign;
+import com.kmall.common.utils.RRException;
+import com.kmall.manager.manager.merch.OmsMerchProperties;
+import okhttp3.Request;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.StringUtils;
+
+import java.io.IOException;
+import java.util.*;
+
+/**
+ * 产品信息备案表Service实现类
+ *
+ * @author emato
+ * @email admin@qhdswl.com
+ * @date 2021-01-28 16:26:42
+ */
+@Service("goodsProductService")
+public class GoodsProductServiceImpl implements GoodsProductService {
+
+    private static final Logger LOGGER = LoggerFactory.getLogger(GoodsProductServiceImpl.class);
+    @Autowired
+    private GoodsProductDao goodsProductDao;
+
+    @Autowired
+    private OmsMerchProperties omsMerchProperties;
+
+    @Override
+    public GoodsProductEntity queryObject(Integer mallGoodsProductSn) {
+        return goodsProductDao.queryObject(mallGoodsProductSn);
+    }
+
+    @Override
+    public List<GoodsProductEntity> queryList(Map<String, Object> map) {
+        return goodsProductDao.queryList(map);
+    }
+
+    @Override
+    public int queryTotal(Map<String, Object> map) {
+        return goodsProductDao.queryTotal(map);
+    }
+
+    @Override
+    public int save(GoodsProductEntity goodsProduct) {
+        return goodsProductDao.save(goodsProduct);
+    }
+
+    @Override
+    public int update(GoodsProductEntity goodsProduct) {
+        return goodsProductDao.update(goodsProduct);
+    }
+
+    @Override
+    public int delete(Integer mallGoodsProductSn) {
+        return goodsProductDao.delete(mallGoodsProductSn);
+    }
+
+    @Override
+    public int deleteBatch(Integer[]mallGoodsProductSns) {
+        return goodsProductDao.deleteBatch(mallGoodsProductSns);
+    }
+
+    @Override
+    @Transactional
+    public void uploadExcel(List<GoodsProductDto> goodsProductDtoList) {
+        if (Objects.nonNull(goodsProductDtoList) && goodsProductDtoList.size()>0){
+            int count =1;
+            for (GoodsProductDto goodsProductDto : goodsProductDtoList) {
+                if (StringUtils.isEmpty(goodsProductDto.getMerchSn())) {
+                    throw new RRException("第" + count + "行的商户编号为空!");
+                }
+                if (StringUtils.isEmpty(goodsProductDto.getSku())) {
+                    throw new RRException("第" + count + "行的SKU为空!");
+                }
+                if (StringUtils.isEmpty(goodsProductDto.getProdBarcode())) {
+                    throw new RRException("第" + count + "行的商品条形码为空!");
+                }
+                if (StringUtils.isEmpty(goodsProductDto.getProdName())) {
+                    throw new RRException("第" + count + "行的品名为空!");
+                }
+                if (StringUtils.isEmpty(goodsProductDto.getProdBrand())) {
+                    throw new RRException("第" + count + "行的品牌为空!");
+                }
+                if (StringUtils.isEmpty(goodsProductDto.getUnitCode())) {
+                    throw new RRException("第" + count + "行的计量单位为空!");
+                }
+                if (StringUtils.isEmpty(goodsProductDto.getCusGoodsCode())) {
+                    throw new RRException("第" + count + "行的海关商品编码为空!");
+                }
+                if (StringUtils.isEmpty(goodsProductDto.getCusDeclEle())) {
+                    throw new RRException("第" + count + "行的申报要素为空!");
+                }
+                if (StringUtils.isEmpty(goodsProductDto.getOriCntCode())) {
+                    throw new RRException("第" + count + "行的原产国代码为空!");
+                }
+                if (StringUtils.isEmpty(goodsProductDto.getCiqProdModel())) {
+                    throw new RRException("第" + count + "行的规格型号为空!");
+                }
+                if (StringUtils.isEmpty(goodsProductDto.getCiqMainEle())) {
+                    throw new RRException("第" + count + "行的主要成分为空!");
+                }
+                if (StringUtils.isEmpty(goodsProductDto.getDeclCurrencyCode())) {
+                    throw new RRException("第" + count + "行的申报币种代码为空!");
+                }
+                if (StringUtils.isEmpty(goodsProductDto.getNetWeight())) {
+                    throw new RRException("第" + count + "行的单个净重为空!");
+                }
+                if (StringUtils.isEmpty(goodsProductDto.getDeclPrice())) {
+                    throw new RRException("第" + count + "行的申报价格为空!");
+                }
+                if (StringUtils.isEmpty(goodsProductDto.getLegalUnit1Qty())) {
+                    throw new RRException("第" + count + "行的第一法定单位数量为空!");
+                }
+                if (StringUtils.isEmpty(goodsProductDto.getLegalUnit2Qty())) {
+                    throw new RRException("第" + count + "行的第二法定单位数量为空!");
+                }
+                GoodsProductEntity queryProduct = goodsProductDao.selectByParams(goodsProductDto.getSku(), goodsProductDto.getMerchSn(),goodsProductDto.getThirdMerchSn());
+                if (Objects.nonNull(queryProduct)){
+                    throw new RRException("该sku:"+queryProduct.getSku()+"已存在!");
+                }
+                GoodsProductEntity goodsProductEntity = new GoodsProductEntity();
+                BeanUtils.copyProperties(goodsProductDto,goodsProductEntity);
+                goodsProductEntity.setCreateTime(new Date());
+                goodsProductEntity.setCreaterSn(ShiroUtils.getUserId().toString());
+                goodsProductDao.save(goodsProductEntity);
+                count ++;
+            }
+        }
+    }
+
+    @Override
+    @Transactional
+    public String sendSelectProduct(Integer[] mallGoodsProductSns) {
+        List<GoodsProductEntity> goodsProductEntityList = goodsProductDao.selectByMallGoodsProductSns(mallGoodsProductSns);
+        List<GoodsProductDto> goodsProductDtoList = new ArrayList<>();
+        for (GoodsProductEntity goodsProductEntity : goodsProductEntityList) {
+            GoodsProductDto dto = new GoodsProductDto();
+            BeanUtils.copyProperties(goodsProductEntity,dto);
+            dto.setLegalUnit1Qty(goodsProductEntity.getLegalUnit1Qty().toString());
+            dto.setLegalUnit2Qty(goodsProductEntity.getLegalUnit2Qty().toString());
+            dto.setNetWeight(goodsProductEntity.getNetWeight().toString());
+            dto.setGrossWeight(goodsProductEntity.getGrossWeight().toString());
+            dto.setDeclPrice(goodsProductEntity.getDeclPrice().toString());
+            goodsProductDtoList.add(dto);
+        }
+        try {
+            ResponseMessage result = requestOmsProduct(goodsProductDtoList);
+            return result.getMsg();
+        }catch (Exception e){
+            e.printStackTrace();
+            LOGGER.error(e.getMessage());
+        }
+
+        return "请求失败,请联系管理员";
+    }
+
+    @Override
+    @Transactional
+    public String sendAllProduct() {
+        List<GoodsProductEntity> goodsProductEntityList = goodsProductDao.queryList(new HashMap<>());// 查询所有
+        if (goodsProductEntityList == null || goodsProductEntityList.size()==0){
+            return "无数据,请添加数据";
+        }
+        List<GoodsProductDto> goodsProductDtoList = new ArrayList<>();
+        for (GoodsProductEntity goodsProductEntity : goodsProductEntityList) {
+            GoodsProductDto dto = new GoodsProductDto();
+            BeanUtils.copyProperties(goodsProductEntity,dto);
+            dto.setLegalUnit1Qty(goodsProductEntity.getLegalUnit1Qty().toString());
+            dto.setLegalUnit2Qty(goodsProductEntity.getLegalUnit2Qty().toString());
+            dto.setNetWeight(goodsProductEntity.getNetWeight().toString());
+            dto.setGrossWeight(goodsProductEntity.getGrossWeight().toString());
+            dto.setDeclPrice(goodsProductEntity.getDeclPrice().toString());
+            goodsProductDtoList.add(dto);
+        }
+        try {
+            ResponseMessage result = requestOmsProduct(goodsProductDtoList);
+            return result.getMsg();
+        }catch (Exception e){
+            e.printStackTrace();
+            LOGGER.error(e.getMessage());
+        }
+        return "请求失败,请联系管理员";
+    }
+
+
+    private ResponseMessage requestOmsProduct(List<GoodsProductDto> goodsProductDtoList){
+        Map<String, String> sParaTemp = new TreeMap<String, String>();
+        PdProductDtoInfo pdProductDtoInfo = new PdProductDtoInfo();
+        pdProductDtoInfo.setPdProductDtoList(goodsProductDtoList);
+        sParaTemp.put("data", JSON.toJSONString(pdProductDtoInfo));
+        LOGGER.info("请求omsdata数据:" + sParaTemp.get("data"));
+        sParaTemp.put("merchId",omsMerchProperties.getMerchSn());
+        String timestamp = String.valueOf(System.currentTimeMillis()/1000);
+        sParaTemp.put("timestamp", timestamp);
+        //生成要请求给oms秘钥
+//        String sign = OmsSign.sign(sParaTemp,cus.getWaybill().get("secret-key"));
+        LOGGER.info("md5混淆码参数:" + omsMerchProperties.getMd5Salt());
+        String sign = OmsSign.sign(sParaTemp,omsMerchProperties.getMd5Salt());
+        sParaTemp.put("sign", sign);
+        //构建Request
+        String  url = omsMerchProperties.getAddPdProductListUrl();
+        Request request = com.kmall.admin.utils.oms.OkHttpUtils.buildRequest(url, JSON.toJSONString(sParaTemp));
+        LOGGER.info("oms的请求报文:" + request);
+        // 同步访问,返回结果字符串
+        String responseString = null;
+        try {
+
+            responseString = com.kmall.admin.utils.oms.OkHttpUtils.post(request);
+
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
+        LOGGER.info("oms的响应报文"+responseString);
+        //解析响应数据
+        Gson gson = new Gson();
+        ResponseMessage result = gson.fromJson(responseString, ResponseMessage.class);
+        if(result == null){
+            String info = "解析响应数据Result失败";
+            LOGGER.error("--- {}", info);
+            throw new RuntimeException(info);
+        }
+       return result;
+    }
+
+
+
+}

+ 128 - 0
kmall-admin/src/main/java/com/kmall/admin/utils/OkHttpUtils.java

@@ -0,0 +1,128 @@
+package com.kmall.admin.utils;
+
+import okhttp3.*;
+
+import java.io.IOException;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * @author Scott Chen
+ * @date 2017/3/13
+ */
+public class OkHttpUtils {
+
+    public static final MediaType JSON = MediaType.parse("application/json; charset=utf-8");
+    public static final int CONNEC_TIME = 20;
+    public static final int READ_TIME = 30;
+    public static final int WRITE_TIME = 30;
+
+    private static OkHttpClient okHttpClient = null;
+    static{
+        okHttpClient = new OkHttpClient.Builder()
+                .connectTimeout(CONNEC_TIME, TimeUnit.SECONDS)
+                .readTimeout(READ_TIME, TimeUnit.SECONDS)
+                .writeTimeout(WRITE_TIME, TimeUnit.SECONDS)
+                .build();
+    }
+
+    /**
+     * 构造RequestBody
+     *
+     * @param params
+     * @return
+     */
+    public static RequestBody buildRequestBody(Map<String, String> params) {
+        FormBody.Builder builder = new FormBody.Builder();
+        Iterator<Map.Entry<String, String>> iterator = params.entrySet().iterator();
+        while (iterator.hasNext()) {
+            Map.Entry<String, String> entry = iterator.next();
+            builder.add(entry.getKey(), entry.getValue());
+        }
+        return builder.build();
+    }
+
+    /**
+     * 以字符串数据构建Request(未使用)
+     * @param url
+     * @param json
+     * @return
+     */
+    public static Request buildRequest(String url, String json) {
+        RequestBody body = RequestBody.create(JSON, json);
+        return buildRequest(url, body);
+    }
+
+    /**
+     * 构建Request
+     * @param url
+     * @param body
+     * @return
+     */
+    public static Request buildRequest(String url, RequestBody body) {
+        return new Request.Builder()
+                .url(url)
+                .post(body)
+                .build();
+    }
+
+    /**
+     * 同步访问,返回结果字符串
+     * 可能超时
+     *
+     * @param request
+     * @return
+     * @throws IOException
+     */
+    public static String post(Request request) throws IOException {
+        Response response = okHttpClient.newCall(request).execute();
+        String result = "";
+        if (response.isSuccessful()) {
+            result = response.body().string();
+        }else {
+            throw new IOException("okhttp3 post exception: " + response);
+        }
+        return result;
+    }
+
+    /**
+     * 同步访问,返回Response
+     * 可能超时
+     *
+     * @param request
+     * @return
+     * @throws IOException
+     */
+    public static Response postReturnResponse(Request request)  throws IOException {
+        return okHttpClient.newCall(request).execute();
+    }
+
+    /**
+     * 异步访问,回调结果
+     * @param request
+     * @param responseCallback
+     */
+    public static void asyncPostCallback(Request request, Callback responseCallback) {
+        okHttpClient.newCall(request).enqueue(responseCallback);
+    }
+
+    /**
+     * 异步访问,无结果返回
+     * @param request
+     */
+    public static void asyncPost(Request request) {
+        okHttpClient.newCall(request).enqueue(new Callback() {
+            @Override
+            public void onFailure(Call call, IOException e) {
+
+            }
+
+            @Override
+            public void onResponse(Call call, Response response) throws IOException {
+
+            }
+        });
+    }
+
+}

+ 44 - 0
kmall-admin/src/main/resources/XmlTemplate/GoodsProductDtoList.xml

@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<workbook>
+    <worksheet name="Sheet1">
+        <section startRow="0" endRow="1"/>
+        <loop startRow="1" endRow="1" items="GoodsProductDtoList" var="GoodsProductDto"
+              varType="com.kmall.admin.dto.GoodsProductDto">
+            <section startRow="1" endRow="1">
+                <mapping row="1" col="0">GoodsProductDto.merchSn</mapping>
+                <mapping row="1" col="1">GoodsProductDto.sku</mapping>
+                <mapping row="1" col="2">GoodsProductDto.prodBarcode</mapping>
+                <mapping row="1" col="3">GoodsProductDto.prodName</mapping>
+                <mapping row="1" col="4">GoodsProductDto.prodBrand</mapping>
+                <mapping row="1" col="5">GoodsProductDto.unitCode</mapping>
+                <mapping row="1" col="6">GoodsProductDto.cusGoodsCode</mapping>
+                <mapping row="1" col="7">GoodsProductDto.cusDeclEle</mapping>
+                <mapping row="1" col="8">GoodsProductDto.oriCntCode</mapping>
+                <mapping row="1" col="9">GoodsProductDto.ciqProdModel</mapping>
+                <mapping row="1" col="10">GoodsProductDto.ciqMainEle</mapping>
+                <mapping row="1" col="11">GoodsProductDto.declCurrencyCode</mapping>
+                <mapping row="1" col="12">GoodsProductDto.netWeight</mapping>
+                <mapping row="1" col="13">GoodsProductDto.declPrice</mapping>
+                <mapping row="1" col="14">GoodsProductDto.legalUnit1Qty</mapping>
+                <mapping row="1" col="15">GoodsProductDto.legalUnit2Qty</mapping>
+                <mapping row="1" col="16">GoodsProductDto.ciqMonitorType</mapping>
+                <mapping row="1" col="17">GoodsProductDto.prodCompName</mapping>
+                <mapping row="1" col="18">GoodsProductDto.prodCompCntCode</mapping>
+                <mapping row="1" col="19">GoodsProductDto.itemRecordNo</mapping>
+                <mapping row="1" col="20">GoodsProductDto.isLaw</mapping>
+                <mapping row="1" col="21">GoodsProductDto.isGift</mapping>
+                <mapping row="1" col="22">GoodsProductDto.supplierName</mapping>
+                <mapping row="1" col="23">GoodsProductDto.supplierCntCode</mapping>
+                <mapping row="1" col="24">GoodsProductDto.grossWeight</mapping>
+                <mapping row="1" col="25">GoodsProductDto.localEmsNo</mapping>
+                <mapping row="1" col="26">GoodsProductDto.emsClassCode</mapping>
+                <mapping row="1" col="27">GoodsProductDto.thirdMerchSn</mapping>
+            </section>
+            <loopbreakcondition>
+                <rowcheck offset="0">
+                    <cellcheck offset="0">end</cellcheck>
+                </rowcheck>
+            </loopbreakcondition>
+        </loop>
+    </worksheet>
+</workbook>

+ 411 - 0
kmall-admin/src/main/resources/mybatis/mapper/GoodsProductDao.xml

@@ -0,0 +1,411 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="com.kmall.admin.dao.GoodsProductDao">
+
+    <resultMap type="com.kmall.admin.entity.GoodsProductEntity" id="goodsProductMap">
+        <result property="mallGoodsProductSn" column="mall_goods_product_sn"/>
+        <result property="merchSn" column="merch_sn"/>
+        <result property="thirdMerchSn" column="third_merch_sn"/>
+        <result property="prodBarcode" column="prod_barcode"/>
+        <result property="sku" column="sku"/>
+        <result property="cusGoodsCode" column="cus_goods_code"/>
+        <result property="prodName" column="prod_name"/>
+        <result property="ciqProdModel" column="ciq_prod_model"/>
+        <result property="prodBrand" column="prod_brand"/>
+        <result property="oriCntCode" column="ori_cnt_code"/>
+        <result property="unitCode" column="unit_code"/>
+        <result property="declPrice" column="decl_price"/>
+        <result property="declCurrencyCode" column="decl_currency_code"/>
+        <result property="supplierName" column="supplier_name"/>
+        <result property="supplierCntCode" column="supplier_cnt_code"/>
+        <result property="prodCompName" column="prod_comp_name"/>
+        <result property="prodCompCntCode" column="prod_comp_cnt_code"/>
+        <result property="ciqMainEle" column="ciq_main_ele"/>
+        <result property="ciqMonitorType" column="ciq_monitor_type"/>
+        <result property="isLaw" column="is_law"/>
+        <result property="isGift" column="is_gift"/>
+        <result property="cusDeclEle" column="cus_decl_ele"/>
+        <result property="createrSn" column="creater_sn"/>
+        <result property="createTime" column="create_time"/>
+        <result property="moderSn" column="moder_sn"/>
+        <result property="modTime" column="mod_time"/>
+        <result property="tstm" column="tstm"/>
+        <result property="exField" column="ex_field"/>
+        <result property="exField2" column="ex_field2"/>
+        <result property="exField3" column="ex_field3"/>
+        <result property="exField4" column="ex_field4"/>
+        <result property="exField5" column="ex_field5"/>
+        <result property="legalUnit1Qty" column="legal_unit1_qty"/>
+        <result property="netWeight" column="net_weight"/>
+        <result property="legalUnit2Qty" column="legal_unit2_qty"/>
+        <result property="grossWeight" column="gross_weight"/>
+        <result property="localEmsNo" column="local_ems_no"/>
+        <result property="itemRecordNo" column="item_record_no"/>
+        <result property="emsClassCode" column="ems_class_code"/>
+		<result property="isSend" column="is_send"/>
+    </resultMap>
+
+	<select id="queryObject" resultType="com.kmall.admin.entity.GoodsProductEntity">
+		select
+			`mall_goods_product_sn`,
+			`merch_sn`,
+			`third_merch_sn`,
+			`prod_barcode`,
+			`sku`,
+			`cus_goods_code`,
+			`prod_name`,
+			`ciq_prod_model`,
+			`prod_brand`,
+			`ori_cnt_code`,
+			`unit_code`,
+			`decl_price`,
+			`decl_currency_code`,
+			`supplier_name`,
+			`supplier_cnt_code`,
+			`prod_comp_name`,
+			`prod_comp_cnt_code`,
+			`ciq_main_ele`,
+			`ciq_monitor_type`,
+			`is_law`,
+			`is_gift`,
+			`cus_decl_ele`,
+			`creater_sn`,
+			`create_time`,
+			`moder_sn`,
+			`mod_time`,
+			`tstm`,
+			`ex_field`,
+			`ex_field2`,
+			`ex_field3`,
+			`ex_field4`,
+			`ex_field5`,
+			`legal_unit1_qty`,
+			`net_weight`,
+			`legal_unit2_qty`,
+			`gross_weight`,
+			`local_ems_no`,
+			`item_record_no`,
+			`is_send`,
+			`ems_class_code`
+		from mall_goods_product
+		where mall_goods_product_sn = #{id}
+	</select>
+
+	<select id="queryList" resultType="com.kmall.admin.entity.GoodsProductEntity">
+		select
+    		`mall_goods_product_sn`,
+    		`merch_sn`,
+    		`third_merch_sn`,
+    		`prod_barcode`,
+    		`sku`,
+    		`cus_goods_code`,
+    		`prod_name`,
+    		`ciq_prod_model`,
+    		`prod_brand`,
+    		`ori_cnt_code`,
+    		`unit_code`,
+    		`decl_price`,
+    		`decl_currency_code`,
+    		`supplier_name`,
+    		`supplier_cnt_code`,
+    		`prod_comp_name`,
+    		`prod_comp_cnt_code`,
+    		`ciq_main_ele`,
+    		`ciq_monitor_type`,
+    		`is_law`,
+    		`is_gift`,
+    		`cus_decl_ele`,
+    		`creater_sn`,
+    		`create_time`,
+    		`moder_sn`,
+    		`mod_time`,
+    		`tstm`,
+    		`ex_field`,
+    		`ex_field2`,
+    		`ex_field3`,
+    		`ex_field4`,
+    		`ex_field5`,
+    		`legal_unit1_qty`,
+    		`net_weight`,
+    		`legal_unit2_qty`,
+    		`gross_weight`,
+    		`local_ems_no`,
+    		`item_record_no`,
+			`is_send`,
+    		`ems_class_code`
+		from mall_goods_product
+		WHERE 1=1
+		<if test="name != null and name.trim() != ''">
+			AND name LIKE concat('%',#{name},'%')
+		</if>
+        <choose>
+            <when test="sidx != null and sidx.trim() != ''">
+                order by ${sidx} ${order}
+            </when>
+			<otherwise>
+                order by mall_goods_product_sn desc
+			</otherwise>
+        </choose>
+		<if test="offset != null and limit != null">
+			limit #{offset}, #{limit}
+		</if>
+	</select>
+	
+ 	<select id="queryTotal" resultType="int">
+		select count(*) from mall_goods_product
+		WHERE 1=1
+        <if test="name != null and name.trim() != ''">
+            AND name LIKE concat('%',#{name},'%')
+        </if>
+	</select>
+	<select id="selectByParams" resultType="com.kmall.admin.entity.GoodsProductEntity">
+		select
+		`mall_goods_product_sn`,
+		`merch_sn`,
+		`third_merch_sn`,
+		`prod_barcode`,
+		`sku`,
+		`cus_goods_code`,
+		`prod_name`,
+		`ciq_prod_model`,
+		`prod_brand`,
+		`ori_cnt_code`,
+		`unit_code`,
+		`decl_price`,
+		`decl_currency_code`,
+		`supplier_name`,
+		`supplier_cnt_code`,
+		`prod_comp_name`,
+		`prod_comp_cnt_code`,
+		`ciq_main_ele`,
+		`ciq_monitor_type`,
+		`is_law`,
+		`is_gift`,
+		`cus_decl_ele`,
+		`creater_sn`,
+		`create_time`,
+		`moder_sn`,
+		`mod_time`,
+		`tstm`,
+		`ex_field`,
+		`ex_field2`,
+		`ex_field3`,
+		`ex_field4`,
+		`ex_field5`,
+		`legal_unit1_qty`,
+		`net_weight`,
+		`legal_unit2_qty`,
+		`gross_weight`,
+		`local_ems_no`,
+		`item_record_no`,
+		`is_send`,
+		`ems_class_code`
+		from mall_goods_product
+		WHERE 1=1
+		<if test="sku != null and sku.trim() != ''">
+			AND sku = #{sku}
+		</if>
+		<if test="merchSn != null and merchSn.trim() != ''">
+			AND merch_sn = #{merchSn}
+		</if>
+		<if test="thirdMerchSn != null and thirdMerchSn.trim() != ''">
+			AND third_merch_sn = #{thirdMerchSn}
+		</if>
+	</select>
+	<select id="selectByMallGoodsProductSns" resultType="com.kmall.admin.entity.GoodsProductEntity">
+		select
+		`mall_goods_product_sn`,
+		`merch_sn`,
+		`third_merch_sn`,
+		`prod_barcode`,
+		`sku`,
+		`cus_goods_code`,
+		`prod_name`,
+		`ciq_prod_model`,
+		`prod_brand`,
+		`ori_cnt_code`,
+		`unit_code`,
+		`decl_price`,
+		`decl_currency_code`,
+		`supplier_name`,
+		`supplier_cnt_code`,
+		`prod_comp_name`,
+		`prod_comp_cnt_code`,
+		`ciq_main_ele`,
+		`ciq_monitor_type`,
+		`is_law`,
+		`is_gift`,
+		`cus_decl_ele`,
+		`creater_sn`,
+		`create_time`,
+		`moder_sn`,
+		`mod_time`,
+		`tstm`,
+		`ex_field`,
+		`ex_field2`,
+		`ex_field3`,
+		`ex_field4`,
+		`ex_field5`,
+		`legal_unit1_qty`,
+		`net_weight`,
+		`legal_unit2_qty`,
+		`gross_weight`,
+		`local_ems_no`,
+		`item_record_no`,
+		`is_send`,
+		`ems_class_code`
+		from mall_goods_product
+		WHERE 1=1
+		<if test="mallGoodsProductSns != null">
+			AND mall_goods_product_sn in
+			<foreach item="id" collection="mallGoodsProductSns" open="(" separator="," close=")">
+				#{id}
+			</foreach>
+		</if>
+
+	</select>
+
+	<insert id="save" parameterType="com.kmall.admin.entity.GoodsProductEntity">
+		insert into mall_goods_product(
+			`mall_goods_product_sn`,
+			`merch_sn`,
+			`third_merch_sn`,
+			`prod_barcode`,
+			`sku`,
+			`cus_goods_code`,
+			`prod_name`,
+			`ciq_prod_model`,
+			`prod_brand`,
+			`ori_cnt_code`,
+			`unit_code`,
+			`decl_price`,
+			`decl_currency_code`,
+			`supplier_name`,
+			`supplier_cnt_code`,
+			`prod_comp_name`,
+			`prod_comp_cnt_code`,
+			`ciq_main_ele`,
+			`ciq_monitor_type`,
+			`is_law`,
+			`is_gift`,
+			`cus_decl_ele`,
+			`creater_sn`,
+			`create_time`,
+			`moder_sn`,
+			`mod_time`,
+			`tstm`,
+			`ex_field`,
+			`ex_field2`,
+			`ex_field3`,
+			`ex_field4`,
+			`ex_field5`,
+			`legal_unit1_qty`,
+			`net_weight`,
+			`legal_unit2_qty`,
+			`gross_weight`,
+			`local_ems_no`,
+			`item_record_no`,
+			`is_send`,
+			`ems_class_code`)
+		values(
+			#{mallGoodsProductSn},
+			#{merchSn},
+			#{thirdMerchSn},
+			#{prodBarcode},
+			#{sku},
+			#{cusGoodsCode},
+			#{prodName},
+			#{ciqProdModel},
+			#{prodBrand},
+			#{oriCntCode},
+			#{unitCode},
+			#{declPrice},
+			#{declCurrencyCode},
+			#{supplierName},
+			#{supplierCntCode},
+			#{prodCompName},
+			#{prodCompCntCode},
+			#{ciqMainEle},
+			#{ciqMonitorType},
+			#{isLaw},
+			#{isGift},
+			#{cusDeclEle},
+			#{createrSn},
+			#{createTime},
+			#{moderSn},
+			#{modTime},
+			#{tstm},
+			#{exField},
+			#{exField2},
+			#{exField3},
+			#{exField4},
+			#{exField5},
+			#{legalUnit1Qty},
+			#{netWeight},
+			#{legalUnit2Qty},
+			#{grossWeight},
+			#{localEmsNo},
+			#{itemRecordNo},
+			'0',
+			#{emsClassCode})
+	</insert>
+	 
+	<update id="update" parameterType="com.kmall.admin.entity.GoodsProductEntity">
+		update mall_goods_product 
+		<set>
+			<if test="merchSn != null">`merch_sn` = #{merchSn}, </if>
+			<if test="thirdMerchSn != null">`third_merch_sn` = #{thirdMerchSn}, </if>
+			<if test="prodBarcode != null">`prod_barcode` = #{prodBarcode}, </if>
+			<if test="sku != null">`sku` = #{sku}, </if>
+			<if test="cusGoodsCode != null">`cus_goods_code` = #{cusGoodsCode}, </if>
+			<if test="prodName != null">`prod_name` = #{prodName}, </if>
+			<if test="ciqProdModel != null">`ciq_prod_model` = #{ciqProdModel}, </if>
+			<if test="prodBrand != null">`prod_brand` = #{prodBrand}, </if>
+			<if test="oriCntCode != null">`ori_cnt_code` = #{oriCntCode}, </if>
+			<if test="unitCode != null">`unit_code` = #{unitCode}, </if>
+			<if test="declPrice != null">`decl_price` = #{declPrice}, </if>
+			<if test="declCurrencyCode != null">`decl_currency_code` = #{declCurrencyCode}, </if>
+			<if test="supplierName != null">`supplier_name` = #{supplierName}, </if>
+			<if test="supplierCntCode != null">`supplier_cnt_code` = #{supplierCntCode}, </if>
+			<if test="prodCompName != null">`prod_comp_name` = #{prodCompName}, </if>
+			<if test="prodCompCntCode != null">`prod_comp_cnt_code` = #{prodCompCntCode}, </if>
+			<if test="ciqMainEle != null">`ciq_main_ele` = #{ciqMainEle}, </if>
+			<if test="ciqMonitorType != null">`ciq_monitor_type` = #{ciqMonitorType}, </if>
+			<if test="isLaw != null">`is_law` = #{isLaw}, </if>
+			<if test="isGift != null">`is_gift` = #{isGift}, </if>
+			<if test="cusDeclEle != null">`cus_decl_ele` = #{cusDeclEle}, </if>
+			<if test="createrSn != null">`creater_sn` = #{createrSn}, </if>
+			<if test="createTime != null">`create_time` = #{createTime}, </if>
+			<if test="moderSn != null">`moder_sn` = #{moderSn}, </if>
+			<if test="modTime != null">`mod_time` = #{modTime}, </if>
+			<if test="tstm != null">`tstm` = #{tstm}, </if>
+			<if test="exField != null">`ex_field` = #{exField}, </if>
+			<if test="exField2 != null">`ex_field2` = #{exField2}, </if>
+			<if test="exField3 != null">`ex_field3` = #{exField3}, </if>
+			<if test="exField4 != null">`ex_field4` = #{exField4}, </if>
+			<if test="exField5 != null">`ex_field5` = #{exField5}, </if>
+			<if test="legalUnit1Qty != null">`legal_unit1_qty` = #{legalUnit1Qty}, </if>
+			<if test="netWeight != null">`net_weight` = #{netWeight}, </if>
+			<if test="legalUnit2Qty != null">`legal_unit2_qty` = #{legalUnit2Qty}, </if>
+			<if test="grossWeight != null">`gross_weight` = #{grossWeight}, </if>
+			<if test="localEmsNo != null">`local_ems_no` = #{localEmsNo}, </if>
+			<if test="itemRecordNo != null">`item_record_no` = #{itemRecordNo}, </if>
+			<if test="isSend != null">`is_send` = #{isSend}, </if>
+			<if test="emsClassCode != null">`ems_class_code` = #{emsClassCode}</if>
+		</set>
+		where mall_goods_product_sn = #{mallGoodsProductSn}
+	</update>
+	
+	<delete id="delete">
+		delete from mall_goods_product where mall_goods_product_sn = #{value}
+	</delete>
+	
+	<delete id="deleteBatch">
+		delete from mall_goods_product where mall_goods_product_sn in 
+		<foreach item="mallGoodsProductSn" collection="array" open="(" separator="," close=")">
+			#{mallGoodsProductSn}
+		</foreach>
+	</delete>
+
+</mapper>

+ 172 - 0
kmall-admin/src/main/webapp/WEB-INF/page/shop/goodsproduct.html

@@ -0,0 +1,172 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <title>产品信息备案表</title>
+    #parse("sys/header.html")
+</head>
+<body>
+<div id="rrapp" v-cloak>
+	<div v-show="showList">
+        <Row :gutter="16">
+            <div class="search-group">
+                <i-col span="4">
+                    <i-input v-model="q.name" @on-enter="query" placeholder="名称"/>
+                </i-col>
+                <i-button @click="query">查询</i-button>
+                <i-button @click="reloadSearch">重置</i-button>
+            </div>
+            <div class="buttons-group">
+                <i-button type="info" @click="sendSelectProduct"><i class="fa fa-plus"></i>&nbsp;选中发送</i-button>
+                <i-button type="info" @click="sendAllProduct"><i class="fa fa-plus"></i>&nbsp;全部发送</i-button>
+                #if($shiro.hasPermission("goodsproduct:save"))
+                <i-button type="info" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</i-button>
+                #end
+                #if($shiro.hasPermission("goodsproduct:update"))
+                <i-button type="warning" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</i-button>
+                #end
+                #if($shiro.hasPermission("goodsproduct:delete"))
+                <i-button type="error" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</i-button>
+                #end
+                <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']"
+                            action="../goodsproduct/upload">
+                        <i-button type="ghost" icon="ios-cloud-upload-outline">商品导入</i-button>
+                    </Upload>
+                </i-col>
+                <a href="../statics/file/goods_product_export_yyyy_mm_dd_v1.0.0.xlsx">产品备案excel导入模板下载</a>&nbsp;&nbsp;&nbsp;&nbsp;
+            </div>
+        </Row>
+	    <table id="jqGrid"></table>
+	    <div id="jqGridPager"></div>
+    </div>
+
+    <Card v-show="!showList">
+        <p slot="title">{{title}}</p>
+		<i-form ref="formValidate" :model="goodsProduct" :rules="ruleValidate" :label-width="80">
+            <Form-item label="商户编号" prop="merchSn">
+                <i-input v-model="goodsProduct.merchSn" placeholder="商户编号"/>
+            </Form-item>
+            <Form-item label="第三方商户编号" prop="thirdMerchSn">
+                <i-input v-model="goodsProduct.thirdMerchSn" placeholder="第三方商户编号"/>
+            </Form-item>
+            <Form-item label="产品条码" prop="prodBarcode">
+                <i-input v-model="goodsProduct.prodBarcode" placeholder="产品条码"/>
+            </Form-item>
+            <Form-item label="sku" prop="sku">
+                <i-input v-model="goodsProduct.sku" placeholder="sku"/>
+            </Form-item>
+            <Form-item label="海关商品编码" prop="cusGoodsCode">
+                <i-input v-model="goodsProduct.cusGoodsCode" placeholder="海关商品编码"/>
+            </Form-item>
+            <Form-item label="中文名称" prop="prodName">
+                <i-input v-model="goodsProduct.prodName" placeholder="中文名称"/>
+            </Form-item>
+            <Form-item label="国检规格型号" prop="ciqProdModel">
+                <i-input v-model="goodsProduct.ciqProdModel" placeholder="国检规格型号"/>
+            </Form-item>
+            <Form-item label="品牌" prop="prodBrand">
+                <i-input v-model="goodsProduct.prodBrand" placeholder="品牌"/>
+            </Form-item>
+            <Form-item label="原产国代码,海关编码" prop="oriCntCode">
+                <i-input v-model="goodsProduct.oriCntCode" placeholder="原产国代码,海关编码"/>
+            </Form-item>
+            <Form-item label="计量单位代码,参见海关编码" prop="unitCode">
+                <i-input v-model="goodsProduct.unitCode" placeholder="计量单位代码,参见海关编码"/>
+            </Form-item>
+            <Form-item label="申报价格" prop="declPrice">
+                <i-input v-model="goodsProduct.declPrice" placeholder="申报价格"/>
+            </Form-item>
+            <Form-item label="申报币种代码,参见海关编码" prop="declCurrencyCode">
+                <i-input v-model="goodsProduct.declCurrencyCode" placeholder="申报币种代码,参见海关编码"/>
+            </Form-item>
+            <Form-item label="供应商企业名称,非必送" prop="supplierName">
+                <i-input v-model="goodsProduct.supplierName" placeholder="供应商企业名称,非必送"/>
+            </Form-item>
+            <Form-item label="供货商企业国别代码,非必送,海关编码" prop="supplierCntCode">
+                <i-input v-model="goodsProduct.supplierCntCode" placeholder="供货商企业国别代码,非必送,海关编码"/>
+            </Form-item>
+            <Form-item label="生产企业名称" prop="prodCompName">
+                <i-input v-model="goodsProduct.prodCompName" placeholder="生产企业名称"/>
+            </Form-item>
+            <Form-item label="生产企业国别名称" prop="prodCompCntCode">
+                <i-input v-model="goodsProduct.prodCompCntCode" placeholder="生产企业国别名称"/>
+            </Form-item>
+            <Form-item label="主要成分" prop="ciqMainEle">
+                <i-input v-model="goodsProduct.ciqMainEle" placeholder="主要成分"/>
+            </Form-item>
+            <Form-item label="国检监管类别"/>
+            </Form-item>
+            <Form-item label="是否法检   0:否 1:是" prop="isLaw">
+                <i-input v-model="goodsProduct.isLaw" placeholder="是否法检   0:否 1:是"/>
+            </Form-item>
+            <Form-item label="是否赠品 0:否 1:是" prop="isGift">
+                <i-input v-model="goodsProduct.isGift" placeholder="是否赠品 0:否 1:是"/>
+            </Form-item>
+            <Form-item label="海关申报要素,报统一版" prop="cusDeclEle">
+                <i-input v-model="goodsProduct.cusDeclEle" placeholder="海关申报要素,报统一版"/>
+            </Form-item>
+            <Form-item label="创建人编号" prop="createrSn">
+                <i-input v-model="goodsProduct.createrSn" placeholder="创建人编号"/>
+            </Form-item>
+            <Form-item label="创建时间,yyyy-MM-dd HH:mm:ss" prop="createTime">
+                <i-input v-model="goodsProduct.createTime" placeholder="创建时间,yyyy-MM-dd HH:mm:ss"/>
+            </Form-item>
+            <Form-item label="修改人编号" prop="moderSn">
+                <i-input v-model="goodsProduct.moderSn" placeholder="修改人编号"/>
+            </Form-item>
+            <Form-item label="修改时间,yyyy-MM-dd HH:mm:ss" prop="modTime">
+                <i-input v-model="goodsProduct.modTime" placeholder="修改时间,yyyy-MM-dd HH:mm:ss"/>
+            </Form-item>
+            <Form-item label="时间戳" prop="tstm">
+                <i-input v-model="goodsProduct.tstm" placeholder="时间戳"/>
+            </Form-item>
+            <Form-item label="" prop="exField">
+                <i-input v-model="goodsProduct.exField" placeholder=""/>
+            </Form-item>
+            <Form-item label="" prop="exField2">
+                <i-input v-model="goodsProduct.exField2" placeholder=""/>
+            </Form-item>
+            <Form-item label="" prop="exField3">
+                <i-input v-model="goodsProduct.exField3" placeholder=""/>
+            </Form-item>
+            <Form-item label="" prop="exField4">
+                <i-input v-model="goodsProduct.exField4" placeholder=""/>
+            </Form-item>
+            <Form-item label="" prop="exField5">
+                <i-input v-model="goodsProduct.exField5" placeholder=""/>
+            </Form-item>
+            <Form-item label="第一法定单位数量" prop="legalUnit1Qty">
+                <i-input v-model="goodsProduct.legalUnit1Qty" placeholder="第一法定单位数量"/>
+            </Form-item>
+            <Form-item label="净重,kg" prop="netWeight">
+                <i-input v-model="goodsProduct.netWeight" placeholder="净重,kg"/>
+            </Form-item>
+            <Form-item label="第二法定单位数量" prop="legalUnit2Qty">
+                <i-input v-model="goodsProduct.legalUnit2Qty" placeholder="第二法定单位数量"/>
+            </Form-item>
+            <Form-item label="毛重,kg" prop="grossWeight">
+                <i-input v-model="goodsProduct.grossWeight" placeholder="毛重,kg"/>
+            </Form-item>
+            <Form-item label="园区账册编号" prop="localEmsNo">
+                <i-input v-model="goodsProduct.localEmsNo" placeholder="园区账册编号"/>
+            </Form-item>
+            <Form-item label="园区商品序号" prop="itemRecordNo">
+                <i-input v-model="goodsProduct.itemRecordNo" placeholder="园区商品序号"/>
+            </Form-item>
+            <Form-item label="账册分类代码" prop="emsClassCode">
+                <i-input v-model="goodsProduct.emsClassCode" placeholder="账册分类代码"/>
+            </Form-item>
+            <Form-item>
+                <i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button>
+                <i-button type="warning" @click="reload" style="margin-left: 8px"/>返回</i-button>
+                <i-button type="ghost" @click="handleReset('formValidate')" style="margin-left: 8px">重置</i-button>
+            </Form-item>
+        </i-form>
+	</Card>
+</div>
+
+<script src="${rc.contextPath}/js/shop/goodsproduct.js?_${date.systemTime}"></script>
+</body>
+</html>

+ 283 - 0
kmall-admin/src/main/webapp/js/shop/goodsproduct.js

@@ -0,0 +1,283 @@
+$(function () {
+    $("#jqGrid").jqGrid({
+        url: '../goodsproduct/list',
+        datatype: "json",
+        colModel: [
+			{label: 'mallGoodsProductSn', name: 'mallGoodsProductSn', index: 'mall_goods_product_sn', key: true, hidden: true},
+			{label: '商户编号', name: 'merchSn', index: 'merch_sn', width: 80},
+			{label: '第三方商户编号', name: 'thirdMerchSn', index: 'third_merch_sn', width: 80},
+			{label: '产品条码', name: 'prodBarcode', index: 'prod_barcode', width: 80},
+			{label: 'sku', name: 'sku', index: 'sku', width: 80},
+			{label: '海关商品编码', name: 'cusGoodsCode', index: 'cus_goods_code', width: 80},
+			{label: '中文名称', name: 'prodName', index: 'prod_name', width: 80},
+			{label: '国检规格型号', name: 'ciqProdModel', index: 'ciq_prod_model', width: 80},
+			{label: '品牌', name: 'prodBrand', index: 'prod_brand', width: 80},
+			{label: '原产国代码', name: 'oriCntCode', index: 'ori_cnt_code', width: 80},
+			{label: '计量单位代码', name: 'unitCode', index: 'unit_code', width: 80},
+			{label: '申报价格', name: 'declPrice', index: 'decl_price', width: 80},
+			{label: '申报币种代码', name: 'declCurrencyCode', index: 'decl_currency_code', width: 80},
+			{label: '供应商企业名称', name: 'supplierName', index: 'supplier_name', width: 80},
+			{label: '供货商企业国别代码', name: 'supplierCntCode', index: 'supplier_cnt_code', width: 80},
+			{label: '生产企业名称', name: 'prodCompName', index: 'prod_comp_name', width: 80},
+			{label: '生产企业国别名称', name: 'prodCompCntCode', index: 'prod_comp_cnt_code', width: 80},
+			{label: '主要成分', name: 'ciqMainEle', index: 'ciq_main_ele', width: 80},
+			{label: '国检监管类别', name: 'ciqMonitorType', index: 'ciq_monitor_type', width: 80},
+			{label: '是否法检', name: 'isLaw', index: 'is_law', width: 80,
+				formatter: function (value) {
+					if (value == '0') {
+						return '否';
+					} else if (value == '1') {
+						return '是';
+					}
+					return '';
+				}},
+			{label: '是否赠品', name: 'isGift', index: 'is_gift', width: 80,
+				formatter: function (value) {
+					if (value == '0') {
+						return '否';
+					} else if (value == '1') {
+						return '是';
+					}
+					return '';
+				}},
+			{label: '第一法定单位数量', name: 'legalUnit1Qty', index: 'legal_unit1_qty', width: 80},
+			{label: '净重,kg', name: 'netWeight', index: 'net_weight', width: 80},
+			{label: '第二法定单位数量', name: 'legalUnit2Qty', index: 'legal_unit2_qty', width: 80},
+			{label: '毛重,kg', name: 'grossWeight', index: 'gross_weight', width: 80},
+			{label: '园区账册编号', name: 'localEmsNo', index: 'local_ems_no', width: 80},
+			{label: '园区商品序号', name: 'itemRecordNo', index: 'item_record_no', width: 80},
+			{label: '账册分类代码', name: 'emsClassCode', index: 'ems_class_code', width: 80},
+			{label: '是否发送', name: 'isSend', index: 'is_send', width: 80,formatter: function (value) {
+					if (value == '0') {
+						return '未发送';
+					} else if (value == '1') {
+						return '发送成功';
+					} else if (value == '2') {
+						return '发送失败';
+					}
+					return '';
+				}},
+			{label: '海关申报要素', name: 'cusDeclEle', index: 'cus_decl_ele', width: 80},
+			{label: '创建人编号', name: 'createrSn', index: 'creater_sn', width: 80},
+			{label: '创建时间', name: 'createTime', index: 'create_time', width: 80,
+				formatter: function (value) {
+					return transDate(value, 'yyyy-MM-dd hh:mm:ss');
+				}},
+			{label: '修改人编号', name: 'moderSn', index: 'moder_sn', width: 80},
+			{label: '修改时间', name: 'modTime', index: 'mod_time', width: 80,
+				formatter: function (value) {
+					return transDate(value, 'yyyy-MM-dd hh:mm:ss');
+				}},
+
+			],
+		viewrecords: true,
+        height: 550,
+        rowNum: 10,
+        rowList: [10, 30, 50],
+        rownumbers: true,
+        rownumWidth: 25,
+        autowidth: true,
+        multiselect: true,
+        pager: "#jqGridPager",
+        jsonReader: {
+            root: "page.list",
+            page: "page.currPage",
+            total: "page.totalPage",
+            records: "page.totalCount"
+        },
+        prmNames: {
+            page: "page",
+            rows: "limit",
+            order: "order"
+        },
+        gridComplete: function () {
+            $("#jqGrid").closest(".ui-jqgrid-bdiv").css({"overflow-x": "hidden"});
+        }
+    });
+});
+
+var exportMsg;
+
+let vm = new Vue({
+	el: '#rrapp',
+	data: {
+        showList: true,
+        title: null,
+		goodsProduct: {},
+		ruleValidate: {
+			name: [
+				{required: true, message: '名称不能为空', trigger: 'blur'}
+			]
+		},
+		q: {
+		    name: ''
+		}
+	},
+	methods: {
+		query: function () {
+			vm.reload();
+		},
+		add: function () {
+			vm.showList = false;
+			vm.title = "新增";
+			vm.goodsProduct = {};
+		},
+		update: function (event) {
+            let mallGoodsProductSn = getSelectedRow();
+			if (mallGoodsProductSn == null) {
+				return;
+			}
+			vm.showList = false;
+            vm.title = "修改";
+
+            vm.getInfo(mallGoodsProductSn)
+		},
+		saveOrUpdate: function (event) {
+            let url = vm.goodsProduct.mallGoodsProductSn == null ? "../goodsproduct/save" : "../goodsproduct/update";
+			$.ajax({
+				type: "POST",
+			    url: url,
+			    contentType: "application/json",
+			    data: JSON.stringify(vm.goodsProduct),
+                success: function (r) {
+                    if (r.code === 0) {
+                        alert('操作成功', function (index) {
+                            vm.reload();
+                        });
+                    } else {
+                        alert(r.msg);
+                    }
+                }
+			});
+		},
+		del: function (event) {
+            let mallGoodsProductSns = getSelectedRows();
+			if (mallGoodsProductSns == null){
+				return;
+			}
+
+			confirm('确定要删除选中的记录?', function () {
+				$.ajax({
+					type: "POST",
+				    url: "../goodsproduct/delete",
+				    contentType: "application/json",
+				    data: JSON.stringify(mallGoodsProductSns),
+				    success: function (r) {
+						if (r.code == 0) {
+							alert('操作成功', function (index) {
+								$("#jqGrid").trigger("reloadGrid");
+							});
+						} else {
+							alert(r.msg);
+						}
+					}
+				});
+			});
+		},
+		getInfo: function(mallGoodsProductSn){
+			$.get("../goodsproduct/info/"+mallGoodsProductSn, function (r) {
+                vm.goodsProduct = r.goodsProduct;
+            });
+		},
+        reloadSearch: function() {
+            vm.q = {
+                name: ''
+            }
+            vm.reload();
+		},
+		reload: function (event) {
+			vm.showList = true;
+            let page = $("#jqGrid").jqGrid('getGridParam', 'page');
+			$("#jqGrid").jqGrid('setGridParam', {
+                postData: {'name': vm.q.name},
+                page: page
+            }).trigger("reloadGrid");
+            vm.handleReset('formValidate');
+		},
+        handleSubmit: function (name) {
+            handleSubmitValidate(this, name, function () {
+                vm.saveOrUpdate()
+            });
+        },
+        handleReset: function (name) {
+            handleResetForm(this, name);
+        },
+		uploadExcelSuccess: function (data) {
+			// console.log(data);
+			if(data.code==0){
+				alert('导入成功', function (index) {
+					$("#jqGrid").trigger("reloadGrid");
+				});
+			}else{
+				alert(data.msg);
+			}
+			setTimeout(exportMsg, 100);
+		},
+		uploadExcelError: function () {
+			alert('上传出现异常,请重试!');
+			setTimeout(exportMsg, 100);
+		},
+		uploadExcelProgress:function(event, file, fileList){
+			console.log("上传中")
+			console.log(event)
+			console.log(file)
+			console.log(fileList)
+			console.log("上传中")
+			exportMsg = this.$Message.loading({
+				content: 'Loading...',
+				duration: 0
+			});
+			// setTimeout(msg, 3000);
+		},
+		uploadExcelFormatError: function (file) {
+			this.$Notice.warning({
+				title: '文件格式不正确',
+				desc: '文件 ' + file.name + ' 格式不正确,请上传 xls 或 xlsx 格式的文件。'
+			});
+			setTimeout(exportMsg, 100);
+		},
+		sendSelectProduct: function (event) {
+			let mallGoodsProductSns = getSelectedRows();
+			if (mallGoodsProductSns == null){
+				return;
+			}
+
+			confirm('确定要发送选中的产品备案信息?', function () {
+				$.ajax({
+					type: "POST",
+					url: "../goodsproduct/sendSelectProduct",
+					contentType: "application/json",
+					data: JSON.stringify(mallGoodsProductSns),
+					success: function (r) {
+						if (r.code == 0) {
+							alert(r.msg, function (index) {
+								$("#jqGrid").trigger("reloadGrid");
+							});
+						} else {
+							alert(r.msg);
+						}
+					}
+				});
+			});
+		},
+		sendAllProduct: function (event) {
+
+			confirm('确定要发送所有的产品备案信息?', function () {
+				$.ajax({
+					type: "POST",
+					url: "../goodsproduct/sendAllProduct",
+					contentType: "application/json",
+					success: function (r) {
+						if (r.code == 0) {
+							alert(r.msg, function (index) {
+								$("#jqGrid").trigger("reloadGrid");
+							});
+						} else {
+							alert(r.msg);
+						}
+					}
+				});
+			});
+		}
+	}
+});

BIN
kmall-admin/src/main/webapp/statics/file/goods_product_export_yyyy_mm_dd_v1.0.0.xlsx


+ 2 - 0
kmall-common/src/main/java/com/kmall/common/constant/JxlsXmlTemplateName.java

@@ -54,4 +54,6 @@ public class JxlsXmlTemplateName {
     public static final String TAX_ORDER_DTO_LIST = "/XmlTemplate/TaxOrderDtoList.xml";
     // 品牌导入
     public static final String BRAND_DTO_LIST = "/XmlTemplate/BrandDtoList.xml";
+    // 产品备案导入
+    public static final String GOODS_PRODUCT_DTO_LIST = "/XmlTemplate/GoodsProductDtoList.xml";
 }

+ 11 - 0
kmall-manager/src/main/java/com/kmall/manager/manager/merch/OmsMerchProperties.java

@@ -31,6 +31,17 @@ public class OmsMerchProperties implements Serializable {
 
     private String queryInveResponseUrl;
 
+    private String addPdProductListUrl;
+
+
+    public String getAddPdProductListUrl() {
+        return addPdProductListUrl;
+    }
+
+    public void setAddPdProductListUrl(String addPdProductListUrl) {
+        this.addPdProductListUrl = addPdProductListUrl;
+    }
+
     public String getMerchSn() {
         return merchSn;
     }

+ 5 - 0
kmall-manager/src/main/resources/conf/oms-merch.properties

@@ -12,6 +12,11 @@ merch.thirdSn=CW001
 merch.queryOrderUrl=http://ws.ds-bay.com/al/shop/order/query
 merch.queryInveResponseUrl=http://ws.ds-bay.com/al/queryInveResponse
 
+#\u7533\u8BF7\u4EA7\u54C1\u5907\u6848\u63A5\u53E3
+#merch.addPdProductListUrl=http://ws.ds-bay.com/al/product/addPdProductList
+#\u7533\u8BF7\u4EA7\u54C1\u5907\u6848\u63A5\u53E3(\u672C\u5730\u6D4B\u8BD5)
+merch.addPdProductListUrl=http://127.0.0.1:8680/al/product/addPdProductList
+
 #ccnet\u751F\u4EA7\u73AF\u5883\u67E5\u8BE2\u652F\u4ED8\u5355\u3001\u7535\u5B50\u8BA2\u5355\u3001\u8FD0\u5355\u5931\u8D25\u8BA2\u5355\u63A5\u53E3
 merch.wxOrderResendUrl=http://8.135.102.238:8680/wx/wxOrderResendQueryAll
 #oms\u6D4B\u8BD5\u73AF\u5883\u5BC6\u94A5

+ 1 - 0
kmall-manager/src/main/resources/spring/spring-oms-merch.xml

@@ -26,5 +26,6 @@
         <property name="thirdSn" value="${merch.thirdSn}"/>
         <property name="queryOrderUrl" value="${merch.queryOrderUrl}"/>
         <property name="queryInveResponseUrl" value="${merch.queryInveResponseUrl}"/>
+        <property name="addPdProductListUrl" value="${merch.addPdProductListUrl}"/>
     </bean>
 </beans>