xuhy
2 天以前 00957f0c836b80d9052a6ccf673d3b454b646081
ruoyi-system/src/main/resources/mapper/system/TErpMaintenanceReminderMapper.xml
@@ -59,5 +59,41 @@
            and t1.`status` = #{query.status}
        </if>
    </select>
    <select id="pageList1" 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_clinic_warehousing_batch t2 on t1.warehousing_batch_id = t2.id
                 left join t_erp_clinic_warehousing t3 on t2.warehousing_id = t3.id
                 left join t_erp_goods t4 on t2.goods_id = t4.id
        where t1.disabled = 0 and #{tomorrow} >= t1.maintenance_time
          <if test="user.roleType !=null and user.roleType==4">
              and t1.clinic_supplier_id = #{supplierClinicId} and t1.maintenance_type=1
          </if>
          <if test="user.roleType !=null and user.roleType==5">
              and t1.clinic_supplier_id = #{supplierClinicId} and t1.maintenance_type=2
          </if>
         <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>