Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
wms_api
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
高宇
wms_api
Commits
fabecfc7
Commit
fabecfc7
authored
Jun 11, 2024
by
hubaoshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.4
parent
5e68d829
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
32 deletions
+27
-32
WmsGoods.java
src/main/java/org/rcisoft/bus/wmsgoods/entity/WmsGoods.java
+9
-9
WmsGoodsApplyServiceImpl.java
.../wmsgoodsapply/service/impl/WmsGoodsApplyServiceImpl.java
+15
-21
WmsGoodsLogMapper.xml
...in/resources/mapper/bus/wmsGoodsLog/WmsGoodsLogMapper.xml
+3
-2
No files found.
src/main/java/org/rcisoft/bus/wmsgoods/entity/WmsGoods.java
View file @
fabecfc7
...
@@ -24,7 +24,7 @@ public class WmsGoods extends CyIdIncreEntity<WmsGoods> {
...
@@ -24,7 +24,7 @@ public class WmsGoods extends CyIdIncreEntity<WmsGoods> {
* @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
;
/**
/**
...
@@ -40,7 +40,7 @@ public class WmsGoods extends CyIdIncreEntity<WmsGoods> {
...
@@ -40,7 +40,7 @@ public class WmsGoods extends CyIdIncreEntity<WmsGoods> {
* @column goods_type
* @column goods_type
* @default
* @default
*/
*/
@Excel
(
name
=
"款式"
,
orderNum
=
"2"
,
width
=
20
)
@Excel
(
name
=
"款式"
,
orderNum
=
"2"
,
width
=
20
,
replace
=
{
"立领_50001"
,
"修身西装_50002"
,
"蕾丝披肩裙_50003"
}
)
private
String
goodsStyle
;
private
String
goodsStyle
;
/**
/**
...
@@ -48,7 +48,7 @@ public class WmsGoods extends CyIdIncreEntity<WmsGoods> {
...
@@ -48,7 +48,7 @@ public class WmsGoods extends CyIdIncreEntity<WmsGoods> {
* @column goods_art_number
* @column goods_art_number
* @default
* @default
*/
*/
@Excel
(
name
=
"货号"
,
orderNum
=
"3"
,
width
=
20
)
@Excel
(
name
=
"货号"
,
orderNum
=
"3"
,
width
=
20
,
replace
=
{
"羊毛_20000001"
,
"晴纶_20000002"
,
"化纤_20000003"
}
)
private
String
goodsArtNumber
;
private
String
goodsArtNumber
;
/**
/**
...
@@ -56,7 +56,7 @@ public class WmsGoods extends CyIdIncreEntity<WmsGoods> {
...
@@ -56,7 +56,7 @@ public class WmsGoods extends CyIdIncreEntity<WmsGoods> {
* @column goods_season
* @column goods_season
* @default
* @default
*/
*/
@Excel
(
name
=
"季节"
,
orderNum
=
"4"
,
width
=
20
)
@Excel
(
name
=
"季节"
,
orderNum
=
"4"
,
width
=
20
,
replace
=
{
"24春_401"
,
"24夏_402"
,
"24秋_403"
,
"24冬_404"
}
)
private
String
goodsSeason
;
private
String
goodsSeason
;
/**
/**
...
@@ -64,7 +64,7 @@ public class WmsGoods extends CyIdIncreEntity<WmsGoods> {
...
@@ -64,7 +64,7 @@ public class WmsGoods extends CyIdIncreEntity<WmsGoods> {
* @column goods_colour
* @column goods_colour
* @default
* @default
*/
*/
@Excel
(
name
=
"颜色"
,
orderNum
=
"5"
,
width
=
20
)
@Excel
(
name
=
"颜色"
,
orderNum
=
"5"
,
width
=
20
,
replace
=
{
"白色_61"
,
"黑色_62"
,
"灰色_63"
}
)
private
String
goodsColour
;
private
String
goodsColour
;
/**
/**
...
@@ -72,7 +72,7 @@ public class WmsGoods extends CyIdIncreEntity<WmsGoods> {
...
@@ -72,7 +72,7 @@ public class WmsGoods extends CyIdIncreEntity<WmsGoods> {
* @column goods_norms
* @column goods_norms
* @default
* @default
*/
*/
@Excel
(
name
=
"规格"
,
orderNum
=
"6"
,
width
=
20
)
@Excel
(
name
=
"规格"
,
orderNum
=
"6"
,
width
=
20
,
replace
=
{
"150_701"
,
"155_702"
,
"160_703"
}
)
private
String
goodsNorms
;
private
String
goodsNorms
;
/**
/**
...
@@ -80,7 +80,7 @@ public class WmsGoods extends CyIdIncreEntity<WmsGoods> {
...
@@ -80,7 +80,7 @@ public class WmsGoods extends CyIdIncreEntity<WmsGoods> {
* @column goods_size
* @column goods_size
* @default
* @default
*/
*/
@Excel
(
name
=
"尺码"
,
orderNum
=
"7"
,
width
=
20
)
@Excel
(
name
=
"尺码"
,
orderNum
=
"7"
,
width
=
20
,
replace
=
{
"60A_80"
,
"60B_81"
,
"60C_82"
}
)
private
String
goodsSize
;
private
String
goodsSize
;
/**
/**
...
@@ -88,9 +88,9 @@ public class WmsGoods extends CyIdIncreEntity<WmsGoods> {
...
@@ -88,9 +88,9 @@ public class WmsGoods extends CyIdIncreEntity<WmsGoods> {
* @column goods_size
* @column goods_size
* @default
* @default
*/
*/
@Excel
(
name
=
"品牌"
,
orderNum
=
"8"
,
width
=
20
)
@Excel
(
name
=
"品牌"
,
orderNum
=
"8"
,
width
=
20
,
replace
=
{
"莫兰蒂_31"
,
"雅姿_32"
,
"菲莉丝_33"
,
"卡莉娜_34"
}
)
private
String
goodsBrand
;
private
String
goodsBrand
;
@Excel
(
name
=
"
商品名称"
,
orderNum
=
"9"
,
width
=
20
)
@Excel
(
name
=
"
品名"
,
orderNum
=
"9"
,
width
=
20
,
replace
=
{
"Nike_01"
,
"Adidas_02"
,
"Uniqlo_03"
}
)
private
String
goodsDictName
;
private
String
goodsDictName
;
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
...
...
src/main/java/org/rcisoft/bus/wmsgoodsapply/service/impl/WmsGoodsApplyServiceImpl.java
View file @
fabecfc7
...
@@ -74,40 +74,34 @@ public class WmsGoodsApplyServiceImpl extends ServiceImpl<WmsGoodsApplyRepositor
...
@@ -74,40 +74,34 @@ public class WmsGoodsApplyServiceImpl extends ServiceImpl<WmsGoodsApplyRepositor
wmsGoodsApply
.
setIoType
(
"0"
);
wmsGoodsApply
.
setIoType
(
"0"
);
wmsGoodsApply
.
setDealStatus
(
"0"
);
wmsGoodsApply
.
setDealStatus
(
"0"
);
baseMapper
.
insert
(
wmsGoodsApply
);
baseMapper
.
insert
(
wmsGoodsApply
);
//更新商品数量
List
<
WmsGoods
>
boxList
=
addwmsGoodsApply
.
getBoxList
();
//空
//空
List
<
WmsGoodsLog
>
logList
=
new
ArrayList
<>();
WmsGoodsLog
log
=
null
;
for
(
WmsGoods
box
:
addwmsGoodsApply
.
getBoxList
())
{
for
(
WmsGoods
box
:
addwmsGoodsApply
.
getBoxList
())
{
WmsGoodsStock
goodsStock
=
wmsGoodsStockRepositoryImpl
.
findById
(
addwmsGoodsApply
.
getBoxList
().
get
(
0
).
getBusinessId
());
log
=
new
WmsGoodsLog
();
if
(
goodsStock
!=
null
)
{
log
.
setGoodsName
(
box
.
getGoodsName
());
goodsStock
.
setGoodsCounts
(
goodsStock
.
getGoodsCounts
()
+
box
.
getInCounts
());
log
.
setGoodsCode
(
box
.
getGoodsCode
());
wmsGoodsStockRepositoryImpl
.
updateCounts
(
goodsStock
);
}
else
{
WmsGoodsStock
goodsStock
=
wmsGoodsStockRepositoryImpl
.
findById
(
box
.
getBusinessId
());
if
(
goodsStock
==
null
)
{
WmsGoodsStock
newGoodsStock
=
new
WmsGoodsStock
();
WmsGoodsStock
newGoodsStock
=
new
WmsGoodsStock
();
newGoodsStock
.
setGoodsId
(
addwmsGoodsApply
.
getBoxList
().
get
(
0
).
getBusinessId
());
newGoodsStock
.
setGoodsId
(
addwmsGoodsApply
.
getBoxList
().
get
(
0
).
getBusinessId
());
newGoodsStock
.
setGoodsCounts
(
box
.
getInCounts
());
newGoodsStock
.
setGoodsCounts
(
box
.
getInCounts
());
wmsGoodsStockRepositoryImpl
.
persist
(
newGoodsStock
);
wmsGoodsStockRepositoryImpl
.
persist
(
newGoodsStock
);
}
else
{
goodsStock
.
setGoodsCounts
(
goodsStock
.
getGoodsCounts
()
+
box
.
getInCounts
());
wmsGoodsStockRepositoryImpl
.
updateCounts
(
goodsStock
);
}
}
//日志
//日志
AddLogList
addLogList
=
new
AddLogList
();
List
<
WmsGoodsLog
>
logList
=
new
ArrayList
<>();
WmsGoodsStock
wmsgoodsStock
=
wmsGoodsStockRepositoryImpl
.
findById
(
box
.
getBusinessId
());
WmsGoodsStock
wmsgoodsStock
=
wmsGoodsStockRepositoryImpl
.
findById
(
box
.
getBusinessId
());
WmsGoodsLog
log
=
new
WmsGoodsLog
();
log
.
setApplyId
(
wmsGoodsApply
.
getBusinessId
());
log
.
setGoodsName
(
box
.
getGoodsName
());
log
.
setGoodsId
(
box
.
getBusinessId
());
log
.
setGoodsCode
(
box
.
getGoodsCode
());
WmsGoodsApply
wmsGoodsApplyId
=
new
WmsGoodsApply
();
wmsGoodsApplyId
.
setAppCode
(
addwmsGoodsApply
.
getAppCode
());
List
<
WmsGoodsApply
>
wmsGoodsApplyList
=
baseMapper
.
queryWmsGoodsApplys
(
wmsGoodsApplyId
);
log
.
setApplyId
(
wmsGoodsApplyList
.
get
(
0
).
getBusinessId
());
log
.
setGoodsCounts
(
box
.
getInCounts
());
log
.
setGoodsCounts
(
box
.
getInCounts
());
log
.
setIoType
(
"0"
);
log
.
setIoType
(
"0"
);
assert
wmsgoodsStock
!=
null
;
log
.
setUpdateCounts
(
wmsgoodsStock
.
getGoodsCounts
());
log
.
setUpdateCounts
(
wmsgoodsStock
.
getGoodsCounts
());
logList
.
add
(
log
);
logList
.
add
(
log
);
addLogList
.
setBoxList
(
logList
);
wmsGoodsLogServiceImpl
.
batchPersist
(
logList
);
}
}
wmsGoodsLogServiceImpl
.
batchPersist
(
logList
);
return
new
CyPersistModel
(
1
);
return
new
CyPersistModel
(
1
);
}
}
...
@@ -154,7 +148,7 @@ public class WmsGoodsApplyServiceImpl extends ServiceImpl<WmsGoodsApplyRepositor
...
@@ -154,7 +148,7 @@ public class WmsGoodsApplyServiceImpl extends ServiceImpl<WmsGoodsApplyRepositor
// 日志
// 日志
log
.
setApplyId
(
wmsGoodsApplyOut
.
getBusinessId
());
log
.
setApplyId
(
wmsGoodsApplyOut
.
getBusinessId
());
// todo
// todo
//
log.setGoodsId(box.getBusinessId());
log
.
setGoodsId
(
box
.
getBusinessId
());
log
.
setGoodsCounts
(
box
.
getOutCounts
());
log
.
setGoodsCounts
(
box
.
getOutCounts
());
log
.
setIoType
(
"1"
);
log
.
setIoType
(
"1"
);
log
.
setUpdateCounts
(
goodsStock
.
getGoodsCounts
());
log
.
setUpdateCounts
(
goodsStock
.
getGoodsCounts
());
...
...
src/main/resources/mapper/bus/wmsGoodsLog/WmsGoodsLogMapper.xml
View file @
fabecfc7
...
@@ -13,16 +13,17 @@
...
@@ -13,16 +13,17 @@
<result
column=
"io_type"
jdbcType=
"CHAR"
property=
"ioType"
/>
<result
column=
"io_type"
jdbcType=
"CHAR"
property=
"ioType"
/>
<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_id"
jdbcType=
"VARCHAR"
property=
"goodsId"
/>
<result
column=
"apply_id"
jdbcType=
"INTEGER"
property=
"applyId"
/>
<result
column=
"apply_id"
jdbcType=
"INTEGER"
property=
"applyId"
/>
<result
column=
"goods_counts"
jdbcType=
"INTEGER"
property=
"goodsCounts"
/>
<result
column=
"goods_counts"
jdbcType=
"INTEGER"
property=
"goodsCounts"
/>
<result
column=
"update_counts"
jdbcType=
"INTEGER"
property=
"updateCounts"
/>
<result
column=
"update_counts"
jdbcType=
"INTEGER"
property=
"updateCounts"
/>
</resultMap>
</resultMap>
<insert
id=
"batchPersist"
parameterType=
"java.util.List"
>
<insert
id=
"batchPersist"
parameterType=
"java.util.List"
>
insert into
insert into
wms_goods_log(flag,del_flag,create_by,create_date,update_by,update_date,io_type,goods_name,goods_code,apply_id,goods_counts,update_counts)
wms_goods_log(flag,del_flag,create_by,create_date,update_by,update_date,io_type,goods_name,goods_
id,goods_
code,apply_id,goods_counts,update_counts)
values
values
<foreach
collection=
"list"
item=
"item"
separator=
","
>
<foreach
collection=
"list"
item=
"item"
separator=
","
>
(#{item.flag},#{item.delFlag},#{item.createBy},#{item.createDate},#{item.updateBy},#{item.updateDate},#{item.ioType},#{item.goodsName},#{item.goodsCode},#{item.applyId},#{item.goodsCounts},#{item.updateCounts})
(#{item.flag},#{item.delFlag},#{item.createBy},#{item.createDate},#{item.updateBy},#{item.updateDate},#{item.ioType},#{item.goodsName},#{item.goods
Id},#{item.goods
Code},#{item.applyId},#{item.goodsCounts},#{item.updateCounts})
</foreach>
</foreach>
</insert>
</insert>
<!--<cache type="${corePackag!}.util.RedisCache"/>-->
<!--<cache type="${corePackag!}.util.RedisCache"/>-->
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment