工作组下 关联属性删除1
This commit is contained in:
@@ -74,18 +74,26 @@ public class WgWorkGroupShowDTO extends BaseEntity {
|
||||
//支付信息
|
||||
List<WgPayInfo> wgPayInfos;
|
||||
|
||||
private String wgPayInfosDel;
|
||||
|
||||
//标准政策
|
||||
List<WgStandorpolicyInfo> wgStandorpolicyInfos;
|
||||
|
||||
//集团参与情况
|
||||
List<WgDeptShow> wgDepts;
|
||||
|
||||
private String wgDeptsDel;
|
||||
|
||||
//秘书联系方式
|
||||
List<WgNetInfoDTO> wgNetInfos;
|
||||
|
||||
private String wgNetInfosDel;
|
||||
|
||||
//参会记录及资料
|
||||
List<WgMeetingInfo> wgMeetingInfos;
|
||||
|
||||
private String wgMeetingInfosDel;
|
||||
|
||||
List<WgWorkGroupShowDTO> children;
|
||||
|
||||
|
||||
|
||||
+18
@@ -25,6 +25,7 @@ import com.adc.da.slrs.wgWorkGroup.entity.WgWorkGroupShowDTO;
|
||||
import com.adc.da.slrs.wgWorkGroup.service.IWgWorkGroupService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -330,6 +331,10 @@ public class WgWorkGroupServiceImpl extends ServiceImpl<WgWorkGroupDao, WgWorkGr
|
||||
boolean flag = false;
|
||||
flag = wgWorkGroupService.saveOrUpdate(wgWorkGroup);
|
||||
if (null != wgWorkGroupShowDTO.getWgDepts() && wgWorkGroupShowDTO.getWgDepts().size() > 0) {
|
||||
if (StringUtils.isNotEmpty(wgWorkGroupShowDTO.getWgDeptsDel())){
|
||||
List<String> strings=new ArrayList<>(Arrays.asList(wgWorkGroupShowDTO.getWgDeptsDel().split(",")));
|
||||
wgDeptService.removeByIds(strings);
|
||||
}
|
||||
List<WgDept> wgDepts=new ArrayList<>();
|
||||
wgWorkGroupShowDTO.getWgDepts().forEach(wgDeptShow -> {
|
||||
WgDept wgDept=new WgDept();
|
||||
@@ -342,6 +347,11 @@ public class WgWorkGroupServiceImpl extends ServiceImpl<WgWorkGroupDao, WgWorkGr
|
||||
flag = wgDeptService.saveOrUpdateBatch(wgDepts);
|
||||
}
|
||||
if (null != wgWorkGroupShowDTO.getWgMeetingInfos() && wgWorkGroupShowDTO.getWgMeetingInfos().size() > 0) {
|
||||
if (StringUtils.isNotEmpty(wgWorkGroupShowDTO.getWgMeetingInfosDel())){
|
||||
List<String> strings=new ArrayList<>(Arrays.asList(wgWorkGroupShowDTO.getWgMeetingInfosDel().split(",")));
|
||||
wgDeptService.removeByIds(strings);
|
||||
wgMeetingUserRelationService.removeByIds(strings);
|
||||
}
|
||||
List<String> removeMeet = new ArrayList<>();
|
||||
List<WgMeetingUserRelation> wgMeetingUserRelations = new ArrayList<>();
|
||||
wgWorkGroupShowDTO.getWgMeetingInfos().forEach(wgMeetingInfo -> {
|
||||
@@ -364,6 +374,10 @@ public class WgWorkGroupServiceImpl extends ServiceImpl<WgWorkGroupDao, WgWorkGr
|
||||
}
|
||||
}
|
||||
if (null != wgWorkGroupShowDTO.getWgNetInfos() && wgWorkGroupShowDTO.getWgNetInfos().size() > 0) {
|
||||
if (StringUtils.isNotEmpty(wgWorkGroupShowDTO.getWgNetInfosDel())){
|
||||
List<String> strings=new ArrayList<>(Arrays.asList(wgWorkGroupShowDTO.getWgNetInfosDel().split(",")));
|
||||
wgNetInfoService.removeByIds(strings);
|
||||
}
|
||||
List<WgNetInfo> wgNetInfos = new ArrayList<>();
|
||||
wgWorkGroupShowDTO.getWgNetInfos().forEach(wgNetInfoDTO -> {
|
||||
WgNetInfo wgNetInfo = new WgNetInfo();
|
||||
@@ -376,6 +390,10 @@ public class WgWorkGroupServiceImpl extends ServiceImpl<WgWorkGroupDao, WgWorkGr
|
||||
flag = wgNetInfoService.saveOrUpdateBatch(wgNetInfos);
|
||||
}
|
||||
if (null != wgWorkGroupShowDTO.getWgPayInfos() && wgWorkGroupShowDTO.getWgPayInfos().size() > 0) {
|
||||
if (StringUtils.isNotEmpty(wgWorkGroupShowDTO.getWgPayInfosDel())){
|
||||
List<String> strings=new ArrayList<>(Arrays.asList(wgWorkGroupShowDTO.getWgPayInfosDel().split(",")));
|
||||
wgPayInfoService.removeByIds(strings);
|
||||
}
|
||||
if (!wgWorkGroupShowDTO.getWgPayInfos().isEmpty()){
|
||||
wgWorkGroupShowDTO.getWgPayInfos().forEach(wgPayInfo -> {
|
||||
if (null==wgPayInfo.getWgId()){
|
||||
|
||||
Reference in New Issue
Block a user