| | |
| | | blade_dict_biz b ON (a.device_type = b.dict_key AND b.code = 'deviceType' AND b.parent_id != 0) |
| | | where a.is_deleted = 0 |
| | | <if test="deptList != null and deptList.size > 0"> |
| | | and a.create_dept in |
| | | and ( a.create_dept in |
| | | <foreach collection="deptList" item="deptId" open="(" separator="," close=")"> |
| | | #{deptId} |
| | | </foreach> |
| | | <!-- <if test="currentDeptId != null and currentDeptId != '' "> --> |
| | | <!-- or a.id in ( --> |
| | | <!-- SELECT device_id FROM ja_fw_device_per_share --> |
| | | <!-- WHERE loan_to_dept_id = #{currentDeptId} --> |
| | | <!-- AND is_deleted = 0 --> |
| | | <!-- ) --> |
| | | <!-- </if> --> |
| | | ) |
| | | </if> |
| | | group by a.device_type,b.dict_value |
| | | </select> |
| | |
| | | and (d.effective_range_km is null or d.effective_range_km = 0) |
| | | </if> |
| | | <if test="deptList != null and deptList.size > 0"> |
| | | and d.create_dept in |
| | | and ( d.create_dept in |
| | | <foreach collection="deptList" item="deptId" open="(" separator="," close=")"> |
| | | #{deptId} |
| | | </foreach> |
| | | <if test="currentDeptId != null and currentDeptId != '' "> |
| | | or d.id in ( |
| | | SELECT device_id FROM ja_fw_device_per_share |
| | | WHERE loan_to_dept_id = #{currentDeptId} |
| | | AND is_deleted = 0 |
| | | ) |
| | | </if> |
| | | ) |
| | | </if> |
| | | GROUP BY |
| | | d.final_outbound_area |