package com.sooka.system.service.impl;

import java.util.List;

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

/**
 * 预约人员信息Service业务层处理
 *
 * @author lei
 * @date 2021-11-09
 */
@Service
public class TGuijiHealthcommissionYyryxxServiceImpl extends Guiji_Base_Service implements ITGuijiHealthcommissionYyryxxService
{
    @Autowired
    private TGuijiHealthcommissionYyryxxMapper tGuijiHealthcommissionYyryxxMapper;

    /**
     * 查询预约人员信息
     *
     * @param id 预约人员信息ID
     * @return 预约人员信息
     */
    @Override
    public TGuijiHealthcommissionYyryxx selectTGuijiHealthcommissionYyryxxById(String id)
    {
        return tGuijiHealthcommissionYyryxxMapper.selectTGuijiHealthcommissionYyryxxById(id);
    }

    /**
     * 查询预约人员信息列表
     *
     * @param tGuijiHealthcommissionYyryxx 预约人员信息
     * @return 预约人员信息
     */
    @Override
    public List<TGuijiHealthcommissionYyryxx> selectTGuijiHealthcommissionYyryxxList(TGuijiHealthcommissionYyryxx tGuijiHealthcommissionYyryxx)
    {
        List ls = tGuijiHealthcommissionYyryxxMapper.selectTGuijiHealthcommissionYyryxxList(tGuijiHealthcommissionYyryxx);
        tGuijiHealthcommissionYyryxx.setInterfaceinfoId("e5267dc1-8b77-4950-b542-04bae6f9794e");
        tGuijiHealthcommissionYyryxx.setInterfaceinfoName("共享-体检-预约人员信息");
        tGuijiHealthcommissionYyryxx.setInterfacetype("platform_interfacetype_1");
        Long deptId = ShiroUtils.getSysUser().getDept().getDeptId();
        String deptName = ShiroUtils.getSysUser().getDept().getDeptName();
        tGuijiHealthcommissionYyryxx.setDeptId(deptId);
        tGuijiHealthcommissionYyryxx.setDeptName(deptName);
        add_log(tGuijiHealthcommissionYyryxx);
        return ls;
    }

    /**
     * 新增预约人员信息
     *
     * @param tGuijiHealthcommissionYyryxx 预约人员信息
     * @return 结果
     */
    @Override
    public int insertTGuijiHealthcommissionYyryxx(TGuijiHealthcommissionYyryxx tGuijiHealthcommissionYyryxx)
    {
        tGuijiHealthcommissionYyryxx.setCreateTime(DateUtils.getNowDate());
        return tGuijiHealthcommissionYyryxxMapper.insertTGuijiHealthcommissionYyryxx(tGuijiHealthcommissionYyryxx);
    }

    /**
     * 修改预约人员信息
     *
     * @param tGuijiHealthcommissionYyryxx 预约人员信息
     * @return 结果
     */
    @Override
    public int updateTGuijiHealthcommissionYyryxx(TGuijiHealthcommissionYyryxx tGuijiHealthcommissionYyryxx)
    {
        return tGuijiHealthcommissionYyryxxMapper.updateTGuijiHealthcommissionYyryxx(tGuijiHealthcommissionYyryxx);
    }

    /**
     * 删除预约人员信息对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteTGuijiHealthcommissionYyryxxByIds(String ids)
    {
        return tGuijiHealthcommissionYyryxxMapper.deleteTGuijiHealthcommissionYyryxxByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除预约人员信息信息
     *
     * @param id 预约人员信息ID
     * @return 结果
     */
    @Override
    public int deleteTGuijiHealthcommissionYyryxxById(String id)
    {
        return tGuijiHealthcommissionYyryxxMapper.deleteTGuijiHealthcommissionYyryxxById(id);
    }
}
