/*
 * 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.financialSupervision.modular.bizFsSettleDataCheck.controller;


import com.alibaba.fastjson.JSONObject;
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.basic.info.modular.orgInfo.entity.OrgInfo;
import com.unis.financialSupervision.modular.bizFsSettleDataCheck.param.*;
import com.unis.financialSupervision.modular.bizFsSettleDataCheck.vo.BizFsSettleDataCheckDetailVO;
import com.unis.financialSupervision.modular.bizFsSettleDataCheck.vo.BizFsSettleDataCheckPageVO;
import com.unis.financialSupervision.modular.bizFsSettleDataCheck.vo.GetBusinessContractDetailVO;
import com.unis.financialSupervision.modular.businessContract.entity.BusinessContract;
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.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import com.unis.common.annotation.CommonLog;
import com.unis.common.pojo.CommonResult;
import com.unis.financialSupervision.modular.bizFsSettleDataCheck.entity.BizFsSettleDataCheck;
import com.unis.financialSupervision.modular.bizFsSettleDataCheck.service.BizFsSettleDataCheckService;

import javax.annotation.Resource;
import javax.validation.Valid;
import java.util.List;

/**
 * 清算数据提取及业务处室核验控制器
 *
 * @author hjc
 * @date 2024/07/01 10:37
 */
@Api(tags = "清算数据提取及业务处室核验控制器")
@ApiSupport(author = "UNIS_TEAM", order = 1)
@RestController
@Validated
public class BizFsSettleDataCheckController {

    @Resource
    private BizFsSettleDataCheckService bizFsSettleDataCheckService;

    /**
     * 获取清算数据提取及业务处室核验分页
     *
     * @author hjc
     * @date 2024/07/01 10:37
     */
    @ApiOperationSupport(order = 1)
    @ApiOperation("获取清算数据提取及业务处室核验分页")
    //@SaCheckPermission("/financialSupervision/bizFsSettleDataCheck/page")
    @GetMapping("/financialSupervision/bizFsSettleDataCheck/page")
    public CommonResult<Page<BizFsSettleDataCheckPageVO>> page(BizFsSettleDataCheckPageParam bizFsSettleDataCheckPageParam) {
        return CommonResult.data(bizFsSettleDataCheckService.page(bizFsSettleDataCheckPageParam));
    }

    /**
     * 添加清算数据提取及业务处室核验
     *
     * @author hjc
     * @date 2024/07/01 10:37
     */
    @ApiOperationSupport(order = 2)
    @ApiOperation("添加清算数据提取及业务处室核验")
    @CommonLog("添加清算数据提取及业务处室核验")
    // @SaCheckPermission("/financialSupervision/bizFsSettleDataCheck/add")
    @PostMapping("/financialSupervision/bizFsSettleDataCheck/add")
    public CommonResult<String> add(@RequestBody @Valid BizFsSettleDataCheckAddParam bizFsSettleDataCheckAddParam) {
        bizFsSettleDataCheckService.add(bizFsSettleDataCheckAddParam);
        return CommonResult.ok();
    }
    /**
     * 获取库区名称
     *
     * @author hjc
     * @date 2024/07/01 10:37
     */
    @ApiOperationSupport(order = 3)
    @ApiOperation("获取库区名称信息")
    //@SaCheckPermission("/financialSupervision/bizFsSettleDataCheck/detail")
    @GetMapping("/financialSupervision/bizFsSettleDataCheck/getOrgInfo")
    public CommonResult<List<OrgInfo>> getOrgInfo() {
        return CommonResult.data(bizFsSettleDataCheckService.getOrgInfo());
    }

    /**
     * 获取合同编号
     *
     * @author hjc
     * @date 2024/07/01 10:37
     */
    @ApiOperationSupport(order = 4)
    @ApiOperation("获取合同编号")
    //@SaCheckPermission("/financialSupervision/bizFsSettleDataCheck/detail")
    @GetMapping("/financialSupervision/bizFsSettleDataCheck/getBusinessContract")
    public CommonResult<List<BusinessContract>> getBusinessContract() {
        return CommonResult.data(bizFsSettleDataCheckService.getBusinessContract());
    }
    /**
     * 通过合同id获取品种，数量，单价，价款
     *
     * @author hjc
     * @date 2024/07/01 10:37
     */
    @ApiOperationSupport(order = 5)
    @ApiOperation("通过合同id带出后面数据")
    //@SaCheckPermission("/financialSupervision/bizFsSettleDataCheck/detail")
    @GetMapping("/financialSupervision/bizFsSettleDataCheck/getBusinessContractDetail")
    public CommonResult<GetBusinessContractDetailVO> getBusinessContractDetail(@Valid BizFsSettleDataCheckIdParam param) {
        return CommonResult.data(bizFsSettleDataCheckService.getBusinessContractDetail(param));
    }
  /*  *//**
     * 获取清算数据提取及业务处室核验详情
     *
     * @author hjc
     * @date 2024/07/01 10:37
     *//*
    @ApiOperationSupport(order = 6)
    @ApiOperation("获取清算数据提取及业务处室核验详情")
    //@SaCheckPermission("/financialSupervision/bizFsSettleDataCheck/detail")
    @GetMapping("/financialSupervision/bizFsSettleDataCheck/detail")
    public CommonResult<BizFsSettleDataCheckDetailVO> detail(@Valid BizFsSettleDataCheckIdParam bizFsSettleDataCheckIdParam) {
        return CommonResult.data(bizFsSettleDataCheckService.detail(bizFsSettleDataCheckIdParam));
    }
*/
    /**
     * 获取清算数据提取及业务处室核验详情
     *
     * @author hjc
     * @date 2024/07/01 10:37
     */
    @ApiOperationSupport(order = 6)
    @ApiOperation("获取详情")
    //@SaCheckPermission("/financialSupervision/bizFsSettleDataCheck/detail")
    @GetMapping("/financialSupervision/bizFsSettleDataCheck/getDetailJSON")
    public CommonResult<JSONObject> getDetailJSON(@Valid BizFsSettleDataCheckIdParam bizFsSettleDataCheckIdParam) {
        return CommonResult.data(bizFsSettleDataCheckService.getDetailJSON(bizFsSettleDataCheckIdParam));
    }

    /**
     * 清算数据提取及业务处室核验-核验
     *
     * @author hjc
     * @date 2024/07/01 10:37
     */
    @ApiOperationSupport(order = 7)
    @ApiOperation("清算数据提取及业务处室核验-核验")
    @CommonLog("清算数据提取及业务处室核验-核验")
    //@SaCheckPermission("/financialSupervision/bizFsSettleDataCheck/delete")
    @PostMapping("/financialSupervision/bizFsSettleDataCheck/verification")
    public CommonResult<String> verification(@RequestBody @Valid VerificationParam param) {
        bizFsSettleDataCheckService.verification(param);
        return CommonResult.ok();
    }


    /**
     * 清算数据生成-分页
     *
     * @author hjc
     * @date 2024/07/01 10:37
     */
    @ApiOperationSupport(order = 8)
    @ApiOperation("清算数据生成-分页")
    //@SaCheckPermission("/financialSupervision/bizFsSettleDataCheck/page")
    @GetMapping("/financialSupervision/bizFsSettleDataCheck/liquidationPage")
    public CommonResult<Page<BizFsSettleDataCheckPageVO>> liquidationPage(liquidationPageParam pageParam) {
        return CommonResult.data(bizFsSettleDataCheckService.liquidationPage(pageParam));
    }

    /**
     * 清算核定及确认-分页
     *
     * @author hjc
     * @date 2024/07/01 10:37
     */
    @ApiOperationSupport(order = 9)
    @ApiOperation("清算核定及确认-分页")
    //@SaCheckPermission("/financialSupervision/bizFsSettleDataCheck/page")
    @GetMapping("/financialSupervision/bizFsSettleDataCheck/checkLiquidationPage")
    public CommonResult<Page<BizFsSettleDataCheckPageVO>> checkLiquidationPage(CheckLiquidationPageParam pageParam) {
        return CommonResult.data(bizFsSettleDataCheckService.checkLiquidationPage(pageParam));
    }
    /**
     * 清算核定及确认-一键清算
     *
     * @author hjc
     * @date 2024/07/01 10:37
     */
    @ApiOperationSupport(order = 10)
    @ApiOperation("清算核定及确认-一键清算")
    @CommonLog("清算核定及确认-一键清算")
    //@SaCheckPermission("/financialSupervision/bizFsSettleDataCheck/delete")
    @PostMapping("/financialSupervision/bizFsSettleDataCheck/checkClearStatus")
    public CommonResult<String> checkClearStatus(@RequestBody @Valid VerificationParam param) {
        bizFsSettleDataCheckService.checkClearStatus(param);
        return CommonResult.ok();
    }
    /*  *//**
     * 编辑清算数据提取及业务处室核验
     *
     * @author hjc
     * @date 2024/07/01 10:37
     *//*
    @ApiOperationSupport(order = 3)
    @ApiOperation("编辑清算数据提取及业务处室核验")
    @CommonLog("编辑清算数据提取及业务处室核验")
    //@SaCheckPermission("/financialSupervision/bizFsSettleDataCheck/edit")
    @PostMapping("/financialSupervision/bizFsSettleDataCheck/edit")
    public CommonResult<String> edit(@RequestBody @Valid BizFsSettleDataCheckEditParam bizFsSettleDataCheckEditParam) {
        bizFsSettleDataCheckService.edit(bizFsSettleDataCheckEditParam);
        return CommonResult.ok();
    }*/

    /*    *//**
     * 删除清算数据提取及业务处室核验
     *
     * @author hjc
     * @date 2024/07/01 10:37
     *//*
    @ApiOperationSupport(order = 4)
    @ApiOperation("删除清算数据提取及业务处室核验")
    @CommonLog("删除清算数据提取及业务处室核验")
    //@SaCheckPermission("/financialSupervision/bizFsSettleDataCheck/delete")
    @PostMapping("/financialSupervision/bizFsSettleDataCheck/delete")
    public CommonResult<String> delete(@RequestBody @Valid @NotEmpty(message = "集合不能为空")
                                                   CommonValidList<BizFsSettleDataCheckIdParam> bizFsSettleDataCheckIdParamList) {
        bizFsSettleDataCheckService.delete(bizFsSettleDataCheckIdParamList);
        return CommonResult.ok();
    }*/



}
