Commit c50d8ab7 authored by neo's avatar neo

[DEV] test excption handler with response enttity

parent 7e1e0fa9
......@@ -33,10 +33,11 @@ public class ReportController {
return reportService.getReportTemplate(projectId, EnumServiceType.getEnumByCode(serviceType), period);
}
@RequestMapping(value = "generateByTotal/{projectId}/{mergeManual}/{period}", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public OperationResultDto generateAllData(@PathVariable String projectId, @PathVariable Integer period, @RequestParam Optional<String> generator,
@PathVariable Boolean mergeManual) {
return reportService.generateData(projectId, EnumServiceType.VAT, mergeManual, period, null, generator);
@RequestMapping(value = "generateByTotal/{projectId}/{mergeManual}/{period}", method = RequestMethod.POST,
produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public ResponseEntity generateAllData(@PathVariable String projectId, @PathVariable Integer period,
@RequestParam Optional<String> generator, @PathVariable Boolean mergeManual) {
return ResponseEntity.ok(reportService.generateData(projectId, EnumServiceType.VAT, mergeManual, period, null, generator));
}
@RequestMapping(value = "getRunningJob/{projectId}/{period}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
......@@ -105,12 +106,12 @@ public class ReportController {
}
@RequestMapping(value = "addCellManualData", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public OperationResultDto addCellManualDataSource(@RequestBody ManualDataSourceDto data, @RequestHeader String from) {
public ResponseEntity addCellManualDataSource(@RequestBody ManualDataSourceDto data, @RequestHeader String from) {
String projectId = StringUtils.EMPTY;
if (StringUtils.isNotBlank(from) && from.split("@").length > 0) {
projectId = from.split("@")[0];
}
return reportService.addCellManualDataSource(data, from);
return ResponseEntity.ok(reportService.addCellManualDataSource(data, from));
}
@RequestMapping(value = "addDataSource", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment