From 82425d8e56ea692c9edfd280b1cce193c94252b9 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期三, 09 十月 2024 16:32:50 +0800
Subject: [PATCH] 最新版本
---
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformServiceImpl.java | 16 +++++++++++-----
1 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformServiceImpl.java
index 37627fa..44a60e9 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformServiceImpl.java
@@ -79,6 +79,7 @@
platformDevice.setType(Constants.ZERO);
platformDevice.setDeviceId(ledId.toString());
platformDevice.setHkId(device.getHkId());
+ platformDevice.setHkNo(device.getNo());
platformDevice.setName(device.getName());
platformDeviceList.add(platformDevice);
}
@@ -100,6 +101,7 @@
platformDevice.setType(Constants.TWO);
platformDevice.setDeviceId(broadcastId.toString());
platformDevice.setHkId(device.getHkId());
+ platformDevice.setHkNo(device.getNo());
platformDevice.setName(device.getName());
platformDeviceList.add(platformDevice);
}
@@ -154,6 +156,7 @@
platformDevice.setType(Constants.ZERO);
platformDevice.setDeviceId(ledId.toString());
platformDevice.setHkId(device.getHkId());
+ platformDevice.setHkNo(device.getNo());
platformDevice.setName(device.getName());
platformDeviceList.add(platformDevice);
}
@@ -177,6 +180,7 @@
platformDevice.setType(Constants.TWO);
platformDevice.setDeviceId(broadcastId.toString());
platformDevice.setHkId(device.getHkId());
+ platformDevice.setHkNo(device.getNo());
platformDevice.setName(device.getName());
platformDeviceList.add(platformDevice);
}
@@ -316,9 +320,12 @@
.selectAs(PlatformGroup::getName,Platform::getGroupName)
.select(" (select ifnull(TIMESTAMPDIFF(HOUR, '2023-01-01 '||pg.start_time||':00', '2023-01-01 '||pg.end_time||':00' ),0) from platform_group pg " +
" where t.group_id = pg.id ) as openTime ")
- .select(" ( select ROUND( ifnull(SUM(pl.PARAM3),0) / 3600 , 2 ) from platform_log pl where pl.OBJ_ID = t.id and pl.remark = t.id " +
- " and pl.CREATE_DATE > '"+Utils.Date.getStart(platform.getQueryDateStart())+"' " +
- "and pl.CREATE_DATE <= '"+Utils.Date.getEnd(platform.getQueryDateEnd())+"' ) as workCountTime ")
+ .select(" ( select ROUND( ifnull(SUM(pl.PARAM3),0) / 3600 , 2 ) from platform_log pl where pl.remark = t.id " +
+ " and pl.CREATE_DATE > '"+DateUtil.getFomartDate(platform.getQueryDateStart(),"yyyy-MM-dd")+" 00:00:00' " +
+ "and pl.CREATE_DATE <= '"+DateUtil.getFomartDate(platform.getQueryDateEnd(),"yyyy-MM-dd")+" 23:59:59' ) as workCountTime ")
+ .select(" ( select count(1) from platform_log pl where pl.remark = t.id " +
+ " and pl.CREATE_DATE > '"+DateUtil.getFomartDate(platform.getQueryDateStart(),"yyyy-MM-dd")+" 00:00:00' " +
+ "and pl.CREATE_DATE <= '"+DateUtil.getFomartDate(platform.getQueryDateEnd(),"yyyy-MM-dd")+" 23:59:59' and pl.OBJ_TYPE = 5 ) as stopCount ")
.leftJoin(PlatformGroup.class,PlatformGroup::getId,Platform::getGroupId);
queryWrapper
.eq(platform.getGroupId() != null, Platform::getGroupId, platform.getGroupId())
@@ -345,8 +352,6 @@
//鏌ヨ2鏃ユ湡鐩稿樊澶╂暟
Integer sumDays = DateUtil.daysBetweenDates(platform.getQueryDateEnd(),platform.getQueryDateStart())+1;
for (Platform bean:platformList) {
- List<PlatformJob> beanJobList = platformJobList.stream().filter(i->Constants.equalsInteger(i.getPlatformId(),bean.getId())).collect(Collectors.toList());
- bean.setStopCount(beanJobList.size());
if(Objects.isNull(bean.getOpenTime())||bean.getOpenTime().compareTo(BigDecimal.ZERO)<=0){
bean.setUseRata(BigDecimal.ZERO);
continue;
@@ -412,6 +417,7 @@
if(Constants.equalsInteger(platform.getPlatformStatus(),Constants.ONE)){
response.setCarCode(platform.getWorkCarCode());
}
+ platformStatusListResponses.add(response);
}
}
return platformStatusListResponses;
--
Gitblit v1.9.3