package com.dhcc.finance.main.controller;

import java.util.Date;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestBody;
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.constant.SysConstants;
import com.dhcc.common.model.CurrencyMeta;
import com.dhcc.common.model.response.RestfulResponse;
import com.dhcc.finance.constant.MsConfigConsts;
import com.dhcc.finance.main.domain.CwNcAdvance;
import com.dhcc.finance.main.model.CwProjectCheckWeb;
import com.dhcc.finance.main.service.CwNcAdvanceService;
import com.github.pagehelper.PageInfo;

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 + CwNcAdvanceController.API_PREFIX, produces = {
		MediaType.APPLICATION_JSON_UTF8_VALUE }, consumes = { MediaType.APPLICATION_JSON_UTF8_VALUE })
@Api(value = "NC垫付款明细controller", tags = { "NC垫付款明细操作接口" })
public class CwNcAdvanceController {
	// NC垫付款明细信息接口地址前缀
    public static final String API_PREFIX = "/cw_nc_advance";
    
    @Autowired
    CwNcAdvanceService cwNcAdvanceService;
    /**
     * 功能描述:NC垫付款明细信息查询
     * @param xtxmbh
     * @param begindate
     * @param enddate
     * @return RestfulResponse<List<CwNcAdvance>,CurrencyMeta>
     *@author likai
     *@data 2020年5月5日下午1:14:49
     *修改日志
     */
  /*  @ApiOperation(value = "固有代垫生成凭证", notes = "固有代垫生成凭证", produces = MediaType.APPLICATION_JSON_UTF8_VALUE, consumes = MediaType.ALL_VALUE)
    @RequestMapping(value = SysConstants.MS_OPEN_INTERFACE+"/createVoucherInfoGydd", method = RequestMethod.POST)
    RestfulResponse<Object, CurrencyMeta> createVoucherInfoGydd(@RequestBody String params){
        return financeForThirdService.createVoucherInfoGydd(params);
    }*/
	@ApiOperation(value = "NC垫付款明细信息查询", notes = "", produces = MediaType.APPLICATION_JSON_UTF8_VALUE, consumes = MediaType.ALL_VALUE)
	@RequestMapping(value = { "/searchNcAdvance" }, method = RequestMethod.POST)
	public RestfulResponse<List< CwNcAdvance>, CurrencyMeta> searchNcAdvance(
	        @RequestBody String params,
			@RequestParam(value="begindate",required=false) String begindate,
			@RequestParam(value="enddate",required=false) String enddate
			){
		return cwNcAdvanceService.searchNcAdvance(params, begindate, enddate);
	}
    

}
