|
@@ -132,11 +132,26 @@ public class WbsSynchronousServiceImpl {
|
|
if (wbsTreePrivate.getExcelId() == null) {
|
|
if (wbsTreePrivate.getExcelId() == null) {
|
|
throw new ServiceException("表单未绑定清表");
|
|
throw new ServiceException("表单未绑定清表");
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ //获取系统模板
|
|
|
|
+ WbsTree wbsTree = wbsTreeMapper.selectById(wbsTreePrivate.getId());
|
|
|
|
+ List<WbsTree> wbsTrees = wbsTreeMapper.selectList(Wrappers.<WbsTree>lambdaQuery()
|
|
|
|
+ .eq(WbsTree::getWbsId, wbsTree.getWbsId())
|
|
|
|
+ .ne(WbsTree::getId, wbsTree.getId())
|
|
|
|
+ .eq(WbsTree::getInitTableName, wbsTree.getInitTableName())
|
|
|
|
+ .eq(WbsTree::getIsDeleted, 0));
|
|
|
|
+ if(CollectionUtil.isEmpty(wbsTrees)){
|
|
|
|
+ throw new ServiceException("当前项目没有相同实体表的其他表单");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ List<Long> collect3 = wbsTrees.stream().map(WbsTree::getId).collect(Collectors.toList());
|
|
|
|
+
|
|
|
|
+
|
|
//在指定项目下指定实体表相同的数据
|
|
//在指定项目下指定实体表相同的数据
|
|
List<WbsTreePrivate> wbsTreePrivates = wbsTreePrivateMapper.selectList(Wrappers.<WbsTreePrivate>lambdaQuery()
|
|
List<WbsTreePrivate> wbsTreePrivates = wbsTreePrivateMapper.selectList(Wrappers.<WbsTreePrivate>lambdaQuery()
|
|
.eq(WbsTreePrivate::getProjectId, wbsTreePrivate.getProjectId())
|
|
.eq(WbsTreePrivate::getProjectId, wbsTreePrivate.getProjectId())
|
|
.ne(WbsTreePrivate::getPKeyId, nodeId)
|
|
.ne(WbsTreePrivate::getPKeyId, nodeId)
|
|
- .eq(WbsTreePrivate::getInitTableName, initTableName)
|
|
|
|
|
|
+ .in(WbsTreePrivate::getId, collect3)
|
|
);
|
|
);
|
|
if (CollectionUtil.isEmpty(wbsTreePrivates)) {
|
|
if (CollectionUtil.isEmpty(wbsTreePrivates)) {
|
|
throw new ServiceException("当前项目没有相同实体表的其他表单");
|
|
throw new ServiceException("当前项目没有相同实体表的其他表单");
|