| | |
| | | and sg.id = #{gun.id} |
| | | </if> |
| | | </select> |
| | | |
| | | <!--查询枪支数据--> |
| | | <select id="getGunList" resultType="org.springblade.modules.equipage.vo.GunVo"> |
| | | SELECT |
| | | sg.*,bt.dept_name AS tenantName,sll.longitude jd,sll.latitude wd,sll.record_time recordTime |
| | | FROM |
| | | sys_gun sg |
| | | LEFT JOIN |
| | | blade_dept bt |
| | | ON |
| | | sg.dept_id = bt.id |
| | | left join |
| | | sys_live_location sll |
| | | on |
| | | sll.worker_id = sg.id |
| | | WHERE |
| | | 1=1 |
| | | and type = 3 |
| | | <if test="gun.tenantName!=null and gun.tenantName!=''"> |
| | | and bt.dept_name like concat('%', #{gun.tenantName},'%') |
| | | </if> |
| | | <if test="gun.deptId!=null and gun.deptId!=''"> |
| | | and sg.dept_id = #{gun.deptId} |
| | | </if> |
| | | <if test="gun.gunCardNumber!=null and gun.gunCardNumber!=''"> |
| | | and sg.gun_card_number like concat('%', #{gun.gunCardNumber},'%') |
| | | </if> |
| | | <if test="gun.cardNumber!=null and gun.cardNumber!=''"> |
| | | and sg.card_number like concat('%', #{gun.cardNumber},'%') |
| | | </if> |
| | | <if test="gun.issueUnit!=null and gun.issueUnit!=''"> |
| | | and sg.issue_unit like concat('%', #{gun.issueUnit},'%') |
| | | </if> |
| | | <if test="gun.personInCharge!=null and gun.personInCharge!=''"> |
| | | and sg.person_in_charge like concat('%', #{gun.personInCharge},'%') |
| | | </if> |
| | | </select> |
| | | </mapper> |