package com.ruoyi.invest.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.uuid.IdUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.invest.mapper.TProjectInvestigateMapper;
import com.ruoyi.invest.domain.TProjectInvestigate;
import com.ruoyi.invest.service.ITProjectInvestigateService;

/**
 * 尽调关联Service业务层处理
 * 
 * @author zjc
 * @date 2024-03-13
 */
@Service
public class TProjectInvestigateServiceImpl implements ITProjectInvestigateService 
{
    @Autowired
    private TProjectInvestigateMapper tProjectInvestigateMapper;

    /**
     * 查询尽调关联
     * 
     * @param id 尽调关联主键
     * @return 尽调关联
     */
    @Override
    public TProjectInvestigate selectTProjectInvestigateById(String id)
    {
        return tProjectInvestigateMapper.selectTProjectInvestigateById(id);
    }

    /**
     * 查询尽调关联列表
     * 
     * @param tProjectInvestigate 尽调关联
     * @return 尽调关联
     */
    @Override
    public List<TProjectInvestigate> selectTProjectInvestigateList(TProjectInvestigate tProjectInvestigate)
    {
        return tProjectInvestigateMapper.selectTProjectInvestigateList(tProjectInvestigate);
    }

    /**
     * 新增尽调关联
     * 
     * @param tProjectInvestigate 尽调关联
     * @return 结果
     */
    @Override
    public int insertTProjectInvestigate(TProjectInvestigate tProjectInvestigate)
    {
        tProjectInvestigate.setCreateTime(DateUtils.getNowDate());
        return tProjectInvestigateMapper.insertTProjectInvestigate(tProjectInvestigate);
    }

    /**
     * 修改尽调关联
     * 
     * @param tProjectInvestigate 尽调关联
     * @return 结果
     */
    @Override
    public int updateTProjectInvestigate(TProjectInvestigate tProjectInvestigate)
    {
        tProjectInvestigate.setUpdateTime(DateUtils.getNowDate());
        return tProjectInvestigateMapper.updateTProjectInvestigate(tProjectInvestigate);
    }

    /**
     * 批量删除尽调关联
     * 
     * @param ids 需要删除的尽调关联主键
     * @return 结果
     */
    @Override
    public int deleteTProjectInvestigateByIds(String[] ids)
    {
        return tProjectInvestigateMapper.deleteTProjectInvestigateByIds(ids);
    }

    /**
     * 删除尽调关联信息
     * 
     * @param id 尽调关联主键
     * @return 结果
     */
    @Override
    public int deleteTProjectInvestigateById(String id)
    {
        return tProjectInvestigateMapper.deleteTProjectInvestigateById(id);
    }

    /**
     * 批量删除尽调关联
     * @param ids 需要删除的尽调关联主键
     * @return
     */
    @Override
    public int updateTProjectInvestigateByIds(String[] ids) {
        return tProjectInvestigateMapper.updateTProjectInvestigateByIds(ids);
    }

    /**
     * 根据项目ID获取尽调数据
     * @param projectPoolId
     * @return
     */
    @Override
    public List<TProjectInvestigate> listProjectPoolId(String projectPoolId) {
        return tProjectInvestigateMapper.listProjectPoolId(projectPoolId);
    }

    /**
     * 根据项目ID获取最新尽调数据
     * @param projectPoolId
     * @return
     */
    @Override
    public TProjectInvestigate listProjectPoolIdNew(String projectPoolId) {
        return tProjectInvestigateMapper.listProjectPoolIdNew(projectPoolId);
    }

    /**
     * 修改尽调完成
     * @param id
     * @return
     */
    @Override
    public int editStatus(String id) {
        return tProjectInvestigateMapper.editStatus(id);
    }
}