package com.ffii.fpsms.modules.stock.web

import com.ffii.fpsms.modules.pickOrder.entity.PickOrderLineRepository
import com.ffii.fpsms.modules.pickOrder.entity.PickOrderRepository
import com.ffii.fpsms.modules.pickOrder.enums.PickOrderStatus
import com.ffii.fpsms.modules.purchaseOrder.service.PurchaseOrderLineService
import com.ffii.fpsms.modules.stock.service.SuggestedPickLotService
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.PathVariable
import org.springframework.web.bind.annotation.PostMapping
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RestController

@RequestMapping("/suggestedPickLot")
@RestController
class SuggestedPickLotController(
    val suggestedPickLotService: SuggestedPickLotService,
    val pickOrderLineService: PurchaseOrderLineService,
    val pickOrderRepository: PickOrderRepository
) {
//    @GetMapping("/test/{conso}")
//    fun test(@PathVariable conso: String): Any {
//        val test1 = pickOrderRepository.findAllByConsoCode(conso).flatMap { it.pickOrderLines }
//        return suggestedPickLotService.suggestionForPickOrderLines(test1)
//    }
}