/*
 * Copyright [2022] [https://www.xiaonuo.vip]
 *
 * Snowy采用APACHE LICENSE 2.0开源协议，您在使用过程中，需要注意以下几点：
 *
 * 1.请不要删除和修改根目录下的LICENSE文件。
 * 2.请不要删除和修改Snowy源码头部的版权声明。
 * 3.本项目代码可免费商业使用，商业使用请保留源码和相关描述文件的项目出处，作者声明等。
 * 4.分发源码时候，请注明软件出处 https://www.xiaonuo.vip
 * 5.不可二次分发开源参与同类竞品，如有想法可联系团队xiaonuobase@qq.com商议合作。
 * 6.若您的项目无法满足以上几点，需要更多功能代码，获取Snowy商业授权许可，请在官网购买授权，地址为 https://www.xiaonuo.vip
 */
package com.unis.mobileInfo.modular.crk.controller;

import cn.dev33.satoken.annotation.SaCheckPermission;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
import com.unis.mobileInfo.modular.crk.param.BusinessRecordParam;
import com.unis.mobileInfo.modular.crk.param.CrkParam;
import com.unis.mobileInfo.modular.crk.service.CrkService;
import com.unis.statisticalAnalysis.modular.kczl.service.KczlService;
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.RestController;
import com.unis.common.annotation.CommonLog;
import com.unis.common.pojo.CommonResult;
import com.unis.common.pojo.CommonValidList;
import com.unis.mobileInfo.modular.qcqualityinspection.entity.BusinessQcQualityInspection;
import com.unis.mobileInfo.modular.qcqualityinspection.param.BusinessQcQualityInspectionPageParam;

import javax.annotation.Resource;
import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import java.util.List;
import java.util.Map;

/**
 * 出入库作业--库平台
 *
 * @author shine
 * @date  2024/06/06 11:25
 */
@Api(tags = "出入库作业")
@ApiSupport(author = "UNIS_TEAM", order = 1)
@RestController
@Validated
public class CrkController {

    @Resource
    private CrkService crkService;


    /**
     *
     * @author shine
     * @date  2024/06/06 11:25
     */
    @ApiOperationSupport(order = 1)
    @ApiOperation("*出入库作业")
    @GetMapping("/client/c/mobileInfo/crk/getData")
    public CommonResult<List<Map<String,Object>>> getData(@Valid CrkParam crkParam) {
        return CommonResult.data(crkService.getData(crkParam));
    }


    /**
     * 根据id获取详情
     */
    @ApiOperationSupport(order = 2)
    @ApiOperation("*出入库作业--根据单号获取详情")
    @GetMapping("/client/c/mobileInfo/crk/getDetail")
    public CommonResult<Map<String,Object>> getDetail(@Valid CrkParam crkParam) {
        return CommonResult.data(crkService.getDetail(crkParam));
    }



    /**
     *
     * @author shine
     * @date  2024/06/06 11:25
     */
    @ApiOperationSupport(order = 3)
    @ApiOperation("*储备布局--出入库业务记录")
    @GetMapping("/mobileInfo/crk/businessRecord")
    public CommonResult<IPage<List<Map<String,Object>>>> businessRecord(@Valid BusinessRecordParam businessRecordParam) {
        return CommonResult.data(crkService.businessRecord(businessRecordParam));
    }

    /**
     * 根据id获取详情
     */
    @ApiOperationSupport(order = 2)
    @ApiOperation("*储备布局--出入库业务记录详情")
    @GetMapping("/mobileInfo/crk/getBusinessRecordDetail")
    public CommonResult<Map<String,Object>> getBusinessRecordDetail(@Valid BusinessRecordParam businessRecordParam) {
        return CommonResult.data(crkService.getBusinessRecordDetail(businessRecordParam));
    }

}
