保誠-保戶業務員媒合平台
wayne
2022-02-17 4394e4248455637ab7836756058ac872fdf4af10
pamapi/src/main/java/com/pollex/pam/appointment/process/ClosedProcess.java
@@ -18,29 +18,29 @@
@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);
@@ -51,7 +51,7 @@
   public ContactStatusEnum getProcessType() {
      return ContactStatusEnum.CLOSED;
   }
   @Override
   public AppointmentClosedInfo editClosedInfo(
         AbstractAppointmentProcessDTO abstractDTO
@@ -60,6 +60,6 @@
      BeanUtils.copyProperties(closeProcess, closedInfo);
      return appointmentClosedInfoRepository.save(closedInfo);
   }
}