xuhy
5 天以前 1d6f916b5254a31a086f897acb0d4a5913a3e332
ruoyi-system/src/main/resources/mapper/system/TErpMaintenanceReminderMapper.xml
@@ -23,5 +23,35 @@
    <sql id="Base_Column_List">
        id, clinic_supplier_id, maintenance_type, warehousing_id, status, maintenance_person_id, maintenance_time, maintenance_record, create_time, update_time, create_by, update_by, disabled
    </sql>
    <select id="pageList" resultType="com.ruoyi.system.vo.TErpMaintenanceReminderListVo">
        select t1.id,
               t4.goods_name,
               t4.type_id,
               t2.batch_number,
               t1.maintenance_person_id,
               t1.maintenance_time,
               t1.`status`,
               t3.warehouse_no
        from t_erp_maintenance_reminder t1
                 LEFT JOIN t_erp_supplier_warehousing_batch t2 on t1.warehousing_batch_id = t2.id
                 left join t_erp_supplier_warehousing t3 on t2.warehousing_id = t3.id
                 left join t_erp_goods t4 on t3.goods_id = t4.id
        where t1.disabled = 0 and t1.maintenance_type =1 and t1.clinic_supplier_id =#{user.userId}
         <if test="query.warehouseNo != null and query.warehouseNo != ''">
            and t3.warehouse_no =#{query.warehouseNo}
        </if>
        <if test="query.goodsName != null and query.goodsName != ''">
            and t4.goods_name like concat('%',#{query.goodsName},'%')
        </if>
        <if test="query.typeId != null and query.typeId != '' ">
            and t4.type_id = #{query.typeId}
        </if>
        <if test="query.batchNumber != null and query.batchNumber != ''">
            and t2.batch_number = #{query.batchNumber}
        </if>
        <if test="query.status != null ">
            and t1.`status` = #{query.status}
        </if>
    </select>
</mapper>