package com.elephant.framework.galaxy.aroad.module.emergencyevent.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.elephant.framework.galaxy.aroad.module.emergencyevent.entity.Evendeal;
import com.elephant.framework.galaxy.aroad.module.emergencyevent.mapper.EvendealMapper;
import com.elephant.framework.galaxy.aroad.module.emergencyevent.service.EvendealService;
import com.elephant.framework.galaxy.aroad.module.system.service.DeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 事件处置表
 *
 * @author songwenjie
 * @date 2019-05-08 14:43:56
 */
@Service
public class EvendealServiceImpl extends ServiceImpl<EvendealMapper, Evendeal> implements EvendealService {
    @Autowired
    private DeptService deptService;


    public boolean saveEventDeal(Evendeal eventdeal){
        int reportingDeptId = eventdeal.getDeptId();
        String dept = deptService.getDeptName(reportingDeptId);
        eventdeal.setDept(dept);
        return save(eventdeal);
    }
}
