fix: 서비스 클래스 NotificationPublisher/NotificationEvent import 누락 수정 (컴파일 에러 해결)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user