package com.bonus.sgzb.app.mapper;

import com.bonus.sgzb.app.domain.BmAgreementInfo;
import com.bonus.sgzb.app.domain.TmTask;
import com.bonus.sgzb.base.api.domain.BackApplyInfo;
import com.bonus.sgzb.base.api.domain.MachinePart;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;


@Mapper
public interface AppBackApplyAppMapper {
    /**
     * 查询退料单位列表
     */
    List<BmAgreementInfo> getbackUnit(BmAgreementInfo record);

    List<Integer> getTaskIdById(BackApplyInfo bean);

    /**
     * 查询退料工程列表
     */
    List<BmAgreementInfo> getbackPro(BmAgreementInfo record);


    int insertTask(TmTask task);

    List<BackApplyInfo> getbackList(BackApplyInfo record);

    int insertTaskAgreement(TmTask task);

    int insertBackApply(TmTask task);

    List<BackApplyInfo> materialList(BackApplyInfo record);

    int upload(BackApplyInfo record);

    List<BackApplyInfo> view(BackApplyInfo record);

    int del(BackApplyInfo record);

    List<BackApplyInfo> examineList(BackApplyInfo record);
    List<BackApplyInfo> examineListByUser(BackApplyInfo record);

    List<BackApplyInfo> examineView(BackApplyInfo record);

    int audit(BackApplyInfo record);
    int updateBackApply(BackApplyInfo record);

    List<BackApplyInfo> selectBackApplyInfo(BackApplyInfo record);

    int refuse(BackApplyInfo record);

    int updateTmTask(BackApplyInfo record);

    List<TmTask> getMaTypeDetails(BackApplyInfo backApplyInfo);

    MachinePart getMachineParts(TmTask typeId);

    void updateBackInfo(@Param("parentId") Integer parentId, @Param("companyId") String companyId);
}