Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
6e48135e
提交
6e48135e
authored
9月 16, 2020
作者:
邓砥奕
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改bug
上级
a12bb120
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
35 行增加
和
4 行删除
+35
-4
TaskController.java
...a/com/tykj/dev/device/task/controller/TaskController.java
+1
-1
TaskUtils.java
...c/main/java/com/tykj/dev/device/task/utils/TaskUtils.java
+19
-0
DeviceUseReportController.java
...evice/usereport/controller/DeviceUseReportController.java
+15
-3
没有找到文件。
dev-task/src/main/java/com/tykj/dev/device/task/controller/TaskController.java
浏览文件 @
6e48135e
...
...
@@ -55,7 +55,7 @@ public class TaskController {
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/manage/summary"
,
produces
=
MediaType
.
APPLICATION_JSON_VALUE
)
public
ResponseEntity
getTaskPage
(
@RequestBody
TaskSelectVo
taskSelectVo
)
{
List
<
TaskUserVo
>
taskUserVos
=
taskService
.
getManageList
(
taskSelectVo
);
return
ResultUtil
.
success
(
PageUtil
.
getPerPage
(
taskSelectVo
.
getPage
(),
taskSelectVo
.
getSize
(),
taskUtils
.
orderByTopDesc
AndReadAsc
(
taskUserVos
),
taskSelectVo
.
getPageable
()));
return
ResultUtil
.
success
(
PageUtil
.
getPerPage
(
taskSelectVo
.
getPage
(),
taskSelectVo
.
getSize
(),
taskUtils
.
orderByTopDesc
(
taskUserVos
),
taskSelectVo
.
getPageable
()));
}
@ApiOperation
(
value
=
"业务跟踪待办列表查询"
,
notes
=
"可以通过这个接口查询业务"
)
...
...
dev-task/src/main/java/com/tykj/dev/device/task/utils/TaskUtils.java
浏览文件 @
6e48135e
...
...
@@ -134,4 +134,23 @@ public class TaskUtils {
}
return
list
;
}
/**
* @param taskUserVos
* 按置顶顺序排序输出
*/
public
List
<
TaskUserVo
>
orderByTopDesc
(
List
<
TaskUserVo
>
taskUserVos
)
{
List
<
TaskUserVo
>
list
=
new
ArrayList
<>();
for
(
TaskUserVo
t:
taskUserVos
)
{
if
(
t
.
getIsTop
()==
1
){
list
.
add
(
t
);
}
}
for
(
TaskUserVo
t:
taskUserVos
)
{
if
(
t
.
getIsTop
()==
0
){
list
.
add
(
t
);
}
}
return
list
;
}
}
dev-usereport/src/main/java/com/tykj/dev/device/usereport/controller/DeviceUseReportController.java
浏览文件 @
6e48135e
...
...
@@ -2,6 +2,7 @@ package com.tykj.dev.device.usereport.controller;
import
com.tykj.dev.config.swagger.AutoDocument
;
import
com.tykj.dev.device.file.entity.WrodParameter
;
import
com.tykj.dev.device.file.service.UseReportFIleService
;
import
com.tykj.dev.device.usereport.service.DeviceUseReportService
;
import
com.tykj.dev.device.usereport.subject.domin.DeviceUseReport
;
import
com.tykj.dev.device.usereport.subject.vo.DeviceUseReportCreateVo
;
...
...
@@ -17,6 +18,9 @@ import org.springframework.data.domain.Page;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.util.Calendar
;
import
java.util.List
;
import
java.util.Objects
;
...
...
@@ -33,6 +37,9 @@ public class DeviceUseReportController {
@Autowired
private
DeviceUseReportService
deviceUseReportService
;
@Autowired
private
UseReportFIleService
useReportFIleService
;
@ApiOperation
(
value
=
"模糊查询装备使用报告分页"
,
notes
=
"可以通过这个接口模糊查询装备使用报告分页"
)
@PostMapping
(
"/summary"
)
public
ResponseEntity
selectDeviceUseReport
(
@RequestBody
DeviceUseReportSelectVo
deviceUseReportSelectVo
)
{
...
...
@@ -69,7 +76,7 @@ public class DeviceUseReportController {
@ApiOperation
(
value
=
"装备使用报告下载"
,
notes
=
"装备使用报告下载"
)
@GetMapping
(
"/download/{id}"
)
public
ResponseEntity
getDownloadUrl
(
@PathVariable
(
"id"
)
int
id
)
{
public
ResponseEntity
getDownloadUrl
(
@PathVariable
(
"id"
)
int
id
,
HttpServletResponse
response
,
HttpServletRequest
httpServletRequest
)
throws
IOException
{
DeviceUseReportDetailVo
deviceUseReportDetailVo
=
(
DeviceUseReportDetailVo
)
selectDetail
(
id
).
getBody
();
WrodParameter
wrodParameter
=
new
WrodParameter
();
Calendar
calendar
=
Calendar
.
getInstance
();
...
...
@@ -78,7 +85,12 @@ public class DeviceUseReportController {
stringBuffer
.
append
(
calendar
.
get
(
Calendar
.
YEAR
)).
append
(
"年"
).
append
(
calendar
.
get
(
Calendar
.
MONTH
)).
append
(
"月"
).
append
(
calendar
.
get
(
Calendar
.
DAY_OF_MONTH
)).
append
(
"日"
);
wrodParameter
.
setTime
(
stringBuffer
.
toString
());
wrodParameter
.
setUnitsName
(
deviceUseReportDetailVo
.
getUnit
());
wrodParameter
.
setTotal
(
deviceUseReportDetailVo
.
getDeviceNumber
().
toString
());
return
null
;
wrodParameter
.
setTitle1
(
calendar
.
get
(
Calendar
.
YEAR
)+
"年度"
+
deviceUseReportDetailVo
.
getUnit
());
wrodParameter
.
setTitle2
(
"装备使用情况报告"
);
wrodParameter
.
setSelfCheck
(
"列装库内列装总数:"
+
deviceUseReportDetailVo
.
getPackingNum
().
toString
()+
",退装总数:"
+
deviceUseReportDetailVo
.
getRetiredNum
().
toString
()+
"。"
);
wrodParameter
.
setComfirmCheck
(
" "
);
wrodParameter
.
setTotal
(
"度本单位在库总装备数"
+
deviceUseReportDetailVo
.
getDeviceNumber
()+
";其中入库总数"
+
deviceUseReportDetailVo
.
getInLibraryNum
()+
";维修总数"
+
deviceUseReportDetailVo
.
getRepairNum
()+
";配发总数"
+
deviceUseReportDetailVo
.
getAllotNum
()+
"清退总数"
+
deviceUseReportDetailVo
.
getSendBackNum
()+
";销毁总数"
+
deviceUseReportDetailVo
.
getDestoryNum
()+
"。"
);
useReportFIleService
.
findToFileService
(
wrodParameter
,
response
,
httpServletRequest
);
return
ResponseEntity
.
ok
(
"下载成功"
);
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论