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
7408439b
Commit
7408439b
authored
Mar 16, 2023
by
zhangsen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
获取工作流流程图API
parent
5aa27964
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
0 deletions
+36
-0
ProblemCodeLibController.java
...t/module/ugp/biz/controller/ProblemCodeLibController.java
+36
-0
No files found.
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/ProblemCodeLibController.java
View file @
7408439b
...
...
@@ -6,6 +6,8 @@ import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import
com.baomidou.mybatisplus.core.toolkit.StringUtils
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.workflow.feign.WorkflowFeignService
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.FailureDetailsServiceImpl
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.ProblemCodeLibDto
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.ProblemCodeLib
;
import
com.yeejoin.amos.boot.module.ugp.api.service.IProblemCodeLibService
;
...
...
@@ -16,18 +18,26 @@ import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import
com.yeejoin.amos.feign.privilege.model.ApplicationModel
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.model.DictionarieValueModel
;
import
feign.Response
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.io.IOUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.exception.BaseException
;
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
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.*
;
import
java.util.stream.Collectors
;
...
...
@@ -48,6 +58,13 @@ public class ProblemCodeLibController extends BaseController {
@Resource
private
IProblemCodeLibService
problemCodeLibService
;
@Autowired
FailureDetailsServiceImpl
failureDetailsServiceImpl
;
@Autowired
WorkflowFeignService
workflowFeignService
;
/**
* 新增质量监检信息表
*/
...
...
@@ -172,4 +189,23 @@ public class ProblemCodeLibController extends BaseController {
List
<
DictionarieValueModel
>
result
=
adminCommonlyUsed
.
getResult
();
return
ResponseHelper
.
buildResponse
(
result
);
}
/**
* 参考JCS服务流程图信息
* @param instanceId 流程实例ID
* @return 流程图
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getInstanceImage"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"流程图高亮图片"
,
notes
=
"流程图高亮图片"
)
public
ResponseEntity
<
String
>
downloadFile
(
@RequestParam
String
instanceId
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
Response
feignResponse
=
workflowFeignService
.
thighLineImg
(
instanceId
);
try
{
Response
.
Body
body
=
feignResponse
.
body
();
return
new
ResponseEntity
<>(
IOUtils
.
toString
(
body
.
asInputStream
()),
HttpStatus
.
OK
);
}
catch
(
Exception
e
)
{
throw
new
BaseException
(
"Error exporting diagram"
,
"500"
,
instanceId
);
}
}
}
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