Commit 36f9f27d authored by zhoushiguang's avatar zhoushiguang

国产化修改

parent ea984a31
...@@ -71,7 +71,7 @@ public class BaseCrossInfoCache implements CommandLineRunner { ...@@ -71,7 +71,7 @@ public class BaseCrossInfoCache implements CommandLineRunner {
@Override @Override
public void run(String... args) throws Exception { public void run(String... args) throws Exception {
init(); //init();
} }
public void init() { public void init() {
......
...@@ -53,7 +53,7 @@ public class BaseCrossPhaseInfoCache implements CommandLineRunner { ...@@ -53,7 +53,7 @@ public class BaseCrossPhaseInfoCache implements CommandLineRunner {
@Override @Override
public void run(String... args) throws Exception { public void run(String... args) throws Exception {
init(); // init();
} }
public void init() { public void init() {
......
...@@ -53,7 +53,7 @@ public class CrossDirTurnPhaseCache implements CommandLineRunner { ...@@ -53,7 +53,7 @@ public class CrossDirTurnPhaseCache implements CommandLineRunner {
@Override @Override
public void run(String... args) { public void run(String... args) {
init(); // init();
} }
/** /**
......
...@@ -62,7 +62,7 @@ public class CrossRidInfoCache implements CommandLineRunner { ...@@ -62,7 +62,7 @@ public class CrossRidInfoCache implements CommandLineRunner {
@Override @Override
public void run(String... args) throws Exception { public void run(String... args) throws Exception {
init(); // init();
} }
public void init() { public void init() {
......
...@@ -26,7 +26,7 @@ public class GreenCrossDirInfoCache implements CommandLineRunner { ...@@ -26,7 +26,7 @@ public class GreenCrossDirInfoCache implements CommandLineRunner {
@Override @Override
public void run(String... args) throws Exception { public void run(String... args) throws Exception {
try { try {
init(); // init();
} catch (Exception e) { } catch (Exception e) {
log.error("缓存加载失败:", e); log.error("缓存加载失败:", e);
throw new RuntimeException(e); throw new RuntimeException(e);
......
...@@ -28,12 +28,12 @@ public class GreenWaveInfoCache implements CommandLineRunner { ...@@ -28,12 +28,12 @@ public class GreenWaveInfoCache implements CommandLineRunner {
@Override @Override
public void run(String... args) throws Exception { public void run(String... args) throws Exception {
try { try {
List<GreenwaveInfoPO> greenWaveInfoPOS = greenwaveInfoMapper.selectAll(); // List<GreenwaveInfoPO> greenWaveInfoPOS = greenwaveInfoMapper.selectAll();
if (!CollectionUtils.isEmpty(greenWaveInfoPOS)) { // if (!CollectionUtils.isEmpty(greenWaveInfoPOS)) {
for (GreenwaveInfoPO greenWaveInfoPO : greenWaveInfoPOS) { // for (GreenwaveInfoPO greenWaveInfoPO : greenWaveInfoPOS) {
greenWaveMap.put(greenWaveInfoPO.getId(), greenWaveInfoPO); // greenWaveMap.put(greenWaveInfoPO.getId(), greenWaveInfoPO);
} // }
} // }
} catch (Exception e) { } catch (Exception e) {
log.error("绿波信息初始化失败:", e); log.error("绿波信息初始化失败:", e);
throw new RuntimeException("绿波信息初始化失败!"); throw new RuntimeException("绿波信息初始化失败!");
......
...@@ -13,6 +13,7 @@ import org.springframework.scheduling.annotation.EnableScheduling; ...@@ -13,6 +13,7 @@ import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled; import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.text.ParseException; import java.text.ParseException;
...@@ -20,7 +21,7 @@ import java.text.ParseException; ...@@ -20,7 +21,7 @@ import java.text.ParseException;
@Configurable @Configurable
@EnableScheduling @EnableScheduling
@Slf4j @Slf4j
@Profile("docker") @Profile("!dev")
public class AnalysisGreenCongestionPeriodWeekTask { public class AnalysisGreenCongestionPeriodWeekTask {
@Autowired @Autowired
private AnalysisGreenCongestionPeriodService analysisGreenCongestionPeriodService; private AnalysisGreenCongestionPeriodService analysisGreenCongestionPeriodService;
...@@ -29,16 +30,25 @@ public class AnalysisGreenCongestionPeriodWeekTask { ...@@ -29,16 +30,25 @@ public class AnalysisGreenCongestionPeriodWeekTask {
EventInfoService eventInfoService; EventInfoService eventInfoService;
@Scheduled(cron = "0 30 2 ? * 1") @Scheduled(cron = "0 30 2 ? * 1")
//@PostConstruct
public void task() throws ParseException { public void task() throws ParseException {
try { try {
long st = System.currentTimeMillis();
analysisGreenCongestionPeriodService.selectCountByCongestionPeriod(); analysisGreenCongestionPeriodService.selectCountByCongestionPeriod();
long et = System.currentTimeMillis();
log.info("计算任务 selectCountByCongestionPeriod 耗时:{}ms", et - st);
} catch (Exception e) {
log.error("", e);
}
try {
long st = System.currentTimeMillis();
analysisGreenCongestionPeriodService.selectCountByLandData(); analysisGreenCongestionPeriodService.selectCountByLandData();
long et = System.currentTimeMillis();
//analysisGreenCongestionPeriodService.selectCountByCrossData(); log.info("计算任务 selectCountByLandData 耗时:{}ms", et - st);
}catch (Exception e){ } catch (Exception e) {
log.error("",e); log.error("", e);
} }
} }
...@@ -46,14 +56,18 @@ public class AnalysisGreenCongestionPeriodWeekTask { ...@@ -46,14 +56,18 @@ public class AnalysisGreenCongestionPeriodWeekTask {
public void taskDay() throws ParseException { public void taskDay() throws ParseException {
try { try {
long st = System.currentTimeMillis();
analysisGreenCongestionPeriodService.selectCountByCrossDataOneDay(); analysisGreenCongestionPeriodService.selectCountByCrossDataOneDay();
}catch (Exception e){ long et = System.currentTimeMillis();
log.error("",e); log.info("计算任务 taskDay 耗时:{}ms", et - st);
} catch (Exception e) {
log.error("", e);
} }
} }
@Scheduled(cron = "0 0 2 ? * ? ") @Scheduled(cron = "0 0 2 ? * ? ")
public void insertCrossSlowRunEventData() throws ParseException { public void insertCrossSlowRunEventData() throws ParseException {
long st = System.currentTimeMillis();
try { try {
DateTime endTDateTime = DateUtil.date(); DateTime endTDateTime = DateUtil.date();
...@@ -63,13 +77,15 @@ public class AnalysisGreenCongestionPeriodWeekTask { ...@@ -63,13 +77,15 @@ public class AnalysisGreenCongestionPeriodWeekTask {
String sdt = startTDateTime.toString("yyyy-MM-dd HH:00:00"); String sdt = startTDateTime.toString("yyyy-MM-dd HH:00:00");
//窗口截止时间 //窗口截止时间
endTDateTime = DateUtil.parseDateTime(sdt).offset(DateField.HOUR,24).offset(DateField.SECOND,-1); endTDateTime = DateUtil.parseDateTime(sdt).offset(DateField.HOUR, 24).offset(DateField.SECOND, -1);
String edt = endTDateTime.toString("yyyy-MM-dd HH:mm:ss"); String edt = endTDateTime.toString("yyyy-MM-dd HH:mm:ss");
eventInfoService.insertCrossSlowRunEventData(sdt,edt); eventInfoService.insertCrossSlowRunEventData(sdt, edt);
}catch (Exception e){ } catch (Exception e) {
log.error("",e); log.error("", e);
} }
long et = System.currentTimeMillis();
log.info("计算任务 insertCrossSlowRunEventData 耗时:{}ms", et - st);
} }
} }
...@@ -22,14 +22,14 @@ public class AnalysisProblemCrossDayTask implements ApplicationRunner { ...@@ -22,14 +22,14 @@ public class AnalysisProblemCrossDayTask implements ApplicationRunner {
@Override @Override
public void run(ApplicationArguments args) throws Exception { public void run(ApplicationArguments args) throws Exception {
log.info("服务启动时--干线协调方向频发拥堵/缓行路段--任务执行时间:" + LocalDateTime.now()); // log.info("服务启动时--干线协调方向频发拥堵/缓行路段--任务执行时间:" + LocalDateTime.now());
// 干线协调方向频发拥堵/缓行路段 // 干线协调方向频发拥堵/缓行路段
try { try {
// analysisProblemCrossDayService.insertAnalysisProblemCrossDay(); // analysisProblemCrossDayService.insertAnalysisProblemCrossDay();
} catch (Exception e) { } catch (Exception e) {
log.error("服务启动时--干线协调方向频发拥堵/缓行路段--任务执行错误" + e); log.error("服务启动时--干线协调方向频发拥堵/缓行路段--任务执行错误" + e);
} }
log.info("服务启动时--干线协调方向频发拥堵/缓行路段--任务执行结束时间:" + LocalDateTime.now()); // log.info("服务启动时--干线协调方向频发拥堵/缓行路段--任务执行结束时间:" + LocalDateTime.now());
} }
/** /**
......
...@@ -23,14 +23,14 @@ public class AnalysisProblemCrossDirHourTask implements ApplicationRunner { ...@@ -23,14 +23,14 @@ public class AnalysisProblemCrossDirHourTask implements ApplicationRunner {
@Override @Override
public void run(ApplicationArguments args) throws Exception { public void run(ApplicationArguments args) throws Exception {
log.info("服务启动时--周总体拥堵概况更新--任务执行时间:" + LocalDateTime.now()); // log.info("服务启动时--周总体拥堵概况更新--任务执行时间:" + LocalDateTime.now());
// 周总体拥堵概况更新 // 周总体拥堵概况更新
try { try {
// executeCrossOverFlowTask(); // executeCrossOverFlowTask();
}catch (Exception e){ }catch (Exception e){
log.error("服务启动时--周总体拥堵概况更新--任务执行错误" + e); log.error("服务启动时--周总体拥堵概况更新--任务执行错误" + e);
} }
log.info("服务启动时--周总体拥堵概况更新--任务执行结束时间:" + LocalDateTime.now()); // log.info("服务启动时--周总体拥堵概况更新--任务执行结束时间:" + LocalDateTime.now());
} }
/** /**
......
...@@ -18,14 +18,14 @@ public class GreenWaveWeekDataTask implements ApplicationRunner { ...@@ -18,14 +18,14 @@ public class GreenWaveWeekDataTask implements ApplicationRunner {
private GreenWaveWeekDataService greenWaveWeekDataService; private GreenWaveWeekDataService greenWaveWeekDataService;
@Override @Override
public void run(ApplicationArguments args) throws Exception { public void run(ApplicationArguments args) throws Exception {
log.info("服务启动时--周总体拥堵概况更新--任务执行时间:" + LocalDateTime.now()); // log.info("服务启动时--周总体拥堵概况更新--任务执行时间:" + LocalDateTime.now());
// 周总体拥堵概况更新 // 周总体拥堵概况更新
try { try {
// greenWaveWeekDataService.insertGreenWaveWeekData(); // greenWaveWeekDataService.insertGreenWaveWeekData();
}catch (Exception e){ }catch (Exception e){
log.error("服务启动时--周总体拥堵概况更新--任务执行错误" + e); log.error("服务启动时--周总体拥堵概况更新--任务执行错误" + e);
} }
log.info("服务启动时--周总体拥堵概况更新--任务执行结束时间:" + LocalDateTime.now()); // log.info("服务启动时--周总体拥堵概况更新--任务执行结束时间:" + LocalDateTime.now());
} }
/** /**
......
...@@ -243,6 +243,25 @@ public class ReportGreenAndCrossOptimizeStatisticTask { ...@@ -243,6 +243,25 @@ public class ReportGreenAndCrossOptimizeStatisticTask {
//==========================================================================================================// //==========================================================================================================//
List<AnalysisReportCrossOptimizeDetail> optimizeList = new ArrayList<>(); List<AnalysisReportCrossOptimizeDetail> optimizeList = new ArrayList<>();
this.saveOptimizeInfo(optimizeList, list, startDate);
//==========================================================================================================//
if (!optimizeList.isEmpty()) {
analysisReportCrossOptimizeDetailMapper.insertBatch(optimizeList);
}
long et = System.currentTimeMillis();
log.info("计算路口周报-路口优化计算总耗时:{}ms,size:{}, starDate:{}", et - st, optimizeList.size(), startDate);
}
} catch (Exception e) {
log.error("计算路口周报-路口优化计算出现异常", e);
}
}
private void saveOptimizeInfo(List<AnalysisReportCrossOptimizeDetail> optimizeList, List<StrategyCrossResultEntity> list, String startDate) {
long et1 = System.currentTimeMillis();
Map<String, List<StrategyCrossResultEntity>> groupByCross = list.stream().collect(Collectors.groupingBy(o -> o.getCrossId() + "_" + o.getCurrentAlgo())); Map<String, List<StrategyCrossResultEntity>> groupByCross = list.stream().collect(Collectors.groupingBy(o -> o.getCrossId() + "_" + o.getCurrentAlgo()));
for (Map.Entry<String, List<StrategyCrossResultEntity>> entry : groupByCross.entrySet()) { for (Map.Entry<String, List<StrategyCrossResultEntity>> entry : groupByCross.entrySet()) {
String[] sps = entry.getKey().split("_"); String[] sps = entry.getKey().split("_");
...@@ -350,7 +369,7 @@ public class ReportGreenAndCrossOptimizeStatisticTask { ...@@ -350,7 +369,7 @@ public class ReportGreenAndCrossOptimizeStatisticTask {
//===========================================================================// //===========================================================================//
AiOptimizeStatistic param = new AiOptimizeStatistic(); AiOptimizeStatistic param = new AiOptimizeStatistic();
param.setCrossId(crossId); param.setCrossId(crossId);
param.setStatisticTime(Integer.valueOf( DateUtil.formatDate(lastWeekDateStartTime.toDate(), "yyyyMMdd"))); param.setStatisticTime(Integer.valueOf(DateUtil.formatDate(lastWeekDateStartTime.toDate(), "yyyyMMdd")));
param.setStrategy(Integer.valueOf(strategy)); param.setStrategy(Integer.valueOf(strategy));
List<AiOptimizeStatistic> lastOptList = aiOptimizeStatisticMapper.findAiOptimizeStatisticByCondition(param); List<AiOptimizeStatistic> lastOptList = aiOptimizeStatisticMapper.findAiOptimizeStatisticByCondition(param);
if (!lastOptList.isEmpty()) { if (!lastOptList.isEmpty()) {
...@@ -367,20 +386,6 @@ public class ReportGreenAndCrossOptimizeStatisticTask { ...@@ -367,20 +386,6 @@ public class ReportGreenAndCrossOptimizeStatisticTask {
log.info("计算路口周报-路口优分批入库耗时:{}ms,size:{} ,starDate:{}", System.currentTimeMillis() - et1, optimizeList.size(), startDate); log.info("计算路口周报-路口优分批入库耗时:{}ms,size:{} ,starDate:{}", System.currentTimeMillis() - et1, optimizeList.size(), startDate);
} }
} }
//==========================================================================================================//
if (!optimizeList.isEmpty()) {
analysisReportCrossOptimizeDetailMapper.insertBatch(optimizeList);
}
long et = System.currentTimeMillis();
log.info("计算路口周报-路口优化计算总耗时:{}ms,size:{}, starDate:{}", et - st, optimizeList.size(), startDate);
}
} catch (Exception e) {
log.error("计算路口周报-路口优化计算出现异常", e);
}
} }
......
...@@ -2,14 +2,18 @@ spring: ...@@ -2,14 +2,18 @@ spring:
cloud: cloud:
nacos: nacos:
config: config:
server-addr: 37.12.182.29:8848 server-addr: 37.8.219.227:28848
file-extension: yaml file-extension: yaml
group: signal group: signal
namespace: signal namespace: signal
username: nacos username: nacos
password: nacos password: Nacos@2025
application: application:
# dubbo启动需要程序名称 # dubbo启动需要程序名称
name: signal-optimize-data-compute name: signal-optimize-data-compute
main: main:
allow-circular-references: true allow-circular-references: true
inforsuite:
license-path: d:/data/license
\ No newline at end of file
...@@ -459,7 +459,7 @@ ...@@ -459,7 +459,7 @@
cross_id, cross_id,
concat( '[', STRING_AGG(dir_type||'',','), ']' ) as dir, concat( '[', STRING_AGG(dir_type||'',','), ']' ) as dir,
start_time, start_time,
DATE_ADD( start_time, INTERVAL 5 MINUTE ) AS end_time, DATE_ADD( start_time, INTERVAL '5 MINUTE' ) AS end_time,
dt, dt,
now() now()
FROM FROM
...@@ -469,7 +469,8 @@ ...@@ -469,7 +469,8 @@
AND `status` = 2 AND `status` = 2
GROUP BY GROUP BY
cross_id, cross_id,
start_time start_time,
dt
HAVING HAVING
count(*)>=2 count(*)>=2
ON CONFLICT (cross_id,dir,start_time) ON CONFLICT (cross_id,dir,start_time)
......
...@@ -23,8 +23,9 @@ ...@@ -23,8 +23,9 @@
</resultMap> </resultMap>
<select id="selectGreenDataHist" parameterType="String" resultMap="AnalysisGreenCongestionPeriodMap"> <select id="selectGreenDataHist" parameterType="String" resultMap="AnalysisGreenCongestionPeriodMap">
SELECT a.green_id,a.road_direction,a.start_time,a.status FROM t_greenwave_hist a SELECT a.green_id,a.road_direction,a.start_time,a.status
where a.start_time between TO_TIMESTAMP(#{date},'YYYY-MM-DD 00:00:00') and TO_TIMESTAMP(#{date},'YYYY-MM-DD 23:59:59') FROM t_greenwave_hist a
where a.start_time between (TO_TIMESTAMP(#{date},'YYYY-MM-DD 00:00:00'))::TIMESTAMP and (DATE_TRUNC('day',#{date}::date) + INTERVAL '1 DAY' - INTERVAL '1 SECOND' )::TIMESTAMP
and a.green_id is not null and a.green_id is not null
order by a.green_id,a.road_direction,a.start_time order by a.green_id,a.road_direction,a.start_time
</select> </select>
...@@ -36,7 +37,7 @@ ...@@ -36,7 +37,7 @@
<insert id="insertGreenCongestionPeriodData" parameterType="map"> <insert id="insertGreenCongestionPeriodData" parameterType="map">
insert into t_analysis_green_wave_congest_time_span (green_id,road_direction,week_day,congest_start_time,congest_end_time,congest_index,status,travel_time,speed,peak_type,year_week,week_start_time,week_end_time,insert_time) insert into t_analysis_green_wave_congest_time_span (green_id,road_direction,week_day,congest_start_time,congest_end_time,congest_index,status,travel_time,speed,peak_type,year_week,week_start_time,week_end_time,insert_time)
SELECT a.green_id,a.road_direction,#{weekDay} as week_day, TO_TIMESTAMP(#{startTime},'YYYY-MM-DD HH24:MI:SS') as congest_start_time,TO_TIMESTAMP(DATE_ADD(#{endTime},INTERVAL 5 MINUTE),'YYYY-MM-DD HH24:MI:SS') as congest_end_time,AVG(traffic_index),#{status} as status,CEIL(AVG(trval_time)),AVG(speed), SELECT a.green_id,a.road_direction,#{weekDay} as week_day, TO_TIMESTAMP(#{startTime},'YYYY-MM-DD HH24:MI:SS') as congest_start_time,TO_TIMESTAMP(DATE_ADD(#{endTime},INTERVAL '5 MINUTE'),'YYYY-MM-DD HH24:MI:SS') as congest_end_time,AVG(traffic_index),#{status} as status,CEIL(AVG(trval_time)),AVG(speed),
#{peakType} as peak_type,#{weekNumber} as year_week,TO_TIMESTAMP(#{weekStartTime},'YYYY-MM-DD') as week_start_time,TO_TIMESTAMP(#{weekEndTime},'YYYY-MM-DD') as week_end_time,now() #{peakType} as peak_type,#{weekNumber} as year_week,TO_TIMESTAMP(#{weekStartTime},'YYYY-MM-DD') as week_start_time,TO_TIMESTAMP(#{weekEndTime},'YYYY-MM-DD') as week_end_time,now()
FROM t_greenwave_hist a FROM t_greenwave_hist a
where a.start_time between TO_TIMESTAMP(#{startTime},'YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP(#{endTime},'YYYY-MM-DD HH24:MI:SS') where a.start_time between TO_TIMESTAMP(#{startTime},'YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP(#{endTime},'YYYY-MM-DD HH24:MI:SS')
...@@ -71,7 +72,7 @@ ...@@ -71,7 +72,7 @@
where t1.key_cross_id is not null and t.type = 2) t3 on t2.id = t3.id where t1.key_cross_id is not null and t.type = 2) t3 on t2.id = t3.id
where t3.key_cross_id is not null and dt = CAST(#{date} AS INT4) ) t4 where t3.key_cross_id is not null and dt = CAST(#{date} AS INT4) ) t4
where t4.cross_id = #{crossId} where t4.cross_id = #{crossId}
and t4.start_time between TO_TIMESTAMP(DATE_SUB(#{startTime},INTERVAL '10 MINUTE'),'YYYY-MM-DD HH24:MI:00') and TO_TIMESTAMP(#{endTime},'YYYY-MM-DD HH24:MI:SS') and t4.start_time between DATE_SUB(#{startTime},INTERVAL '10 MINUTE') and TO_TIMESTAMP(#{endTime},'YYYY-MM-DD HH24:MI:SS')
group by t4.cross_id,t4.start_time group by t4.cross_id,t4.start_time
</select> </select>
...@@ -84,7 +85,7 @@ ...@@ -84,7 +85,7 @@
#{avgFlow} as flow,#{maxFlow} as max_flow,#{peakType} as peak_type,#{weekNumber} as year_week,TO_TIMESTAMP(#{weekStartTime},'YYYY-MM-DD') as week_start_time, #{avgFlow} as flow,#{maxFlow} as max_flow,#{peakType} as peak_type,#{weekNumber} as year_week,TO_TIMESTAMP(#{weekStartTime},'YYYY-MM-DD') as week_start_time,
TO_TIMESTAMP(#{weekEndTime},'YYYY-MM-DD') as week_end_time,now(),#{trafficThreshold} as traffic_threshold TO_TIMESTAMP(#{weekEndTime},'YYYY-MM-DD') as week_end_time,now(),#{trafficThreshold} as traffic_threshold
from t_greenwave_hist a from t_greenwave_hist a
where TO_TIMESTAMP(a.start_time,'YYYY-MM-DD HH24:MI:00') between TO_TIMESTAMP(#{startTime},'YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP(DATE_SUB(#{endTime},INTERVAL '5 MINUTE'),'YYYY-MM-DD HH24:MI:SS') where a.start_time between TO_TIMESTAMP(#{startTime},'YYYY-MM-DD HH24:MI:SS') and DATE_SUB(#{endTime},INTERVAL '5 MINUTE')
and CAST(a.green_id AS VARCHAR) = #{greenId} and CAST(a.green_id AS VARCHAR) = #{greenId}
and a.road_direction = #{roadDirection} and a.road_direction = #{roadDirection}
</insert> </insert>
...@@ -93,7 +94,7 @@ ...@@ -93,7 +94,7 @@
select t.green_id,t1.key_cross_id as cross_id, t.road_direction,t.peak_start_time as start_time,t.peak_end_time as endTime ,t.traffic_index,t.peak_type select t.green_id,t1.key_cross_id as cross_id, t.road_direction,t.peak_start_time as start_time,t.peak_end_time as endTime ,t.traffic_index,t.peak_type
from t_analysis_green_wave_peak_detail t from t_analysis_green_wave_peak_detail t
left join t_greenwave_key_cross_lane t1 on t1.green_id = t.green_id left join t_greenwave_key_cross_lane t1 on t1.green_id = t.green_id
where t.peak_start_time BETWEEN TO_TIMESTAMP(#{date},'YYYY-MM-DD 00:00:00') and TO_TIMESTAMP(#{date},'YYYY-MM-DD 23:59:59') where t.peak_start_time BETWEEN TO_TIMESTAMP(#{date}||' 00:00:00','YYYY-MM-DD HH24:MI:SS') and TO_TIMESTAMP(#{date}||' 23:59:59','YYYY-MM-DD HH24:MI:SS')
order by t.green_id,t1.key_cross_id ,t.road_direction,t.peak_type,t.traffic_index desc order by t.green_id,t1.key_cross_id ,t.road_direction,t.peak_type,t.traffic_index desc
</select> </select>
...@@ -107,7 +108,7 @@ ...@@ -107,7 +108,7 @@
<select id="selectCrossTrafficThreshold" parameterType="String" resultMap="AnalysisLaneDataHistMap"> <select id="selectCrossTrafficThreshold" parameterType="String" resultMap="AnalysisLaneDataHistMap">
select t.cross_id,t.traffic_index select t.cross_id,t.traffic_index
from t_cross_data_hist t from t_cross_data_hist t
where t.start_time BETWEEN TO_TIMESTAMP(#{date},'YYYY-MM-DD 09:00:00') and TO_TIMESTAMP(#{date},'YYYY-MM-DD 16:30:10') where t.start_time BETWEEN TO_TIMESTAMP(#{date}||'090000','YYYYMMDDHH24MISS') and TO_TIMESTAMP(#{date}||'163010','YYYYMMDDHH24MISS')
and t.cross_id = #{crossId} and t.cross_id = #{crossId}
order by t.traffic_index desc order by t.traffic_index desc
</select> </select>
...@@ -131,8 +132,22 @@ ...@@ -131,8 +132,22 @@
#{weekNumber} as year_week,TO_TIMESTAMP(#{weekStartTime},'YYYY-MM-DD') as week_start_time, #{weekNumber} as year_week,TO_TIMESTAMP(#{weekStartTime},'YYYY-MM-DD') as week_start_time,
TO_TIMESTAMP(#{weekEndTime},'YYYY-MM-DD') as week_end_time,now() TO_TIMESTAMP(#{weekEndTime},'YYYY-MM-DD') as week_end_time,now()
from t_cross_data_hist a from t_cross_data_hist a
where TO_TIMESTAMP(a.start_time,'YYYY-MM-DD HH24:MI:00') between TO_TIMESTAMP(#{startTime},'YYYY-MM-DD HH24:MI:00') and TO_TIMESTAMP(DATE_SUB(#{endTime},INTERVAL 5 MINUTE),'YYYY-MM-DD HH24:MI:SS') where a.start_time between TO_TIMESTAMP(#{startTime},'YYYY-MM-DD HH24:MI:00') and DATE_SUB(#{endTime},INTERVAL '5 MINUTE')
and a.cross_id = #{crossId} and a.cross_id = #{crossId}
ON CONFLICT ("year_week", "cross_id", "peak_start_time", "week_day", "day_type", "peak_type")
DO UPDATE SET
peak_end_time=excluded.peak_end_time ,
day_total_flow=excluded.day_total_flow ,
day_max_hour_flow=excluded.day_max_hour_flow ,
peak_max_hour_flow=excluded.peak_max_hour_flow ,
peak_traffic_index=excluded.peak_traffic_index ,
peak_capacity=excluded.peak_capacity ,
peak_avg_deay_time=excluded.peak_avg_deay_time ,
peak_max_queue_length=excluded.peak_max_queue_length ,
peak_avg_stop_times=excluded.peak_avg_stop_times ,
week_start_time=excluded.week_start_time ,
week_end_time=excluded.week_end_time ,
insert_time=excluded.insert_time
</insert> </insert>
<insert id="insertCrossDataHistByDay" parameterType="map"> <insert id="insertCrossDataHistByDay" parameterType="map">
...@@ -146,8 +161,22 @@ ...@@ -146,8 +161,22 @@
#{weekNumber} as year_week,TO_TIMESTAMP(#{weekStartTime},'YYYY-MM-DD') as week_start_time, #{weekNumber} as year_week,TO_TIMESTAMP(#{weekStartTime},'YYYY-MM-DD') as week_start_time,
TO_TIMESTAMP(#{weekEndTime},'YYYY-MM-DD') as week_end_time,now(),#{maxFlow},sum(flow),AVG(speed) TO_TIMESTAMP(#{weekEndTime},'YYYY-MM-DD') as week_end_time,now(),#{maxFlow},sum(flow),AVG(speed)
from t_cross_data_hist a from t_cross_data_hist a
where TO_TIMESTAMP(a.start_time,'YYYY-MM-DD HH24:MI:00') between TO_TIMESTAMP(#{startTime},'YYYY-MM-DD HH24:MI:00') and TO_TIMESTAMP(DATE_SUB(#{endTime},INTERVAL 5 MINUTE),'YYYY-MM-DD HH24:MI:SS') where a.start_time between TO_TIMESTAMP(#{startTime},'YYYY-MM-DD HH24:MI:00') and DATE_SUB(#{endTime},INTERVAL '5 MINUTE')
and a.cross_id = #{crossId} and a.cross_id = #{crossId}
ON CONFLICT ("year_week", "cross_id", "peak_start_time", "week_day", "day_type", "peak_type")
DO UPDATE SET
peak_end_time=excluded.peak_end_time ,
day_total_flow=excluded.day_total_flow ,
day_max_hour_flow=excluded.day_max_hour_flow ,
peak_max_hour_flow=excluded.peak_max_hour_flow ,
peak_traffic_index=excluded.peak_traffic_index ,
peak_capacity=excluded.peak_capacity ,
peak_avg_deay_time=excluded.peak_avg_deay_time ,
peak_max_queue_length=excluded.peak_max_queue_length ,
peak_avg_stop_times=excluded.peak_avg_stop_times ,
week_start_time=excluded.week_start_time ,
week_end_time=excluded.week_end_time ,
insert_time=excluded.insert_time
</insert> </insert>
<select id="selectCrossPeakDetail" parameterType="String" resultMap="AnalysisLaneDataHistMap"> <select id="selectCrossPeakDetail" parameterType="String" resultMap="AnalysisLaneDataHistMap">
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
and a.dt >= CAST(#{dtStart} AS INT4) and a.dt &lt;= CAST(#{dtEnd} AS INT4) and a.dt >= CAST(#{dtStart} AS INT4) and a.dt &lt;= CAST(#{dtEnd} AS INT4)
</when> </when>
<otherwise> <otherwise>
and a.dt = CAST(TO_CHAR(DATE_sub(now(), INTERVAL 24 HOUR ), 'YYYYMMDD') AS INT4) and a.dt = CAST(TO_CHAR(DATE_sub(now(), INTERVAL '24 HOUR' ), 'YYYYMMDD') AS INT4)
</otherwise> </otherwise>
</choose> </choose>
and a.type in ('701', '702', '703', '707') and a.type in ('701', '702', '703', '707')
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
and a.dt >= CAST(#{dtStart} AS INT4) and a.dt &lt;= CAST(#{dtEnd} AS INT4) and a.dt >= CAST(#{dtStart} AS INT4) and a.dt &lt;= CAST(#{dtEnd} AS INT4)
</when> </when>
<otherwise> <otherwise>
and a.dt = CASE(TO_CHAR((DATE_sub(now(), INTERVAL 24 HOUR ), 'YYYYMMDD') AS INT4) and a.dt = CAST(TO_CHAR(DATE_sub(now(), INTERVAL '24 HOUR' ), 'YYYYMMDD') AS INT4)
</otherwise> </otherwise>
</choose> </choose>
and a.type in ('705','706') and a.type in ('705','706')
...@@ -70,11 +70,11 @@ ...@@ -70,11 +70,11 @@
from t_strategy_green_opt_hist a from t_strategy_green_opt_hist a
where a.control_time = (select MAX(control_time) where a.control_time = (select MAX(control_time)
from t_strategy_green_opt_hist from t_strategy_green_opt_hist
where green_id = #{greenID} where green_id = CAST(#{greenID} AS VARCHAR)
and control_time <![CDATA[ >= ]]> DATE_FORMAT(DATE_sub(#{time}, INTERVAL control_duration SECOND), 'YYYY-MM-DD HH24:MI:SS') and control_time <![CDATA[ >= ]]> DATE_sub(TO_TIMESTAMP(#{time}, 'YYYY-MM-DD HH24:MI:SS'), INTERVAL 1800 SECOND)
and control_time <![CDATA[ <= ]]> TO_TIMESTAMP(#{time}, 'YYYY-MM-DD HH24:MI:SS') and control_time <![CDATA[ <= ]]> TO_TIMESTAMP(#{time}, 'YYYY-MM-DD HH24:MI:SS')
and response_code = 200) and response_code = 200)
and a.green_id = #{greenID} and a.green_id = CAST(#{greenID} AS VARCHAR)
</select> </select>
<select id="getCrossStrategy" parameterType="String" resultMap="AnalysisProblemAndStrategyDayMap"> <select id="getCrossStrategy" parameterType="String" resultMap="AnalysisProblemAndStrategyDayMap">
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
from t_strategy_cross_result a from t_strategy_cross_result a
where a.event_id = #{eventSerialNumber} where a.event_id = #{eventSerialNumber}
and response_code = 200 and response_code = 200
and dt = CAST(TO_CHAR(#{time}, 'YYYYMMDD') AS INT4) and dt = CAST(TO_CHAR(to_timestamp(#{time},'YYYY-MM-DD HH24:00:00'), 'YYYYMMDD') AS INT4)
and a.cross_id = #{crossID} and a.cross_id = #{crossID}
</select> </select>
......
...@@ -230,22 +230,24 @@ ...@@ -230,22 +230,24 @@
TO_CHAR(a.start_time,'HH24:MI:SS'), TO_CHAR(a.start_time,'HH24:MI:SS'),
'~', '~',
CONCAT(TO_CHAR(a.end_time,'HH24:MI:SS')) CONCAT(TO_CHAR(a.end_time,'HH24:MI:SS'))
) )::text
ORDER BY extract(epoch from (a.end_time - a.start_time)) desc ,',' ORDER BY extract(epoch from (a.end_time - a.start_time)) desc
) )
,',',1) as serious_time_span, ,',',1) as serious_time_span,
max(extract(epoch from (a.end_time - a.start_time)) as serious_duration,
max(extract(epoch from (a.end_time - a.start_time))) as serious_duration,
STRING_AGG(CONCAT( STRING_AGG(CONCAT(
TO_CHAR(a.start_time,'HH24:MI:SS'), TO_CHAR(a.start_time,'HH24:MI:SS'),
'~', '~',
CONCAT(TO_CHAR(a.end_time,'HH24:MI:SS')) CONCAT(TO_CHAR(a.end_time,'HH24:MI:SS'))
) )::text
) time_span_list, ) time_span_list,
(EXTRACT(ISODOW FROM start_time)+1) week_day, (EXTRACT(ISODOW FROM start_time)+1) week_day,
concat(TO_CHAR(start_time,'YYYY'),'',(EXTRACT(WEEKS FROM start_time::date)+1)) year_week concat(TO_CHAR(start_time,'YYYY'),'',(EXTRACT(WEEKS FROM start_time::date)+1))::INTEGER year_week
from t_event_info a from t_event_info a
left join t_base_cross_info b on a.cross_id = b.id left join t_base_cross_info b on a.cross_id = b.id
where dt = CAST(TO_CHAR(DATE_SUB(now(),INTERVAL 1 DAY),'YYYYMMDD') AS INT4) and a.type in ('701','702','703','707') where dt = CAST(TO_CHAR(DATE_SUB(now(),INTERVAL '1 DAY'),'YYYYMMDD') AS INT4) and a.type in ('701','702','703','707')
group by a.cross_id, b.area_id,a.category,a.type group by a.cross_id, b.area_id,a.category,a.type
ON CONFLICT (cross_id,event_type,dt) ON CONFLICT (cross_id,event_type,dt)
...@@ -289,25 +291,28 @@ ...@@ -289,25 +291,28 @@
TO_CHAR(a.start_time,'HH24:MI:SS'), TO_CHAR(a.start_time,'HH24:MI:SS'),
'~', '~',
CONCAT(TO_CHAR(a.end_time,'HH24:MI:SS')) CONCAT(TO_CHAR(a.end_time,'HH24:MI:SS'))
), )::text
',' ORDER BY extract(epoch from (a.end_time - a.start_time)) desc ,',' ORDER BY extract(epoch from (a.end_time - a.start_time)) desc
) )
,',',1) as serious_time_span, ,',',1) as serious_time_span,
max( extract(epoch from (a.end_time - a.start_time))) as serious_duration, max( extract(epoch from (a.end_time - a.start_time))) as serious_duration,
STRING_AGG(CONCAT( STRING_AGG(CONCAT(
TO_CHAR(a.start_time,'HH24:MI:SS'), TO_CHAR(a.start_time,'HH24:MI:SS'),
'~', '~',
CONCAT(TO_CHAR(a.end_time,'HH24:MI:SS')) CONCAT(TO_CHAR(a.end_time,'HH24:MI:SS'))
),',' )::text
,','
) time_span_list, ) time_span_list,
(EXTRACT(ISODOW FROM start_time)+1) week_day, (EXTRACT(ISODOW FROM start_time)+1) week_day,
concat(TO_CHAR(start_time,'YYYY'),'',(EXTRACT(WEEKS FROM start_time::date)+1)) year_week concat(TO_CHAR(start_time,'YYYY'),'',(EXTRACT(WEEKS FROM start_time::date)+1))::INTEGER year_week
from ( from (
<!-- 路口缓行计算 --> <!-- 路口缓行计算 -->
SELECT SELECT
cross_id, cross_id,
start_time, start_time,
DATE_ADD( start_time, INTERVAL 5 MINUTE ) AS end_time, DATE_ADD( start_time, INTERVAL '5 MINUTE' ) AS end_time,
dt, dt,
'4' AS category, '4' AS category,
'708' AS type '708' AS type
...@@ -350,10 +355,10 @@ ...@@ -350,10 +355,10 @@
e.area_id, e.area_id,
d.category, d.category,
d.type, d.type,
d.dir, cast(d.dir as int),
count(1) as event_number , count(1) as event_number ,
sum( extract(epoch from (d.end_time - d.start_time) ) as duration , sum( extract(epoch from (d.end_time - d.start_time)) ) as duration ,
TO_TIMESTAMP(CAST(DATE_SUB(now(),INTERVAL 1 HOUR) AS VARCHAR),'YYYY-MM-DD HH24:00:00') as dh1, TO_TIMESTAMP(CAST(DATE_SUB(now(),INTERVAL '1 HOUR') AS VARCHAR),'YYYY-MM-DD HH24:00:00') as dh1,
TO_TIMESTAMP(CAST(now() AS VARCHAR),'YYYY-MM-DD HH24:00:00') as dh2, TO_TIMESTAMP(CAST(now() AS VARCHAR),'YYYY-MM-DD HH24:00:00') as dh2,
CAST(TO_CHAR(now(),'YYYYMMDD') AS INT4) as dt , CAST(TO_CHAR(now(),'YYYYMMDD') AS INT4) as dt ,
now() now()
...@@ -363,7 +368,7 @@ ...@@ -363,7 +368,7 @@
from from
(select a.cross_id,a.category,a.type,a.start_time,a.end_time,SUBSTR(a.dir,2,LENGTH(a.dir)-2) as dir (select a.cross_id,a.category,a.type,a.start_time,a.end_time,SUBSTR(a.dir,2,LENGTH(a.dir)-2) as dir
from t_event_info a from t_event_info a
where a.start_time >= TO_TIMESTAMP(CAST(DATE_SUB(now(),INTERVAL 1 HOUR) AS VARCHAR),'YYYY-MM-DD HH24:00:00') where a.start_time >= TO_TIMESTAMP(CAST(DATE_SUB(now(),INTERVAL '1 HOUR') AS VARCHAR),'YYYY-MM-DD HH24:00:00')
and a.start_time <![CDATA[ < ]]> TO_TIMESTAMP(CAST(now() AS VARCHAR),'YYYY-MM-DD HH24:00:00') and a.start_time <![CDATA[ < ]]> TO_TIMESTAMP(CAST(now() AS VARCHAR),'YYYY-MM-DD HH24:00:00')
and a.type in ('701','702','703','707') and a.type in ('701','702','703','707')
and a.dir is not null and a.dir is not null
...@@ -509,12 +514,12 @@ ...@@ -509,12 +514,12 @@
b.out_dir, b.out_dir,
c.name, c.name,
b.green_id, b.green_id,
DATE_SUB(CURDATE_DATE, INTERVAL 1 DAY) as startTime, DATE_SUB(CURRENT_DATE, INTERVAL 1 DAY) as startTime,
DATE_SUB(CURDATE_DATE, INTERVAL 1 SECOND) as endTime DATE_SUB(CURRENT_DATE, INTERVAL 1 SECOND) as endTime
FROM FROM
( SELECT count(*) AS dir_count, cross_id, dir_type, status FROM t_cross_dir_data_hist ( SELECT count(*) AS dir_count, cross_id, dir_type, status FROM t_cross_dir_data_hist
WHERE WHERE
start_time BETWEEN DATE_SUB(CURDATE_DATE, INTERVAL '1 DAY') AND DATE_SUB(CURDATE_DATE, INTERVAL '1 SECOND') start_time BETWEEN DATE_SUB(CURRENT_DATE, INTERVAL '1 DAY') AND DATE_SUB(CURRENT_DATE, INTERVAL '1 SECOND')
GROUP BY cross_id, dir_type, status ) a GROUP BY cross_id, dir_type, status ) a
LEFT JOIN t_greenwave_cross b ON a.cross_id = b.cross_id LEFT JOIN t_greenwave_cross b ON a.cross_id = b.cross_id
LEFT JOIN t_base_cross_info c ON a.cross_id = c.id LEFT JOIN t_base_cross_info c ON a.cross_id = c.id
......
...@@ -167,12 +167,12 @@ ...@@ -167,12 +167,12 @@
<!-- 新增表t_analysis_problem_green_day信息 --> <!-- 新增表t_analysis_problem_green_day信息 -->
<insert id="insertAnalysisProblemGreenDay"> <insert id="insertAnalysisProblemGreenDay">
insert into t_analysis_problem_green_day (id,green_id,area_id,event_category,event_type,event_number,event_total_time,dt,insert_time) insert into t_analysis_problem_green_day (id,green_id,area_id,event_category,event_type,event_number,event_total_time,dt,insert_time)
select uuid_generate_v4(), a.green_id, b.area_id,a.category,a.type,count(1) as event_number , select uuid_generate_v4(), cast(a.green_id as int), b.area_id,a.category,a.type,count(1) as event_number ,
sum( extract(epoch from (a.end_time - a.start_time)) ) as duration , sum( extract(epoch from (a.end_time - a.start_time)) ) as duration ,
dt , now() dt , now()
from t_event_info a from t_event_info a
left join t_greenwave_info b on a.green_id = b.id left join t_greenwave_info b on cast(a.green_id as int) = b.id
where dt = CAST(TO_CHAR(DATE_SUB(now(),INTERVAL 1 DAY),'YYYYMMDD') AS INT4) and a.type in ('705','706') and a.green_id != '' where dt = CAST(TO_CHAR(DATE_SUB(now(),INTERVAL '1 DAY'),'YYYYMMDD') AS INT4) and a.type in ('705','706') and a.green_id != ''
group by a.green_id, b.area_id,a.category,a.type group by a.green_id, b.area_id,a.category,a.type
ON CONFLICT (green_id,event_type,dt) ON CONFLICT (green_id,event_type,dt)
DO UPDATE SET DO UPDATE SET
...@@ -188,35 +188,66 @@ ...@@ -188,35 +188,66 @@
<!-- 新增表t_analysis_problem_green_hour信息 --> <!-- 新增表t_analysis_problem_green_hour信息 -->
<insert id="insertAnalysisProblemGreenHour"> <insert id="insertAnalysisProblemGreenHour">
insert into t_analysis_problem_green_hour (id,green_id,area_id,event_category,event_type,dir,event_number,event_total_time,window_start_time,window_end_time,dt,insert_time) INSERT INTO t_analysis_problem_green_hour ( ID, green_id, area_id, event_category, event_type, dir, event_number, event_total_time, window_start_time, window_end_time, dt, insert_time )
select uuid_generate_v4(), d.green_id, e.area_id,d.category,d.type,d.dir,count(1) as event_number , sum( TIMESTAMPDIFF(SECOND, d.start_time , d.end_time) ) as duration , SELECT
TO_CHAR(DATE_SUB(now(),INTERVAL 1 HOUR),'YYYY-MM-DD HH24:00:00') as dh1, TO_CHAR(now(),'YYYY-MM-DD HH24:00:00') as dh2, uuid_generate_v4 ( ),
TO_CHAR(now(),'YYYYMMDD') as dt , now() d.green_id,
from e.area_id,
(select DISTINCT b.green_id,b.category,b.type,b.start_time,b.end_time, unnest(string_to_array(dir, ',')) AS dir d.category,
from d.TYPE,
(select a.green_id,a.category,a.type,a.start_time,a.end_time,SUBSTR(a.dir,2,LENGTH(a.dir)-2) as dir cast(d.dir as int),
from t_event_info a COUNT ( 1 ) AS event_number,
where a.start_time >= TO_TIMESTAMP(CAST(DATE_SUB(now(),INTERVAL 1 HOUR) AS VARCHAR),'YYYY-MM-DD HH24:00:00') SUM(EXTRACT(EPOCH FROM (d.end_time - d.start_time)))::INTEGER AS duration,
and a.start_time <![CDATA[ < ]]> TO_TIMESTAMP(CAST(now() AS VARCHAR),'YYYY-MM-DD HH24:00:00') TO_CHAR( DATE_SUB ( now( ), INTERVAL '1 HOUR' ), 'YYYY-MM-DD HH24:00:00' )::TIMESTAMP AS dh1,
and a.type in ('705','706') and a.green_id != '' TO_CHAR( now( ), 'YYYY-MM-DD HH24:00:00' )::TIMESTAMP AS dh2,
and a.dir is not null TO_CHAR( now( ), 'YYYYMMDD' )::INTEGER AS dt,
and length(a.dir)>2 now( )
FROM
(
SELECT DISTINCT
cast(b.green_id as int),
b.category,
b.TYPE,
b.start_time,
b.end_time,
UNNEST ( string_to_array( dir, ',' ) ) AS dir
FROM
(
SELECT
A.green_id,
A.category,
A.TYPE,
A.start_time,
A.end_time,
SUBSTR( A.dir, 2, LENGTH ( A.dir ) - 2 ) AS dir
FROM
t_event_info A
WHERE
A.start_time >= TO_TIMESTAMP( CAST ( DATE_SUB ( now( ), INTERVAL '1 HOUR' ) AS VARCHAR ), 'YYYY-MM-DD HH24:00:00' )
AND A.start_time &lt; TO_TIMESTAMP( CAST ( now( ) AS VARCHAR ), 'YYYY-MM-DD HH24:00:00' )
AND A.TYPE IN ( '705', '706' )
AND A.green_id != ''
AND A.dir IS NOT NULL
AND LENGTH ( A.dir ) > 2
) b ) b
) d ) d
left join t_greenwave_info e on d.green_id = e.id LEFT JOIN t_greenwave_info e ON d.green_id = e.ID
group by d.green_id, e.area_id,d.category,d.type,d.dir GROUP BY
ON CONFLICT (dir,green_id,dt,event_type,window_start_time) d.green_id,
DO UPDATE SET e.area_id,
id=excluded.id, d.category,
area_id=excluded.area_id, d.TYPE,
event_category=excluded.event_category, d.dir
dir=excluded.dir, ON CONFLICT ( dir, green_id, dt, event_type, window_start_time ) DO
event_number=excluded.event_number, UPDATE
event_total_time=excluded.event_total_time, SET ID = excluded.ID,
window_end_time=excluded.window_end_time, area_id = excluded.area_id,
insert_time=excluded.insert_time event_category = excluded.event_category,
; dir = excluded.dir,
event_number = excluded.event_number,
event_total_time = excluded.event_total_time,
window_end_time = excluded.window_end_time,
insert_time = excluded.insert_time;
</insert> </insert>
<!-- 根据条件查询表t_analysis_problem_green_day信息 --> <!-- 根据条件查询表t_analysis_problem_green_day信息 -->
......
...@@ -171,7 +171,7 @@ ...@@ -171,7 +171,7 @@
<include refid="AnalysisGreenWaveOptimizeWeekByCondition" /> <include refid="AnalysisGreenWaveOptimizeWeekByCondition" />
</select> </select>
<select id="getTotalityData" <select id="getTotalityData"
resultType="net.wanji.opt.controllerv2.report.vo.GreenWaveOptimizeAnalysisDataDTO"> resultType="net.wanji.opt.vo2.report.GreenWaveOptimizeAnalysisDataDTO">
SELECT SELECT
COALESCE(sum( optimize_count ),0) AS optimize_count, COALESCE(sum( optimize_count ),0) AS optimize_count,
COALESCE(sum( optimize_duration ),0) AS optimize_duration, COALESCE(sum( optimize_duration ),0) AS optimize_duration,
...@@ -196,7 +196,7 @@ ...@@ -196,7 +196,7 @@
</foreach> </foreach>
</if> </if>
</select> </select>
<select id="selectListByYearWeek" resultType="net.wanji.opt.controllerv2.report.vo.AnalysisGreenWaveOptimizeWeekVO"> <select id="selectListByYearWeek" resultType="net.wanji.opt.vo2.report.AnalysisGreenWaveOptimizeWeekVO">
SELECT SELECT
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
FROM t_analysis_green_wave_optimize_week where year_week = #{yearWeek} FROM t_analysis_green_wave_optimize_week where year_week = #{yearWeek}
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
</foreach> </foreach>
</if> </if>
</select> </select>
<select id="getTotalitySituation" resultType="net.wanji.opt.controllerv2.report.vo.CrossPeakAnalysis"> <select id="getTotalitySituation" resultType="net.wanji.opt.vo2.report.CrossPeakAnalysis">
SELECT SELECT
cross_id, cross_id,
<if test="dayType = null"> <if test="dayType = null">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment