RuleEngineeConfigController.java 2.2 KB
Newer Older
1 2 3 4 5
package pwc.taxtech.atms.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
6
import org.springframework.http.MediaType;
7 8 9 10 11
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;
12
import pwc.taxtech.atms.dpo.TaxRuleSettingDto;
13 14
import pwc.taxtech.atms.dto.BatchUpdateTaxRuleDto;
import pwc.taxtech.atms.dto.TaxPayerReportRuleDto;
15 16 17
import pwc.taxtech.atms.service.impl.RuleEngineeConfigServiceImpl;

import java.util.List;
18 19 20 21 22

@RestController
@RequestMapping("/api/v1/ruleEngineeConfig/")
public class RuleEngineeConfigController {
    private static Logger logger = LoggerFactory.getLogger(RuleEngineeConfigController.class);
23

24
    @Autowired
25 26
    RuleEngineeConfigServiceImpl ruleEngineeConfigService;

gary's avatar
gary committed
27
//    @ApiOperation(value = "Get TaxPayerReportMapping", notes = "Return TaxPayerReportMapping")
28
    @RequestMapping(value = "taxPayerReportMapping", method = RequestMethod.GET)
29 30
    public @ResponseBody
    List<TaxPayerReportRuleDto> getTaxPayerReportMapping() {
31
        logger.debug("RuleEngineeConfigController GetTaxPayerReportMapping");
32
        return ruleEngineeConfigService.getTaxPayerReportMapping();
33
    }
34

gary's avatar
gary committed
35
//    @ApiOperation(value = "Get TaxRuleSetting", notes = "Return TaxRuleSetting")
36 37 38 39 40
    @RequestMapping(value = "taxRuleSetting", method = RequestMethod.GET)
    public @ResponseBody
    List<TaxRuleSettingDto> getTaxRuleSetting() {
        logger.debug("RuleEngineeConfigController GetTaxRuleSetting");
        return ruleEngineeConfigService.getTaxRuleSetting();
41
    }
42

gary's avatar
gary committed
43
//    @ApiOperation(value = "", notes = "saveTaxRuleSettings")
44
    @RequestMapping(value = "taxRuleSetting/Save", method = RequestMethod.POST,produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
45
    public void saveTaxRuleSettings(@RequestBody BatchUpdateTaxRuleDto batchUpdateTaxRule) {
46 47
        logger.debug("RuleEngineeConfigController SaveTaxRuleSettings");
        ruleEngineeConfigService.savetaxrulesettings(batchUpdateTaxRule);
48
    }
49

50
}