package com.huashe.park.core.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.huashe.park.core.mapper.ConsPileHoleInfoMapper;
import com.huashe.park.core.service.IConsPileHoleInfoService;
import com.huashe.park.domain.entity.ConsPileHoleInfo;

/**
 * 施工桩点信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-02-13
 */
@Service
public class ConsPileHoleInfoServiceImpl implements IConsPileHoleInfoService {
    @Autowired
    private ConsPileHoleInfoMapper consPileHoleInfoMapper;

    /**
     * 查询施工桩点信息
     * 
     * @param id 施工桩点信息主键
     * @return 施工桩点信息
     */
    @Override
    public ConsPileHoleInfo selectConsPileHoleInfoById(Long id) {
        return consPileHoleInfoMapper.selectConsPileHoleInfoById(id);
    }

    /**
     * 查询施工桩点信息列表
     * 
     * @param consPileHoleInfo 施工桩点信息
     * @return 施工桩点信息
     */
    @Override
    public List<ConsPileHoleInfo> selectConsPileHoleInfoList(ConsPileHoleInfo consPileHoleInfo) {
        return consPileHoleInfoMapper.selectConsPileHoleInfoList(consPileHoleInfo);
    }

    /**
     * 新增施工桩点信息
     * 
     * @param consPileHoleInfo 施工桩点信息
     * @return 结果
     */
    @Override
    public int insertConsPileHoleInfo(ConsPileHoleInfo consPileHoleInfo) {
        return consPileHoleInfoMapper.insertConsPileHoleInfo(consPileHoleInfo);
    }

    /**
     * 修改施工桩点信息
     * 
     * @param consPileHoleInfo 施工桩点信息
     * @return 结果
     */
    @Override
    public int updateConsPileHoleInfo(ConsPileHoleInfo consPileHoleInfo) {
        return consPileHoleInfoMapper.updateConsPileHoleInfo(consPileHoleInfo);
    }

    /**
     * 批量删除施工桩点信息
     * 
     * @param ids 需要删除的施工桩点信息主键
     * @return 结果
     */
    @Override
    public int deleteConsPileHoleInfoByIds(Long[] ids) {
        return consPileHoleInfoMapper.deleteConsPileHoleInfoByIds(ids);
    }

    /**
     * 删除施工桩点信息信息
     * 
     * @param id 施工桩点信息主键
     * @return 结果
     */
    @Override
    public int deleteConsPileHoleInfoById(Long id) {
        return consPileHoleInfoMapper.deleteConsPileHoleInfoById(id);
    }

    @Override
    public void deleteConsPileHoleInfoByConsUnitId(Long id) {
        consPileHoleInfoMapper.deleteConsPileHoleInfoByConsUnitId(id);
    }

    @Override
    public void importConsPileHole(List<ConsPileHoleInfo> consPileHoleInfo) {
        consPileHoleInfoMapper.batchInsertConsPileHoleInfo(consPileHoleInfo);
    }
}
