Commit 9ab9de80 authored by hubaoshan's avatar hubaoshan

商品和库存

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