Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
huang.tao
/
jmai-platform
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
fc620dba
authored
Jan 23, 2026
by
zhu.zewen
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
销毁审批关联数据状态更新为“已销毁”
parent
c65eb32b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
2 deletions
jmai-physic/src/main/java/com/jmai/physic/service/impl/PhysicDestroyCheckServiceImpl.java
jmai-physic/src/main/java/com/jmai/physic/service/impl/PhysicDestroyCheckServiceImpl.java
View file @
fc620dba
...
...
@@ -4,6 +4,8 @@ import cn.hutool.core.bean.BeanUtil;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.json.JSONUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.jmai.api.exception.ServiceException
;
import
com.jmai.physic.cloudsign.CloudsignService
;
...
...
@@ -116,6 +118,7 @@ public class PhysicDestroyCheckServiceImpl extends BaseServiceImpl<PhysicDestroy
@Override
public
PhysicDestroyCheck
sign
(
PhysicDestroyCheckSignReq
physicDestroyCheckSignReq
)
{
// 1)审批流处理
boolean
finished
=
false
;
Long
userId
=
SpringContextUtils
.
getUserId
();
SysUser
sysUser
=
sysUserMapper
.
selectById
(
userId
);
...
...
@@ -170,7 +173,8 @@ public class PhysicDestroyCheckServiceImpl extends BaseServiceImpl<PhysicDestroy
}
if
(
finished
){
// 完成 => 转账生成
// 2.1)专账生成
// 完成 => 专账生成
BillDTO
billDTO
=
new
BillDTO
();
BeanUtil
.
copyProperties
(
physicDestroyCheck
,
billDTO
);
billDTO
.
setType
(
7
);
...
...
@@ -178,7 +182,7 @@ public class PhysicDestroyCheckServiceImpl extends BaseServiceImpl<PhysicDestroy
billDTO
.
setRefId
(
physicDestroyCheck
.
getId
());
physicBillService
.
createBill
(
billDTO
);
//创建销毁
//
2.2)
创建销毁
List
<
PhysicDestroyCheckDetail
>
list
=
physicDestroyCheckDetailService
.
list
(
new
LambdaQueryWrapper
<
PhysicDestroyCheckDetail
>().
eq
(
PhysicDestroyCheckDetail:
:
getCheckId
,
physicDestroyCheck
.
getId
()));
for
(
PhysicDestroyCheckDetail
detail
:
list
)
{
PhysicStorageAmpoule
ampoule
=
new
PhysicStorageAmpoule
();
...
...
@@ -208,6 +212,20 @@ public class PhysicDestroyCheckServiceImpl extends BaseServiceImpl<PhysicDestroy
ampoule
.
setPhysicBalance
(
physicSum
-
detail
.
getDestroyNum
());
physicStorageAmpouleMapper
.
insert
(
ampoule
);
}
// 2.3)更新关联数据状态为“已销毁”
LocalDateTime
checkCreateTime
=
physicDestroyCheck
.
getCreateTime
();
for
(
PhysicDestroyCheckDetail
detail
:
list
)
{
LambdaUpdateWrapper
<
PhysicStorageAmpoule
>
updateWrapper
=
Wrappers
.
lambdaUpdate
(
PhysicStorageAmpoule
.
class
)
.
eq
(
PhysicStorageAmpoule:
:
getPhysicName
,
detail
.
getPhysicName
())
.
eq
(
PhysicStorageAmpoule:
:
getPhysicSpec
,
detail
.
getPhysicSpec
())
.
eq
(
PhysicStorageAmpoule:
:
getFactoryName
,
detail
.
getFactoryName
())
.
eq
(
PhysicStorageAmpoule:
:
getBatchNo
,
detail
.
getBatchNo
())
// 按照提交销毁审批的创建时间,之前的全部标记已销毁
.
lt
(
PhysicStorageAmpoule:
:
getCreateTime
,
checkCreateTime
)
.
set
(
PhysicStorageAmpoule:
:
getDestroyStatus
,
1
);
physicStorageAmpouleMapper
.
update
(
null
,
updateWrapper
);
}
}
physicDestroyCheckMapper
.
updateById
(
physicDestroyCheck
);
return
getInfo
(
physicDestroyCheck
.
getId
());
...
...
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