| | |
| | | <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 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 |
| | |
| | | WHERE |
| | | is_deleted = 0 |
| | | <if test="deptList != null and deptList.size > 0"> |
| | | and create_dept in |
| | | and ( create_dept in |
| | | <foreach collection="deptList" item="deptId" open="(" separator="," close=")"> |
| | | #{deptId} |
| | | </foreach> |
| | | <if test="currentDeptId != null and currentDeptId != '' "> |
| | | or 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 |
| | | manufacturer |