|
@@ -79,21 +79,6 @@ public class ProjectListService {
|
|
if (CollectionUtils.isNotEmpty(dto.getLinks())) {
|
|
if (CollectionUtils.isNotEmpty(dto.getLinks())) {
|
|
for (ProgramProjectListLink link : dto.getLinks()) {
|
|
for (ProgramProjectListLink link : dto.getLinks()) {
|
|
link.setId(UUID.randomUUID().toString().replace("-", ""));
|
|
link.setId(UUID.randomUUID().toString().replace("-", ""));
|
|
- link.setType("1");
|
|
|
|
- link.setInfoId(id);
|
|
|
|
- link.setCreateBy(userDTO.getId());
|
|
|
|
- link.setCreateDate(new Date());
|
|
|
|
- link.setUpdateBy(userDTO.getId());
|
|
|
|
- link.setUpdateDate(new Date());
|
|
|
|
- link.setDelFlag(0);
|
|
|
|
- projectLinkMapper.insert(link);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- // 保存项目直接对接人信息
|
|
|
|
- if (CollectionUtils.isNotEmpty(dto.getLinkInfos())) {
|
|
|
|
- for (ProgramProjectListLink link : dto.getLinkInfos()) {
|
|
|
|
- link.setId(UUID.randomUUID().toString().replace("-", ""));
|
|
|
|
- link.setType("2");
|
|
|
|
link.setInfoId(id);
|
|
link.setInfoId(id);
|
|
link.setCreateBy(userDTO.getId());
|
|
link.setCreateBy(userDTO.getId());
|
|
link.setCreateDate(new Date());
|
|
link.setCreateDate(new Date());
|
|
@@ -133,26 +118,11 @@ public class ProjectListService {
|
|
info.setUpdateDate(new Date());
|
|
info.setUpdateDate(new Date());
|
|
info.setDelFlag(0);
|
|
info.setDelFlag(0);
|
|
projectListMapper.updateById(info);
|
|
projectListMapper.updateById(info);
|
|
- // 修改项目直接对接人信息(先删除原有数据,再保存)
|
|
|
|
- projectLinkMapper.deleteByInfoId(dto.getId());
|
|
|
|
|
|
+ // 修改联系人信息(先删除原有数据,再保存)
|
|
if (CollectionUtils.isNotEmpty(dto.getLinks())) {
|
|
if (CollectionUtils.isNotEmpty(dto.getLinks())) {
|
|
|
|
+ projectLinkMapper.deleteByInfoId(dto.getId());
|
|
for (ProgramProjectListLink link : dto.getLinks()) {
|
|
for (ProgramProjectListLink link : dto.getLinks()) {
|
|
link.setId(UUID.randomUUID().toString().replace("-", ""));
|
|
link.setId(UUID.randomUUID().toString().replace("-", ""));
|
|
- link.setType("1");
|
|
|
|
- link.setInfoId(dto.getId());
|
|
|
|
- link.setCreateBy(userDTO.getId());
|
|
|
|
- link.setCreateDate(new Date());
|
|
|
|
- link.setUpdateBy(userDTO.getId());
|
|
|
|
- link.setUpdateDate(new Date());
|
|
|
|
- link.setDelFlag(0);
|
|
|
|
- projectLinkMapper.insert(link);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- // 修改项目直接对接人信息
|
|
|
|
- if (CollectionUtils.isNotEmpty(dto.getLinkInfos())) {
|
|
|
|
- for (ProgramProjectListLink link : dto.getLinkInfos()) {
|
|
|
|
- link.setId(UUID.randomUUID().toString().replace("-", ""));
|
|
|
|
- link.setType("2");
|
|
|
|
link.setInfoId(dto.getId());
|
|
link.setInfoId(dto.getId());
|
|
link.setCreateBy(userDTO.getId());
|
|
link.setCreateBy(userDTO.getId());
|
|
link.setCreateDate(new Date());
|
|
link.setCreateDate(new Date());
|
|
@@ -188,24 +158,14 @@ public class ProjectListService {
|
|
// 查询主表信息
|
|
// 查询主表信息
|
|
ProgramProjectListInfo info = projectListMapper.selectById(id);
|
|
ProgramProjectListInfo info = projectListMapper.selectById(id);
|
|
BeanUtils.copyProperties(info, dto);
|
|
BeanUtils.copyProperties(info, dto);
|
|
- // 查询项目直接对接人列表
|
|
|
|
|
|
+ // 查询联系人列表
|
|
LambdaQueryWrapper<ProgramProjectListLink> linkWrapper = new LambdaQueryWrapper<>();
|
|
LambdaQueryWrapper<ProgramProjectListLink> linkWrapper = new LambdaQueryWrapper<>();
|
|
linkWrapper.eq(ProgramProjectListLink::getInfoId, id);
|
|
linkWrapper.eq(ProgramProjectListLink::getInfoId, id);
|
|
- linkWrapper.eq(ProgramProjectListLink::getType, "1");
|
|
|
|
linkWrapper.eq(ProgramProjectListLink::getDelFlag, 0);
|
|
linkWrapper.eq(ProgramProjectListLink::getDelFlag, 0);
|
|
List<ProgramProjectListLink> links = projectLinkMapper.selectList(linkWrapper);
|
|
List<ProgramProjectListLink> links = projectLinkMapper.selectList(linkWrapper);
|
|
if (CollectionUtils.isNotEmpty(links)) {
|
|
if (CollectionUtils.isNotEmpty(links)) {
|
|
dto.setLinks(links);
|
|
dto.setLinks(links);
|
|
}
|
|
}
|
|
- // 查询项目直接对接人列表
|
|
|
|
- LambdaQueryWrapper<ProgramProjectListLink> linkInfoWrapper = new LambdaQueryWrapper<>();
|
|
|
|
- linkInfoWrapper.eq(ProgramProjectListLink::getInfoId, id);
|
|
|
|
- linkInfoWrapper.eq(ProgramProjectListLink::getType, "2");
|
|
|
|
- linkInfoWrapper.eq(ProgramProjectListLink::getDelFlag, 0);
|
|
|
|
- List<ProgramProjectListLink> linkInfos = projectLinkMapper.selectList(linkInfoWrapper);
|
|
|
|
- if (CollectionUtils.isNotEmpty(linkInfos)) {
|
|
|
|
- dto.setLinkInfos(linkInfos);
|
|
|
|
- }
|
|
|
|
// 查询成员列表
|
|
// 查询成员列表
|
|
LambdaQueryWrapper<ProgramProjectListMember> memberWrapper = new LambdaQueryWrapper<>();
|
|
LambdaQueryWrapper<ProgramProjectListMember> memberWrapper = new LambdaQueryWrapper<>();
|
|
memberWrapper.eq(ProgramProjectListMember::getInfoId, id);
|
|
memberWrapper.eq(ProgramProjectListMember::getInfoId, id);
|