SceneNaturalMapper.xml 130 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740
  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.scene.mapper.SceneNaturalMapper">
  4. <insert id="saveSceneNatural" parameterType="api.common.pojo.po.scene.SceneNaturalPO">
  5. insert into simulation.scene_natural
  6. (natural_id, natural_name, weather, backlight,
  7. light_change, road_type, road_matrrial, driveway_num,
  8. driveway_type, road_flatness, road_curvature, ramp,
  9. intersection_type, plane_intersection, bridge, tunnel,
  10. speed_limit, min_speed_limit, no_entry, no_stopping,
  11. left_lane_line, right_lane_line, conductor_marking, pedestrian_crossing,
  12. traffic_light, deceleration_marking, pavement_condition, natural_disaster,
  13. road_safety_signs, safety_warning_board, traffic_accident, patency,
  14. special_vehicle_yield, violation, double_flashing_car, self_behavior,
  15. target_behavior, create_user_id, create_time, modify_user_id, modify_time,
  16. is_deleted, share, video_preview, video_address, osgb_address, xodr_address, xosc_address,
  17. json_address, max_time)
  18. values (#{naturalId,jdbcType=VARCHAR}, #{naturalName,jdbcType=VARCHAR}, #{weather,jdbcType=VARCHAR},
  19. #{backlight,jdbcType=VARCHAR},
  20. #{lightChange,jdbcType=VARCHAR}, #{roadType,jdbcType=VARCHAR}, #{roadMatrrial,jdbcType=VARCHAR},
  21. #{drivewayNum,jdbcType=VARCHAR},
  22. #{drivewayType,jdbcType=VARCHAR}, #{roadFlatness,jdbcType=VARCHAR}, #{roadCurvature,jdbcType=VARCHAR},
  23. #{ramp,jdbcType=VARCHAR},
  24. #{intersectionType,jdbcType=VARCHAR}, #{planeIntersection,jdbcType=VARCHAR}, #{bridge,jdbcType=VARCHAR},
  25. #{tunnel,jdbcType=VARCHAR},
  26. #{speedLimit,jdbcType=VARCHAR}, #{minSpeedLimit,jdbcType=VARCHAR}, #{noEntry,jdbcType=VARCHAR},
  27. #{noStopping,jdbcType=VARCHAR},
  28. #{leftLaneLine,jdbcType=VARCHAR}, #{rightLaneLine,jdbcType=VARCHAR},
  29. #{conductorMarking,jdbcType=VARCHAR}, #{pedestrianCrossing,jdbcType=VARCHAR},
  30. #{trafficLight,jdbcType=VARCHAR}, #{decelerationMarking,jdbcType=VARCHAR},
  31. #{pavementCondition,jdbcType=VARCHAR}, #{naturalDisaster,jdbcType=VARCHAR},
  32. #{roadSafetySigns,jdbcType=VARCHAR}, #{safetyWarningBoard,jdbcType=VARCHAR},
  33. #{trafficAccident,jdbcType=VARCHAR}, #{patency,jdbcType=VARCHAR},
  34. #{specialVehicleYield,jdbcType=VARCHAR}, #{violation,jdbcType=VARCHAR},
  35. #{doubleFlashingCar,jdbcType=VARCHAR}, #{selfBehavior,jdbcType=VARCHAR},
  36. #{targetBehavior,jdbcType=VARCHAR}, #{createUserId,jdbcType=VARCHAR}, #{createTime},
  37. #{modifyUserId,jdbcType=VARCHAR}, #{modifyTime},
  38. #{isDeleted,jdbcType=VARCHAR}, #{share,jdbcType=VARCHAR}, #{videoPreview,jdbcType=VARCHAR},
  39. #{videoAddress,jdbcType=VARCHAR}, #{osgbAddress,jdbcType=VARCHAR},
  40. #{xodrAddress,jdbcType=VARCHAR}, #{xoscAddress,jdbcType=VARCHAR}, #{jsonAddress,jdbcType=VARCHAR},
  41. #{maxTime,jdbcType=VARCHAR})
  42. </insert>
  43. <insert id="saveSceneNaturalList" parameterType="java.lang.String">
  44. insert into simulation.scene_natural
  45. (natural_id,natural_name,weather,backlight,
  46. light_change,road_type,road_matrrial,driveway_num,
  47. driveway_type,road_flatness,road_curvature,ramp,
  48. intersection_type,plane_intersection,bridge,tunnel,
  49. speed_limit,min_speed_limit,no_entry,no_stopping,
  50. left_lane_line,right_lane_line,conductor_marking,pedestrian_crossing,
  51. traffic_light,deceleration_marking,pavement_condition,natural_disaster,
  52. road_safety_signs,safety_warning_board,traffic_accident,patency,
  53. special_vehicle_yield,violation,double_flashing_car,self_behavior,
  54. target_behavior,create_user_id,create_time,modify_user_id,modify_time,
  55. is_deleted,share,video_preview,video_address,osgb_address,xodr_address,xosc_address,
  56. json_address,max_time)
  57. values
  58. <foreach collection="list" index="index" item="item" separator=",">
  59. (#{item.naturalId,jdbcType=VARCHAR},#{item.naturalName,jdbcType=VARCHAR},#{item.weather,jdbcType=VARCHAR},
  60. #{item.backlight,jdbcType=VARCHAR},
  61. #{item.lightChange,jdbcType=VARCHAR},
  62. #{item.roadType,jdbcType=VARCHAR},#{item.roadMatrrial,jdbcType=VARCHAR},#{item.drivewayNum,jdbcType=VARCHAR},
  63. #{item.drivewayType,jdbcType=VARCHAR},
  64. #{item.roadFlatness,jdbcType=VARCHAR},#{item.roadCurvature,jdbcType=VARCHAR},#{item.ramp,jdbcType=VARCHAR},
  65. #{item.intersectionType,jdbcType=VARCHAR},
  66. #{item.planeIntersection,jdbcType=VARCHAR},#{item.bridge,jdbcType=VARCHAR},#{item.tunnel,jdbcType=VARCHAR},
  67. #{item.speedLimit,jdbcType=VARCHAR},
  68. #{item.minSpeedLimit,jdbcType=VARCHAR},#{item.noEntry,jdbcType=VARCHAR},#{item.noStopping,jdbcType=VARCHAR},
  69. #{item.leftLaneLine,jdbcType=VARCHAR},
  70. #{item.rightLaneLine,jdbcType=VARCHAR},#{item.conductorMarking,jdbcType=VARCHAR},#{item.pedestrianCrossing,jdbcType=VARCHAR},
  71. #{item.trafficLight,jdbcType=VARCHAR},
  72. #{item.decelerationMarking,jdbcType=VARCHAR},#{item.pavementCondition,jdbcType=VARCHAR},#{item.naturalDisaster,jdbcType=VARCHAR},
  73. #{item.roadSafetySigns,jdbcType=VARCHAR},
  74. #{item.safetyWarningBoard,jdbcType=VARCHAR},#{item.trafficAccident,jdbcType=VARCHAR},#{item.patency,jdbcType=VARCHAR},
  75. #{item.specialVehicleYield,jdbcType=VARCHAR},
  76. #{item.violation,jdbcType=VARCHAR},#{item.doubleFlashingCar,jdbcType=VARCHAR},#{item.selfBehavior,jdbcType=VARCHAR},
  77. #{item.targetBehavior,jdbcType=VARCHAR},
  78. #{item.createUserId,jdbcType=VARCHAR},#{item.createTime},#{item.modifyUserId,jdbcType=VARCHAR},#{item.modifyTime},
  79. #{item.isDeleted,jdbcType=VARCHAR},
  80. #{item.share,jdbcType=VARCHAR},#{item.videoPreview,jdbcType=VARCHAR},#{item.videoAddress,jdbcType=VARCHAR},#{item.osgbAddress,jdbcType=VARCHAR},
  81. #{item.xodrAddress,jdbcType=VARCHAR},
  82. #{item.xoscAddress,jdbcType=VARCHAR},#{item.jsonAddress,jdbcType=VARCHAR},#{item.maxTime,jdbcType=VARCHAR})
  83. </foreach>
  84. </insert>
  85. <select id="querySceneNaturalList" parameterType="api.common.pojo.param.scene.SceneNaturalParam"
  86. resultType="api.common.pojo.po.scene.SceneNaturalPO">
  87. select
  88. natural_id,natural_name,weather,backlight,light_change,road_type,
  89. road_matrrial,driveway_num,driveway_type,road_flatness,road_curvature,
  90. ramp,intersection_type,plane_intersection,bridge,tunnel,speed_limit,
  91. min_speed_limit,no_entry,no_stopping,left_lane_line,right_lane_line,
  92. conductor_marking,pedestrian_crossing,traffic_light,deceleration_marking,
  93. pavement_condition,natural_disaster,road_safety_signs,safety_warning_board,
  94. traffic_accident,patency,special_vehicle_yield,violation,double_flashing_car,
  95. self_behavior,target_behavior,create_user_id,create_time,modify_user_id,
  96. modify_time,is_deleted,share,video_address,osgb_address,
  97. xodr_address,xosc_address,json_address,video_preview,max_time
  98. from simulation.scene_natural
  99. <where>
  100. is_deleted = '0'
  101. <if test="naturalName != null and naturalName != ''">
  102. and natural_name like CONCAT('%',#{naturalName,jdbcType=VARCHAR},'%')
  103. </if>
  104. <if test="weather != null and weather.size()>0 ">
  105. and weather in
  106. <foreach collection="weather" item="item" index="index"
  107. separator="," open="(" close=")">
  108. #{item}
  109. </foreach>
  110. </if>
  111. <if test="backlight != null and backlight.size()>0">
  112. and backlight in
  113. <foreach collection="backlight" item="item" index="index"
  114. separator="," open="(" close=")">
  115. #{item}
  116. </foreach>
  117. </if>
  118. <if test="lightChange != null and lightChange.size()>0">
  119. and light_change in
  120. <foreach collection="lightChange" item="item" index="index"
  121. separator="," open="(" close=")">
  122. #{item}
  123. </foreach>
  124. </if>
  125. <if test="roadType != null and roadType.size()>0">
  126. and road_type in
  127. <foreach collection="roadType" item="item" index="index"
  128. separator="," open="(" close=")">
  129. #{item}
  130. </foreach>
  131. </if>
  132. <if test="roadMatrrial != null and roadMatrrial.size()>0">
  133. and road_matrrial in
  134. <foreach collection="roadMatrrial" item="item" index="index"
  135. separator="," open="(" close=")">
  136. #{item}
  137. </foreach>
  138. </if>
  139. <if test="drivewayNum != null and drivewayNum.size()>0">
  140. and driveway_num in
  141. <foreach collection="drivewayNum" item="item" index="index"
  142. separator="," open="(" close=")">
  143. #{item}
  144. </foreach>
  145. </if>
  146. <if test="drivewayType != null and drivewayType.size()>0">
  147. and driveway_type in
  148. <foreach collection="drivewayType" item="item" index="index"
  149. separator="," open="(" close=")">
  150. #{item}
  151. </foreach>
  152. </if>
  153. <if test="roadFlatness != null and roadFlatness.size()>0">
  154. and road_flatness in
  155. <foreach collection="roadFlatness" item="item" index="index"
  156. separator="," open="(" close=")">
  157. #{item}
  158. </foreach>
  159. </if>
  160. <if test="roadCurvature != null and roadCurvature.size()>0">
  161. and road_curvature in
  162. <foreach collection="roadCurvature" item="item" index="index"
  163. separator="," open="(" close=")">
  164. #{item}
  165. </foreach>
  166. </if>
  167. <if test="ramp != null and ramp.size()>0">
  168. and ramp in
  169. <foreach collection="ramp" item="item" index="index"
  170. separator="," open="(" close=")">
  171. #{item}
  172. </foreach>
  173. </if>
  174. <if test="intersectionType != null and intersectionType.size()>0">
  175. and intersection_type in
  176. <foreach collection="intersectionType" item="item" index="index"
  177. separator="," open="(" close=")">
  178. #{item}
  179. </foreach>
  180. </if>
  181. <if test="planeIntersection != null and planeIntersection.size()>0">
  182. and plane_intersection in
  183. <foreach collection="planeIntersection" item="item" index="index"
  184. separator="," open="(" close=")">
  185. #{item}
  186. </foreach>
  187. </if>
  188. <if test="bridge != null and bridge.size()>0">
  189. and bridge in
  190. <foreach collection="bridge" item="item" index="index"
  191. separator="," open="(" close=")">
  192. #{item}
  193. </foreach>
  194. </if>
  195. <if test="tunnel != null and tunnel.size()>0">
  196. and tunnel in
  197. <foreach collection="tunnel" item="item" index="index"
  198. separator="," open="(" close=")">
  199. #{item}
  200. </foreach>
  201. </if>
  202. <if test="speedLimit != null and speedLimit.size()>0">
  203. and speed_limit in
  204. <foreach collection="speedLimit" item="item" index="index"
  205. separator="," open="(" close=")">
  206. #{item}
  207. </foreach>
  208. </if>
  209. <if test="minSpeedLimit != null and minSpeedLimit.size()>0">
  210. and min_speed_limit in
  211. <foreach collection="minSpeedLimit" item="item" index="index"
  212. separator="," open="(" close=")">
  213. #{item}
  214. </foreach>
  215. </if>
  216. <if test="noEntry != null and noEntry.size()>0">
  217. and no_entry in
  218. <foreach collection="noEntry" item="item" index="index"
  219. separator="," open="(" close=")">
  220. #{item}
  221. </foreach>
  222. </if>
  223. <if test="noStopping != null and noStopping.size()>0">
  224. and no_stopping in
  225. <foreach collection="noStopping" item="item" index="index"
  226. separator="," open="(" close=")">
  227. #{item}
  228. </foreach>
  229. </if>
  230. <if test="leftLaneLine != null and leftLaneLine.size()>0">
  231. and left_lane_line in
  232. <foreach collection="leftLaneLine" item="item" index="index"
  233. separator="," open="(" close=")">
  234. #{item}
  235. </foreach>
  236. </if>
  237. <if test="rightLaneLine != null and rightLaneLine.size()>0">
  238. and right_lane_line in
  239. <foreach collection="rightLaneLine" item="item" index="index"
  240. separator="," open="(" close=")">
  241. #{item}
  242. </foreach>
  243. </if>
  244. <if test="conductorMarking != null and conductorMarking.size()>0">
  245. and conductor_marking in
  246. <foreach collection="conductorMarking" item="item" index="index"
  247. separator="," open="(" close=")">
  248. #{item}
  249. </foreach>
  250. </if>
  251. <if test="pedestrianCrossing != null and pedestrianCrossing.size()>0">
  252. and pedestrian_crossing in
  253. <foreach collection="pedestrianCrossing" item="item" index="index"
  254. separator="," open="(" close=")">
  255. #{item}
  256. </foreach>
  257. </if>
  258. <if test="trafficLight != null and trafficLight.size()>0">
  259. and traffic_light in
  260. <foreach collection="trafficLight" item="item" index="index"
  261. separator="," open="(" close=")">
  262. #{item}
  263. </foreach>
  264. </if>
  265. <if test="decelerationMarking != null and decelerationMarking.size()>0">
  266. and deceleration_marking in
  267. <foreach collection="decelerationMarking" item="item" index="index"
  268. separator="," open="(" close=")">
  269. #{item}
  270. </foreach>
  271. </if>
  272. <if test="pavementCondition != null and pavementCondition.size()>0">
  273. and pavement_condition in
  274. <foreach collection="pavementCondition" item="item" index="index"
  275. separator="," open="(" close=")">
  276. #{item}
  277. </foreach>
  278. </if>
  279. <if test="naturalDisaster != null and naturalDisaster.size()>0">
  280. and natural_disaster in
  281. <foreach collection="naturalDisaster" item="item" index="index"
  282. separator="," open="(" close=")">
  283. #{item}
  284. </foreach>
  285. </if>
  286. <if test="roadSafetySigns != null and roadSafetySigns.size()>0">
  287. and road_safety_signs in
  288. <foreach collection="roadSafetySigns" item="item" index="index"
  289. separator="," open="(" close=")">
  290. #{item}
  291. </foreach>
  292. </if>
  293. <if test="safetyWarningBoard != null and safetyWarningBoard.size()>0">
  294. and safety_warning_board in
  295. <foreach collection="safetyWarningBoard" item="item" index="index"
  296. separator="," open="(" close=")">
  297. #{item}
  298. </foreach>
  299. </if>
  300. <if test="trafficAccident != null and trafficAccident.size()>0">
  301. and traffic_accident in
  302. <foreach collection="trafficAccident" item="item" index="index"
  303. separator="," open="(" close=")">
  304. #{item}
  305. </foreach>
  306. </if>
  307. <if test="patency != null and patency.size()>0">
  308. and patency in
  309. <foreach collection="patency" item="item" index="index"
  310. separator="," open="(" close=")">
  311. #{item}
  312. </foreach>
  313. </if>
  314. <if test="specialVehicleYield != null and specialVehicleYield.size()>0">
  315. and special_vehicle_yield in
  316. <foreach collection="specialVehicleYield" item="item" index="index"
  317. separator="," open="(" close=")">
  318. #{item}
  319. </foreach>
  320. </if>
  321. <if test="violation != null and violation.size()>0">
  322. and violation in
  323. <foreach collection="violation" item="item" index="index"
  324. separator="," open="(" close=")">
  325. #{item}
  326. </foreach>
  327. </if>
  328. <if test="doubleFlashingCar != null and doubleFlashingCar.size()>0">
  329. and double_flashing_car in
  330. <foreach collection="doubleFlashingCar" item="item" index="index"
  331. separator="," open="(" close=")">
  332. #{item}
  333. </foreach>
  334. </if>
  335. <if test="selfBehavior != null and selfBehavior.size()>0">
  336. and
  337. <foreach collection="selfBehavior" item="item" index="index"
  338. separator=" or " open="(" close=")">
  339. self_behavior like CONCAT('%,',#{item},',%')
  340. or self_behavior like CONCAT('%,',#{item}) or
  341. self_behavior like CONCAT(#{item},',%') or
  342. self_behavior=#{item}
  343. </foreach>
  344. </if>
  345. <if test="targetBehavior != null and targetBehavior.size()>0">
  346. and
  347. <foreach collection="targetBehavior" item="item" index="index"
  348. separator=" or " open="(" close=")">
  349. target_behavior like CONCAT('%,',#{item},',%')
  350. or target_behavior like CONCAT('%,',#{item}) or
  351. target_behavior like CONCAT(#{item},',%') or
  352. target_behavior=#{item}
  353. </foreach>
  354. </if>
  355. <if test="ids != null and ids.length>0">
  356. and natural_id in
  357. <foreach collection="ids" item="item" index="index"
  358. separator="," open="(" close=")">
  359. #{item}
  360. </foreach>
  361. </if>
  362. <if test="allSceneNames != null and allSceneNames.length>0">
  363. and natural_name in
  364. <foreach collection="allSceneNames" item="item" index="index"
  365. separator="," open="(" close=")">
  366. #{item}
  367. </foreach>
  368. </if>
  369. <if test="AllIds != null and AllIds.size()>0">
  370. and natural_id in
  371. <foreach collection="AllIds" item="item" index="index"
  372. separator="," open="(" close=")">
  373. #{item}
  374. </foreach>
  375. </if>
  376. <if test="share != null and share==0">
  377. and share =#{share}
  378. </if>
  379. <if test="share != null and share!= '' and share!=0">
  380. and share !='0'
  381. </if>
  382. <if test="userId != null and userId != ''">
  383. and create_user_id =#{userId}
  384. </if>
  385. order by create_time,natural_name desc
  386. </where>
  387. </select>
  388. <update id="deleteSceneNatural" parameterType="api.common.pojo.po.scene.SceneNaturalPO">
  389. update simulation.scene_natural
  390. <set>
  391. <if test="isDeleted != null and isDeleted!=''">
  392. is_deleted = #{isDeleted,jdbcType=VARCHAR},
  393. </if>
  394. <if test="modifyUserId != null and modifyUserId!=''">
  395. modify_user_id = #{modifyUserId,jdbcType=VARCHAR},
  396. </if>
  397. <if test="modifyTime != null">
  398. modify_time = #{modifyTime},
  399. </if>
  400. </set>
  401. where natural_id = #{naturalId,jdbcType=VARCHAR}
  402. </update>
  403. <select id="querySceneNaturaByName" parameterType="api.common.pojo.po.scene.SceneNaturalPO"
  404. resultType="api.common.pojo.po.scene.SceneNaturalPO">
  405. select natural_id,natural_name,weather,backlight,
  406. light_change,road_type,road_matrrial,driveway_num,
  407. driveway_type,road_flatness,road_curvature,ramp,
  408. intersection_type,plane_intersection,bridge,tunnel,
  409. speed_limit,min_speed_limit,no_entry,no_stopping,
  410. left_lane_line,right_lane_line,conductor_marking,pedestrian_crossing,
  411. traffic_light,deceleration_marking,pavement_condition,natural_disaster,
  412. road_safety_signs,safety_warning_board,traffic_accident,patency,
  413. special_vehicle_yield,violation,double_flashing_car,self_behavior,
  414. target_behavior,create_user_id,create_time,modify_user_id,modify_time,
  415. is_deleted,share,video_preview,video_address,osgb_address,xodr_address,xosc_address,
  416. json_address,max_time
  417. from simulation.scene_natural
  418. <where>
  419. is_deleted = '0'
  420. <if test="naturalName != null and naturalName!=''">
  421. and natural_name =#{naturalName}
  422. </if>
  423. <if test="share != null and share==0">
  424. and share =#{share}
  425. </if>
  426. <if test="share != null and share!= '' and share!=0">
  427. and share !='0'
  428. </if>
  429. </where>
  430. </select>
  431. <select id="querySceneNumBySy" parameterType="api.common.pojo.param.scene.SceneNaturalParam"
  432. resultType="java.lang.Integer">
  433. select SUM(num) from(
  434. select COUNT(1) AS num from simulation.scene_natural
  435. <where>is_deleted = '0' and share='0'
  436. <if test="createUserId != null and createUserId!=''">
  437. and create_user_id =#{createUserId}
  438. </if>
  439. </where>
  440. union all
  441. select COUNT(1) AS num from simulation.scene_accident
  442. <where>is_deleted = '0' and share='0'
  443. <if test="createUserId != null and createUserId!=''">
  444. and create_user_id =#{createUserId}
  445. </if>
  446. </where>
  447. union all
  448. select COUNT(1) AS num from simulation.scene_standards_regulations
  449. <where>is_deleted = '0' and share='0'
  450. <if test="createUserId != null and createUserId!=''">
  451. and create_user_id =#{createUserId}
  452. </if>
  453. </where>
  454. union all
  455. select COUNT(1) AS num from simulation.scene_general_template
  456. <where>is_deleted = '0' and share='0'
  457. <if test="createUserId != null and createUserId!=''">
  458. and create_user_id =#{createUserId}
  459. </if>
  460. </where>
  461. ) a
  462. </select>
  463. <select id="querySceneNaturalListByBqAndXlk" parameterType="api.common.pojo.param.scene.SceneNaturalParam"
  464. resultType="api.common.pojo.po.scene.SceneNaturalPO">
  465. select
  466. natural_id,natural_name,weather,backlight,light_change,road_type,
  467. road_matrrial,driveway_num,driveway_type,road_flatness,road_curvature,
  468. ramp,intersection_type,plane_intersection,bridge,tunnel,speed_limit,
  469. min_speed_limit,no_entry,no_stopping,left_lane_line,right_lane_line,
  470. conductor_marking,pedestrian_crossing,traffic_light,deceleration_marking,
  471. pavement_condition,natural_disaster,road_safety_signs,safety_warning_board,
  472. traffic_accident,patency,special_vehicle_yield,violation,double_flashing_car,
  473. self_behavior,target_behavior,create_user_id,create_time,modify_user_id,
  474. modify_time,is_deleted,share,video_address,osgb_address,
  475. xodr_address,xosc_address,json_address,video_preview,max_time
  476. from (
  477. select
  478. natural_id,natural_name,weather,backlight,light_change,road_type,
  479. road_matrrial,driveway_num,driveway_type,road_flatness,road_curvature,
  480. ramp,intersection_type,plane_intersection,bridge,tunnel,speed_limit,
  481. min_speed_limit,no_entry,no_stopping,left_lane_line,right_lane_line,
  482. conductor_marking,pedestrian_crossing,traffic_light,deceleration_marking,
  483. pavement_condition,natural_disaster,road_safety_signs,safety_warning_board,
  484. traffic_accident,patency,special_vehicle_yield,violation,double_flashing_car,
  485. self_behavior,target_behavior,create_user_id,create_time,modify_user_id,
  486. modify_time,is_deleted,share,video_address,osgb_address,
  487. xodr_address,xosc_address,json_address,video_preview,max_time
  488. from simulation.scene_natural
  489. <where>
  490. <if test="po.naturalName != null and po.naturalName != ''">
  491. natural_name like CONCAT('%',#{po.naturalName,jdbcType=VARCHAR},'%')
  492. </if>
  493. <if test="po.weather != null and po.weather.size()>0 ">
  494. and weather in
  495. <foreach collection="po.weather" item="item" index="index"
  496. separator="," open="(" close=")">
  497. #{item}
  498. </foreach>
  499. </if>
  500. <if test="po.backlight != null and po.backlight.size()>0">
  501. and backlight in
  502. <foreach collection="po.backlight" item="item" index="index"
  503. separator="," open="(" close=")">
  504. #{item}
  505. </foreach>
  506. </if>
  507. <if test="po.lightChange != null and po.lightChange.size()>0">
  508. and light_change in
  509. <foreach collection="po.lightChange" item="item" index="index"
  510. separator="," open="(" close=")">
  511. #{item}
  512. </foreach>
  513. </if>
  514. <if test="po.roadType != null and po.roadType.size()>0">
  515. and road_type in
  516. <foreach collection="po.roadType" item="item" index="index"
  517. separator="," open="(" close=")">
  518. #{item}
  519. </foreach>
  520. </if>
  521. <if test="po.roadMatrrial != null and po.roadMatrrial.size()>0">
  522. and road_matrrial in
  523. <foreach collection="po.roadMatrrial" item="item" index="index"
  524. separator="," open="(" close=")">
  525. #{item}
  526. </foreach>
  527. </if>
  528. <if test="po.drivewayNum != null and po.drivewayNum.size()>0">
  529. and driveway_num in
  530. <foreach collection="po.drivewayNum" item="item" index="index"
  531. separator="," open="(" close=")">
  532. #{item}
  533. </foreach>
  534. </if>
  535. <if test="po.drivewayType != null and po.drivewayType.size()>0">
  536. and driveway_type in
  537. <foreach collection="po.drivewayType" item="item" index="index"
  538. separator="," open="(" close=")">
  539. #{item}
  540. </foreach>
  541. </if>
  542. <if test="po.roadFlatness != null and po.roadFlatness.size()>0">
  543. and road_flatness in
  544. <foreach collection="po.roadFlatness" item="item" index="index"
  545. separator="," open="(" close=")">
  546. #{item}
  547. </foreach>
  548. </if>
  549. <if test="po.roadCurvature != null and po.roadCurvature.size()>0">
  550. and road_curvature in
  551. <foreach collection="po.roadCurvature" item="item" index="index"
  552. separator="," open="(" close=")">
  553. #{item}
  554. </foreach>
  555. </if>
  556. <if test="po.ramp != null and po.ramp.size()>0">
  557. and ramp in
  558. <foreach collection="po.ramp" item="item" index="index"
  559. separator="," open="(" close=")">
  560. #{item}
  561. </foreach>
  562. </if>
  563. <if test="po.intersectionType != null and po.intersectionType.size()>0">
  564. and intersection_type in
  565. <foreach collection="po.intersectionType" item="item" index="index"
  566. separator="," open="(" close=")">
  567. #{item}
  568. </foreach>
  569. </if>
  570. <if test="po.planeIntersection != null and po.planeIntersection.size()>0">
  571. and plane_intersection in
  572. <foreach collection="po.planeIntersection" item="item" index="index"
  573. separator="," open="(" close=")">
  574. #{item}
  575. </foreach>
  576. </if>
  577. <if test="po.bridge != null and po.bridge.size()>0">
  578. and bridge in
  579. <foreach collection="po.bridge" item="item" index="index"
  580. separator="," open="(" close=")">
  581. #{item}
  582. </foreach>
  583. </if>
  584. <if test="po.tunnel != null and po.tunnel.size()>0">
  585. and tunnel in
  586. <foreach collection="po.tunnel" item="item" index="index"
  587. separator="," open="(" close=")">
  588. #{item}
  589. </foreach>
  590. </if>
  591. <if test="po.speedLimit != null and po.speedLimit.size()>0">
  592. and speed_limit in
  593. <foreach collection="po.speedLimit" item="item" index="index"
  594. separator="," open="(" close=")">
  595. #{item}
  596. </foreach>
  597. </if>
  598. <if test="po.minSpeedLimit != null and po.minSpeedLimit.size()>0">
  599. and min_speed_limit in
  600. <foreach collection="po.minSpeedLimit" item="item" index="index"
  601. separator="," open="(" close=")">
  602. #{item}
  603. </foreach>
  604. </if>
  605. <if test="po.noEntry != null and po.noEntry.size()>0">
  606. and no_entry in
  607. <foreach collection="po.noEntry" item="item" index="index"
  608. separator="," open="(" close=")">
  609. #{item}
  610. </foreach>
  611. </if>
  612. <if test="po.noStopping != null and po.noStopping.size()>0">
  613. and no_stopping in
  614. <foreach collection="po.noStopping" item="item" index="index"
  615. separator="," open="(" close=")">
  616. #{item}
  617. </foreach>
  618. </if>
  619. <if test="po.leftLaneLine != null and po.leftLaneLine.size()>0">
  620. and left_lane_line in
  621. <foreach collection="po.leftLaneLine" item="item" index="index"
  622. separator="," open="(" close=")">
  623. #{item}
  624. </foreach>
  625. </if>
  626. <if test="po.rightLaneLine != null and po.rightLaneLine.size()>0">
  627. and right_lane_line in
  628. <foreach collection="po.rightLaneLine" item="item" index="index"
  629. separator="," open="(" close=")">
  630. #{item}
  631. </foreach>
  632. </if>
  633. <if test="po.conductorMarking != null and po.conductorMarking.size()>0">
  634. and conductor_marking in
  635. <foreach collection="po.conductorMarking" item="item" index="index"
  636. separator="," open="(" close=")">
  637. #{item}
  638. </foreach>
  639. </if>
  640. <if test="po.pedestrianCrossing != null and po.pedestrianCrossing.size()>0">
  641. and pedestrian_crossing in
  642. <foreach collection="po.pedestrianCrossing" item="item" index="index"
  643. separator="," open="(" close=")">
  644. #{item}
  645. </foreach>
  646. </if>
  647. <if test="po.trafficLight != null and po.trafficLight.size()>0">
  648. and traffic_light in
  649. <foreach collection="po.trafficLight" item="item" index="index"
  650. separator="," open="(" close=")">
  651. #{item}
  652. </foreach>
  653. </if>
  654. <if test="po.decelerationMarking != null and po.decelerationMarking.size()>0">
  655. and deceleration_marking in
  656. <foreach collection="po.decelerationMarking" item="item" index="index"
  657. separator="," open="(" close=")">
  658. #{item}
  659. </foreach>
  660. </if>
  661. <if test="po.pavementCondition != null and po.pavementCondition.size()>0">
  662. and pavement_condition in
  663. <foreach collection="po.pavementCondition" item="item" index="index"
  664. separator="," open="(" close=")">
  665. #{item}
  666. </foreach>
  667. </if>
  668. <if test="po.naturalDisaster != null and po.naturalDisaster.size()>0">
  669. and natural_disaster in
  670. <foreach collection="po.naturalDisaster" item="item" index="index"
  671. separator="," open="(" close=")">
  672. #{item}
  673. </foreach>
  674. </if>
  675. <if test="po.roadSafetySigns != null and po.roadSafetySigns.size()>0">
  676. and road_safety_signs in
  677. <foreach collection="po.roadSafetySigns" item="item" index="index"
  678. separator="," open="(" close=")">
  679. #{item}
  680. </foreach>
  681. </if>
  682. <if test="po.safetyWarningBoard != null and po.safetyWarningBoard.size()>0">
  683. and safety_warning_board in
  684. <foreach collection="po.safetyWarningBoard" item="item" index="index"
  685. separator="," open="(" close=")">
  686. #{item}
  687. </foreach>
  688. </if>
  689. <if test="po.trafficAccident != null and po.trafficAccident.size()>0">
  690. and traffic_accident in
  691. <foreach collection="po.trafficAccident" item="item" index="index"
  692. separator="," open="(" close=")">
  693. #{item}
  694. </foreach>
  695. </if>
  696. <if test="po.patency != null and po.patency.size()>0">
  697. and patency in
  698. <foreach collection="po.patency" item="item" index="index"
  699. separator="," open="(" close=")">
  700. #{item}
  701. </foreach>
  702. </if>
  703. <if test="po.specialVehicleYield != null and po.specialVehicleYield.size()>0">
  704. and special_vehicle_yield in
  705. <foreach collection="po.specialVehicleYield" item="item" index="index"
  706. separator="," open="(" close=")">
  707. #{item}
  708. </foreach>
  709. </if>
  710. <if test="po.violation != null and po.violation.size()>0">
  711. and violation in
  712. <foreach collection="po.violation" item="item" index="index"
  713. separator="," open="(" close=")">
  714. #{item}
  715. </foreach>
  716. </if>
  717. <if test="po.doubleFlashingCar != null and po.doubleFlashingCar.size()>0">
  718. and double_flashing_car in
  719. <foreach collection="po.doubleFlashingCar" item="item" index="index"
  720. separator="," open="(" close=")">
  721. #{item}
  722. </foreach>
  723. </if>
  724. <if test="po.selfBehavior != null and po.selfBehavior.size()>0">
  725. and
  726. <foreach collection="po.selfBehavior" item="item" index="index"
  727. separator=" or " open="(" close=")">
  728. self_behavior like CONCAT('%,',#{item},',%')
  729. or self_behavior like CONCAT('%,',#{item}) or
  730. self_behavior like CONCAT(#{item},',%') or
  731. self_behavior=#{item}
  732. </foreach>
  733. </if>
  734. <if test="po.targetBehavior != null and po.targetBehavior.size()>0">
  735. and
  736. <foreach collection="po.targetBehavior" item="item" index="index"
  737. separator=" or " open="(" close=")">
  738. target_behavior like CONCAT('%,',#{item},',%')
  739. or target_behavior like CONCAT('%,',#{item}) or
  740. target_behavior like CONCAT(#{item},',%') or
  741. target_behavior=#{item}
  742. </foreach>
  743. </if>
  744. <if test="po.ids != null and po.ids.length>0">
  745. and natural_id in
  746. <foreach collection="po.ids" item="item" index="index"
  747. separator="," open="(" close=")">
  748. #{item}
  749. </foreach>
  750. </if>
  751. <if test="po.allSceneNames != null and po.allSceneNames.length>0">
  752. and natural_name in
  753. <foreach collection="po.allSceneNames" item="item" index="index"
  754. separator="," open="(" close=")">
  755. #{item}
  756. </foreach>
  757. </if>
  758. </where>
  759. union
  760. select
  761. natural_id,natural_name,weather,backlight,light_change,road_type,
  762. road_matrrial,driveway_num,driveway_type,road_flatness,road_curvature,
  763. ramp,intersection_type,plane_intersection,bridge,tunnel,speed_limit,
  764. min_speed_limit,no_entry,no_stopping,left_lane_line,right_lane_line,
  765. conductor_marking,pedestrian_crossing,traffic_light,deceleration_marking,
  766. pavement_condition,natural_disaster,road_safety_signs,safety_warning_board,
  767. traffic_accident,patency,special_vehicle_yield,violation,double_flashing_car,
  768. self_behavior,target_behavior,create_user_id,create_time,modify_user_id,
  769. modify_time,is_deleted,share,video_address,osgb_address,
  770. xodr_address,xosc_address,json_address,video_preview,max_time
  771. from simulation.scene_natural
  772. <where>
  773. <if test="poBq.naturalName != null and poBq.naturalName != ''">
  774. or natural_name like CONCAT('%',#{poBq.naturalName,jdbcType=VARCHAR},'%')
  775. </if>
  776. <if test="poBq.weather != null and poBq.weather.size()>0 ">
  777. or weather in
  778. <foreach collection="poBq.weather" item="item" index="index"
  779. separator="," open="(" close=")">
  780. #{item}
  781. </foreach>
  782. </if>
  783. <if test="poBq.backlight != null and poBq.backlight.size()>0">
  784. or backlight in
  785. <foreach collection="poBq.backlight" item="item" index="index"
  786. separator="," open="(" close=")">
  787. #{item}
  788. </foreach>
  789. </if>
  790. <if test="poBq.lightChange != null and poBq.lightChange.size()>0">
  791. or light_change in
  792. <foreach collection="poBq.lightChange" item="item" index="index"
  793. separator="," open="(" close=")">
  794. #{item}
  795. </foreach>
  796. </if>
  797. <if test="poBq.roadType != null and poBq.roadType.size()>0">
  798. or road_type in
  799. <foreach collection="poBq.roadType" item="item" index="index"
  800. separator="," open="(" close=")">
  801. #{item}
  802. </foreach>
  803. </if>
  804. <if test="poBq.roadMatrrial != null and poBq.roadMatrrial.size()>0">
  805. or road_matrrial in
  806. <foreach collection="poBq.roadMatrrial" item="item" index="index"
  807. separator="," open="(" close=")">
  808. #{item}
  809. </foreach>
  810. </if>
  811. <if test="poBq.drivewayNum != null and poBq.drivewayNum.size()>0">
  812. or driveway_num in
  813. <foreach collection="poBq.drivewayNum" item="item" index="index"
  814. separator="," open="(" close=")">
  815. #{item}
  816. </foreach>
  817. </if>
  818. <if test="poBq.drivewayType != null and poBq.drivewayType.size()>0">
  819. or driveway_type in
  820. <foreach collection="poBq.drivewayType" item="item" index="index"
  821. separator="," open="(" close=")">
  822. #{item}
  823. </foreach>
  824. </if>
  825. <if test="poBq.roadFlatness != null and poBq.roadFlatness.size()>0">
  826. or road_flatness in
  827. <foreach collection="poBq.roadFlatness" item="item" index="index"
  828. separator="," open="(" close=")">
  829. #{item}
  830. </foreach>
  831. </if>
  832. <if test="poBq.roadCurvature != null and poBq.roadCurvature.size()>0">
  833. or road_curvature in
  834. <foreach collection="poBq.roadCurvature" item="item" index="index"
  835. separator="," open="(" close=")">
  836. #{item}
  837. </foreach>
  838. </if>
  839. <if test="poBq.ramp != null and poBq.ramp.size()>0">
  840. or ramp in
  841. <foreach collection="poBq.ramp" item="item" index="index"
  842. separator="," open="(" close=")">
  843. #{item}
  844. </foreach>
  845. </if>
  846. <if test="poBq.intersectionType != null and poBq.intersectionType.size()>0">
  847. or intersection_type in
  848. <foreach collection="poBq.intersectionType" item="item" index="index"
  849. separator="," open="(" close=")">
  850. #{item}
  851. </foreach>
  852. </if>
  853. <if test="poBq.planeIntersection != null and poBq.planeIntersection.size()>0">
  854. or plane_intersection in
  855. <foreach collection="poBq.planeIntersection" item="item" index="index"
  856. separator="," open="(" close=")">
  857. #{item}
  858. </foreach>
  859. </if>
  860. <if test="poBq.bridge != null and poBq.bridge.size()>0">
  861. or bridge in
  862. <foreach collection="poBq.bridge" item="item" index="index"
  863. separator="," open="(" close=")">
  864. #{item}
  865. </foreach>
  866. </if>
  867. <if test="poBq.tunnel != null and poBq.tunnel.size()>0">
  868. or tunnel in
  869. <foreach collection="poBq.tunnel" item="item" index="index"
  870. separator="," open="(" close=")">
  871. #{item}
  872. </foreach>
  873. </if>
  874. <if test="poBq.speedLimit != null and poBq.speedLimit.size()>0">
  875. or speed_limit in
  876. <foreach collection="poBq.speedLimit" item="item" index="index"
  877. separator="," open="(" close=")">
  878. #{item}
  879. </foreach>
  880. </if>
  881. <if test="poBq.minSpeedLimit != null and poBq.minSpeedLimit.size()>0">
  882. or min_speed_limit in
  883. <foreach collection="poBq.minSpeedLimit" item="item" index="index"
  884. separator="," open="(" close=")">
  885. #{item}
  886. </foreach>
  887. </if>
  888. <if test="poBq.noEntry != null and poBq.noEntry.size()>0">
  889. or no_entry in
  890. <foreach collection="poBq.noEntry" item="item" index="index"
  891. separator="," open="(" close=")">
  892. #{item}
  893. </foreach>
  894. </if>
  895. <if test="poBq.noStopping != null and poBq.noStopping.size()>0">
  896. or no_stopping in
  897. <foreach collection="poBq.noStopping" item="item" index="index"
  898. separator="," open="(" close=")">
  899. #{item}
  900. </foreach>
  901. </if>
  902. <if test="poBq.leftLaneLine != null and poBq.leftLaneLine.size()>0">
  903. or left_lane_line in
  904. <foreach collection="poBq.leftLaneLine" item="item" index="index"
  905. separator="," open="(" close=")">
  906. #{item}
  907. </foreach>
  908. </if>
  909. <if test="poBq.rightLaneLine != null and poBq.rightLaneLine.size()>0">
  910. or right_lane_line in
  911. <foreach collection="poBq.rightLaneLine" item="item" index="index"
  912. separator="," open="(" close=")">
  913. #{item}
  914. </foreach>
  915. </if>
  916. <if test="poBq.conductorMarking != null and poBq.conductorMarking.size()>0">
  917. or conductor_marking in
  918. <foreach collection="poBq.conductorMarking" item="item" index="index"
  919. separator="," open="(" close=")">
  920. #{item}
  921. </foreach>
  922. </if>
  923. <if test="poBq.pedestrianCrossing != null and poBq.pedestrianCrossing.size()>0">
  924. or pedestrian_crossing in
  925. <foreach collection="poBq.pedestrianCrossing" item="item" index="index"
  926. separator="," open="(" close=")">
  927. #{item}
  928. </foreach>
  929. </if>
  930. <if test="poBq.trafficLight != null and poBq.trafficLight.size()>0">
  931. or traffic_light in
  932. <foreach collection="poBq.trafficLight" item="item" index="index"
  933. separator="," open="(" close=")">
  934. #{item}
  935. </foreach>
  936. </if>
  937. <if test="poBq.decelerationMarking != null and poBq.decelerationMarking.size()>0">
  938. or deceleration_marking in
  939. <foreach collection="poBq.decelerationMarking" item="item" index="index"
  940. separator="," open="(" close=")">
  941. #{item}
  942. </foreach>
  943. </if>
  944. <if test="poBq.pavementCondition != null and poBq.pavementCondition.size()>0">
  945. or pavement_condition in
  946. <foreach collection="poBq.pavementCondition" item="item" index="index"
  947. separator="," open="(" close=")">
  948. #{item}
  949. </foreach>
  950. </if>
  951. <if test="poBq.naturalDisaster != null and poBq.naturalDisaster.size()>0">
  952. or natural_disaster in
  953. <foreach collection="poBq.naturalDisaster" item="item" index="index"
  954. separator="," open="(" close=")">
  955. #{item}
  956. </foreach>
  957. </if>
  958. <if test="poBq.roadSafetySigns != null and poBq.roadSafetySigns.size()>0">
  959. or road_safety_signs in
  960. <foreach collection="poBq.roadSafetySigns" item="item" index="index"
  961. separator="," open="(" close=")">
  962. #{item}
  963. </foreach>
  964. </if>
  965. <if test="poBq.safetyWarningBoard != null and poBq.safetyWarningBoard.size()>0">
  966. or safety_warning_board in
  967. <foreach collection="poBq.safetyWarningBoard" item="item" index="index"
  968. separator="," open="(" close=")">
  969. #{item}
  970. </foreach>
  971. </if>
  972. <if test="poBq.trafficAccident != null and poBq.trafficAccident.size()>0">
  973. or traffic_accident in
  974. <foreach collection="poBq.trafficAccident" item="item" index="index"
  975. separator="," open="(" close=")">
  976. #{item}
  977. </foreach>
  978. </if>
  979. <if test="poBq.patency != null and poBq.patency.size()>0">
  980. or patency in
  981. <foreach collection="poBq.patency" item="item" index="index"
  982. separator="," open="(" close=")">
  983. #{item}
  984. </foreach>
  985. </if>
  986. <if test="poBq.specialVehicleYield != null and poBq.specialVehicleYield.size()>0">
  987. or special_vehicle_yield in
  988. <foreach collection="poBq.specialVehicleYield" item="item" index="index"
  989. separator="," open="(" close=")">
  990. #{item}
  991. </foreach>
  992. </if>
  993. <if test="poBq.violation != null and poBq.violation.size()>0">
  994. or violation in
  995. <foreach collection="poBq.violation" item="item" index="index"
  996. separator="," open="(" close=")">
  997. #{item}
  998. </foreach>
  999. </if>
  1000. <if test="poBq.doubleFlashingCar != null and poBq.doubleFlashingCar.size()>0">
  1001. or double_flashing_car in
  1002. <foreach collection="poBq.doubleFlashingCar" item="item" index="index"
  1003. separator="," open="(" close=")">
  1004. #{item}
  1005. </foreach>
  1006. </if>
  1007. <if test="poBq.selfBehavior != null and poBq.selfBehavior.size()>0">
  1008. or
  1009. <foreach collection="poBq.selfBehavior" item="item" index="index"
  1010. separator=" or " open="(" close=")">
  1011. self_behavior like CONCAT('%,',#{item},',%')
  1012. or self_behavior like CONCAT('%,',#{item}) or
  1013. self_behavior like CONCAT(#{item},',%') or
  1014. self_behavior=#{item}
  1015. </foreach>
  1016. </if>
  1017. <if test="poBq.targetBehavior != null and poBq.targetBehavior.size()>0">
  1018. or
  1019. <foreach collection="poBq.targetBehavior" item="item" index="index"
  1020. separator=" or " open="(" close=")">
  1021. target_behavior like CONCAT('%,',#{item},',%')
  1022. or target_behavior like CONCAT('%,',#{item}) or
  1023. target_behavior like CONCAT(#{item},',%') or
  1024. target_behavior=#{item}
  1025. </foreach>
  1026. </if>
  1027. <if test="poBq.ids != null and poBq.ids.length>0">
  1028. or natural_id in
  1029. <foreach collection="poBq.ids" item="item" index="index"
  1030. separator="," open="(" close=")">
  1031. #{item}
  1032. </foreach>
  1033. </if>
  1034. <if test="poBq.allSceneNames != null and poBq.allSceneNames.length>0">
  1035. or natural_name in
  1036. <foreach collection="poBq.allSceneNames" item="item" index="index"
  1037. separator="," open="(" close=")">
  1038. #{item}
  1039. </foreach>
  1040. </if>
  1041. </where>
  1042. )a where
  1043. a.is_deleted = '0'
  1044. <if test="poBq.AllIds != null and poBq.AllIds.size()>0">
  1045. or a.natural_id in
  1046. <foreach collection="poBq.AllIds" item="item" index="index"
  1047. separator="," open="(" close=")">
  1048. #{item}
  1049. </foreach>
  1050. </if>
  1051. order by a.modify_time desc
  1052. </select>
  1053. <select id="querySceneNaturalListByBq" parameterType="java.util.Map"
  1054. resultType="api.common.pojo.po.scene.SceneNaturalPO">
  1055. select
  1056. natural_id,natural_name,weather,backlight,light_change,road_type,
  1057. road_matrrial,driveway_num,driveway_type,road_flatness,road_curvature,
  1058. ramp,intersection_type,plane_intersection,bridge,tunnel,speed_limit,
  1059. min_speed_limit,no_entry,no_stopping,left_lane_line,right_lane_line,
  1060. conductor_marking,pedestrian_crossing,traffic_light,deceleration_marking,
  1061. pavement_condition,natural_disaster,road_safety_signs,safety_warning_board,
  1062. traffic_accident,patency,special_vehicle_yield,violation,double_flashing_car,
  1063. self_behavior,target_behavior,create_user_id,create_time,modify_user_id,
  1064. modify_time,is_deleted,share,video_address,osgb_address,
  1065. xodr_address,xosc_address,json_address,video_preview,max_time from (
  1066. select
  1067. natural_id,natural_name,weather,backlight,light_change,road_type,
  1068. road_matrrial,driveway_num,driveway_type,road_flatness,road_curvature,
  1069. ramp,intersection_type,plane_intersection,bridge,tunnel,speed_limit,
  1070. min_speed_limit,no_entry,no_stopping,left_lane_line,right_lane_line,
  1071. conductor_marking,pedestrian_crossing,traffic_light,deceleration_marking,
  1072. pavement_condition,natural_disaster,road_safety_signs,safety_warning_board,
  1073. traffic_accident,patency,special_vehicle_yield,violation,double_flashing_car,
  1074. self_behavior,target_behavior,create_user_id,create_time,modify_user_id,
  1075. modify_time,is_deleted,share,video_address,osgb_address,
  1076. xodr_address,xosc_address,json_address,video_preview,max_time
  1077. from simulation.scene_natural
  1078. <where>
  1079. <if test="poBq.naturalName != null and poBq.naturalName != ''">
  1080. natural_name like CONCAT('%',#{poBq.naturalName,jdbcType=VARCHAR},'%')
  1081. </if>
  1082. <if test="poBq.weather != null and poBq.weather.size()>0 ">
  1083. or weather in
  1084. <foreach collection="poBq.weather" item="item" index="index"
  1085. separator="," open="(" close=")">
  1086. #{item}
  1087. </foreach>
  1088. </if>
  1089. <if test="poBq.backlight != null and poBq.backlight.size()>0">
  1090. or backlight in
  1091. <foreach collection="poBq.backlight" item="item" index="index"
  1092. separator="," open="(" close=")">
  1093. #{item}
  1094. </foreach>
  1095. </if>
  1096. <if test="poBq.lightChange != null and poBq.lightChange.size()>0">
  1097. or light_change in
  1098. <foreach collection="poBq.lightChange" item="item" index="index"
  1099. separator="," open="(" close=")">
  1100. #{item}
  1101. </foreach>
  1102. </if>
  1103. <if test="poBq.roadType != null and poBq.roadType.size()>0">
  1104. or road_type in
  1105. <foreach collection="poBq.roadType" item="item" index="index"
  1106. separator="," open="(" close=")">
  1107. #{item}
  1108. </foreach>
  1109. </if>
  1110. <if test="poBq.roadMatrrial != null and poBq.roadMatrrial.size()>0">
  1111. or road_matrrial in
  1112. <foreach collection="poBq.roadMatrrial" item="item" index="index"
  1113. separator="," open="(" close=")">
  1114. #{item}
  1115. </foreach>
  1116. </if>
  1117. <if test="poBq.drivewayNum != null and poBq.drivewayNum.size()>0">
  1118. or driveway_num in
  1119. <foreach collection="poBq.drivewayNum" item="item" index="index"
  1120. separator="," open="(" close=")">
  1121. #{item}
  1122. </foreach>
  1123. </if>
  1124. <if test="poBq.drivewayType != null and poBq.drivewayType.size()>0">
  1125. or driveway_type in
  1126. <foreach collection="poBq.drivewayType" item="item" index="index"
  1127. separator="," open="(" close=")">
  1128. #{item}
  1129. </foreach>
  1130. </if>
  1131. <if test="poBq.roadFlatness != null and poBq.roadFlatness.size()>0">
  1132. or road_flatness in
  1133. <foreach collection="poBq.roadFlatness" item="item" index="index"
  1134. separator="," open="(" close=")">
  1135. #{item}
  1136. </foreach>
  1137. </if>
  1138. <if test="poBq.roadCurvature != null and poBq.roadCurvature.size()>0">
  1139. or road_curvature in
  1140. <foreach collection="poBq.roadCurvature" item="item" index="index"
  1141. separator="," open="(" close=")">
  1142. #{item}
  1143. </foreach>
  1144. </if>
  1145. <if test="poBq.ramp != null and poBq.ramp.size()>0">
  1146. or ramp in
  1147. <foreach collection="poBq.ramp" item="item" index="index"
  1148. separator="," open="(" close=")">
  1149. #{item}
  1150. </foreach>
  1151. </if>
  1152. <if test="poBq.intersectionType != null and poBq.intersectionType.size()>0">
  1153. or intersection_type in
  1154. <foreach collection="poBq.intersectionType" item="item" index="index"
  1155. separator="," open="(" close=")">
  1156. #{item}
  1157. </foreach>
  1158. </if>
  1159. <if test="poBq.planeIntersection != null and poBq.planeIntersection.size()>0">
  1160. or plane_intersection in
  1161. <foreach collection="poBq.planeIntersection" item="item" index="index"
  1162. separator="," open="(" close=")">
  1163. #{item}
  1164. </foreach>
  1165. </if>
  1166. <if test="poBq.bridge != null and poBq.bridge.size()>0">
  1167. or bridge in
  1168. <foreach collection="poBq.bridge" item="item" index="index"
  1169. separator="," open="(" close=")">
  1170. #{item}
  1171. </foreach>
  1172. </if>
  1173. <if test="poBq.tunnel != null and poBq.tunnel.size()>0">
  1174. or tunnel in
  1175. <foreach collection="poBq.tunnel" item="item" index="index"
  1176. separator="," open="(" close=")">
  1177. #{item}
  1178. </foreach>
  1179. </if>
  1180. <if test="poBq.speedLimit != null and poBq.speedLimit.size()>0">
  1181. or speed_limit in
  1182. <foreach collection="poBq.speedLimit" item="item" index="index"
  1183. separator="," open="(" close=")">
  1184. #{item}
  1185. </foreach>
  1186. </if>
  1187. <if test="poBq.minSpeedLimit != null and poBq.minSpeedLimit.size()>0">
  1188. or min_speed_limit in
  1189. <foreach collection="poBq.minSpeedLimit" item="item" index="index"
  1190. separator="," open="(" close=")">
  1191. #{item}
  1192. </foreach>
  1193. </if>
  1194. <if test="poBq.noEntry != null and poBq.noEntry.size()>0">
  1195. or no_entry in
  1196. <foreach collection="poBq.noEntry" item="item" index="index"
  1197. separator="," open="(" close=")">
  1198. #{item}
  1199. </foreach>
  1200. </if>
  1201. <if test="poBq.noStopping != null and poBq.noStopping.size()>0">
  1202. or no_stopping in
  1203. <foreach collection="poBq.noStopping" item="item" index="index"
  1204. separator="," open="(" close=")">
  1205. #{item}
  1206. </foreach>
  1207. </if>
  1208. <if test="poBq.leftLaneLine != null and poBq.leftLaneLine.size()>0">
  1209. or left_lane_line in
  1210. <foreach collection="poBq.leftLaneLine" item="item" index="index"
  1211. separator="," open="(" close=")">
  1212. #{item}
  1213. </foreach>
  1214. </if>
  1215. <if test="poBq.rightLaneLine != null and poBq.rightLaneLine.size()>0">
  1216. or right_lane_line in
  1217. <foreach collection="poBq.rightLaneLine" item="item" index="index"
  1218. separator="," open="(" close=")">
  1219. #{item}
  1220. </foreach>
  1221. </if>
  1222. <if test="poBq.conductorMarking != null and poBq.conductorMarking.size()>0">
  1223. or conductor_marking in
  1224. <foreach collection="poBq.conductorMarking" item="item" index="index"
  1225. separator="," open="(" close=")">
  1226. #{item}
  1227. </foreach>
  1228. </if>
  1229. <if test="poBq.pedestrianCrossing != null and poBq.pedestrianCrossing.size()>0">
  1230. or pedestrian_crossing in
  1231. <foreach collection="poBq.pedestrianCrossing" item="item" index="index"
  1232. separator="," open="(" close=")">
  1233. #{item}
  1234. </foreach>
  1235. </if>
  1236. <if test="poBq.trafficLight != null and poBq.trafficLight.size()>0">
  1237. or traffic_light in
  1238. <foreach collection="poBq.trafficLight" item="item" index="index"
  1239. separator="," open="(" close=")">
  1240. #{item}
  1241. </foreach>
  1242. </if>
  1243. <if test="poBq.decelerationMarking != null and poBq.decelerationMarking.size()>0">
  1244. or deceleration_marking in
  1245. <foreach collection="poBq.decelerationMarking" item="item" index="index"
  1246. separator="," open="(" close=")">
  1247. #{item}
  1248. </foreach>
  1249. </if>
  1250. <if test="poBq.pavementCondition != null and poBq.pavementCondition.size()>0">
  1251. or pavement_condition in
  1252. <foreach collection="poBq.pavementCondition" item="item" index="index"
  1253. separator="," open="(" close=")">
  1254. #{item}
  1255. </foreach>
  1256. </if>
  1257. <if test="poBq.naturalDisaster != null and poBq.naturalDisaster.size()>0">
  1258. or natural_disaster in
  1259. <foreach collection="poBq.naturalDisaster" item="item" index="index"
  1260. separator="," open="(" close=")">
  1261. #{item}
  1262. </foreach>
  1263. </if>
  1264. <if test="poBq.roadSafetySigns != null and poBq.roadSafetySigns.size()>0">
  1265. or road_safety_signs in
  1266. <foreach collection="poBq.roadSafetySigns" item="item" index="index"
  1267. separator="," open="(" close=")">
  1268. #{item}
  1269. </foreach>
  1270. </if>
  1271. <if test="poBq.safetyWarningBoard != null and poBq.safetyWarningBoard.size()>0">
  1272. or safety_warning_board in
  1273. <foreach collection="poBq.safetyWarningBoard" item="item" index="index"
  1274. separator="," open="(" close=")">
  1275. #{item}
  1276. </foreach>
  1277. </if>
  1278. <if test="poBq.trafficAccident != null and poBq.trafficAccident.size()>0">
  1279. or traffic_accident in
  1280. <foreach collection="poBq.trafficAccident" item="item" index="index"
  1281. separator="," open="(" close=")">
  1282. #{item}
  1283. </foreach>
  1284. </if>
  1285. <if test="poBq.patency != null and poBq.patency.size()>0">
  1286. or patency in
  1287. <foreach collection="poBq.patency" item="item" index="index"
  1288. separator="," open="(" close=")">
  1289. #{item}
  1290. </foreach>
  1291. </if>
  1292. <if test="poBq.specialVehicleYield != null and poBq.specialVehicleYield.size()>0">
  1293. or special_vehicle_yield in
  1294. <foreach collection="poBq.specialVehicleYield" item="item" index="index"
  1295. separator="," open="(" close=")">
  1296. #{item}
  1297. </foreach>
  1298. </if>
  1299. <if test="poBq.violation != null and poBq.violation.size()>0">
  1300. or violation in
  1301. <foreach collection="poBq.violation" item="item" index="index"
  1302. separator="," open="(" close=")">
  1303. #{item}
  1304. </foreach>
  1305. </if>
  1306. <if test="poBq.doubleFlashingCar != null and poBq.doubleFlashingCar.size()>0">
  1307. or double_flashing_car in
  1308. <foreach collection="poBq.doubleFlashingCar" item="item" index="index"
  1309. separator="," open="(" close=")">
  1310. #{item}
  1311. </foreach>
  1312. </if>
  1313. <if test="poBq.selfBehavior != null and poBq.selfBehavior.size()>0">
  1314. or
  1315. <foreach collection="poBq.selfBehavior" item="item" index="index"
  1316. separator=" or " open="(" close=")">
  1317. self_behavior like CONCAT('%,',#{item},',%')
  1318. or self_behavior like CONCAT('%,',#{item}) or
  1319. self_behavior like CONCAT(#{item},',%') or
  1320. self_behavior=#{item}
  1321. </foreach>
  1322. </if>
  1323. <if test="poBq.targetBehavior != null and poBq.targetBehavior.size()>0">
  1324. or
  1325. <foreach collection="poBq.targetBehavior" item="item" index="index"
  1326. separator=" or " open="(" close=")">
  1327. target_behavior like CONCAT('%,',#{item},',%')
  1328. or target_behavior like CONCAT('%,',#{item}) or
  1329. target_behavior like CONCAT(#{item},',%') or
  1330. target_behavior=#{item}
  1331. </foreach>
  1332. </if>
  1333. <if test="poBq.ids != null and poBq.ids.length>0">
  1334. or natural_id in
  1335. <foreach collection="poBq.ids" item="item" index="index"
  1336. separator="," open="(" close=")">
  1337. #{item}
  1338. </foreach>
  1339. </if>
  1340. <if test="poBq.allSceneNames != null and poBq.allSceneNames.length>0">
  1341. or natural_name in
  1342. <foreach collection="poBq.allSceneNames" item="item" index="index"
  1343. separator="," open="(" close=")">
  1344. #{item}
  1345. </foreach>
  1346. </if>
  1347. ) a
  1348. where
  1349. a.is_deleted = '0'
  1350. <if test="po.AllIds != null and po.AllIds.size()>0">
  1351. and a.natural_id in
  1352. <foreach collection="po.AllIds" item="item" index="index"
  1353. separator="," open="(" close=")">
  1354. #{item}
  1355. </foreach>
  1356. </if>
  1357. order by a.modify_time desc
  1358. </where>
  1359. </select>
  1360. <update id="updateSceneNatural" parameterType="api.common.pojo.po.scene.SceneNaturalPO">
  1361. update simulation.scene_natural
  1362. set natural_name=#{naturalName},
  1363. weather=#{weather},
  1364. backlight=#{backlight},
  1365. light_change=#{lightChange},
  1366. road_type=#{roadType},
  1367. road_matrrial=#{roadMatrrial},
  1368. driveway_num=#{drivewayNum},
  1369. driveway_type=#{drivewayType},
  1370. road_flatness=#{roadFlatness},
  1371. road_curvature=#{roadCurvature},
  1372. ramp=#{ramp},
  1373. intersection_type=#{intersectionType},
  1374. plane_intersection=#{planeIntersection},
  1375. bridge=#{bridge},
  1376. tunnel=#{tunnel},
  1377. speed_limit=#{speedLimit},
  1378. min_speed_limit=#{minSpeedLimit},
  1379. no_entry=#{noEntry},
  1380. no_stopping=#{noStopping},
  1381. left_lane_line=#{leftLaneLine},
  1382. right_lane_line=#{rightLaneLine},
  1383. conductor_marking=#{conductorMarking},
  1384. pedestrian_crossing=#{pedestrianCrossing},
  1385. traffic_light=#{trafficLight},
  1386. deceleration_marking=#{decelerationMarking},
  1387. pavement_condition=#{pavementCondition},
  1388. natural_disaster=#{naturalDisaster},
  1389. road_safety_signs=#{roadSafetySigns},
  1390. safety_warning_board=#{safetyWarningBoard},
  1391. traffic_accident=#{trafficAccident},
  1392. patency=#{patency},
  1393. special_vehicle_yield=#{specialVehicleYield},
  1394. violation=#{violation},
  1395. double_flashing_car=#{doubleFlashingCar},
  1396. self_behavior=#{selfBehavior},
  1397. target_behavior=#{targetBehavior},
  1398. modify_user_id=#{modifyUserId},
  1399. modify_time=#{modifyTime},
  1400. video_address=#{videoAddress},
  1401. osgb_address=#{osgbAddress},
  1402. xodr_address=#{xodrAddress},
  1403. xosc_address=#{xoscAddress},
  1404. json_address=#{jsonAddress},
  1405. max_time=#{maxTime}
  1406. where natural_id = #{naturalId,jdbcType=VARCHAR}
  1407. </update>
  1408. <update id="updateSceneNaturalList" parameterType="java.util.List">
  1409. <foreach collection="list" index="index" item="item" separator=";">
  1410. update simulation.scene_natural
  1411. set natural_name=#{item.naturalName},weather=#{item.weather},backlight=#{item.backlight},
  1412. light_change=#{item.lightChange},road_type=#{item.roadType},road_matrrial=#{item.roadMatrrial},
  1413. driveway_num=#{item.drivewayNum},driveway_type=#{item.drivewayType},road_flatness=#{item.roadFlatness},
  1414. road_curvature=#{item.roadCurvature},ramp=#{item.ramp},intersection_type=#{item.intersectionType},
  1415. plane_intersection=#{item.planeIntersection},bridge=#{item.bridge},tunnel=#{item.tunnel},
  1416. speed_limit=#{item.speedLimit},min_speed_limit=#{item.minSpeedLimit},no_entry=#{item.noEntry},
  1417. no_stopping=#{item.noStopping},left_lane_line=#{item.leftLaneLine},right_lane_line=#{item.rightLaneLine},
  1418. conductor_marking=#{item.conductorMarking},pedestrian_crossing=#{item.pedestrianCrossing},traffic_light=#{item.trafficLight},
  1419. deceleration_marking=#{item.decelerationMarking},pavement_condition=#{item.pavementCondition},natural_disaster=#{item.naturalDisaster},
  1420. road_safety_signs=#{item.roadSafetySigns},safety_warning_board=#{item.safetyWarningBoard},traffic_accident=#{item.trafficAccident},
  1421. patency=#{item.patency},special_vehicle_yield=#{item.specialVehicleYield},violation=#{item.violation},
  1422. double_flashing_car=#{item.doubleFlashingCar},self_behavior=#{item.selfBehavior},target_behavior=#{item.targetBehavior},
  1423. modify_user_id=#{item.modifyUserId},modify_time=#{item.modifyTime},video_address=#{item.videoAddress},
  1424. osgb_address=#{item.osgbAddress},xodr_address=#{item.xodrAddress},xosc_address=#{item.xoscAddress},
  1425. json_address=#{item.jsonAddress},max_time=#{item.maxTime}
  1426. where natural_id = #{item.naturalId,jdbcType=VARCHAR}
  1427. </foreach>
  1428. </update>
  1429. <select id="querySceneNaturalListByQx" parameterType="api.common.pojo.param.scene.SceneNaturalParam"
  1430. resultType="api.common.pojo.po.scene.SceneNaturalPO">
  1431. select
  1432. natural_id,natural_name,weather,backlight,light_change,road_type,
  1433. road_matrrial,driveway_num,driveway_type,road_flatness,road_curvature,
  1434. ramp,intersection_type,plane_intersection,bridge,tunnel,speed_limit,
  1435. min_speed_limit,no_entry,no_stopping,left_lane_line,right_lane_line,
  1436. conductor_marking,pedestrian_crossing,traffic_light,deceleration_marking,
  1437. pavement_condition,natural_disaster,road_safety_signs,safety_warning_board,
  1438. traffic_accident,patency,special_vehicle_yield,violation,double_flashing_car,
  1439. self_behavior,target_behavior,create_user_id,create_time,modify_user_id,
  1440. modify_time,is_deleted,share,video_address,osgb_address,
  1441. xodr_address,xosc_address,json_address,video_preview,max_time
  1442. from (select zr.* from( select s.scene_name
  1443. FROM system_scene_package p
  1444. JOIN system_user_scene u on p.id = u.package_id and u.is_deleted = '0' and p.is_deleted = '0'
  1445. JOIN system_scene_package_sublist s on p.id = s.scene_and_package
  1446. where scene_type='1' and s.is_deleted = '0' and user_id=#{userId} group by s.scene_name)qx join scene_natural zr
  1447. on qx.scene_name=zr.natural_name
  1448. and zr.share='2' union select jtNew.* from scene_natural jtNew where jtNew.share='1' and is_deleted='0') dd
  1449. <where>
  1450. is_deleted = '0'
  1451. <if test="naturalName != null and naturalName != ''">
  1452. and natural_name like CONCAT('%',#{naturalName,jdbcType=VARCHAR},'%')
  1453. </if>
  1454. <if test="weather != null and weather.size()>0 ">
  1455. and weather in
  1456. <foreach collection="weather" item="item" index="index"
  1457. separator="," open="(" close=")">
  1458. #{item}
  1459. </foreach>
  1460. </if>
  1461. <if test="backlight != null and backlight.size()>0">
  1462. and backlight in
  1463. <foreach collection="backlight" item="item" index="index"
  1464. separator="," open="(" close=")">
  1465. #{item}
  1466. </foreach>
  1467. </if>
  1468. <if test="lightChange != null and lightChange.size()>0">
  1469. and light_change in
  1470. <foreach collection="lightChange" item="item" index="index"
  1471. separator="," open="(" close=")">
  1472. #{item}
  1473. </foreach>
  1474. </if>
  1475. <if test="roadType != null and roadType.size()>0">
  1476. and road_type in
  1477. <foreach collection="roadType" item="item" index="index"
  1478. separator="," open="(" close=")">
  1479. #{item}
  1480. </foreach>
  1481. </if>
  1482. <if test="roadMatrrial != null and roadMatrrial.size()>0">
  1483. and road_matrrial in
  1484. <foreach collection="roadMatrrial" item="item" index="index"
  1485. separator="," open="(" close=")">
  1486. #{item}
  1487. </foreach>
  1488. </if>
  1489. <if test="drivewayNum != null and drivewayNum.size()>0">
  1490. and driveway_num in
  1491. <foreach collection="drivewayNum" item="item" index="index"
  1492. separator="," open="(" close=")">
  1493. #{item}
  1494. </foreach>
  1495. </if>
  1496. <if test="drivewayType != null and drivewayType.size()>0">
  1497. and driveway_type in
  1498. <foreach collection="drivewayType" item="item" index="index"
  1499. separator="," open="(" close=")">
  1500. #{item}
  1501. </foreach>
  1502. </if>
  1503. <if test="roadFlatness != null and roadFlatness.size()>0">
  1504. and road_flatness in
  1505. <foreach collection="roadFlatness" item="item" index="index"
  1506. separator="," open="(" close=")">
  1507. #{item}
  1508. </foreach>
  1509. </if>
  1510. <if test="roadCurvature != null and roadCurvature.size()>0">
  1511. and road_curvature in
  1512. <foreach collection="roadCurvature" item="item" index="index"
  1513. separator="," open="(" close=")">
  1514. #{item}
  1515. </foreach>
  1516. </if>
  1517. <if test="ramp != null and ramp.size()>0">
  1518. and ramp in
  1519. <foreach collection="ramp" item="item" index="index"
  1520. separator="," open="(" close=")">
  1521. #{item}
  1522. </foreach>
  1523. </if>
  1524. <if test="intersectionType != null and intersectionType.size()>0">
  1525. and intersection_type in
  1526. <foreach collection="intersectionType" item="item" index="index"
  1527. separator="," open="(" close=")">
  1528. #{item}
  1529. </foreach>
  1530. </if>
  1531. <if test="planeIntersection != null and planeIntersection.size()>0">
  1532. and plane_intersection in
  1533. <foreach collection="planeIntersection" item="item" index="index"
  1534. separator="," open="(" close=")">
  1535. #{item}
  1536. </foreach>
  1537. </if>
  1538. <if test="bridge != null and bridge.size()>0">
  1539. and bridge in
  1540. <foreach collection="bridge" item="item" index="index"
  1541. separator="," open="(" close=")">
  1542. #{item}
  1543. </foreach>
  1544. </if>
  1545. <if test="tunnel != null and tunnel.size()>0">
  1546. and tunnel in
  1547. <foreach collection="tunnel" item="item" index="index"
  1548. separator="," open="(" close=")">
  1549. #{item}
  1550. </foreach>
  1551. </if>
  1552. <if test="speedLimit != null and speedLimit.size()>0">
  1553. and speed_limit in
  1554. <foreach collection="speedLimit" item="item" index="index"
  1555. separator="," open="(" close=")">
  1556. #{item}
  1557. </foreach>
  1558. </if>
  1559. <if test="minSpeedLimit != null and minSpeedLimit.size()>0">
  1560. and min_speed_limit in
  1561. <foreach collection="minSpeedLimit" item="item" index="index"
  1562. separator="," open="(" close=")">
  1563. #{item}
  1564. </foreach>
  1565. </if>
  1566. <if test="noEntry != null and noEntry.size()>0">
  1567. and no_entry in
  1568. <foreach collection="noEntry" item="item" index="index"
  1569. separator="," open="(" close=")">
  1570. #{item}
  1571. </foreach>
  1572. </if>
  1573. <if test="noStopping != null and noStopping.size()>0">
  1574. and no_stopping in
  1575. <foreach collection="noStopping" item="item" index="index"
  1576. separator="," open="(" close=")">
  1577. #{item}
  1578. </foreach>
  1579. </if>
  1580. <if test="leftLaneLine != null and leftLaneLine.size()>0">
  1581. and left_lane_line in
  1582. <foreach collection="leftLaneLine" item="item" index="index"
  1583. separator="," open="(" close=")">
  1584. #{item}
  1585. </foreach>
  1586. </if>
  1587. <if test="rightLaneLine != null and rightLaneLine.size()>0">
  1588. and right_lane_line in
  1589. <foreach collection="rightLaneLine" item="item" index="index"
  1590. separator="," open="(" close=")">
  1591. #{item}
  1592. </foreach>
  1593. </if>
  1594. <if test="conductorMarking != null and conductorMarking.size()>0">
  1595. and conductor_marking in
  1596. <foreach collection="conductorMarking" item="item" index="index"
  1597. separator="," open="(" close=")">
  1598. #{item}
  1599. </foreach>
  1600. </if>
  1601. <if test="pedestrianCrossing != null and pedestrianCrossing.size()>0">
  1602. and pedestrian_crossing in
  1603. <foreach collection="pedestrianCrossing" item="item" index="index"
  1604. separator="," open="(" close=")">
  1605. #{item}
  1606. </foreach>
  1607. </if>
  1608. <if test="trafficLight != null and trafficLight.size()>0">
  1609. and traffic_light in
  1610. <foreach collection="trafficLight" item="item" index="index"
  1611. separator="," open="(" close=")">
  1612. #{item}
  1613. </foreach>
  1614. </if>
  1615. <if test="decelerationMarking != null and decelerationMarking.size()>0">
  1616. and deceleration_marking in
  1617. <foreach collection="decelerationMarking" item="item" index="index"
  1618. separator="," open="(" close=")">
  1619. #{item}
  1620. </foreach>
  1621. </if>
  1622. <if test="pavementCondition != null and pavementCondition.size()>0">
  1623. and pavement_condition in
  1624. <foreach collection="pavementCondition" item="item" index="index"
  1625. separator="," open="(" close=")">
  1626. #{item}
  1627. </foreach>
  1628. </if>
  1629. <if test="naturalDisaster != null and naturalDisaster.size()>0">
  1630. and natural_disaster in
  1631. <foreach collection="naturalDisaster" item="item" index="index"
  1632. separator="," open="(" close=")">
  1633. #{item}
  1634. </foreach>
  1635. </if>
  1636. <if test="roadSafetySigns != null and roadSafetySigns.size()>0">
  1637. and road_safety_signs in
  1638. <foreach collection="roadSafetySigns" item="item" index="index"
  1639. separator="," open="(" close=")">
  1640. #{item}
  1641. </foreach>
  1642. </if>
  1643. <if test="safetyWarningBoard != null and safetyWarningBoard.size()>0">
  1644. and safety_warning_board in
  1645. <foreach collection="safetyWarningBoard" item="item" index="index"
  1646. separator="," open="(" close=")">
  1647. #{item}
  1648. </foreach>
  1649. </if>
  1650. <if test="trafficAccident != null and trafficAccident.size()>0">
  1651. and traffic_accident in
  1652. <foreach collection="trafficAccident" item="item" index="index"
  1653. separator="," open="(" close=")">
  1654. #{item}
  1655. </foreach>
  1656. </if>
  1657. <if test="patency != null and patency.size()>0">
  1658. and patency in
  1659. <foreach collection="patency" item="item" index="index"
  1660. separator="," open="(" close=")">
  1661. #{item}
  1662. </foreach>
  1663. </if>
  1664. <if test="specialVehicleYield != null and specialVehicleYield.size()>0">
  1665. and special_vehicle_yield in
  1666. <foreach collection="specialVehicleYield" item="item" index="index"
  1667. separator="," open="(" close=")">
  1668. #{item}
  1669. </foreach>
  1670. </if>
  1671. <if test="violation != null and violation.size()>0">
  1672. and violation in
  1673. <foreach collection="violation" item="item" index="index"
  1674. separator="," open="(" close=")">
  1675. #{item}
  1676. </foreach>
  1677. </if>
  1678. <if test="doubleFlashingCar != null and doubleFlashingCar.size()>0">
  1679. and double_flashing_car in
  1680. <foreach collection="doubleFlashingCar" item="item" index="index"
  1681. separator="," open="(" close=")">
  1682. #{item}
  1683. </foreach>
  1684. </if>
  1685. <if test="selfBehavior != null and selfBehavior.size()>0">
  1686. and
  1687. <foreach collection="selfBehavior" item="item" index="index"
  1688. separator=" or " open="(" close=")">
  1689. self_behavior like CONCAT('%,',#{item},',%')
  1690. or self_behavior like CONCAT('%,',#{item}) or
  1691. self_behavior like CONCAT(#{item},',%') or
  1692. self_behavior=#{item}
  1693. </foreach>
  1694. </if>
  1695. <if test="targetBehavior != null and targetBehavior.size()>0">
  1696. and
  1697. <foreach collection="targetBehavior" item="item" index="index"
  1698. separator=" or " open="(" close=")">
  1699. target_behavior like CONCAT('%,',#{item},',%')
  1700. or target_behavior like CONCAT('%,',#{item}) or
  1701. target_behavior like CONCAT(#{item},',%') or
  1702. target_behavior=#{item}
  1703. </foreach>
  1704. </if>
  1705. <if test="ids != null and ids.length>0">
  1706. and natural_id in
  1707. <foreach collection="ids" item="item" index="index"
  1708. separator="," open="(" close=")">
  1709. #{item}
  1710. </foreach>
  1711. </if>
  1712. <if test="allSceneNames != null and allSceneNames.length>0">
  1713. and natural_name in
  1714. <foreach collection="allSceneNames" item="item" index="index"
  1715. separator="," open="(" close=")">
  1716. #{item}
  1717. </foreach>
  1718. </if>
  1719. <if test="AllIds != null and AllIds.size()>0">
  1720. and natural_id in
  1721. <foreach collection="AllIds" item="item" index="index"
  1722. separator="," open="(" close=")">
  1723. #{item}
  1724. </foreach>
  1725. </if>
  1726. <if test="share != null and share==0">
  1727. and share =#{share}
  1728. </if>
  1729. <if test="share != null and share!= '' and share!=0">
  1730. and share !='0'
  1731. </if>
  1732. order by create_time,natural_name desc
  1733. </where>
  1734. </select>
  1735. <select id="querySceneNaturalListByBqAndXlkAndQx" parameterType="api.common.pojo.param.scene.SceneNaturalParam"
  1736. resultType="api.common.pojo.po.scene.SceneNaturalPO">
  1737. select
  1738. natural_id,natural_name,weather,backlight,light_change,road_type,
  1739. road_matrrial,driveway_num,driveway_type,road_flatness,road_curvature,
  1740. ramp,intersection_type,plane_intersection,bridge,tunnel,speed_limit,
  1741. min_speed_limit,no_entry,no_stopping,left_lane_line,right_lane_line,
  1742. conductor_marking,pedestrian_crossing,traffic_light,deceleration_marking,
  1743. pavement_condition,natural_disaster,road_safety_signs,safety_warning_board,
  1744. traffic_accident,patency,special_vehicle_yield,violation,double_flashing_car,
  1745. self_behavior,target_behavior,create_user_id,create_time,modify_user_id,
  1746. modify_time,is_deleted,share,video_address,osgb_address,
  1747. xodr_address,xosc_address,json_address,video_preview,max_time
  1748. from (
  1749. select
  1750. natural_id,natural_name,weather,backlight,light_change,road_type,
  1751. road_matrrial,driveway_num,driveway_type,road_flatness,road_curvature,
  1752. ramp,intersection_type,plane_intersection,bridge,tunnel,speed_limit,
  1753. min_speed_limit,no_entry,no_stopping,left_lane_line,right_lane_line,
  1754. conductor_marking,pedestrian_crossing,traffic_light,deceleration_marking,
  1755. pavement_condition,natural_disaster,road_safety_signs,safety_warning_board,
  1756. traffic_accident,patency,special_vehicle_yield,violation,double_flashing_car,
  1757. self_behavior,target_behavior,create_user_id,create_time,modify_user_id,
  1758. modify_time,is_deleted,share,video_address,osgb_address,
  1759. xodr_address,xosc_address,json_address,video_preview,max_time
  1760. from (select zr.* from( select s.scene_name
  1761. FROM system_scene_package p
  1762. JOIN system_user_scene u on p.id = u.package_id and u.is_deleted = '0' and p.is_deleted = '0'
  1763. JOIN system_scene_package_sublist s on p.id = s.scene_and_package
  1764. where scene_type='1' and s.is_deleted = '0' and user_id=#{po.userId} group by s.scene_name)qx join scene_natural
  1765. zr on qx.scene_name=zr.natural_name) dd
  1766. <where>
  1767. <if test="po.naturalName != null and po.naturalName != ''">
  1768. natural_name like CONCAT('%',#{po.naturalName,jdbcType=VARCHAR},'%')
  1769. </if>
  1770. <if test="po.weather != null and po.weather.size()>0 ">
  1771. and weather in
  1772. <foreach collection="po.weather" item="item" index="index"
  1773. separator="," open="(" close=")">
  1774. #{item}
  1775. </foreach>
  1776. </if>
  1777. <if test="po.backlight != null and po.backlight.size()>0">
  1778. and backlight in
  1779. <foreach collection="po.backlight" item="item" index="index"
  1780. separator="," open="(" close=")">
  1781. #{item}
  1782. </foreach>
  1783. </if>
  1784. <if test="po.lightChange != null and po.lightChange.size()>0">
  1785. and light_change in
  1786. <foreach collection="po.lightChange" item="item" index="index"
  1787. separator="," open="(" close=")">
  1788. #{item}
  1789. </foreach>
  1790. </if>
  1791. <if test="po.roadType != null and po.roadType.size()>0">
  1792. and road_type in
  1793. <foreach collection="po.roadType" item="item" index="index"
  1794. separator="," open="(" close=")">
  1795. #{item}
  1796. </foreach>
  1797. </if>
  1798. <if test="po.roadMatrrial != null and po.roadMatrrial.size()>0">
  1799. and road_matrrial in
  1800. <foreach collection="po.roadMatrrial" item="item" index="index"
  1801. separator="," open="(" close=")">
  1802. #{item}
  1803. </foreach>
  1804. </if>
  1805. <if test="po.drivewayNum != null and po.drivewayNum.size()>0">
  1806. and driveway_num in
  1807. <foreach collection="po.drivewayNum" item="item" index="index"
  1808. separator="," open="(" close=")">
  1809. #{item}
  1810. </foreach>
  1811. </if>
  1812. <if test="po.drivewayType != null and po.drivewayType.size()>0">
  1813. and driveway_type in
  1814. <foreach collection="po.drivewayType" item="item" index="index"
  1815. separator="," open="(" close=")">
  1816. #{item}
  1817. </foreach>
  1818. </if>
  1819. <if test="po.roadFlatness != null and po.roadFlatness.size()>0">
  1820. and road_flatness in
  1821. <foreach collection="po.roadFlatness" item="item" index="index"
  1822. separator="," open="(" close=")">
  1823. #{item}
  1824. </foreach>
  1825. </if>
  1826. <if test="po.roadCurvature != null and po.roadCurvature.size()>0">
  1827. and road_curvature in
  1828. <foreach collection="po.roadCurvature" item="item" index="index"
  1829. separator="," open="(" close=")">
  1830. #{item}
  1831. </foreach>
  1832. </if>
  1833. <if test="po.ramp != null and po.ramp.size()>0">
  1834. and ramp in
  1835. <foreach collection="po.ramp" item="item" index="index"
  1836. separator="," open="(" close=")">
  1837. #{item}
  1838. </foreach>
  1839. </if>
  1840. <if test="po.intersectionType != null and po.intersectionType.size()>0">
  1841. and intersection_type in
  1842. <foreach collection="po.intersectionType" item="item" index="index"
  1843. separator="," open="(" close=")">
  1844. #{item}
  1845. </foreach>
  1846. </if>
  1847. <if test="po.planeIntersection != null and po.planeIntersection.size()>0">
  1848. and plane_intersection in
  1849. <foreach collection="po.planeIntersection" item="item" index="index"
  1850. separator="," open="(" close=")">
  1851. #{item}
  1852. </foreach>
  1853. </if>
  1854. <if test="po.bridge != null and po.bridge.size()>0">
  1855. and bridge in
  1856. <foreach collection="po.bridge" item="item" index="index"
  1857. separator="," open="(" close=")">
  1858. #{item}
  1859. </foreach>
  1860. </if>
  1861. <if test="po.tunnel != null and po.tunnel.size()>0">
  1862. and tunnel in
  1863. <foreach collection="po.tunnel" item="item" index="index"
  1864. separator="," open="(" close=")">
  1865. #{item}
  1866. </foreach>
  1867. </if>
  1868. <if test="po.speedLimit != null and po.speedLimit.size()>0">
  1869. and speed_limit in
  1870. <foreach collection="po.speedLimit" item="item" index="index"
  1871. separator="," open="(" close=")">
  1872. #{item}
  1873. </foreach>
  1874. </if>
  1875. <if test="po.minSpeedLimit != null and po.minSpeedLimit.size()>0">
  1876. and min_speed_limit in
  1877. <foreach collection="po.minSpeedLimit" item="item" index="index"
  1878. separator="," open="(" close=")">
  1879. #{item}
  1880. </foreach>
  1881. </if>
  1882. <if test="po.noEntry != null and po.noEntry.size()>0">
  1883. and no_entry in
  1884. <foreach collection="po.noEntry" item="item" index="index"
  1885. separator="," open="(" close=")">
  1886. #{item}
  1887. </foreach>
  1888. </if>
  1889. <if test="po.noStopping != null and po.noStopping.size()>0">
  1890. and no_stopping in
  1891. <foreach collection="po.noStopping" item="item" index="index"
  1892. separator="," open="(" close=")">
  1893. #{item}
  1894. </foreach>
  1895. </if>
  1896. <if test="po.leftLaneLine != null and po.leftLaneLine.size()>0">
  1897. and left_lane_line in
  1898. <foreach collection="po.leftLaneLine" item="item" index="index"
  1899. separator="," open="(" close=")">
  1900. #{item}
  1901. </foreach>
  1902. </if>
  1903. <if test="po.rightLaneLine != null and po.rightLaneLine.size()>0">
  1904. and right_lane_line in
  1905. <foreach collection="po.rightLaneLine" item="item" index="index"
  1906. separator="," open="(" close=")">
  1907. #{item}
  1908. </foreach>
  1909. </if>
  1910. <if test="po.conductorMarking != null and po.conductorMarking.size()>0">
  1911. and conductor_marking in
  1912. <foreach collection="po.conductorMarking" item="item" index="index"
  1913. separator="," open="(" close=")">
  1914. #{item}
  1915. </foreach>
  1916. </if>
  1917. <if test="po.pedestrianCrossing != null and po.pedestrianCrossing.size()>0">
  1918. and pedestrian_crossing in
  1919. <foreach collection="po.pedestrianCrossing" item="item" index="index"
  1920. separator="," open="(" close=")">
  1921. #{item}
  1922. </foreach>
  1923. </if>
  1924. <if test="po.trafficLight != null and po.trafficLight.size()>0">
  1925. and traffic_light in
  1926. <foreach collection="po.trafficLight" item="item" index="index"
  1927. separator="," open="(" close=")">
  1928. #{item}
  1929. </foreach>
  1930. </if>
  1931. <if test="po.decelerationMarking != null and po.decelerationMarking.size()>0">
  1932. and deceleration_marking in
  1933. <foreach collection="po.decelerationMarking" item="item" index="index"
  1934. separator="," open="(" close=")">
  1935. #{item}
  1936. </foreach>
  1937. </if>
  1938. <if test="po.pavementCondition != null and po.pavementCondition.size()>0">
  1939. and pavement_condition in
  1940. <foreach collection="po.pavementCondition" item="item" index="index"
  1941. separator="," open="(" close=")">
  1942. #{item}
  1943. </foreach>
  1944. </if>
  1945. <if test="po.naturalDisaster != null and po.naturalDisaster.size()>0">
  1946. and natural_disaster in
  1947. <foreach collection="po.naturalDisaster" item="item" index="index"
  1948. separator="," open="(" close=")">
  1949. #{item}
  1950. </foreach>
  1951. </if>
  1952. <if test="po.roadSafetySigns != null and po.roadSafetySigns.size()>0">
  1953. and road_safety_signs in
  1954. <foreach collection="po.roadSafetySigns" item="item" index="index"
  1955. separator="," open="(" close=")">
  1956. #{item}
  1957. </foreach>
  1958. </if>
  1959. <if test="po.safetyWarningBoard != null and po.safetyWarningBoard.size()>0">
  1960. and safety_warning_board in
  1961. <foreach collection="po.safetyWarningBoard" item="item" index="index"
  1962. separator="," open="(" close=")">
  1963. #{item}
  1964. </foreach>
  1965. </if>
  1966. <if test="po.trafficAccident != null and po.trafficAccident.size()>0">
  1967. and traffic_accident in
  1968. <foreach collection="po.trafficAccident" item="item" index="index"
  1969. separator="," open="(" close=")">
  1970. #{item}
  1971. </foreach>
  1972. </if>
  1973. <if test="po.patency != null and po.patency.size()>0">
  1974. and patency in
  1975. <foreach collection="po.patency" item="item" index="index"
  1976. separator="," open="(" close=")">
  1977. #{item}
  1978. </foreach>
  1979. </if>
  1980. <if test="po.specialVehicleYield != null and po.specialVehicleYield.size()>0">
  1981. and special_vehicle_yield in
  1982. <foreach collection="po.specialVehicleYield" item="item" index="index"
  1983. separator="," open="(" close=")">
  1984. #{item}
  1985. </foreach>
  1986. </if>
  1987. <if test="po.violation != null and po.violation.size()>0">
  1988. and violation in
  1989. <foreach collection="po.violation" item="item" index="index"
  1990. separator="," open="(" close=")">
  1991. #{item}
  1992. </foreach>
  1993. </if>
  1994. <if test="po.doubleFlashingCar != null and po.doubleFlashingCar.size()>0">
  1995. and double_flashing_car in
  1996. <foreach collection="po.doubleFlashingCar" item="item" index="index"
  1997. separator="," open="(" close=")">
  1998. #{item}
  1999. </foreach>
  2000. </if>
  2001. <if test="po.selfBehavior != null and po.selfBehavior.size()>0">
  2002. and
  2003. <foreach collection="po.selfBehavior" item="item" index="index"
  2004. separator=" or " open="(" close=")">
  2005. self_behavior like CONCAT('%,',#{item},',%')
  2006. or self_behavior like CONCAT('%,',#{item}) or
  2007. self_behavior like CONCAT(#{item},',%') or
  2008. self_behavior=#{item}
  2009. </foreach>
  2010. </if>
  2011. <if test="po.targetBehavior != null and po.targetBehavior.size()>0">
  2012. and
  2013. <foreach collection="po.targetBehavior" item="item" index="index"
  2014. separator=" or " open="(" close=")">
  2015. target_behavior like CONCAT('%,',#{item},',%')
  2016. or target_behavior like CONCAT('%,',#{item}) or
  2017. target_behavior like CONCAT(#{item},',%') or
  2018. target_behavior=#{item}
  2019. </foreach>
  2020. </if>
  2021. <if test="po.ids != null and po.ids.length>0">
  2022. and natural_id in
  2023. <foreach collection="po.ids" item="item" index="index"
  2024. separator="," open="(" close=")">
  2025. #{item}
  2026. </foreach>
  2027. </if>
  2028. <if test="po.allSceneNames != null and po.allSceneNames.length>0">
  2029. and natural_name in
  2030. <foreach collection="po.allSceneNames" item="item" index="index"
  2031. separator="," open="(" close=")">
  2032. #{item}
  2033. </foreach>
  2034. </if>
  2035. </where>
  2036. union
  2037. select
  2038. natural_id,natural_name,weather,backlight,light_change,road_type,
  2039. road_matrrial,driveway_num,driveway_type,road_flatness,road_curvature,
  2040. ramp,intersection_type,plane_intersection,bridge,tunnel,speed_limit,
  2041. min_speed_limit,no_entry,no_stopping,left_lane_line,right_lane_line,
  2042. conductor_marking,pedestrian_crossing,traffic_light,deceleration_marking,
  2043. pavement_condition,natural_disaster,road_safety_signs,safety_warning_board,
  2044. traffic_accident,patency,special_vehicle_yield,violation,double_flashing_car,
  2045. self_behavior,target_behavior,create_user_id,create_time,modify_user_id,
  2046. modify_time,is_deleted,share,video_address,osgb_address,
  2047. xodr_address,xosc_address,json_address,video_preview,max_time
  2048. from (select zr.* from( select s.scene_name
  2049. FROM system_scene_package p
  2050. JOIN system_user_scene u on p.id = u.package_id and u.is_deleted = '0' and p.is_deleted = '0'
  2051. JOIN system_scene_package_sublist s on p.id = s.scene_and_package
  2052. where scene_type='1' and s.is_deleted = '0' and user_id=#{poBq.userId} group by s.scene_name)qx join
  2053. scene_natural zr on qx.scene_name=zr.natural_name) ee
  2054. <where>
  2055. <if test="poBq.naturalName != null and poBq.naturalName != ''">
  2056. or natural_name like CONCAT('%',#{poBq.naturalName,jdbcType=VARCHAR},'%')
  2057. </if>
  2058. <if test="poBq.weather != null and poBq.weather.size()>0 ">
  2059. or weather in
  2060. <foreach collection="poBq.weather" item="item" index="index"
  2061. separator="," open="(" close=")">
  2062. #{item}
  2063. </foreach>
  2064. </if>
  2065. <if test="poBq.backlight != null and poBq.backlight.size()>0">
  2066. or backlight in
  2067. <foreach collection="poBq.backlight" item="item" index="index"
  2068. separator="," open="(" close=")">
  2069. #{item}
  2070. </foreach>
  2071. </if>
  2072. <if test="poBq.lightChange != null and poBq.lightChange.size()>0">
  2073. or light_change in
  2074. <foreach collection="poBq.lightChange" item="item" index="index"
  2075. separator="," open="(" close=")">
  2076. #{item}
  2077. </foreach>
  2078. </if>
  2079. <if test="poBq.roadType != null and poBq.roadType.size()>0">
  2080. or road_type in
  2081. <foreach collection="poBq.roadType" item="item" index="index"
  2082. separator="," open="(" close=")">
  2083. #{item}
  2084. </foreach>
  2085. </if>
  2086. <if test="poBq.roadMatrrial != null and poBq.roadMatrrial.size()>0">
  2087. or road_matrrial in
  2088. <foreach collection="poBq.roadMatrrial" item="item" index="index"
  2089. separator="," open="(" close=")">
  2090. #{item}
  2091. </foreach>
  2092. </if>
  2093. <if test="poBq.drivewayNum != null and poBq.drivewayNum.size()>0">
  2094. or driveway_num in
  2095. <foreach collection="poBq.drivewayNum" item="item" index="index"
  2096. separator="," open="(" close=")">
  2097. #{item}
  2098. </foreach>
  2099. </if>
  2100. <if test="poBq.drivewayType != null and poBq.drivewayType.size()>0">
  2101. or driveway_type in
  2102. <foreach collection="poBq.drivewayType" item="item" index="index"
  2103. separator="," open="(" close=")">
  2104. #{item}
  2105. </foreach>
  2106. </if>
  2107. <if test="poBq.roadFlatness != null and poBq.roadFlatness.size()>0">
  2108. or road_flatness in
  2109. <foreach collection="poBq.roadFlatness" item="item" index="index"
  2110. separator="," open="(" close=")">
  2111. #{item}
  2112. </foreach>
  2113. </if>
  2114. <if test="poBq.roadCurvature != null and poBq.roadCurvature.size()>0">
  2115. or road_curvature in
  2116. <foreach collection="poBq.roadCurvature" item="item" index="index"
  2117. separator="," open="(" close=")">
  2118. #{item}
  2119. </foreach>
  2120. </if>
  2121. <if test="poBq.ramp != null and poBq.ramp.size()>0">
  2122. or ramp in
  2123. <foreach collection="poBq.ramp" item="item" index="index"
  2124. separator="," open="(" close=")">
  2125. #{item}
  2126. </foreach>
  2127. </if>
  2128. <if test="poBq.intersectionType != null and poBq.intersectionType.size()>0">
  2129. or intersection_type in
  2130. <foreach collection="poBq.intersectionType" item="item" index="index"
  2131. separator="," open="(" close=")">
  2132. #{item}
  2133. </foreach>
  2134. </if>
  2135. <if test="poBq.planeIntersection != null and poBq.planeIntersection.size()>0">
  2136. or plane_intersection in
  2137. <foreach collection="poBq.planeIntersection" item="item" index="index"
  2138. separator="," open="(" close=")">
  2139. #{item}
  2140. </foreach>
  2141. </if>
  2142. <if test="poBq.bridge != null and poBq.bridge.size()>0">
  2143. or bridge in
  2144. <foreach collection="poBq.bridge" item="item" index="index"
  2145. separator="," open="(" close=")">
  2146. #{item}
  2147. </foreach>
  2148. </if>
  2149. <if test="poBq.tunnel != null and poBq.tunnel.size()>0">
  2150. or tunnel in
  2151. <foreach collection="poBq.tunnel" item="item" index="index"
  2152. separator="," open="(" close=")">
  2153. #{item}
  2154. </foreach>
  2155. </if>
  2156. <if test="poBq.speedLimit != null and poBq.speedLimit.size()>0">
  2157. or speed_limit in
  2158. <foreach collection="poBq.speedLimit" item="item" index="index"
  2159. separator="," open="(" close=")">
  2160. #{item}
  2161. </foreach>
  2162. </if>
  2163. <if test="poBq.minSpeedLimit != null and poBq.minSpeedLimit.size()>0">
  2164. or min_speed_limit in
  2165. <foreach collection="poBq.minSpeedLimit" item="item" index="index"
  2166. separator="," open="(" close=")">
  2167. #{item}
  2168. </foreach>
  2169. </if>
  2170. <if test="poBq.noEntry != null and poBq.noEntry.size()>0">
  2171. or no_entry in
  2172. <foreach collection="poBq.noEntry" item="item" index="index"
  2173. separator="," open="(" close=")">
  2174. #{item}
  2175. </foreach>
  2176. </if>
  2177. <if test="poBq.noStopping != null and poBq.noStopping.size()>0">
  2178. or no_stopping in
  2179. <foreach collection="poBq.noStopping" item="item" index="index"
  2180. separator="," open="(" close=")">
  2181. #{item}
  2182. </foreach>
  2183. </if>
  2184. <if test="poBq.leftLaneLine != null and poBq.leftLaneLine.size()>0">
  2185. or left_lane_line in
  2186. <foreach collection="poBq.leftLaneLine" item="item" index="index"
  2187. separator="," open="(" close=")">
  2188. #{item}
  2189. </foreach>
  2190. </if>
  2191. <if test="poBq.rightLaneLine != null and poBq.rightLaneLine.size()>0">
  2192. or right_lane_line in
  2193. <foreach collection="poBq.rightLaneLine" item="item" index="index"
  2194. separator="," open="(" close=")">
  2195. #{item}
  2196. </foreach>
  2197. </if>
  2198. <if test="poBq.conductorMarking != null and poBq.conductorMarking.size()>0">
  2199. or conductor_marking in
  2200. <foreach collection="poBq.conductorMarking" item="item" index="index"
  2201. separator="," open="(" close=")">
  2202. #{item}
  2203. </foreach>
  2204. </if>
  2205. <if test="poBq.pedestrianCrossing != null and poBq.pedestrianCrossing.size()>0">
  2206. or pedestrian_crossing in
  2207. <foreach collection="poBq.pedestrianCrossing" item="item" index="index"
  2208. separator="," open="(" close=")">
  2209. #{item}
  2210. </foreach>
  2211. </if>
  2212. <if test="poBq.trafficLight != null and poBq.trafficLight.size()>0">
  2213. or traffic_light in
  2214. <foreach collection="poBq.trafficLight" item="item" index="index"
  2215. separator="," open="(" close=")">
  2216. #{item}
  2217. </foreach>
  2218. </if>
  2219. <if test="poBq.decelerationMarking != null and poBq.decelerationMarking.size()>0">
  2220. or deceleration_marking in
  2221. <foreach collection="poBq.decelerationMarking" item="item" index="index"
  2222. separator="," open="(" close=")">
  2223. #{item}
  2224. </foreach>
  2225. </if>
  2226. <if test="poBq.pavementCondition != null and poBq.pavementCondition.size()>0">
  2227. or pavement_condition in
  2228. <foreach collection="poBq.pavementCondition" item="item" index="index"
  2229. separator="," open="(" close=")">
  2230. #{item}
  2231. </foreach>
  2232. </if>
  2233. <if test="poBq.naturalDisaster != null and poBq.naturalDisaster.size()>0">
  2234. or natural_disaster in
  2235. <foreach collection="poBq.naturalDisaster" item="item" index="index"
  2236. separator="," open="(" close=")">
  2237. #{item}
  2238. </foreach>
  2239. </if>
  2240. <if test="poBq.roadSafetySigns != null and poBq.roadSafetySigns.size()>0">
  2241. or road_safety_signs in
  2242. <foreach collection="poBq.roadSafetySigns" item="item" index="index"
  2243. separator="," open="(" close=")">
  2244. #{item}
  2245. </foreach>
  2246. </if>
  2247. <if test="poBq.safetyWarningBoard != null and poBq.safetyWarningBoard.size()>0">
  2248. or safety_warning_board in
  2249. <foreach collection="poBq.safetyWarningBoard" item="item" index="index"
  2250. separator="," open="(" close=")">
  2251. #{item}
  2252. </foreach>
  2253. </if>
  2254. <if test="poBq.trafficAccident != null and poBq.trafficAccident.size()>0">
  2255. or traffic_accident in
  2256. <foreach collection="poBq.trafficAccident" item="item" index="index"
  2257. separator="," open="(" close=")">
  2258. #{item}
  2259. </foreach>
  2260. </if>
  2261. <if test="poBq.patency != null and poBq.patency.size()>0">
  2262. or patency in
  2263. <foreach collection="poBq.patency" item="item" index="index"
  2264. separator="," open="(" close=")">
  2265. #{item}
  2266. </foreach>
  2267. </if>
  2268. <if test="poBq.specialVehicleYield != null and poBq.specialVehicleYield.size()>0">
  2269. or special_vehicle_yield in
  2270. <foreach collection="poBq.specialVehicleYield" item="item" index="index"
  2271. separator="," open="(" close=")">
  2272. #{item}
  2273. </foreach>
  2274. </if>
  2275. <if test="poBq.violation != null and poBq.violation.size()>0">
  2276. or violation in
  2277. <foreach collection="poBq.violation" item="item" index="index"
  2278. separator="," open="(" close=")">
  2279. #{item}
  2280. </foreach>
  2281. </if>
  2282. <if test="poBq.doubleFlashingCar != null and poBq.doubleFlashingCar.size()>0">
  2283. or double_flashing_car in
  2284. <foreach collection="poBq.doubleFlashingCar" item="item" index="index"
  2285. separator="," open="(" close=")">
  2286. #{item}
  2287. </foreach>
  2288. </if>
  2289. <if test="poBq.selfBehavior != null and poBq.selfBehavior.size()>0">
  2290. or
  2291. <foreach collection="poBq.selfBehavior" item="item" index="index"
  2292. separator=" or " open="(" close=")">
  2293. self_behavior like CONCAT('%,',#{item},',%')
  2294. or self_behavior like CONCAT('%,',#{item}) or
  2295. self_behavior like CONCAT(#{item},',%') or
  2296. self_behavior=#{item}
  2297. </foreach>
  2298. </if>
  2299. <if test="poBq.targetBehavior != null and poBq.targetBehavior.size()>0">
  2300. or
  2301. <foreach collection="poBq.targetBehavior" item="item" index="index"
  2302. separator=" or " open="(" close=")">
  2303. target_behavior like CONCAT('%,',#{item},',%')
  2304. or target_behavior like CONCAT('%,',#{item}) or
  2305. target_behavior like CONCAT(#{item},',%') or
  2306. target_behavior=#{item}
  2307. </foreach>
  2308. </if>
  2309. <if test="poBq.ids != null and poBq.ids.length>0">
  2310. or natural_id in
  2311. <foreach collection="poBq.ids" item="item" index="index"
  2312. separator="," open="(" close=")">
  2313. #{item}
  2314. </foreach>
  2315. </if>
  2316. <if test="poBq.allSceneNames != null and poBq.allSceneNames.length>0">
  2317. or natural_name in
  2318. <foreach collection="poBq.allSceneNames" item="item" index="index"
  2319. separator="," open="(" close=")">
  2320. #{item}
  2321. </foreach>
  2322. </if>
  2323. </where>
  2324. )a where
  2325. a.is_deleted = '0'
  2326. <if test="poBq.AllIds != null and poBq.AllIds.size()>0">
  2327. and a.natural_id in
  2328. <foreach collection="poBq.AllIds" item="item" index="index"
  2329. separator="," open="(" close=")">
  2330. #{item}
  2331. </foreach>
  2332. </if>
  2333. order by a.modify_time desc
  2334. </select>
  2335. <select id="querySceneNaturalListByBqAndQx" parameterType="java.util.Map"
  2336. resultType="api.common.pojo.po.scene.SceneNaturalPO">
  2337. select
  2338. natural_id,natural_name,weather,backlight,light_change,road_type,
  2339. road_matrrial,driveway_num,driveway_type,road_flatness,road_curvature,
  2340. ramp,intersection_type,plane_intersection,bridge,tunnel,speed_limit,
  2341. min_speed_limit,no_entry,no_stopping,left_lane_line,right_lane_line,
  2342. conductor_marking,pedestrian_crossing,traffic_light,deceleration_marking,
  2343. pavement_condition,natural_disaster,road_safety_signs,safety_warning_board,
  2344. traffic_accident,patency,special_vehicle_yield,violation,double_flashing_car,
  2345. self_behavior,target_behavior,create_user_id,create_time,modify_user_id,
  2346. modify_time,is_deleted,share,video_address,osgb_address,
  2347. xodr_address,xosc_address,json_address,video_preview,max_time from (
  2348. select
  2349. natural_id,natural_name,weather,backlight,light_change,road_type,
  2350. road_matrrial,driveway_num,driveway_type,road_flatness,road_curvature,
  2351. ramp,intersection_type,plane_intersection,bridge,tunnel,speed_limit,
  2352. min_speed_limit,no_entry,no_stopping,left_lane_line,right_lane_line,
  2353. conductor_marking,pedestrian_crossing,traffic_light,deceleration_marking,
  2354. pavement_condition,natural_disaster,road_safety_signs,safety_warning_board,
  2355. traffic_accident,patency,special_vehicle_yield,violation,double_flashing_car,
  2356. self_behavior,target_behavior,create_user_id,create_time,modify_user_id,
  2357. modify_time,is_deleted,share,video_address,osgb_address,
  2358. xodr_address,xosc_address,json_address,video_preview,max_time
  2359. from (select zr.* from( select s.scene_name
  2360. FROM system_scene_package p
  2361. JOIN system_user_scene u on p.id = u.package_id and u.is_deleted = '0' and p.is_deleted = '0'
  2362. JOIN system_scene_package_sublist s on p.id = s.scene_and_package
  2363. where scene_type='1' and s.is_deleted = '0' and user_id=#{poBq.userId} group by s.scene_name)qx join
  2364. scene_natural zr on qx.scene_name=zr.natural_name) dd
  2365. <where>
  2366. <if test="poBq.naturalName != null and poBq.naturalName != ''">
  2367. natural_name like CONCAT('%',#{poBq.naturalName,jdbcType=VARCHAR},'%')
  2368. </if>
  2369. <if test="poBq.weather != null and poBq.weather.size()>0 ">
  2370. or weather in
  2371. <foreach collection="poBq.weather" item="item" index="index"
  2372. separator="," open="(" close=")">
  2373. #{item}
  2374. </foreach>
  2375. </if>
  2376. <if test="poBq.backlight != null and poBq.backlight.size()>0">
  2377. or backlight in
  2378. <foreach collection="poBq.backlight" item="item" index="index"
  2379. separator="," open="(" close=")">
  2380. #{item}
  2381. </foreach>
  2382. </if>
  2383. <if test="poBq.lightChange != null and poBq.lightChange.size()>0">
  2384. or light_change in
  2385. <foreach collection="poBq.lightChange" item="item" index="index"
  2386. separator="," open="(" close=")">
  2387. #{item}
  2388. </foreach>
  2389. </if>
  2390. <if test="poBq.roadType != null and poBq.roadType.size()>0">
  2391. or road_type in
  2392. <foreach collection="poBq.roadType" item="item" index="index"
  2393. separator="," open="(" close=")">
  2394. #{item}
  2395. </foreach>
  2396. </if>
  2397. <if test="poBq.roadMatrrial != null and poBq.roadMatrrial.size()>0">
  2398. or road_matrrial in
  2399. <foreach collection="poBq.roadMatrrial" item="item" index="index"
  2400. separator="," open="(" close=")">
  2401. #{item}
  2402. </foreach>
  2403. </if>
  2404. <if test="poBq.drivewayNum != null and poBq.drivewayNum.size()>0">
  2405. or driveway_num in
  2406. <foreach collection="poBq.drivewayNum" item="item" index="index"
  2407. separator="," open="(" close=")">
  2408. #{item}
  2409. </foreach>
  2410. </if>
  2411. <if test="poBq.drivewayType != null and poBq.drivewayType.size()>0">
  2412. or driveway_type in
  2413. <foreach collection="poBq.drivewayType" item="item" index="index"
  2414. separator="," open="(" close=")">
  2415. #{item}
  2416. </foreach>
  2417. </if>
  2418. <if test="poBq.roadFlatness != null and poBq.roadFlatness.size()>0">
  2419. or road_flatness in
  2420. <foreach collection="poBq.roadFlatness" item="item" index="index"
  2421. separator="," open="(" close=")">
  2422. #{item}
  2423. </foreach>
  2424. </if>
  2425. <if test="poBq.roadCurvature != null and poBq.roadCurvature.size()>0">
  2426. or road_curvature in
  2427. <foreach collection="poBq.roadCurvature" item="item" index="index"
  2428. separator="," open="(" close=")">
  2429. #{item}
  2430. </foreach>
  2431. </if>
  2432. <if test="poBq.ramp != null and poBq.ramp.size()>0">
  2433. or ramp in
  2434. <foreach collection="poBq.ramp" item="item" index="index"
  2435. separator="," open="(" close=")">
  2436. #{item}
  2437. </foreach>
  2438. </if>
  2439. <if test="poBq.intersectionType != null and poBq.intersectionType.size()>0">
  2440. or intersection_type in
  2441. <foreach collection="poBq.intersectionType" item="item" index="index"
  2442. separator="," open="(" close=")">
  2443. #{item}
  2444. </foreach>
  2445. </if>
  2446. <if test="poBq.planeIntersection != null and poBq.planeIntersection.size()>0">
  2447. or plane_intersection in
  2448. <foreach collection="poBq.planeIntersection" item="item" index="index"
  2449. separator="," open="(" close=")">
  2450. #{item}
  2451. </foreach>
  2452. </if>
  2453. <if test="poBq.bridge != null and poBq.bridge.size()>0">
  2454. or bridge in
  2455. <foreach collection="poBq.bridge" item="item" index="index"
  2456. separator="," open="(" close=")">
  2457. #{item}
  2458. </foreach>
  2459. </if>
  2460. <if test="poBq.tunnel != null and poBq.tunnel.size()>0">
  2461. or tunnel in
  2462. <foreach collection="poBq.tunnel" item="item" index="index"
  2463. separator="," open="(" close=")">
  2464. #{item}
  2465. </foreach>
  2466. </if>
  2467. <if test="poBq.speedLimit != null and poBq.speedLimit.size()>0">
  2468. or speed_limit in
  2469. <foreach collection="poBq.speedLimit" item="item" index="index"
  2470. separator="," open="(" close=")">
  2471. #{item}
  2472. </foreach>
  2473. </if>
  2474. <if test="poBq.minSpeedLimit != null and poBq.minSpeedLimit.size()>0">
  2475. or min_speed_limit in
  2476. <foreach collection="poBq.minSpeedLimit" item="item" index="index"
  2477. separator="," open="(" close=")">
  2478. #{item}
  2479. </foreach>
  2480. </if>
  2481. <if test="poBq.noEntry != null and poBq.noEntry.size()>0">
  2482. or no_entry in
  2483. <foreach collection="poBq.noEntry" item="item" index="index"
  2484. separator="," open="(" close=")">
  2485. #{item}
  2486. </foreach>
  2487. </if>
  2488. <if test="poBq.noStopping != null and poBq.noStopping.size()>0">
  2489. or no_stopping in
  2490. <foreach collection="poBq.noStopping" item="item" index="index"
  2491. separator="," open="(" close=")">
  2492. #{item}
  2493. </foreach>
  2494. </if>
  2495. <if test="poBq.leftLaneLine != null and poBq.leftLaneLine.size()>0">
  2496. or left_lane_line in
  2497. <foreach collection="poBq.leftLaneLine" item="item" index="index"
  2498. separator="," open="(" close=")">
  2499. #{item}
  2500. </foreach>
  2501. </if>
  2502. <if test="poBq.rightLaneLine != null and poBq.rightLaneLine.size()>0">
  2503. or right_lane_line in
  2504. <foreach collection="poBq.rightLaneLine" item="item" index="index"
  2505. separator="," open="(" close=")">
  2506. #{item}
  2507. </foreach>
  2508. </if>
  2509. <if test="poBq.conductorMarking != null and poBq.conductorMarking.size()>0">
  2510. or conductor_marking in
  2511. <foreach collection="poBq.conductorMarking" item="item" index="index"
  2512. separator="," open="(" close=")">
  2513. #{item}
  2514. </foreach>
  2515. </if>
  2516. <if test="poBq.pedestrianCrossing != null and poBq.pedestrianCrossing.size()>0">
  2517. or pedestrian_crossing in
  2518. <foreach collection="poBq.pedestrianCrossing" item="item" index="index"
  2519. separator="," open="(" close=")">
  2520. #{item}
  2521. </foreach>
  2522. </if>
  2523. <if test="poBq.trafficLight != null and poBq.trafficLight.size()>0">
  2524. or traffic_light in
  2525. <foreach collection="poBq.trafficLight" item="item" index="index"
  2526. separator="," open="(" close=")">
  2527. #{item}
  2528. </foreach>
  2529. </if>
  2530. <if test="poBq.decelerationMarking != null and poBq.decelerationMarking.size()>0">
  2531. or deceleration_marking in
  2532. <foreach collection="poBq.decelerationMarking" item="item" index="index"
  2533. separator="," open="(" close=")">
  2534. #{item}
  2535. </foreach>
  2536. </if>
  2537. <if test="poBq.pavementCondition != null and poBq.pavementCondition.size()>0">
  2538. or pavement_condition in
  2539. <foreach collection="poBq.pavementCondition" item="item" index="index"
  2540. separator="," open="(" close=")">
  2541. #{item}
  2542. </foreach>
  2543. </if>
  2544. <if test="poBq.naturalDisaster != null and poBq.naturalDisaster.size()>0">
  2545. or natural_disaster in
  2546. <foreach collection="poBq.naturalDisaster" item="item" index="index"
  2547. separator="," open="(" close=")">
  2548. #{item}
  2549. </foreach>
  2550. </if>
  2551. <if test="poBq.roadSafetySigns != null and poBq.roadSafetySigns.size()>0">
  2552. or road_safety_signs in
  2553. <foreach collection="poBq.roadSafetySigns" item="item" index="index"
  2554. separator="," open="(" close=")">
  2555. #{item}
  2556. </foreach>
  2557. </if>
  2558. <if test="poBq.safetyWarningBoard != null and poBq.safetyWarningBoard.size()>0">
  2559. or safety_warning_board in
  2560. <foreach collection="poBq.safetyWarningBoard" item="item" index="index"
  2561. separator="," open="(" close=")">
  2562. #{item}
  2563. </foreach>
  2564. </if>
  2565. <if test="poBq.trafficAccident != null and poBq.trafficAccident.size()>0">
  2566. or traffic_accident in
  2567. <foreach collection="poBq.trafficAccident" item="item" index="index"
  2568. separator="," open="(" close=")">
  2569. #{item}
  2570. </foreach>
  2571. </if>
  2572. <if test="poBq.patency != null and poBq.patency.size()>0">
  2573. or patency in
  2574. <foreach collection="poBq.patency" item="item" index="index"
  2575. separator="," open="(" close=")">
  2576. #{item}
  2577. </foreach>
  2578. </if>
  2579. <if test="poBq.specialVehicleYield != null and poBq.specialVehicleYield.size()>0">
  2580. or special_vehicle_yield in
  2581. <foreach collection="poBq.specialVehicleYield" item="item" index="index"
  2582. separator="," open="(" close=")">
  2583. #{item}
  2584. </foreach>
  2585. </if>
  2586. <if test="poBq.violation != null and poBq.violation.size()>0">
  2587. or violation in
  2588. <foreach collection="poBq.violation" item="item" index="index"
  2589. separator="," open="(" close=")">
  2590. #{item}
  2591. </foreach>
  2592. </if>
  2593. <if test="poBq.doubleFlashingCar != null and poBq.doubleFlashingCar.size()>0">
  2594. or double_flashing_car in
  2595. <foreach collection="poBq.doubleFlashingCar" item="item" index="index"
  2596. separator="," open="(" close=")">
  2597. #{item}
  2598. </foreach>
  2599. </if>
  2600. <if test="poBq.selfBehavior != null and poBq.selfBehavior.size()>0">
  2601. or
  2602. <foreach collection="poBq.selfBehavior" item="item" index="index"
  2603. separator=" or " open="(" close=")">
  2604. self_behavior like CONCAT('%,',#{item},',%')
  2605. or self_behavior like CONCAT('%,',#{item}) or
  2606. self_behavior like CONCAT(#{item},',%') or
  2607. self_behavior=#{item}
  2608. </foreach>
  2609. </if>
  2610. <if test="poBq.targetBehavior != null and poBq.targetBehavior.size()>0">
  2611. or
  2612. <foreach collection="poBq.targetBehavior" item="item" index="index"
  2613. separator=" or " open="(" close=")">
  2614. target_behavior like CONCAT('%,',#{item},',%')
  2615. or target_behavior like CONCAT('%,',#{item}) or
  2616. target_behavior like CONCAT(#{item},',%') or
  2617. target_behavior=#{item}
  2618. </foreach>
  2619. </if>
  2620. <if test="poBq.ids != null and poBq.ids.length>0">
  2621. or natural_id in
  2622. <foreach collection="poBq.ids" item="item" index="index"
  2623. separator="," open="(" close=")">
  2624. #{item}
  2625. </foreach>
  2626. </if>
  2627. <if test="poBq.allSceneNames != null and poBq.allSceneNames.length>0">
  2628. or natural_name in
  2629. <foreach collection="poBq.allSceneNames" item="item" index="index"
  2630. separator="," open="(" close=")">
  2631. #{item}
  2632. </foreach>
  2633. </if>
  2634. ) a
  2635. where
  2636. a.is_deleted = '0'
  2637. <if test="po.AllIds != null and po.AllIds.size()>0">
  2638. and a.natural_id in
  2639. <foreach collection="po.AllIds" item="item" index="index"
  2640. separator="," open="(" close=")">
  2641. #{item}
  2642. </foreach>
  2643. </if>
  2644. order by a.modify_time desc
  2645. </where>
  2646. </select>
  2647. <select id="querySceneNaturalById" parameterType="java.lang.String"
  2648. resultType="api.common.pojo.po.scene.SceneNaturalPO">
  2649. select natural_id,
  2650. natural_name,
  2651. weather,
  2652. backlight,
  2653. light_change,
  2654. road_type,
  2655. road_matrrial,
  2656. driveway_num,
  2657. driveway_type,
  2658. road_flatness,
  2659. road_curvature,
  2660. ramp,
  2661. intersection_type,
  2662. plane_intersection,
  2663. bridge,
  2664. tunnel,
  2665. speed_limit,
  2666. min_speed_limit,
  2667. no_entry,
  2668. no_stopping,
  2669. left_lane_line,
  2670. right_lane_line,
  2671. conductor_marking,
  2672. pedestrian_crossing,
  2673. traffic_light,
  2674. deceleration_marking,
  2675. pavement_condition,
  2676. natural_disaster,
  2677. road_safety_signs,
  2678. safety_warning_board,
  2679. traffic_accident,
  2680. patency,
  2681. special_vehicle_yield,
  2682. violation,
  2683. double_flashing_car,
  2684. self_behavior,
  2685. target_behavior,
  2686. create_user_id,
  2687. create_time,
  2688. modify_user_id,
  2689. modify_time,
  2690. is_deleted,
  2691. share,
  2692. video_preview,
  2693. video_address,
  2694. osgb_address,
  2695. xodr_address,
  2696. xosc_address,
  2697. json_address,
  2698. max_time
  2699. from scene_natural
  2700. where natural_id = #{id}
  2701. </select>
  2702. </mapper>