|
|
|
@@ -22,13 +22,13 @@ import java.time.LocalDateTime |
|
|
|
open class TruckLaneScheduleController @Autowired constructor( |
|
|
|
private val truckLaneScheduleService: TruckLaneScheduleService, |
|
|
|
) { |
|
|
|
@PreAuthorize("hasAnyAuthority('ADMIN','TESTING')") |
|
|
|
@PreAuthorize("hasAnyAuthority('ADMIN','TESTING','TRUCK_LANE')") |
|
|
|
@PostMapping |
|
|
|
open fun create(@Valid @RequestBody request: CreateTruckLaneScheduleRequest): TruckLaneScheduleResponse { |
|
|
|
return truckLaneScheduleService.createManual(request) |
|
|
|
} |
|
|
|
|
|
|
|
@PreAuthorize("hasAnyAuthority('ADMIN','TESTING')") |
|
|
|
@PreAuthorize("hasAnyAuthority('ADMIN','TESTING','TRUCK_LANE')") |
|
|
|
@PostMapping("/planFromRouteExcel") |
|
|
|
@Throws(ServletRequestBindingException::class) |
|
|
|
open fun planFromRouteExcel(request: HttpServletRequest): ResponseEntity<RouteExcelSchedulePlanResponse> { |
|
|
|
@@ -66,19 +66,19 @@ open class TruckLaneScheduleController @Autowired constructor( |
|
|
|
return truckLaneScheduleService.getById(id) |
|
|
|
} |
|
|
|
|
|
|
|
@PreAuthorize("hasAnyAuthority('ADMIN','TESTING')") |
|
|
|
@PreAuthorize("hasAnyAuthority('ADMIN','TESTING','TRUCK_LANE')") |
|
|
|
@PostMapping("/{id}/cancel") |
|
|
|
open fun cancel(@PathVariable id: Long): TruckLaneScheduleResponse { |
|
|
|
return truckLaneScheduleService.cancel(id) |
|
|
|
} |
|
|
|
|
|
|
|
@PreAuthorize("hasAnyAuthority('ADMIN','TESTING')") |
|
|
|
@PreAuthorize("hasAnyAuthority('ADMIN','TESTING','TRUCK_LANE')") |
|
|
|
@PostMapping("/{id}/applyNow") |
|
|
|
open fun applyNow(@PathVariable id: Long): TruckLaneScheduleResponse { |
|
|
|
return truckLaneScheduleService.applyNow(id) |
|
|
|
} |
|
|
|
|
|
|
|
@PreAuthorize("hasAnyAuthority('ADMIN','TESTING')") |
|
|
|
@PreAuthorize("hasAnyAuthority('ADMIN','TESTING','TRUCK_LANE')") |
|
|
|
@PostMapping("/{id}/retry-failed") |
|
|
|
open fun retryFailed( |
|
|
|
@PathVariable id: Long, |
|
|
|
@@ -87,7 +87,7 @@ open class TruckLaneScheduleController @Autowired constructor( |
|
|
|
return truckLaneScheduleService.retryFailed(id, request?.executeAt) |
|
|
|
} |
|
|
|
|
|
|
|
@PreAuthorize("hasAnyAuthority('ADMIN','TESTING')") |
|
|
|
@PreAuthorize("hasAnyAuthority('ADMIN','TESTING','TRUCK_LANE')") |
|
|
|
@PostMapping("/{id}/reactivate") |
|
|
|
open fun reactivateCancelled( |
|
|
|
@PathVariable id: Long, |
|
|
|
@@ -124,7 +124,7 @@ open class TruckLaneScheduleController @Autowired constructor( |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@PreAuthorize("hasAnyAuthority('ADMIN','TESTING')") |
|
|
|
@PreAuthorize("hasAnyAuthority('ADMIN','TESTING','TRUCK_LANE')") |
|
|
|
@PostMapping("/importExcel") |
|
|
|
@Throws(ServletRequestBindingException::class) |
|
|
|
open fun importExcel( |
|
|
|
|