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
b843f8e7
Commit
b843f8e7
authored
Aug 13, 2021
by
chenhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加权限Button 控制代码
parent
e030144e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
53 additions
and
2 deletions
+53
-2
WorkflowFeignService.java
.../boot/biz/common/workflow/feign/WorkflowFeignService.java
+8
-1
FailureDetailsController.java
...odule/common/biz/controller/FailureDetailsController.java
+9
-0
FailureDetailsServiceImpl.java
...le/common/biz/service/impl/FailureDetailsServiceImpl.java
+36
-1
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/workflow/feign/WorkflowFeignService.java
View file @
b843f8e7
...
@@ -11,7 +11,7 @@ import org.springframework.web.bind.annotation.RequestParam;
...
@@ -11,7 +11,7 @@ import org.springframework.web.bind.annotation.RequestParam;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
@FeignClient
(
name
=
"AMOS-API-WORKFLOW
-CJHENHAO
"
,
path
=
"workflow"
,
configuration
=
{
CommonMultipartSupportConfig
.
class
})
@FeignClient
(
name
=
"AMOS-API-WORKFLOW"
,
path
=
"workflow"
,
configuration
=
{
CommonMultipartSupportConfig
.
class
})
public
interface
WorkflowFeignService
{
public
interface
WorkflowFeignService
{
/**
/**
* 发起流程
* 发起流程
...
@@ -69,5 +69,12 @@ public interface WorkflowFeignService {
...
@@ -69,5 +69,12 @@ public interface WorkflowFeignService {
*/
*/
@RequestMapping
(
value
=
"/activitiHistory/processes/historytasks/list/{processInstanceId}"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/activitiHistory/processes/historytasks/list/{processInstanceId}"
,
method
=
RequestMethod
.
GET
)
JSONObject
queryHistoryTaskListByProcessId
(
@PathVariable
(
"processInstanceId"
)
String
processInstanceId
);
JSONObject
queryHistoryTaskListByProcessId
(
@PathVariable
(
"processInstanceId"
)
String
processInstanceId
);
/**
* 查询当前流程已经执行的任务
* @param processInstanceId
* @return
*/
@RequestMapping
(
value
=
"/activitiHistory/tasks/{processInstanceId}"
,
method
=
RequestMethod
.
GET
)
JSONObject
queryTasksByProcessInstanceId
(
@PathVariable
(
"processInstanceId"
)
String
processInstanceId
);
}
}
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 @
b843f8e7
...
@@ -23,6 +23,7 @@ import org.typroject.tyboot.core.restful.utils.ResponseHelper;
...
@@ -23,6 +23,7 @@ import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
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.controller.BaseController
;
import
com.yeejoin.amos.boot.module.common.api.dto.FailureDetailsDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.FailureDetailsDto
;
import
com.yeejoin.amos.boot.module.common.api.entity.FailureDetails
;
import
com.yeejoin.amos.boot.module.common.api.entity.FailureDetails
;
...
@@ -189,4 +190,12 @@ public class FailureDetailsController extends BaseController {
...
@@ -189,4 +190,12 @@ public class FailureDetailsController extends BaseController {
public
ResponseModel
<
Object
>
selectHistoryt
(
@RequestParam
Long
sequenceNbr
)
{
public
ResponseModel
<
Object
>
selectHistoryt
(
@RequestParam
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
failureDetailsServiceImpl
.
getCurrentProcessHistoryTask
(
sequenceNbr
));
return
ResponseHelper
.
buildResponse
(
failureDetailsServiceImpl
.
getCurrentProcessHistoryTask
(
sequenceNbr
));
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"权限button的显示"
,
notes
=
"权限button的显示"
)
@GetMapping
(
value
=
"/getExcuteTaskAuthButton/{sequenceNbr}"
)
public
ResponseModel
<
Integer
>
getExcuteTaskAuthButton
(
@PathVariable
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
failureDetailsServiceImpl
.
getExcuteTaskAuthButton
(
sequenceNbr
,
getSelectedOrgInfo
()));
}
}
}
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 @
b843f8e7
...
@@ -28,7 +28,6 @@ import com.yeejoin.amos.boot.biz.common.workflow.feign.WorkflowFeignService;
...
@@ -28,7 +28,6 @@ import com.yeejoin.amos.boot.biz.common.workflow.feign.WorkflowFeignService;
import
com.yeejoin.amos.boot.module.common.api.dto.FailureAuditDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.FailureAuditDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.FailureDetailsDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.FailureDetailsDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.FailureRepairlogDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.FailureRepairlogDto
;
import
com.yeejoin.amos.boot.module.common.api.entity.FailureAudit
;
import
com.yeejoin.amos.boot.module.common.api.entity.FailureDetails
;
import
com.yeejoin.amos.boot.module.common.api.entity.FailureDetails
;
import
com.yeejoin.amos.boot.module.common.api.entity.FailureRepairlog
;
import
com.yeejoin.amos.boot.module.common.api.entity.FailureRepairlog
;
import
com.yeejoin.amos.boot.module.common.api.enums.FailureStatuEnum
;
import
com.yeejoin.amos.boot.module.common.api.enums.FailureStatuEnum
;
...
@@ -309,6 +308,7 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
...
@@ -309,6 +308,7 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
if
(
auditDepartmentId
.
intValue
()
==
seq
.
intValue
())
{
if
(
auditDepartmentId
.
intValue
()
==
seq
.
intValue
())
{
map
.
put
(
"taskId"
,
detail
.
getString
(
"id"
));
map
.
put
(
"taskId"
,
detail
.
getString
(
"id"
));
map
.
put
(
"checkFlag"
,
true
);
map
.
put
(
"checkFlag"
,
true
);
map
.
put
(
"name"
,
detail
.
getString
(
"name"
));
break
;
break
;
}
}
}
else
{
}
else
{
...
@@ -316,6 +316,7 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
...
@@ -316,6 +316,7 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
if
(
failureEquipmentId
.
intValue
()
==
seq
.
intValue
())
{
if
(
failureEquipmentId
.
intValue
()
==
seq
.
intValue
())
{
map
.
put
(
"taskId"
,
detail
.
getString
(
"id"
));
map
.
put
(
"taskId"
,
detail
.
getString
(
"id"
));
map
.
put
(
"checkFlag"
,
true
);
map
.
put
(
"checkFlag"
,
true
);
map
.
put
(
"name"
,
detail
.
getString
(
"name"
));
break
;
break
;
}
}
}
}
...
@@ -398,5 +399,38 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
...
@@ -398,5 +399,38 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
}
}
return
newDate
+
result
;
return
newDate
+
result
;
}
}
/**
* 获取当前登录人能够操作的任务执行Button类型
* @param sequenceNbr
* @param userInfo
* @return
*/
public
Integer
getExcuteTaskAuthButton
(
Long
sequenceNbr
,
ReginParams
userInfo
)
{
int
flag
=
0
;
Map
<
String
,
Object
>
map
=
this
.
checkExcuteTaskAuthMap
(
sequenceNbr
,
userInfo
);
if
(
Boolean
.
parseBoolean
(
map
.
get
(
"checkFlag"
).
toString
()))
{
String
buttonValueString
=
map
.
get
(
"name"
).
toString
();
if
(
buttonValueString
.
contains
(
"提交保修单"
))
{
flag
=
1
;
}
else
if
(
buttonValueString
.
contains
(
"审核"
))
{
flag
=
2
;
}
else
if
(
buttonValueString
.
contains
(
"维修"
))
{
flag
=
3
;
}
else
if
(
buttonValueString
.
contains
(
"验收"
))
{
flag
=
4
;
}
}
FailureDetails
details
=
this
.
baseMapper
.
selectById
(
sequenceNbr
);
JSONObject
object
=
workflowFeignService
.
queryTasksByProcessInstanceId
(
details
.
getProcessId
());
JSONArray
array
=
object
.
getJSONArray
(
"data"
);
for
(
Object
historyDetail
:
array
)
{
JSONObject
historyDetailJson
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
historyDetail
));
if
(
"rejected"
.
equals
(
historyDetailJson
.
getString
(
"activityId"
)))
{
flag
=
5
;
}
}
return
flag
;
}
}
}
\ No newline at end of file
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