|
|
@ -630,8 +630,8 @@ public class ReportServiceImpl implements ReportService { |
|
|
|
run.setStationCode(station.getCode()); |
|
|
|
run.setStationCode(station.getCode()); |
|
|
|
run.setStationName(station.getName()); |
|
|
|
run.setStationName(station.getName()); |
|
|
|
Calendar calendar = Calendar.getInstance(); |
|
|
|
Calendar calendar = Calendar.getInstance(); |
|
|
|
calendar.setTime(new Date()); |
|
|
|
calendar.setTime(DateUtil.parse("2024-04-01 00:00:00",DateUtil.PATTERN_DATETIME)); |
|
|
|
calendar.add(Calendar.DAY_OF_MONTH,-1); |
|
|
|
//calendar.add(Calendar.DAY_OF_MONTH,-1);
|
|
|
|
run.setMonth(DateUtil.format(calendar.getTime(),"yyyy-MM")); |
|
|
|
run.setMonth(DateUtil.format(calendar.getTime(),"yyyy-MM")); |
|
|
|
List<RideDeviceVo> stationDevices = devices.stream().filter(device->device.getDepartment().equals(station.getRefDept())).collect(Collectors.toList()); |
|
|
|
List<RideDeviceVo> stationDevices = devices.stream().filter(device->device.getDepartment().equals(station.getRefDept())).collect(Collectors.toList()); |
|
|
|
if(CollectionUtil.isEmpty(stationDevices)){ |
|
|
|
if(CollectionUtil.isEmpty(stationDevices)){ |
|
|
@ -686,7 +686,8 @@ public class ReportServiceImpl implements ReportService { |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private Double generate(int type,String deviceCode,double ride) { |
|
|
|
private Double generate(int type,String deviceCode,double ride) { |
|
|
|
Calendar calendar = Calendar.getInstance(); |
|
|
|
Calendar calendar = Calendar.getInstance(); |
|
|
|
calendar.setTime(new Date()); |
|
|
|
calendar.setTime(DateUtil.parse("2024-04-01 00:00:00",DateUtil.PATTERN_DATETIME)); |
|
|
|
|
|
|
|
//calendar.setTime(new Date());
|
|
|
|
String end = null,start = null; |
|
|
|
String end = null,start = null; |
|
|
|
int cycleType = 5; |
|
|
|
int cycleType = 5; |
|
|
|
switch (type){ |
|
|
|
switch (type){ |
|
|
@ -722,7 +723,8 @@ public class ReportServiceImpl implements ReportService { |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private Double planGenerate(int type, String stationCode,List<PlanGenerationEntity> plans) { |
|
|
|
private Double planGenerate(int type, String stationCode,List<PlanGenerationEntity> plans) { |
|
|
|
Calendar calendar = Calendar.getInstance(); |
|
|
|
Calendar calendar = Calendar.getInstance(); |
|
|
|
calendar.setTime(new Date()); |
|
|
|
calendar.setTime(DateUtil.parse("2024-04-01 00:00:00",DateUtil.PATTERN_DATETIME)); |
|
|
|
|
|
|
|
//calendar.setTime(new Date());
|
|
|
|
if(type == 0){ |
|
|
|
if(type == 0){ |
|
|
|
calendar.add(Calendar.DAY_OF_MONTH,-1); |
|
|
|
calendar.add(Calendar.DAY_OF_MONTH,-1); |
|
|
|
calendar.add(Calendar.HOUR_OF_DAY,-calendar.get(Calendar.HOUR_OF_DAY) + 1); |
|
|
|
calendar.add(Calendar.HOUR_OF_DAY,-calendar.get(Calendar.HOUR_OF_DAY) + 1); |
|
|
@ -759,7 +761,8 @@ public class ReportServiceImpl implements ReportService { |
|
|
|
// 确定查询时间范围: 年、月
|
|
|
|
// 确定查询时间范围: 年、月
|
|
|
|
Date startDate,endDate; |
|
|
|
Date startDate,endDate; |
|
|
|
Calendar calendar = Calendar.getInstance(); |
|
|
|
Calendar calendar = Calendar.getInstance(); |
|
|
|
calendar.setTime(new Date()); |
|
|
|
calendar.setTime(DateUtil.parse("2024-04-01 00:00:00",DateUtil.PATTERN_DATETIME)); |
|
|
|
|
|
|
|
//calendar.setTime(new Date());
|
|
|
|
endDate = calendar.getTime(); |
|
|
|
endDate = calendar.getTime(); |
|
|
|
calendar.add(Calendar.MONTH, -calendar.get(Calendar.MONTH)); |
|
|
|
calendar.add(Calendar.MONTH, -calendar.get(Calendar.MONTH)); |
|
|
|
calendar.add(Calendar.DATE, -calendar.get(Calendar.DATE) + 1); |
|
|
|
calendar.add(Calendar.DATE, -calendar.get(Calendar.DATE) + 1); |
|
|
@ -832,7 +835,8 @@ public class ReportServiceImpl implements ReportService { |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private String alarmData(String code) { |
|
|
|
private String alarmData(String code) { |
|
|
|
Calendar calendar = Calendar.getInstance(); |
|
|
|
Calendar calendar = Calendar.getInstance(); |
|
|
|
calendar.setTime(new Date()); |
|
|
|
calendar.setTime(DateUtil.parse("2024-04-01 00:00:00",DateUtil.PATTERN_DATETIME)); |
|
|
|
|
|
|
|
//calendar.setTime(new Date());
|
|
|
|
calendar.add(Calendar.DAY_OF_MONTH,-1); |
|
|
|
calendar.add(Calendar.DAY_OF_MONTH,-1); |
|
|
|
String end = DateUtil.format(calendar.getTime(),DateUtil.PATTERN_DATETIME); |
|
|
|
String end = DateUtil.format(calendar.getTime(),DateUtil.PATTERN_DATETIME); |
|
|
|
calendar.add(Calendar.MONTH,-1); |
|
|
|
calendar.add(Calendar.MONTH,-1); |
|
|
@ -939,7 +943,8 @@ public class ReportServiceImpl implements ReportService { |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private List<EchartVo> curve(List<AttributeVo> attributes, String deviceCode) { |
|
|
|
private List<EchartVo> curve(List<AttributeVo> attributes, String deviceCode) { |
|
|
|
Calendar calendar = Calendar.getInstance(); |
|
|
|
Calendar calendar = Calendar.getInstance(); |
|
|
|
calendar.setTime(new Date()); |
|
|
|
calendar.setTime(DateUtil.parse("2024-04-01 23:59:59",DateUtil.PATTERN_DATETIME)); |
|
|
|
|
|
|
|
//calendar.setTime(DateUtil.parse(DateUtil.format(new Date(),DateUtil.PATTERN_DATE) + " 23:59:59",DateUtil.PATTERN_DATETIME));
|
|
|
|
calendar.add(Calendar.DAY_OF_MONTH,-1); |
|
|
|
calendar.add(Calendar.DAY_OF_MONTH,-1); |
|
|
|
String end = DateUtil.format(calendar.getTime(),DateUtil.PATTERN_DATETIME); |
|
|
|
String end = DateUtil.format(calendar.getTime(),DateUtil.PATTERN_DATETIME); |
|
|
|
calendar.add(Calendar.MONTH,-1); |
|
|
|
calendar.add(Calendar.MONTH,-1); |
|
|
|