| | |
| | | </foreach> |
| | | </select> |
| | | |
| | | |
| | | <select id="carListById" parameterType="String" resultMap="ArdSyCarResult"> |
| | | select * from ard_sy_car where id = #{id} |
| | | </select> |
| | | <select id="getArdSyCarAndDeptByCarId" parameterType="String" resultType="java.util.Map"> |
| | | select asc0.id,asc0.car_id as "carId",coalesce(asc0.car_model,'') as "carModel", |
| | | coalesce(asc0.car_type,'') as "carType",coalesce(asc0.car_brand,'') as "carBrand", |
| | | asc0.dept_id as "deptId",asc0.car_picture as "carPicture",sd.ancestors, |
| | | sd.dept_name as "deptName" from ard_sy_car asc0 |
| | | inner join sys_dept sd on asc0.dept_id = sd.dept_id |
| | | where asc0.car_id = #{carId} |
| | | </select> |
| | | <select id="selectArdSyCarByDeptIds" parameterType="java.lang.Long" resultType="java.lang.String"> |
| | | select asy.car_id from ard_sy_car asy |
| | | where asy.dept_id in |
| | | <foreach item="deptId" collection="deptIdList" open="(" separator="," close=")"> |
| | | #{deptId} |
| | | </foreach> |
| | | </select> |
| | | <select id="getArdSyTankCarByCarId" parameterType="java.lang.String" resultMap="ArdSyCarResult"> |
| | | select distinct "asc".* from ard_sy_car "asc" |
| | | inner join ard_tank_lock atl on "asc".car_id = atl.car_id |
| | | where "asc".car_id = #{carId} |
| | | </select> |
| | | </mapper> |