package com.ruoyi.care.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.care.mapper.CareAssignmentsMapper;
import com.ruoyi.care.domain.CareAssignments;
import com.ruoyi.care.service.ICareAssignmentsService;

/**
 * 业务务指派Service业务层处理
 * 
 * @author qy
 * @date 2024-11-26
 */
@Service
public class CareAssignmentsServiceImpl implements ICareAssignmentsService 
{
    @Autowired
    private CareAssignmentsMapper careAssignmentsMapper;

    /**
     * 查询业务务指派
     * 
     * @param assignId 业务务指派主键
     * @return 业务务指派
     */
    @Override
    public CareAssignments selectCareAssignmentsByAssignId(Long assignId)
    {
        return careAssignmentsMapper.selectCareAssignmentsByAssignId(assignId);
    }

    /**
     * 查询业务务指派列表
     * 
     * @param careAssignments 业务务指派
     * @return 业务务指派
     */
    @Override
    public List<CareAssignments> selectCareAssignmentsList(CareAssignments careAssignments)
    {
        return careAssignmentsMapper.selectCareAssignmentsList(careAssignments);
    }

    /**
     * 新增业务务指派
     * 
     * @param careAssignments 业务务指派
     * @return 结果
     */
    @Override
    public int insertCareAssignments(CareAssignments careAssignments)
    {
        careAssignments.setCreateTime(DateUtils.getNowDate());
        return careAssignmentsMapper.insertCareAssignments(careAssignments);
    }

    /**
     * 修改业务务指派
     * 
     * @param careAssignments 业务务指派
     * @return 结果
     */
    @Override
    public int updateCareAssignments(CareAssignments careAssignments)
    {
        careAssignments.setUpdateTime(DateUtils.getNowDate());
        return careAssignmentsMapper.updateCareAssignments(careAssignments);
    }

    /**
     * 批量删除业务务指派
     * 
     * @param assignIds 需要删除的业务务指派主键
     * @return 结果
     */
    @Override
    public int deleteCareAssignmentsByAssignIds(Long[] assignIds)
    {
        return careAssignmentsMapper.deleteCareAssignmentsByAssignIds(assignIds);
    }

    /**
     * 删除业务务指派信息
     * 
     * @param assignId 业务务指派主键
     * @return 结果
     */
    @Override
    public int deleteCareAssignmentsByAssignId(Long assignId)
    {
        return careAssignmentsMapper.deleteCareAssignmentsByAssignId(assignId);
    }
}
