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
46502a71
Commit
46502a71
authored
Jan 10, 2024
by
刘凡
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_tzs_register' into develop_tzs_register
parents
097bc167
275bef2b
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
118 additions
and
6 deletions
+118
-6
ICmWorkflowService.java
...n/amos/boot/module/jg/biz/service/ICmWorkflowService.java
+16
-0
CmWorkflowServiceImpl.java
...oot/module/jg/biz/service/impl/CmWorkflowServiceImpl.java
+54
-0
JgChangeRegistrationNameServiceImpl.java
...biz/service/impl/JgChangeRegistrationNameServiceImpl.java
+44
-3
urlInfo.json
...s-boot-module-jg-biz/src/main/resources/json/urlInfo.json
+3
-2
pom.xml
amos-boot-system-tzs/pom.xml
+1
-1
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/ICmWorkflowService.java
0 → 100644
View file @
46502a71
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
;
import
com.yeejoin.amos.feign.workflow.model.*
;
import
java.util.List
;
/**
* @author Administrator
*/
public
interface
ICmWorkflowService
{
List
<
ProcessTaskDTO
>
startBatch
(
ActWorkflowBatchDTO
params
);
ProcessTaskDTO
complete
(
String
taskId
,
TaskResultDTO
data
);
ProcessTaskDTO
rollBack
(
String
processInstanceId
);
}
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/CmWorkflowServiceImpl.java
0 → 100644
View file @
46502a71
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
.
impl
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.boot.module.jg.biz.service.ICmWorkflowService
;
import
com.yeejoin.amos.component.feign.utils.FeignUtil
;
import
com.yeejoin.amos.feign.workflow.Workflow
;
import
com.yeejoin.amos.feign.workflow.model.ActWorkflowBatchDTO
;
import
com.yeejoin.amos.feign.workflow.model.ProcessTaskDTO
;
import
com.yeejoin.amos.feign.workflow.model.TaskResultDTO
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
/**
* @author Administrator
*/
@Service
@Slf4j
public
class
CmWorkflowServiceImpl
implements
ICmWorkflowService
{
@Override
public
List
<
ProcessTaskDTO
>
startBatch
(
ActWorkflowBatchDTO
params
)
{
List
<
ProcessTaskDTO
>
processTasks
;
try
{
log
.
info
(
"开始前请求工作流启动接口:/start/batch,请求参数:{}"
,
JSONObject
.
toJSONString
(
params
));
processTasks
=
FeignUtil
.
remoteCall
(()
->
Workflow
.
taskV2Client
.
startForBatch
(
params
));
}
catch
(
Exception
e
)
{
log
.
error
(
"调用工作流批量启动失败"
,
e
);
throw
new
RuntimeException
(
"调用工作流批量启动失败"
);
}
return
processTasks
;
}
@Override
public
ProcessTaskDTO
complete
(
String
taskId
,
TaskResultDTO
data
)
{
ProcessTaskDTO
processTaskDTO
;
try
{
log
.
info
(
"开始前请求工作流完成任务接口:/complete/standard/{taskId},请求参数:{},{}"
,
taskId
,
JSONObject
.
toJSONString
(
data
));
processTaskDTO
=
FeignUtil
.
remoteCall
(()
->
Workflow
.
taskV2Client
.
completeByTaskFroStandard
(
taskId
,
data
));
}
catch
(
Exception
e
)
{
log
.
error
(
"调用工作流完成任务接口失败"
,
e
);
throw
new
RuntimeException
(
"调用工作流完成任务接口失败"
);
}
return
processTaskDTO
;
}
@Override
public
ProcessTaskDTO
rollBack
(
String
processInstanceId
)
{
log
.
info
(
"开始前请求工作流撤回接口:/rollBack/standard/{processInstanceId},请求参数:{}"
,
processInstanceId
);
return
FeignUtil
.
remoteCall
(()
->
Workflow
.
taskV2Client
.
rollBackTask
(
processInstanceId
));
}
}
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 @
46502a71
...
...
@@ -14,7 +14,9 @@ import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgChangeRegistrationNameDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.TaskModelDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.*
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.WorkFlowStatusEnum
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.*
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgChangeRegistrationNameService
;
...
...
@@ -103,6 +105,9 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
@Autowired
AccessFeignService
accessFeignService
;
@Autowired
CommonServiceImpl
commonService
;
...
...
@@ -211,7 +216,8 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
dto
.
setUseUnitCreditCode
(
reginParams
.
getCompany
().
getCompanyCode
());
dto
.
setUseUnitName
(
reginParams
.
getCompany
().
getCompanyName
());
this
.
save
(
dto
);
// 创建代办
this
.
createTaskModel
(
dto
,
taskName
[
0
],
submitType
);
List
<
JgChangeRegistrationNameEq
>
equipList
=
new
ArrayList
<>();
List
<
JgRegistrationHistory
>
list
=
new
ArrayList
<>();
deviceList
.
forEach
(
obj
->
{
...
...
@@ -223,7 +229,6 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
jgRelationEquip
.
setCreateUserId
(
reginParams
.
getUserModel
().
getUserId
());
jgRelationEquip
.
setCreateUserName
(
reginParams
.
getUserModel
().
getRealName
());
equipList
.
add
(
jgRelationEquip
);
JgRegistrationHistory
jgRegistrationHistory
=
new
JgRegistrationHistory
();
jgRegistrationHistory
.
setCreateUserId
(
reginParams
.
getUserModel
().
getUserId
());
jgRegistrationHistory
.
setCreateDate
(
dto
.
getCreateDate
());
...
...
@@ -237,10 +242,46 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
jgRegistrationHistory
.
setCurrentDocumentId
(
dto
.
getApplyNo
());
list
.
add
(
jgRegistrationHistory
);
});
jgChangeRegistrationNameEqService
.
saveBatch
(
equipList
);
jgRegistrationHistoryService
.
saveBatch
(
list
);
}
private
void
createTaskModel
(
JgChangeRegistrationName
dto
,
String
taskName
,
String
submitType
)
{
if
(
"1"
.
equals
(
submitType
)){
TaskModelDto
taskModelDto
=
new
TaskModelDto
();
taskModelDto
.
setFlowCreateDate
(
dto
.
getApplyDate
());
taskModelDto
.
setTaskName
(
taskName
);
taskModelDto
.
setTaskCode
(
dto
.
getApplyNo
());
taskModelDto
.
setTaskContent
(
this
.
buildTaskContent
(
dto
));
taskModelDto
.
setTaskDesc
(
""
);
taskModelDto
.
setTaskType
(
BusinessTypeEnum
.
JG_NAME_CHANGE_REGISTRATION
.
getCode
());
taskModelDto
.
setTaskTypeLabel
(
BusinessTypeEnum
.
JG_NAME_CHANGE_REGISTRATION
.
getName
());
taskModelDto
.
setRelationId
(
dto
.
getInstanceId
());
taskModelDto
.
setExecuteUserIds
(
dto
.
getNextExecutorIds
());
taskModelDto
.
setTaskStatus
(
this
.
getTaskCodeByName
(
dto
.
getAuditStatus
()));
taskModelDto
.
setTaskStatusLabel
(
dto
.
getAuditStatus
());
taskModelDto
.
setStartUserId
(
dto
.
getCreateUserId
());
taskModelDto
.
setStartUser
(
dto
.
getCreateUserName
());
taskModelDto
.
setStartUserCompanyName
(
dto
.
getUseUnitName
());
taskModelDto
.
setStartDate
(
dto
.
getCreateDate
());
taskModelDto
.
setModel
(
dto
);
commonService
.
buildTaskModel
(
Collections
.
singletonList
(
taskModelDto
));
}
}
private
Integer
getTaskCodeByName
(
String
auditStatus
)
{
return
null
;
}
/**
* 摘要构建
* @param dto 业务
* @return 摘要
*/
private
String
buildTaskContent
(
JgChangeRegistrationName
dto
)
{
return
"申请单号:"
+
dto
.
getApplyNo
()
+
"的业务办理"
;
}
public
JgChangeRegistrationNameDto
updateInfo
(
String
submitType
,
JgChangeRegistrationNameDto
jgChangeRegistrationNameDto
,
String
op
)
{
ReginParams
reginParams
=
JSON
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
if
(
Objects
.
isNull
(
jgChangeRegistrationNameDto
)
||
StringUtils
.
isEmpty
(
submitType
))
{
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/resources/json/urlInfo.json
View file @
46502a71
...
...
@@ -135,12 +135,12 @@
"type"
:
"113"
,
"pageType"
:
"look"
,
"name"
:
"设备注销"
,
"url"
:
""
"url"
:
"
/mixuap?appId=1742358052905971713&id=1737357871097606146&sequenceNbr=%s&roleIds=%s&nextExecuteIds=%s&formType=detail¬iceStatus=%s&instanceId=%s
"
},
{
"type"
:
"113"
,
"pageType"
:
"edit"
,
"name"
:
"设备注销"
,
"url"
:
""
"url"
:
"
/mixuap?appId=1742358052905971713&id=1737358169170014210&sequenceNbr=%s&roleIds=%s&nextExecuteIds=%s&formType=edit¬iceStatus=%s&userId=%s&instanceId=%s
"
}
]
\ No newline at end of file
amos-boot-system-tzs/pom.xml
View file @
46502a71
...
...
@@ -48,7 +48,7 @@
<dependency>
<groupId>
com.yeejoin
</groupId>
<artifactId>
amos-feign-workflow
</artifactId>
<version>
1.10.
3
</version>
<version>
1.10.
4
</version>
<scope>
compile
</scope>
</dependency>
<dependency>
...
...
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