|
@@ -84,13 +84,18 @@ public class IndicatorsController {
|
|
@PostMapping(value = "/add")
|
|
@PostMapping(value = "/add")
|
|
public R addAll(@RequestBody Indicators indicators){
|
|
public R addAll(@RequestBody Indicators indicators){
|
|
|
|
|
|
- boolean b = iIndicatorsService.addOrUpdate(indicators);
|
|
|
|
- if (b){
|
|
|
|
- return R.ok().data(b);
|
|
|
|
- }else {
|
|
|
|
|
|
+ try {
|
|
|
|
+ boolean b = iIndicatorsService.addOrUpdate(indicators);
|
|
|
|
+ if (b){
|
|
|
|
+ return R.ok().data(b);
|
|
|
|
+ }else {
|
|
|
|
+ return R.error().data("保存失败!");
|
|
|
|
+ }
|
|
|
|
+ }catch (Exception e){
|
|
return R.error().data("保存失败!");
|
|
return R.error().data("保存失败!");
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|