保誠-保戶業務員媒合平台
Jack
2022-01-18 c2a3da1d4071f2f1d6a5beb63b8442920767584e
pamapi/src/main/java/com/pollex/pam/web/rest/AppointmentResource.java
@@ -82,11 +82,27 @@
         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();
    }