package thyyxxk.webserver.controller.medicine;

import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import thyyxxk.webserver.entity.ResultVo;
import thyyxxk.webserver.entity.medicine.YpInventoryVo;
import thyyxxk.webserver.service.medicine.YpInventoryService;

import java.util.Map;

/**
 * @ClassName ypInventoryController
 * @Author hsh
 * @Date 2024/2/29 11:20
 * @Version 1.0
 * @Description 药品库存管理
 **/
@RestController
@RequestMapping("/ypInventory")
public class YpInventoryController {

    private final YpInventoryService service;

    public YpInventoryController(YpInventoryService service) {
        this.service = service;
    }

    @PostMapping("/selectYpUsedQuantity")
    public ResultVo<Map<String, Object>> selectYpUsedQuantity(@RequestBody @Validated YpInventoryVo vo){
        return service.selectYpUsedQuantity(vo);
    }

    @PostMapping("/selectYpUsedMx")
    public ResultVo<Map<String, Object>> selectYpUsedMx(@RequestBody @Validated YpInventoryVo vo){
        return service.selectYpUsedMx(vo);
    }

    @PostMapping("/selectYpOutInStat")
    public ResultVo<Map<String, Object>> selectYpOutInStat(@RequestBody @Validated YpInventoryVo vo){
        return service.selectYpOutInStat(vo);
    }

}
