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
40be656c
Commit
40be656c
authored
Apr 28, 2024
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.流程增加事务
parent
65eb30c9
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
25 additions
and
7 deletions
+25
-7
CommonServiceImpl.java
...os/boot/module/jg/biz/service/impl/CommonServiceImpl.java
+2
-0
JgChangeRegistrationNameServiceImpl.java
...biz/service/impl/JgChangeRegistrationNameServiceImpl.java
+2
-2
JgChangeRegistrationReformServiceImpl.java
...z/service/impl/JgChangeRegistrationReformServiceImpl.java
+3
-1
JgChangeRegistrationTransferServiceImpl.java
...service/impl/JgChangeRegistrationTransferServiceImpl.java
+5
-0
JgChangeRegistrationUnitServiceImpl.java
...biz/service/impl/JgChangeRegistrationUnitServiceImpl.java
+1
-0
JgEnableDisableServiceImpl.java
...odule/jg/biz/service/impl/JgEnableDisableServiceImpl.java
+2
-0
JgEquipTransferServiceImpl.java
...odule/jg/biz/service/impl/JgEquipTransferServiceImpl.java
+2
-0
JgMaintainNoticeServiceImpl.java
...dule/jg/biz/service/impl/JgMaintainNoticeServiceImpl.java
+2
-1
JgMaintenanceContractServiceImpl.java
...jg/biz/service/impl/JgMaintenanceContractServiceImpl.java
+2
-1
JgReformNoticeServiceImpl.java
...module/jg/biz/service/impl/JgReformNoticeServiceImpl.java
+1
-0
JgScrapCancelServiceImpl.java
.../module/jg/biz/service/impl/JgScrapCancelServiceImpl.java
+2
-2
JgVehicleInformationServiceImpl.java
.../jg/biz/service/impl/JgVehicleInformationServiceImpl.java
+1
-0
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/CommonServiceImpl.java
View file @
40be656c
...
...
@@ -73,6 +73,7 @@ import org.springframework.core.io.ClassPathResource;
import
org.springframework.core.io.Resource
;
import
org.springframework.http.MediaType
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.Assert
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.ObjectUtils
;
...
...
@@ -1054,6 +1055,7 @@ public class CommonServiceImpl implements ICommonService {
}
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
Object
transfer
(
Map
<
String
,
Object
>
map
)
{
if
(
ObjectUtils
.
isEmpty
(
map
.
get
(
"nextTaskId"
))
||
map
.
get
(
"nextTaskId"
)
==
null
)
{
throw
new
BadRequest
(
"nextTaskId不能为空"
);
...
...
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/JgChangeRegistrationNameServiceImpl.java
View file @
40be656c
...
...
@@ -459,7 +459,7 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
ids
.
forEach
(
id
->
commonService
.
deleteTaskModel
(
id
+
""
));
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
revocation
(
String
instanceId
,
String
taskId
)
{
String
lockKey
=
CommonServiceImpl
.
buildJgExecuteLockKey
(
instanceId
);
RLock
lock
=
redissonClient
.
getLock
(
lockKey
);
...
...
@@ -530,7 +530,7 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
}
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
flowExecute
(
Long
id
,
String
instanceId
,
String
operate
,
String
comment
,
String
nextTaskId
)
{
String
lockKey
=
CommonServiceImpl
.
buildJgExecuteLockKey
(
instanceId
);
RLock
lock
=
redissonClient
.
getLock
(
lockKey
);
...
...
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/JgChangeRegistrationReformServiceImpl.java
View file @
40be656c
...
...
@@ -134,7 +134,7 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
return
listPage
;
}
@Transactional
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
List
<
Map
<
String
,
Object
>>
save
(
JSONObject
map
)
{
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
UseInfo
useInfo
=
new
UseInfo
();
...
...
@@ -396,6 +396,7 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
.
build
();
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
flowExecute
(
Long
id
,
String
instanceId
,
String
operate
,
String
comment
,
String
nextTaskId
)
{
String
lockKey
=
CommonServiceImpl
.
buildJgExecuteLockKey
(
instanceId
);
RLock
lock
=
redissonClient
.
getLock
(
lockKey
);
...
...
@@ -438,6 +439,7 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
withdraw
(
String
instanceId
,
String
nextTaskId
)
{
String
lockKey
=
CommonServiceImpl
.
buildJgExecuteLockKey
(
instanceId
);
RLock
lock
=
redissonClient
.
getLock
(
lockKey
);
...
...
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/JgChangeRegistrationTransferServiceImpl.java
View file @
40be656c
...
...
@@ -51,6 +51,7 @@ import org.redisson.api.RedissonClient;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.StringUtils
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
...
...
@@ -138,6 +139,7 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
* @param map
* @return
*/
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
List
<
JgChangeRegistrationTransferDto
>
createTransfer
(
String
submitType
,
JSONObject
map
,
ReginParams
reginParams
)
{
Map
<
String
,
Object
>
tableData
=
(
Map
<
String
,
Object
>)
map
.
get
(
TABLE_PAGE_ID
);
...
...
@@ -393,6 +395,7 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
* @param operate
* @param comment
*/
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
flowExecute
(
Long
id
,
String
instanceId
,
String
operate
,
String
comment
,
String
nextTaskId
)
{
String
lockKey
=
CommonServiceImpl
.
buildJgExecuteLockKey
(
instanceId
);
RLock
lock
=
redissonClient
.
getLock
(
lockKey
);
...
...
@@ -441,6 +444,8 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
*
* @param instanceId
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
revocation
(
String
instanceId
,
String
nextTaskId
)
{
String
lockKey
=
CommonServiceImpl
.
buildJgExecuteLockKey
(
instanceId
);
RLock
lock
=
redissonClient
.
getLock
(
lockKey
);
...
...
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/JgChangeRegistrationUnitServiceImpl.java
View file @
40be656c
...
...
@@ -758,6 +758,7 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
}
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
cancel
(
JgChangeRegistrationUnitDto
noticeDto
)
{
String
lockKey
=
CommonServiceImpl
.
buildJgExecuteLockKey
(
noticeDto
.
getInstanceId
());
RLock
lock
=
redissonClient
.
getLock
(
lockKey
);
...
...
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/JgEnableDisableServiceImpl.java
View file @
40be656c
...
...
@@ -424,6 +424,7 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
@Autowired
RegistrationInfoMapper
tzsJgRegistrationInfoMapper
;
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
flowExecute
(
Long
id
,
String
instanceId
,
String
operate
,
String
comment
,
String
nextTaskId
)
{
String
lockKey
=
CommonServiceImpl
.
buildJgExecuteLockKey
(
instanceId
);
RLock
lock
=
redissonClient
.
getLock
(
lockKey
);
...
...
@@ -595,6 +596,7 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
withdraw
(
String
instanceId
,
String
nextTaskId
)
{
String
lockKey
=
CommonServiceImpl
.
buildJgExecuteLockKey
(
instanceId
);
RLock
lock
=
redissonClient
.
getLock
(
lockKey
);
...
...
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 @
40be656c
...
...
@@ -384,6 +384,7 @@ public class JgEquipTransferServiceImpl extends BaseService<JgEquipTransferDto,
* @param jgEquipTransferDto 设备信息
* @param op 通过或驳回
*/
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
accept
(
JgEquipTransferDto
jgEquipTransferDto
,
String
op
)
{
String
instanceId
=
jgEquipTransferDto
.
getInstanceId
();
String
nextTaskId
=
jgEquipTransferDto
.
getNextTaskId
();
...
...
@@ -492,6 +493,7 @@ public class JgEquipTransferServiceImpl extends BaseService<JgEquipTransferDto,
*
* @param equipTransferInfo 设备移交信息
*/
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
cancel
(
JgEquipTransferDto
equipTransferInfo
)
{
String
instanceId
=
equipTransferInfo
.
getInstanceId
();
String
nextTaskId
=
equipTransferInfo
.
getNextTaskId
();
...
...
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/JgMaintainNoticeServiceImpl.java
View file @
40be656c
...
...
@@ -690,6 +690,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
}
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
cancel
(
JgMaintainNoticeDto
noticeDto
)
{
String
instanceId
=
noticeDto
.
getInstanceId
();
String
nextTaskId
=
noticeDto
.
getNextTaskId
();
...
...
@@ -739,7 +740,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
.
build
();
}
@Transactional
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
accept
(
JgMaintainNoticeDto
dto
,
String
op
,
String
opinion
)
{
String
instanceId
=
dto
.
getInstanceId
();
String
nextTaskId
=
dto
.
getNextTaskId
();
...
...
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/JgMaintenanceContractServiceImpl.java
View file @
40be656c
...
...
@@ -171,6 +171,7 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
return
maintenanceContractMapper
.
updateBySequenceNbr
(
dto
);
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
flowExecute
(
Long
id
,
String
instanceId
,
String
operate
,
String
comment
,
Boolean
update
,
String
nextTaskId
)
{
String
lockKey
=
CommonServiceImpl
.
buildJgExecuteLockKey
(
instanceId
);
RLock
lock
=
redissonClient
.
getLock
(
lockKey
);
...
...
@@ -292,7 +293,7 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
/**
* 维保合同撤回
*/
@Transactional
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
revocation
(
String
instanceId
,
String
_nextTaskId
)
{
String
lockKey
=
CommonServiceImpl
.
buildJgExecuteLockKey
(
instanceId
);
RLock
lock
=
redissonClient
.
getLock
(
lockKey
);
...
...
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/JgReformNoticeServiceImpl.java
View file @
40be656c
...
...
@@ -690,6 +690,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
* @param dto 改造信息
* @param op 通过或驳回
*/
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
accept
(
JgReformNoticeDto
dto
,
String
op
)
{
String
instanceId
=
dto
.
getInstanceId
();
String
nextTaskId
=
dto
.
getNextTaskId
();
...
...
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/JgScrapCancelServiceImpl.java
View file @
40be656c
...
...
@@ -573,7 +573,7 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
}
@Transactional
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
revocation
(
String
instanceId
,
String
nextTaskId
)
{
String
lockKey
=
CommonServiceImpl
.
buildJgExecuteLockKey
(
instanceId
);
RLock
lock
=
redissonClient
.
getLock
(
lockKey
);
...
...
@@ -638,7 +638,7 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
}
}
@Transactional
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
flowExecute
(
String
equList
,
Long
id
,
String
instanceId
,
String
operate
,
String
comment
,
String
nextTaskId
)
{
String
lockKey
=
CommonServiceImpl
.
buildJgExecuteLockKey
(
instanceId
);
RLock
lock
=
redissonClient
.
getLock
(
lockKey
);
...
...
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/JgVehicleInformationServiceImpl.java
View file @
40be656c
...
...
@@ -502,6 +502,7 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
* @param comment 意见
* @param nextTaskId nextTaskId
*/
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
flowExecute
(
Long
sequenceNbr
,
String
instanceId
,
String
operate
,
String
comment
,
String
nextTaskId
,
String
equDefineCode
)
{
String
lockKey
=
CommonServiceImpl
.
buildJgExecuteLockKey
(
instanceId
);
RLock
lock
=
redissonClient
.
getLock
(
lockKey
);
...
...
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