Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
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
项目统一框架
amos-boot-biz
Commits
c3ad2420
Commit
c3ad2420
authored
Jun 03, 2025
by
韩桐桐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug-28712:设备移交,使用单位多次移交给安装单位显示设备已被其他流程使用,不允许重复提交
parent
5ce52eef
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
3 deletions
+21
-3
JgEquipTransferServiceImpl.java
...odule/jg/biz/service/impl/JgEquipTransferServiceImpl.java
+21
-3
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/JgEquipTransferServiceImpl.java
View file @
c3ad2420
...
...
@@ -26,7 +26,9 @@ import com.yeejoin.amos.boot.module.jg.api.service.IJgEquipTransferService;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgInstallationNoticeService
;
import
com.yeejoin.amos.boot.module.jg.api.vo.SortVo
;
import
com.yeejoin.amos.boot.module.jg.api.vo.tableDataExportVo.EquipTransferVo
;
import
com.yeejoin.amos.boot.module.jg.biz.config.LocalBadRequest
;
import
com.yeejoin.amos.boot.module.jg.biz.context.EquipUsedCheckStrategyContext
;
import
com.yeejoin.amos.boot.module.jg.biz.context.FlowingEquipRedisContext
;
import
com.yeejoin.amos.boot.module.jg.biz.edit.permission.FillingEditPermForCurrentUser
;
import
com.yeejoin.amos.boot.module.jg.biz.feign.TzsServiceFeignClient
;
import
com.yeejoin.amos.boot.module.jg.biz.service.ICompensateFlowDataOfRedis
;
...
...
@@ -116,14 +118,13 @@ public class JgEquipTransferServiceImpl extends BaseService<JgEquipTransferDto,
@GlobalTransactional
(
rollbackFor
=
Exception
.
class
)
public
List
<
JgEquipTransfer
>
saveTransfer
(
String
submitType
,
JSONObject
jsonObjectMap
,
ReginParams
reginParams
)
{
JgEquipTransferDto
model
=
JSON
.
parseObject
(
JSONObject
.
toJSONString
(
jsonObjectMap
),
JgEquipTransferDto
.
class
);
convertField
(
model
);
String
equListCode
=
model
.
getEquList
();
List
<
Map
<
String
,
Object
>>
deviceList
=
model
.
getDeviceList
();
if
(
CollectionUtils
.
isEmpty
(
deviceList
))
{
throw
new
BadRequest
(
"请选择设备!"
);
}
try
{
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
// 放在最后面防止前面有异常
// 如果是提交,用于校验设备是否已经在流程中,如果不在标记设备已经在流程中
CompanyBo
company
=
reginParams
.
getCompany
();
...
...
@@ -148,7 +149,6 @@ public class JgEquipTransferServiceImpl extends BaseService<JgEquipTransferDto,
this
.
handleResponseModel
(
listResponseModel
,
"告知单获取失败: "
);
List
<
String
>
applyNoList
=
listResponseModel
.
getResult
();
this
.
handleApplyNoList
(
applyNoList
);
//启动工作流
List
<
WorkflowResultDto
>
workflowResultList
=
this
.
startWorkFlow
(
model
.
getInstallUnitCreditCode
(),
submitType
,
deviceList
);
...
...
@@ -250,6 +250,24 @@ public class JgEquipTransferServiceImpl extends BaseService<JgEquipTransferDto,
// 创建历史数据
this
.
saveOrUpdateHisDataBatch
(
equListCode
,
transferList
,
jgEquipTransferEqList
);
return
transferList
;
}
catch
(
BadRequest
|
LocalBadRequest
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
this
.
rollBackForDelRedisData
();
throw
e
;
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
this
.
rollBackForDelRedisData
();
throw
new
BadRequest
(
"保存失败!"
);
}
finally
{
FlowingEquipRedisContext
.
clean
();
}
}
private
void
rollBackForDelRedisData
()
{
FlowingEquipRedisContext
.
getContext
().
forEach
(
e
->
{
EquipUsedCheckStrategyContext
.
getUsedStrategy
(
EQUIP_TRANSFER_PROCESS_KEY
)
.
delDataForCheckWithKey
(
e
.
getData
(),
e
.
getRedisKey
());
});
}
/**
...
...
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