浏览代码

bug修复

qng 3 年之前
父节点
当前提交
1e9bb71cc8

+ 11 - 19
kmall-admin/src/main/java/com/kmall/admin/controller/GoodsController.java

@@ -57,12 +57,8 @@ public class GoodsController {
     @Autowired
     private GoodsGalleryService goodsGalleryService;
     @Autowired
-    private OfflineCartService offlineCartService;
-    @Autowired
     private ExcelUtil excelUtil;
     @Autowired
-    private StoreService storeService;
-    @Autowired
     private SysOssService sysOssService;
 
 
@@ -784,9 +780,9 @@ public class GoodsController {
 
         ExcelExport ee = new ExcelExport("所有商品信息");
 
-        String[] header = new String[]{"商户名称","第三方商户编号","商品编码","SKU","PLU","商品名称","商品英文名称","产品条码","货品业务类型","库存是否共享",
-                "商品库存","日常价","成本价","是否上架","是否热销","录入日期","商品单位","商品税率","产品品牌","海关备案编号","计量单位","海关商品编码","国检规格型号",
-                "原产国","海关申报要素","毛重(kg)","净重(kg)"};
+        String[] header = new String[]{"商户名称","第三方商户编号","商品编码","SKU","商品名称","产品条码","货品业务类型",
+                "商品库存","日常价","成本价","是否上架","是否热销","录入日期","商品单位","商品税率","产品品牌","计量单位",
+                "原产国","净重(kg)","仓库编码","货主编码","仓储系统商品ID","库存类型"};
 
         List<Map<String, Object>> list = new ArrayList<>();
         if (goodsList !=null && goodsList.size()>0){
@@ -797,18 +793,12 @@ public class GoodsController {
                 map.put("ThirdPartyMerchCode",goodsEntity.getThirdPartyMerchCode());
                 map.put("GoodsSn",goodsEntity.getGoodsSn());
                 map.put("Sku",goodsEntity.getSku());
-                map.put("Plu",goodsEntity.getPlu());
                 map.put("Name",goodsEntity.getName());
-                map.put("EnglishName",goodsEntity.getEnglishName());
 
                 String goodsBizType = goodsEntity.getGoodsBizType();
-                Integer isStockShare = 0;
-                if (goodsEntity.getIsStockShare()!=null){
-                    isStockShare = Integer.parseInt(goodsEntity.getIsStockShare());
-                }
+
                 map.put("ProdBarcode",goodsEntity.getProdBarcode());
                 map.put("GoodsBizType",StringUtils.isEmpty(goodsBizType)?"":Dict.orderBizType.valueOf("item_"+goodsBizType).getItemName());
-                map.put("IsStockShare",isStockShare==0?"否":"是");
                 map.put("GoodsNumber",goodsEntity.getGoodsNumber());
                 map.put("DailyPrice",goodsEntity.getDailyPrice());
                 map.put("CostPrice",goodsEntity.getCostPrice());
@@ -819,16 +809,18 @@ public class GoodsController {
                 map.put("GoodsUnit",goodsEntity.getGoodsUnit());
                 map.put("GoodsRate",goodsEntity.getGoodsRate());
                 map.put("Brand",goodsEntity.getBrand());
-                map.put("CusRecCode",goodsEntity.getCusRecCode());
-                map.put("UnitCode",goodsEntity.getUnitCode());
+//                map.put("CusRecCode",goodsEntity.getCusRecCode());
+                map.put("UnitCode",goodsEntity.getUnitCodeName());
 
-                map.put("CusGoodsCode",goodsEntity.getCusGoodsCode());
-                map.put("CiqProdModel",goodsEntity.getCiqProdModel());
                 map.put("OriCntName",goodsEntity.getOriCntName());
-                map.put("CusDeclEle",goodsEntity.getCusDeclEle());
                 map.put("GrossWeight",goodsEntity.getGrossWeight());
                 map.put("NetWeight",goodsEntity.getNetWeight());
 
+                map.put("warehouseSn",goodsEntity.getWarehouseSn());
+                map.put("consignorSn",goodsEntity.getConsignorSn());
+                map.put("warehousSysGoodId",goodsEntity.getWarehousSysGoodId());
+                map.put("inventoryType",goodsEntity.getInventoryType());
+
                 list.add(map);
             }
         }

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

@@ -364,7 +364,7 @@ public class ProductStoreRelaController {
 
         String[] header = new String[]{"所属商户","所属门店","商品类型","货品业务类型","商品编码","商品名称","产品编码",
                 "sku","plu","品牌","批次编号","批次到期日期","是否上架","是否热销","库存是否共享","门店库存","园区库存","零售价(税后)",
-                "市场价","底线价","销售量"};
+                "市场价","底线价","出区数","销售量"};
 
         List<Map<String, Object>> list = new ArrayList<>();
         if (productStoreRelaEntityList!=null && productStoreRelaEntityList.size()>0){
@@ -399,6 +399,7 @@ public class ProductStoreRelaController {
                 map.put("RetailPrice",productStoreRelaEntity.getRetailPrice());
                 map.put("MarketPrice",productStoreRelaEntity.getMarketPrice());
                 map.put("BottomLinePrice",productStoreRelaEntity.getBottomLinePrice());
+                map.put("exitRegionNumber",productStoreRelaEntity.getExitRegionNumber());
                 map.put("SellVolume",productStoreRelaEntity.getSellVolume());
 
                 list.add(map);

+ 2 - 5
kmall-admin/src/main/java/com/kmall/admin/controller/vip/Mall2PointsRulesController.java

@@ -143,12 +143,9 @@ public class Mall2PointsRulesController {
         //查询列表数据
         Query query = new Query(params);
 
-        Map<String,Object> map = mall2PointsRulesService.queryDetilList(query);
-        List<Mall2DetilEntity> mall2PointsRulesList = (List<Mall2DetilEntity>)map.get("list");
-        int total = (int)map.get("total");
-
+        List<Mall2RulesDto> mall2PointsRulesList = mall2PointsRulesService.queryDetilList(query);
+        int total = mall2PointsRulesService.querymall2PointsRulesDetilTotal(query);
         PageUtils pageUtil = new PageUtils(mall2PointsRulesList, total, query.getLimit(), query.getPage());
-
         return R.ok().put("page", pageUtil);
     }
 

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

@@ -5,6 +5,7 @@ import com.kmall.admin.entity.vip.Mall2DetilEntity;
 import com.kmall.admin.entity.vip.Mall2PointsRulesEntity;
 import com.kmall.admin.haikong.vo.PointsRulesAndDetailVO;
 import com.kmall.manager.dao.BaseDao;
+import org.apache.ibatis.annotations.Param;
 
 import java.util.Date;
 import java.util.List;

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

@@ -102,6 +102,10 @@ public class GoodsEntity implements Serializable {
      */
     private String unitCode;
     /**
+     * 计量单位代码,参见海关编码
+     */
+    private String unitCodeName;
+    /**
      * 海关商品编码
      */
     private String cusGoodsCode;
@@ -1333,6 +1337,14 @@ public class GoodsEntity implements Serializable {
         this.defectiveProductsGrade = defectiveProductsGrade;
     }
 
+    public String getUnitCodeName() {
+        return unitCodeName;
+    }
+
+    public void setUnitCodeName(String unitCodeName) {
+        this.unitCodeName = unitCodeName;
+    }
+
     /**
      * 重写hashCode方法,用作排序
      */

+ 9 - 6
kmall-admin/src/main/java/com/kmall/admin/service/impl/vip/Mall2PointsRulesServiceImpl.java

@@ -119,14 +119,10 @@ public class Mall2PointsRulesServiceImpl implements Mall2PointsRulesService {
      * @return
      */
     @Override
-    public Map<String,Object> queryDetilList(Query query) {
+    public List<Mall2RulesDto> queryDetilList(Query query) {
         Long id = Long.parseLong(query.get("mkaId")+"");
-        Map<String,Object> map = new HashMap<>();
         List<Mall2RulesDto> mall2DetilEntities = mall2PointsRulesDao.querymall2PointsRulesDetil(id);
-        int total = mall2PointsRulesDao.querymall2PointsRulesDetilTotal(id);
-        map.put("list",mall2DetilEntities);
-        map.put("total",total);
-        return map;
+        return mall2DetilEntities;
 
     }
 
@@ -150,4 +146,11 @@ public class Mall2PointsRulesServiceImpl implements Mall2PointsRulesService {
     public List<PointsRulesAndDetailVO> queryListByTime(Date nowTime) {
         return mall2PointsRulesDao.queryListByTime(nowTime);
     }
+
+    @Override
+    public int querymall2PointsRulesDetilTotal(Query query) {
+        Long id = Long.parseLong(query.get("mkaId")+"");
+        Map<String,Object> map = new HashMap<>();
+        return mall2PointsRulesDao.querymall2PointsRulesDetilTotal(id);
+    }
 }

+ 4 - 1
kmall-admin/src/main/java/com/kmall/admin/service/vip/Mall2PointsRulesService.java

@@ -5,6 +5,7 @@ import com.kmall.admin.entity.vip.Mall2DetilEntity;
 import com.kmall.admin.entity.vip.Mall2PointsRulesEntity;
 import com.kmall.admin.haikong.vo.PointsRulesAndDetailVO;
 import com.kmall.common.utils.Query;
+import org.apache.ibatis.annotations.Param;
 
 import java.util.Date;
 import java.util.List;
@@ -82,7 +83,7 @@ public interface Mall2PointsRulesService {
      * @param query
      * @return
      */
-    Map<String,Object> queryDetilList(Query query);
+    List<Mall2RulesDto> queryDetilList(Query query);
 
 
     void deleteDetil(Integer[] mprIds,Long typeId);
@@ -93,4 +94,6 @@ public interface Mall2PointsRulesService {
      * @return        积分生成规则
      */
     List<PointsRulesAndDetailVO> queryListByTime(Date nowTime);
+
+    int querymall2PointsRulesDetilTotal(Query query);
 }

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

@@ -747,7 +747,8 @@
             case when mall_goods_group.id > 0 then 2 else 0 end as goodsType,
             m.merch_name merchName, mb.is_stock_share isStockShare,
             catagory.keywords as categoryName,
-            scnc.`name` as oriCntName
+            scnc.`name` as oriCntName,
+            scucode.name as unitCodeName
             from mall_goods
             left join mall_merch m on mall_goods.merch_sn = m.merch_sn
             left join mall_goods_group on mall_goods_group.goods_id = mall_goods.id and mall_goods_group.open_status != 3
@@ -755,6 +756,7 @@
             mb.merch_sn=mall_goods.merch_sn
             left join mall_category catagory on catagory.id = mall_goods.category_id
             left join sys_cus_nation_code scnc on  mall_goods.ori_cnt_code = scnc.code
+            left join sys_cus_unit_code scucode on scucode.code = mall_goods.unit_code
             WHERE 1=1
             <!--  数据过滤  -->
             ${filterSql}

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

@@ -50,7 +50,7 @@
 		from mall2_points_rules
 		WHERE 1=1
 		<if test="name != null and name.trim() != ''">
-			AND name LIKE concat('%',#{name},'%')
+			AND points_type = #{name}
 		</if>
         <choose>
             <when test="sidx != null and sidx.trim() != ''">
@@ -69,7 +69,7 @@
 		select count(*) from mall2_points_rules
 		WHERE 1=1
         <if test="name != null and name.trim() != ''">
-            AND name LIKE concat('%',#{name},'%')
+			AND points_type = #{name}
         </if>
 	</select>
 
@@ -182,7 +182,8 @@
 
 	<select id="querymall2PointsRulesDetil" parameterType="java.lang.Long" resultType="com.kmall.admin.dto.Mall2RulesDto">
 		select
-             father_id as id,
+		     id,
+             father_id as mkaId,
 			 points_rules_type as rulesType,
 			 points_detil_name as pointsRulesName,
 			 points_store_name as storeName
@@ -197,7 +198,7 @@
 	</select>
 
 	<delete id="deleteRulesDetil">
-		delete from mall2_points_rules_detil where father_id in
+		delete from mall2_points_rules_detil where id in
 		<foreach item="mprId" collection="array" open="(" separator="," close=")">
 			#{mprId}
 		</foreach>

+ 2 - 1
kmall-admin/src/main/webapp/WEB-INF/page/mk/mall2RulesDetil.html

@@ -30,7 +30,8 @@
 <!--                <i-button type="info" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</i-button>-->
 <!--                <i-button type="warning" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</i-button>-->
                 <i-button type="error" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</i-button>
-                <i-button type="warning" @click="reloadMkactivities" v-show="!isMkactivitiesShow">返回积分规则设置页</i-button>
+                <i-button type="warning" @click="reloadMkactivities">返回积分规则设置页</i-button>
+
             </div>
         </Row>
 	    <table id="jqGrid"></table>

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

@@ -436,9 +436,9 @@
 <!--                    <Form-item label="海关申报要素" prop="cusDeclEle">-->
 <!--                        <i-input v-model="goods.cusDeclEle" placeholder="海关申报要素"/>-->
 <!--                    </Form-item>-->
-                <Form-item label="毛重,kg" prop="grossWeight">
-                    <Input-number :min="0" :step="0" v-model="goods.grossWeight" placeholder="毛重" style="width: 268px;"/>
-                </Form-item>
+<!--                <Form-item label="毛重,kg" prop="grossWeight">-->
+<!--                    <Input-number :min="0" :step="0" v-model="goods.grossWeight" placeholder="毛重" style="width: 268px;"/>-->
+<!--                </Form-item>-->
                 <Form-item label="净重,kg" prop="netWeight">
                     <Input-number :min="0" :step="0" v-model="goods.netWeight" placeholder="净重" style="width: 268px;"/>
                 </Form-item>

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

@@ -10,7 +10,11 @@
         <Row :gutter="16">
             <div class="search-group">
                 <i-col span="4">
-                    <i-input v-model="q.name" @on-enter="query" placeholder="名称"/>
+                        <i-select v-model="q.name" placeholder="积分类型"
+                                  label-in-value>
+                            <i-option v-for="macro in macros" :value="macro.value" :key="macro.id">{{macro.name}}
+                            </i-option>
+                        </i-select>
                 </i-col>
                 <i-button @click="query">查询</i-button>
                 <i-button @click="reloadSearch">重置</i-button>
@@ -34,8 +38,8 @@
     <Card v-show="!showList">
         <p slot="title">{{title}}</p>
 		<i-form ref="formValidate" :model="mall2PointsRules" :rules="ruleValidate" :label-width="80">
-            <Form-item  label="积分类型" prop="pointsTypeStr" style="height: 30px;">
-                <i-select v-model="mall2PointsRules.pointsTypeStr" placeholder="积分类型" label-in-value>
+            <Form-item  label="积分类型" prop="pointsType" style="height: 30px;">
+                <i-select v-model="mall2PointsRules.pointsType" placeholder="积分类型" label-in-value>
                     <i-option v-for="category in categories" :value="category.value"
                               :key="category.value">{{category.name}}
                     </i-option>

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

@@ -1,20 +1,5 @@
 $(function () {
 
-
-	let flag = getQueryString("flag");
-	if(flag != null && flag == "false"){
-		vm.isMkactivitiesShow = false;
-	}
-	let mkCode = getQueryString("mkCode");
-	if(mkCode){
-		vm.mkCode = mkCode;
-	}
-
-	let storeId = getQueryString("storeId");
-	console.log(storeId);
-	if(storeId){
-		vm.storeId = storeId;
-	}
 	let mkaId = getQueryString("mkaId");
 	if(mkaId){
 		vm.mkaId = mkaId;
@@ -24,8 +9,7 @@ $(function () {
         url: '../mall2pointsrules/detilList',
         datatype: "json",
         colModel: [
-			{label: 'Id', name: 'id', index: 'id', key: true, hidden: true},
-			{label: 'id', name: 'id', index: 'id', width: 30, align: 'center'},
+			{label: 'ID', name: 'id', index: 'id', width: 30, align: 'center'},
 			{
 				label: '积分类型', name: 'rulesType', index: 'points_rules_type', width: 80, formatter: function (value) {
 					if (value === '0' || value === 0) {

+ 9 - 1
kmall-admin/src/main/webapp/js/vip/mall2pointsrules.js

@@ -81,12 +81,13 @@ let vm = new Vue({
 	data: {
         showList: true,
         title: null,
-		categories: [],//一级分类
+		categories: [],//积分类型
 		isValidMsgCategories: [],//是否一致
 		brands: [],
 		brandsIsValid:[],
 		categoriesTwo: [],
 		isValidMsgCategoriesTwo:[],
+		macros: [],//积分类型
 		mall2PointsRules: {},
 		ruleValidate: {
 			name: [
@@ -214,8 +215,15 @@ let vm = new Vue({
                 vm.saveOrUpdate()
             });
         },
+
         handleReset: function (name) {
             handleResetForm(this, name);
         }
+	},
+	mounted() {
+		$.get("../sys/macro/queryMacrosByValueRuRules?id=70", function (r) {
+			vm.macros = r.list;
+		});
+
 	}
 });