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
4e91364f
Commit
4e91364f
authored
Jul 27, 2022
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加导出接口
parent
19720387
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
2 deletions
+35
-2
PlanTaskController.java
...n/amos/patrol/business/controller/PlanTaskController.java
+24
-2
PlanTaskServiceImpl.java
...mos/patrol/business/service/impl/PlanTaskServiceImpl.java
+6
-0
IPlanTaskService.java
.../amos/patrol/business/service/intfc/IPlanTaskService.java
+4
-0
dbTemplate_plan_task.xml
...rol/src/main/resources/db/mapper/dbTemplate_plan_task.xml
+1
-0
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/controller/PlanTaskController.java
View file @
4e91364f
...
...
@@ -38,6 +38,7 @@ import org.typroject.tyboot.core.foundation.enumeration.UserType;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.ws.rs.GET
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
...
...
@@ -110,19 +111,40 @@ public class PlanTaskController extends AbstractBaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"导出巡检记录"
,
notes
=
"导出巡检记录"
)
@RequestMapping
(
value
=
"/exportSelectPlanTaskNew"
,
method
=
RequestMethod
.
GET
)
public
void
exportSelectPlanTaskNew
(
@ApiParam
(
value
=
"查询条件"
,
required
=
false
)
@RequestParam
(
required
=
false
)
Long
[]
ids
,
HttpServletResponse
response
)
{
List
<
PlanTaskVo
>
list
=
planTaskService
.
getPlanTaskListByIds
(
getToken
(),
getProduct
(),
getAppKey
(),
ids
);
List
<
PlanTaskVo
>
list
=
planTaskService
.
getPlanTaskListByIds
New
(
ids
);
String
fileName
=
"巡检记录"
+
System
.
currentTimeMillis
();
FileHelper
.
exportExcel
(
list
,
"计划执行"
,
"计划执行"
,
PlanTaskVo
.
class
,
fileName
+
".xls"
,
response
);
}
/**
* 执行计划导出
*/
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"执行计划导出"
,
notes
=
"执行计划导出"
)
@GetMapping
(
value
=
"/reportPlanTaskNew"
,
produces
=
"application/vnd.ms-excel;charset=UTF-8"
)
public
void
planTaskReportNew
(
@ApiParam
(
value
=
"导出参数"
,
required
=
false
)
@RequestParam
(
required
=
false
)
PlanTaskPageParam
params
,
HttpServletResponse
response
)
{
try
{
PlanTaskPageParam
paramsk
=
new
PlanTaskPageParam
();
ReginParams
reginParams
=
getSelectedOrgInfo
();
paramsk
.
setBizOrgCode
(
reginParams
.
getPersonIdentity
().
getCompanyBizOrgCode
());
List
<
PlanTaskVo
>
list
=
planTaskService
.
planTaskReportNew
(
paramsk
);
String
fileName
=
"计划执行"
+
new
Date
().
getTime
();
FileHelper
.
exportExcel
(
list
,
"计划执行"
,
"计划执行"
,
PlanTaskVo
.
class
,
fileName
+
".xls"
,
response
);
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/impl/PlanTaskServiceImpl.java
View file @
4e91364f
...
...
@@ -480,6 +480,12 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
return
content
;
}
@Override
public
List
<
PlanTaskVo
>
planTaskReportNew
(
PlanTaskPageParam
params
)
{
List
<
PlanTaskVo
>
content
=
planTaskMapper
.
getPlanTaskInfoList
(
params
);
return
content
;
}
/**
* 自动任务执行
*/
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/intfc/IPlanTaskService.java
View file @
4e91364f
...
...
@@ -48,6 +48,10 @@ public interface IPlanTaskService {
* 执行计划导出
*/
List
<
PlanTaskVo
>
planTaskReport
(
String
toke
,
String
product
,
String
appKey
,
PlanTaskPageParam
params
);
List
<
PlanTaskVo
>
planTaskReportNew
(
PlanTaskPageParam
params
);
/**
* 自动任务执行
* @param runDate
...
...
amos-boot-system-patrol/src/main/resources/db/mapper/dbTemplate_plan_task.xml
View file @
4e91364f
...
...
@@ -144,6 +144,7 @@
<if
test=
"orgCode!=null"
>
and a.org_code like #{orgCode}
</if>
<if
test=
"bizOrgCode!=null"
>
and d.biz_org_code like concat(#{bizOrgCode},'%')
</if>
</where>
order by b.id
...
...
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