|
@@ -26,6 +26,7 @@ import javax.servlet.http.HttpServletResponse;
|
|
import javax.validation.constraints.NotBlank;
|
|
import javax.validation.constraints.NotBlank;
|
|
import java.io.IOException;
|
|
import java.io.IOException;
|
|
import java.io.UnsupportedEncodingException;
|
|
import java.io.UnsupportedEncodingException;
|
|
|
|
+import java.math.BigDecimal;
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
@@ -211,5 +212,14 @@ public class CommonController {
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
|
|
+ @GetMapping("/computeVal")
|
|
|
|
+ @ApiOperation(value = "后台计算值", notes = "后台计算值 ", httpMethod = "GET")
|
|
|
|
+ public ResponseHelper<BigDecimal> computeVal(@RequestParam(defaultValue = "0") BigDecimal frontVal,
|
|
|
|
+ @RequestParam(defaultValue = "0") BigDecimal afterVal,
|
|
|
|
+ @RequestParam(defaultValue = "+") String operator,
|
|
|
|
+ @RequestParam(defaultValue = "2") Integer scale,
|
|
|
|
+ @RequestParam(defaultValue = "4", required = false) Integer roundingMode
|
|
|
|
+ ) {
|
|
|
|
+ return ResponseHelper.success(commonLogic.computeVal(frontVal, afterVal, operator, scale, roundingMode));
|
|
|
|
+ }
|
|
}
|
|
}
|