package com.rongwei.bscommon.sys.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.rongwei.bsentity.domain.EquPartsSetoutTaskDo;
import org.apache.ibatis.annotations.Insert;
import org.springframework.data.repository.query.Param;

import java.util.List;

/**
 * @author shangmi
 * @title EquPartsSetoutTaskDao
 * @date 2023/11/28 13:17
 * @description  任务备品备件
 */
public interface EquPartsSetoutTaskDao extends BaseMapper<EquPartsSetoutTaskDo> {
    @Insert("<script>" +
            "insert into equ_parts_setout_task (ID,TENANTID,ROPTION,REMARK,CREATEDATE,CREATEUSERID,MODIFYDATE,MODIFYUSERID," +
            "CREATEUSERNAME,MODIFYUSERNAME,MASTERID,PARTSID,PARTSCODE,PARTSNAME,PARTSIMG,SPECIFICATION,MODEL,UNIT,USENUMBER,INVENTORYNUMBER) 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.partsid},#{info.partscode}," +
            "#{info.partsname},#{info.partsimg},#{info.specification},#{info.model},#{info.unit},#{info.usenumber},#{info.inventorynumber})" +
            "</foreach>" +
            "</script>")
    void batchSave(@Param("list") List<EquPartsSetoutTaskDo> partsSetoutTaskDoList);
}
