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
a6d31a0c
Commit
a6d31a0c
authored
Aug 12, 2021
by
chenhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加获取流程信息的代码
parent
4a242fb2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
12 deletions
+32
-12
WorkflowFeignService.java
.../boot/biz/common/workflow/feign/WorkflowFeignService.java
+4
-4
FailureDetails.java
...in/amos/boot/module/common/api/entity/FailureDetails.java
+0
-4
FailureDetailsController.java
...odule/common/biz/controller/FailureDetailsController.java
+6
-1
FailureDetailsServiceImpl.java
...le/common/biz/service/impl/FailureDetailsServiceImpl.java
+22
-3
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/workflow/feign/WorkflowFeignService.java
View file @
a6d31a0c
...
...
@@ -11,7 +11,7 @@ import org.springframework.web.bind.annotation.RequestParam;
import
com.alibaba.fastjson.JSONObject
;
@FeignClient
(
name
=
"AMOS-API-WORKFLOW"
,
path
=
"workflow"
,
configuration
=
{
CommonMultipartSupportConfig
.
class
})
@FeignClient
(
name
=
"AMOS-API-WORKFLOW
-CJHENHAO
"
,
path
=
"workflow"
,
configuration
=
{
CommonMultipartSupportConfig
.
class
})
public
interface
WorkflowFeignService
{
/**
* 发起流程
...
...
@@ -62,12 +62,12 @@ public interface WorkflowFeignService {
JSONObject
getTasksNoAuth
(
@RequestParam
(
value
=
"processDefinitionKey"
,
required
=
false
)
String
processDefinitionKey
,
@RequestParam
(
value
=
"userId"
,
required
=
false
)
String
userId
)
;
/**
* 流程
实例-分页
* 流程
信息
* @param processDefinitionKey
* @param userId
* @return
*/
@RequestMapping
(
value
=
"/activitiHistory/processes"
,
method
=
RequestMethod
.
GET
)
JSONObject
getInstance
(
@RequestParam
(
value
=
"name"
,
required
=
false
)
String
name
)
;
@RequestMapping
(
value
=
"/activitiHistory/processes
/historytasks/list/{processInstanceId}
"
,
method
=
RequestMethod
.
GET
)
JSONObject
queryHistoryTaskListByProcessId
(
@PathVariable
(
"processInstanceId"
)
String
processInstanceId
)
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/entity/FailureDetails.java
View file @
a6d31a0c
...
...
@@ -101,9 +101,5 @@ public class FailureDetails extends BaseEntity {
*/
@TableField
(
"process_id"
)
private
String
processId
;
@TableField
(
"current_role"
)
private
String
currentRole
;
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/FailureDetailsController.java
View file @
a6d31a0c
...
...
@@ -183,5 +183,10 @@ public class FailureDetailsController extends BaseController {
String userId = getUserInfo().getUserId();
return ResponseHelper.buildResponse(failureDetailsServiceImpl.queryForPage(page,userId));
}*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"流程信息"
,
notes
=
"流程信息"
)
@GetMapping
(
value
=
"/processHistory"
)
public
ResponseModel
<
Object
>
selectHistoryt
(
@RequestParam
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
failureDetailsServiceImpl
.
getCurrentProcessHistoryTask
(
sequenceNbr
));
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/FailureDetailsServiceImpl.java
View file @
a6d31a0c
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
biz
.
service
.
impl
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.LinkedList
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Random
;
...
...
@@ -35,6 +37,8 @@ import com.yeejoin.amos.boot.module.common.api.service.IFailureAuditService;
import
com.yeejoin.amos.boot.module.common.api.service.IFailureDetailsService
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
rx.internal.util.LinkedArrayList
;
/**
* 服务实现类
*
...
...
@@ -214,7 +218,7 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
public
boolean
excuteTask
(
Long
sequenceNbr
,
ReginParams
userInfo
,
String
condition
)
{
HashMap
<
String
,
Object
>
conditionMap
=
new
HashMap
<
String
,
Object
>();
conditionMap
.
put
(
"condition"
,
condition
);
conditionMap
.
put
(
"condition"
,
Integer
.
parseInt
(
condition
)
);
Map
<
String
,
Object
>
map
=
checkExcuteTaskAuthMap
(
sequenceNbr
,
userInfo
);
try
{
if
(
Boolean
.
parseBoolean
(
map
.
get
(
"checkFlag"
).
toString
()))
{
...
...
@@ -356,8 +360,23 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
public
Object
getCurrentProcessHistoryTask
(
Long
id
)
{
FailureDetailsDto
failureDetailsDto
=
this
.
queryBySeq
(
id
);
String
processId
=
failureDetailsDto
.
getProcessId
();
return
logger
;
JSONObject
object
=
workflowFeignService
.
queryHistoryTaskListByProcessId
(
processId
);
JSONArray
datArray
=
null
;
if
(
ObjectUtils
.
isNotEmpty
(
object
))
{
datArray
=
object
.
getJSONArray
(
"data"
);
}
List
<
Object
>
list
=
new
ArrayList
<
Object
>();
if
(
datArray
!=
null
)
{
datArray
.
stream
().
forEach
(
i
->{
JSONObject
detail
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
i
));
if
(
detail
.
containsKey
(
"operator"
)
&&
!
detail
.
getString
(
"name"
).
equals
(
"维修中"
))
{
//从流程记录表中拿到处理人的名称
detail
.
replace
(
"operator"
,
null
);
list
.
add
(
object
);
}
});
}
return
list
;
}
public
static
String
buildOrderNo
()
{
...
...
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