123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625 |
- <?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.SimulationProjectMapper">
- <!--添加-->
- <insert id="add" parameterType="api.common.pojo.po.project.SimulationManualProjectPo">
- insert into simulation_manual_project
- (id,
- project_date,
- project_num,
- project_id,
- project_name,
- project_describe,
- algorithm,
- algorithm_type,
- vehicle,
- scene,
- operation_cycle,
- parallelism,
- rule_view,
- is_choice_gpu,
- automatic_run_times,
- last_run_time,
- automatic_run_state,
- now_run_state,
- evaluation_level,
- start_time,
- finish_time,
- max_simulation_time,
- 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},
- #{isChoiceGpu,jdbcType=VARCHAR},
- #{automaticRunTimes,jdbcType=BIGINT},
- #{lastRunTime,jdbcType=TIMESTAMP},
- #{automaticRunState,jdbcType=VARCHAR},
- #{nowRunState,jdbcType=VARCHAR},
- #{evaluationLevel,jdbcType=VARCHAR},
- #{startTime,jdbcType=TIMESTAMP},
- #{finishTime,jdbcType=TIMESTAMP},
- #{maxSimulationTime,jdbcType=BIGINT},
- #{createTime,jdbcType=TIMESTAMP},
- #{createUserId,jdbcType=VARCHAR},
- #{modifyTime,jdbcType=TIMESTAMP},
- #{modifyUserId,jdbcType=VARCHAR},
- #{isDeleted,jdbcType=VARCHAR})
- </insert>
- <!--修改-->
- <update id="update" parameterType="api.common.pojo.po.project.SimulationManualProjectPo">
- update simulation_manual_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},
- max_simulation_time = #{maxSimulationTime,jdbcType=BIGINT},
- parallelism = #{parallelism,jdbcType=VARCHAR},
- is_choice_gpu = #{isChoiceGpu,jdbcType=VARCHAR}
- where id = #{id,jdbcType=VARCHAR}
- and is_deleted = '0'
- </update>
- <!--查询项目最新id-->
- <select id="selectLastProjectId" resultType="api.common.pojo.po.project.SimulationManualProjectPo">
- select project_date, project_num, project_id
- from simulation_manual_project
- where project_date = #{nowRq,jdbcType=INTEGER}
- and is_deleted = '0'
- order by project_date desc, project_num desc limit 1
- </select>
- <!--查询项目列表-->
- <select id="selectProject" parameterType="api.common.pojo.param.project.SimulationManualProjectParam"
- resultType="api.common.pojo.po.project.SimulationManualProjectPo">
- select * from simulation_manual_project
- <where>
- is_deleted = '0'
- <if test="projectId != null and projectId != ''">
- and project_id like CONCAT('%',#{project_id,jdbcType=VARCHAR},'%')
- </if>
- <if test="projectName != null and projectName != ''">
- and project_name like CONCAT('%',#{project_name,jdbcType=VARCHAR},'%')
- </if>
- <if test="nowRunState != null and nowRunState != ''">
- and now_run_state = #{nowRunState}
- </if>
- <if test="evaluationLevel != null and evaluationLevel != ''">
- and evaluation_level = #{evaluationLevel}
- </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="finishTimeStart != null">
- and finish_time >= #{finishTimeStart,jdbcType=TIMESTAMP}
- </if>
- <if test="finishTimeEnd != null">
- and finish_time <= #{finishTimeEnd,jdbcType=TIMESTAMP}
- </if>
- <if test="isDeleted != null and isDeleted != ''">
- and is_deleted = #{isDeleted,jdbcType=VARCHAR}
- </if>
- </where>
- order by project_date desc, project_num desc, modify_time desc
- </select>
- <!--查询项目列表-->
- <select id="selectProjectList" parameterType="api.common.pojo.param.project.SimulationManualProjectParam"
- resultType="api.common.pojo.vo.project.SimulationManualProjectVo">
- select * from simulation_manual_project
- <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="nowRunState != null and nowRunState != ''">
- and now_run_state = #{nowRunState}
- </if>
- <if test="evaluationLevel != null and evaluationLevel != ''">
- and evaluation_level = #{evaluationLevel}
- </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="finishTimeStart != null">
- and finish_time >= #{finishTimeStart,jdbcType=TIMESTAMP}
- </if>
- <if test="finishTimeEnd != null">
- and finish_time <= #{finishTimeEnd,jdbcType=TIMESTAMP}
- </if>
- <if test="isDeleted != null and isDeleted != ''">
- and is_deleted = #{isDeleted,jdbcType=VARCHAR}
- </if>
- <if test="createUserId != null and createUserId != ''">
- and create_user_id = #{createUserId,jdbcType=VARCHAR}
- </if>
- </where>
- order by project_date desc, project_num desc, modify_time desc
- </select>
- <!--根据id查询-->
- <select id="selectProjectById" parameterType="api.common.pojo.param.project.SimulationManualProjectParam"
- resultType="api.common.pojo.po.project.SimulationManualProjectPo">
- select *
- from simulation_manual_project
- where id = #{id,jdbcType=VARCHAR}
- and is_deleted = '0'
- </select>
- <!--根据项目名查询工作信息-->
- <select id="selectProjectByName" parameterType="api.common.pojo.param.project.SimulationManualProjectParam"
- resultType="api.common.pojo.po.project.SimulationManualProjectPo">
- select *
- from simulation_manual_project
- where project_name = #{projectName,jdbcType=VARCHAR}
- and is_deleted = '0'
- </select>
- <!--根据id查询基本信息-->
- <select id="selectProjectBaseById" parameterType="api.common.pojo.param.project.SimulationManualProjectParam"
- resultType="api.common.pojo.po.project.SimulationManualProjectPo">
- select id,
- algorithm,
- scene,
- algorithm_score,
- project_name,
- project_id,
- algorithm_type,
- evaluation_level
- from simulation_manual_project
- where is_deleted = '0'
- and id = #{id,jdbcType=VARCHAR}
- </select>
- <!--删除-->
- <update id="deleteProject">
- update simulation_manual_project
- set is_deleted='1'
- where id in
- <foreach collection="array" open="(" separator="," close=")" item="id">
- #{id,jdbcType=VARCHAR}
- </foreach>
- </update>
- <!--查询项目状态-->
- <select id="selectProjectNowRunState" resultType="api.common.pojo.po.project.SimulationManualProjectPo">
- select now_run_state
- from simulation_manual_project
- where
- is_deleted='0' and
- id in
- <foreach collection="array" open="(" separator="," close=")" item="id">
- #{id,jdbcType=VARCHAR}
- </foreach>
- </select>
- <!--修改运行状态-->
- <update id="updateProjectNowRunState" parameterType="api.common.pojo.param.project.SimulationManualProjectParam">
- update simulation_manual_project
- <set>
- <if test="nowRunState != null and nowRunState != ''">
- now_run_state = #{nowRunState,jdbcType=VARCHAR},
- </if>
- <if test="startTime != null">
- start_time=#{startTime,jdbcType=TIMESTAMP},
- </if>
- <if test="finishTime != null">
- finish_time=#{finishTime,jdbcType=TIMESTAMP},
- </if>
- </set>
- where id = #{id,jdbcType=VARCHAR} and is_deleted = '0'
- </update>
- <!--获取算法基本信息 /*where a.share = '0' and a.is_deleted = '0'*/-->
- <select id="selectAlgorithmBaseInfoById" resultType="api.common.pojo.po.algorithm.AlgorithmPO">
- select a.id, a.algorithm_name, a.description
- from algorithm a
- where a.share = '0' and a.is_deleted = '0'
- <if test="id != null and id != ''">
- and a.id = #{id,jdbcType=VARCHAR}
- </if>
- <if test="createUserId != null and createUserId !=''">
- and create_user_id=#{createUserId,jdbcType=VARCHAR}
- </if>
- <if test="uploadMode != null and uploadMode != ''">
- and upload_mode = #{uploadMode,jdbcType=VARCHAR}
- </if>
- </select>
- <!--获取车辆基本信息-->
- <select id="selectVehicleBaseInfoById" parameterType="string" resultType="api.common.pojo.po.model.VehiclePO">
- select a.id, a.vehicle_name, a.description, a.vehicle_top_view
- from model_vehicle a
- where is_deleted = '0'
- <if test="id != null and id != ''">
- and a.id = #{id,jdbcType=VARCHAR}
- </if>
- </select>
- <!--获取车辆配置信息-->
- <select id="selectConfigVehicle" resultType="api.common.pojo.po.model.ConfigPO">
- select id, config_name, vehicle_id, description
- from model_config
- where share = '0' and is_deleted = '0'
- <if test="id != null and id != ''">
- and id = #{id,jdbcType=VARCHAR}
- </if>
- <if test="createUserId != null and createUserId !=''">
- and create_user_id=#{createUserId,jdbcType=VARCHAR}
- </if>
- </select>
- <!--查询车辆配置传感器信息-->
- <select id="selectConfigSensor" parameterType="string" resultType="api.common.pojo.po.model.ConfigSensorPO">
- select sensor_type
- from relation_config_sensor
- where is_deleted = '0'
- <if test="id != null and id != ''">
- and config_id = #{id,jdbcType=VARCHAR}
- </if>
- group by sensor_type
- </select>
- <!--获取场景包基本信息-->
- <select id="selectScenePackageBaseById" resultType="api.common.pojo.po.scene.ScenePackagePO">
- select a.package_id,a.package_name, a.scene_num
- from scene_package a
- where a.share = '0' and a.is_deleted = '0'
- <if test="packageId != null and packageId != ''">
- and a.package_id = #{packageId,jdbcType=VARCHAR}
- </if>
- <if test="createUserId != null and createUserId !=''">
- and create_user_id=#{createUserId,jdbcType=VARCHAR}
- </if>
- order by modify_time desc
- </select>
- <!--根据id查询场景包信息-->
- <select id="selectScenePackageInfoById" parameterType="string" resultType="api.common.pojo.po.scene.ScenePackagePO">
- select a.package_id, a.package_name, a.scene_num
- from scene_package a
- where a.package_id = #{id,jdbcType=VARCHAR}
- </select>
- <!--查询车辆与传感器关联信息-->
- <select id="selectVehicleSensor" parameterType="string" resultType="api.common.pojo.po.model.ConfigSensorPO">
- select sensor_id,
- sensor_type,
- config_id,
- sensor_x,
- sensor_y,
- sensor_z,
- sensor_h,
- sensor_p,
- sensor_r,
- sensor_port
- from relation_config_sensor
- where config_id = #{id,jdbcType=VARCHAR}
- and is_deleted = '0'
- </select>
- <!--摄像头基本信息-->
- <select id="selectSensorCamera" parameterType="string" resultType="api.common.pojo.vo.project.SensorBaseInfoVo">
- select a.sensor_name, description as sensorDescription
- from model_sensor_camera a
- where a.id = #{id,jdbcType=VARCHAR}
- </select>
- <!--完美传感器基本信息-->
- <select id="selectSensorOgt" parameterType="string" resultType="api.common.pojo.vo.project.SensorBaseInfoVo">
- select a.sensor_name, description as sensorDescription
- from model_sensor_ogt a
- where a.id = #{id,jdbcType=VARCHAR}
- </select>
- <!--激光雷达基本信息-->
- <select id="selectSensorLidar" parameterType="string" resultType="api.common.pojo.vo.project.SensorBaseInfoVo">
- select a.sensor_name, description as sensorDescription
- from model_sensor_lidar a
- where a.id = #{id,jdbcType=VARCHAR}
- </select>
- <!--毫米波雷达基本信息-->
- <select id="selectSensorRadar" parameterType="string" resultType="api.common.pojo.vo.project.SensorBaseInfoVo">
- select a.name as sensor_name, description as sensorDescription
- from model_sensor_radar a
- where a.id = #{id,jdbcType=VARCHAR}
- </select>
- <!--gps基本信息-->
- <select id="selectSensorGps" parameterType="string" resultType="api.common.pojo.vo.project.SensorBaseInfoVo">
- select a.sensor_name, description as sensorDescription
- from model_sensor_gps a
- where a.id = #{id,jdbcType=VARCHAR}
- </select>
- <!--查询交通事故场景信息-->
- <select id="selectSceneAccidentById" parameterType="string" resultType="api.common.pojo.vo.project.SceneBaseInfoVo">
- select scene_name
- from scene_accident
- where accident_id = #{id,jdbcType=VARCHAR}
- </select>
- <!--查询自然场景信息-->
- <select id="selectSceneNatural" parameterType="string" resultType="api.common.pojo.vo.project.SceneBaseInfoVo">
- select natural_name
- from scene_natural
- where natural_id = #{id,jdbcType=VARCHAR}
- </select>
- <!--查询泛化场景信息-->
- <select id="selectSceneGeneralDataById" parameterType="string"
- resultType="api.common.pojo.vo.project.SceneBaseInfoVo">
- select scene_id scene_name
- from scene_general_data
- where id = #{id,jdbcType=VARCHAR}
- </select>
- <!--查询标准法规场景信息-->
- <select id="selectSceneStandardsRegulations" parameterType="string"
- resultType="api.common.pojo.vo.project.SceneBaseInfoVo">
- select scene_name
- from scene_standards_regulations
- where regulations_id = #{id,jdbcType=VARCHAR}
- </select>
- <!--根据场景包id获取场景子集-->
- <select id="selectSubSceneByPid" parameterType="string"
- resultType="api.common.pojo.vo.project.ScenePackageSubListVO">
- select sublist_id,
- sublist_name,
- scene_num,
- weight,
- parent_id,
- scene_natural_ids,
- scene_traffic_ids,
- scene_statue_ids,
- scene_generalization_ids
- from scene_package_sublist
- where parent_id = #{id,jdbcType=VARCHAR}
- order by seq
- </select>
- <!--获取指标信息-->
- <select id="selectsublistBySublistId" parameterType="string"
- resultType="api.common.pojo.vo.project.ScenePackageSubListVO">
- select sublist_id,
- sublist_name,
- scene_num,
- weight,
- parent_id,
- scene_natural_ids,
- scene_traffic_ids,
- scene_statue_ids,
- scene_generalization_ids
- from scene_package_sublist
- where sublist_id = #{id,jdbcType=VARCHAR}
- </select>
- <!--获取场景包下指标信息-->
- <select id="selectsublistByRootId" parameterType="api.common.pojo.param.project.SimulationManualProjectParam"
- resultType="api.common.pojo.vo.project.SublistScoreVo">
- select sub.sublist_id as id, sub.parent_id, sub.sublist_name, sub.scene_num, sub.package_and_rules
- from scene_package_sublist sub
- where sub.root_id = #{packageId,jdbcType=VARCHAR}
- order by sub.seq
- </select>
- <!--查询场景包id下最后一级所有指标和场景-->
- <select id="selectSubListByPid" parameterType="string"
- resultType="api.common.pojo.vo.project.ScenePackageSubListVO">
- select sublist_id,
- parent_id,
- sublist_name,
- scene_num,
- scene_natural_ids,
- scene_traffic_ids,
- scene_statue_ids,
- scene_generalization_ids
- from scene_package_sublist
- where package_and_rules != null
- and package_and_rules != ''
- and root_id = #{id,jdbcType=VARCHAR}
- and is_deleted = '0'
- </select>
- <!--保存项目最后一级指标信息-->
- <insert id="insertSimulationMptLastTargetScorePo"
- parameterType="api.common.pojo.po.project.SimulationMptLastTargetScorePo">
- insert into simulation_mpt_last_target_score
- (id,
- p_id,
- target,
- create_time,
- create_user_id,
- modify_time,
- modify_user_id,
- is_deleted)
- values (#{id,jdbcType=VARCHAR}
- #{pId,jdbcType=VARCHAR}
- #{target,jdbcType=VARCHAR}
- #{createTime,jdbcType=TIMESTAMP},
- #{createUserId,jdbcType=VARCHAR},
- #{modifyTime,jdbcType=TIMESTAMP},
- #{modifyUserId,jdbcType=VARCHAR},
- #{isDeleted,jdbcType=VARCHAR})
- </insert>
- <!--保存第一级指标信息-->
- <insert id="insertSimulationMptFirstTargetScorePo"
- parameterType="api.common.pojo.po.project.SimulationMptFirstTargetScorePo">
- insert into simulation_mpt_first_target_score
- (id,
- p_id,
- target,
- create_time,
- create_user_id,
- modify_time,
- modify_user_id,
- is_deleted)
- values (#{id,jdbcType=VARCHAR}
- #{pId,jdbcType=VARCHAR}
- #{target,jdbcType=VARCHAR}
- #{createTime,jdbcType=TIMESTAMP},
- #{createUserId,jdbcType=VARCHAR},
- #{modifyTime,jdbcType=TIMESTAMP},
- #{modifyUserId,jdbcType=VARCHAR},
- #{isDeleted,jdbcType=VARCHAR})
- </insert>
- <!--查询场景得分-->
- <select id="selectSceneScore" parameterType="api.common.pojo.po.project.SimulationMptSceneScorePo"
- resultType="api.common.pojo.po.project.SimulationMptSceneScorePo">
- select score, target_evaluate
- from simulation_mpt_scene_score
- where p_id = #{pId,jdbcType=VARCHAR} and is_deleted = '0'
- <if test="sceneId != null and sceneId != ''">
- and scene_id = #{sceneId,jdbcType=VARCHAR}
- </if>
- </select>
- <!--获取人员信息-->
- <select id="selectUserById" resultType="api.common.pojo.vo.project.SystemUserVo">
- select *
- from system_user
- where id = #{id,jdbcType=VARCHAR}
- </select>
- <!--查询所有指标得分-->
- <select id="selectSubScore" parameterType="api.common.pojo.param.project.SimulationManualProjectParam"
- resultType="api.common.pojo.vo.project.SublistScoreVo">
- select sub.sublist_id as id,
- sub.parent_id,
- sub.sublist_name,
- sub.scene_num,
- fir.score as firScore,
- las.score as lasScore,
- sub.package_and_rules,
- las.not_standard_scene_num,
- las.score_explain
- from scene_package_sublist sub
- left JOIN simulation_mpt_first_target_score fir
- on fir.target = sub.sublist_id and fir.p_id = #{id,jdbcType=VARCHAR}
- left JOIN simulation_mpt_last_target_score las
- on las.target = sub.sublist_id and las.p_id = #{id,jdbcType=VARCHAR}
- where sub.root_id = #{packageId,jdbcType=VARCHAR}
- and (fir.target is not null or las.target is not null)
- order by sub.seq
- </select>
- <!--查询所有指标得分-->
- <select id="selectSubScore2" parameterType="api.common.pojo.param.project.SimulationManualProjectParam"
- resultType="api.common.pojo.vo.project.SublistScoreVo">
- select sub.sublist_id as id,
- sub.parent_id,
- sub.sublist_name,
- sub.scene_num,
- fir.score as firScore,
- las.score as lasScore,
- sub.package_and_rules,
- las.not_standard_scene_num,
- las.score_explain,
- fir.target as firTarget,
- las.target as lasTarget
- from scene_package_sublist sub
- left join simulation_mpt_first_target_score fir
- on fir.target = sub.sublist_id and fir.p_id = #{id,jdbcType=VARCHAR}
- left join simulation_mpt_last_target_score las
- on las.target = sub.sublist_id and las.p_id = #{id,jdbcType=VARCHAR}
- where sub.root_id = #{packageId,jdbcType=VARCHAR}
- order by sub.seq
- </select>
- <!--运行项目状态-->
- <select id="selectRunProjectByState" parameterType="java.util.Map" resultType="java.util.Map">
- select count(1) num, temp.now_run_state nowRunState
- from (select now_run_state, create_user_id
- from simulation_manual_project
- where is_deleted = 0
- union all
- select now_run_state, create_user_id
- from simulation_automatic_subproject
- where is_deleted = 0) temp
- <if test="createUserId != null and createUserId != ''">
- where temp.create_user_id = '#{createUserId}'
- </if>
- group by now_run_state
- </select>
- <!--评测等级分布-->
- <select id="selectEvaluationLevel" parameterType="java.util.Map" resultType="java.util.Map">
- select count(evaluation_level) num,evaluation_level evaluationLevel from simulation_manual_project
- where
- is_deleted = '0' and evaluation_level is not null
- <if test="createUserId != null and createUserId != ''">
- and create_user_id=#{createUserId,jdbcType=VARCHAR}
- </if>
- group by evaluation_level
- </select>
- <!--添加第三方算法信息到算发表-->
- <insert id="insertOtherAlgorithm" parameterType="api.common.pojo.po.algorithm.AlgorithmPO">
- insert into algorithm
- (id,
- algorithm_name,
- upload_mode,
- is_deleted)
- values (id = #{id,jdbcType=VARCHAR},
- algorithm_name = #{algorithmName,jdbcType=VARCHAR},
- upload_mode = #{uploadMode,jdbcType=VARCHAR},
- is_deleted = #{isDeleted,jdbcType=VARCHAR},)
- </insert>
- <!--更新第三方算法信息到算法表-->
- <update id="updateOtherAlgorithm" parameterType="api.common.pojo.po.algorithm.AlgorithmPO">
- update algorithm
- set algorithm_name=#{algorithmName,jdbcType=VARCHAR}
- where id = #{id,jdbcType=VARCHAR}
- and is_deleted = '0'
- </update>
- <!--查询第三方算法信息是否已经存在-->
- <select id="selectalgorithmByQuery" parameterType="api.common.pojo.po.algorithm.AlgorithmPO"
- resultType="api.common.pojo.po.algorithm.AlgorithmPO">
- select id, algorithmName
- from algorithm
- where id = #{id,jdbcType=VARCHAR}
- and is_deleted = '0'
- </select>
- <!--根据算法id获取最新的一条报告id-->
- <select id="selectProjectReportIdByAlgorithmId" parameterType="string"
- resultType="api.common.pojo.po.project.SimulationManualProjectPo">
- select id
- from simulation_manual_project
- where algorithm = #{algorithmId,jdbcType=VARCHAR}
- and is_deleted = '0'
- and now_run_state = '30'
- order by finish_time desc limit 1
- </select>
- </mapper>
|