package com.uas.finance.controller;

import com.uas.finance.service.FinanceConditionService;
import com.uas.finance.model.FinanceCondition;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
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.ResponseBody;

/**
 * 财务情况说明
 * created by shicr on 2017/12/21
 **/
@Controller
@RequestMapping("/financecondition")
public class FinanceConditionController {

    private final static Logger logger = LoggerFactory.getLogger(FinanceConditionController.class);

    @Autowired
    private FinanceConditionService financeConditionService;

    /**
     * 财务情况说明保存
     *
     * @param financeCondition
     * @return
     */
    @ResponseBody
    @RequestMapping(value = "/save", method = RequestMethod.POST)
    public FinanceCondition save(@RequestBody FinanceCondition financeCondition) {
        logger.info("财务情况说明保存", "success");
        return financeConditionService.save(financeCondition);
    }
}
