Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
0bd8bccd
提交
0bd8bccd
authored
7月 14, 2021
作者:
zhoushaopan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[使用报告]修改
上级
87bd7560
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
31 行增加
和
27 行删除
+31
-27
DeviceUseReportController.java
...evice/usereport/controller/DeviceUseReportController.java
+3
-1
DeviceUseReportServiceImpl.java
...ce/usereport/service/impl/DeviceUseReportServiceImpl.java
+24
-23
DeviceUseReportDetailVo.java
.../device/usereport/subject/vo/DeviceUseReportDetailVo.java
+4
-3
没有找到文件。
dev-usereport/src/main/java/com/tykj/dev/device/usereport/controller/DeviceUseReportController.java
浏览文件 @
0bd8bccd
...
@@ -68,7 +68,7 @@ public class DeviceUseReportController {
...
@@ -68,7 +68,7 @@ public class DeviceUseReportController {
BeanUtils
.
copyProperties
(
d
,
deviceUseReportDetailVo
);
BeanUtils
.
copyProperties
(
d
,
deviceUseReportDetailVo
);
//分解数量详情组合字段
//分解数量详情组合字段
List
<
Integer
>
list
=
StringSplitUtil
.
userIdSplit
(
d
.
getReportDetail
());
List
<
Integer
>
list
=
StringSplitUtil
.
userIdSplit
(
d
.
getReportDetail
());
if
(
list
.
size
()
>
1
3
)
{
if
(
list
.
size
()
>
1
5
)
{
deviceUseReportDetailVo
.
setDeviceNumber
(
list
.
get
(
0
));
deviceUseReportDetailVo
.
setDeviceNumber
(
list
.
get
(
0
));
deviceUseReportDetailVo
.
setInLibraryNum
(
list
.
get
(
1
));
deviceUseReportDetailVo
.
setInLibraryNum
(
list
.
get
(
1
));
deviceUseReportDetailVo
.
setSendRepairNum
(
list
.
get
(
2
));
deviceUseReportDetailVo
.
setSendRepairNum
(
list
.
get
(
2
));
...
@@ -83,6 +83,8 @@ public class DeviceUseReportController {
...
@@ -83,6 +83,8 @@ public class DeviceUseReportController {
deviceUseReportDetailVo
.
setPackingNum
(
list
.
get
(
11
));
deviceUseReportDetailVo
.
setPackingNum
(
list
.
get
(
11
));
deviceUseReportDetailVo
.
setRetiredNum
(
list
.
get
(
12
));
deviceUseReportDetailVo
.
setRetiredNum
(
list
.
get
(
12
));
deviceUseReportDetailVo
.
setDecommissioningStatisticsNum
(
list
.
get
(
13
));
deviceUseReportDetailVo
.
setDecommissioningStatisticsNum
(
list
.
get
(
13
));
deviceUseReportDetailVo
.
setToRepairBackNum
(
14
);
deviceUseReportDetailVo
.
setToRepairNum
(
list
.
get
(
15
));
}
}
return
ResultUtil
.
success
(
deviceUseReportDetailVo
);
return
ResultUtil
.
success
(
deviceUseReportDetailVo
);
}
}
...
...
dev-usereport/src/main/java/com/tykj/dev/device/usereport/service/impl/DeviceUseReportServiceImpl.java
浏览文件 @
0bd8bccd
...
@@ -347,7 +347,8 @@ public class DeviceUseReportServiceImpl implements DeviceUseReportService {
...
@@ -347,7 +347,8 @@ public class DeviceUseReportServiceImpl implements DeviceUseReportService {
int
retiredNum
=
0
;
//退装
int
retiredNum
=
0
;
//退装
int
scrapStatisticsNum
=
0
;
//报废
int
scrapStatisticsNum
=
0
;
//报废
int
decommissioningStatisticsNum
=
0
;
//退役
int
decommissioningStatisticsNum
=
0
;
//退役
int
toRepairBackNum
=
0
;
//向下级进行维修退回
int
toRepairNum
=
0
;
// 接收下级单位维修
//筛选出日期范围内所有入库账单
//筛选出日期范围内所有入库账单
List
<
StorageBill
>
storageBillEntities
=
storageBillDao
.
findAll
().
stream
()
List
<
StorageBill
>
storageBillEntities
=
storageBillDao
.
findAll
().
stream
()
.
filter
(
storageBillEntity
->
storageBillEntity
.
getStorageStatus
()
==
2
&&
userUtils
.
getCurrentUserUnitName
().
equals
(
userPublicService
.
findUnitsNameByUserId
(
storageBillEntity
.
getReceiveUseraId
()))
&&
storageBillEntity
.
getUpdateTime
().
after
(
date
)
&&
storageBillEntity
.
getUpdateTime
().
before
(
date2
))
.
filter
(
storageBillEntity
->
storageBillEntity
.
getStorageStatus
()
==
2
&&
userUtils
.
getCurrentUserUnitName
().
equals
(
userPublicService
.
findUnitsNameByUserId
(
storageBillEntity
.
getReceiveUseraId
()))
&&
storageBillEntity
.
getUpdateTime
().
after
(
date
)
&&
storageBillEntity
.
getUpdateTime
().
before
(
date2
))
...
@@ -397,7 +398,7 @@ public class DeviceUseReportServiceImpl implements DeviceUseReportService {
...
@@ -397,7 +398,7 @@ public class DeviceUseReportServiceImpl implements DeviceUseReportService {
receiveAllotBackNum
=
receiveAllotBackNum
+
receiveAllotBackBill
.
getBackCount
();
receiveAllotBackNum
=
receiveAllotBackNum
+
receiveAllotBackBill
.
getBackCount
();
}
}
}
}
//
接收
退回
//
发起
退回
if
(
sendAllotBackBills
.
size
()>
0
){
if
(
sendAllotBackBills
.
size
()>
0
){
for
(
AllotBackBill
sendAllotBackBill
:
sendAllotBackBills
)
{
for
(
AllotBackBill
sendAllotBackBill
:
sendAllotBackBills
)
{
sensAllotBackNum
=
sensAllotBackNum
+
sendAllotBackBill
.
getBackCount
();
sensAllotBackNum
=
sensAllotBackNum
+
sendAllotBackBill
.
getBackCount
();
...
@@ -407,17 +408,6 @@ public class DeviceUseReportServiceImpl implements DeviceUseReportService {
...
@@ -407,17 +408,6 @@ public class DeviceUseReportServiceImpl implements DeviceUseReportService {
//省级才能销毁,列装,退装 退役 报废
//省级才能销毁,列装,退装 退役 报废
if
(
userUtils
.
getCurrentUnitLevel
()
==
1
)
{
if
(
userUtils
.
getCurrentUnitLevel
()
==
1
)
{
//筛选出在日期范围内的销毁单
// List<DeviceDestroyBill> deviceDestoryBillEntities = deviceDestroyBillDao.findAll().stream()
// .filter(deviceDestoryBillEntity -> deviceDestoryBillEntity.getDestroyStatus() == 2 && deviceDestoryBillEntity.getDestroyTime()!=null&&deviceDestoryBillEntity.getDestroyTime().after(date) && deviceDestoryBillEntity.getDestroyTime().before(date2))
// .collect(toList());
// //累加销毁数量
// if (deviceDestoryBillEntities.size() > 0) {
// for (DeviceDestroyBill s : deviceDestoryBillEntities) {
// List<Integer> list = StringSplitUtil.split(s.getDestroyDeviceDetail());
// destoryNum = destoryNum + list.size();
// }
// }
//报废
//报废
int
scrapStatisticsCount
=
this
.
getScrapStatisticsCount
(
date
,
date2
);
int
scrapStatisticsCount
=
this
.
getScrapStatisticsCount
(
date
,
date2
);
scrapStatisticsNum
=
scrapStatisticsCount
;
scrapStatisticsNum
=
scrapStatisticsCount
;
...
@@ -454,23 +444,28 @@ public class DeviceUseReportServiceImpl implements DeviceUseReportService {
...
@@ -454,23 +444,28 @@ public class DeviceUseReportServiceImpl implements DeviceUseReportService {
repelManagementVo
.
setEndTime
(
deviceUseReportCreateVo
.
endTime
.
getTime
());
repelManagementVo
.
setEndTime
(
deviceUseReportCreateVo
.
endTime
.
getTime
());
PagingVo
pagingVo
=
repelQueryService
.
clearedDeviceList
(
repelManagementVo
);
PagingVo
pagingVo
=
repelQueryService
.
clearedDeviceList
(
repelManagementVo
);
sendBackNum
=
pagingVo
.
getTotal
();
sendBackNum
=
pagingVo
.
getTotal
();
// //累加清退数量
// if (sendBackBillDetailEntities.size() > 0) {
// for (SendBackBillDetail s : sendBackBillDetailEntities) {
// sendBackNum = sendBackNum + s.getSendedCount();
// }
// }
//维修数量
//维修数量
List
<
RepairDetail
>
repairDetails
=
repairDetailDao
.
findAll
().
stream
()
List
<
RepairDetail
>
repairDetails
=
repairDetailDao
.
findAll
().
stream
()
.
filter
(
repairDetail
->
repairDetail
.
getOwnUnit
().
equals
(
userUtils
.
getCurrentUserUnitName
())
&&
repairDetail
.
getRepairStatus
()
!=
3
&&
repairDetail
.
getCreateTime
().
after
(
date
)
&&
repairDetail
.
getCreateTime
().
before
(
date2
))
.
filter
(
repairDetail
->
repairDetail
.
getOwnUnit
().
equals
(
userUtils
.
getCurrentUserUnitName
())
&&
repairDetail
.
getRepairStatus
()
!=
3
&&
repairDetail
.
getCreateTime
().
after
(
date
)
&&
repairDetail
.
getCreateTime
().
before
(
date2
))
.
collect
(
toList
());
.
collect
(
toList
());
List
<
Integer
>
toUpRepairStatusList
=
new
ArrayList
<>(
Arrays
.
asList
(
5
,
2
,
3
,
4
));
List
<
RepairSendBill
>
toUpRepairList
=
repairSendBillDao
.
findAll
().
stream
().
filter
(
repairSendBill
->
repairSendBill
.
getReceiveUnit
().
equals
(
userUtils
.
getCurrentUserUnitName
())
&&
toUpRepairStatusList
.
contains
(
repairSendBill
.
getRepairStatus
())
&&
repairSendBill
.
getCreateTime
().
after
(
date
)
&&
repairSendBill
.
getCreateTime
().
before
(
date2
))
.
collect
(
toList
());
if
(
toUpRepairList
.
size
()>
0
){
for
(
RepairSendBill
repairSendBill
:
toUpRepairList
)
{
toRepairNum
=
toRepairNum
+
repairSendBill
.
getSendedCount
();
}
}
//筛选出配接收维修退回的账单
//筛选出配接收维修退回的账单
List
<
Integer
>
repairBackList
=
new
ArrayList
<>(
Arrays
.
asList
(
5
,
2
));
List
<
Integer
>
repairBackList
=
new
ArrayList
<>(
Arrays
.
asList
(
5
,
2
));
List
<
RepairBackBill
>
repairBackBills
=
repairBackBillDao
.
findAll
().
stream
()
List
<
RepairBackBill
>
repairBackBills
=
repairBackBillDao
.
findAll
().
stream
()
.
filter
(
repairBackBill
->
repairBackBill
.
getReceiveUnit
().
equals
(
userUtils
.
getCurrentUserUnitName
())
&&
repairBackList
.
contains
(
repairBackBill
.
getBackStatus
())
&&
repairBackBill
.
getCreateTime
().
after
(
date
)
&&
repairBackBill
.
getCreateTime
().
before
(
date2
))
.
filter
(
repairBackBill
->
repairBackBill
.
getReceiveUnit
().
equals
(
userUtils
.
getCurrentUserUnitName
())
&&
repairBackList
.
contains
(
repairBackBill
.
getBackStatus
())
&&
repairBackBill
.
getCreateTime
().
after
(
date
)
&&
repairBackBill
.
getCreateTime
().
before
(
date2
))
.
collect
(
toList
());
.
collect
(
toList
());
//筛选出向下级的维修退回
List
<
RepairBackBill
>
repairBackBillList
=
repairBackBillDao
.
findAll
().
stream
()
.
filter
(
repairBackBill
->
repairBackBill
.
getSendUnit
().
equals
(
userUtils
.
getCurrentUserUnitName
())
&&
repairBackList
.
contains
(
repairBackBill
.
getBackStatus
())
&&
repairBackBill
.
getCreateTime
().
after
(
date
)
&&
repairBackBill
.
getCreateTime
().
before
(
date2
))
.
collect
(
toList
());
//发起维修数量
//发起维修数量
if
(
repairDetails
.
size
()>
0
){
if
(
repairDetails
.
size
()>
0
){
sendRepairNum
=
sendRepairNum
+
repairDetails
.
size
();
sendRepairNum
=
sendRepairNum
+
repairDetails
.
size
();
...
@@ -478,7 +473,13 @@ public class DeviceUseReportServiceImpl implements DeviceUseReportService {
...
@@ -478,7 +473,13 @@ public class DeviceUseReportServiceImpl implements DeviceUseReportService {
//将数量进行新增 累加维修数量
//将数量进行新增 累加维修数量
if
(
repairBackBills
.
size
()
>
0
){
if
(
repairBackBills
.
size
()
>
0
){
for
(
RepairBackBill
repairBackBill
:
repairBackBills
)
{
for
(
RepairBackBill
repairBackBill
:
repairBackBills
)
{
receiveRepairNum
=
receiveRepairNum
+
repairBackBill
.
getReceiveCount
();
receiveRepairNum
=
receiveRepairNum
+
repairBackBill
.
getSendedCount
();
}
}
//将数量进行新增 累加维修数量
if
(
repairBackBillList
.
size
()
>
0
){
for
(
RepairBackBill
repairBackBill
:
repairBackBillList
)
{
toRepairBackNum
=
toRepairBackNum
+
repairBackBill
.
getSendedCount
();
}
}
}
}
...
@@ -488,7 +489,7 @@ public class DeviceUseReportServiceImpl implements DeviceUseReportService {
...
@@ -488,7 +489,7 @@ public class DeviceUseReportServiceImpl implements DeviceUseReportService {
+
receiveRepairNum
+
"x"
+
destoryNum
+
receiveRepairNum
+
"x"
+
destoryNum
+
"x"
+
sendAllotNum
+
"x"
+
receiveAllotNum
+
"x"
+
sensAllotBackNum
+
"x"
+
sendAllotNum
+
"x"
+
receiveAllotNum
+
"x"
+
sensAllotBackNum
+
"x"
+
receiveAllotBackNum
+
"x"
+
sendBackNum
+
"x"
+
scrapStatisticsNum
+
"x"
+
receiveAllotBackNum
+
"x"
+
sendBackNum
+
"x"
+
scrapStatisticsNum
+
"x"
+
packingNum
+
"x"
+
retiredNum
+
"x"
+
decommissioningStatisticsNum
+
"x"
);
+
"x"
+
packingNum
+
"x"
+
retiredNum
+
"x"
+
decommissioningStatisticsNum
+
"x"
+
toRepairBackNum
+
"x"
+
toRepairNum
+
"x"
);
return
deviceUseReportDao
.
save
(
deviceUseReportEntity
);
return
deviceUseReportDao
.
save
(
deviceUseReportEntity
);
}
}
...
...
dev-usereport/src/main/java/com/tykj/dev/device/usereport/subject/vo/DeviceUseReportDetailVo.java
浏览文件 @
0bd8bccd
...
@@ -14,10 +14,8 @@ import java.util.Date;
...
@@ -14,10 +14,8 @@ import java.util.Date;
public
class
DeviceUseReportDetailVo
{
public
class
DeviceUseReportDetailVo
{
@ApiModelProperty
(
value
=
"标题"
,
example
=
"标题"
)
@ApiModelProperty
(
value
=
"标题"
,
example
=
"标题"
)
private
String
title
;
private
String
title
;
@ApiModelProperty
(
value
=
"所属单位"
,
example
=
"省机要局"
)
@ApiModelProperty
(
value
=
"所属单位"
,
example
=
"省机要局"
)
private
String
unit
;
private
String
unit
;
@ApiModelProperty
(
value
=
"装备类型总数"
,
example
=
"100"
)
@ApiModelProperty
(
value
=
"装备类型总数"
,
example
=
"100"
)
private
Integer
deviceNumber
;
private
Integer
deviceNumber
;
@ApiModelProperty
(
value
=
"入库数量"
,
example
=
"10"
)
@ApiModelProperty
(
value
=
"入库数量"
,
example
=
"10"
)
...
@@ -46,7 +44,10 @@ public class DeviceUseReportDetailVo {
...
@@ -46,7 +44,10 @@ public class DeviceUseReportDetailVo {
private
Integer
retiredNum
;
private
Integer
retiredNum
;
@ApiModelProperty
(
value
=
"退役"
,
example
=
"10"
)
@ApiModelProperty
(
value
=
"退役"
,
example
=
"10"
)
private
Integer
decommissioningStatisticsNum
;
private
Integer
decommissioningStatisticsNum
;
@ApiModelProperty
(
value
=
"向下级进行维修退回"
,
example
=
"10"
)
private
Integer
toRepairBackNum
;
@ApiModelProperty
(
value
=
"接收下级进行维修"
,
example
=
"10"
)
private
Integer
toRepairNum
;
@ApiModelProperty
(
value
=
"创建时间"
)
@ApiModelProperty
(
value
=
"创建时间"
)
private
Date
createTime
;
private
Date
createTime
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论