|
@@ -761,6 +761,19 @@ public class UserServiceImpl extends BaseServiceImpl<UserMapper, User> implement
|
|
|
if (cn.hutool.core.util.ObjectUtil.isNotEmpty(contractId)) {
|
|
|
ContractInfo contractInfo = jdbcTemplate.query("SELECT contract_name,contract_type FROM m_contract_info WHERE id = " + contractId,
|
|
|
new BeanPropertyRowMapper<>(ContractInfo.class)).stream().findAny().orElse(null);
|
|
|
+ String contractExtendSql = "select ancestors from m_wbs_tree_contract_extend where type = " + tableOwner + " and is_sync = 1 and is_deleted = 0 and ancestors like concat( " + id + ",'%')";
|
|
|
+ List<String> ids = new ArrayList<>();
|
|
|
+ List<String> strings = null;
|
|
|
+ try {
|
|
|
+ strings = jdbcTemplate.queryForList(contractExtendSql, String.class);
|
|
|
+ } catch (DataAccessException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ //TODO 暂时忽略错误
|
|
|
+ }
|
|
|
+ if(CollectionUtil.isNotEmpty(strings)){
|
|
|
+ strings.forEach(f -> ids.addAll(Arrays.asList(f.split(","))));
|
|
|
+ }
|
|
|
+
|
|
|
if (contractInfo != null) {
|
|
|
/* =========================== 施工合同段 =========================== */
|
|
|
if (new Integer(1).equals(contractInfo.getContractType())) {
|
|
@@ -897,6 +910,9 @@ public class UserServiceImpl extends BaseServiceImpl<UserMapper, User> implement
|
|
|
|
|
|
// }
|
|
|
}
|
|
|
+ if(CollectionUtil.isNotEmpty(ids)){
|
|
|
+ lazyNodes.forEach(f -> f.setIsSync(ids.contains(f.getPKeyId()) ? 1 : 0));
|
|
|
+ }
|
|
|
return lazyNodes;
|
|
|
}
|
|
|
|
|
@@ -1036,6 +1052,9 @@ public class UserServiceImpl extends BaseServiceImpl<UserMapper, User> implement
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ if(CollectionUtil.isNotEmpty(ids)){
|
|
|
+ lazyNodesAll.forEach(f -> f.setIsSync(ids.contains(f.getPKeyId()) ? 1 : 0));
|
|
|
+ }
|
|
|
return lazyNodesAll;
|
|
|
}
|
|
|
}
|