|
|
|
@@ -18,6 +18,8 @@ import com.ffii.fpsms.modules.deliveryOrder.web.models.DoDetailResponse |
|
|
|
import com.ffii.fpsms.modules.deliveryOrder.web.models.ReleaseDoRequest |
|
|
|
import com.ffii.fpsms.modules.master.web.models.MessageResponse |
|
|
|
import jakarta.validation.Valid |
|
|
|
import java.time.LocalDateTime |
|
|
|
|
|
|
|
@RequestMapping("/do") |
|
|
|
@RestController |
|
|
|
class DeliveryOrderController( |
|
|
|
@@ -34,10 +36,32 @@ class DeliveryOrderController( |
|
|
|
} |
|
|
|
|
|
|
|
@GetMapping("/search-code/{code}") |
|
|
|
fun searchByCode(@PathVariable code: String): List<DeliveryOrderInfo>{ |
|
|
|
fun searchByCode(@PathVariable code: String): List<DeliveryOrderInfo> { |
|
|
|
return deliveryOrderService.searchByCode(code); |
|
|
|
} |
|
|
|
|
|
|
|
@GetMapping("/search-shopname/{shopName}") |
|
|
|
fun searchByShopName(@PathVariable shopName: String): List<DeliveryOrderInfo> { |
|
|
|
return deliveryOrderService.searchByShopName(shopName); |
|
|
|
} |
|
|
|
|
|
|
|
@GetMapping("/search-status/{status}") |
|
|
|
fun searchByStatus(@PathVariable status: DeliveryOrderStatus): List<DeliveryOrderInfo> { |
|
|
|
return deliveryOrderService.searchByStatus(status); |
|
|
|
} |
|
|
|
|
|
|
|
@GetMapping("/search-orderdate/{start}&{end}") |
|
|
|
fun searchBetweenOrderDate(@PathVariable start: LocalDateTime?,@PathVariable end: LocalDateTime?): List<DeliveryOrderInfo> { |
|
|
|
return deliveryOrderService.searchBetweenOrderDate(start, end); |
|
|
|
} |
|
|
|
|
|
|
|
@GetMapping("/search-DO/{code}&{shopName}&{status}&{startDate}&{endDate}") |
|
|
|
fun searchDO(@PathVariable code: String?, @PathVariable shopName: String?, @PathVariable status: DeliveryOrderStatus?, @PathVariable startDate: LocalDateTime? , @PathVariable endDate: LocalDateTime?): List<DeliveryOrderInfo>{ |
|
|
|
return deliveryOrderService.searchDO(code, shopName, status, startDate, endDate); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/update-status") |
|
|
|
fun updateDoStatus(@RequestBody request: SaveDeliveryOrderStatusRequest): SaveDeliveryOrderResponse { |
|
|
|
return deliveryOrderService.updateDeliveryOrderStatus(request); |
|
|
|
|