| | |
| | | ClosedProcessDTO dto = new ClosedProcessDTO(); |
| | | BeanUtils.copyProperties(closeDTO, dto); |
| | | abstractAppointmentProcess.process(dto); |
| | | }else { |
| | | return ResponseEntity.notFound().build(); |
| | | } |
| | | |
| | | // Appointment ap = appointmentService.findById(closeDTO.getAppointmentId()); |
| | | // System.out.println("getClosedInfo().getClosedOtherReason()::"+ap.getClosedInfo().getClosedOtherReason()); |
| | | return ResponseEntity.noContent().build(); |
| | | } |
| | | |
| | | @PostMapping("/close/info/edit") |
| | | public ResponseEntity<Void> editAppointmentClosedInfo(@RequestBody AppointmentCloseDTO closeDTO) { |
| | | |
| | | if(closeDTO.getContactStatus() == ContactStatusEnum.DONE) { |
| | | DoneProcessDTO dto = new DoneProcessDTO(); |
| | | BeanUtils.copyProperties(closeDTO, dto); |
| | | abstractAppointmentProcess.editClosedInfo(dto); |
| | | }else if(closeDTO.getContactStatus() == ContactStatusEnum.CLOSED){ |
| | | ClosedProcessDTO dto = new ClosedProcessDTO(); |
| | | BeanUtils.copyProperties(closeDTO, dto); |
| | | abstractAppointmentProcess.editClosedInfo(dto); |
| | | }else { |
| | | return ResponseEntity.notFound().build(); |
| | | } |
| | | |
| | | return ResponseEntity.noContent().build(); |
| | | } |