RuleEngineeConfigController.java 2.2 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14
package pwc.taxtech.atms.controller;

import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
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;
import org.springframework.web.bind.annotation.RestController;

import io.swagger.annotations.ApiOperation;
15
import pwc.taxtech.atms.dpo.TaxRuleSettingDto;
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
import pwc.taxtech.atms.dto.BatchUpdateTaxRuleDto;
import pwc.taxtech.atms.dto.TaxPayerReportRuleDto;
import pwc.taxtech.atms.service.RuleEngineeConfigService;

/** @see PwC.Tax.Tech.Atms.WebApi\Controllers\RuleEngineeConfigController.cs */
@RestController
@RequestMapping("/api/v1/ruleEngineeConfig/")
public class RuleEngineeConfigController {
    private static Logger logger = LoggerFactory.getLogger(RuleEngineeConfigController.class);
    
    @Autowired
    RuleEngineeConfigService ruleEngineeConfigService;
    
    @ApiOperation(value = "Get TaxPayerReportMapping", notes = "Return TaxPayerReportMapping")
    @RequestMapping(value = "taxPayerReportMapping", method = RequestMethod.GET)
31
    public @ResponseBody List<TaxPayerReportRuleDto> getTaxPayerReportMapping() {
32
        logger.debug("RuleEngineeConfigController GetTaxPayerReportMapping");
33
        return ruleEngineeConfigService.getTaxPayerReportMapping();
34 35 36 37
    }
    
    @ApiOperation(value="Get TaxRuleSetting",notes="Return TaxRuleSetting")
    @RequestMapping(value="taxRuleSetting",method= RequestMethod.GET)
38
    public @ResponseBody List<TaxRuleSettingDto> getTaxRuleSetting()
39 40
    {
    	logger.debug("RuleEngineeConfigController GetTaxRuleSetting");
41
    	return ruleEngineeConfigService.getTaxRuleSetting();
42 43
    }
    
44
    @ApiOperation(value="",notes="saveTaxRuleSettings")
45
    @RequestMapping(value="taxRuleSetting/Save",method = RequestMethod.POST)
46
    public void saveTaxRuleSettings(@RequestBody BatchUpdateTaxRuleDto batchUpdateTaxRule) {
47
    	logger.debug("RuleEngineeConfigController SaveTaxRuleSettings");
48
    	ruleEngineeConfigService.savetaxrulesettings(batchUpdateTaxRule);
49 50 51
    }
	
}