From 153d165114fb17722853629dfdc9c1d59b73e439 Mon Sep 17 00:00:00 2001
From: yangys <y_ys79@sina.com>
Date: 星期日, 31 三月 2024 19:48:00 +0800
Subject: [PATCH] mdc ok
---
smart-man-boot/src/main/java/com/qianwen/smartman/modules/report/utils/CommonUtil.java | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/smart-man-boot/src/main/java/com/qianwen/smartman/modules/report/utils/CommonUtil.java b/smart-man-boot/src/main/java/com/qianwen/smartman/modules/report/utils/CommonUtil.java
index 4fe28b1..fca3cad 100644
--- a/smart-man-boot/src/main/java/com/qianwen/smartman/modules/report/utils/CommonUtil.java
+++ b/smart-man-boot/src/main/java/com/qianwen/smartman/modules/report/utils/CommonUtil.java
@@ -63,14 +63,14 @@
List<WorkstationShiftDTO> workstationShifts = new ArrayList<>();
workstationData.forEach(workstation -> {
Boolean isBlendShiftModel = isBlendShiftModel(shiftInfoDtoList, workstation.getWorkstationId());
- List<ShiftInfoDTO> collect = (List) shiftInfoDtoList.parallelStream().filter(shift -> {
+ List<ShiftInfoDTO> collect = shiftInfoDtoList.parallelStream().filter(shift -> {
return shift.getWorkstationId().equals(workstation.getWorkstationId());
}).collect(Collectors.collectingAndThen(Collectors.toCollection(() -> {
- return new TreeSet(Comparator.comparing((v0) -> {
+ return new TreeSet<>(Comparator.comparing((v0) -> {
return v0.getShiftIndex();
}));
}), (v1) -> {
- return new ArrayList(v1);
+ return new ArrayList<>(v1);
}));
collect.forEach(c -> {
WorkstationShiftDTO workstationShiftDTO = WorkstationShiftDTO.of(c.getShiftIndex()).setShiftName(buildShiftName(c.getShiftIndex(), isBlendShiftModel, c.getIndexName()));
@@ -83,21 +83,21 @@
}
public static Boolean isBlendShiftModel(List<ShiftInfoDTO> shiftInfos, Long workstationId) {
- int size = ((ArrayList) shiftInfos.parallelStream().filter(s -> {
+ int size = ( shiftInfos.parallelStream().filter(s -> {
return s.getWorkstationId().equals(workstationId);
}).collect(Collectors.collectingAndThen(Collectors.toCollection(() -> {
- return new TreeSet(Comparator.comparing((v0) -> {
+ return new TreeSet<>(Comparator.comparing((v0) -> {
return v0.getModelId();
}));
}), (v1) -> {
- return new ArrayList(v1);
+ return new ArrayList<>(v1);
}))).size();
return Boolean.valueOf(size >= 2);
}
public static List<WorkstationShiftDTO> fillShift(List<ShiftInfoDTO> collect, WorkstationDataDTO workstationDataDTO) {
if (collect.size() == 4) {
- return new ArrayList();
+ return new ArrayList<>();
}
List<WorkstationShiftDTO> result = new ArrayList<>();
if (CollectionUtil.isEmpty(collect)) {
@@ -123,7 +123,7 @@
}
public static void fillWorkStationGroup(IPage<WorkstationDataDTO> source) {
- List<WorkstationDataDTO> list = (List) source.getRecords().parallelStream().peek(w -> {
+ List<WorkstationDataDTO> list = source.getRecords().parallelStream().peek(w -> {
if (StrUtil.isEmpty(w.getWorkstationGroup())) {
w.setWorkstationGroup(CommonGroupConstant.DEFAULT_NAME);
}
@@ -142,7 +142,7 @@
}
public static HttpServletRequest getRequest() {
- ServletRequestAttributes attributes = RequestContextHolder.getRequestAttributes();
+ ServletRequestAttributes attributes = (ServletRequestAttributes)RequestContextHolder.getRequestAttributes();
if (attributes != null) {
HttpServletRequest request = attributes.getRequest();
return request;
--
Gitblit v1.9.3