package com.siwei.rsmonitoring.service.impl;

import java.util.List;
import com.siwei.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.siwei.rsmonitoring.mapper.TDkFieldworkLogMapper;
import com.siwei.rsmonitoring.domain.TDkFieldworkLog;
import com.siwei.rsmonitoring.service.ITDkFieldworkLogService;

/**
 * 地块外业分配LOGService业务层处理
 * 
 * @author siwei
 * @date 2025-02-12
 */
@Service
public class TDkFieldworkLogServiceImpl implements ITDkFieldworkLogService 
{
    @Autowired
    private TDkFieldworkLogMapper tDkFieldworkLogMapper;

    /**
     * 查询地块外业分配LOG
     * 
     * @param id 地块外业分配LOG主键
     * @return 地块外业分配LOG
     */
    @Override
    public TDkFieldworkLog selectTDkFieldworkLogById(String id)
    {
        return tDkFieldworkLogMapper.selectTDkFieldworkLogById(id);
    }

    /**
     * 查询地块外业分配LOG列表
     * 
     * @param tDkFieldworkLog 地块外业分配LOG
     * @return 地块外业分配LOG
     */
    @Override
    public List<TDkFieldworkLog> selectTDkFieldworkLogList(TDkFieldworkLog tDkFieldworkLog)
    {
        return tDkFieldworkLogMapper.selectTDkFieldworkLogList(tDkFieldworkLog);
    }

    /**
     * 新增地块外业分配LOG
     * 
     * @param tDkFieldworkLog 地块外业分配LOG
     * @return 结果
     */
    @Override
    public int insertTDkFieldworkLog(TDkFieldworkLog tDkFieldworkLog)
    {
        tDkFieldworkLog.setCreateTime(DateUtils.getNowDate());
        return tDkFieldworkLogMapper.insertTDkFieldworkLog(tDkFieldworkLog);
    }

    /**
     * 修改地块外业分配LOG
     * 
     * @param tDkFieldworkLog 地块外业分配LOG
     * @return 结果
     */
    @Override
    public int updateTDkFieldworkLog(TDkFieldworkLog tDkFieldworkLog)
    {
        return tDkFieldworkLogMapper.updateTDkFieldworkLog(tDkFieldworkLog);
    }

    /**
     * 批量删除地块外业分配LOG
     * 
     * @param ids 需要删除的地块外业分配LOG主键
     * @return 结果
     */
    @Override
    public int deleteTDkFieldworkLogByIds(String[] ids)
    {
        return tDkFieldworkLogMapper.deleteTDkFieldworkLogByIds(ids);
    }

    /**
     * 删除地块外业分配LOG信息
     * 
     * @param id 地块外业分配LOG主键
     * @return 结果
     */
    @Override
    public int deleteTDkFieldworkLogById(String id)
    {
        return tDkFieldworkLogMapper.deleteTDkFieldworkLogById(id);
    }
}
