Commit d5bbbf75 authored by hubaoshan's avatar hubaoshan

导出bug

parent 20eced58
...@@ -34,7 +34,7 @@ public class WmsGoods extends CyIdIncreEntity<WmsGoods> { ...@@ -34,7 +34,7 @@ public class WmsGoods extends CyIdIncreEntity<WmsGoods> {
* @column goods_code * @column goods_code
* @default * @default
*/ */
@Excel(name = "商品编码", orderNum = "1", width = 20) @Excel(name = "商品编码", orderNum = "1", width = 40)
private String goodsCode; private String goodsCode;
/** /**
...@@ -42,7 +42,7 @@ public class WmsGoods extends CyIdIncreEntity<WmsGoods> { ...@@ -42,7 +42,7 @@ public class WmsGoods extends CyIdIncreEntity<WmsGoods> {
* @column goods_type * @column goods_type
* @default * @default
*/ */
@Excel(name = "款式", orderNum = "2", width = 20,replace = {"立领_50001","修身西装_50002","蕾丝披肩裙_50003"}) @Excel(name = "款式", orderNum = "2", width = 20)
private String goodsStyle; private String goodsStyle;
/** /**
...@@ -50,7 +50,7 @@ public class WmsGoods extends CyIdIncreEntity<WmsGoods> { ...@@ -50,7 +50,7 @@ public class WmsGoods extends CyIdIncreEntity<WmsGoods> {
* @column goods_art_number * @column goods_art_number
* @default * @default
*/ */
@Excel(name = "货号", orderNum = "3", width = 20,replace = {"羊毛_20000001","晴纶_20000002","化纤_20000003"}) @Excel(name = "货号", orderNum = "3", width = 20)
private String goodsArtNumber; private String goodsArtNumber;
/** /**
...@@ -58,7 +58,7 @@ public class WmsGoods extends CyIdIncreEntity<WmsGoods> { ...@@ -58,7 +58,7 @@ public class WmsGoods extends CyIdIncreEntity<WmsGoods> {
* @column goods_season * @column goods_season
* @default * @default
*/ */
@Excel(name = "季节", orderNum = "4", width = 20,replace = {"24春_401","24夏_402","24秋_403","24冬_404"}) @Excel(name = "季节", orderNum = "4", width = 20)
private String goodsSeason; private String goodsSeason;
/** /**
...@@ -66,7 +66,7 @@ public class WmsGoods extends CyIdIncreEntity<WmsGoods> { ...@@ -66,7 +66,7 @@ public class WmsGoods extends CyIdIncreEntity<WmsGoods> {
* @column goods_colour * @column goods_colour
* @default * @default
*/ */
@Excel(name = "颜色", orderNum = "5", width = 20,replace = {"白色_61","黑色_62","灰色_63"}) @Excel(name = "颜色", orderNum = "5", width = 20)
private String goodsColour; private String goodsColour;
/** /**
...@@ -74,7 +74,7 @@ public class WmsGoods extends CyIdIncreEntity<WmsGoods> { ...@@ -74,7 +74,7 @@ public class WmsGoods extends CyIdIncreEntity<WmsGoods> {
* @column goods_norms * @column goods_norms
* @default * @default
*/ */
@Excel(name = "规格", orderNum = "6", width = 20,replace = {"150_701","155_702","160_703"}) @Excel(name = "规格", orderNum = "6", width = 20)
private String goodsNorms; private String goodsNorms;
/** /**
...@@ -82,7 +82,7 @@ public class WmsGoods extends CyIdIncreEntity<WmsGoods> { ...@@ -82,7 +82,7 @@ public class WmsGoods extends CyIdIncreEntity<WmsGoods> {
* @column goods_size * @column goods_size
* @default * @default
*/ */
@Excel(name = "尺码", orderNum = "7", width = 20,replace = {"60A_80","60B_81","60C_82"}) @Excel(name = "尺码", orderNum = "7", width = 20)
private String goodsSize; private String goodsSize;
/** /**
...@@ -90,9 +90,9 @@ public class WmsGoods extends CyIdIncreEntity<WmsGoods> { ...@@ -90,9 +90,9 @@ public class WmsGoods extends CyIdIncreEntity<WmsGoods> {
* @column goods_size * @column goods_size
* @default * @default
*/ */
@Excel(name = "品牌", orderNum = "8", width = 20,replace = {"莫兰蒂_31","雅姿_32","菲莉丝_33","卡莉娜_34"}) @Excel(name = "品牌", orderNum = "8", width = 20)
private String goodsBrand; private String goodsBrand;
@Excel(name = "品名", orderNum = "9", width = 20,replace = {"Nike_01","Adidas_02","Uniqlo_03"}) @Excel(name = "品名", orderNum = "9", width = 20)
private String goodsDictName; private String goodsDictName;
@TableField(exist = false) @TableField(exist = false)
......
...@@ -34,9 +34,85 @@ public class WmsGoodsStock extends CyIdIncreEntity<WmsGoodsStock> { ...@@ -34,9 +34,85 @@ public class WmsGoodsStock extends CyIdIncreEntity<WmsGoodsStock> {
* @column goods_counts * @column goods_counts
* @default * @default
*/ */
@Excel(name = "商品数量", orderNum = "1", width = 20) @Excel(name = "商品数量", orderNum = "9", width = 20)
private Integer goodsCounts; private Integer goodsCounts;
@TableField(exist = false) @TableField(exist = false)
private Integer inventoryValue; private Integer inventoryValue;
private String goodsName;
private String goodsDictName;
/**
* @desc 商品编码
* @column goods_code
* @default
*/
@TableField(exist = false)
@Excel(name = "商品编码", orderNum = "1", width = 40)
private String goodsCode;
/**
* @desc 商品类型
* @column goods_style
* @default
*/
@TableField(exist = false)
@Excel(name = "商品类型", orderNum = "2", width = 20)
private String goodsStyle;
/**
* @desc 商品货号
* @column goods_article_number
* @default
*/
@TableField(exist = false)
@Excel(name = "商品货号", orderNum = "3", width = 20)
private String goodsArtNumber;
/**
* @desc 季节
* @column goods_season
* @default
*/
@TableField(exist = false)
@Excel(name = "季节", orderNum = "4", width = 20)
private String goodsSeason;
/**
* @desc 商品颜色
* @column goods_colour
* @default
*/
@TableField(exist = false)
@Excel(name = "商品颜色", orderNum = "5", width = 20)
private String goodsColour;
/**
* @desc 商品规格
* @column goods_norms
* @default
*/
@TableField(exist = false)
@Excel(name = "商品规格", orderNum = "6", width = 20)
private String goodsNorms;
/**
* @desc 商品尺码
* @column goods_size
* @default
*/
@TableField(exist = false)
@Excel(name = "商品尺码", orderNum = "7", width = 20)
private String goodsSize;
/**
* @desc 品牌
* @column goods_brand
* @default
*/
@TableField(exist = false)
@Excel(name = "品牌", orderNum = "8", width = 20)
private String goodsBrand;
} }
...@@ -33,49 +33,86 @@ ...@@ -33,49 +33,86 @@
</foreach> </foreach>
</insert> </insert>
<delete id="delOssById"> <delete id="delOssById">
delete from wms_goods_oss wgo delete
from wms_goods_oss wgo
where wgo.goods_id = #{entity.businessId} where wgo.goods_id = #{entity.businessId}
</delete> </delete>
<!--<cache type="${corePackag!}.util.RedisCache"/>--> <!--<cache type="${corePackag!}.util.RedisCache"/>-->
<select id="queryWmsGoods" resultMap="BaseResultMap"> <select id="queryWmsGoods" resultMap="BaseResultMap">
select * from wms_goods SELECT
wg.goods_name,
wg.goods_code,
sdd_goods_dict_name.dict_label AS goods_dict_name,
sdd_goods_art_number.dict_label AS goods_art_number,
sdd_goods_brand.dict_label AS goods_brand,
sdd_goods_season.dict_label AS goods_season,
sdd_goods_style.dict_label AS goods_style,
sdd_goods_colour.dict_label AS goods_colour,
sdd_goods_norms.dict_label AS goods_norms,
sdd_goods_size.dict_label AS goods_size
FROM
wms_goods wg
LEFT JOIN
sys_dict_data sdd_goods_dict_name ON sdd_goods_dict_name.dict_type = 'GOODS_DICT_NAME' AND
sdd_goods_dict_name.dict_value = wg.goods_dict_name AND sdd_goods_dict_name.del_flag = '0'
LEFT JOIN
sys_dict_data sdd_goods_art_number ON sdd_goods_art_number.dict_type = 'GOODS_ART_NUMBER' AND
sdd_goods_art_number.dict_value = wg.goods_art_number AND sdd_goods_art_number.del_flag = '0'
LEFT JOIN
sys_dict_data sdd_goods_brand ON sdd_goods_brand.dict_type = 'GOODS_BRAND' AND sdd_goods_brand.dict_value =
wg.goods_brand AND sdd_goods_brand.del_flag = '0'
LEFT JOIN
sys_dict_data sdd_goods_season ON sdd_goods_season.dict_type = 'GOODS_SEASON' AND sdd_goods_season.dict_value =
wg.goods_season AND sdd_goods_season.del_flag = '0'
LEFT JOIN
sys_dict_data sdd_goods_style ON sdd_goods_style.dict_type = 'GOODS_STYLE' AND sdd_goods_style.dict_value =
wg.goods_style AND sdd_goods_style.del_flag = '0'
LEFT JOIN
sys_dict_data sdd_goods_colour ON sdd_goods_colour.dict_type = 'GOODS_COLOUR' AND sdd_goods_colour.dict_value =
wg.goods_colour AND sdd_goods_colour.del_flag = '0'
LEFT JOIN
sys_dict_data sdd_goods_norms ON sdd_goods_norms.dict_type = 'GOODS_NORMS' AND sdd_goods_norms.dict_value =
wg.goods_norms AND sdd_goods_norms.del_flag = '0'
LEFT JOIN
sys_dict_data sdd_goods_size ON sdd_goods_size.dict_type = 'GOODS_SIZE' AND sdd_goods_size.dict_value =
wg.goods_size AND sdd_goods_size.del_flag = '0'
where 1=1 where 1=1
and del_flag = '0' and wg.del_flag = '0'
<if test="entity.flag !=null and entity.flag != '' "> <if test="entity.flag !=null and entity.flag != '' ">
and flag = #{entity.flag} and flag = #{entity.flag}
</if> </if>
<if test="entity.goodsName !=null and entity.goodsName != '' "> <if test="entity.goodsName !=null and entity.goodsName != '' ">
and goods_name like concat('%',#{entity.goodsName},'%') and wg.goods_name like concat('%',#{entity.goodsName},'%')
</if> </if>
<if test="entity.goodsDictName !=null and entity.goodsDictName != '' "> <if test="entity.goodsDictName !=null and entity.goodsDictName != '' ">
and goods_dict_name like concat('%',#{entity.goodsDictName},'%') and wg.goods_dict_name like concat('%',#{entity.goodsDictName},'%')
</if> </if>
<if test="entity.goodsCode !=null and entity.goodsCode != '' "> <if test="entity.goodsCode !=null and entity.goodsCode != '' ">
and goods_code like concat('%',#{entity.goodsCode},'%') and wg.goods_code like concat('%',#{entity.goodsCode},'%')
</if> </if>
<if test="entity.goodsStyle !=null and entity.goodsStyle != '' "> <if test="entity.goodsStyle !=null and entity.goodsStyle != '' ">
and goods_style like concat('%',#{entity.goods_style},'%') and wg.goods_style like concat('%',#{entity.goods_style},'%')
</if> </if>
<if test="entity.goodsArtNumber !=null and entity.goodsArtNumber != '' "> <if test="entity.goodsArtNumber !=null and entity.goodsArtNumber != '' ">
and goods_art_number like concat('%',#{entity.goodsArtNumber},'%') and wg.goods_art_number like concat('%',#{entity.goodsArtNumber},'%')
</if> </if>
<if test="entity.goodsSeason !=null and entity.goodsSeason != '' "> <if test="entity.goodsSeason !=null and entity.goodsSeason != '' ">
and goods_season like concat('%',#{entity.goodsSeason},'%') and wg.goods_season like concat('%',#{entity.goodsSeason},'%')
</if> </if>
<if test="entity.goodsColour !=null and entity.goodsColour != '' "> <if test="entity.goodsColour !=null and entity.goodsColour != '' ">
and goods_colour like concat('%',#{entity.goodsColour},'%') and wg.goods_colour like concat('%',#{entity.goodsColour},'%')
</if> </if>
<if test="entity.goodsNorms !=null and entity.goodsNorms != '' "> <if test="entity.goodsNorms !=null and entity.goodsNorms != '' ">
and goods_norms like concat('%',#{entity.goodsNorms},'%') and wg.goods_norms like concat('%',#{entity.goodsNorms},'%')
</if> </if>
<if test="entity.goodsSize !=null and entity.goodsSize != '' "> <if test="entity.goodsSize !=null and entity.goodsSize != '' ">
and goods_size like concat('%',#{entity.goodsSize},'%') and wg.goods_size like concat('%',#{entity.goodsSize},'%')
</if> </if>
<if test="entity.goodsBrand !=null and entity.goodsBrand != '' "> <if test="entity.goodsBrand !=null and entity.goodsBrand != '' ">
and goods_brand like concat('%',#{entity.goodsBrand},'%') and wg.goods_brand like concat('%',#{entity.goodsBrand},'%')
</if> </if>
ORDER BY business_id DESC ORDER BY wg.business_id DESC
</select> </select>
<select id="queryWmsGoodssPaged" resultMap="BaseResultMap"> <select id="queryWmsGoodssPaged" resultMap="BaseResultMap">
...@@ -125,24 +162,18 @@ ...@@ -125,24 +162,18 @@
</select> </select>
<select id="queryWmsGoodsByAppId" resultMap="BaseResultMap"> <select id="queryWmsGoodsByAppId" resultMap="BaseResultMap">
SELECT SELECT log.goods_counts as inCounts,
log.goods_counts as inCounts,
goods.* goods.*
FROM FROM wms_goods_log log
wms_goods_log log
LEFT JOIN wms_goods goods ON log.goods_id = goods.business_id LEFT JOIN wms_goods goods ON log.goods_id = goods.business_id
where log.apply_id = #{entity.businessId} where log.apply_id = #{entity.businessId}
</select> </select>
<select id="queryWmsGoodsByAppIdOut" resultMap="BaseResultMap"> <select id="queryWmsGoodsByAppIdOut" resultMap="BaseResultMap">
SELECT SELECT log.goods_counts as outCounts,
log.goods_counts as outCounts,
goods.* goods.*
FROM FROM wms_goods_log log
wms_goods_log log
LEFT JOIN wms_goods goods ON log.goods_id = goods.business_id LEFT JOIN wms_goods goods ON log.goods_id = goods.business_id
where log.apply_id = #{entity.businessId} where log.apply_id = #{entity.businessId}
...@@ -189,11 +220,13 @@ ...@@ -189,11 +220,13 @@
ORDER BY business_id DESC ORDER BY business_id DESC
</select> </select>
<select id="findOss" resultType="org.rcisoft.sys.ossInfo.entity.OssInfo"> <select id="findOss" resultType="org.rcisoft.sys.ossInfo.entity.OssInfo">
select oi.* from wms_goods_oss wgo select oi.*
from wms_goods_oss wgo
join wms_goods wg on wg.business_id = wgo.goods_id join wms_goods wg on wg.business_id = wgo.goods_id
join oss_info oi on wgo.oss_id = oi.business_id join oss_info oi on wgo.oss_id = oi.business_id
where 1=1 where 1 = 1
and wg.del_flag='0' and oi.del_flag='0' and wg.del_flag = '0'
and oi.del_flag = '0'
and wgo.goods_id = #{entity.businessId} and wgo.goods_id = #{entity.businessId}
</select> </select>
......
...@@ -40,19 +40,44 @@ ...@@ -40,19 +40,44 @@
</resultMap> </resultMap>
<!--<cache type="${corePackag!}.util.RedisCache"/>--> <!--<cache type="${corePackag!}.util.RedisCache"/>-->
<select id="queryWmsGoodsStocks" resultMap="BaseResultMap"> <select id="queryWmsGoodsStocks" resultMap="BasePageResultMap">
select wgs.*, select wgs.*,
wg.goods_name, wg.goods_name,
wg.goods_dict_name,
wg.goods_code, wg.goods_code,
wg.goods_style, sdd_goods_dict_name.dict_label AS goods_dict_name,
wg.goods_art_number, sdd_goods_art_number.dict_label AS goods_art_number,
wg.goods_season, sdd_goods_brand.dict_label AS goods_brand,
wg.goods_colour, sdd_goods_season.dict_label AS goods_season,
wg.goods_norms, sdd_goods_style.dict_label AS goods_style,
wg.goods_brand, sdd_goods_colour.dict_label AS goods_colour,
wg.goods_size sdd_goods_norms.dict_label AS goods_norms,
from wms_goods_stock wgs left join wms_goods wg on wg.business_id = wgs.goods_id sdd_goods_size.dict_label AS goods_size
from wms_goods_stock wgs
left join wms_goods wg on wg.business_id = wgs.goods_id
LEFT JOIN
sys_dict_data sdd_goods_dict_name ON sdd_goods_dict_name.dict_type = 'GOODS_DICT_NAME' AND
sdd_goods_dict_name.dict_value = wg.goods_dict_name AND sdd_goods_dict_name.del_flag = '0'
LEFT JOIN
sys_dict_data sdd_goods_art_number ON sdd_goods_art_number.dict_type = 'GOODS_ART_NUMBER' AND
sdd_goods_art_number.dict_value = wg.goods_art_number AND sdd_goods_art_number.del_flag = '0'
LEFT JOIN
sys_dict_data sdd_goods_brand ON sdd_goods_brand.dict_type = 'GOODS_BRAND' AND sdd_goods_brand.dict_value =
wg.goods_brand AND sdd_goods_brand.del_flag = '0'
LEFT JOIN
sys_dict_data sdd_goods_season ON sdd_goods_season.dict_type = 'GOODS_SEASON' AND sdd_goods_season.dict_value =
wg.goods_season AND sdd_goods_season.del_flag = '0'
LEFT JOIN
sys_dict_data sdd_goods_style ON sdd_goods_style.dict_type = 'GOODS_STYLE' AND sdd_goods_style.dict_value =
wg.goods_style AND sdd_goods_style.del_flag = '0'
LEFT JOIN
sys_dict_data sdd_goods_colour ON sdd_goods_colour.dict_type = 'GOODS_COLOUR' AND sdd_goods_colour.dict_value =
wg.goods_colour AND sdd_goods_colour.del_flag = '0'
LEFT JOIN
sys_dict_data sdd_goods_norms ON sdd_goods_norms.dict_type = 'GOODS_NORMS' AND sdd_goods_norms.dict_value =
wg.goods_norms AND sdd_goods_norms.del_flag = '0'
LEFT JOIN
sys_dict_data sdd_goods_size ON sdd_goods_size.dict_type = 'GOODS_SIZE' AND sdd_goods_size.dict_value =
wg.goods_size AND sdd_goods_size.del_flag = '0'
where wgs.del_flag = '0' where wgs.del_flag = '0'
and wg.del_flag = '0' and wg.del_flag = '0'
<if test="entity.flag !=null and entity.flag != '' "> <if test="entity.flag !=null and entity.flag != '' ">
...@@ -130,7 +155,8 @@ ...@@ -130,7 +155,8 @@
ORDER BY wgs.business_id ASC ORDER BY wgs.business_id ASC
</select> </select>
<select id="selectByIdOut" resultMap="BaseResultMap"> <select id="selectByIdOut" resultMap="BaseResultMap">
select * from wms_goods_stock select *
from wms_goods_stock
where goods_id = #{businessId} where goods_id = #{businessId}
</select> </select>
</mapper> </mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment