|
@@ -10,7 +10,6 @@ import io.swagger.annotations.ApiParam;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
import org.springblade.core.mp.support.Condition;
|
|
|
import org.springblade.core.mp.support.Query;
|
|
|
-import org.springblade.core.secure.utils.AuthUtil;
|
|
|
import org.springblade.core.tool.api.R;
|
|
|
import org.springblade.core.tool.utils.BeanUtil;
|
|
|
import org.springblade.core.tool.utils.CollectionUtil;
|
|
@@ -83,8 +82,8 @@ public class WbsParamController {
|
|
|
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()));
|
|
|
+ if(Func.isNotEmpty(kone.getNodeId())) {
|
|
|
+ this.service.update(Wrappers.<WbsParam>update().lambda().set(WbsParam::getIsDeleted, 1).eq(WbsParam::getNodeId, kone.getNodeId()));
|
|
|
return R.status(true);
|
|
|
}else{
|
|
|
return R.fail("至少保留一个模版");
|
|
@@ -97,7 +96,7 @@ public class WbsParamController {
|
|
|
if(one.getType().equals(0)){
|
|
|
this.service.update(Wrappers.<WbsParam>update().lambda().set(WbsParam::getIsDeleted,1).eq(WbsParam::getType,0).notIn(WbsParam::getId,ids));
|
|
|
}else{
|
|
|
- this.service.update(Wrappers.<WbsParam>update().lambda().set(WbsParam::getIsDeleted,1).eq(WbsParam::getWbsId,one.getWbsId()).notIn(WbsParam::getId,ids));
|
|
|
+ this.service.update(Wrappers.<WbsParam>update().lambda().set(WbsParam::getIsDeleted,1).eq(WbsParam::getNodeId,one.getNodeId()).notIn(WbsParam::getId,ids));
|
|
|
/*把当前节点已删除参数的关联公式删除*/
|
|
|
// this.formulaService.update(Wrappers.<Formula>lambdaUpdate().set(Formula::getIsDeleted,1).eq(Formula::getElementId,1));
|
|
|
}
|
|
@@ -183,7 +182,7 @@ public class WbsParamController {
|
|
|
@ApiOperation(value = "节点参数列表", notes = "节点参数列表")
|
|
|
@GetMapping("/list")
|
|
|
public R<List<WbsParamBean>> list3(@ApiParam(value = "wbs节点id", required = true) Long wbsId) {
|
|
|
- LambdaQueryWrapper<WbsParam> queryWrapper = Wrappers.<WbsParam>query().lambda().eq(WbsParam::getWbsId,wbsId).eq(WbsParam::getType,1);
|
|
|
+ LambdaQueryWrapper<WbsParam> queryWrapper = Wrappers.<WbsParam>query().lambda().eq(WbsParam::getNodeId,wbsId).eq(WbsParam::getType,1);
|
|
|
List<WbsParamBean> list = new ArrayList<>();
|
|
|
List<WbsParam> data = this.service.list(queryWrapper);
|
|
|
if(CollectionUtil.isNotEmpty(data)){
|