SimulationProjectMapper.xml 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
  3. <mapper namespace="com.css.simulation.resource.project.mapper.SimulationProjectMapper" >
  4. <!--添加-->
  5. <insert id="add" parameterType="api.common.pojo.po.project.SimulationManualProjectPo">
  6. insert into simulation_manual_project
  7. (
  8. id,
  9. project_date,
  10. project_num,
  11. project_id,
  12. project_name,
  13. project_describe,
  14. algorithm,
  15. algorithm_type,
  16. vehicle,
  17. scene,
  18. operation_cycle,
  19. parallelism,
  20. rule_view,
  21. is_choice_gpu,
  22. automatic_run_times,
  23. last_run_time,
  24. automatic_run_state,
  25. now_run_state,
  26. evaluation_level,
  27. finish_time,
  28. max_simulation_time,
  29. create_time,
  30. create_user_id,
  31. modify_time,
  32. modify_user_id,
  33. is_deleted
  34. )
  35. values
  36. (
  37. #{id,jdbcType=VARCHAR},
  38. #{projectDate,jdbcType=INTEGER},
  39. #{projectNum,jdbcType=INTEGER},
  40. #{projectId,jdbcType=VARCHAR},
  41. #{projectName,jdbcType=VARCHAR},
  42. #{projectDescribe,jdbcType=VARCHAR},
  43. #{algorithm,jdbcType=VARCHAR},
  44. #{algorithmType,jdbcType=VARCHAR},
  45. #{vehicle,jdbcType=VARCHAR},
  46. #{scene,jdbcType=VARCHAR},
  47. #{operationCycle,jdbcType=VARCHAR},
  48. #{parallelism,jdbcType=VARCHAR},
  49. #{ruleView,jdbcType=VARCHAR},
  50. #{isChoiceGpu,jdbcType=VARCHAR},
  51. #{automaticRunTimes,jdbcType=BIGINT},
  52. #{lastRunTime,jdbcType=TIMESTAMP},
  53. #{automaticRunState,jdbcType=VARCHAR},
  54. #{nowRunState,jdbcType=VARCHAR},
  55. #{evaluationLevel,jdbcType=VARCHAR},
  56. #{finishTime,jdbcType=TIMESTAMP},
  57. #{maxSimulationTime,jdbcType=BIGINT},
  58. #{createTime,jdbcType=TIMESTAMP},
  59. #{createUserId,jdbcType=VARCHAR},
  60. #{modifyTime,jdbcType=TIMESTAMP},
  61. #{modifyUserId,jdbcType=VARCHAR},
  62. #{isDeleted,jdbcType=VARCHAR}
  63. )
  64. </insert>
  65. <!--修改-->
  66. <update id="update" parameterType="api.common.pojo.po.project.SimulationManualProjectPo">
  67. update simulation_manual_project
  68. set
  69. project_name = #{projectName,jdbcType=VARCHAR},
  70. project_describe = #{projectDescribe,jdbcType=VARCHAR},
  71. algorithm = #{algorithm,jdbcType=VARCHAR},
  72. algorithm_type = #{algorithmType,jdbcType=VARCHAR},
  73. vehicle = #{vehicle,jdbcType=VARCHAR},
  74. scene = #{scene,jdbcType=VARCHAR},
  75. max_simulation_time = #{maxSimulationTime,jdbcType=BIGINT},
  76. parallelism = #{parallelism,jdbcType=VARCHAR},
  77. is_choice_gpu = #{isChoiceGpu,jdbcType=VARCHAR}
  78. where id = #{id,jdbcType=VARCHAR} and is_deleted = '0'
  79. </update>
  80. <!--查询项目最新id-->
  81. <select id="selectLastProjectId" resultType="api.common.pojo.po.project.SimulationManualProjectPo">
  82. select project_date, project_num, project_id
  83. from simulation_manual_project
  84. where project_date=#{nowRq,jdbcType=INTEGER} and is_deleted = '0'
  85. order by project_date desc, project_num desc
  86. limit 1
  87. </select>
  88. <!--查询项目列表-->
  89. <select id="selectProject" parameterType="api.common.pojo.param.project.SimulationManualProjectParam" resultType="api.common.pojo.po.project.SimulationManualProjectPo">
  90. select * from simulation_manual_project
  91. <where>
  92. is_deleted = '0'
  93. <if test="projectId != null and projectId != ''">
  94. and project_id like CONCAT('%',#{project_id,jdbcType=VARCHAR},'%')
  95. </if>
  96. <if test="projectName != null and projectName != ''">
  97. and project_name like CONCAT('%',#{project_name,jdbcType=VARCHAR},'%')
  98. </if>
  99. <if test="nowRunState != null and nowRunState != ''">
  100. and now_run_state = #{nowRunState}
  101. </if>
  102. <if test="evaluationLevel != null and evaluationLevel != ''">
  103. and evaluation_level = #{evaluationLevel}
  104. </if>
  105. <if test="createTimeStart != null">
  106. and create_time &gt;= #{createTimeStart,jdbcType=TIMESTAMP}
  107. </if>
  108. <if test="createTimeEnd != null">
  109. and create_time &lt;= #{createTimeEnd,jdbcType=TIMESTAMP}
  110. </if>
  111. <if test="finishTimeStart != null">
  112. and finish_time &gt;= #{finishTimeStart,jdbcType=TIMESTAMP}
  113. </if>
  114. <if test="finishTimeEnd != null">
  115. and finish_time &lt;= #{finishTimeEnd,jdbcType=TIMESTAMP}
  116. </if>
  117. <if test="isDeleted != null and isDeleted != ''">
  118. and is_deleted = #{isDeleted,jdbcType=VARCHAR}
  119. </if>
  120. </where>
  121. order by project_date desc, project_num desc, modify_time desc
  122. </select>
  123. <!--查询项目列表-->
  124. <select id="selectProjectList" parameterType="api.common.pojo.param.project.SimulationManualProjectParam" resultType="api.common.pojo.vo.project.SimulationManualProjectVo">
  125. select * from simulation_manual_project
  126. <where>
  127. is_deleted = '0'
  128. <if test="projectId != null and projectId != ''">
  129. and project_id like CONCAT('%',#{projectId,jdbcType=VARCHAR},'%')
  130. </if>
  131. <if test="projectName != null and projectName != ''">
  132. and project_name like CONCAT('%',#{projectName,jdbcType=VARCHAR},'%')
  133. </if>
  134. <if test="nowRunState != null and nowRunState != ''">
  135. and now_run_state = #{nowRunState}
  136. </if>
  137. <if test="evaluationLevel != null and evaluationLevel != ''">
  138. and evaluation_level = #{evaluationLevel}
  139. </if>
  140. <if test="createTimeStart != null">
  141. and create_time &gt;= #{createTimeStart,jdbcType=TIMESTAMP}
  142. </if>
  143. <if test="createTimeEnd != null">
  144. and create_time &lt;= #{createTimeEnd,jdbcType=TIMESTAMP}
  145. </if>
  146. <if test="finishTimeStart != null">
  147. and finish_time &gt;= #{finishTimeStart,jdbcType=TIMESTAMP}
  148. </if>
  149. <if test="finishTimeEnd != null">
  150. and finish_time &lt;= #{finishTimeEnd,jdbcType=TIMESTAMP}
  151. </if>
  152. <if test="isDeleted != null and isDeleted != ''">
  153. and is_deleted = #{isDeleted,jdbcType=VARCHAR}
  154. </if>
  155. </where>
  156. order by project_date desc, project_num desc, modify_time desc
  157. </select>
  158. <!--根据id查询-->
  159. <select id="selectProjectById" parameterType="api.common.pojo.param.project.SimulationManualProjectParam" resultType="api.common.pojo.po.project.SimulationManualProjectPo">
  160. select * from simulation_manual_project where id = #{id,jdbcType=VARCHAR} and is_deleted = '0'
  161. </select>
  162. <!--根据项目名查询工作信息-->
  163. <select id="selectProjectByName" parameterType="api.common.pojo.param.project.SimulationManualProjectParam" resultType="api.common.pojo.po.project.SimulationManualProjectPo">
  164. select *
  165. from simulation_manual_project
  166. where project_name = #{projectName,jdbcType=VARCHAR} and is_deleted = '0'
  167. </select>
  168. <!--根据id查询基本信息-->
  169. <select id="selectProjectBaseById" parameterType="api.common.pojo.param.project.SimulationManualProjectParam" resultType="api.common.pojo.po.project.SimulationManualProjectPo">
  170. select id,algorithm,scene,algorithm_score
  171. from simulation_manual_project where id = #{id,jdbcType=VARCHAR} and is_deleted = '0'
  172. </select>
  173. <!--删除-->
  174. <update id="deleteProject">
  175. update simulation_manual_project
  176. set is_deleted='1'
  177. where id in
  178. <foreach collection="array" open="(" separator="," close=")" item="id">
  179. #{id,jdbcType=VARCHAR}
  180. </foreach>
  181. </update>
  182. <!--查询项目状态-->
  183. <select id="selectProjectNowRunState" resultType="api.common.pojo.po.project.SimulationManualProjectPo">
  184. select now_run_state
  185. from simulation_manual_project
  186. where
  187. is_deleted='0' and
  188. id in
  189. <foreach collection="array" open="(" separator="," close=")" item="id">
  190. #{id,jdbcType=VARCHAR}
  191. </foreach>
  192. </select>
  193. <!--修改运行状态-->
  194. <update id="updateProjectNowRunState" parameterType="api.common.pojo.param.project.SimulationManualProjectParam">
  195. update simulation_manual_project
  196. <set>
  197. <if test="nowRunState != null and nowRunState != ''">
  198. now_run_state = #{nowRunState,jdbcType=VARCHAR},
  199. </if>
  200. <if test="startTime != null">
  201. start_time=#{startTime,jdbcType=TIMESTAMP},
  202. </if>
  203. <if test="finishTime != null">
  204. finish_time=#{finishTime,jdbcType=TIMESTAMP},
  205. </if>
  206. </set>
  207. where id = #{id,jdbcType=VARCHAR} and is_deleted = '0'
  208. </update>
  209. <!--获取算法基本信息 /*where a.share = '0' and a.is_deleted = '0'*/-->
  210. <select id="selectAlgorithmBaseInfoById" parameterType="string" resultType="api.common.pojo.po.algorithm.AlgorithmPO">
  211. select a.id, a.algorithm_name, a.description
  212. from algorithm a
  213. where a.is_deleted = '0'
  214. <if test="id != null and id != ''">
  215. and a.id = #{id,jdbcType=VARCHAR}
  216. </if>
  217. </select>
  218. <!--获取车辆基本信息-->
  219. <select id="selectVehicleBaseInfoById" parameterType="string" resultType="api.common.pojo.po.model.VehiclePO">
  220. select a.id, a.vehicle_name, a.description, a.vehicle_top_view
  221. from model_vehicle a
  222. where is_deleted = '0'
  223. <if test="id != null and id != ''">
  224. and a.id = #{id,jdbcType=VARCHAR}
  225. </if>
  226. </select>
  227. <!--获取车辆配置信息-->
  228. <select id="selectConfigVehicle" parameterType="string" resultType="api.common.pojo.po.model.ConfigPO">
  229. select id, config_name, vehicle_id
  230. from model_config
  231. where share = '0' and is_deleted = '0'
  232. <if test="id != null and id != ''">
  233. and id = #{id,jdbcType=VARCHAR}
  234. </if>
  235. </select>
  236. <!--查询车辆配置传感器信息-->
  237. <select id="selectConfigSensor" parameterType="string" resultType="api.common.pojo.po.model.ConfigSensorPO">
  238. select sensor_type
  239. from relation_config_sensor
  240. where is_deleted = '0'
  241. <if test="id != null and id != ''">
  242. and config_id = #{id,jdbcType=VARCHAR}
  243. </if>
  244. group by sensor_type
  245. </select>
  246. <!--获取场景包基本信息-->
  247. <select id="selectScenePackageBaseById" parameterType="string" resultType="api.common.pojo.po.scene.ScenePackagePO">
  248. select a.package_id,a.package_name, a.scene_num
  249. from scene_package a
  250. where a.share = '0' and a.is_deleted = '0'
  251. <if test="id != null and id != ''">
  252. and a.package_id = #{id,jdbcType=VARCHAR}
  253. </if>
  254. </select>
  255. <!--查询车辆与传感器关联信息-->
  256. <select id="selectVehicleSensor" parameterType="string" resultType="api.common.pojo.po.model.ConfigSensorPO">
  257. select
  258. sensor_id,
  259. sensor_type,
  260. config_id,
  261. sensor_x,
  262. sensor_y,
  263. sensor_z,
  264. sensor_h,
  265. sensor_p,
  266. sensor_r,
  267. sensor_port
  268. from relation_config_sensor
  269. where config_id = #{id,jdbcType=VARCHAR} and is_deleted = '0'
  270. </select>
  271. <!--摄像头基本信息-->
  272. <select id="selectSensorCamera" parameterType="string" resultType="api.common.pojo.vo.project.SensorBaseInfoVo">
  273. select a.sensor_name, description as sensorDescription
  274. from model_sensor_camera a
  275. where a.id = #{id,jdbcType=VARCHAR}
  276. </select>
  277. <!--完美传感器基本信息-->
  278. <select id="selectSensorOgt" parameterType="string" resultType="api.common.pojo.vo.project.SensorBaseInfoVo">
  279. select a.sensor_name, description as sensorDescription
  280. from model_sensor_ogt a
  281. where a.id = #{id,jdbcType=VARCHAR}
  282. </select>
  283. <!--激光雷达基本信息-->
  284. <select id="selectSensorLidar" parameterType="string" resultType="api.common.pojo.vo.project.SensorBaseInfoVo">
  285. select a.sensor_name, description as sensorDescription
  286. from model_sensor_lidar a
  287. where a.id = #{id,jdbcType=VARCHAR}
  288. </select>
  289. <!--毫米波雷达基本信息-->
  290. <select id="selectSensorRadar" parameterType="string" resultType="api.common.pojo.vo.project.SensorBaseInfoVo">
  291. select a.name as sensor_name, description as sensorDescription
  292. from model_sensor_radar a
  293. where a.id = #{id,jdbcType=VARCHAR}
  294. </select>
  295. <!--gps基本信息-->
  296. <select id="selectSensorGps" parameterType="string" resultType="api.common.pojo.vo.project.SensorBaseInfoVo">
  297. select a.sensor_name, description as sensorDescription
  298. from model_sensor_gps a
  299. where a.id = #{id,jdbcType=VARCHAR}
  300. </select>
  301. <!--查询交通事故场景信息-->
  302. <select id="selectSceneAccidentById" parameterType="string" resultType="api.common.pojo.vo.project.SceneBaseInfoVo">
  303. select scene_name
  304. from scene_accident
  305. where accident_id = #{id,jdbcType=VARCHAR} and is_deleted = '0'
  306. </select>
  307. <!--查询自然场景信息-->
  308. <select id="selectSceneNatural" parameterType="string" resultType="api.common.pojo.vo.project.SceneBaseInfoVo">
  309. select natural_name
  310. from scene_natural
  311. where natural_id = #{id,jdbcType=VARCHAR} and is_deleted = '0'
  312. </select>
  313. <!--查询标准法规场景信息-->
  314. <select id="selectSceneStandardsRegulations" parameterType="string" resultType="api.common.pojo.vo.project.SceneBaseInfoVo">
  315. select scene_name
  316. from scene_standards_regulations
  317. where regulations_id = #{id,jdbcType=VARCHAR} and is_deleted = '0'
  318. </select>
  319. <!--根据场景包id获取场景子集-->
  320. <select id="selectSubSceneByPid" parameterType="string" resultType="api.common.pojo.vo.project.ScenePackageSubListVO">
  321. select sublist_id,sublist_name,scene_num,weight,parent_id,scene_natural_ids,scene_traffic_ids,scene_statue_ids,scene_generalization_ids
  322. from scene_package_sublist
  323. where parent_id = #{id,jdbcType=VARCHAR} and is_deleted = '0'
  324. order by seq desc
  325. </select>
  326. <!--获取指标信息-->
  327. <select id="selectsublistBySublistId" parameterType="string" resultType="api.common.pojo.vo.project.ScenePackageSubListVO">
  328. select sublist_id,sublist_name,scene_num,weight,parent_id,scene_natural_ids,scene_traffic_ids,scene_statue_ids,scene_generalization_ids
  329. from scene_package_sublist
  330. where sublist_id = #{id,jdbcType=VARCHAR} and is_deleted = '0'
  331. order by seq desc
  332. </select>
  333. <!--查询场景包id下最后一级所有指标和场景-->
  334. <select id="selectSubListByPid" parameterType="string" resultType="api.common.pojo.vo.project.ScenePackageSubListVO">
  335. select
  336. sublist_id,
  337. parent_id,
  338. sublist_name,
  339. scene_num,
  340. scene_natural_ids,
  341. scene_traffic_ids,
  342. scene_statue_ids,
  343. scene_generalization_ids
  344. from scene_package_sublist
  345. where package_and_rules != null
  346. and package_and_rules != ''
  347. and root_id = #{id,jdbcType=VARCHAR}
  348. and is_deleted = '0'
  349. </select>
  350. <!--保存项目最后一级指标信息-->
  351. <insert id="insertSimulationMptLastTargetScorePo" parameterType="api.common.pojo.po.project.SimulationMptLastTargetScorePo">
  352. insert into simulation_mpt_last_target_score
  353. (
  354. id,
  355. p_id,
  356. target,
  357. create_time,
  358. create_user_id,
  359. modify_time,
  360. modify_user_id,
  361. is_deleted
  362. )
  363. values
  364. (
  365. #{id,jdbcType=VARCHAR}
  366. #{pId,jdbcType=VARCHAR}
  367. #{target,jdbcType=VARCHAR}
  368. #{createTime,jdbcType=TIMESTAMP},
  369. #{createUserId,jdbcType=VARCHAR},
  370. #{modifyTime,jdbcType=TIMESTAMP},
  371. #{modifyUserId,jdbcType=VARCHAR},
  372. #{isDeleted,jdbcType=VARCHAR}
  373. )
  374. </insert>
  375. <!--保存第一级指标信息-->
  376. <insert id="insertSimulationMptFirstTargetScorePo" parameterType="api.common.pojo.po.project.SimulationMptFirstTargetScorePo">
  377. insert into simulation_mpt_first_target_score
  378. (
  379. id,
  380. p_id,
  381. target,
  382. create_time,
  383. create_user_id,
  384. modify_time,
  385. modify_user_id,
  386. is_deleted
  387. )
  388. values
  389. (
  390. #{id,jdbcType=VARCHAR}
  391. #{pId,jdbcType=VARCHAR}
  392. #{target,jdbcType=VARCHAR}
  393. #{createTime,jdbcType=TIMESTAMP},
  394. #{createUserId,jdbcType=VARCHAR},
  395. #{modifyTime,jdbcType=TIMESTAMP},
  396. #{modifyUserId,jdbcType=VARCHAR},
  397. #{isDeleted,jdbcType=VARCHAR}
  398. )
  399. </insert>
  400. <!--查询场景得分-->
  401. <select id="selectSceneScore" parameterType="api.common.pojo.po.project.SimulationMptSceneScorePo" resultType="api.common.pojo.po.project.SimulationMptSceneScorePo">
  402. select score, target_evaluate
  403. from simulation_mpt_scene_score
  404. where p_id = #{pId,jdbcType=VARCHAR} and is_deleted = '0'
  405. <if test="sceneId != null and sceneId != ''">
  406. and scene_id = #{sceneId,jdbcType=VARCHAR}
  407. </if>
  408. </select>
  409. <!--获取人员信息-->
  410. <select id="selectUserById" resultType="api.common.pojo.vo.project.SystemUserVo">
  411. select *
  412. from system_user
  413. where id = #{id,jdbcType=VARCHAR}
  414. </select>
  415. <!--查询所有指标得分-->
  416. <select id="selectSubScore" parameterType="string" resultType="api.common.pojo.vo.project.SublistScoreVo">
  417. select sub.sublist_id as id, sub.parent_id, sub.sublist_name,sub.scene_num,
  418. fir.score as firScore,las.score as lasScore, sub.package_and_rules, las.not_standard_scene_num, las.score_explain
  419. from scene_package_sublist sub
  420. left JOIN simulation_mpt_first_target_score fir on fir.target=sub.sublist_id
  421. left JOIN simulation_mpt_last_target_score las on las.target = sub.sublist_id
  422. where sub.root_id = #{id,jdbcType=VARCHAR} and sub.is_deleted='0'
  423. order by seq
  424. </select>
  425. <!--查询某天运行项目数量-->
  426. <select id="selectRunProjectBySy" parameterType="java.util.Map" resultType="java.lang.Integer">
  427. select count(id) from simulation_manual_project
  428. where
  429. is_deleted = '0'
  430. <if test="createUserId != null and createUserId != ''">
  431. and create_user_id=#{createUserId,jdbcType=VARCHAR}
  432. </if>
  433. <if test="startDate != null">
  434. and start_time &gt;= #{startDate}
  435. </if>
  436. <if test="endDate != null">
  437. and start_time &lt;= #{endDate}
  438. </if>
  439. </select>
  440. <!--运行项目状态-->
  441. <select id="selectRunProjectByState" parameterType="java.util.Map" resultType="java.util.Map">
  442. select count(now_run_state) num,now_run_state nowRunState from simulation_manual_project
  443. where
  444. is_deleted = '0'
  445. <if test="createUserId != null and createUserId != ''">
  446. and create_user_id=#{createUserId,jdbcType=VARCHAR}
  447. </if>
  448. group by now_run_state
  449. </select>
  450. <!--评测等级分布-->
  451. <select id="selectEvaluationLevel" parameterType="java.util.Map" resultType="java.util.Map">
  452. select count(evaluation_level) num,evaluation_level evaluationLevel from simulation_manual_project
  453. where
  454. is_deleted = '0' and evaluation_level is not null
  455. <if test="createUserId != null and createUserId != ''">
  456. and create_user_id=#{createUserId,jdbcType=VARCHAR}
  457. </if>
  458. group by evaluation_level
  459. </select>
  460. <!--添加第三方算法信息到算发表-->
  461. <insert id="insertOtherAlgorithm" parameterType="api.common.pojo.po.algorithm.AlgorithmPO">
  462. insert into algorithm
  463. (
  464. id,
  465. algorithm_name,
  466. upload_mode,
  467. is_deleted
  468. )
  469. values
  470. (
  471. id=#{id,jdbcType=VARCHAR},
  472. algorithm_name=#{algorithmName,jdbcType=VARCHAR},
  473. upload_mode=#{uploadMode,jdbcType=VARCHAR},
  474. is_deleted=#{isDeleted,jdbcType=VARCHAR},
  475. )
  476. </insert>
  477. <!--更新第三方算法信息到算法表-->
  478. <update id="updateOtherAlgorithm" parameterType="api.common.pojo.po.algorithm.AlgorithmPO">
  479. update algorithm
  480. set algorithm_name=#{algorithmName,jdbcType=VARCHAR}
  481. where id=#{id,jdbcType=VARCHAR}
  482. and is_deleted = '0'
  483. </update>
  484. <!--查询第三方算法信息是否已经存在-->
  485. <select id="selectalgorithmByQuery" parameterType="api.common.pojo.po.algorithm.AlgorithmPO" resultType="api.common.pojo.po.algorithm.AlgorithmPO">
  486. select id, algorithmName
  487. from algorithm
  488. where id=#{id,jdbcType=VARCHAR}
  489. and is_deleted = '0'
  490. </select>
  491. <!--根据算法id获取最新的一条报告id-->
  492. <select id="selectProjectReportIdByAlgorithmId" parameterType="string" resultType="api.common.pojo.po.project.SimulationManualProjectPo">
  493. select id
  494. from simulation_manual_project
  495. where algorithm = #{algorithmId,jdbcType=VARCHAR} and is_deleted = '0' and now_run_state='30'
  496. order by finish_time desc
  497. limit 1
  498. </select>
  499. </mapper>