|
@@ -189,7 +189,10 @@ public class UStandardInfoServiceImpl extends ServiceImpl<StandardInfoMapper, St
|
|
|
StandardInfoJoinDTO standardInfoJoinDTO = new StandardInfoJoinDTO();
|
|
|
|
|
|
Long leftId = standardInfoJoin.getId();
|
|
|
+
|
|
|
standardInfoJoinDTO.setLeftId(leftId);
|
|
|
+ //设置随机组id
|
|
|
+ standardInfoJoinDTO.setGroupId(SnowFlakeUtil.getId());
|
|
|
List<StandardInfoConditionVo> standardInfos = standardInfoJoin.getStandardInfos();
|
|
|
if (CollectionUtil.isNotEmpty(standardInfos)) {
|
|
|
for (StandardInfoConditionVo standardInfo : standardInfos) {
|
|
@@ -204,9 +207,12 @@ public class UStandardInfoServiceImpl extends ServiceImpl<StandardInfoMapper, St
|
|
|
//封装参数
|
|
|
for (StandardInfoJoinDTO standardInfoJoin : list) {
|
|
|
List<Long> rightIds = standardInfoJoin.getRightIds();
|
|
|
+ standardInfoJoin.setGroupId(SnowFlakeUtil.getId());
|
|
|
for (Long rightId : rightIds) {
|
|
|
StandardInfoJoin uStandardInfoJoin = new StandardInfoJoin();
|
|
|
uStandardInfoJoin.setId(SnowFlakeUtil.getId());
|
|
|
+ //设置组id
|
|
|
+ uStandardInfoJoin.setGroupId(standardInfoJoin.getGroupId());
|
|
|
uStandardInfoJoin.setStandardInfoLeftId(standardInfoJoin.getLeftId());
|
|
|
uStandardInfoJoin.setStandardInfoRightId(rightId);
|
|
|
uStandardInfoJoin.setCreateUser(user.getUserId());
|
|
@@ -244,6 +250,8 @@ public class UStandardInfoServiceImpl extends ServiceImpl<StandardInfoMapper, St
|
|
|
try {
|
|
|
for (StandardInfoPrivateJoinVO standardInfoPrivateJoin : standardInfoPrivateJoins) {
|
|
|
Long leftId = standardInfoPrivateJoin.getId();
|
|
|
+
|
|
|
+ standardInfoPrivateJoin.setGroupId(SnowFlakeUtil.getId());
|
|
|
List<StandardInfoPrivateJoinGroupVO> group = standardInfoPrivateJoin.getGroup();
|
|
|
//项目组
|
|
|
for (StandardInfoPrivateJoinGroupVO standardInfoPrivateJoinGroupVO : group) {
|
|
@@ -253,6 +261,7 @@ public class UStandardInfoServiceImpl extends ServiceImpl<StandardInfoMapper, St
|
|
|
|
|
|
for (StandardElementVo key : keys) {
|
|
|
StandardInfoPrivateJoin join = new StandardInfoPrivateJoin();
|
|
|
+ join.setGroupId(standardInfoPrivateJoin.getGroupId());
|
|
|
join.setStandardInfoId(leftId);
|
|
|
join.setId(SnowFlakeUtil.getId());
|
|
|
join.setPrivateId(privateId);
|
|
@@ -274,13 +283,13 @@ public class UStandardInfoServiceImpl extends ServiceImpl<StandardInfoMapper, St
|
|
|
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
- public Boolean deleteConditionSet(Long leftId) {
|
|
|
+ public Boolean deleteConditionSet(Long groupId) {
|
|
|
BladeUser user = SecureUtil.getUser();
|
|
|
try {
|
|
|
return standardInfoJoinService.update(Wrappers.<StandardInfoJoin>lambdaUpdate()
|
|
|
.set(StandardInfoJoin::getIsDeleted, 1)
|
|
|
.set(StandardInfoJoin::getUpdateUser, user.getUserId())
|
|
|
- .eq(StandardInfoJoin::getStandardInfoLeftId, leftId));
|
|
|
+ .eq(StandardInfoJoin::getGroupId, groupId));
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
throw new ServiceException("删除失败");
|
|
@@ -289,13 +298,13 @@ public class UStandardInfoServiceImpl extends ServiceImpl<StandardInfoMapper, St
|
|
|
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
- public Boolean deleteElementJoin(Long leftId) {
|
|
|
+ public Boolean deleteElementJoin(Long groupId) {
|
|
|
BladeUser user = SecureUtil.getUser();
|
|
|
try {
|
|
|
return standardInfoPrivateJoinService.update(Wrappers.<StandardInfoPrivateJoin>lambdaUpdate()
|
|
|
.set(StandardInfoPrivateJoin::getIsDeleted, 1)
|
|
|
.set(StandardInfoPrivateJoin::getUpdateUser, user.getUserId())
|
|
|
- .eq(StandardInfoPrivateJoin::getStandardInfoId, leftId));
|
|
|
+ .eq(StandardInfoPrivateJoin::getGroupId, groupId));
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
throw new ServiceException("删除失败");
|
|
@@ -303,8 +312,8 @@ public class UStandardInfoServiceImpl extends ServiceImpl<StandardInfoMapper, St
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public List<StandardInfoVO> getConditionSet(Long id, Long leftId, Long groupId) {
|
|
|
- List<StandardInfoVO> conditionSet = baseMapper.getConditionSet(id, leftId, groupId);
|
|
|
+ public List<StandardInfoVO> getConditionSet(Long id, Long leftId, Long groupId, Long joinGroupId) {
|
|
|
+ List<StandardInfoVO> conditionSet = baseMapper.getConditionSet(id, leftId, groupId, joinGroupId);
|
|
|
for (StandardInfoVO standardInfoVO : conditionSet) {
|
|
|
List<StandardInfoConditionVo> standardInfos = standardInfoVO.getStandardInfos();
|
|
|
for (StandardInfoConditionVo standardInfo : standardInfos) {
|
|
@@ -324,8 +333,8 @@ public class UStandardInfoServiceImpl extends ServiceImpl<StandardInfoMapper, St
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public List<StandardInfoPrivateJoinVO> getElementJoin(Long id, Long leftId, Long groupId) {
|
|
|
- return baseMapper.getElementJoin(id, leftId, groupId);
|
|
|
+ public List<StandardInfoPrivateJoinVO> getElementJoin(Long id, Long leftId, Long groupId, Long joinGroupId) {
|
|
|
+ return baseMapper.getElementJoin(id, leftId, groupId, joinGroupId);
|
|
|
|
|
|
}
|
|
|
|