| | |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.system.model.OaApprovalApplicationAssetItem"> |
| | | <id column="id" property="id" /> |
| | | <result column="approval_application_id" property="approvalApplicationId" /> |
| | | <result column="asset_main_id" property="assetMainId" /> |
| | | <id column="id" property="id"/> |
| | | <result column="approval_application_id" property="approvalApplicationId"/> |
| | | <result column="asset_main_id" property="assetMainId"/> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, approval_application_id, asset_main_id |
| | | id |
| | | , approval_application_id, asset_main_id |
| | | </sql> |
| | | <select id="pageList" resultType="com.ruoyi.system.vo.GrabListVO"> |
| | | select t1.*, |
| | | t3.type_name as assetTypeName, |
| | | t2.asset_name as assetName, |
| | | t2.asset_code as assetCode, |
| | | t4.dept_name as ownershipDeptName, |
| | | t2.asset_status as assetStatus, |
| | | t5.storage_time as storageTime, |
| | | case |
| | | when t2.use_dept_id is not null and t2.use_dept_id != '' then t6.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 |
| | | from oa_approval_application_asset_item t1 |
| | | left join asset_main t2 on t2.id = t1.asset_main_id |
| | | left join asset_type t3 on t3.id = t2.asset_type_id |
| | | left join t_dept t4 on t4.id = t2.ownership_dept_id |
| | | left join oa_approval_application_storage t5 on t5.approval_application_id = t1.approval_application_id |
| | | left join t_dept t6 on t6.id = t2.use_dept_id |
| | | where t1.approval_application_id = #{query.approvalApplicationId} |
| | | order by t1.id desc |
| | | </select> |
| | | |
| | | </mapper> |