|
@@ -1,17 +1,20 @@
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<?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" >
|
|
<!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.SimulationAutomaticProjectMapper" >
|
|
|
|
-
|
|
|
|
|
|
+<mapper namespace="com.css.simulation.resource.project.mapper.SimulationAutomaticProjectMapper">
|
|
|
|
|
|
|
|
|
|
<!--根据id查询工作信息-->
|
|
<!--根据id查询工作信息-->
|
|
<select id="selectById" parameterType="string" resultType="api.common.pojo.po.project.SimulationAutomaticProjectPo">
|
|
<select id="selectById" parameterType="string" resultType="api.common.pojo.po.project.SimulationAutomaticProjectPo">
|
|
- select * from simulation_automatic_project where id=#{id,jdbcType=VARCHAR}
|
|
|
|
|
|
+ select *
|
|
|
|
+ from simulation_automatic_project
|
|
|
|
+ where id = #{id,jdbcType=VARCHAR}
|
|
|
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<!--根据条件查询工作信息-->
|
|
<!--根据条件查询工作信息-->
|
|
- <select id="selectAutomaticProjectByQuery" parameterType="api.common.pojo.param.project.SimulationManualProjectParam" resultType="api.common.pojo.po.project.SimulationAutomaticProjectPo">
|
|
|
|
|
|
+ <select id="selectAutomaticProjectByQuery"
|
|
|
|
+ parameterType="api.common.pojo.param.project.SimulationManualProjectParam"
|
|
|
|
+ resultType="api.common.pojo.po.project.SimulationAutomaticProjectPo">
|
|
select * from simulation_automatic_project
|
|
select * from simulation_automatic_project
|
|
where is_deleted = '0'
|
|
where is_deleted = '0'
|
|
<if test="projectName != null and projectName != ''">
|
|
<if test="projectName != null and projectName != ''">
|
|
@@ -23,13 +26,14 @@
|
|
<select id="selectLastProjectId" resultType="api.common.pojo.po.project.SimulationAutomaticProjectPo">
|
|
<select id="selectLastProjectId" resultType="api.common.pojo.po.project.SimulationAutomaticProjectPo">
|
|
select project_date, project_num, project_id
|
|
select project_date, project_num, project_id
|
|
from simulation_automatic_project
|
|
from simulation_automatic_project
|
|
- where project_date=#{nowRq,jdbcType=INTEGER} and is_deleted = '0'
|
|
|
|
- order by project_date desc, project_num desc
|
|
|
|
- limit 1
|
|
|
|
|
|
+ where project_date = #{nowRq,jdbcType=INTEGER}
|
|
|
|
+ and is_deleted = '0'
|
|
|
|
+ order by project_date desc, project_num desc limit 1
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<!--查询自动项目列表-->
|
|
<!--查询自动项目列表-->
|
|
- <select id="selectAutomaticProjectList" parameterType="api.common.pojo.param.project.SimulationManualProjectParam" resultType="api.common.pojo.vo.project.SimulationManualProjectVo">
|
|
|
|
|
|
+ <select id="selectAutomaticProjectList" parameterType="api.common.pojo.param.project.SimulationManualProjectParam"
|
|
|
|
+ resultType="api.common.pojo.vo.project.SimulationManualProjectVo">
|
|
select id,
|
|
select id,
|
|
project_date,
|
|
project_date,
|
|
project_num,
|
|
project_num,
|
|
@@ -49,7 +53,8 @@
|
|
from simulation_automatic_subproject sas
|
|
from simulation_automatic_subproject sas
|
|
where sas.is_deleted = '0'
|
|
where sas.is_deleted = '0'
|
|
and sas.parent_id = sap.id) automatic_run_times,
|
|
and sas.parent_id = sap.id) automatic_run_times,
|
|
- last_run_time,
|
|
|
|
|
|
+ (select max(sas.create_time) from simulation_automatic_subproject sas where sas.parent_id = sap.id) last_run_time,
|
|
|
|
+ (select max(sas.create_time) from simulation_automatic_subproject sas where sas.parent_id = sap.id) last_run_time_fmt,
|
|
automatic_run_state,
|
|
automatic_run_state,
|
|
create_time,
|
|
create_time,
|
|
create_user_id,
|
|
create_user_id,
|
|
@@ -57,101 +62,94 @@
|
|
modify_user_id,
|
|
modify_user_id,
|
|
is_deleted
|
|
is_deleted
|
|
from simulation_automatic_project sap
|
|
from simulation_automatic_project sap
|
|
- <where>
|
|
|
|
- is_deleted = '0'
|
|
|
|
- <if test="projectId != null and projectId != ''">
|
|
|
|
- and project_id like CONCAT('%',#{projectId,jdbcType=VARCHAR},'%')
|
|
|
|
- </if>
|
|
|
|
- <if test="projectName != null and projectName != ''">
|
|
|
|
- and project_name like CONCAT('%',#{projectName,jdbcType=VARCHAR},'%')
|
|
|
|
- </if>
|
|
|
|
- <if test="createTimeStart != null">
|
|
|
|
- and create_time >= #{createTimeStart,jdbcType=TIMESTAMP}
|
|
|
|
- </if>
|
|
|
|
- <if test="createTimeEnd != null">
|
|
|
|
- and create_time <= #{createTimeEnd,jdbcType=TIMESTAMP}
|
|
|
|
- </if>
|
|
|
|
- <if test="createUserId != null and createUserId != ''">
|
|
|
|
- and create_user_id = #{createUserId,jdbcType=VARCHAR}
|
|
|
|
- </if>
|
|
|
|
- </where>
|
|
|
|
|
|
+ where is_deleted = '0'
|
|
|
|
+ <if test="projectId != null and projectId != ''">
|
|
|
|
+ and project_id like CONCAT('%',#{projectId,jdbcType=VARCHAR},'%')
|
|
|
|
+ </if>
|
|
|
|
+ <if test="projectName != null and projectName != ''">
|
|
|
|
+ and project_name like CONCAT('%',#{projectName,jdbcType=VARCHAR},'%')
|
|
|
|
+ </if>
|
|
|
|
+ <if test="createTimeStart != null">
|
|
|
|
+ and create_time >= #{createTimeStart,jdbcType=TIMESTAMP}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="createTimeEnd != null">
|
|
|
|
+ and create_time <= #{createTimeEnd,jdbcType=TIMESTAMP}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="createUserId != null and createUserId != ''">
|
|
|
|
+ and create_user_id = #{createUserId,jdbcType=VARCHAR}
|
|
|
|
+ </if>
|
|
order by project_date desc, project_num desc, modify_time desc
|
|
order by project_date desc, project_num desc, modify_time desc
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<!--创建项目信息-->
|
|
<!--创建项目信息-->
|
|
<insert id="add" parameterType="api.common.pojo.po.project.SimulationAutomaticProjectPo">
|
|
<insert id="add" parameterType="api.common.pojo.po.project.SimulationAutomaticProjectPo">
|
|
insert into simulation_automatic_project
|
|
insert into simulation_automatic_project
|
|
- (
|
|
|
|
- id,
|
|
|
|
- project_date,
|
|
|
|
- project_num,
|
|
|
|
- project_id,
|
|
|
|
- project_name,
|
|
|
|
- project_describe,
|
|
|
|
- algorithm,
|
|
|
|
- algorithm_type,
|
|
|
|
- vehicle,
|
|
|
|
- scene,
|
|
|
|
- operation_cycle,
|
|
|
|
- parallelism,
|
|
|
|
- rule_view,
|
|
|
|
- max_simulation_time,
|
|
|
|
- is_choice_gpu,
|
|
|
|
- automatic_run_times,
|
|
|
|
- last_run_time,
|
|
|
|
- automatic_run_state,
|
|
|
|
- create_time,
|
|
|
|
- create_user_id,
|
|
|
|
- modify_time,
|
|
|
|
- modify_user_id,
|
|
|
|
- is_deleted
|
|
|
|
- )
|
|
|
|
- values
|
|
|
|
- (
|
|
|
|
- #{id,jdbcType=VARCHAR},
|
|
|
|
- #{projectDate,jdbcType=INTEGER},
|
|
|
|
- #{projectNum,jdbcType=INTEGER},
|
|
|
|
- #{projectId,jdbcType=VARCHAR},
|
|
|
|
- #{projectName,jdbcType=VARCHAR},
|
|
|
|
- #{projectDescribe,jdbcType=VARCHAR},
|
|
|
|
- #{algorithm,jdbcType=VARCHAR},
|
|
|
|
- #{algorithmType,jdbcType=VARCHAR},
|
|
|
|
- #{vehicle,jdbcType=VARCHAR},
|
|
|
|
- #{scene,jdbcType=VARCHAR},
|
|
|
|
- #{operationCycle,jdbcType=VARCHAR},
|
|
|
|
- #{parallelism,jdbcType=VARCHAR},
|
|
|
|
- #{ruleView,jdbcType=VARCHAR},
|
|
|
|
- #{maxSimulationTime},
|
|
|
|
- #{isChoiceGpu,jdbcType=VARCHAR},
|
|
|
|
- #{automaticRunTimes,jdbcType=BIGINT},
|
|
|
|
- #{lastRunTime,jdbcType=TIMESTAMP},
|
|
|
|
- #{automaticRunState,jdbcType=VARCHAR},
|
|
|
|
- #{createTime,jdbcType=TIMESTAMP},
|
|
|
|
- #{createUserId,jdbcType=VARCHAR},
|
|
|
|
- #{modifyTime,jdbcType=TIMESTAMP},
|
|
|
|
- #{modifyUserId,jdbcType=VARCHAR},
|
|
|
|
- #{isDeleted,jdbcType=VARCHAR}
|
|
|
|
- )
|
|
|
|
|
|
+ (id,
|
|
|
|
+ project_date,
|
|
|
|
+ project_num,
|
|
|
|
+ project_id,
|
|
|
|
+ project_name,
|
|
|
|
+ project_describe,
|
|
|
|
+ algorithm,
|
|
|
|
+ algorithm_type,
|
|
|
|
+ vehicle,
|
|
|
|
+ scene,
|
|
|
|
+ operation_cycle,
|
|
|
|
+ parallelism,
|
|
|
|
+ rule_view,
|
|
|
|
+ max_simulation_time,
|
|
|
|
+ is_choice_gpu,
|
|
|
|
+ automatic_run_times,
|
|
|
|
+ last_run_time,
|
|
|
|
+ automatic_run_state,
|
|
|
|
+ create_time,
|
|
|
|
+ create_user_id,
|
|
|
|
+ modify_time,
|
|
|
|
+ modify_user_id,
|
|
|
|
+ is_deleted)
|
|
|
|
+ values (#{id,jdbcType=VARCHAR},
|
|
|
|
+ #{projectDate,jdbcType=INTEGER},
|
|
|
|
+ #{projectNum,jdbcType=INTEGER},
|
|
|
|
+ #{projectId,jdbcType=VARCHAR},
|
|
|
|
+ #{projectName,jdbcType=VARCHAR},
|
|
|
|
+ #{projectDescribe,jdbcType=VARCHAR},
|
|
|
|
+ #{algorithm,jdbcType=VARCHAR},
|
|
|
|
+ #{algorithmType,jdbcType=VARCHAR},
|
|
|
|
+ #{vehicle,jdbcType=VARCHAR},
|
|
|
|
+ #{scene,jdbcType=VARCHAR},
|
|
|
|
+ #{operationCycle,jdbcType=VARCHAR},
|
|
|
|
+ #{parallelism,jdbcType=VARCHAR},
|
|
|
|
+ #{ruleView,jdbcType=VARCHAR},
|
|
|
|
+ #{maxSimulationTime},
|
|
|
|
+ #{isChoiceGpu,jdbcType=VARCHAR},
|
|
|
|
+ #{automaticRunTimes,jdbcType=BIGINT},
|
|
|
|
+ #{lastRunTime,jdbcType=TIMESTAMP},
|
|
|
|
+ #{automaticRunState,jdbcType=VARCHAR},
|
|
|
|
+ #{createTime,jdbcType=TIMESTAMP},
|
|
|
|
+ #{createUserId,jdbcType=VARCHAR},
|
|
|
|
+ #{modifyTime,jdbcType=TIMESTAMP},
|
|
|
|
+ #{modifyUserId,jdbcType=VARCHAR},
|
|
|
|
+ #{isDeleted,jdbcType=VARCHAR})
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
<!--修改项目信息-->
|
|
<!--修改项目信息-->
|
|
<update id="updateById" parameterType="api.common.pojo.po.project.SimulationAutomaticProjectPo">
|
|
<update id="updateById" parameterType="api.common.pojo.po.project.SimulationAutomaticProjectPo">
|
|
update simulation_automatic_project
|
|
update simulation_automatic_project
|
|
- set
|
|
|
|
- project_name = #{projectName,jdbcType=VARCHAR},
|
|
|
|
- project_describe = #{projectDescribe,jdbcType=VARCHAR},
|
|
|
|
- algorithm = #{algorithm,jdbcType=VARCHAR},
|
|
|
|
- algorithm_type = #{algorithmType,jdbcType=VARCHAR},
|
|
|
|
- vehicle = #{vehicle,jdbcType=VARCHAR},
|
|
|
|
- scene = #{scene,jdbcType=VARCHAR},
|
|
|
|
- operation_cycle = #{operationCycle,jdbcType=VARCHAR},
|
|
|
|
- parallelism = #{parallelism,jdbcType=VARCHAR},
|
|
|
|
- rule_view = #{ruleView,jdbcType=VARCHAR},
|
|
|
|
- max_simulation_time = #{maxSimulationTime},
|
|
|
|
- is_choice_gpu = #{isChoiceGpu,jdbcType=VARCHAR},
|
|
|
|
- modify_time = #{modifyTime,jdbcType=TIMESTAMP},
|
|
|
|
- modify_user_id = #{modifyUserId,jdbcType=VARCHAR}
|
|
|
|
- where id = #{id,jdbcType=VARCHAR} and is_deleted = '0'
|
|
|
|
|
|
+ set project_name = #{projectName,jdbcType=VARCHAR},
|
|
|
|
+ project_describe = #{projectDescribe,jdbcType=VARCHAR},
|
|
|
|
+ algorithm = #{algorithm,jdbcType=VARCHAR},
|
|
|
|
+ algorithm_type = #{algorithmType,jdbcType=VARCHAR},
|
|
|
|
+ vehicle = #{vehicle,jdbcType=VARCHAR},
|
|
|
|
+ scene = #{scene,jdbcType=VARCHAR},
|
|
|
|
+ operation_cycle = #{operationCycle,jdbcType=VARCHAR},
|
|
|
|
+ parallelism = #{parallelism,jdbcType=VARCHAR},
|
|
|
|
+ rule_view = #{ruleView,jdbcType=VARCHAR},
|
|
|
|
+ max_simulation_time = #{maxSimulationTime},
|
|
|
|
+ is_choice_gpu = #{isChoiceGpu,jdbcType=VARCHAR},
|
|
|
|
+ modify_time = #{modifyTime,jdbcType=TIMESTAMP},
|
|
|
|
+ modify_user_id = #{modifyUserId,jdbcType=VARCHAR}
|
|
|
|
+ where id = #{id,jdbcType=VARCHAR}
|
|
|
|
+ and is_deleted = '0'
|
|
</update>
|
|
</update>
|
|
|
|
|
|
|
|
|
|
@@ -193,19 +191,31 @@
|
|
</update>
|
|
</update>
|
|
|
|
|
|
<!--自动运行项目详细页面信息-->
|
|
<!--自动运行项目详细页面信息-->
|
|
- <select id="selectAutomaticProjectInfoById" parameterType="string" resultType="api.common.pojo.vo.project.AutomaticProjectVo">
|
|
|
|
- select p.id, p.project_name, p.project_describe, p.operation_cycle, p.parallelism, p.is_choice_gpu, p.vehicle, a.algorithm_name, s.package_name as sceneName, p.max_simulation_time
|
|
|
|
|
|
+ <select id="selectAutomaticProjectInfoById" parameterType="string"
|
|
|
|
+ resultType="api.common.pojo.vo.project.AutomaticProjectVo">
|
|
|
|
+ select p.id,
|
|
|
|
+ p.project_name,
|
|
|
|
+ p.project_describe,
|
|
|
|
+ p.operation_cycle,
|
|
|
|
+ p.parallelism,
|
|
|
|
+ p.is_choice_gpu,
|
|
|
|
+ p.vehicle,
|
|
|
|
+ a.algorithm_name,
|
|
|
|
+ s.package_name as sceneName,
|
|
|
|
+ p.max_simulation_time
|
|
from simulation_automatic_project p
|
|
from simulation_automatic_project p
|
|
- left join algorithm a on p.algorithm = a.id
|
|
|
|
- left join scene_package s on p.scene = s.package_id
|
|
|
|
- where p.id = #{id,jdbcType=VARCHAR} and p.is_deleted = '0'
|
|
|
|
|
|
+ left join algorithm a on p.algorithm = a.id
|
|
|
|
+ left join scene_package s on p.scene = s.package_id
|
|
|
|
+ where p.id = #{id,jdbcType=VARCHAR}
|
|
|
|
+ and p.is_deleted = '0'
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<!--更新算法版本号-->
|
|
<!--更新算法版本号-->
|
|
<update id="updateAlgorithmGitVersion" parameterType="api.common.pojo.param.algorithm.AlgorithmParameter">
|
|
<update id="updateAlgorithmGitVersion" parameterType="api.common.pojo.param.algorithm.AlgorithmParameter">
|
|
- update algorithm set git_version=#{gitVersion} where id=#{id}
|
|
|
|
|
|
+ update algorithm
|
|
|
|
+ set git_version=#{gitVersion}
|
|
|
|
+ where id = #{id}
|
|
</update>
|
|
</update>
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
</mapper>
|
|
</mapper>
|