|
@@ -418,6 +418,36 @@ public class WbsTreeContractServiceImpl extends BaseServiceImpl<WbsTreeContractM
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public boolean concealedWorksNode(String pKeyId) {
|
|
|
+ if (StringUtils.isNotEmpty(pKeyId)) {
|
|
|
+ //获取节点信息
|
|
|
+ WbsTreeContract wbsTreeContract = baseMapper.selectOne(Wrappers.<WbsTreeContract>query().lambda().eq(WbsTreeContract::getPKeyId, pKeyId));
|
|
|
+ List<ContractInfo> contractInfos = contractInfoMapper.selectList(Wrappers.<ContractInfo>query().lambda().eq(ContractInfo::getPId, wbsTreeContract.getProjectId()).eq(ContractInfo::getStatus, 1));
|
|
|
+ List<WbsTreeContract> wbsTreeContractList = new ArrayList<>();
|
|
|
+ for (ContractInfo contractInfo : contractInfos) {
|
|
|
+ WbsTreeContract node = baseMapper.selectOne(Wrappers.<WbsTreeContract>query().lambda()
|
|
|
+ .eq(WbsTreeContract::getId, wbsTreeContract.getId())
|
|
|
+ .eq(WbsTreeContract::getProjectId, wbsTreeContract.getProjectId())
|
|
|
+ .eq(WbsTreeContract::getContractId, contractInfo.getId())
|
|
|
+ .eq(WbsTreeContract::getStatus, 1)
|
|
|
+ .eq(WbsTreeContract::getType, 1)
|
|
|
+ );
|
|
|
+ wbsTreeContractList.add(node);
|
|
|
+ }
|
|
|
+ //标记是否隐蔽工程节点
|
|
|
+ for (WbsTreeContract treeContract : wbsTreeContractList) {
|
|
|
+ treeContract.setIsConcealedWorksNode(treeContract.getIsConcealedWorksNode().equals(0) ? 1 : 0);
|
|
|
+ LambdaUpdateWrapper<WbsTreeContract> updateWrapper = new LambdaUpdateWrapper<>();
|
|
|
+ updateWrapper.eq(WbsTreeContract::getPKeyId, treeContract.getPKeyId())
|
|
|
+ .set(WbsTreeContract::getIsConcealedWorksNode, treeContract.getIsConcealedWorksNode());
|
|
|
+ baseMapper.update(null, updateWrapper);
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
private List<WbsTreeContract> findAllNodeList(String wbsTreeIds, String projectId, String contractId, String wbsId) {
|
|
|
String[] ids = wbsTreeIds.split(",");
|
|
|
List<WbsTreeContract> list = new ArrayList<>();
|