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
fb914e68
Commit
fb914e68
authored
Dec 20, 2024
by
罗林杰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完善退单
parent
408ec09e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
7 deletions
+12
-7
StoreGoodsApplyServiceImpl.java
...regoodsapply/service/impl/StoreGoodsApplyServiceImpl.java
+4
-1
StoreGoodsLogServiceImpl.java
.../storegoodslog/service/impl/StoreGoodsLogServiceImpl.java
+8
-6
No files found.
src/main/java/org/rcisoft/bus/storegoodsapply/service/impl/StoreGoodsApplyServiceImpl.java
View file @
fb914e68
...
@@ -256,7 +256,7 @@ public class StoreGoodsApplyServiceImpl extends ServiceImpl<StoreGoodsApplyRepos
...
@@ -256,7 +256,7 @@ public class StoreGoodsApplyServiceImpl extends ServiceImpl<StoreGoodsApplyRepos
@Override
@Override
public
CyPersistModel
merge
(
StoreGoodsApply
storeGoodsApply
)
{
public
CyPersistModel
merge
(
StoreGoodsApply
storeGoodsApply
)
{
if
(
storeGoodsApply
.
getIsReturn
().
equals
(
"2"
)){
if
(
"2"
.
equals
(
storeGoodsApply
.
getIsReturn
()
)){
StoreGoodsLog
storeGoodsLog
=
new
StoreGoodsLog
();
StoreGoodsLog
storeGoodsLog
=
new
StoreGoodsLog
();
storeGoodsLog
.
setApplyId
(
storeGoodsApply
.
getBusinessId
());
storeGoodsLog
.
setApplyId
(
storeGoodsApply
.
getBusinessId
());
//根据id查询子表
//根据id查询子表
...
@@ -269,6 +269,9 @@ public class StoreGoodsApplyServiceImpl extends ServiceImpl<StoreGoodsApplyRepos
...
@@ -269,6 +269,9 @@ public class StoreGoodsApplyServiceImpl extends ServiceImpl<StoreGoodsApplyRepos
//修改子表状态
//修改子表状态
storeGoodsLogServiceImpl
.
updateStatus
(
storeGoodsApply
);
storeGoodsLogServiceImpl
.
updateStatus
(
storeGoodsApply
);
}
}
if
(
"3"
.
equals
(
storeGoodsApply
.
getIsReturn
())){
storeGoodsApply
.
setIsReturn
(
"2"
);
}
int
line
=
baseMapper
.
updateById
(
storeGoodsApply
);
int
line
=
baseMapper
.
updateById
(
storeGoodsApply
);
log
.
debug
(
CyUserUtil
.
getAuthenUsername
()
+
"修改了ID为"
+
storeGoodsApply
.
getBusinessId
()
+
"的商品申请表信息"
);
log
.
debug
(
CyUserUtil
.
getAuthenUsername
()
+
"修改了ID为"
+
storeGoodsApply
.
getBusinessId
()
+
"的商品申请表信息"
);
...
...
src/main/java/org/rcisoft/bus/storegoodslog/service/impl/StoreGoodsLogServiceImpl.java
View file @
fb914e68
...
@@ -101,16 +101,18 @@ public class StoreGoodsLogServiceImpl extends ServiceImpl<StoreGoodsLogRepositor
...
@@ -101,16 +101,18 @@ public class StoreGoodsLogServiceImpl extends ServiceImpl<StoreGoodsLogRepositor
StoreGoodsLog
oldStoreGoodsLog
=
storeGoodsLogServiceImpl
.
findById
(
storeGoodsLog
.
getBusinessId
());
StoreGoodsLog
oldStoreGoodsLog
=
storeGoodsLogServiceImpl
.
findById
(
storeGoodsLog
.
getBusinessId
());
for
(
StoreGoodsLog
box
:
storeGoodsLogServiceImpl
.
findAll
(
oldStoreGoodsLog
))
{
if
(
storeGoodsLog
.
getIsReturn
().
equals
(
"1"
)){
StoreGoodsStock
goodsStock
=
storeGoodsStockRepository
.
selectByGoodsId
(
box
.
getGoodsId
());
for
(
StoreGoodsLog
box
:
storeGoodsLogServiceImpl
.
findAll
(
oldStoreGoodsLog
))
{
goodsStock
.
setGoodsCounts
(
goodsStock
.
getGoodsCounts
()
+
box
.
getGoodsCounts
());
StoreGoodsStock
goodsStock
=
storeGoodsStockRepository
.
selectByGoodsId
(
box
.
getGoodsId
());
// 返回库存
goodsStock
.
setGoodsCounts
(
goodsStock
.
getGoodsCounts
()
+
box
.
getGoodsCounts
());
storeGoodsStockRepositoryImpl
.
updateCounts
(
goodsStock
);
// 返回库存
storeGoodsStockRepositoryImpl
.
updateCounts
(
goodsStock
);
}
}
}
StoreGoodsApply
storeGoodsApply
=
new
StoreGoodsApply
();
StoreGoodsApply
storeGoodsApply
=
new
StoreGoodsApply
();
storeGoodsApply
.
setBusinessId
(
oldStoreGoodsLog
.
getApplyId
());
storeGoodsApply
.
setBusinessId
(
oldStoreGoodsLog
.
getApplyId
());
storeGoodsApply
.
setIsReturn
(
"1"
);
storeGoodsApply
.
setIsReturn
(
storeGoodsLog
.
getIsReturn
()
);
storeGoodsApplyServiceImpl
.
merge
(
storeGoodsApply
);
storeGoodsApplyServiceImpl
.
merge
(
storeGoodsApply
);
oldStoreGoodsLog
.
setIsReturn
(
"1"
);
oldStoreGoodsLog
.
setIsReturn
(
"1"
);
...
...
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