package com.sooka.system.service.impl;

import java.util.List;

import com.sooka.framework.util.ShiroUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.sooka.system.mapper.TGuijiHousingconstructionYhjbxxMapper;
import com.sooka.system.domain.TGuijiHousingconstructionYhjbxx;
import com.sooka.system.service.ITGuijiHousingconstructionYhjbxxService;
import com.sooka.common.core.text.Convert;
import com.sooka.common.utils.DateUtils;

import javax.annotation.Resource;


/**
 * 自来水人员基本信息Service业务层处理
 *
 * @author lei
 * @date 2021-10-27
 */
@Service
public class TGuijiHousingconstructionYhjbxxServiceImpl extends Guiji_Base_Service implements ITGuijiHousingconstructionYhjbxxService {
    @Resource
    private TGuijiHousingconstructionYhjbxxMapper tGuijiHousingconstructionYhjbxxMapper;

    /**
     * 查询自来水人员基本信息
     *
     * @param id 自来水人员基本信息ID
     * @return 自来水人员基本信息
     */
    @Override
    public TGuijiHousingconstructionYhjbxx selectTGuijiHousingconstructionYhjbxxById(String id) {
        return tGuijiHousingconstructionYhjbxxMapper.selectTGuijiHousingconstructionYhjbxxById(id);
    }

    /**
     * 查询自来水人员基本信息列表
     *
     * @param tGuijiHousingconstructionYhjbxx 自来水人员基本信息
     * @return 自来水人员基本信息
     */
    @Override
    public List<TGuijiHousingconstructionYhjbxx> selectTGuijiHousingconstructionYhjbxxList(TGuijiHousingconstructionYhjbxx tGuijiHousingconstructionYhjbxx) {
        List ls = tGuijiHousingconstructionYhjbxxMapper.selectTGuijiHousingconstructionYhjbxxList(tGuijiHousingconstructionYhjbxx);
        tGuijiHousingconstructionYhjbxx.setInterfaceinfoId("27346269-5887-40dc-b1f8-bcaa7dcae22c");
        tGuijiHousingconstructionYhjbxx.setInterfaceinfoName("共享-自来水公司-用户基本信息");
        Long deptId = ShiroUtils.getSysUser().getDept().getDeptId();
        String deptName = ShiroUtils.getSysUser().getDept().getDeptName();
        tGuijiHousingconstructionYhjbxx.setDeptId(deptId);
        tGuijiHousingconstructionYhjbxx.setDeptName(deptName);
        add_log(tGuijiHousingconstructionYhjbxx);
        return ls;
    }

    /**
     * 新增自来水人员基本信息
     *
     * @param tGuijiHousingconstructionYhjbxx 自来水人员基本信息
     * @return 结果
     */
    @Override
    public int insertTGuijiHousingconstructionYhjbxx(TGuijiHousingconstructionYhjbxx tGuijiHousingconstructionYhjbxx) {
        tGuijiHousingconstructionYhjbxx.setCreateTime(DateUtils.getNowDate());
        return tGuijiHousingconstructionYhjbxxMapper.insertTGuijiHousingconstructionYhjbxx(tGuijiHousingconstructionYhjbxx);
    }

    /**
     * 修改自来水人员基本信息
     *
     * @param tGuijiHousingconstructionYhjbxx 自来水人员基本信息
     * @return 结果
     */
    @Override
    public int updateTGuijiHousingconstructionYhjbxx(TGuijiHousingconstructionYhjbxx tGuijiHousingconstructionYhjbxx) {
        return tGuijiHousingconstructionYhjbxxMapper.updateTGuijiHousingconstructionYhjbxx(tGuijiHousingconstructionYhjbxx);
    }

    /**
     * 删除自来水人员基本信息对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteTGuijiHousingconstructionYhjbxxByIds(String ids) {
        return tGuijiHousingconstructionYhjbxxMapper.deleteTGuijiHousingconstructionYhjbxxByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除自来水人员基本信息信息
     *
     * @param id 自来水人员基本信息ID
     * @return 结果
     */
    @Override
    public int deleteTGuijiHousingconstructionYhjbxxById(String id) {
        return tGuijiHousingconstructionYhjbxxMapper.deleteTGuijiHousingconstructionYhjbxxById(id);
    }
}
