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
a26d1289
Commit
a26d1289
authored
Mar 13, 2024
by
tianbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
登记类修改并发问题
parent
e32392c0
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
84 additions
and
72 deletions
+84
-72
IJgChangeRegistrationReformService.java
...le/jg/api/service/IJgChangeRegistrationReformService.java
+3
-3
IJgChangeRegistrationTransferService.java
.../jg/api/service/IJgChangeRegistrationTransferService.java
+2
-2
JgChangeRegistrationNameController.java
...jg/biz/controller/JgChangeRegistrationNameController.java
+15
-19
JgChangeRegistrationReformController.java
.../biz/controller/JgChangeRegistrationReformController.java
+6
-2
JgChangeRegistrationTransferController.java
...iz/controller/JgChangeRegistrationTransferController.java
+17
-24
JgEnableDisableController.java
...t/module/jg/biz/controller/JgEnableDisableController.java
+12
-13
JgMaintenanceContractController.java
...le/jg/biz/controller/JgMaintenanceContractController.java
+7
-2
JgScrapCancelController.java
...oot/module/jg/biz/controller/JgScrapCancelController.java
+7
-2
JgChangeRegistrationNameServiceImpl.java
...biz/service/impl/JgChangeRegistrationNameServiceImpl.java
+10
-4
JgChangeRegistrationReformServiceImpl.java
...z/service/impl/JgChangeRegistrationReformServiceImpl.java
+0
-0
JgChangeRegistrationTransferServiceImpl.java
...service/impl/JgChangeRegistrationTransferServiceImpl.java
+0
-0
JgChangeRegistrationUnitServiceImpl.java
...biz/service/impl/JgChangeRegistrationUnitServiceImpl.java
+0
-0
JgEnableDisableServiceImpl.java
...odule/jg/biz/service/impl/JgEnableDisableServiceImpl.java
+0
-0
JgMaintenanceContractServiceImpl.java
...jg/biz/service/impl/JgMaintenanceContractServiceImpl.java
+0
-0
JgScrapCancelServiceImpl.java
.../module/jg/biz/service/impl/JgScrapCancelServiceImpl.java
+0
-0
JgUseRegistrationServiceImpl.java
...ule/jg/biz/service/impl/JgUseRegistrationServiceImpl.java
+5
-1
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/service/IJgChangeRegistrationReformService.java
View file @
a26d1289
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
service
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgChangeRegistrationReformDto
;
...
...
@@ -50,14 +49,15 @@ public interface IJgChangeRegistrationReformService {
* @param instanceId
* @param operate
* @param comment
* @param nextTaskId 页面上送下一任务id
*/
void
flowExecute
(
Long
id
,
String
instanceId
,
String
operate
,
String
comment
);
void
flowExecute
(
Long
id
,
String
instanceId
,
String
operate
,
String
comment
,
String
nextTaskId
);
/**
* @deprecated 根据流程id执行撤回操作
* @param instanceId
*/
void
withdraw
(
String
instanceId
);
void
withdraw
(
String
instanceId
,
String
nextTaskId
);
/**
* @deprecated 根据id批量删除数据
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/service/IJgChangeRegistrationTransferService.java
View file @
a26d1289
...
...
@@ -30,9 +30,9 @@ public interface IJgChangeRegistrationTransferService extends IService<JgChangeR
Page
<
Map
<
String
,
Object
>>
queryListForPage
(
Page
<
Map
<
String
,
Object
>>
page
,
JgChangeRegistrationTransferDto
params
,
String
companyTypeCode
,
String
companyType
);
void
flowExecute
(
Long
sequenceNbr
,
String
instanceId
,
String
operate
,
String
comment
);
void
flowExecute
(
Long
sequenceNbr
,
String
instanceId
,
String
operate
,
String
comment
,
String
nextTaskId
);
void
revocation
(
String
instanceId
);
void
revocation
(
String
instanceId
,
String
nextTaskId
);
void
exportUseRegistrationCertificate
(
String
sequenceNbr
,
HttpServletResponse
response
,
String
printType
);
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgChangeRegistrationNameController.java
View file @
a26d1289
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
controller
;
import
cn.hutool.core.bean.BeanUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgScrapCancelDto
;
import
com.yeejoin.amos.boot.module.jg.api.enums.WorkFlowStatusEnum
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.Api
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
java.util.*
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgChangeRegistrationNameDto
;
import
com.yeejoin.amos.boot.module.jg.api.enums.WorkFlowStatusEnum
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.JgChangeRegistrationNameServiceImpl
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
javax.servlet.http.HttpServletRequest
;
import
org.springframework.web.bind.annotation.*
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgChangeRegistrationNameDto
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.*
;
/**
* 更名变更登记
...
...
@@ -100,7 +92,11 @@ public class JgChangeRegistrationNameController extends BaseController {
LinkedHashMap
jgRegistrationInfoMap
=
(
LinkedHashMap
)
model1
.
get
(
"jgRegistrationInfo"
);
JgChangeRegistrationNameDto
jgScrapCancelDto
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
jgRegistrationInfoMap
),
JgChangeRegistrationNameDto
.
class
);
jgChangeRegistrationNameService
.
flowExecute
(
Long
.
valueOf
(
String
.
valueOf
(
jgScrapCancelDto
.
getSequenceNbr
())),
jgScrapCancelDto
.
getInstanceId
(),
String
.
valueOf
(
map
.
get
(
"operate"
)),
String
.
valueOf
(
map
.
get
(
"opinion"
)));
jgChangeRegistrationNameService
.
flowExecute
(
Long
.
valueOf
(
String
.
valueOf
(
jgScrapCancelDto
.
getSequenceNbr
())),
jgScrapCancelDto
.
getInstanceId
(),
String
.
valueOf
(
map
.
get
(
"operate"
)),
String
.
valueOf
(
map
.
get
(
"operate"
)),
String
.
valueOf
(
map
.
get
(
"nextTaskId"
)));
return
ResponseHelper
.
buildResponse
(
"ok"
);
}
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgChangeRegistrationReformController.java
View file @
a26d1289
...
...
@@ -49,14 +49,18 @@ public class JgChangeRegistrationReformController extends BaseController {
@PostMapping
(
value
=
"/flowExecute"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"执行流程"
,
notes
=
"执行流程"
)
public
ResponseModel
<
Object
>
flowExecute
(
@RequestBody
JSONObject
map
)
{
jgChangeRegistrationReformServiceImpl
.
flowExecute
(
Long
.
valueOf
(
String
.
valueOf
(
map
.
get
(
"sequenceNbr"
))),
String
.
valueOf
(
map
.
get
(
"instanceId"
)),
String
.
valueOf
(
map
.
get
(
"operate"
)),
String
.
valueOf
(
map
.
get
(
"comment"
)));
jgChangeRegistrationReformServiceImpl
.
flowExecute
(
Long
.
valueOf
(
String
.
valueOf
(
map
.
get
(
"sequenceNbr"
))),
String
.
valueOf
(
map
.
get
(
"instanceId"
)),
String
.
valueOf
(
map
.
get
(
"operate"
)),
String
.
valueOf
(
map
.
get
(
"comment"
)),
String
.
valueOf
(
map
.
get
(
"nextTaskId"
)));
return
ResponseHelper
.
buildResponse
(
"ok"
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/withdraw"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"撤回"
,
notes
=
"撤回"
)
public
ResponseModel
<
Object
>
withdraw
(
@RequestBody
JSONObject
map
)
{
jgChangeRegistrationReformServiceImpl
.
withdraw
(
String
.
valueOf
(
map
.
get
(
"instanceId"
)));
jgChangeRegistrationReformServiceImpl
.
withdraw
(
String
.
valueOf
(
map
.
get
(
"instanceId"
))
,
String
.
valueOf
(
map
.
get
(
"nextTaskId"
))
);
return
ResponseHelper
.
buildResponse
(
"ok"
);
}
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgChangeRegistrationTransferController.java
View file @
a26d1289
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
controller
;
import
com.alibaba.fastjson.JSONObject
;
import
com.
netflix.ribbon.proxy.annotation.Http
;
import
com.
baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgChangeRegistrationTransferDto
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgChangeRegistrationTransferService
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgInstallationNoticeService
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.IdxBizJgRegisterInfoServiceImpl
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.Api
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
java.io.BufferedOutputStream
;
import
java.io.File
;
import
java.io.FileInputStream
;
import
java.io.IOException
;
import
java.io.OutputStream
;
import
java.net.URLEncoder
;
import
java.util.Map
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
org.springframework.web.bind.annotation.*
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgChangeRegistrationTransferDto
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
java.util.Map
;
/**
* 移装变更登记登记
...
...
@@ -100,7 +88,11 @@ public class JgChangeRegistrationTransferController extends BaseController {
@PostMapping
(
value
=
"/flowExecute"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"执行流程"
,
notes
=
"执行流程"
)
public
ResponseModel
<
Object
>
flowExecute
(
@RequestBody
JSONObject
map
)
{
jgChangeRegistrationTransferService
.
flowExecute
(
Long
.
valueOf
(
String
.
valueOf
(
map
.
get
(
"sequenceNbr"
))),
String
.
valueOf
(
map
.
get
(
"instanceId"
)),
String
.
valueOf
(
map
.
get
(
"operate"
)),
String
.
valueOf
(
map
.
get
(
"opinion"
)));
jgChangeRegistrationTransferService
.
flowExecute
(
Long
.
valueOf
(
String
.
valueOf
(
map
.
get
(
"sequenceNbr"
))),
String
.
valueOf
(
map
.
get
(
"instanceId"
)),
String
.
valueOf
(
map
.
get
(
"operate"
)),
String
.
valueOf
(
map
.
get
(
"operate"
)),
String
.
valueOf
(
map
.
get
(
"nextTaskId"
)));
return
ResponseHelper
.
buildResponse
(
"ok"
);
}
...
...
@@ -108,7 +100,8 @@ public class JgChangeRegistrationTransferController extends BaseController {
@PostMapping
(
value
=
"/revocation"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"撤回"
,
notes
=
"撤回"
)
public
ResponseModel
<
Object
>
revocation
(
@RequestBody
JSONObject
map
)
{
jgChangeRegistrationTransferService
.
revocation
(
String
.
valueOf
(
map
.
get
(
"instanceId"
)));
jgChangeRegistrationTransferService
.
revocation
(
String
.
valueOf
(
map
.
get
(
"instanceId"
)),
String
.
valueOf
(
map
.
get
(
"nextTaskId"
)));
return
ResponseHelper
.
buildResponse
(
"ok"
);
}
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgEnableDisableController.java
View file @
a26d1289
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
controller
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.Api
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
java.util.Map
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgEnableDisableDto
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.JgEnableDisableServiceImpl
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgEnableDisableDto
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.Map
;
/**
* @author system_generator
...
...
@@ -74,7 +73,7 @@ public class JgEnableDisableController extends BaseController {
@PostMapping
(
value
=
"/withdraw"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"撤回"
,
notes
=
"撤回"
)
public
ResponseModel
<
Object
>
withdraw
(
@RequestBody
JSONObject
map
)
{
jgEnableDisableServiceImpl
.
withdraw
(
String
.
valueOf
(
map
.
get
(
"instanceId"
)));
jgEnableDisableServiceImpl
.
withdraw
(
String
.
valueOf
(
map
.
get
(
"instanceId"
))
,
String
.
valueOf
(
map
.
get
(
"nextTaskId"
))
);
return
ResponseHelper
.
buildResponse
(
"ok"
);
}
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgMaintenanceContractController.java
View file @
a26d1289
...
...
@@ -65,7 +65,7 @@ public class JgMaintenanceContractController extends BaseController {
@PostMapping
(
value
=
"/revocation"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"维保合同撤回"
,
notes
=
"维保合同撤回"
)
public
ResponseModel
<
Object
>
revocation
(
@RequestBody
JSONObject
map
)
{
jgMaintenanceContractServiceImpl
.
revocation
(
String
.
valueOf
(
map
.
get
(
"instanceId"
)));
jgMaintenanceContractServiceImpl
.
revocation
(
String
.
valueOf
(
map
.
get
(
"instanceId"
))
,
String
.
valueOf
(
map
.
get
(
"nextTaskId"
))
);
return
ResponseHelper
.
buildResponse
(
"ok"
);
}
...
...
@@ -129,7 +129,12 @@ public class JgMaintenanceContractController extends BaseController {
@PostMapping
(
value
=
"/flowExecute"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"执行流程"
,
notes
=
"执行流程"
)
public
ResponseModel
<
Object
>
flowExecute
(
@RequestBody
JSONObject
map
)
{
jgMaintenanceContractServiceImpl
.
flowExecute
(
Long
.
valueOf
(
String
.
valueOf
(
map
.
get
(
"sequenceNbr"
))),
String
.
valueOf
(
map
.
get
(
"instanceId"
)),
String
.
valueOf
(
map
.
get
(
"operate"
)),
String
.
valueOf
(
map
.
get
(
"comment"
)),
true
);
jgMaintenanceContractServiceImpl
.
flowExecute
(
Long
.
valueOf
(
String
.
valueOf
(
map
.
get
(
"sequenceNbr"
))),
String
.
valueOf
(
map
.
get
(
"instanceId"
)),
String
.
valueOf
(
map
.
get
(
"operate"
)),
String
.
valueOf
(
map
.
get
(
"comment"
)),
true
,
String
.
valueOf
(
map
.
get
(
"nextTaskId"
)));
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
if
(
map
.
containsKey
(
"formData"
)
&&
!
ObjectUtils
.
isEmpty
(
map
.
get
(
"formData"
))){
JgMaintenanceContract
dto
=
new
JgMaintenanceContract
();
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgScrapCancelController.java
View file @
a26d1289
...
...
@@ -78,7 +78,12 @@ public class JgScrapCancelController extends BaseController {
jgScrapCancelInfo
.
remove
(
"SEQUENCE_NBR"
);
JgScrapCancelDto
jgScrapCancelDto
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
jgScrapCancelInfo
),
JgScrapCancelDto
.
class
);
jgScrapCancelService
.
flowExecute
(
jgScrapCancelDto
.
getEquList
(),
Long
.
valueOf
(
String
.
valueOf
(
jgScrapCancelDto
.
getSequenceNbr
())),
jgScrapCancelDto
.
getInstanceId
(),
String
.
valueOf
(
map
.
get
(
"operate"
)),
String
.
valueOf
(
map
.
get
(
"opinion"
)));
jgScrapCancelService
.
flowExecute
(
jgScrapCancelDto
.
getEquList
(),
Long
.
valueOf
(
String
.
valueOf
(
jgScrapCancelDto
.
getSequenceNbr
())),
jgScrapCancelDto
.
getInstanceId
(),
String
.
valueOf
(
map
.
get
(
"operate"
)),
String
.
valueOf
(
map
.
get
(
"operate"
)),
String
.
valueOf
(
map
.
get
(
"nextTaskId"
)));
return
ResponseHelper
.
buildResponse
(
"ok"
);
}
...
...
@@ -135,7 +140,7 @@ public class JgScrapCancelController extends BaseController {
@PostMapping
(
value
=
"/withdraw"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"撤回"
,
notes
=
"撤回"
)
public
ResponseModel
<
Object
>
revocation
(
@RequestBody
JSONObject
map
)
{
jgScrapCancelService
.
revocation
(
String
.
valueOf
(
map
.
get
(
"instanceId"
)));
jgScrapCancelService
.
revocation
(
String
.
valueOf
(
map
.
get
(
"instanceId"
))
,
String
.
valueOf
(
map
.
get
(
"nextTaskId"
))
);
return
ResponseHelper
.
buildResponse
(
"ok"
);
}
...
...
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 @
a26d1289
...
...
@@ -494,6 +494,9 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
// 判断撤回后当前的节点,如果当前节点为提交节点则页面可编辑
jsonObject
.
put
(
"pageType"
,
this
.
getPageTypeByCurrentNode
(
jgChangeRegistrationName
.
getAuditStatus
()));
commonService
.
rollbackTask
(
instanceId
,
jsonObject
);
// 保存redis最新流程数据
commonService
.
saveExecuteFlowData2Redis
(
jgChangeRegistrationName
.
getInstanceId
(),
this
.
buildInstanceRuntimeData
(
jgChangeRegistrationName
));
}
catch
(
InterruptedException
e
)
{
e
.
printStackTrace
();
}
finally
{
...
...
@@ -518,19 +521,20 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
}
public
void
flowExecute
(
Long
id
,
String
instanceId
,
String
operate
,
String
comment
)
{
public
void
flowExecute
(
Long
id
,
String
instanceId
,
String
operate
,
String
comment
,
String
nextTaskId
)
{
String
lockKey
=
CommonServiceImpl
.
buildJgExecuteLockKey
(
instanceId
);
RLock
lock
=
redissonClient
.
getLock
(
lockKey
);
try
{
boolean
isLocked
=
lock
.
tryLock
();
boolean
isLocked
=
lock
.
tryLock
(
0
,
180
,
TimeUnit
.
SECONDS
);
// 解决并发问题:多个人同时操作一个流程(并发执行通过、驳回)
if
(!
isLocked
){
throw
new
BadRequest
(
"当前流程已经被执行!"
);
}
// 流程执行时,状态及权限校验
commonService
.
checkForExecuteFlow
(
nextTaskId
,
instanceId
);
JgChangeRegistrationName
jgChangeRegistrationName
=
this
.
getBaseMapper
().
selectById
(
id
);
String
taskId
=
jgChangeRegistrationName
.
getNextTaskId
();
// 流程执行时,状态及权限校验
commonService
.
checkForExecuteFlow
(
taskId
,
instanceId
);
// 组装信息
TaskResultDTO
dto
=
new
TaskResultDTO
();
dto
.
setResultCode
(
"approvalStatus"
);
...
...
@@ -549,6 +553,8 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
ProcessTaskDTO
processTaskDTO
=
cmWorkflowService
.
completeOrReject
(
taskId
,
dto
,
operate
);
// 更新下一步执行人、创建待办
updateExecuteIds
(
instanceId
,
id
,
operate
,
processTaskDTO
);
}
catch
(
InterruptedException
e
)
{
e
.
printStackTrace
();
}
finally
{
if
(
lock
.
isHeldByCurrentThread
()){
lock
.
unlock
();
...
...
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 @
a26d1289
This diff is collapsed.
Click to expand it.
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 @
a26d1289
This diff is collapsed.
Click to expand it.
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 @
a26d1289
This diff is collapsed.
Click to expand it.
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 @
a26d1289
This diff is collapsed.
Click to expand it.
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 @
a26d1289
This diff is collapsed.
Click to expand it.
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 @
a26d1289
This diff is collapsed.
Click to expand it.
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/JgUseRegistrationServiceImpl.java
View file @
a26d1289
...
...
@@ -641,6 +641,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
}
// 流程执行时,状态及权限校验
commonService
.
checkForExecuteFlow
(
nextTaskId
,
instanceId
);
JgUseRegistration
jgUseRegistration
=
this
.
getBaseMapper
().
selectById
(
id
);
// 组装信息
TaskResultDTO
dto
=
new
TaskResultDTO
();
...
...
@@ -682,13 +683,14 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
String
lockKey
=
CommonServiceImpl
.
buildJgExecuteLockKey
(
instanceId
);
RLock
lock
=
redissonClient
.
getLock
(
lockKey
);
try
{
boolean
isLocked
=
lock
.
tryLock
();
boolean
isLocked
=
lock
.
tryLock
(
0
,
180
,
TimeUnit
.
SECONDS
);
// 解决并发问题:多个人同时操作一个流程(并发执行通过、驳回、撤回)
if
(!
isLocked
){
throw
new
BadRequest
(
"当前流程已经被执行!"
);
}
// 撤回校验
commonServiceImpl
.
checkForRevocationFlow
(
nextTaskId
,
instanceId
);
JgUseRegistration
jgUseRegistration
=
new
JgUseRegistration
();
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
ProcessTaskDTO
processTaskDTO
=
cmWorkflowService
.
rollBack
(
instanceId
);
...
...
@@ -732,6 +734,8 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
commonServiceImpl
.
rollbackTask
(
instanceId
,
jsonObject
);
// redis流程实时数据更新
commonServiceImpl
.
saveExecuteFlowData2Redis
(
instanceId
,
this
.
buildInstanceRuntimeData
(
data
));
}
catch
(
InterruptedException
e
)
{
e
.
printStackTrace
();
}
finally
{
if
(
lock
.
isHeldByCurrentThread
()){
lock
.
unlock
();
...
...
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