|
@@ -3248,10 +3248,7 @@ public class WbsTreeContractServiceImpl extends BaseServiceImpl<WbsTreeContractM
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
- @Override
|
|
|
- public Integer findIsExistTreeNode(List<String> ids) {
|
|
|
- return baseMapper.findIsExistTreeNode(ids);
|
|
|
- }
|
|
|
+
|
|
|
|
|
|
@Override
|
|
|
public List<WbsTreeContract> queryListByPIds(List<Long> pIds) {
|
|
@@ -4678,6 +4675,38 @@ public class WbsTreeContractServiceImpl extends BaseServiceImpl<WbsTreeContractM
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public R<List<WbsTreeContract>> getSiblingWbsContract(Long pKeyId) {
|
|
|
+ return R.data(wbsTreeContractMapper.getSiblingWbsContract(pKeyId));
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public R moveNode(MoveNodeDTO dto) {
|
|
|
+ List<WbsTreeContract> list= wbsTreeContractMapper.getWbsTreeContractsByPKeyIds(dto.getLeftPkeyIds());
|
|
|
+ WbsTreeContract fatherContract = this.getById(dto.getRightPkeyId());
|
|
|
+ for (WbsTreeContract contract : list) {
|
|
|
+ String oldancestorsPId = contract.getAncestorsPId();
|
|
|
+ String oldancestors = contract.getAncestors();
|
|
|
+ contract.setPId(fatherContract.getPKeyId());
|
|
|
+ contract.setParentId(fatherContract.getId());
|
|
|
+ contract.setAncestorsPId(fatherContract.getAncestorsPId()+","+contract.getPId());
|
|
|
+ contract.setAncestors(fatherContract.getAncestors());
|
|
|
+ //查出当前节点所有子节点。
|
|
|
+ List<WbsTreeContract> childContracts = wbsTreeContractMapper.getChildWbsTreeContracts(contract.getPKeyId());
|
|
|
+ if(!childContracts.isEmpty()){
|
|
|
+ for (WbsTreeContract childContract : childContracts) {
|
|
|
+ String ancestorsPId = childContract.getAncestorsPId();
|
|
|
+ ancestorsPId=ancestorsPId.replace(oldancestorsPId,contract.getAncestorsPId());
|
|
|
+ String ancestors = childContract.getAncestors();
|
|
|
+ ancestors=ancestors.replace(oldancestors,contract.getAncestors());
|
|
|
+ wbsTreeContractMapper.updateAncestorsPid(ancestorsPId,ancestors,childContract.getPKeyId());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.wbsTreeContractMapper.updateWbsTreeAncestors(contract);
|
|
|
+ }
|
|
|
+ return R.success("操作成功");
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 检查单元格是否有效
|
|
|
*/
|