浏览代码

xwh修改导出,修改所有商品导入

xwh 4 年之前
父节点
当前提交
4fc591b434

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

@@ -1291,7 +1291,7 @@ public class OrderController {
         ParamUtils.setQueryPowerByRoleType(params, "storeId", "merchSn", "thirdPartyMerchCode");
         params = ParamUtils.setTimeMap(params);
         params.put("isOnfiilineOrder", Dict.isOnfflineOrder.item_1.getItem());
-        ExcelExport ee = new ExcelExport("System Format");
+        ExcelExport ee = new ExcelExport("Daily sales report");
         //查询列表数据
         // =================================================System Format导出开始=====================================
         List<SystemFormatDto> systemFormatList = orderService.queryExportSystemFormatList(params);
@@ -1381,7 +1381,7 @@ public class OrderController {
 
         // =================================================System Format导出结束=====================================
 
-        ee.addSheetByMap("System Format", list, header);
+        ee.addSheetByMap("Daily sales report", list, header);
         ee.export(response);
 
 

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

@@ -223,6 +223,18 @@ public class GoodsEntity implements Serializable {
     // 最后销售时间
     private Date lastSaleTime;
 
+    // MychemID
+    private String mychemId;
+
+
+    public String getMychemId() {
+        return mychemId;
+    }
+
+    public void setMychemId(String mychemId) {
+        this.mychemId = mychemId;
+    }
+
     private String activity;
 
     // 单价

+ 11 - 10
kmall-admin/src/main/java/com/kmall/admin/service/impl/GoodsServiceImpl.java

@@ -740,7 +740,7 @@ public class GoodsServiceImpl implements GoodsService {
         String merchSn = user.getMerchSn();
         boolean isFail = false;
         List<String> failSameSkuList = new ArrayList<>(), failHotGoodsSnList = new ArrayList<>(),
-                failSuppGoodsSnList = new ArrayList<>(),
+//                failSuppGoodsSnList = new ArrayList<>(),
                 failUnitGoodsSnList = new ArrayList<>(), failNationGoodsSnList = new ArrayList<>(),
 //                failProdbarGoodsSnList = new ArrayList<>(),
                  failTypeGoodsSnList = new ArrayList<>(), failMerchGoodsSnList = new ArrayList<>(),
@@ -855,10 +855,10 @@ public class GoodsServiceImpl implements GoodsService {
                     if (supplierEntity == null) {
                         //导入没有查到供货商,执行新增
                         MerchEntity merchEntity = merchDao.findByMerchSn(thirdMerchantBizEntity.getMerchSn());
-                        if(null == merchEntity || !StringUtils.isNotEmpty(goodsDto.getSupplierFlag())){
-                            isFail = true;
-                            failSuppGoodsSnList.add(goodsDto.getGoodsSn());
-                        }
+//                        if(null == merchEntity || !StringUtils.isNotEmpty(goodsDto.getSupplierFlag())){
+//                            isFail = true;
+//                            failSuppGoodsSnList.add(goodsDto.getGoodsSn());
+//                        }
 
                         supplierEntity = new SupplierEntity();
                         supplierEntity.setLevelMerchSn(merchEntity.getMerchSn());
@@ -869,6 +869,7 @@ public class GoodsServiceImpl implements GoodsService {
                         supplierEntity.setIsShow("0");
 
                         supplierDao.save(supplierEntity);
+//                        supplierEntity = supplierDao.queryObjectByName(goodsDto.getSupplierName(), thirdMerchantBizEntity.getMerchSn(),thirdMerchantBizEntity.getThirdPartyMerchCode());
                         goodsEntity.setSupplierId(supplierEntity.getId());
                     } else {
                         goodsEntity.setSupplierId(supplierEntity.getId());
@@ -1105,11 +1106,11 @@ public class GoodsServiceImpl implements GoodsService {
 //                exportExceptionDataDao.save(exportExceptionDataEntity);
 //                throw new RRException("导入数据异常,异常信息请在商品管理》》商品导入异常数据中查看检查");
 //            }
-            if(failSuppGoodsSnList != null && failSuppGoodsSnList.size() > 0){
-                exportExceptionDataEntity.setExportExceptionData("供应商信息请在商城配置》商品供应商中维护,供应商与商户信息对应,请检查该商品商户信息下的供应商是否维护,不存在的商品编码【" + failSuppGoodsSnList + "】");
-                goodsUtils.save(exportExceptionDataEntity);
-                throw new RRException("导入数据异常,异常信息请在商品管理》》商品导入异常数据中查看检查");
-            }
+//            if(failSuppGoodsSnList != null && failSuppGoodsSnList.size() > 0){
+//                exportExceptionDataEntity.setExportExceptionData("供应商信息请在商城配置》商品供应商中维护,供应商与商户信息对应,请检查该商品商户信息下的供应商是否维护,不存在的商品编码【" + failSuppGoodsSnList + "】");
+//                goodsUtils.save(exportExceptionDataEntity);
+//                throw new RRException("导入数据异常,异常信息请在商品管理》》商品导入异常数据中查看检查");
+//            }
             if(failUnitGoodsSnList != null && failUnitGoodsSnList.size() > 0){
                 exportExceptionDataEntity.setExportExceptionData("计算单位信息请在商城配置》计算单位中维护,不存在的商品编码【" + failUnitGoodsSnList + "】");
                 goodsUtils.save(exportExceptionDataEntity);

+ 2 - 0
kmall-admin/src/main/resources/mybatis/mapper/GoodsDao.xml

@@ -71,6 +71,7 @@
         <result column="cost_price" property="costPrice"/>
         <result property="dailyPrice" column="daily_price"/>
         <result column="last_sale_time" property="lastSaleTime" jdbcType="TIMESTAMP"/>
+        <result column="mychem_id" property="mychemId"/>
     </resultMap>
 
     <select id="queryObject" resultType="com.kmall.admin.entity.GoodsEntity">
@@ -608,6 +609,7 @@
             <if test="modTime != null">`mod_time` = #{modTime},</if>
             <if test="tstm != null">`tstm` = #{tstm},</if>
             <if test="lastSaleTime != null">`last_sale_time` = #{lastSaleTime}</if>
+            <if test="mychemId != null">`mychem_id` = #{mychemId}</if>
         </set>
         where id = #{id}
     </update>

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

@@ -2043,6 +2043,7 @@
         c.name as hsCodeName,
         gs.goods_sn as ematouCode,
         gs.plu as plu,
+        gs.mychem_id as mychemID,
         gs.english_name as productNameEN,
         gs.name as productNameCN,
         gs.prod_barcode as barcode,

+ 1 - 1
kmall-admin/src/main/webapp/WEB-INF/page/shop/offilineOrderList.html

@@ -41,7 +41,7 @@
                 #if($shiro.hasPermission("order:exportOffilineOrder"))
                 <i-button type="primary" @click="exportOffilineOrder"><i class="fa fa-cloud-download"></i>&nbsp;导出</i-button>
                 #end
-                <i-button type="primary" @click="exportSystemFormat"><i class="fa fa-cloud-download"></i>&nbsp;System Format 导出</i-button>
+                <i-button type="primary" @click="exportSystemFormat"><i class="fa fa-cloud-download"></i>&nbsp;Daily sales report 导出</i-button>
             </div>
            <!-- TODO req_hidden_20200610 #if($shiro.hasPermission("order:wxMicropayPay"))
             <div class="buttons-group">

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

@@ -9,6 +9,7 @@ $(function () {
             {label: '商品编码', name: 'goodsSn', index: 'goods_Sn', width: 180, align: 'center'},
             {label: 'SKU', name: 'sku', index: 'sku', width: 180, align: 'center'},
             {label: 'PLU', name: 'plu', index: 'plu', width: 180, align: 'center'},
+            {label: 'mychemId', name: 'mychemId', index: 'mychemId', width: 180, align: 'center'},
             {label: '英文名称', name: 'englishName', index: 'englishName', width: 180, align: 'center'},
             {label: '产品条码', name: 'prodBarcode', index: 'prod_barcode', width: 160, align: 'center'},
             // {label: '商品类型', name: 'categoryName', index: 'category_id', width: 40, align: 'center'},