|
@@ -75,7 +75,12 @@ public class WbsParamController {
|
|
|
if(CollectionUtil.isNotEmpty(wps)){
|
|
|
List<Long> ids= wps.stream().map(WbsParamBean::getId).filter(Objects::nonNull).collect(Collectors.toList());
|
|
|
if(CollectionUtil.isNotEmpty(ids)){
|
|
|
- this.service.update(Wrappers.<WbsParam>update().lambda().set(WbsParam::getIsDeleted,1).notIn(WbsParam::getId,ids));
|
|
|
+ WbsParamBean one = wps.get(0);
|
|
|
+ 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));
|
|
|
+ }
|
|
|
}
|
|
|
Map<Boolean,List<WbsParamBean>> map = wps.stream().collect(Collectors.partitioningBy(e->e.getId()!=null));
|
|
|
List<WbsParamBean> saveList = map.get(false);
|