Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
87bd7560
提交
87bd7560
authored
7月 14, 2021
作者:
zhoushaopan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[使用报告]修改
上级
eeca0947
全部展开
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
35 行增加
和
20 行删除
+35
-20
DeviceUseReportController.java
...evice/usereport/controller/DeviceUseReportController.java
+19
-10
DeviceUseReportService.java
.../dev/device/usereport/service/DeviceUseReportService.java
+1
-0
DeviceUseReportServiceImpl.java
...ce/usereport/service/impl/DeviceUseReportServiceImpl.java
+0
-0
DeviceUseReportDetailVo.java
.../device/usereport/subject/vo/DeviceUseReportDetailVo.java
+15
-10
没有找到文件。
dev-usereport/src/main/java/com/tykj/dev/device/usereport/controller/DeviceUseReportController.java
浏览文件 @
87bd7560
...
...
@@ -3,6 +3,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.user.subject.entity.SecurityUser
;
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,9 +18,11 @@ import org.springframework.beans.BeanUtils;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.security.core.annotation.AuthenticationPrincipal
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
springfox.documentation.annotations.ApiIgnore
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
...
...
@@ -53,7 +56,7 @@ public class DeviceUseReportController {
@ApiOperation
(
value
=
"生成装备使用报告"
,
notes
=
"可以通过这个接口生成装备使用报告"
)
@PostMapping
(
"/create"
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
ResponseEntity
createDeviceUseReport
(
@RequestBody
@Validated
DeviceUseReportCreateVo
deviceUseReportCreateVo
)
{
public
ResponseEntity
createDeviceUseReport
(
@RequestBody
@Validated
DeviceUseReportCreateVo
deviceUseReportCreateVo
,
@ApiIgnore
@AuthenticationPrincipal
SecurityUser
securityUser
)
{
return
ResultUtil
.
success
(
deviceUseReportService
.
createReport
(
deviceUseReportCreateVo
));
}
...
...
@@ -65,15 +68,21 @@ public class DeviceUseReportController {
BeanUtils
.
copyProperties
(
d
,
deviceUseReportDetailVo
);
//分解数量详情组合字段
List
<
Integer
>
list
=
StringSplitUtil
.
userIdSplit
(
d
.
getReportDetail
());
if
(
list
.
size
()
>
7
)
{
if
(
list
.
size
()
>
13
)
{
deviceUseReportDetailVo
.
setDeviceNumber
(
list
.
get
(
0
));
deviceUseReportDetailVo
.
setInLibraryNum
(
list
.
get
(
1
));
deviceUseReportDetailVo
.
setRepairNum
(
list
.
get
(
2
));
deviceUseReportDetailVo
.
setAllotNum
(
list
.
get
(
3
));
deviceUseReportDetailVo
.
setSendBackNum
(
list
.
get
(
4
));
deviceUseReportDetailVo
.
setDestoryNum
(
list
.
get
(
5
));
deviceUseReportDetailVo
.
setPackingNum
(
list
.
get
(
6
));
deviceUseReportDetailVo
.
setRetiredNum
(
list
.
get
(
7
));
deviceUseReportDetailVo
.
setSendRepairNum
(
list
.
get
(
2
));
deviceUseReportDetailVo
.
setReceiveRepairNum
(
list
.
get
(
3
));
deviceUseReportDetailVo
.
setDestoryNum
(
list
.
get
(
4
));
deviceUseReportDetailVo
.
setSendAllotNum
(
list
.
get
(
5
));
deviceUseReportDetailVo
.
setReceiveAllotNum
(
list
.
get
(
6
));
deviceUseReportDetailVo
.
setSensAllotBackNum
(
list
.
get
(
7
));
deviceUseReportDetailVo
.
setReceiveAllotBackNum
(
list
.
get
(
8
));
deviceUseReportDetailVo
.
setSendBackNum
(
list
.
get
(
9
));
deviceUseReportDetailVo
.
setScrapStatisticsNum
(
list
.
get
(
10
));
deviceUseReportDetailVo
.
setPackingNum
(
list
.
get
(
11
));
deviceUseReportDetailVo
.
setRetiredNum
(
list
.
get
(
12
));
deviceUseReportDetailVo
.
setDecommissioningStatisticsNum
(
list
.
get
(
13
));
}
return
ResultUtil
.
success
(
deviceUseReportDetailVo
);
}
...
...
@@ -104,9 +113,9 @@ public class DeviceUseReportController {
wrodParameter
.
setDestructionNum
(
deviceUseReportDetailVo
.
getDestoryNum
());
wrodParameter
.
setFieldingNum
(
deviceUseReportDetailVo
.
getPackingNum
());
wrodParameter
.
setStorageNum
(
deviceUseReportDetailVo
.
getInLibraryNum
());
wrodParameter
.
setMaintenanceNum
(
deviceUseReportDetailVo
.
getRepairNum
());
//
wrodParameter.setMaintenanceNum(deviceUseReportDetailVo.getRepairNum());
wrodParameter
.
setRepelNum
(
deviceUseReportDetailVo
.
getSendBackNum
());
wrodParameter
.
setWithNum
(
deviceUseReportDetailVo
.
getAllotNum
());
//
wrodParameter.setWithNum(deviceUseReportDetailVo.getAllotNum());
wrodParameter
.
setTitleAnnual
(
localDateTime
.
getYear
());
useReportFIleService
.
findToFileService
(
wrodParameter
,
response
,
httpServletRequest
);
return
ResponseEntity
.
ok
(
"下载成功"
);
...
...
dev-usereport/src/main/java/com/tykj/dev/device/usereport/service/DeviceUseReportService.java
浏览文件 @
87bd7560
package
com
.
tykj
.
dev
.
device
.
usereport
.
service
;
import
com.tykj.dev.device.user.subject.entity.SecurityUser
;
import
com.tykj.dev.device.usereport.subject.domin.DeviceUseReport
;
import
com.tykj.dev.device.usereport.subject.vo.DeviceStatistics
;
import
com.tykj.dev.device.usereport.subject.vo.DeviceUseReportCreateVo
;
...
...
dev-usereport/src/main/java/com/tykj/dev/device/usereport/service/impl/DeviceUseReportServiceImpl.java
浏览文件 @
87bd7560
差异被折叠。
点击展开。
dev-usereport/src/main/java/com/tykj/dev/device/usereport/subject/vo/DeviceUseReportDetailVo.java
浏览文件 @
87bd7560
...
...
@@ -20,27 +20,32 @@ public class DeviceUseReportDetailVo {
@ApiModelProperty
(
value
=
"装备类型总数"
,
example
=
"100"
)
private
Integer
deviceNumber
;
@ApiModelProperty
(
value
=
"入库数量"
,
example
=
"10"
)
private
Integer
inLibraryNum
;
@ApiModelProperty
(
value
=
"维修数量"
,
example
=
"10"
)
private
Integer
repairNum
;
private
Integer
sendRepairNum
;
@ApiModelProperty
(
value
=
"维修退回"
,
example
=
"10"
)
private
Integer
receiveRepairNum
;
@ApiModelProperty
(
value
=
"销毁数量"
,
example
=
"10"
)
private
Integer
destoryNum
;
@ApiModelProperty
(
value
=
"发起配发数量"
,
example
=
"10"
)
private
Integer
sendAllotNum
;
@ApiModelProperty
(
value
=
"接收配发数量"
,
example
=
"10"
)
private
Integer
receiveAllotNum
;
@ApiModelProperty
(
value
=
"发起退回数量"
,
example
=
"10"
)
private
Integer
sensAllotBackNum
;
@ApiModelProperty
(
value
=
"接收退回"
,
example
=
"10"
)
private
Integer
receiveAllotBackNum
;
@ApiModelProperty
(
value
=
"清退数量"
,
example
=
"10"
)
private
Integer
sendBackNum
;
@ApiModelProperty
(
value
=
"配发数量"
,
example
=
"10"
)
private
Integer
allotNum
;
@ApiModelProperty
(
value
=
"报废数量"
,
example
=
"10"
)
private
Integer
scrapStatisticsNum
;
@ApiModelProperty
(
value
=
"列装数量"
,
example
=
"10"
)
private
Integer
packingNum
;
@ApiModelProperty
(
value
=
"退装数量"
,
example
=
"10"
)
private
Integer
retiredNum
;
@ApiModelProperty
(
value
=
"退役"
,
example
=
"10"
)
private
Integer
decommissioningStatisticsNum
;
@ApiModelProperty
(
value
=
"创建时间"
)
private
Date
createTime
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论