| | |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="query.assetTypeId != null"> |
| | | AND t1.id = #{query.assetTypeId} |
| | | </if> |
| | | <if test="query.assetTypeIds != null and query.assetTypeIds.size()>0"> |
| | | AND t1.asset_type_id IN |
| | | <foreach collection="query.assetTypeIds" item="item" open="(" separator="," close=")"> |
| | |
| | | </select> |
| | | <select id="pageListInventoryDetail" resultType="com.ruoyi.system.vo.AssetStatisticsDetailVO"> |
| | | select t1.*,t2.*,case |
| | | when t1.use_dept_id is not null and t1.use_dept_id != '' then t3.dept_name |
| | | when t1.address is not null and t1.address != '' then t1.address |
| | | when t1.warehouse_name is not null and t1.warehouse_name != '' then t1.warehouse_name |
| | | when t2.use_dept_id is not null and t2.use_dept_id != '' then t3.dept_name |
| | | when t2.address is not null and t2.address != '' then t2.address |
| | | when t2.warehouse_name is not null and t2.warehouse_name != '' then t2.warehouse_name |
| | | else null |
| | | end as useName, |
| | | end as useName |
| | | |
| | | from asset_inventory_record t1 |
| | | left join asset_main t2 on t1.asset_main_id = t2.id |
| | | left join t_dept t3 on t3.id = t1.use_dept_id |
| | | left join t_dept t4 on t4.id = t1.ownership_dept_id |
| | | left join t_dept t3 on t3.id = t2.use_dept_id |
| | | left join t_dept t4 on t4.id = t2.ownership_dept_id |
| | | where 1=1 |
| | | <if test="query.category != null and query.category!=''"> |
| | | AND t2.category = #{query.category} |
| | | </if> |
| | | <if test="query.assetTypeIdSecond != null and query.assetTypeIdSecond!=''"> |
| | | AND t2.asset_type_id = #{query.category} |
| | | </if> |
| | | |
| | | <if test="query.assetStatus != null and query.assetStatus!=''"> |
| | | and t2.asset_status like concat('%',#{query.assetStatus},'%') |