Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
JSH ERP
Commits
1b787788
Commit
1b787788
authored
Oct 23, 2021
by
季圣华
Browse files
解决实时库存计算的bug
parent
33142434
Changes
1
Hide whitespace changes
Inline
Side-by-side
jshERP-boot/src/main/java/com/jsh/erp/service/depotItem/DepotItemService.java
View file @
1b787788
...
...
@@ -491,10 +491,17 @@ public class DepotItemService {
@Transactional
(
value
=
"transactionManager"
,
rollbackFor
=
Exception
.
class
)
public
void
deleteDepotItemHeadId
(
Long
headerId
)
throws
Exception
{
DepotItemExample
example
=
new
DepotItemExample
();
example
.
createCriteria
().
andHeaderIdEqualTo
(
headerId
);
try
{
//1、查询删除前的单据明细
List
<
DepotItem
>
depotItemList
=
getListByHeaderId
(
headerId
);
//2、删除单据明细
DepotItemExample
example
=
new
DepotItemExample
();
example
.
createCriteria
().
andHeaderIdEqualTo
(
headerId
);
depotItemMapper
.
deleteByExample
(
example
);
//3、计算删除之后单据明细中商品的库存
for
(
DepotItem
depotItem
:
depotItemList
){
updateCurrentStock
(
depotItem
);
}
}
catch
(
Exception
e
){
JshException
.
writeFail
(
logger
,
e
);
}
...
...
Write
Preview
Supports
Markdown
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