|
@@ -78,6 +78,7 @@ public class WbsParamController {
|
|
|
@ApiOperation(value = "批量保存或修改参数", notes = "批量保存或修改参数")
|
|
|
public R saveOrUpdateBatch(@RequestBody ParamBean pb) {
|
|
|
List<WbsParamBean> wps =pb.getWps();
|
|
|
+ /*执行顺序,删>增>改*/
|
|
|
if(CollectionUtil.isNotEmpty(wps)){
|
|
|
if(wps.size()==1){
|
|
|
WbsParamBean kone = wps.get(0);
|
|
@@ -98,7 +99,6 @@ public class WbsParamController {
|
|
|
}else{
|
|
|
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));
|
|
|
}
|
|
|
}
|
|
|
Map<Boolean,List<WbsParamBean>> map = wps.stream().collect(Collectors.partitioningBy(e->e.getId()!=null));
|
|
@@ -107,15 +107,6 @@ public class WbsParamController {
|
|
|
if(CollectionUtil.isNotEmpty(saveList)){
|
|
|
this.service.saveBatch(BeanUtil.copy(saveList,WbsParam.class));
|
|
|
/*新建的时候需要初始化绑定表单元素*/
|
|
|
-// this.jdbcTemplate.queryForList("SELECT et.id,et.e_name\n" +
|
|
|
-// " FROM m_wbs_tree_private AS wt\n" +
|
|
|
-// " inner join m_wbs_form_element et on wt.f_id=et.id \n" +
|
|
|
-// " WHERE wt.type = 2\n" +
|
|
|
-// " AND wt.is_deleted = 0\n" +
|
|
|
-// " AND wt.parent_id = #{项目集工序树id}\n" +
|
|
|
-// " AND wt.wbs_id = #{wbsId}\n" +
|
|
|
-// " AND wt.project_id = #{projectId}\n" +
|
|
|
-// " AND et.is_deleted = 0");
|
|
|
}
|
|
|
if(CollectionUtil.isNotEmpty(updateList)){
|
|
|
List<WbsParam> ul = new ArrayList<>();
|