|
@@ -1,12 +1,14 @@
|
|
|
package com.sundata.product.rwa.calc.controllers;
|
|
|
|
|
|
import com.sundata.common.annotation.Auth;
|
|
|
+import com.sundata.common.base.BaseAction;
|
|
|
import com.sundata.product.rwa.calc.model.CalcInterfaceParam;
|
|
|
import com.sundata.product.rwa.calc.running.threads.CalcTaskResult;
|
|
|
import com.sundata.product.rwa.calc.service.CalcRunningService;
|
|
|
import com.sundata.product.rwa.calc.service.implement.units.GeneralLedgerGetterUnit;
|
|
|
import com.sundata.product.rwa.calc.service.implement.units.GeneralLedgerUnit;
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
|
import java.util.HashMap;
|
|
@@ -14,7 +16,7 @@ import java.util.Map;
|
|
|
|
|
|
@Controller
|
|
|
@RequestMapping("calc/start")
|
|
|
-public class CalcRunningController {
|
|
|
+public class CalcRunningController extends BaseAction {
|
|
|
|
|
|
private final CalcRunningService calcRunningService;
|
|
|
|
|
@@ -34,7 +36,7 @@ public class CalcRunningController {
|
|
|
verifyURL = false
|
|
|
)
|
|
|
@RequestMapping("GeneralLedgerGetter")
|
|
|
- public CalcTaskResult startGeneralLedgerGetter(CalcInterfaceParam calcInterfaceParam) {
|
|
|
+ public CalcTaskResult startGeneralLedgerGetter(@RequestBody CalcInterfaceParam calcInterfaceParam) {
|
|
|
Map<String, Object> context = new HashMap<>();
|
|
|
context.put("dataDate", calcInterfaceParam.getDataDate());
|
|
|
return calcRunningService.startCalc(calcInterfaceParam.getCalculateInstanceNumber(), new GeneralLedgerGetterUnit(calcInterfaceParam.getCalculateInstanceNumber(), calcInterfaceParam.getCalcCode(), 0, null), context);
|
|
@@ -52,7 +54,7 @@ public class CalcRunningController {
|
|
|
verifyURL = false
|
|
|
)
|
|
|
@RequestMapping("GeneralLedger")
|
|
|
- public CalcTaskResult startGeneralLedger(CalcInterfaceParam calcInterfaceParam) {
|
|
|
+ public CalcTaskResult startGeneralLedger(@RequestBody CalcInterfaceParam calcInterfaceParam) {
|
|
|
Map<String, Object> context = new HashMap<>();
|
|
|
context.put("dataDate", calcInterfaceParam.getDataDate());
|
|
|
return calcRunningService.startCalc(calcInterfaceParam.getCalculateInstanceNumber(), new GeneralLedgerUnit(calcInterfaceParam.getCalculateInstanceNumber(), calcInterfaceParam.getCalcCode(), 0, null), context);
|