Jelajahi Sumber

Merge branch 'feature/eccs-upgrade' of lvjian/eccs into feature/eccs-upgrade

吕健 2 tahun lalu
induk
melakukan
9fe4181d22

+ 6 - 3
eccs-biz/src/main/java/com/emato/biz/controller/mall/MallInveMngController.java

@@ -2,6 +2,7 @@ package com.emato.biz.controller.mall;
 
 import java.util.List;
 
+import com.emato.biz.domain.mall.MallGoodsVO;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -42,7 +43,8 @@ public class MallInveMngController extends BaseController
     public TableDataInfo list(MallInveMng mallInveMng)
     {
         startPage();
-        List<MallInveMng> list = mallInveMngService.selectMallInveMngList(mallInveMng);
+        //List<MallInveMng> list = mallInveMngService.selectMallInveMngList(mallInveMng);
+        List<MallGoodsVO> list = mallInveMngService.getMalGoodsVOList(mallInveMng);
         return getDataTable(list);
     }
 
@@ -54,8 +56,9 @@ public class MallInveMngController extends BaseController
     @GetMapping("/export")
     public AjaxResult export(MallInveMng mallInveMng)
     {
-        List<MallInveMng> list = mallInveMngService.selectMallInveMngList(mallInveMng);
-        ExcelUtil<MallInveMng> util = new ExcelUtil<MallInveMng>(MallInveMng.class);
+        //List<MallInveMng> list = mallInveMngService.selectMallInveMngList(mallInveMng);
+        List<MallGoodsVO> list = mallInveMngService.getMalGoodsVOList(mallInveMng);
+        ExcelUtil<MallGoodsVO> util = new ExcelUtil<MallGoodsVO>(MallGoodsVO.class);
         return util.exportExcel(list, "mallinvemng");
     }
 

+ 138 - 0
eccs-biz/src/main/java/com/emato/biz/domain/mall/MallGoodsVO.java

@@ -0,0 +1,138 @@
+package com.emato.biz.domain.mall;
+
+import com.emato.common.annotation.Excel;
+
+/**
+ * Mall 商品信息 VO
+ *
+ * @author frankeleyn
+ * @email lvjian@qhdswl.com
+ * @date 2023/4/14 10:19
+ */
+public class MallGoodsVO {
+    /** 商户编号 */
+    @Excel(name = "商户编号")
+    private String merchSn;
+
+    /** 商户名称 */
+    @Excel(name = "商户名称")
+    private String merchName;
+
+    /** SKU */
+    @Excel(name = "SKU")
+    private String sku;
+
+    /** PLU */
+    @Excel(name = "PLU")
+    private String plu;
+
+    @Excel(name = "mychemId")
+    private String mychemId;
+
+    @Excel(name ="商品名称")
+    private String goodsName;
+
+    /** 商品英文名称 */
+    @Excel(name = "商品英文名称")
+    private String englishName;
+
+    /** 品牌 */
+    @Excel(name = "品牌")
+    private String brand;
+
+    /** 库存数 */
+    @Excel(name = "库存数")
+    private Long inveNum;
+
+    /** 可用数 */
+    /*@Excel(name = "可用数")
+    private Long validNum;*/
+
+    @Override
+    public String toString() {
+        return "MallInveVO{" +
+                "merchSn='" + merchSn + '\'' +
+                ", merchName='" + merchName + '\'' +
+                ", sku='" + sku + '\'' +
+                ", plu='" + plu + '\'' +
+                ", mychemId='" + mychemId + '\'' +
+                ", goodsName='" + goodsName + '\'' +
+                ", englishName='" + englishName + '\'' +
+                ", brand='" + brand + '\'' +
+                ", inveNum=" + inveNum +
+                '}';
+    }
+
+    public String getMerchSn() {
+        return merchSn;
+    }
+
+    public void setMerchSn(String merchSn) {
+        this.merchSn = merchSn;
+    }
+
+    public String getMerchName() {
+        return merchName;
+    }
+
+    public void setMerchName(String merchName) {
+        this.merchName = merchName;
+    }
+
+    public String getSku() {
+        return sku;
+    }
+
+    public void setSku(String sku) {
+        this.sku = sku;
+    }
+
+    public String getPlu() {
+        return plu;
+    }
+
+    public void setPlu(String plu) {
+        this.plu = plu;
+    }
+
+    public String getMychemId() {
+        return mychemId;
+    }
+
+    public void setMychemId(String mychemId) {
+        this.mychemId = mychemId;
+    }
+
+    public String getGoodsName() {
+        return goodsName;
+    }
+
+    public void setGoodsName(String goodsName) {
+        this.goodsName = goodsName;
+    }
+
+
+    public String getEnglishName() {
+        return englishName;
+    }
+
+    public void setEnglishName(String englishName) {
+        this.englishName = englishName;
+    }
+
+    public String getBrand() {
+        return brand;
+    }
+
+    public void setBrand(String brand) {
+        this.brand = brand;
+    }
+
+    public Long getInveNum() {
+        return inveNum;
+    }
+
+    public void setInveNum(Long inveNum) {
+        this.inveNum = inveNum;
+    }
+}

+ 25 - 0
eccs-biz/src/main/java/com/emato/biz/mapper/mall/MallGoodsMapper.java

@@ -0,0 +1,25 @@
+package com.emato.biz.mapper.mall;
+
+import com.emato.biz.domain.mall.MallGoodsVO;
+import com.emato.biz.domain.mall.MallInveMng;
+
+import java.util.List;
+
+/**
+ * 商品信息 Mapper
+ *
+ * @author frankeleyn
+ * @email lvjian@qhdswl.com
+ * @date 2023/4/14 10:40
+ */
+public interface MallGoodsMapper {
+
+    /**
+     * 查询商品信息 VO 列表
+     *
+     * @param mallInveMng
+     * @return
+     */
+    List<MallGoodsVO> selectMallGoodsList(MallInveMng mallInveMng);
+
+}

+ 7 - 1
eccs-biz/src/main/java/com/emato/biz/mapper/warehouse/WbInveMngMapper.java

@@ -19,6 +19,12 @@ public interface WbInveMngMapper {
      * @param oWbInveMng 库存管理
      * @return 库存管理,wms入库回传时,增加库存数集合
      */
-    public List<OWbInveMng> selectWbInveMngList(OWbInveMng oWbInveMng);
+    List<OWbInveMng> selectWbInveMngList(OWbInveMng oWbInveMng);
 
+    /**
+     * 保存或修改仓库库存
+     *
+     * @param oWbInveMng
+     */
+    void saveOrUpdate(OWbInveMng oWbInveMng);
 }

+ 7 - 0
eccs-biz/src/main/java/com/emato/biz/mapper/warehouse/WbMerchShopInveMapper.java

@@ -22,4 +22,11 @@ public interface WbMerchShopInveMapper {
      */
     List<OWbMerchShopInve> selectWbMerchShopInveList(OWbMerchShopInve oWbMerchShopInve);
 
+    /**
+     * 保存或修改商户门店库存
+     *
+     * @param oWbMerchShopInve
+     */
+    void saveOrUpdate(OWbMerchShopInve oWbMerchShopInve);
+
 }

+ 23 - 2
eccs-biz/src/main/java/com/emato/biz/service/impl/MallInveMngServiceImpl.java

@@ -8,10 +8,14 @@ import java.util.Map;
 
 import com.alibaba.fastjson.JSONArray;
 import com.emato.biz.config.KmallConfig;
+import com.emato.biz.domain.mall.MallGoodsVO;
+import com.emato.biz.mapper.mall.MallGoodsMapper;
 import com.emato.common.utils.DateUtils;
 import com.emato.common.utils.oms.OkHttpUtils;
 import okhttp3.Request;
 import okhttp3.RequestBody;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.emato.biz.mapper.mall.MallInveMngMapper;
@@ -19,6 +23,8 @@ import com.emato.biz.domain.mall.MallInveMng;
 import com.emato.biz.service.mall.IMallInveMngService;
 import org.springframework.transaction.annotation.Transactional;
 
+import javax.annotation.Resource;
+
 /**
  * 库存管理,wms入库回传时,增加库存数Service业务层处理
  *
@@ -28,9 +34,25 @@ import org.springframework.transaction.annotation.Transactional;
 @Service
 public class MallInveMngServiceImpl implements IMallInveMngService
 {
+    Logger log = LoggerFactory.getLogger(MallInveMngServiceImpl.class);
+
     @Autowired
     private MallInveMngMapper mallInveMngMapper;
 
+    @Resource
+    private MallGoodsMapper mallGoodsMapper;
+
+    /**
+     * 查询商品信息
+     *
+     * @param mallInveMng
+     * @return
+     */
+    @Override
+    public List<MallGoodsVO> getMalGoodsVOList(MallInveMng mallInveMng) {
+        return mallGoodsMapper.selectMallGoodsList(mallInveMng);
+    }
+
     /**
      * 查询库存管理,wms入库回传时,增加库存数
      *
@@ -153,8 +175,7 @@ public class MallInveMngServiceImpl implements IMallInveMngService
                 mallInveMngMapper.saveOrUpdate(mallInveMng);
             }
         } catch (Exception e) {
-            e.printStackTrace();
-
+            log.error("拉取 Kmall 电商库存异常 => ", e);
             return 0;
         }
         return 1;

+ 2 - 8
eccs-biz/src/main/java/com/emato/biz/service/impl/OWbInveMngServiceImpl.java

@@ -157,28 +157,22 @@ public class OWbInveMngServiceImpl implements IOWbInveMngService
         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混淆码参数:" + OmsConfig.getMd5Salt());
         String sign = OmsSign.sign(sParaTemp,OmsConfig.getMd5Salt());
         sParaTemp.put("sign", sign);
         //构建Request
         String  url = OmsConfig.getQueryMngInveUrl();
-//        url = "http://127.0.0.1:8680/al/shop/order/query";
         String jsonParam = JSONObject.toJSONString(sParaTemp);
         Request request = OkHttpUtils.buildRequest(jsonParam,url,"");
         LOGGER.info("oms的请求报文:" + request);
         // 同步访问,返回结果字符串
         String responseString = null;
         try {
-            // url = "http://120.76.26.84:8680/al/queryOmsInfo/queryInveMng";
             JSONObject jsonObject = httpPost(url,JSONObject.parseObject(jsonParam));
-//            responseString = OkHttpUtils.post(request,null);
-
 
             LOGGER.info("oms的响应报文"+jsonObject.toString());
 
             //解析响应数据
-//            JSONObject jsonObject = JSONObject.parseObject(responseString);
             JSONArray result = (JSONArray) jsonObject.get("data");
             Object msg = jsonObject.get("msg");
             Object code = jsonObject.get("code");
@@ -192,8 +186,8 @@ public class OWbInveMngServiceImpl implements IOWbInveMngService
 
                 JSONObject o = (JSONObject) result.get(i);
                 OWbInveMng oWbInveMng = o.toJavaObject(OWbInveMng.class);
-    //                OWbInveMng wb = (OWbInveMng) o;
-                oWbInveMngMapper.saveOrUpdate(oWbInveMng);
+                //oWbInveMngMapper.saveOrUpdate(oWbInveMng);
+                wbInveMngMapper.saveOrUpdate(oWbInveMng);
             }
 
             if("202".equals(code)){

+ 4 - 7
eccs-biz/src/main/java/com/emato/biz/service/impl/OWbMerchShopInveServiceImpl.java

@@ -141,14 +141,12 @@ public class OWbMerchShopInveServiceImpl implements IOWbMerchShopInveService
         sParaTemp.put("merchId",OmsConfig.getMerchSn());
         String timestamp = String.valueOf(System.currentTimeMillis()/1000);
         sParaTemp.put("timestamp", timestamp);
-        //生成要请求给oms秘钥
-//        String sign = OmsSign.sign(sParaTemp,cus.getWaybill().get("secret-key"));
+        //生成要请求给 oms 秘钥
         LOGGER.info("md5混淆码参数:" + OmsConfig.getMd5Salt());
         String sign = OmsSign.sign(sParaTemp,OmsConfig.getMd5Salt());
         sParaTemp.put("sign", sign);
-        //构建Request
+        //构建 Request
         String  url = OmsConfig.getQueryShopMngInveUrl();
-//        url = "http://127.0.0.1:8680/al/shop/order/query";
         Request request = OkHttpUtils.buildRequest(url, JSON.toJSONString(sParaTemp));
         LOGGER.info("oms的请求报文:" + request);
         // 同步访问,返回结果字符串
@@ -160,8 +158,6 @@ public class OWbMerchShopInveServiceImpl implements IOWbMerchShopInveService
         } catch (Exception e) {
             LOGGER.error("拉取 OMS 门店库存数据异常 => ", e);
             throw new ServiceException("拉取 OMS 门店库存数据异常");
-            //return 1;
-//            throw e;
         }
 
         try {
@@ -182,7 +178,8 @@ public class OWbMerchShopInveServiceImpl implements IOWbMerchShopInveService
 
                 JSONObject o = (JSONObject) result.get(i);
                 OWbMerchShopInve oWbMerchShopInve = o.toJavaObject(OWbMerchShopInve.class);
-                oWbMerchShopInveMapper.saveOrUpdate(oWbMerchShopInve);
+                //oWbMerchShopInveMapper.saveOrUpdate(oWbMerchShopInve);
+                wbMerchShopInveMapper.saveOrUpdate(oWbMerchShopInve);
             }
         } catch (Exception e) {
             LOGGER.error("拉取 OMS 数据后,插入数据异常 => ", e);

+ 10 - 0
eccs-biz/src/main/java/com/emato/biz/service/mall/IMallInveMngService.java

@@ -1,6 +1,8 @@
 package com.emato.biz.service.mall;
 
 import java.util.List;
+
+import com.emato.biz.domain.mall.MallGoodsVO;
 import com.emato.biz.domain.mall.MallInveMng;
 
 /**
@@ -12,6 +14,14 @@ import com.emato.biz.domain.mall.MallInveMng;
 public interface IMallInveMngService
 {
     /**
+     * 查询商品信息
+     *
+     * @param mallInveMng
+     * @return
+     */
+    List<MallGoodsVO> getMalGoodsVOList(MallInveMng mallInveMng);
+
+    /**
      * 查询库存管理,wms入库回传时,增加库存数
      *
      * @param inveSn 库存管理,wms入库回传时,增加库存数ID

+ 10 - 10
eccs-biz/src/main/resources/kmall-config.yml

@@ -9,16 +9,16 @@ kmall:
 
 #  # 测试环境地址
 #  # 查询所有库存接口
-#  queryAllInveMngUrl: http://183.62.225.124:8080/ktoeccs/queryAllGoodsInfo
-#  # 查询门店库存接口
-#  queryAllShopInveMngUrl: http://183.62.225.124:8080/ktoeccs/queryAllStoreProductInfo
-#  # 向Kmall发送要从Kmall获取数据的请求
-#  requestToKmall: http://183.62.225.124:8080/ktoeccs/sendToEccs
-
-#   生产环境地址
-  queryAllInveMngUrl: http://8.135.102.238:8080/ktoeccs/queryAllGoodsInfo
+  queryAllInveMngUrl: http://183.62.225.124:8080/ktoeccs/queryAllGoodsInfo
   # 查询门店库存接口
-  queryAllShopInveMngUrl: http://8.135.102.238:8080/ktoeccs/queryAllStoreProductInfo
+  queryAllShopInveMngUrl: http://183.62.225.124:8080/ktoeccs/queryAllStoreProductInfo
   # 向Kmall发送要从Kmall获取数据的请求
-  requestToKmall: http://8.135.102.238:8080/ktoeccs/sendToEccs
+  requestToKmall: http://183.62.225.124:8080/ktoeccs/sendToEccs
+
+#   生产环境地址
+#  queryAllInveMngUrl: http://8.135.102.238:8080/ktoeccs/queryAllGoodsInfo
+#  # 查询门店库存接口
+#  queryAllShopInveMngUrl: http://8.135.102.238:8080/ktoeccs/queryAllStoreProductInfo
+#  # 向Kmall发送要从Kmall获取数据的请求
+#  requestToKmall: http://8.135.102.238:8080/ktoeccs/sendToEccs
 

+ 47 - 0
eccs-biz/src/main/resources/mapper/biz/mall/MallGoodsMapper.xml

@@ -0,0 +1,47 @@
+<?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.emato.biz.mapper.mall.MallGoodsMapper">
+
+    <resultMap id="MallGoodsVO" type="com.emato.biz.domain.mall.MallGoodsVO">
+        <result property="merchSn" column="merch_sn" />
+        <result property="merchName" column="merch_name" />
+        <result property="sku" column="sku" />
+        <result property="plu" column="plu" />
+        <result property="mychemId" column="mychem_id" />
+        <result property="goodsName" column="name" />
+        <result property="englishName" column="english_name" />
+        <result property="brand" column="brand" />
+        <result property="inveNum" column="goods_number" />
+    </resultMap>
+
+    <!-- 查询商品信息的字段 -->
+    <sql id="selectMallGoodsVOColumns">
+        t1.merch_sn,
+        t1.sku,
+        t1.plu,
+        t1.mychem_id,
+        t1.name,
+        t1.english_name,
+        t1.brand,
+        t1.goods_number
+    </sql>
+
+    <!-- 查询商品信息 VO 列表 -->
+    <select id="selectMallGoodsList" resultMap="MallGoodsVO">
+        SELECT
+            <include refid="selectMallGoodsVOColumns" />,
+            t2.merch_name
+        FROM
+            mall_goods t1
+            LEFT JOIN merchant_base t2 ON t1.merch_sn = t2.merch_sn
+        <where>
+            <if test="merchSn != null  and merchSn != ''"> and t1.merch_sn = #{merchSn}</if>
+            <if test="sku != null  and sku != ''"> and t1.sku = #{sku}</if>
+            <if test="plu != null  and plu != ''"> and t1.PLU = #{plu}</if>
+            <if test="goodsName != null  and goodsName != ''"> and t1.name like concat('%', #{goodsName}, '%')</if>
+        </where>
+    </select>
+
+</mapper>

+ 2 - 4
eccs-biz/src/main/resources/mapper/biz/warehouse/OWbInveMngMapper.xml

@@ -196,8 +196,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             creater_sn,
             create_time,
             moder_sn,
-            mod_time,
-            tstm
+            mod_time
             )
             values (
 
@@ -227,8 +226,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             #{createrSn},
             #{createTime},
             #{moderSn},
-            #{modTime},
-            #{tstm}
+            #{modTime}
             )
             ON DUPLICATE KEY UPDATE
             inve_status = #{inveStatus},

+ 77 - 0
eccs-biz/src/main/resources/mapper/biz/warehouse/WbInveMngMapper.xml

@@ -81,4 +81,81 @@
         </where>
     </select>
 
+    <insert id="saveOrUpdate">
+        insert into wb_inve_mng
+        (
+            inve_sn,
+            merch_sn,
+            merch_name,
+            ems_class_code,
+            sku,
+            inve_status,
+            ware_sn,
+            cus_code,
+            bonded_code,
+            inve_num,
+            valid_num,
+            freeze_num,
+            ex_ware_num,
+            return_num,
+            expire_num,
+            check_add_num,
+            check_cut_num,
+            damage_num,
+            spot_check_num,
+            arrived_add_num,
+            arrived_cut_num,
+            other_num,
+            is_valid,
+            creater_sn,
+            create_time,
+            moder_sn,
+            mod_time
+        )
+        values (
+           #{inveSn},
+           #{merchSn},
+           #{merchName},
+           #{emsClassCode},
+           #{sku},
+           #{inveStatus},
+           #{wareSn},
+           #{cusCode},
+           #{bondedCode},
+           #{inveNum},
+           #{validNum},
+           #{freezeNum},
+           #{exWareNum},
+           #{returnNum},
+           #{expireNum},
+           #{checkAddNum},
+           #{checkCutNum},
+           #{damageNum},
+           #{spotCheckNum},
+           #{arrivedAddNum},
+           #{arrivedCutNum},
+           #{otherNum},
+           #{isValid},
+           #{createrSn},
+           #{createTime},
+           #{moderSn},
+           #{modTime}
+        ) ON DUPLICATE KEY UPDATE
+         inve_status = #{inveStatus},
+         inve_num = #{inveNum},
+         valid_num = #{validNum},
+         freeze_num = #{freezeNum},
+         ex_ware_num = #{exWareNum},
+         return_num = #{returnNum},
+         expire_num = #{expireNum},
+         check_add_num= #{checkAddNum},
+         check_cut_num= #{checkCutNum},
+         damage_num= #{damageNum},
+         spot_check_num= #{spotCheckNum},
+         arrived_add_num= #{arrivedAddNum},
+         arrived_cut_num = #{arrivedCutNum},
+         other_num = #{otherNum},
+         is_valid= #{isValid}
+    </insert>
+
 </mapper>

+ 104 - 0
eccs-biz/src/main/resources/mapper/biz/warehouse/WbMerchShopInveMapper.xml

@@ -97,5 +97,109 @@
         </where>
     </select>
 
+    <!-- 保存或修改商户门店库存 -->
+    <insert id="saveOrUpdate">
+        insert into wb_merch_shop_inve
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="shopInveSn != null">shop_inve_sn,</if>
+            <if test="shopSn != null">shop_sn,</if>
+            <if test="merchSn != null">merch_sn,</if>
+            <if test="merchName != null">merch_name,</if>
+            <if test="thirdPartyMerchCode != null">third_party_merch_code,</if>
+            <if test="thirdPartyMerchName != null">third_party_merch_name,</if>
+            <if test="sku != null">sku,</if>
+            <if test="cusCode != null">cus_code,</if>
+            <if test="bondedCode != null">bonded_code,</if>
+            <if test="wareSn != null">ware_sn,</if>
+            <if test="goodsBizType != null">goods_biz_type,</if>
+            <if test="shopInve != null">shop_inve,</if>
+            <if test="shopValid != null">shop_valid,</if>
+            <if test="shopFreezeNum != null">shop_freeze_num,</if>
+            <if test="shopDamageNum != null">shop_damage_num,</if>
+            <if test="shopDestroyLostNum != null">shop_destroy_lost_num,</if>
+            <if test="shopExpireNum != null">shop_expire_num,</if>
+            <if test="shopSampleFreezeNum != null">shop_sample_freeze_num,</if>
+            <if test="shopMinus != null">shop_minus,</if>
+            <if test="shopSupp != null">shop_supp,</if>
+            <if test="inQty != null">in_qty,</if>
+            <if test="outQty != null">out_qty,</if>
+            <if test="returnQty != null">return_qty,</if>
+            <if test="saleQty != null">sale_qty,</if>
+            <if test="locInQty != null">loc_in_qty,</if>
+            <if test="locOutQty != null">loc_out_qty,</if>
+            <if test="isValid != null">is_valid,</if>
+            <if test="createrSn != null">creater_sn,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="moderSn != null">moder_sn,</if>
+            <if test="modTime != null">mod_time,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="shopInveSn != null">#{shopInveSn},</if>
+            <if test="shopSn != null">#{shopSn},</if>
+            <if test="merchSn != null">#{merchSn},</if>
+            <if test="merchName != null">#{merchName},</if>
+            <if test="thirdPartyMerchCode != null">#{thirdPartyMerchCode},</if>
+            <if test="thirdPartyMerchName != null">#{thirdPartyMerchName},</if>
+            <if test="sku != null">#{sku},</if>
+            <if test="cusCode != null">#{cusCode},</if>
+            <if test="bondedCode != null">#{bondedCode},</if>
+            <if test="wareSn != null">#{wareSn},</if>
+            <if test="goodsBizType != null">#{goodsBizType},</if>
+            <if test="shopInve != null">#{shopInve},</if>
+            <if test="shopValid != null">#{shopValid},</if>
+            <if test="shopFreezeNum != null">#{shopFreezeNum},</if>
+            <if test="shopDamageNum != null">#{shopDamageNum},</if>
+            <if test="shopDestroyLostNum != null">#{shopDestroyLostNum},</if>
+            <if test="shopExpireNum != null">#{shopExpireNum},</if>
+            <if test="shopSampleFreezeNum != null">#{shopSampleFreezeNum},</if>
+            <if test="shopMinus != null">#{shopMinus},</if>
+            <if test="shopSupp != null">#{shopSupp},</if>
+            <if test="inQty != null">#{inQty},</if>
+            <if test="outQty != null">#{outQty},</if>
+            <if test="returnQty != null">#{returnQty},</if>
+            <if test="saleQty != null">#{saleQty},</if>
+            <if test="locInQty != null">#{locInQty},</if>
+            <if test="locOutQty != null">#{locOutQty},</if>
+            <if test="isValid != null">#{isValid},</if>
+            <if test="createrSn != null">#{createrSn},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="moderSn != null">#{moderSn},</if>
+            <if test="modTime != null">#{modTime},</if>
+        </trim>
+
+        ON DUPLICATE KEY UPDATE
+        <trim prefix="" suffixOverrides=",">
+            <if test="shopSn != null">shop_sn = #{shopSn},</if>
+            <if test="merchSn != null">merch_sn = #{merchSn},</if>
+            <if test="merchName != null">merch_name = #{merchName},</if>
+            <if test="thirdPartyMerchCode != null">third_party_merch_code = #{thirdPartyMerchCode},</if>
+            <if test="thirdPartyMerchName != null">third_party_merch_name = #{thirdPartyMerchName},</if>
+            <if test="sku != null">sku = #{sku},</if>
+            <if test="cusCode != null">cus_code = #{cusCode},</if>
+            <if test="bondedCode != null">bonded_code = #{bondedCode},</if>
+            <if test="wareSn != null">ware_sn = #{wareSn},</if>
+            <if test="goodsBizType != null">goods_biz_type = #{goodsBizType},</if>
+            <if test="shopInve != null">shop_inve = #{shopInve},</if>
+            <if test="shopValid != null">shop_valid = #{shopValid},</if>
+            <if test="shopFreezeNum != null">shop_freeze_num = #{shopFreezeNum},</if>
+            <if test="shopDamageNum != null">shop_damage_num = #{shopDamageNum},</if>
+            <if test="shopDestroyLostNum != null">shop_destroy_lost_num = #{shopDestroyLostNum},</if>
+            <if test="shopExpireNum != null">shop_expire_num = #{shopExpireNum},</if>
+            <if test="shopSampleFreezeNum != null">shop_sample_freeze_num = #{shopSampleFreezeNum},</if>
+            <if test="shopMinus != null">shop_minus = #{shopMinus},</if>
+            <if test="shopSupp != null">shop_supp = #{shopSupp},</if>
+            <if test="inQty != null">in_qty = #{inQty},</if>
+            <if test="outQty != null">out_qty = #{outQty},</if>
+            <if test="returnQty != null">return_qty = #{returnQty},</if>
+            <if test="saleQty != null">sale_qty = #{saleQty},</if>
+            <if test="locInQty != null">loc_in_qty = #{locInQty},</if>
+            <if test="locOutQty != null">loc_out_qty = #{locOutQty},</if>
+            <if test="isValid != null">is_valid = #{isValid},</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>
+        </trim>
+    </insert>
 
 </mapper>

+ 39 - 39
eccs-biz/src/main/resources/oms-config.yml

@@ -14,61 +14,61 @@ oms:
 
 
   #==================== 开发环境 ws.ds-bay.com ====================
-  # 查询商户信息接口
-  queryMerchantInfoUrl: http://127.0.0.1:8086/al/queryOmsInfo/queryMerchantInfoUrl
-  # 查询第三方商户信息接口
-  queryThirdMerchantInfoUrl:
-  # 查询库存接口
-  queryMngInveUrl: http://127.0.0.1:8086/al/queryOmsInfo/queryInveMng
-  # 查询门店库存接口
-  queryShopMngInveUrl: http://127.0.0.1:8086/al/queryOmsInfo/queryShopInveMng
-  # 查询入库单接口
-  queryInveReceiptUrl: http://127.0.0.1:8086/al/queryOmsInfo/queryInveReceiptGoods
-  # 查询入库单明细接口
-  queryInveReceiptDetailUrl: http://127.0.0.1:8086/al/queryOmsInfo/queryInveReceiptGoods
-  # 查询结转接口
-  queryAdjustmentUrl: http://127.0.0.1:8086/al/queryOmsInfo/queryAdjustmentRecord
-  # 查询结转明细接口
-  queryAdjustmentDetailUrl: http://127.0.0.1:8086/al/queryOmsInfo/queryAdjustmentDetail
-  # 查询出区接口
-  queryInveShipmentUrl:
-  # 查询出区明细接口
-  queryInveShipmentDetailUrl:
-  # 查询门店进货接口
-  queryShopInUrl: http://127.0.0.1:8086/al/queryOmsInfo/queryShopIn
-  # 查询门店出场接口
-  queryShopOutUrl: http://127.0.0.1:8086/al/queryOmsInfo/queryShopOut
-  # 查询门店转移接口
-  queryShopMoveUrl: http://127.0.0.1:8086/al/queryOmsInfo/queryShopMove
-
-#
-#  #==================== 测试环境 ws.ds-bay.com ====================
 #  # 查询商户信息接口
-#  queryMerchantInfoUrl: http://183.3.221.143:8680/al/queryOmsInfo/queryMerchantInfoUrl
+#  queryMerchantInfoUrl: http://127.0.0.1:8086/al/queryOmsInfo/queryMerchantInfoUrl
 #  # 查询第三方商户信息接口
 #  queryThirdMerchantInfoUrl:
 #  # 查询库存接口
-#  queryMngInveUrl: http://183.3.221.143:8680/al/queryOmsInfo/queryInveMng
+#  queryMngInveUrl: http://127.0.0.1:8086/al/queryOmsInfo/queryInveMng
 #  # 查询门店库存接口
-#  queryShopMngInveUrl: http://183.3.221.143:8680/al/queryOmsInfo/queryShopInveMng
+#  queryShopMngInveUrl: http://127.0.0.1:8086/al/queryOmsInfo/queryShopInveMng
 #  # 查询入库单接口
-#  queryInveReceiptUrl: http://183.3.221.143:8680/al/queryOmsInfo/queryInveReceiptGoods
+#  queryInveReceiptUrl: http://127.0.0.1:8086/al/queryOmsInfo/queryInveReceiptGoods
 #  # 查询入库单明细接口
-#  queryInveReceiptDetailUrl: http://183.3.221.143:8680/al/queryOmsInfo/queryInveReceiptGoods
+#  queryInveReceiptDetailUrl: http://127.0.0.1:8086/al/queryOmsInfo/queryInveReceiptGoods
 #  # 查询结转接口
-#  queryAdjustmentUrl: http://183.3.221.143:8680/al/queryOmsInfo/queryAdjustmentRecord
+#  queryAdjustmentUrl: http://127.0.0.1:8086/al/queryOmsInfo/queryAdjustmentRecord
 #  # 查询结转明细接口
-#  queryAdjustmentDetailUrl: http://183.3.221.143:8680/al/queryOmsInfo/queryAdjustmentDetail
+#  queryAdjustmentDetailUrl: http://127.0.0.1:8086/al/queryOmsInfo/queryAdjustmentDetail
 #  # 查询出区接口
 #  queryInveShipmentUrl:
 #  # 查询出区明细接口
 #  queryInveShipmentDetailUrl:
 #  # 查询门店进货接口
-#  queryShopInUrl: http://183.3.221.143:8680/al/queryOmsInfo/queryShopIn
+#  queryShopInUrl: http://127.0.0.1:8086/al/queryOmsInfo/queryShopIn
 #  # 查询门店出场接口
-#  queryShopOutUrl: http://183.3.221.143:8680/al/queryOmsInfo/queryShopOut
+#  queryShopOutUrl: http://127.0.0.1:8086/al/queryOmsInfo/queryShopOut
 #  # 查询门店转移接口
-#  queryShopMoveUrl: http://183.3.221.143:8680/al/queryOmsInfo/queryShopMove
+#  queryShopMoveUrl: http://127.0.0.1:8086/al/queryOmsInfo/queryShopMove
+
+#
+#  #==================== 测试环境 ws.ds-bay.com ====================
+  # 查询商户信息接口
+  queryMerchantInfoUrl: http://183.3.221.143:8086/al/queryOmsInfo/queryMerchantInfoUrl
+  # 查询第三方商户信息接口
+  queryThirdMerchantInfoUrl:
+  # 查询库存接口
+  queryMngInveUrl: http://183.3.221.143:8086/al/queryOmsInfo/queryInveMng
+  # 查询门店库存接口
+  queryShopMngInveUrl: http://183.3.221.143:8086/al/queryOmsInfo/queryShopInveMng
+  # 查询入库单接口
+  queryInveReceiptUrl: http://183.3.221.143:8086/al/queryOmsInfo/queryInveReceiptGoods
+  # 查询入库单明细接口
+  queryInveReceiptDetailUrl: http://183.3.221.143:8086/al/queryOmsInfo/queryInveReceiptGoods
+  # 查询结转接口
+  queryAdjustmentUrl: http://183.3.221.143:8086/al/queryOmsInfo/queryAdjustmentRecord
+  # 查询结转明细接口
+  queryAdjustmentDetailUrl: http://183.3.221.143:8086/al/queryOmsInfo/queryAdjustmentDetail
+  # 查询出区接口
+  queryInveShipmentUrl:
+  # 查询出区明细接口
+  queryInveShipmentDetailUrl:
+  # 查询门店进货接口
+  queryShopInUrl: http://183.3.221.143:8086/al/queryOmsInfo/queryShopIn
+  # 查询门店出场接口
+  queryShopOutUrl: http://183.3.221.143:8086/al/queryOmsInfo/queryShopOut
+  # 查询门店转移接口
+  queryShopMoveUrl: http://183.3.221.143:8086/al/queryOmsInfo/queryShopMove
 
 
 #  #==================== 生产环境 ws.ds-bay.com ====================

+ 9 - 8
eccs-ui/src/views/mall/mallinvemng/index.vue

@@ -19,7 +19,7 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="PLU" prop="plu">
+      <!-- <el-form-item label="PLU" prop="plu">
         <el-input
           v-model="queryParams.plu"
           placeholder="请输入PLU"
@@ -27,7 +27,7 @@
           size="small"
           @keyup.enter.native="handleQuery"
         />
-      </el-form-item>
+      </el-form-item> -->
       <el-form-item label="商品名称" prop="goodsName">
         <el-input
           v-model="queryParams.goodsName"
@@ -106,8 +106,8 @@
           v-hasPermi="['biz:mallinvemng:export']"
         >导出</el-button>
       </el-col>
-
-      <el-col :span="1.5">
+      
+      <!-- <el-col :span="1.5">
         <el-button
           type="warning"
           icon="el-icon-download"
@@ -115,17 +115,18 @@
           @click="handlePull"
           v-hasPermi="['biz:shopinvemng:pull']"
         >拉取</el-button>
-      </el-col>
+      </el-col> -->
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
     <el-table v-loading="loading" :data="mallinvemngList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="库存编号" align="center" prop="inveSn" />
+      <!-- <el-table-column label="库存编号" align="center" prop="inveSn" /> -->
       <el-table-column label="商户编号" align="center" prop="merchSn" />
       <el-table-column label="商户名称" align="center" prop="merchName" />
       <el-table-column label="SKU" align="center" prop="sku" />
       <el-table-column label="PLU" align="center" prop="plu" />
+      <el-table-column label="MychemID" align="center" prop="mychemId" />
       <el-table-column label="商品名称" align="center" prop="goodsName" />
       <el-table-column label="商品英文名称" align="center" prop="englishName" />
       <el-table-column label="品牌" align="center" prop="brand" />
@@ -137,8 +138,8 @@
       <el-table-column label="库存状态" align="center" prop="inveStatus" />
       <el-table-column label="海关代码" align="center" prop="cusCode" />-->
       <el-table-column label="库存数" align="center" prop="inveNum" />
-      <el-table-column label="可用数" align="center" prop="validNum" />
-      <el-table-column label="下单冻结数" align="center" prop="freezeNum" />
+      <!-- <el-table-column label="可用数" align="center" prop="validNum" />
+      <el-table-column label="下单冻结数" align="center" prop="freezeNum" /> -->
       <!--<el-table-column label="进货数" align="center" prop="imWareNum" />
       <el-table-column label="退货数" align="center" prop="returnNum" />
       <el-table-column label="过期数" align="center" prop="expireNum" />