/**
 * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com).
 * <p>
 * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0;
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * <p>
 * http://www.gnu.org/licenses/lgpl.html
 * <p>
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.xiaoniu.subsystem.business.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.xiaoniu.common.core.resdata.Result;
import com.xiaoniu.common.core.result.R;
import com.xiaoniu.common.core.utils.BeanUtil;
import com.xiaoniu.subsystem.business.domain.AnnualPlanAmount;
import com.xiaoniu.subsystem.business.domain.vo.AnnualPlanAmountVO;
import com.xiaoniu.subsystem.business.service.IAnnualPlanAmountService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.Valid;
import lombok.AllArgsConstructor;

import org.springframework.web.bind.annotation.*;

import java.util.Arrays;
import java.util.Collections;

/**
 * 年度计划金额管理表 控制器
 *
 * @author sst
 * @since 2024-11-26
 */
@RestController
@AllArgsConstructor
@RequestMapping("/annualplanamount")
@Tag(name = "年度计划金额管理表", description = "年度计划金额管理表接口")
public class AnnualPlanAmountController  {

	private IAnnualPlanAmountService annualPlanAmountService;

//	/**
//	 * 详情
//	 */
//	@GetMapping("/detail")
//	@ApiOperationSupport(order = 1)
//	@Operation(summary = "详情", description = "传入annualPlanAmount")
//	public R<AnnualPlanAmountVO> detail(@Parameter(description = "主键", required = true) @RequestParam Long annualPlanAmountId) {
//		AnnualPlanAmount detail = annualPlanAmountService.getById(annualPlanAmountId);
//		return R.data(BeanUtil.copy(detail,AnnualPlanAmountVO.class));
//	}

	// /**
	//  * 分页 年度计划金额管理表
	//  */
	// @GetMapping("/list")
	// @ApiOperationSupport(order = 2)
	// @Operation(summary = "分页", description = "传入annualPlanAmount")
	// public R<IPage<AnnualPlanAmountVO>> list(AnnualPlanAmount annualPlanAmount) {
	// 	IPage<AnnualPlanAmount> pages = annualPlanAmountService.page(null, new QueryWrapper<>(annualPlanAmount));
	// 	return R.data(BeanUtil.copy(pages,AnnualPlanAmountVO.class));
	// }


	// /**
	//  * 自定义分页 年度计划金额管理表
	//  */
	// @GetMapping("/page")
	// @ApiOperationSupport(order = 3)
	// @Operation(summary = "分页", description = "传入annualPlanAmount")
	// public Result<IPage<AnnualPlanAmountVO>> page(AnnualPlanAmountVO annualPlanAmount) {
	// 	IPage<AnnualPlanAmountVO> pages = annualPlanAmountService.selectAnnualPlanAmountPage(null, annualPlanAmount);
	// 	return Result.success(pages);
	// }

//	/**
//	 * 新增 年度计划金额管理表
//	 */
//	@PostMapping("/save")
//	@ApiOperationSupport(order = 4)
//	@Operation(summary = "新增", description = "传入annualPlanAmount")
//	public R save(@Valid @RequestBody AnnualPlanAmount annualPlanAmount) {
//		return R.status(annualPlanAmountService.save(annualPlanAmount));
//	}
//
//	/**
//	 * 修改 年度计划金额管理表
//	 */
//	@PostMapping("/update")
//	@ApiOperationSupport(order = 5)
//	@Operation(summary = "修改", description = "传入annualPlanAmount")
//	public R update(@Valid @RequestBody AnnualPlanAmount annualPlanAmount) {
//		return R.status(annualPlanAmountService.updateById(annualPlanAmount));
//	}

	// /**
	//  * 新增或修改 年度计划金额管理表
	//  */
	// @PostMapping("/submit")
	// @ApiOperationSupport(order = 6)
	// @Operation(summary = "新增或修改", description = "传入annualPlanAmount")
	// public R submit(@Valid @RequestBody AnnualPlanAmount annualPlanAmount) {
	// 	return R.status(annualPlanAmountService.saveOrUpdate(annualPlanAmount));
	// }


//	/**
//	 * 删除 年度计划金额管理表
//	 */
//	@PostMapping("/remove")
//	@ApiOperationSupport(order = 7)
//	@Operation(summary = "删除", description = "传入ids")
//	public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
//		return R.status(annualPlanAmountService.removeByIds(Collections.singletonList(ids)));
//	}

	
}
