| | |
| | | <!-- 分页查询 --> |
| | | <select id="getPageList" resultType="com.ruoyi.system.vo.asset.AssetAdMaterialPriceVO"> |
| | | SELECT |
| | | id, |
| | | material_name, |
| | | dept_id, |
| | | unit_price, |
| | | price_unit, |
| | | remarks, |
| | | create_time, |
| | | create_by, |
| | | update_time, |
| | | update_by |
| | | aamp.id, |
| | | aamp.material_name, |
| | | aamp.dept_id, |
| | | aamp.unit_price, |
| | | aamp.price_unit, |
| | | aamp.remarks, |
| | | aamp.create_time, |
| | | aamp.create_by, |
| | | aamp.update_time, |
| | | aamp.update_by |
| | | FROM asset_ad_material_price aamp LEFT JOIN t_dept td ON aamp.dept_id = td.id |
| | | <where> |
| | | disabled = 0 |
| | | aamp.disabled = 0 |
| | | <if test="query.materialName != null and query.materialName != ''"> |
| | | AND material_name LIKE CONCAT('%', #{query.materialName}, '%') |
| | | AND aamp.material_name LIKE CONCAT('%', #{query.materialName}, '%') |
| | | </if> |
| | | <if test="query.deptId != null"> |
| | | AND (td.id = #{query.deptId} OR FIND_IN_SET(#{query.deptId}, od.parent_id)) |
| | | AND (td.id = #{query.deptId} OR FIND_IN_SET(#{query.deptId}, td.parent_id)) |
| | | </if> |
| | | </where> |
| | | ORDER BY create_time DESC |
| | | ORDER BY aamp.create_time DESC |
| | | </select> |
| | | |
| | | </mapper> |