package com.dhcc.finance.main.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.dhcc.common.model.CurrencyMeta;
import com.dhcc.common.model.response.RestfulResponse;
import com.dhcc.finance.constant.MsConfigConsts;
import com.dhcc.finance.main.service.FinancialGlorgbookService;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;

@RestController
@RequestMapping(value = MsConfigConsts.MS_API_PREFIX + FinancialGlorgbookController.API_PREFIX, 
  	          produces = {MediaType.APPLICATION_JSON_UTF8_VALUE }, consumes = { MediaType.APPLICATION_JSON_UTF8_VALUE })
@Api(value = "财务账套详情controller", tags = { "财务账套数据" })
public class FinancialGlorgbookController {
	    // 财务对外接口接口地址前缀
		public static final String API_PREFIX = "/financial_glorgbook";
		
		@Autowired
		FinancialGlorgbookService financialGlorgbookService;
		
		@ApiOperation(value = "查看账套详情数据", notes = "", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
		@ApiImplicitParams({
			@ApiImplicitParam(name = "xtzxmbh", value = "账套主键", required = true, dataType = "String", paramType="query"),
			@ApiImplicitParam(name = "dateTime", value = "指定日期", required = true, dataType = "String", paramType="query"),
	    }) 
		@RequestMapping(value = "/selectCwBdGlorgbookForDetail", method = RequestMethod.GET, consumes = MediaType.ALL_VALUE)
		public RestfulResponse<Object, CurrencyMeta> selectCwBdGlorgbookForDetail(
				@RequestParam("xtzxmbh") String xtzxmbh,
				@RequestParam("dateTime") String dateTime){
			return financialGlorgbookService.selectCwBdGlorgbookForDetail(xtzxmbh,dateTime);
		}
}
