1
0
Prechádzať zdrojové kódy

Merge branch 'master' of http://git.ds-bay.com/project/kmall-pt-general

lsp 4 rokov pred
rodič
commit
661d6adc36

+ 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);
 
 

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

@@ -119,6 +119,89 @@ public class GoodsDto implements Serializable {
 
     private String thirdPartyMerchCode;
 
+
+    // MychemID
+    private String mychemId;
+
+
+    private String hsCode;
+
+    private String hsCodeName;
+
+    private String plu;
+
+    public String getCounterPrice() {
+        return counterPrice;
+    }
+
+    public void setCounterPrice(String counterPrice) {
+        this.counterPrice = counterPrice;
+    }
+
+    public String getExtraPrice() {
+        return extraPrice;
+    }
+
+    public void setExtraPrice(String extraPrice) {
+        this.extraPrice = extraPrice;
+    }
+
+    public String getUnitPrice() {
+        return unitPrice;
+    }
+
+    public void setUnitPrice(String unitPrice) {
+        this.unitPrice = unitPrice;
+    }
+
+    public String getPromotionDesc() {
+        return promotionDesc;
+    }
+
+    public void setPromotionDesc(String promotionDesc) {
+        this.promotionDesc = promotionDesc;
+    }
+
+    public Integer getGoodsType() {
+        return goodsType;
+    }
+
+    public void setGoodsType(Integer goodsType) {
+        this.goodsType = goodsType;
+    }
+
+    public String getMychemId() {
+        return mychemId;
+    }
+
+    public void setMychemId(String mychemId) {
+        this.mychemId = mychemId;
+    }
+
+    public String getHsCode() {
+        return hsCode;
+    }
+
+    public void setHsCode(String hsCode) {
+        this.hsCode = hsCode;
+    }
+
+    public String getHsCodeName() {
+        return hsCodeName;
+    }
+
+    public void setHsCodeName(String hsCodeName) {
+        this.hsCodeName = hsCodeName;
+    }
+
+    public String getPlu() {
+        return plu;
+    }
+
+    public void setPlu(String plu) {
+        this.plu = plu;
+    }
+
     public String getThirdPartyMerchCode() {
         return thirdPartyMerchCode;
     }

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

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

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

@@ -745,7 +745,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<>(),
@@ -860,10 +860,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());
@@ -874,6 +874,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());
@@ -955,6 +956,8 @@ public class GoodsServiceImpl implements GoodsService {
                 goodsEntity.setUpdateTime(new Date());
                 goodsEntity.setModTime(new Date());
                 goodsEntity.setGoodsNumber(Integer.parseInt(goodsDto.getGoodsNumber()));
+                goodsEntity.setPlu(goodsDto.getPlu());
+                goodsEntity.setMychemId(goodsDto.getMychemId());
 
                 if(!isFail){
                     GoodsEntity goods = goodsDao.queryObjectBySn(goodsDto.getGoodsSn());
@@ -1110,11 +1113,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/XmlTemplate/GoodsDtoList.xml

@@ -30,6 +30,8 @@
                 <mapping row="1" col="17">GoodsDto.cusDeclEle</mapping>
                 <mapping row="1" col="18">GoodsDto.cusRecCode</mapping>
                 <mapping row="1" col="19">GoodsDto.goodsNumber</mapping>
+                <mapping row="1" col="20">GoodsDto.plu</mapping>
+                <mapping row="1" col="21">GoodsDto.mychemId</mapping>
             </section>
             <loopbreakcondition>
                 <rowcheck offset="0">

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

@@ -71,6 +71,9 @@
         <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"/>
+        <result column="hs_code" property="hsCode"/>
+        <result column="hs_code_name" property="hsCodeName"/>
     </resultMap>
 
     <select id="queryObject" resultType="com.kmall.admin.entity.GoodsEntity">
@@ -498,6 +501,9 @@
 			`create_time`,
 			`moder_sn`,
 			`mod_time`,
+			`mychem_id`,
+			`hs_code`,
+			`hs_code_name`,
 			`tstm`)
 		values(
 			#{merchSn},
@@ -550,6 +556,9 @@
 			#{createTime},
 			#{moderSn},
 			#{modTime},
+			#{mychemId},
+			#{hsCode},
+			#{hsCodeName},
 			#{tstm})
     </insert>
 
@@ -607,7 +616,10 @@
             <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="lastSaleTime != null">`last_sale_time` = #{lastSaleTime}</if>
+            <if test="lastSaleTime != null">`last_sale_time` = #{lastSaleTime},</if>
+            <if test="mychemId != null">`mychem_id` = #{mychemId},</if>
+            <if test="hsCode != null">`hs_code` = #{hsCode},</if>
+            <if test="hsCodeName != null">`hs_code_name` = #{hsCodeName}</if>
         </set>
         where id = #{id}
     </update>

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

@@ -2039,10 +2039,11 @@
         o.pay_time as timeStampDetails,
         u.username as staffID,
         u.username as staffName,
-        c.id as hsCode,
-        c.name as hsCodeName,
+        gs.hs_code as hsCode,
+        gs.hs_code_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,
@@ -2067,7 +2068,6 @@
         left join sys_cus_unit_code uc on uc.code = gs.unit_code
         left join mall_product_store_rela sr on sr.goods_id=gs.id
         left join mall_brand b on b.id=sr.brand_id
-        left join mall_category c on b.category_id = c.id
         left join mall_supplier sup on gs.supplier_id = sup.id
         WHERE 1=1
         <if test="orderSn != null and orderSn.trim() != ''">

+ 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'},

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