Commit cbaabc92 authored by hanbing's avatar hanbing

[update] 运行评价-干线详细指标查询增加绿灯空放时长

parent 7e81b999
...@@ -4,6 +4,7 @@ package net.wanji.databus.dao.mapper; ...@@ -4,6 +4,7 @@ package net.wanji.databus.dao.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import net.wanji.databus.dto.MetricHistDTO; import net.wanji.databus.dto.MetricHistDTO;
import net.wanji.databus.po.CrossDataHistPO; import net.wanji.databus.po.CrossDataHistPO;
import net.wanji.databus.po.CrossDataHistPOExt;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
...@@ -31,4 +32,5 @@ public interface CrossDataHistMapper extends BaseMapper<CrossDataHistPO> { ...@@ -31,4 +32,5 @@ public interface CrossDataHistMapper extends BaseMapper<CrossDataHistPO> {
List<CrossDataHistPO> selectByStartEnd(int startStamp, int endStamp); List<CrossDataHistPO> selectByStartEnd(int startStamp, int endStamp);
List<CrossDataHistPOExt> selectExtByCrossIdAndStartEnd(String crossId, int startStamp, int endStamp);
} }
...@@ -73,4 +73,6 @@ public interface CrossDirDataHistMapper extends BaseMapper<CrossDirDataHistPO> { ...@@ -73,4 +73,6 @@ public interface CrossDirDataHistMapper extends BaseMapper<CrossDirDataHistPO> {
); );
List<CrossDirDataHistPO> selectByTimeSection(String boStartDayStr, String boEndDayStr, String startHourMinuteStr, String endHourMinuteStr); List<CrossDirDataHistPO> selectByTimeSection(String boStartDayStr, String boEndDayStr, String startHourMinuteStr, String endHourMinuteStr);
List<CrossDirDataHistPOExt> selectExtByTimeSection(String boStartDayStr, String boEndDayStr, String startHourMinuteStr, String endHourMinuteStr);
} }
...@@ -2,13 +2,17 @@ package net.wanji.databus.po; ...@@ -2,13 +2,17 @@ package net.wanji.databus.po;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode;
/** /**
* @author duanruiming * @author duanruiming
* @date 2023/03/12 20:49 * @date 2023/03/12 20:49
*/ */
@EqualsAndHashCode(callSuper = true)
@Data @Data
public class CrossDataHistPOExt extends CrossDataRealtimePO { public class CrossDataHistPOExt extends CrossDataRealtimePO {
@ApiModelProperty(value = "三急一速数量", notes = "") @ApiModelProperty(value = "三急一速数量", notes = "")
private Integer emergencyCount; private Integer emergencyCount;
@ApiModelProperty(value = "绿灯空放时长", notes = "")
private Integer emptyPhase = 0;
} }
...@@ -11,5 +11,8 @@ import lombok.Data; ...@@ -11,5 +11,8 @@ import lombok.Data;
public class CrossDirDataHistPOExt extends CrossDirDataRealtimePO { public class CrossDirDataHistPOExt extends CrossDirDataRealtimePO {
@ApiModelProperty(value = "三急一速数量", notes = "") @ApiModelProperty(value = "三急一速数量", notes = "")
public Integer emergencyCount; public Integer emergencyCount;
@ApiModelProperty(value = "绿灯空放时长")
private Integer emptyPhase = 0;
} }
...@@ -65,6 +65,4 @@ public class CrossDirDataRealtimePO { ...@@ -65,6 +65,4 @@ public class CrossDirDataRealtimePO {
public Double effusionRate; public Double effusionRate;
@ApiModelProperty(value = "绿灯有效利用率", notes = "") @ApiModelProperty(value = "绿灯有效利用率", notes = "")
public Double greenLightEfficiency; public Double greenLightEfficiency;
@ApiModelProperty(value = "绿灯空放时长")
private Integer emptyPhase = 0;
} }
...@@ -123,4 +123,13 @@ ...@@ -123,4 +123,13 @@
order by batch_time order by batch_time
</select> </select>
<select id="selectExtByCrossIdAndStartEnd" resultType="net.wanji.databus.po.CrossDataHistPOExt">
select <include refid="Base_Column_List"></include>
from t_cross_data_hist
where cross_id = #{crossId}
and batch_time <![CDATA[ >= ]]> #{startStamp}
and batch_time <![CDATA[ <= ]]> #{endStamp}
order by batch_time
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -240,4 +240,12 @@ ...@@ -240,4 +240,12 @@
AND in_out_type = 1 AND in_out_type = 1
</select> </select>
<select id="selectExtByTimeSection" resultType="net.wanji.databus.po.CrossDirDataHistPOExt">
SELECT <include refid="Base_Column_List"></include>
FROM t_cross_dir_data_hist
WHERE batch_time BETWEEN UNIX_TIMESTAMP(STR_TO_DATE(concat(#{boStartDayStr}, #{startHourMinuteStr}), '%Y-%m-%d%H:%i'))
AND UNIX_TIMESTAMP(STR_TO_DATE(concat(#{boEndDayStr}, #{endHourMinuteStr}), '%Y-%m-%d%H:%i'))
AND in_out_type = 1
</select>
</mapper> </mapper>
\ No newline at end of file
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