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
d5fa2d80
Commit
d5fa2d80
authored
Jan 18, 2024
by
李秀明
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/developer' into developer
parents
b910eb0e
dd274271
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
46 additions
and
20 deletions
+46
-20
StandardDto.java
...om/yeejoin/amos/boot/module/hygf/api/dto/StandardDto.java
+1
-1
HygfOnGrid.java
.../yeejoin/amos/boot/module/hygf/api/entity/HygfOnGrid.java
+2
-1
BasicGridAcceptanceServiceImpl.java
...hygf/biz/service/impl/BasicGridAcceptanceServiceImpl.java
+28
-9
WorkflowImpl.java
.../amos/boot/module/hygf/biz/service/impl/WorkflowImpl.java
+15
-9
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/StandardDto.java
View file @
d5fa2d80
...
@@ -11,7 +11,7 @@ import lombok.Data;
...
@@ -11,7 +11,7 @@ import lombok.Data;
public
class
StandardDto
{
public
class
StandardDto
{
private
String
comment
;
//审核备注
private
String
comment
;
//审核备注
private
String
result
;
//审核状态值
private
String
result
;
//审核状态值
private
String
resultCode
=
"approvalStatus"
;
//审核状态key
private
String
resultCode
;
//审核状态key
private
String
taskId
;
//工作流任务id
private
String
taskId
;
//工作流任务id
private
VariableDto
variable
;
//提交表单值
private
VariableDto
variable
;
//提交表单值
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/entity/HygfOnGrid.java
View file @
d5fa2d80
...
@@ -148,5 +148,6 @@ public class HygfOnGrid extends BaseEntity {
...
@@ -148,5 +148,6 @@ public class HygfOnGrid extends BaseEntity {
@TableField
(
"grid_connection_time"
)
@TableField
(
"grid_connection_time"
)
private
Date
gridConnectionTime
;
private
Date
gridConnectionTime
;
@TableField
(
exist
=
false
)
private
String
type
;
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/BasicGridAcceptanceServiceImpl.java
View file @
d5fa2d80
...
@@ -28,6 +28,8 @@ import org.springframework.transaction.annotation.Transactional;
...
@@ -28,6 +28,8 @@ import org.springframework.transaction.annotation.Transactional;
import
org.springframework.util.StringUtils
;
import
org.springframework.util.StringUtils
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
java.time.LocalDateTime
;
import
java.time.format.DateTimeFormatter
;
import
java.util.*
;
import
java.util.*
;
@Slf4j
@Slf4j
...
@@ -85,15 +87,32 @@ public class BasicGridAcceptanceServiceImpl extends BaseService<BasicGridAccepta
...
@@ -85,15 +87,32 @@ public class BasicGridAcceptanceServiceImpl extends BaseService<BasicGridAccepta
BasicGridAcceptance
basicGridAcceptance
=
basicGridAcceptanceMapper
.
selectOne
(
new
LambdaQueryWrapper
<
BasicGridAcceptance
>().
eq
(
BasicGridAcceptance:
:
getWorkOrderPowerStationId
,
grid
.
getWorkOrderPowerStationId
()));
BasicGridAcceptance
basicGridAcceptance
=
basicGridAcceptanceMapper
.
selectOne
(
new
LambdaQueryWrapper
<
BasicGridAcceptance
>().
eq
(
BasicGridAcceptance:
:
getWorkOrderPowerStationId
,
grid
.
getWorkOrderPowerStationId
()));
basicGridAcceptance
.
setGridStatus
(
GridStatusEnum
.
DSH
.
getCode
());
basicGridAcceptance
.
setGridStatus
(
GridStatusEnum
.
DSH
.
getCode
());
// 调用工作流执行第一个节点
ProcessDto
processDto
=
new
ProcessDto
();
if
(
grid
.
getType
()!=
null
&&
"1"
.
equals
(
grid
.
getType
())){
processDto
.
setBusinessKey
(
String
.
valueOf
(
basicGridAcceptance
.
getSequenceNbr
()));
StartProcessDto
startProcessDto
=
new
StartProcessDto
();
LocalDateTime
now
=
LocalDateTime
.
now
();
List
<
ProcessDto
>
process
=
new
ArrayList
<>();
DateTimeFormatter
formatter
=
DateTimeFormatter
.
ofPattern
(
"YYYY-MM-dd"
);
process
.
add
(
processDto
);
String
formattedDate
=
now
.
format
(
formatter
);
startProcessDto
.
setProcess
(
process
);
//执行工作流
BasicGridAcceptance
workBasicGridAcceptance
=
workflow
.
startProcess
(
basicGridAcceptance
,
startProcessDto
,
userId
);
StandardDto
standardDto
=
new
StandardDto
();
BeanUtils
.
copyProperties
(
workBasicGridAcceptance
,
basicGridAcceptance
);
standardDto
.
setTaskId
(
basicGridAcceptance
.
getNextTaskId
());
VariableDto
variable
=
new
VariableDto
();
variable
.
setOperator
(
"88888"
);
variable
.
setOperationTime
(
formattedDate
);
standardDto
.
setVariable
(
variable
);
workflow
.
standard
(
basicGridAcceptance
,
standardDto
,
userId
);
}
else
{
// 调用工作流执行第一个节点
ProcessDto
processDto
=
new
ProcessDto
();
processDto
.
setBusinessKey
(
String
.
valueOf
(
basicGridAcceptance
.
getSequenceNbr
()));
StartProcessDto
startProcessDto
=
new
StartProcessDto
();
List
<
ProcessDto
>
process
=
new
ArrayList
<>();
process
.
add
(
processDto
);
startProcessDto
.
setProcess
(
process
);
workflow
.
startProcess
(
basicGridAcceptance
,
startProcessDto
,
userId
);
}
if
(
grid
.
getSequenceNbr
()!=
null
){
if
(
grid
.
getSequenceNbr
()!=
null
){
onGridMapper
.
updateById
(
grid
);
onGridMapper
.
updateById
(
grid
);
}
else
{
}
else
{
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/WorkflowImpl.java
View file @
d5fa2d80
...
@@ -20,6 +20,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
...
@@ -20,6 +20,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.jsf.el.SpringBeanFacesELResolver
;
import
org.springframework.web.jsf.el.SpringBeanFacesELResolver
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -53,8 +54,15 @@ public class WorkflowImpl {
...
@@ -53,8 +54,15 @@ public class WorkflowImpl {
*
*
* */
* */
public
BasicGridAcceptance
standard
(
BasicGridAcceptance
basicGridAcceptance
,
StandardDto
standardDto
,
String
userid
){
public
BasicGridAcceptance
standard
(
BasicGridAcceptance
basicGridAcceptance
,
StandardDto
standardDto
,
String
userid
){
FeignClientResult
<
ProcessTaskDTO
>
json
=
null
;
if
(
standardDto
.
getResult
()!=
null
){
standardDto
.
setResultCode
(
"approvalStatus"
);
json
=
workflowFeignClient
.
standard
(
standardDto
.
getTaskId
(),
standardDto
);
}
else
{
json
=
workflowFeignClient
.
standard
(
standardDto
.
getTaskId
(),
standardDto
);
}
FeignClientResult
<
ProcessTaskDTO
>
json
=
workflowFeignClient
.
standard
(
standardDto
.
getTaskId
(),
standardDto
);
basicGridAcceptance
=
this
.
getBasicGridAcceptanceone
(
basicGridAcceptance
,
json
,
userid
);
basicGridAcceptance
=
this
.
getBasicGridAcceptanceone
(
basicGridAcceptance
,
json
,
userid
);
return
basicGridAcceptance
;
return
basicGridAcceptance
;
...
@@ -65,12 +73,13 @@ public class WorkflowImpl {
...
@@ -65,12 +73,13 @@ public class WorkflowImpl {
if
(!
ObjectUtils
.
isEmpty
(
json
))
{
if
(!
ObjectUtils
.
isEmpty
(
json
))
{
if
(
json
.
getStatus
()
==
200
)
{
if
(
json
.
getStatus
()
==
200
)
{
List
<
ProcessTaskDTO
>
lis
=
json
.
getResult
();
List
<
ProcessTaskDTO
>
lis
=
json
.
getResult
();
ProcessTaskDTO
listco
=
lis
.
get
(
0
);
ProcessTaskDTO
listco
=
lis
.
isEmpty
()?
null
:
lis
.
get
(
0
);
if
(
listco
!=
null
){
if
(
listco
!=
null
){
// 当前节点执行任务id
// 当前节点执行任务id
basicGridAcceptance
.
setPromoter
(
userid
);
basicGridAcceptance
.
setPromoter
(
userid
);
//流程实例
basicGridAcceptance
.
setInstanceId
(
listco
.
getProcessInstance
().
getId
());
// 流程下一节点id
// 流程下一节点id
if
(
listco
.
getNextTask
()!=
null
&&!
listco
.
getNextTask
().
isEmpty
()){
if
(
listco
.
getNextTask
()!=
null
&&!
listco
.
getNextTask
().
isEmpty
()){
basicGridAcceptance
.
setNextTaskId
(
listco
.
getNextTask
().
get
(
0
).
getId
());
basicGridAcceptance
.
setNextTaskId
(
listco
.
getNextTask
().
get
(
0
).
getId
());
...
@@ -114,6 +123,8 @@ public class WorkflowImpl {
...
@@ -114,6 +123,8 @@ public class WorkflowImpl {
//工作流发起人id
//工作流发起人id
basicGridAcceptance
.
setCreateUserId
(
listco
.
getStartUser
().
getUserId
());
basicGridAcceptance
.
setCreateUserId
(
listco
.
getStartUser
().
getUserId
());
}
else
{
throw
new
RuntimeException
(
"工作流异常"
);
}
}
}
else
{
}
else
{
throw
new
RuntimeException
(
json
.
getMessage
());
throw
new
RuntimeException
(
json
.
getMessage
());
...
@@ -128,10 +139,7 @@ public class WorkflowImpl {
...
@@ -128,10 +139,7 @@ public class WorkflowImpl {
if
(
json
.
getStatus
()
==
200
)
{
if
(
json
.
getStatus
()
==
200
)
{
ProcessTaskDTO
listco
=
json
.
getResult
();
ProcessTaskDTO
listco
=
json
.
getResult
();
if
(
listco
!=
null
){
if
(
listco
!=
null
){
/**
* 工作流实例ID
*/
basicGridAcceptance
.
setInstanceId
(
listco
.
getProcessInstance
().
getId
());
// 当前节点执行任务id
// 当前节点执行任务id
basicGridAcceptance
.
setPromoter
(
userid
);
basicGridAcceptance
.
setPromoter
(
userid
);
...
@@ -176,8 +184,6 @@ public class WorkflowImpl {
...
@@ -176,8 +184,6 @@ public class WorkflowImpl {
basicGridAcceptance
.
setNextExecuteUserIds
(
sbf
.
toString
());
basicGridAcceptance
.
setNextExecuteUserIds
(
sbf
.
toString
());
}
}
}
}
//工作流发起人id
basicGridAcceptance
.
setCreateUserId
(
listco
.
getStartUser
().
getUserId
());
}
}
}
else
{
}
else
{
...
...
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