|
@@ -1,11 +1,52 @@
|
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
|
|
-<mapper namespace="com.css.simulation.resource.project.mapper.SimulationProjectTaskMapper" >
|
|
|
+<mapper namespace="com.css.simulation.resource.project.mapper.SimulationProjectTaskMapper">
|
|
|
|
|
|
|
|
|
<!--查询任务列表-->
|
|
|
- <select id="selectprojectTaskByQuery" parameterType="api.common.pojo.param.project.ProjectTaskParam" resultType="api.common.pojo.po.project.ManualProjectTaskPo">
|
|
|
- select *
|
|
|
+ <select id="selectProjectTask" parameterType="api.common.pojo.param.project.ProjectTaskParam"
|
|
|
+ resultType="api.common.pojo.po.project.ManualProjectTaskPo">
|
|
|
+ select id,
|
|
|
+ p_id,
|
|
|
+ last_targer_id,
|
|
|
+ scene_id,
|
|
|
+ scene_name,
|
|
|
+ scene_type,
|
|
|
+ run_start_time,
|
|
|
+ run_end_time,
|
|
|
+ run_state,
|
|
|
+ run_result,
|
|
|
+ run_result_file_path,
|
|
|
+ score,
|
|
|
+ target_evaluate,
|
|
|
+ return_scene_id,
|
|
|
+ score_explain,
|
|
|
+ mileage,
|
|
|
+ average_velocity,
|
|
|
+ maximun_speed,
|
|
|
+ minimun_velocity,
|
|
|
+ maximum_acceleration,
|
|
|
+ maximum_deceleration,
|
|
|
+ maximum_swingSpeed,
|
|
|
+ speed_variance,
|
|
|
+ speed_comfort_level,
|
|
|
+ swing_speed_mean_square_root,
|
|
|
+ swing_comfort_level,
|
|
|
+ acceleration,
|
|
|
+ lane_offset,
|
|
|
+ brake,
|
|
|
+ steeting_wheel,
|
|
|
+ throttle,
|
|
|
+ yaw_rate,
|
|
|
+ velocity,
|
|
|
+ other_curve,
|
|
|
+ timer_shaft,
|
|
|
+ create_time,
|
|
|
+ create_user_id,
|
|
|
+ modify_time,
|
|
|
+ modify_user_id,
|
|
|
+ is_deleted,
|
|
|
+ retry_count
|
|
|
from simulation_manual_project_task
|
|
|
<where>
|
|
|
is_deleted = '0'
|
|
@@ -21,7 +62,8 @@
|
|
|
</where>
|
|
|
</select>
|
|
|
<!--根据项目id查询任务列表-->
|
|
|
- <select id="selectProjectTaskByProjectId" parameterType="api.common.pojo.param.project.ProjectTaskParam" resultType="api.common.pojo.vo.project.ManualProjectTaskVo">
|
|
|
+ <select id="selectProjectTaskByProjectId" parameterType="api.common.pojo.param.project.ProjectTaskParam"
|
|
|
+ resultType="api.common.pojo.vo.project.ManualProjectTaskVo">
|
|
|
select id,
|
|
|
p_id,
|
|
|
last_targer_id,
|
|
@@ -72,33 +114,43 @@
|
|
|
</select>
|
|
|
|
|
|
<!--根据项目id查询任务列表总数-->
|
|
|
- <select id="selectProjectTaskNumByProjectId" parameterType="api.common.pojo.param.project.ProjectTaskParam" resultType="int">
|
|
|
+ <select id="selectProjectTaskNumByProjectId" parameterType="api.common.pojo.param.project.ProjectTaskParam"
|
|
|
+ resultType="int">
|
|
|
select count(*) as num
|
|
|
from simulation_manual_project_task
|
|
|
- where is_deleted = '0' and p_id = #{pId,jdbcType=VARCHAR}
|
|
|
+ where is_deleted = '0'
|
|
|
+ and p_id = #{pId,jdbcType=VARCHAR}
|
|
|
</select>
|
|
|
|
|
|
<!--根据任务运行状态分组查询统计数量-->
|
|
|
- <select id="selectRunStateCount" parameterType="string" resultType="api.common.pojo.vo.project.ProjectRunStateNumVo">
|
|
|
+ <select id="selectRunStateCount" parameterType="string"
|
|
|
+ resultType="api.common.pojo.vo.project.ProjectRunStateNumVo">
|
|
|
select run_state as stateName, count(*) as num
|
|
|
from simulation_manual_project_task
|
|
|
- where p_id = #{id,jdbcType=VARCHAR} and is_deleted = '0'
|
|
|
+ where p_id = #{id,jdbcType=VARCHAR}
|
|
|
+ and is_deleted = '0'
|
|
|
group by run_state
|
|
|
</select>
|
|
|
|
|
|
<!--根据任务运行状态分组查询统计数量-->
|
|
|
- <select id="selectRunResultCount" parameterType="string" resultType="api.common.pojo.vo.project.ProjectRunResultRatioNumVo">
|
|
|
+ <select id="selectRunResultCount" parameterType="string"
|
|
|
+ resultType="api.common.pojo.vo.project.ProjectRunResultRatioNumVo">
|
|
|
select run_result as resultName, count(*) as num
|
|
|
from simulation_manual_project_task
|
|
|
- where p_id = #{id,jdbcType=VARCHAR} and is_deleted = '0' and run_result is not null and run_result != ""
|
|
|
+ where p_id = #{id,jdbcType=VARCHAR}
|
|
|
+ and is_deleted = '0'
|
|
|
+ and run_result is not null
|
|
|
+ and run_result != ""
|
|
|
group by run_result
|
|
|
</select>
|
|
|
|
|
|
<!--任务得分统计分组-->
|
|
|
- <select id="selectScoreCount" parameterType="string" resultType="api.common.pojo.vo.project.ProjectRunResultRatioNumVo">
|
|
|
+ <select id="selectScoreCount" parameterType="string"
|
|
|
+ resultType="api.common.pojo.vo.project.ProjectRunResultRatioNumVo">
|
|
|
select score as resultName, count(*) as num
|
|
|
from simulation_manual_project_task
|
|
|
- where p_id = #{id,jdbcType=VARCHAR} and is_deleted = '0'
|
|
|
+ where p_id = #{id,jdbcType=VARCHAR}
|
|
|
+ and is_deleted = '0'
|
|
|
group by score
|
|
|
</select>
|
|
|
|
|
@@ -114,18 +166,21 @@
|
|
|
</select>
|
|
|
|
|
|
<!--查询场景不等于0的得分的数量-->
|
|
|
- <select id="selectSceneScoreNumQuery" parameterType="api.common.pojo.po.project.SimulationMptSceneScorePo" resultType="api.common.pojo.vo.project.SceneScoreVo">
|
|
|
+ <select id="selectSceneScoreNumQuery" parameterType="api.common.pojo.po.project.SimulationMptSceneScorePo"
|
|
|
+ resultType="api.common.pojo.vo.project.SceneScoreVo">
|
|
|
select count(*) as num
|
|
|
from simulation_manual_project_task
|
|
|
- where p_id = #{pId,jdbcType=VARCHAR} and last_targer_id = #{lastTargerId}
|
|
|
- and score != 0 and is_deleted = '0'
|
|
|
+ where p_id = #{pId,jdbcType=VARCHAR}
|
|
|
+ and last_targer_id = #{lastTargerId}
|
|
|
+ and score != 0 and is_deleted = '0'
|
|
|
</select>
|
|
|
|
|
|
<!--批量查询场景得分-->
|
|
|
- <select id="selectSceneScoreByIds" parameterType="api.common.pojo.param.project.SceneScoreParam" resultType="api.common.pojo.vo.project.SceneScoreVo">
|
|
|
+ <select id="selectSceneScoreByIds" parameterType="api.common.pojo.param.project.SceneScoreParam"
|
|
|
+ resultType="api.common.pojo.vo.project.SceneScoreVo">
|
|
|
select id, scene_id, scene_type,score, target_evaluate, return_scene_id, score_explain
|
|
|
from simulation_manual_project_task
|
|
|
- where p_id = #{pId,jdbcType=VARCHAR} and scene_type = #{sceneType,jdbcType=VARCHAR}
|
|
|
+ where p_id = #{pId,jdbcType=VARCHAR} and scene_type = #{sceneType,jdbcType=VARCHAR}
|
|
|
and last_targer_id = #{lastTargerId,jdbcType=VARCHAR} and is_deleted = '0'
|
|
|
and scene_id in
|
|
|
<foreach collection="sceneIds" open="(" separator="," close=")" item="id">
|
|
@@ -136,40 +191,46 @@
|
|
|
<!--更新仿真结果到数据库-->
|
|
|
<update id="updateTaksResult" parameterType="api.common.pojo.po.project.ManualProjectTaskPo">
|
|
|
update simulation_manual_project_task
|
|
|
- set
|
|
|
- mileage = #{mileage, jdbcType=VARCHAR},
|
|
|
- average_velocity = #{averageVelocity, jdbcType=VARCHAR},
|
|
|
- maximun_speed = #{maximunSpeed, jdbcType=VARCHAR},
|
|
|
- minimun_velocity = #{minimunVelocity, jdbcType=VARCHAR},
|
|
|
- maximum_acceleration = #{maximumAcceleration, jdbcType=VARCHAR},
|
|
|
- maximum_deceleration = #{maximumDeceleration, jdbcType=VARCHAR},
|
|
|
- maximum_swingSpeed = #{maximumSwingSpeed, jdbcType=VARCHAR},
|
|
|
- speed_variance = #{speedVariance, jdbcType=VARCHAR},
|
|
|
- swing_speed_mean_square_root = #{swingSpeedMeanSquareRoot, jdbcType=VARCHAR},
|
|
|
- acceleration = #{acceleration, jdbcType=LONGVARCHAR},
|
|
|
- lane_offset = #{laneOffset, jdbcType=LONGVARCHAR},
|
|
|
- brake = #{brake, jdbcType=LONGVARCHAR},
|
|
|
- steeting_wheel = #{steetingWheel, jdbcType=LONGVARCHAR},
|
|
|
- throttle = #{throttle, jdbcType=LONGVARCHAR},
|
|
|
- yaw_rate = #{yawRate, jdbcType=LONGVARCHAR},
|
|
|
- velocity = #{velocity, jdbcType=LONGVARCHAR},
|
|
|
- other_curve = #{otherCurve, jdbcType=LONGVARCHAR},
|
|
|
- timer_shaft = #{timerShaft, jdbcType=LONGVARCHAR}
|
|
|
- where id = #{id, jdbcType=VARCHAR} and p_id = #{pId, jdbcType=VARCHAR} and is_deleted = '0'
|
|
|
+ set mileage = #{mileage, jdbcType=VARCHAR},
|
|
|
+ average_velocity = #{averageVelocity, jdbcType=VARCHAR},
|
|
|
+ maximun_speed = #{maximunSpeed, jdbcType=VARCHAR},
|
|
|
+ minimun_velocity = #{minimunVelocity, jdbcType=VARCHAR},
|
|
|
+ maximum_acceleration = #{maximumAcceleration, jdbcType=VARCHAR},
|
|
|
+ maximum_deceleration = #{maximumDeceleration, jdbcType=VARCHAR},
|
|
|
+ maximum_swingSpeed = #{maximumSwingSpeed, jdbcType=VARCHAR},
|
|
|
+ speed_variance = #{speedVariance, jdbcType=VARCHAR},
|
|
|
+ swing_speed_mean_square_root = #{swingSpeedMeanSquareRoot, jdbcType=VARCHAR},
|
|
|
+ acceleration = #{acceleration, jdbcType=LONGVARCHAR},
|
|
|
+ lane_offset = #{laneOffset, jdbcType=LONGVARCHAR},
|
|
|
+ brake = #{brake, jdbcType=LONGVARCHAR},
|
|
|
+ steeting_wheel = #{steetingWheel, jdbcType=LONGVARCHAR},
|
|
|
+ throttle = #{throttle, jdbcType=LONGVARCHAR},
|
|
|
+ yaw_rate = #{yawRate, jdbcType=LONGVARCHAR},
|
|
|
+ velocity = #{velocity, jdbcType=LONGVARCHAR},
|
|
|
+ other_curve = #{otherCurve, jdbcType=LONGVARCHAR},
|
|
|
+ timer_shaft = #{timerShaft, jdbcType=LONGVARCHAR}
|
|
|
+ where id = #{id, jdbcType=VARCHAR}
|
|
|
+ and p_id = #{pId, jdbcType=VARCHAR}
|
|
|
+ and is_deleted = '0'
|
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
<!--查询Aborted的数量-->
|
|
|
- <select id="selectRunStateByAborted" parameterType="api.common.pojo.po.project.SimulationMptSceneScorePo" resultType="api.common.pojo.vo.project.SceneScoreVo">
|
|
|
+ <select id="selectRunStateByAborted" parameterType="api.common.pojo.po.project.SimulationMptSceneScorePo"
|
|
|
+ resultType="api.common.pojo.vo.project.SceneScoreVo">
|
|
|
select count(*) as num
|
|
|
from simulation_manual_project_task
|
|
|
where p_id = #{pId,jdbcType=VARCHAR}
|
|
|
- and run_state = 'Aborted' and is_deleted = '0'
|
|
|
+ and run_state = 'Aborted'
|
|
|
+ and is_deleted = '0'
|
|
|
</select>
|
|
|
|
|
|
- <select id="selectProjectTaskById" parameterType="string" resultType="api.common.pojo.vo.project.ManualProjectTaskVo">
|
|
|
- select * from simulation_manual_project_task where id=#{id}
|
|
|
+ <select id="selectProjectTaskById" parameterType="string"
|
|
|
+ resultType="api.common.pojo.vo.project.ManualProjectTaskVo">
|
|
|
+ select *
|
|
|
+ from simulation_manual_project_task
|
|
|
+ where id = #{id}
|
|
|
</select>
|
|
|
|
|
|
|