|
@@ -73,6 +73,17 @@ public class WbsParamController {
|
|
|
@ApiOperation(value = "批量保存或修改参数", notes = "批量保存或修改参数")
|
|
|
public R saveOrUpdateBatch(@RequestBody List<WbsParamBean> wps) {
|
|
|
if(CollectionUtil.isNotEmpty(wps)){
|
|
|
+ if(wps.size()==1){
|
|
|
+ WbsParamBean kone = wps.get(0);
|
|
|
+ if(kone.getType()<0){
|
|
|
+ if(Func.isNotEmpty(kone.getWbsId())) {
|
|
|
+ this.service.update(Wrappers.<WbsParam>update().lambda().set(WbsParam::getIsDeleted, 1).eq(WbsParam::getWbsId, kone.getWbsId()));
|
|
|
+ return R.status(true);
|
|
|
+ }else{
|
|
|
+ return R.fail("至少保留一个模版");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
List<Long> ids= wps.stream().map(WbsParamBean::getId).filter(Objects::nonNull).collect(Collectors.toList());
|
|
|
if(CollectionUtil.isNotEmpty(ids)){
|
|
|
WbsParamBean one = wps.get(0);
|
|
@@ -102,7 +113,7 @@ public class WbsParamController {
|
|
|
}
|
|
|
return R.status(true);
|
|
|
}
|
|
|
- return R.status(false);
|
|
|
+ return R.fail("没有提交任何参数");
|
|
|
}
|
|
|
|
|
|
/**
|