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
d0f6ba08
Commit
d0f6ba08
authored
Aug 24, 2021
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
高亮图片
parent
e7bd04d3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
189 additions
and
147 deletions
+189
-147
WorkflowFeignService.java
.../boot/biz/common/workflow/feign/WorkflowFeignService.java
+7
-3
FailureDetailsController.java
...odule/common/biz/controller/FailureDetailsController.java
+182
-144
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/workflow/feign/WorkflowFeignService.java
View file @
d0f6ba08
package
com
.
yeejoin
.
amos
.
boot
.
biz
.
common
.
workflow
.
feign
;
import
java.awt.*
;
import
java.util.HashMap
;
import
feign.Response
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.http.MediaType
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
...
@@ -11,6 +14,7 @@ import org.springframework.web.bind.annotation.RequestParam;
import
com.alibaba.fastjson.JSONObject
;
import
javax.print.attribute.standard.MediaTray
;
import
javax.servlet.http.HttpServletResponse
;
@FeignClient
(
name
=
"AMOS-API-WORKFLOW"
,
path
=
"workflow"
,
configuration
=
{
CommonMultipartSupportConfig
.
class
})
...
...
@@ -109,11 +113,11 @@ public interface WorkflowFeignService {
/**
* 流程图高亮
* */
@RequestMapping
(
value
=
"/activitiHistory/gethighLineImg/{processInstanceId}"
,
method
=
RequestMethod
.
GE
T
)
JSONObject
thighLineImg
(
@PathVariable
(
"processInstanceId"
)
String
processInstanceId
,
HttpServletResponse
resp
)
;
@RequestMapping
(
value
=
"/activitiHistory/gethighLineImg/{processInstanceId}"
,
consumes
=
MediaType
.
APPLICATION_FORM_URLENCODED_VALUE
,
method
=
RequestMethod
.
POS
T
)
Response
thighLineImg
(
@PathVariable
(
"processInstanceId"
)
String
processInstanceId
,
HttpServletResponse
resp
)
;
/**
* 流程图高亮图片
* */
@RequestMapping
(
value
=
"/activitiHistory/gethighLine"
,
method
=
RequestMethod
.
GET
)
JSONObject
thighLine
(
@RequestParam
(
"instanceId"
)
String
instanceId
);
Response
thighLine
(
@RequestParam
(
"instanceId"
)
String
instanceId
);
}
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 @
d0f6ba08
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
biz
.
controller
;
import
java.io.IOException
;
import
java.io.OutputStream
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.List
;
...
...
@@ -7,14 +9,20 @@ import java.util.List;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.workflow.feign.WorkflowFeignService
;
import
com.yeejoin.amos.boot.module.common.api.dto.CurrentStatusDto
;
import
com.yeejoin.amos.boot.module.common.api.enums.FailureStatuEnum
;
import
feign.Response
;
import
org.apache.poi.ss.formula.functions.T
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.MediaType
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
...
...
@@ -43,8 +51,6 @@ import io.swagger.annotations.Api;
import
io.swagger.annotations.ApiOperation
;
/**
*
*
* @author system_generator
* @date 2021-08-04
*/
...
...
@@ -53,181 +59,213 @@ import io.swagger.annotations.ApiOperation;
@RequestMapping
(
value
=
"/common/failure-details"
)
public
class
FailureDetailsController
extends
BaseController
{
private
final
Logger
logger
=
LoggerFactory
.
getLogger
(
FailureDetailsServiceImpl
.
class
);
private
final
Logger
logger
=
LoggerFactory
.
getLogger
(
FailureDetailsServiceImpl
.
class
);
@Autowired
FailureDetailsServiceImpl
failureDetailsServiceImpl
;
@Autowired
WorkflowFeignService
workflowFeignService
;
WorkflowFeignService
workflowFeignService
;
/**
* 新增
*
* @return
* @throws Exception
* @throws Exception
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增"
,
notes
=
"新增"
)
public
ResponseModel
<
Object
>
save
(
@RequestBody
FailureDetailsDto
model
)
{
try
{
return
ResponseHelper
.
buildResponse
(
failureDetailsServiceImpl
.
savemodel
(
model
,
getSelectedOrgInfo
()));
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
ResponseHelper
.
buildResponse
(
false
);
}
}
/**
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增"
,
notes
=
"新增"
)
public
ResponseModel
<
Object
>
save
(
@RequestBody
FailureDetailsDto
model
)
{
try
{
return
ResponseHelper
.
buildResponse
(
failureDetailsServiceImpl
.
savemodel
(
model
,
getSelectedOrgInfo
()));
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
ResponseHelper
.
buildResponse
(
false
);
}
}
/**
* 根据sequenceNbr更新
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PutMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新"
,
notes
=
"根据sequenceNbr更新"
)
public
ResponseModel
<
FailureDetailsDto
>
updateBySequenceNbrFailureDetails
(
@RequestBody
FailureDetailsDto
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
model
.
setSequenceNbr
(
sequenceNbr
);
return
ResponseHelper
.
buildResponse
(
failureDetailsServiceImpl
.
updateWithModel
(
model
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PutMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新"
,
notes
=
"根据sequenceNbr更新"
)
public
ResponseModel
<
FailureDetailsDto
>
updateBySequenceNbrFailureDetails
(
@RequestBody
FailureDetailsDto
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
model
.
setSequenceNbr
(
sequenceNbr
);
return
ResponseHelper
.
buildResponse
(
failureDetailsServiceImpl
.
updateWithModel
(
model
));
}
/**
* 根据sequenceNbr查询
*
* @param sequenceNbr
主键
* @param sequenceNbr
主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个"
,
notes
=
"根据sequenceNbr查询单个"
)
public
ResponseModel
<
FailureDetailsDto
>
selectOne
(
@PathVariable
Long
sequenceNbr
)
{
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个"
,
notes
=
"根据sequenceNbr查询单个"
)
public
ResponseModel
<
FailureDetailsDto
>
selectOne
(
@PathVariable
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
failureDetailsServiceImpl
.
queryForOne
(
sequenceNbr
));
}
return
ResponseHelper
.
buildResponse
(
failureDetailsServiceImpl
.
queryForOne
(
sequenceNbr
));
}
/**
/**
* 列表分页查询
*
* @param current 当前页
* @param current 每页大小
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/page"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"分页查询"
,
notes
=
"分页查询"
)
public
ResponseModel
<
IPage
<
FailureDetailsDto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
@RequestParam
Integer
type
,
Long
currentStatus
,
Integer
submissionPid
,
String
startTime
,
String
endTime
)
{
Page
<
FailureDetails
>
page
=
new
Page
<
FailureDetails
>();
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
ReginParams
userInfo
=
getSelectedOrgInfo
();
IPage
<
FailureDetailsDto
>
failureDetailDTOsIPage
=
new
Page
<>();
//IPage<FailureDetails> failureDetailsIPage = failureDetailsServiceImpl.queryForFailureDetailsPage((current - 1) * size,size, userInfo, type);
//IPage<FailureDetails> failureDetailsIPage = failureDetailsServiceImpl.queryForFailureDetailsPage((current - 1) * size,size,userInfo,currentStatus, startTime,endTime,submissionPid,type);
IPage
<
FailureDetails
>
failureDetailsIPage
=
failureDetailsServiceImpl
.
queryForFailureDetailsPage
(
page
,
userInfo
,
currentStatus
,
startTime
,
endTime
,
submissionPid
,
type
);
BeanUtils
.
copyProperties
(
failureDetailsIPage
,
FailureDetailsDto
.
class
);
List
<
FailureDetails
>
records
=
failureDetailsIPage
.
getRecords
();
List
<
FailureDetailsDto
>
failureDetailsDtoList
=
new
ArrayList
<>();
records
.
forEach
(
failureDetails
->
{
FailureDetailsDto
failureDetailsDto
=
new
FailureDetailsDto
();
BeanUtils
.
copyProperties
(
failureDetails
,
failureDetailsDto
);
failureDetailsDto
.
setCurrentStatusName
(
Constants
.
currentStatusNameMap
.
get
(
failureDetails
.
getCurrentStatus
()));
failureDetailsDtoList
.
add
(
failureDetailsDto
);
});
failureDetailDTOsIPage
.
setRecords
(
failureDetailsDtoList
);
return
ResponseHelper
.
buildResponse
(
failureDetailDTOsIPage
);
}
/**
* 列表全部数据查询
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/page"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"分页查询"
,
notes
=
"分页查询"
)
public
ResponseModel
<
IPage
<
FailureDetailsDto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
@RequestParam
Integer
type
,
Long
currentStatus
,
Integer
submissionPid
,
String
startTime
,
String
endTime
)
{
Page
<
FailureDetails
>
page
=
new
Page
<
FailureDetails
>();
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
ReginParams
userInfo
=
getSelectedOrgInfo
();
IPage
<
FailureDetailsDto
>
failureDetailDTOsIPage
=
new
Page
<>();
//IPage<FailureDetails> failureDetailsIPage = failureDetailsServiceImpl.queryForFailureDetailsPage((current - 1) * size,size,userInfo,currentStatus, startTime,endTime,submissionPid,type);
IPage
<
FailureDetails
>
failureDetailsIPage
=
failureDetailsServiceImpl
.
queryForFailureDetailsPage
(
page
,
userInfo
,
currentStatus
,
startTime
,
endTime
,
submissionPid
,
type
);
BeanUtils
.
copyProperties
(
failureDetailsIPage
,
FailureDetailsDto
.
class
);
List
<
FailureDetails
>
records
=
failureDetailsIPage
.
getRecords
();
List
<
FailureDetailsDto
>
failureDetailsDtoList
=
new
ArrayList
<>();
records
.
forEach
(
failureDetails
->
{
FailureDetailsDto
failureDetailsDto
=
new
FailureDetailsDto
();
BeanUtils
.
copyProperties
(
failureDetails
,
failureDetailsDto
);
failureDetailsDto
.
setCurrentStatusName
(
Constants
.
currentStatusNameMap
.
get
(
failureDetails
.
getCurrentStatus
()));
failureDetailsDtoList
.
add
(
failureDetailsDto
);
});
failureDetailDTOsIPage
.
setRecords
(
failureDetailsDtoList
);
return
ResponseHelper
.
buildResponse
(
failureDetailDTOsIPage
);
}
/**
* 列表全部数据查询
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"列表全部数据查询"
,
notes
=
"列表全部数据查询"
)
@GetMapping
(
value
=
"/list"
)
public
ResponseModel
<
List
<
FailureDetailsDto
>>
selectForList
()
{
return
ResponseHelper
.
buildResponse
(
failureDetailsServiceImpl
.
queryForFailureDetailsList
());
}
/**
* 根据状态查询当前下全部数据
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"列表全部数据查询"
,
notes
=
"列表全部数据查询"
)
@GetMapping
(
value
=
"/list"
)
public
ResponseModel
<
List
<
FailureDetailsDto
>>
selectForList
()
{
return
ResponseHelper
.
buildResponse
(
failureDetailsServiceImpl
.
queryForFailureDetailsList
());
}
/**
* 根据状态查询当前下全部数据
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据状态查询当前下全部数据"
,
notes
=
"根据状态查询当前下全部数据"
)
@GetMapping
(
value
=
"/list/{currentStatus}"
)
public
ResponseModel
<
List
<
FailureDetails
>>
selectStatusForList
(
@PathVariable
Long
currentStatus
)
{
return
ResponseHelper
.
buildResponse
(
failureDetailsServiceImpl
.
queryForFailureStatus
(
currentStatus
));
}
/**
* 查询当前状态任务数量
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询当前状态任务数量"
,
notes
=
"查询当前状态任务数量"
)
@GetMapping
(
value
=
"/list/count"
)
public
ResponseModel
<
List
<
CurrentStatusDto
>
>
selectStatusCount
(
Integer
type
)
{
return
ResponseHelper
.
buildResponse
(
failureDetailsServiceImpl
.
queryStatusCount
(
getSelectedOrgInfo
(),
type
));
}
@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
));
}
@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
()));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询当前任务详情"
,
notes
=
"查询当前任务详情"
)
@GetMapping
(
value
=
"/getCurrentTask/{sequenceNbr}"
)
public
ResponseModel
<
Object
>
getCurrentTask
(
@PathVariable
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
failureDetailsServiceImpl
.
getCurrentTask
(
sequenceNbr
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"流程图高亮"
,
notes
=
"流程图高亮"
)
@GetMapping
(
value
=
"/activistHistory/gethighLine"
)
public
ResponseModel
<
Object
>
thighLine
(
@RequestParam
(
"instanceId"
)
String
instanceId
)
{
return
ResponseHelper
.
buildResponse
(
workflowFeignService
.
thighLine
(
instanceId
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"流程图高亮图片"
,
notes
=
"流程图高亮图片"
)
@GetMapping
(
value
=
"/activityHistory/gettingLineImg/{processInstanceId}"
)
public
ResponseModel
<
Object
>
gothLineImg
(
@PathVariable
(
"processInstanceId"
)
String
processInstanceId
,
HttpServletResponse
resp
)
{
return
ResponseHelper
.
buildResponse
(
workflowFeignService
.
thighLineImg
(
processInstanceId
,
resp
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询状态枚举"
,
notes
=
"查询状态枚举"
)
@GetMapping
(
value
=
"/getStatus"
)
public
ResponseModel
<
Object
>
getStatusEunms
()
{
return
ResponseHelper
.
buildResponse
(
FailureStatuEnum
.
getEnumList
());
}
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据状态查询当前下全部数据"
,
notes
=
"根据状态查询当前下全部数据"
)
@GetMapping
(
value
=
"/list/{currentStatus}"
)
public
ResponseModel
<
List
<
FailureDetails
>>
selectStatusForList
(
@PathVariable
Long
currentStatus
)
{
return
ResponseHelper
.
buildResponse
(
failureDetailsServiceImpl
.
queryForFailureStatus
(
currentStatus
));
}
/**
* 查询当前状态任务数量
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询当前状态任务数量"
,
notes
=
"查询当前状态任务数量"
)
@GetMapping
(
value
=
"/list/count"
)
public
ResponseModel
<
List
<
CurrentStatusDto
>>
selectStatusCount
(
Integer
type
)
{
return
ResponseHelper
.
buildResponse
(
failureDetailsServiceImpl
.
queryStatusCount
(
getSelectedOrgInfo
(),
type
));
}
@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
));
}
@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
()));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询当前任务详情"
,
notes
=
"查询当前任务详情"
)
@GetMapping
(
value
=
"/getCurrentTask/{sequenceNbr}"
)
public
ResponseModel
<
Object
>
getCurrentTask
(
@PathVariable
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
failureDetailsServiceImpl
.
getCurrentTask
(
sequenceNbr
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"流程图高亮"
,
notes
=
"流程图高亮"
)
@GetMapping
(
value
=
"/activistHistory/gethighLine"
)
public
ResponseModel
<
Object
>
thighLine
(
@RequestParam
(
"instanceId"
)
String
instanceId
)
{
return
ResponseHelper
.
buildResponse
(
workflowFeignService
.
thighLine
(
instanceId
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/activityHistory/gettingLineImg/{sequenceNbr}"
)
public
ResponseModel
<
Object
>
gothLineImg
(
@PathVariable
Long
sequenceNbr
,
HttpServletResponse
resp
)
{
String
processId
=
failureDetailsServiceImpl
.
queryBySeq
(
sequenceNbr
).
getProcessId
();
return
ResponseHelper
.
buildResponse
(
workflowFeignService
.
thighLineImg
(
processId
,
resp
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询状态枚举"
,
notes
=
"查询状态枚举"
)
@GetMapping
(
value
=
"/getStatus"
)
public
ResponseModel
<
Object
>
getStatusEunms
()
{
return
ResponseHelper
.
buildResponse
(
FailureStatuEnum
.
getEnumList
());
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/downloadFile/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"流程图高亮图片"
,
notes
=
"流程图高亮图片"
)
public
void
downloadFile
(
@PathVariable
Long
sequenceNbr
,
HttpServletRequest
request
,
HttpServletResponse
response
)
throws
Exception
{
String
processId
=
failureDetailsServiceImpl
.
queryBySeq
(
sequenceNbr
).
getProcessId
();
Response
feignResponse
=
workflowFeignService
.
thighLineImg
(
processId
,
response
);
OutputStream
out
=
null
;
try
{
out
=
response
.
getOutputStream
();
Response
.
Body
body
=
feignResponse
.
body
();
HttpHeaders
heads
=
new
HttpHeaders
();
heads
.
setContentType
(
MediaType
.
valueOf
(
MediaType
.
IMAGE_JPEG_VALUE
));
byte
[]
b
=
new
byte
[
1024
];
int
len
;
while
((
len
=
body
.
asInputStream
().
read
(
b
,
0
,
1024
))
!=
-
1
)
{
out
.
write
(
b
,
0
,
len
);
}
out
.
flush
();
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
finally
{
try
{
if
(
out
!=
null
)
{
out
.
close
();
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
}
}
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