Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
ea91ae2a
提交
ea91ae2a
authored
11月 29, 2021
作者:
zjm
浏览文件
操作
浏览文件
下载
差异文件
Merge ranch 'dev' of git.yfzx.zjtys.com.cn:matrix/device-back into feature-check
上级
7c654f0d
313ffd84
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
32 行增加
和
4 行删除
+32
-4
UnitsCache.java
.../main/java/com/tykj/dev/device/user/cache/UnitsCache.java
+17
-0
DeviceUseReportServiceImpl.java
...ce/usereport/service/impl/DeviceUseReportServiceImpl.java
+15
-4
没有找到文件。
dev-user/src/main/java/com/tykj/dev/device/user/cache/UnitsCache.java
浏览文件 @
ea91ae2a
...
@@ -4,6 +4,7 @@ import com.tykj.dev.device.user.subject.entity.Units;
...
@@ -4,6 +4,7 @@ import com.tykj.dev.device.user.subject.entity.Units;
import
lombok.Data
;
import
lombok.Data
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Comparator
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.function.Function
;
import
java.util.function.Function
;
...
@@ -81,4 +82,20 @@ public class UnitsCache {
...
@@ -81,4 +82,20 @@ public class UnitsCache {
return
new
ArrayList
<>(
idMap
.
values
()).
stream
().
filter
(
units
->
areaIds
.
contains
(
units
.
getAreaId
())).
collect
(
Collectors
.
toList
());
return
new
ArrayList
<>(
idMap
.
values
()).
stream
().
filter
(
units
->
areaIds
.
contains
(
units
.
getAreaId
())).
collect
(
Collectors
.
toList
());
}
}
/**
* 根据单位id的集合给集合进行排序
* @param ids 单位id集合
* @return 单位id集合
*/
public
List
<
Integer
>
sortReasonUnitsIds
(
List
<
Integer
>
ids
){
return
ids
.
stream
().
sorted
(
Comparator
.
comparing
(
id
->
idMap
.
get
(
id
).
getShowOrder
())).
collect
(
Collectors
.
toList
());
}
public
List
<
Units
>
sortReasonUnits
(
List
<
Units
>
unitsList
){
return
unitsList
.
stream
().
sorted
(
Comparator
.
comparing
(
Units:
:
getShowOrder
)).
collect
(
Collectors
.
toList
());
}
}
}
dev-usereport/src/main/java/com/tykj/dev/device/usereport/service/impl/DeviceUseReportServiceImpl.java
浏览文件 @
ea91ae2a
...
@@ -367,14 +367,23 @@ public class DeviceUseReportServiceImpl implements DeviceUseReportService {
...
@@ -367,14 +367,23 @@ public class DeviceUseReportServiceImpl implements DeviceUseReportService {
// List<AllotBill> allotBillEntities = allotBillDao.findAll().stream()
// List<AllotBill> allotBillEntities = allotBillDao.findAll().stream()
// .filter(allotBillEntity -> allotBillEntity.getAllotStatus() == 5 && userUtils.getCurrentUserUnitName().equals(allotBillEntity.getReceiveUnit()) && allotBillEntity.getReceiveTime().after(date) && allotBillEntity.getReceiveTime().before(date2))
// .filter(allotBillEntity -> allotBillEntity.getAllotStatus() == 5 && userUtils.getCurrentUserUnitName().equals(allotBillEntity.getReceiveUnit()) && allotBillEntity.getReceiveTime().after(date) && allotBillEntity.getReceiveTime().before(date2))
// .collect(toList());
// .collect(toList());
Integer
unitId
=
userUtils
.
getCurrentUnitId
();
List
<
AllotBill
>
allotBillEntities
=
allotBillDao
.
findAll
().
stream
()
List
<
AllotBill
>
allotBillEntities
=
allotBillDao
.
findAll
().
stream
()
.
filter
(
allotBillEntity
->
allotBillEntity
.
getAllotStatus
()
==
5
&&
.
filter
(
allotBillEntity
->
allotBillEntity
.
getAllotStatus
()
==
5
&&
u
serUtils
.
getCurrentUnitId
()
.
equals
(
allotBillEntity
.
getReceiveUnitId
())
u
nitId
.
equals
(
allotBillEntity
.
getReceiveUnitId
())
&&
allotBillEntity
.
getReceiveTime
().
after
(
date
)
&&
allotBillEntity
.
getReceiveTime
().
before
(
date2
))
&&
allotBillEntity
.
getReceiveTime
().
after
(
date
)
&&
allotBillEntity
.
getReceiveTime
().
before
(
date2
))
.
collect
(
toList
());
.
collect
(
toList
());
//筛选出配发给其它单位的账单 发起配发
//筛选出配发给其它单位的账单 发起配发
// List<AllotBill> allotBillEntities2 = allotBillDao.findAll().stream()
// .filter(allotBillEntity -> allotStatusList.contains(allotBillEntity.getAllotStatus()) &&
// userUtils.getCurrentUserUnitName().equals(userPublicService.findUnitsNameByUserId(allotBillEntity.getSendUseraId()))
// && allotBillEntity.getSendTime().after(date) && allotBillEntity.getSendTime().before(date2))
// .collect(toList());
String
currentUserUnitName1
=
userUtils
.
getCurrentUserUnitName
();
List
<
AllotBill
>
allotBillEntities2
=
allotBillDao
.
findAll
().
stream
()
List
<
AllotBill
>
allotBillEntities2
=
allotBillDao
.
findAll
().
stream
()
.
filter
(
allotBillEntity
->
allotStatusList
.
contains
(
allotBillEntity
.
getAllotStatus
())
&&
userUtils
.
getCurrentUserUnitName
().
equals
(
userPublicService
.
findUnitsNameByUserId
(
allotBillEntity
.
getSendUseraId
()))
&&
allotBillEntity
.
getSendTime
().
after
(
date
)
&&
allotBillEntity
.
getSendTime
().
before
(
date2
))
.
filter
(
allotBillEntity
->
allotStatusList
.
contains
(
allotBillEntity
.
getAllotStatus
())
&&
currentUserUnitName1
.
equals
(
userPublicService
.
findUnitsNameByUserId
(
allotBillEntity
.
getSendUseraId
()))
&&
allotBillEntity
.
getSendTime
().
after
(
date
)
&&
allotBillEntity
.
getSendTime
().
before
(
date2
))
.
collect
(
toList
());
.
collect
(
toList
());
//接收配发装备
//接收配发装备
if
(
allotBillEntities
.
size
()
>
0
)
{
if
(
allotBillEntities
.
size
()
>
0
)
{
...
@@ -397,7 +406,8 @@ public class DeviceUseReportServiceImpl implements DeviceUseReportService {
...
@@ -397,7 +406,8 @@ public class DeviceUseReportServiceImpl implements DeviceUseReportService {
// .collect(toList());
// .collect(toList());
List
<
AllotBackBill
>
receiveAllotBackBills
=
allotBackBillDao
.
findAll
().
stream
()
List
<
AllotBackBill
>
receiveAllotBackBills
=
allotBackBillDao
.
findAll
().
stream
()
.
filter
(
allotBackBill
->
allotBackBill
.
getBackStatus
()
==
3
&&
.
filter
(
allotBackBill
->
allotBackBill
.
getBackStatus
()
==
3
&&
userUtils
.
getCurrentUserUnitName
().
equals
(
unitsCache
.
findById
(
allotBackBill
.
getReceiveUnitId
()).
getName
())
// userUtils.getCurrentUserUnitName().equals(unitsCache.findById(allotBackBill.getReceiveUnitId()).getName())
currentUserUnitName1
.
equals
(
unitsCache
.
findById
(
allotBackBill
.
getReceiveUnitId
()).
getName
())
&&
allotBackBill
.
getReceiveTime
().
after
(
date
)
&&
allotBackBill
.
getReceiveTime
().
before
(
date2
))
&&
allotBackBill
.
getReceiveTime
().
after
(
date
)
&&
allotBackBill
.
getReceiveTime
().
before
(
date2
))
.
collect
(
toList
());
.
collect
(
toList
());
//接收退回
//接收退回
...
@@ -416,7 +426,8 @@ public class DeviceUseReportServiceImpl implements DeviceUseReportService {
...
@@ -416,7 +426,8 @@ public class DeviceUseReportServiceImpl implements DeviceUseReportService {
// .collect(toList());
// .collect(toList());
List
<
AllotBackBill
>
sendAllotBackBills
=
allotBackBillDao
.
findAll
().
stream
()
List
<
AllotBackBill
>
sendAllotBackBills
=
allotBackBillDao
.
findAll
().
stream
()
.
filter
(
allotBackBill
->
allotStatusBackList
.
contains
(
allotBackBill
.
getBackStatus
())
&&
.
filter
(
allotBackBill
->
allotStatusBackList
.
contains
(
allotBackBill
.
getBackStatus
())
&&
userUtils
.
getCurrentUserUnitName
().
equals
(
unitsCache
.
findById
(
allotBackBill
.
getSendUnitId
()).
getName
())
// userUtils.getCurrentUserUnitName().equals(unitsCache.findById(allotBackBill.getSendUnitId()).getName())
currentUserUnitName1
.
equals
(
unitsCache
.
findById
(
allotBackBill
.
getSendUnitId
()).
getName
())
&&
allotBackBill
.
getSendTime
().
after
(
date
)
&&
allotBackBill
.
getSendTime
().
before
(
date2
))
&&
allotBackBill
.
getSendTime
().
after
(
date
)
&&
allotBackBill
.
getSendTime
().
before
(
date2
))
.
collect
(
toList
());
.
collect
(
toList
());
//发起退回
//发起退回
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论