Commit 9ab9de80 authored by hubaoshan's avatar hubaoshan

商品和库存

parent a7ac9829
...@@ -18,7 +18,7 @@ import java.util.List; ...@@ -18,7 +18,7 @@ import java.util.List;
public interface WmsGoodsRepository extends CyBaseMapper<WmsGoods> { public interface WmsGoodsRepository extends CyBaseMapper<WmsGoods> {
List<WmsGoods> queryWmsGoodss(@Param("entity") WmsGoods wmsGoods); List<WmsGoods> queryWmsGoods(@Param("entity") WmsGoods wmsGoods);
/** /**
* 分页查询 wmsGoods * 分页查询 wmsGoods
......
...@@ -19,69 +19,76 @@ public class WmsGoods extends CyIdIncreEntity<WmsGoods> { ...@@ -19,69 +19,76 @@ public class WmsGoods extends CyIdIncreEntity<WmsGoods> {
/** /**
* @desc 商品名称 * @desc 品名
* @column goods_name * @column goods_name
* @default * @default
*/ */
@Excel(name = "商品名称", orderNum = "0", width = 20) @Excel(name = "品名", orderNum = "0", width = 20)
private String goodsName; private String goodsName;
/** /**
* @desc 商品编码 * @desc 商品编码
* @column goods_code * @column goods_code
* @default * @default
*/ */
@Excel(name = "商品编码", orderNum = "1", width = 20) @Excel(name = "商品编码", orderNum = "1", width = 20)
private String goodsCode; private String goodsCode;
/** /**
* @desc 商品类型 * @desc 款式
* @column goods_type * @column goods_type
* @default * @default
*/ */
@Excel(name = "商品类型", orderNum = "2", width = 20) @Excel(name = "款式", orderNum = "2", width = 20)
private String goodsType; private String goodsStyle;
/** /**
* @desc 商品货号 * @desc 货号
* @column goods_article_number * @column goods_art_number
* @default * @default
*/ */
@Excel(name = "商品货号", orderNum = "3", width = 20) @Excel(name = "货号", orderNum = "3", width = 20)
private String goodsArticleNumber; private String goodsArtNumber;
/** /**
* @desc 商品小类 * @desc 季节
* @column goods_subclass * @column goods_season
* @default * @default
*/ */
@Excel(name = "商品小类", orderNum = "4", width = 20) @Excel(name = "季节", orderNum = "4", width = 20)
private String goodsSubclass; private String goodsSeason;
/** /**
* @desc 商品颜色 * @desc 颜色
* @column goods_colour * @column goods_colour
* @default * @default
*/ */
@Excel(name = "商品颜色", orderNum = "5", width = 20) @Excel(name = "颜色", orderNum = "5", width = 20)
private String goodsColour; private String goodsColour;
/** /**
* @desc 商品规格 * @desc 规格
* @column goods_norms * @column goods_norms
* @default * @default
*/ */
@Excel(name = "商品规格", orderNum = "6", width = 20) @Excel(name = "规格", orderNum = "6", width = 20)
private String goodsNorms; private String goodsNorms;
/** /**
* @desc 商品尺码 * @desc 尺码
* @column goods_size * @column goods_size
* @default * @default
*/ */
@Excel(name = "商品尺码", orderNum = "7", width = 20) @Excel(name = "尺码", orderNum = "7", width = 20)
private String goodsSize; private String goodsSize;
/**
* @desc 品牌
* @column goods_size
* @default
*/
@Excel(name = "品牌", orderNum = "8", width = 20)
private String goodsBrand;
} }
...@@ -119,7 +119,7 @@ public class WmsGoodsServiceImpl extends ServiceImpl<WmsGoodsRepository,WmsGoods ...@@ -119,7 +119,7 @@ public class WmsGoodsServiceImpl extends ServiceImpl<WmsGoodsRepository,WmsGoods
*/ */
@Override @Override
public List<WmsGoods> findAll(WmsGoods wmsGoods){ public List<WmsGoods> findAll(WmsGoods wmsGoods){
return baseMapper.queryWmsGoodss(wmsGoods); return baseMapper.queryWmsGoods(wmsGoods);
} }
...@@ -129,7 +129,7 @@ public class WmsGoodsServiceImpl extends ServiceImpl<WmsGoodsRepository,WmsGoods ...@@ -129,7 +129,7 @@ public class WmsGoodsServiceImpl extends ServiceImpl<WmsGoodsRepository,WmsGoods
*/ */
@Override @Override
public List<WmsGoods> export(WmsGoods wmsGoods) { public List<WmsGoods> export(WmsGoods wmsGoods) {
List<WmsGoods> wmsGoodsList = baseMapper.queryWmsGoodss(wmsGoods); List<WmsGoods> wmsGoodsList = baseMapper.queryWmsGoods(wmsGoods);
return wmsGoodsList; return wmsGoodsList;
} }
......
...@@ -64,7 +64,7 @@ public class WmsGoodsApplyController extends CyPaginationController<WmsGoodsAppl ...@@ -64,7 +64,7 @@ public class WmsGoodsApplyController extends CyPaginationController<WmsGoodsAppl
@CyOpeLogAnno(title = "system-商品申请表管理-新增商品申请表", businessType = CyLogTypeEnum.INSERT) @CyOpeLogAnno(title = "system-商品申请表管理-新增商品申请表", businessType = CyLogTypeEnum.INSERT)
@ApiOperation(value="添加商品申请表", notes="添加商品申请表") @ApiOperation(value="添加商品申请表", notes="添加商品申请表")
@PostMapping(value = "/add") @PostMapping(value = "/add")
public CyResult add(@Valid WmsGoodsApply wmsGoodsApply, BindingResult bindingResult) { public CyResult add(@RequestBody WmsGoodsApply wmsGoodsApply) {
CyPersistModel data = wmsGoodsApplyServiceImpl.persist(wmsGoodsApply); CyPersistModel data = wmsGoodsApplyServiceImpl.persist(wmsGoodsApply);
return CyResultGenUtil.builder(data, return CyResultGenUtil.builder(data,
CyMessCons.MESSAGE_ALERT_SUCCESS, CyMessCons.MESSAGE_ALERT_SUCCESS,
...@@ -176,24 +176,24 @@ public class WmsGoodsApplyController extends CyPaginationController<WmsGoodsAppl ...@@ -176,24 +176,24 @@ public class WmsGoodsApplyController extends CyPaginationController<WmsGoodsAppl
//数据字典 //数据字典
DictDataDTO dictData = new DictDataDTO(); DictDataDTO dictData = new DictDataDTO();
dictData.setFlag("1"); dictData.setFlag("1");
dictData.setDictType("GOODS_TYPE"); dictData.setDictType("GOODS_STYLE");
List<DictData> dictDataList = dictDataRepository.querySysDictDatas(dictData); List<DictData> dictDataList = dictDataRepository.querySysDictDatas(dictData);
String[] goods_type = dictDataList.stream().map(DictData::getDictLabel).toArray(String[]::new); String[] goods_style = dictDataList.stream().map(DictData::getDictLabel).toArray(String[]::new);
ExportExcelUtil.XSSFSetDropDownAndHidden(goods_type,workbook,sheet,1, 100000, 1, 1); ExportExcelUtil.XSSFSetDropDownAndHidden(goods_style,workbook,sheet,1, 100000, 1, 1);
DictDataDTO dictData1 = new DictDataDTO(); DictDataDTO dictData1 = new DictDataDTO();
dictData1.setFlag("1"); dictData1.setFlag("1");
dictData1.setDictType("GOODS_ARTICLE_NUMBER"); dictData1.setDictType("GOODS_ART_NUMBER");
List<DictData> dictDataList1 = dictDataRepository.querySysDictDatas(dictData1); List<DictData> dictDataList1 = dictDataRepository.querySysDictDatas(dictData1);
String[] goodsArticleNumber = dictDataList1.stream().map(DictData::getDictLabel).toArray(String[]::new); String[] goodsArtNumber = dictDataList1.stream().map(DictData::getDictLabel).toArray(String[]::new);
ExportExcelUtil.XSSFSetDropDownAndHidden(goodsArticleNumber,workbook,sheet,1, 100000, 2, 2); ExportExcelUtil.XSSFSetDropDownAndHidden(goodsArtNumber,workbook,sheet,1, 100000, 2, 2);
DictDataDTO dictData2 = new DictDataDTO(); DictDataDTO dictData2 = new DictDataDTO();
dictData2.setFlag("1"); dictData2.setFlag("1");
dictData2.setDictType("GOODS_SUBCLASS"); dictData2.setDictType("GOODS_SEASON");
List<DictData> dictDataList2 = dictDataRepository.querySysDictDatas(dictData2); List<DictData> dictDataList2 = dictDataRepository.querySysDictDatas(dictData2);
String[] goodsSubclass = dictDataList2.stream().map(DictData::getDictLabel).toArray(String[]::new); String[] goodsSeason = dictDataList2.stream().map(DictData::getDictLabel).toArray(String[]::new);
ExportExcelUtil.XSSFSetDropDownAndHidden(goodsSubclass,workbook,sheet,1, 100000, 3, 3); ExportExcelUtil.XSSFSetDropDownAndHidden(goodsSeason,workbook,sheet,1, 100000, 3, 3);
DictDataDTO dictData3 = new DictDataDTO(); DictDataDTO dictData3 = new DictDataDTO();
dictData3.setFlag("1"); dictData3.setFlag("1");
...@@ -216,6 +216,20 @@ public class WmsGoodsApplyController extends CyPaginationController<WmsGoodsAppl ...@@ -216,6 +216,20 @@ public class WmsGoodsApplyController extends CyPaginationController<WmsGoodsAppl
String[] goodsSize = dictDataList5.stream().map(DictData::getDictLabel).toArray(String[]::new); String[] goodsSize = dictDataList5.stream().map(DictData::getDictLabel).toArray(String[]::new);
ExportExcelUtil.XSSFSetDropDownAndHidden(goodsSize,workbook,sheet,1, 100000, 6, 6); ExportExcelUtil.XSSFSetDropDownAndHidden(goodsSize,workbook,sheet,1, 100000, 6, 6);
DictDataDTO dictData6 = new DictDataDTO();
dictData1.setFlag("1");
dictData1.setDictType("GOODS_NAME");
List<DictData> dictDataList6 = dictDataRepository.querySysDictDatas(dictData6);
String[] goodsName= dictDataList6.stream().map(DictData::getDictLabel).toArray(String[]::new);
ExportExcelUtil.XSSFSetDropDownAndHidden(goodsName,workbook,sheet,1, 100000, 7, 7);
DictDataDTO dictData7 = new DictDataDTO();
dictData1.setFlag("1");
dictData1.setDictType("GOODS_BRAND");
List<DictData> dictDataList7 = dictDataRepository.querySysDictDatas(dictData7);
String[] goodsBrand= dictDataList7.stream().map(DictData::getDictLabel).toArray(String[]::new);
ExportExcelUtil.XSSFSetDropDownAndHidden(goodsBrand,workbook,sheet,1, 100000, 7, 7);
outputStream = response.getOutputStream(); outputStream = response.getOutputStream();
workbook.write(outputStream); workbook.write(outputStream);
} catch (IOException e) { } catch (IOException e) {
......
...@@ -30,24 +30,24 @@ public class WmsGoodsStockPageResultsDto extends WmsGoodsStock { ...@@ -30,24 +30,24 @@ public class WmsGoodsStockPageResultsDto extends WmsGoodsStock {
/** /**
* @desc 商品类型 * @desc 商品类型
* @column goods_type * @column goods_style
* @default * @default
*/ */
private String goodsType; private String goodsStyle;
/** /**
* @desc 商品货号 * @desc 商品货号
* @column goods_article_number * @column goods_article_number
* @default * @default
*/ */
private String goodsArticleNumber; private String goodsArtNumber;
/** /**
* @desc 商品小类 * @desc 季节
* @column goods_subclass * @column goods_season
* @default * @default
*/ */
private String goodsSubclass; private String goodsSeason;
/** /**
* @desc 商品颜色 * @desc 商品颜色
...@@ -69,4 +69,11 @@ public class WmsGoodsStockPageResultsDto extends WmsGoodsStock { ...@@ -69,4 +69,11 @@ public class WmsGoodsStockPageResultsDto extends WmsGoodsStock {
* @default * @default
*/ */
private String goodsSize; private String goodsSize;
/**
* @desc 品牌
* @column goods_brand
* @default
*/
private String goodsBrand;
} }
...@@ -115,10 +115,16 @@ spring: ...@@ -115,10 +115,16 @@ spring:
#---------5.1 MYSQL------------- #---------5.1 MYSQL-------------
# mysql5.0 # mysql5.0
#driver-class-name: com.mysql.jdbc.Driver #driver-class-name: com.mysql.jdbc.Driver
# driver-class-name: com.mysql.cj.jdbc.Driver
# url: jdbc:mysql://${cy_db.ip}:${cy_db.port}/${cy_db.db}?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&failOverReadOnly=false&allowMultiQueries=true&serverTimezone=GMT%2B8
# username: ${cy_db.username}
# password: ${cy_db.password}
driver-class-name: com.mysql.cj.jdbc.Driver driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://${cy_db.ip}:${cy_db.port}/${cy_db.db}?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&failOverReadOnly=false&allowMultiQueries=true&serverTimezone=GMT%2B8 url: jdbc:mysql://localhost:3306/wms_db?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&failOverReadOnly=false&allowMultiQueries=true&serverTimezone=GMT%2B8
username: ${cy_db.username} username: root
password: ${cy_db.password} password: mosheng
#----------5.2 POSTGRES------------ #----------5.2 POSTGRES------------
#url: jdbc:postgresql://10.96.131.16:15432/91isoft #url: jdbc:postgresql://10.96.131.16:15432/91isoft
......
...@@ -20,13 +20,19 @@ cy_mq: ...@@ -20,13 +20,19 @@ cy_mq:
# db: exam # db: exam
#cy_db:
# ip: 49.232.167.247
# port: 20022
# username: root
# password: cy
# db: wms_db
cy_db: cy_db:
ip: 49.232.167.247 ip: localhost
port: 20022 port: 8080
username: root username: root
password: cy password: mosheng
db: wms_db db: wms_db
#cy_db: #cy_db:
# ip: 127.0.0.1 # ip: 127.0.0.1
# port: 3306 # port: 3306
......
...@@ -13,80 +13,87 @@ ...@@ -13,80 +13,87 @@
<result column="remarks" jdbcType="VARCHAR" property="remarks"/> <result column="remarks" jdbcType="VARCHAR" property="remarks"/>
<result column="goods_name" jdbcType="VARCHAR" property="goodsName"/> <result column="goods_name" jdbcType="VARCHAR" property="goodsName"/>
<result column="goods_code" jdbcType="VARCHAR" property="goodsCode"/> <result column="goods_code" jdbcType="VARCHAR" property="goodsCode"/>
<result column="goods_type" jdbcType="VARCHAR" property="goodsType"/> <result column="goods_style" jdbcType="VARCHAR" property="goodsStyle"/>
<result column="goods_article_number" jdbcType="VARCHAR" property="goodsArticleNumber"/> <result column="goods_art_number" jdbcType="VARCHAR" property="goodsArtNumber"/>
<result column="goods_subclass" jdbcType="VARCHAR" property="goodsSubclass"/> <result column="goods_season" jdbcType="VARCHAR" property="goodsSeason"/>
<result column="goods_colour" jdbcType="VARCHAR" property="goodsColour"/> <result column="goods_colour" jdbcType="VARCHAR" property="goodsColour"/>
<result column="goods_norms" jdbcType="VARCHAR" property="goodsNorms"/> <result column="goods_norms" jdbcType="VARCHAR" property="goodsNorms"/>
<result column="goods_size" jdbcType="VARCHAR" property="goodsSize"/> <result column="goods_size" jdbcType="VARCHAR" property="goodsSize"/>
<result column="goods_brand" jdbcType="VARCHAR" property="goodsBrand"/>
</resultMap> </resultMap>
<!--<cache type="${corePackag!}.util.RedisCache"/>--> <!--<cache type="${corePackag!}.util.RedisCache"/>-->
<select id="queryWmsGoodss" resultMap="BaseResultMap"> <select id="queryWmsGoods" resultMap="BaseResultMap">
select * from wms_goods select * from wms_goods
where 1=1 where 1=1
and del_flag = '0' and 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 goods_name like concat('%',#{entity.goodsName},'%')
</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 goods_code like concat('%',#{entity.goodsCode},'%')
</if> </if>
<if test="entity.goodsType !=null and entity.goodsType != '' "> <if test="entity.goodsStyle !=null and entity.goodsStyle != '' ">
and goods_type like concat('%',#{entity.goodsType},'%') and goods_style like concat('%',#{entity.goods_style},'%')
</if> </if>
<if test="entity.goodsArticleNumber !=null and entity.goodsArticleNumber != '' "> <if test="entity.goodsArtNumber !=null and entity.goodsArtNumber != '' ">
and goods_article_number like concat('%',#{entity.goodsArticleNumber},'%') and goods_art_number like concat('%',#{entity.goodsArtNumber},'%')
</if> </if>
<if test="entity.goodsSubclass !=null and entity.goodsSubclass != '' "> <if test="entity.goodsSeason !=null and entity.goodsSeason != '' ">
and goods_subclass like concat('%',#{entity.goodsSubclass},'%') and 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 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 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 goods_size like concat('%',#{entity.goodsSize},'%')
</if> </if>
<if test="entity.goodsBrand !=null and entity.goodsBrand != '' ">
and goods_brand like concat('%',#{entity.goodsBrand},'%')
</if>
ORDER BY business_id DESC ORDER BY business_id DESC
</select> </select>
<select id="queryWmsGoodssPaged" resultMap="BaseResultMap"> <select id="queryWmsGoodssPaged" resultMap="BaseResultMap">
select * from wms_goods select * from wms_goods
where 1=1 where 1=1
and del_flag = '0' and 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 goods_name like concat('%',#{entity.goodsName},'%')
</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 goods_code like concat('%',#{entity.goodsCode},'%')
</if> </if>
<if test="entity.goodsType !=null and entity.goodsType != '' "> <if test="entity.goodsStyle !=null and entity.goodsStyle != '' ">
and goods_type like concat('%',#{entity.goodsType},'%') and goods_style like concat('%',#{entity.goodsStyle},'%')
</if> </if>
<if test="entity.goodsArticleNumber !=null and entity.goodsArticleNumber != '' "> <if test="entity.goodsArtNumber !=null and entity.goodsArtNumber != '' ">
and goods_article_number like concat('%',#{entity.goodsArticleNumber},'%') and goods_art_number like concat('%',#{entity.goodsArtNumber},'%')
</if> </if>
<if test="entity.goodsSubclass !=null and entity.goodsSubclass != '' "> <if test="entity.goodsSeason !=null and entity.goodsSeason != '' ">
and goods_subclass like concat('%',#{entity.goodsSubclass},'%') and 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 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 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 goods_size like concat('%',#{entity.goodsSize},'%')
</if> </if>
<if test="entity.goodsBrand !=null and entity.goodsBrand != '' ">
and goods_brand like concat('%',#{entity.goodsBrand},'%')
</if>
ORDER BY business_id DESC ORDER BY business_id DESC
</select> </select>
</mapper> </mapper>
\ No newline at end of file
...@@ -28,12 +28,13 @@ ...@@ -28,12 +28,13 @@
<result column="goods_counts" jdbcType="INTEGER" property="goodsCounts"/> <result column="goods_counts" jdbcType="INTEGER" property="goodsCounts"/>
<result column="goods_name" jdbcType="VARCHAR" property="goodsName"/> <result column="goods_name" jdbcType="VARCHAR" property="goodsName"/>
<result column="goods_code" jdbcType="VARCHAR" property="goodsCode"/> <result column="goods_code" jdbcType="VARCHAR" property="goodsCode"/>
<result column="goods_type" jdbcType="VARCHAR" property="goodsType"/> <result column="goods_style" jdbcType="VARCHAR" property="goodsStyle"/>
<result column="goods_article_number" jdbcType="VARCHAR" property="goodsArticleNumber"/> <result column="goods_art_number" jdbcType="VARCHAR" property="goodsArtNumber"/>
<result column="goods_subclass" jdbcType="VARCHAR" property="goodsSubclass"/> <result column="goods_season" jdbcType="VARCHAR" property="goodsSeason"/>
<result column="goods_colour" jdbcType="VARCHAR" property="goodsColour"/> <result column="goods_colour" jdbcType="VARCHAR" property="goodsColour"/>
<result column="goods_norms" jdbcType="VARCHAR" property="goodsNorms"/> <result column="goods_norms" jdbcType="VARCHAR" property="goodsNorms"/>
<result column="goods_size" jdbcType="VARCHAR" property="goodsSize"/> <result column="goods_size" jdbcType="VARCHAR" property="goodsSize"/>
<result column="goods_brand" jdbcType="VARCHAR" property="goodsBrand"/>
</resultMap> </resultMap>
<!--<cache type="${corePackag!}.util.RedisCache"/>--> <!--<cache type="${corePackag!}.util.RedisCache"/>-->
...@@ -41,11 +42,12 @@ ...@@ -41,11 +42,12 @@
select wgs.*, select wgs.*,
wg.goods_name, wg.goods_name,
wg.goods_code, wg.goods_code,
wg.goods_type, wg.goods_style,
wg.goods_article_number, wg.goods_art_number,
wg.goods_subclass, wg.goods_season,
wg.goods_colour, wg.goods_colour,
wg.goods_norms, wg.goods_norms,
wg.goods_brand,
wg.goods_size wg.goods_size
from wms_goods_stock wgs left join wms_goods wg on wg.business_id = wgs.goods_id from wms_goods_stock wgs left join wms_goods wg on wg.business_id = wgs.goods_id
where wgs.del_flag = '0' where wgs.del_flag = '0'
...@@ -67,11 +69,12 @@ ...@@ -67,11 +69,12 @@
wgs.*, wgs.*,
wg.goods_name, wg.goods_name,
wg.goods_code, wg.goods_code,
wg.goods_type, wg.goods_style,
wg.goods_article_number, wg.goods_art_number,
wg.goods_subclass, wg.goods_season,
wg.goods_colour, wg.goods_colour,
wg.goods_norms, wg.goods_norms,
wg.goods_brand,
wg.goods_size wg.goods_size
FROM FROM
wms_goods_stock wgs left join wms_goods wg on wg.business_id = wgs.goods_id wms_goods_stock wgs left join wms_goods wg on wg.business_id = wgs.goods_id
...@@ -90,14 +93,14 @@ ...@@ -90,14 +93,14 @@
<if test="entity.goodsCode !=null and entity.goodsCode != '' "> <if test="entity.goodsCode !=null and entity.goodsCode != '' ">
and wg.goods_code = #{entity.goodsCode} and wg.goods_code = #{entity.goodsCode}
</if> </if>
<if test="entity.goodsType !=null and entity.goodsType != '' "> <if test="entity.goodsStyle !=null and entity.goodsStyle != '' ">
and wg.goods_type = #{entity.goodsType} and wg.goods_style = #{entity.goods_style}
</if> </if>
<if test="entity.goodsArticleNumber !=null and entity.goodsArticleNumber != '' "> <if test="entity.goodsArtNumber !=null and entity.goodsArtNumber != '' ">
and wg.goods_article_number = #{entity.goodsArticleNumber} and wg.goods_art_number = #{entity.goodsArtNumber}
</if> </if>
<if test="entity.goodsSubclass !=null and entity.goodsSubclass != '' "> <if test="entity.goodsSeason !=null and entity.goodsSeason != '' ">
and wg.goods_subclass = #{entity.goodsSubclass} and wg.goods_season = #{entity.goodsSeason}
</if> </if>
<if test="entity.goodsColour !=null and entity.goodsColour != '' "> <if test="entity.goodsColour !=null and entity.goodsColour != '' ">
and wg.goods_colour = #{entity.goodsColour} and wg.goods_colour = #{entity.goodsColour}
...@@ -108,6 +111,9 @@ ...@@ -108,6 +111,9 @@
<if test="entity.goodsSize !=null and entity.goodsSize != '' "> <if test="entity.goodsSize !=null and entity.goodsSize != '' ">
and wg.goods_size = #{entity.goodsSize} and wg.goods_size = #{entity.goodsSize}
</if> </if>
ORDER BY wgs.business_id DESC <if test="entity.goodsBrand !=null and entity.goodsBrand != '' ">
and wg.goods_brand = #{entity.goodsBrand}
</if>
ORDER BY wgs.business_id ASC
</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