package com.goafanti.common.dao;

import com.goafanti.common.model.TChangeTask;
import com.goafanti.common.model.TChangeTaskExample;
import com.goafanti.order.bo.TChangeTaskOut;

import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface TChangeTaskMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(TChangeTask record);

    int insertSelective(TChangeTask record);

    TChangeTask selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(TChangeTask record);

    int updateByPrimaryKey(TChangeTask record);


    void insertSelectiveList(@Param("list")List<TChangeTask> list);

    List<TChangeTaskOut> selectByCid(@Param("id")Integer id, @Param("splitStatus")Integer splitStatus);

    /**
     *
     * @param tid 变更项目id
     * @param sid 变更拆分父项目id
     * @param type 处理类型
     * @return
     */
    int updateByTid(@Param("tid")Integer tid,@Param("sid")Integer sid,@Param("cid")Integer cid,@Param("type")Integer type,@Param("member") Integer member);



    int deleteByTid(Integer tid);


    TChangeTask selectBytid(Integer id);

    void updateMemberByTid( @Param("sid")Integer sid,@Param("cid")Integer cid, @Param("type")Integer type, @Param("serviceLife")String serviceLife,
                            @Param("serviceYear")String serviceYear, @Param("yearSum")Integer yearSum, @Param("contractTerm")String contractTerm);

    List<TChangeTask> selectBySuper(@Param("splitSuper") Integer splitSuper, @Param("changeSplitSuper") Integer changeSplitSuper, @Param("cid") Integer cid);

    void updateTypeBatch(@Param("type") Integer type, @Param("list") List<Integer> list);




    void deleteByChangeSplitSuper(Integer tid);

    void updateSuperServiceYear(TChangeTask tChangeTask);

    void updateChangeSuperServiceYear(TChangeTask tChangeTask);


}
