EquipmentOutMapper.java 1.4 KB
package com.skua.modules.equipment.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.skua.modules.equipment.entity.EquipmentIn;
import com.skua.modules.equipment.entity.EquipmentOut;
import com.skua.modules.equipment.vo.EquipmentInExcel;
import com.skua.modules.equipment.vo.EquipmentOutExcel;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 出库
 */
public interface EquipmentOutMapper extends BaseMapper<EquipmentOut> {
    @Select("SELECT\n" +
            "ei.out_order outOrder,\n" +
            "ei.out_type outType,\n" +
            "GROUP_CONCAT( es.sparepart_name ) sparepartName,\n" +
            "ei.use_by useBy,\n" +
            "ei.choose_time chooseTime,\n" +
            "ei.out_date outDate,\n" +
            "ei.remark ,\n" +
            "ei.supplies_warehouse_id suppliesWarehouseId, \n" +
            "ei.recipient "+
            "FROM\n" +
            "equipment_out ei\n" +
            "LEFT JOIN equipment_out_child eic ON eic.out_id = ei.id\n" +
            "LEFT JOIN equipment_sparepart_supplies es ON es.id = eic.sparepart_id ${ew.customSqlSegment}")
    List<EquipmentOutExcel> queryExport(@Param(Constants.WRAPPER) QueryWrapper<EquipmentOut> queryWrapper);
}