fix: 서비스 클래스 NotificationPublisher/NotificationEvent import 누락 수정 (컴파일 에러 해결)

This commit is contained in:
pray4skylark
2026-10-02 12:58:18 +09:00
parent 0b5eca1f7e
commit 54620ff5a0
3 changed files with 15 additions and 8 deletions
@@ -1,11 +1,14 @@
package com.srsystem.service;
import com.srsystem.dto.CreateDispatchRequest;
import com.srsystem.dto.NotificationEvent;
import com.srsystem.entity.DispatchHistory;
import com.srsystem.entity.Employee;
import com.srsystem.entity.Project;
import com.srsystem.entity.enums.DispatchStatus;
import com.srsystem.exception.BusinessException;
import com.srsystem.exception.ErrorCode;
import com.srsystem.listener.NotificationPublisher;
import com.srsystem.repository.DispatchHistoryRepository;
import com.srsystem.repository.EmployeeRepository;
import com.srsystem.repository.ProjectRepository;
@@ -82,11 +85,11 @@ public class DispatchHistoryService {
DispatchHistory saved = dispatchHistoryRepository.save(history);
// Update employee dispatch status to DISPATCHED
employee.setDispatchStatus(com.srsystem.entity.enums.DispatchStatus.DISPATCHED);
employee.setDispatchStatus(DispatchStatus.DISPATCHED);
employeeRepository.save(employee);
// Send notification
notificationPublisher.publish(new com.srsystem.dto.NotificationEvent(
notificationPublisher.publish(new NotificationEvent(
"DISPATCH_ASSIGNED",
"신규 파견 발령: " + project.getProjectName(),
String.format("'%s' 프로젝트에 %s 역할로 파견 등록되었습니다.", project.getProjectName(), request.roleTitle()),
@@ -108,7 +111,7 @@ public class DispatchHistoryService {
List<DispatchHistory> active = dispatchHistoryRepository.findByEmployee_EmpIdAndEndDateIsNull(history.getEmployee().getEmpId());
if (active.isEmpty()) {
Employee emp = history.getEmployee();
emp.setDispatchStatus(com.srsystem.entity.enums.DispatchStatus.WAITING);
emp.setDispatchStatus(DispatchStatus.WAITING);
employeeRepository.save(emp);
}