package com.unis.purchaseAndSalesSupervision.modular.storageTaskSupervise.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
import com.unis.common.pojo.CommonResult;
import com.unis.purchaseAndSalesSupervision.modular.bizPssFundDockCollect.entity.BizPssFundDockCollect;
import com.unis.purchaseAndSalesSupervision.modular.bizPssFundDockCollect.param.BizPssFundDockCollectIdParam;
import com.unis.purchaseAndSalesSupervision.modular.storageTaskSupervise.entity.StorageTaskSupervise;
import com.unis.purchaseAndSalesSupervision.modular.storageTaskSupervise.param.StorageTaskSuperviseObject;
import com.unis.purchaseAndSalesSupervision.modular.storageTaskSupervise.param.StorageTaskSupervisePage;
import com.unis.purchaseAndSalesSupervision.modular.storageTaskSupervise.service.StorageTaskSuperviseService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.validation.Valid;

/**
 * @author qingsong.han
 * @description:
 * @create 2024-06-15 15:24
 */
@Api(tags = "仓储作业监管")
@ApiSupport(author = "UNIS_TEAM", order = 1)
@RestController
@Validated
@RequestMapping("/storageTaskSupervise")
public class StorageTaskSuperviseController {
    @Resource
    private StorageTaskSuperviseService storageTaskSuperviseService;

    @ApiOperationSupport(order = 1)
    @ApiOperation("分页")
    @GetMapping("/getPageList")
    public CommonResult<IPage<StorageTaskSupervise>> getPageList(StorageTaskSupervisePage param) {
        return CommonResult.data(storageTaskSuperviseService.getPageList(param));
    }

    @ApiOperationSupport(order = 2)
    @ApiOperation("详情")
    @GetMapping("/detail/{id}/{zylx}")
    public CommonResult<StorageTaskSuperviseObject> detail(@PathVariable("id") String id, @PathVariable("zylx") String zylx) {
        return CommonResult.data(storageTaskSuperviseService.detail(id, zylx));
    }
}
