工作组修改完已经可以回显
This commit is contained in:
+26
-4
@@ -23,6 +23,7 @@ import com.adc.da.slrs.wgWorkGroup.dao.WgWorkGroupDao;
|
|||||||
import com.adc.da.slrs.wgWorkGroup.entity.WgWorkGroupDTO;
|
import com.adc.da.slrs.wgWorkGroup.entity.WgWorkGroupDTO;
|
||||||
import com.adc.da.slrs.wgWorkGroup.entity.WgWorkGroupShowDTO;
|
import com.adc.da.slrs.wgWorkGroup.entity.WgWorkGroupShowDTO;
|
||||||
import com.adc.da.slrs.wgWorkGroup.service.IWgWorkGroupService;
|
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 com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@@ -333,15 +334,21 @@ public class WgWorkGroupServiceImpl extends ServiceImpl<WgWorkGroupDao, WgWorkGr
|
|||||||
wgWorkGroupShowDTO.getWgDepts().forEach(wgDeptShow -> {
|
wgWorkGroupShowDTO.getWgDepts().forEach(wgDeptShow -> {
|
||||||
WgDept wgDept=new WgDept();
|
WgDept wgDept=new WgDept();
|
||||||
BeanUtils.copyProperties(wgDeptShow,wgDept);
|
BeanUtils.copyProperties(wgDeptShow,wgDept);
|
||||||
|
if (null==wgDept.getWgId()){
|
||||||
|
wgDept.setWgId(wgWorkGroupShowDTO.getId());
|
||||||
|
}
|
||||||
wgDepts.add(wgDept);
|
wgDepts.add(wgDept);
|
||||||
});
|
});
|
||||||
|
|
||||||
flag = wgDeptService.saveOrUpdateBatch(wgDepts);
|
flag = wgDeptService.saveOrUpdateBatch(wgDepts);
|
||||||
}
|
}
|
||||||
if (null != wgWorkGroupShowDTO.getWgMeetingInfos() && wgWorkGroupShowDTO.getWgMeetingInfos().size() > 0) {
|
if (null != wgWorkGroupShowDTO.getWgMeetingInfos() && wgWorkGroupShowDTO.getWgMeetingInfos().size() > 0) {
|
||||||
List<String> removeMeet = new ArrayList<>();
|
List<String> removeMeet = new ArrayList<>();
|
||||||
List<WgMeetingUserRelation> wgMeetingUserRelations = new ArrayList<>();
|
List<WgMeetingUserRelation> wgMeetingUserRelations = new ArrayList<>();
|
||||||
wgWorkGroupShowDTO.getWgMeetingInfos().forEach(wgMeetingInfo -> {
|
wgWorkGroupShowDTO.getWgMeetingInfos().forEach(wgMeetingInfo -> {
|
||||||
|
if (null==wgMeetingInfo.getId()){
|
||||||
|
wgMeetingInfo.setId(String.valueOf(UUID.randomUUID()));
|
||||||
|
wgMeetingInfo.setWgId(wgWorkGroupShowDTO.getId());
|
||||||
|
}
|
||||||
wgMeetingInfo.getMeetingPeople().forEach(s -> {
|
wgMeetingInfo.getMeetingPeople().forEach(s -> {
|
||||||
WgMeetingUserRelation wgMeetingUserRelation = new WgMeetingUserRelation();
|
WgMeetingUserRelation wgMeetingUserRelation = new WgMeetingUserRelation();
|
||||||
wgMeetingUserRelation.setUserId(s);
|
wgMeetingUserRelation.setUserId(s);
|
||||||
@@ -350,27 +357,42 @@ public class WgWorkGroupServiceImpl extends ServiceImpl<WgWorkGroupDao, WgWorkGr
|
|||||||
});
|
});
|
||||||
removeMeet.add(wgMeetingInfo.getId());
|
removeMeet.add(wgMeetingInfo.getId());
|
||||||
});
|
});
|
||||||
|
flag = wgMeetingInfoService.saveOrUpdateBatch(wgWorkGroupShowDTO.getWgMeetingInfos());
|
||||||
if (!removeMeet.isEmpty()) {
|
if (!removeMeet.isEmpty()) {
|
||||||
wgMeetingUserRelationService.removeByIds(removeMeet);
|
wgMeetingUserRelationService.removeByIds(removeMeet);
|
||||||
wgMeetingUserRelationService.saveBatch(wgMeetingUserRelations);
|
wgMeetingUserRelationService.saveBatch(wgMeetingUserRelations);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
flag = wgMeetingInfoService.saveOrUpdateBatch(wgWorkGroupShowDTO.getWgMeetingInfos());
|
|
||||||
}
|
}
|
||||||
if (null != wgWorkGroupShowDTO.getWgNetInfos() && wgWorkGroupShowDTO.getWgNetInfos().size() > 0) {
|
if (null != wgWorkGroupShowDTO.getWgNetInfos() && wgWorkGroupShowDTO.getWgNetInfos().size() > 0) {
|
||||||
List<WgNetInfo> wgNetInfos = new ArrayList<>();
|
List<WgNetInfo> wgNetInfos = new ArrayList<>();
|
||||||
wgWorkGroupShowDTO.getWgNetInfos().forEach(wgNetInfoDTO -> {
|
wgWorkGroupShowDTO.getWgNetInfos().forEach(wgNetInfoDTO -> {
|
||||||
WgNetInfo wgNetInfo = new WgNetInfo();
|
WgNetInfo wgNetInfo = new WgNetInfo();
|
||||||
BeanUtils.copyProperties(wgNetInfoDTO, wgNetInfo);
|
BeanUtils.copyProperties(wgNetInfoDTO, wgNetInfo);
|
||||||
|
if (null==wgNetInfo.getWgId()){
|
||||||
|
wgNetInfo.setWgId(wgWorkGroupShowDTO.getId());
|
||||||
|
}
|
||||||
wgNetInfos.add(wgNetInfo);
|
wgNetInfos.add(wgNetInfo);
|
||||||
});
|
});
|
||||||
flag = wgNetInfoService.saveOrUpdateBatch(wgNetInfos);
|
flag = wgNetInfoService.saveOrUpdateBatch(wgNetInfos);
|
||||||
}
|
}
|
||||||
if (null != wgWorkGroupShowDTO.getWgPayInfos() && wgWorkGroupShowDTO.getWgPayInfos().size() > 0) {
|
if (null != wgWorkGroupShowDTO.getWgPayInfos() && wgWorkGroupShowDTO.getWgPayInfos().size() > 0) {
|
||||||
|
if (!wgWorkGroupShowDTO.getWgPayInfos().isEmpty()){
|
||||||
|
wgWorkGroupShowDTO.getWgPayInfos().forEach(wgPayInfo -> {
|
||||||
|
if (null==wgPayInfo.getWgId()){
|
||||||
|
wgPayInfo.setWgId(wgWorkGroupShowDTO.getId());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
flag = wgPayInfoService.saveOrUpdateBatch(wgWorkGroupShowDTO.getWgPayInfos());
|
flag = wgPayInfoService.saveOrUpdateBatch(wgWorkGroupShowDTO.getWgPayInfos());
|
||||||
}
|
}
|
||||||
if (null != wgWorkGroupShowDTO.getWgStandorpolicyInfos() && wgWorkGroupShowDTO.getWgStandorpolicyInfos().size() > 0) {
|
if (null != wgWorkGroupShowDTO.getWgStandorpolicyInfos() && wgWorkGroupShowDTO.getWgStandorpolicyInfos().size() > 0) {
|
||||||
|
if (!wgWorkGroupShowDTO.getWgStandorpolicyInfos().isEmpty()){
|
||||||
|
wgWorkGroupShowDTO.getWgStandorpolicyInfos().forEach(wgStandorpolicyInfo -> {
|
||||||
|
if (null==wgStandorpolicyInfo.getWgId()){
|
||||||
|
wgStandorpolicyInfo.setWgId(wgWorkGroupShowDTO.getId());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
flag = wgStandorpolicyInfoService.saveOrUpdateBatch(wgWorkGroupShowDTO.getWgStandorpolicyInfos());
|
flag = wgStandorpolicyInfoService.saveOrUpdateBatch(wgWorkGroupShowDTO.getWgStandorpolicyInfos());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user