| | |
| | | @Service |
| | | @Transactional |
| | | public class ClosedProcess implements AppointmentProcessInterface{ |
| | | |
| | | |
| | | @Autowired |
| | | AppointmentClosedInfoRepository appointmentClosedInfoRepository; |
| | | |
| | | |
| | | @Autowired |
| | | AppointmentService appointmentService; |
| | | |
| | | |
| | | @Autowired |
| | | AppointmentClosedInfoService appointmentClosedInfoService; |
| | | |
| | | |
| | | @Autowired |
| | | SatisfactionService satisfactionService; |
| | | |
| | | |
| | | @Override |
| | | public AppointmentClosedInfo create(AbstractAppointmentProcessDTO processDTO) { |
| | | ClosedProcessDTO closeProcess = toClosedProcessDTO(processDTO); |
| | | AppointmentClosedInfo closedInfo = new AppointmentClosedInfo(); |
| | | BeanUtils.copyProperties(closeProcess, closedInfo); |
| | | Appointment appointment = appointmentService.findById(processDTO.getAppointmentId()); |
| | | satisfactionService.createSatisfaction(appointment); |
| | | satisfactionService.createAppointmentSatisfaction(appointment); |
| | | return appointmentClosedInfoRepository.save(closedInfo); |
| | | } |
| | | |
| | | |
| | | private ClosedProcessDTO toClosedProcessDTO(AbstractAppointmentProcessDTO processDTO) { |
| | | ClosedProcessDTO closeProcess = (ClosedProcessDTO)processDTO; |
| | | BeanUtils.copyProperties(processDTO, closeProcess); |
| | |
| | | public ContactStatusEnum getProcessType() { |
| | | return ContactStatusEnum.CLOSED; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public AppointmentClosedInfo editClosedInfo( |
| | | AbstractAppointmentProcessDTO abstractDTO |
| | |
| | | BeanUtils.copyProperties(closeProcess, closedInfo); |
| | | return appointmentClosedInfoRepository.save(closedInfo); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |