package com.rongwei.bscommon.sys.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.rongwei.bsentity.domain.EquMaintenancePartDo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author shangmi
 * @title EquMaintenancePartDao
 * @date 2023/11/27 14:59
 * @description 设备维护部位
 */
public interface EquMaintenancePartDao extends BaseMapper<EquMaintenancePartDo> {
    @Insert("<script>" +
            "insert into equ_maintenance_part (ID,TENANTID,ROPTION,REMARK,CREATEDATE,CREATEUSERID,MODIFYDATE,MODIFYUSERID," +
            "CREATEUSERNAME,MODIFYUSERNAME,MASTERID,JAN,FEB,MAR,APR,MAY,JUN,JUL,AUG,SEP,OCT,NOV,DECEMBER,MAINTENANCESITE," +
            "MAINTENANCECONTENT,STANDARDREQUEST,EQUIPMENTSUPPORT,MEANS,`PERIOD`,MAINTENANCETYPE,ISOUTSOURCE,MAINTENANCESTANDID,MAINTENANCESTAND) VALUES " +
            "<foreach collection='list' item='info' separator=','>" +
            "(#{info.id},#{info.tenantid},#{info.roption},#{info.remark},#{info.createdate},#{info.createuserid},#{info.modifydate}," +
            "#{info.modifyuserid},#{info.createusername},#{info.modifyusername},#{info.masterid},#{info.jan}," +
            "#{info.feb},#{info.mar},#{info.apr},#{info.may},#{info.jun},#{info.jul},#{info.aug},#{info.sep}," +
            "#{info.oct},#{info.nov},#{info.december},#{info.maintenancesite},#{info.maintenancecontent}," +
            "#{info.standardrequest},#{info.equipmentsupport},#{info.means},#{info.period},#{info.maintenancetype}," +
            "#{info.isoutsource},#{info.maintenancestandid},#{info.maintenancestand})"+
            "</foreach>" +
            "</script>")
    void saveBatchList(@Param("list") List<EquMaintenancePartDo> equMaintenancePartList);
}
