|
@@ -710,7 +710,7 @@ public class UserServiceImpl extends BaseServiceImpl<UserMapper, User> implement
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public List<WbsTreeContractLazyVO> lazyQueryContractWbsTree(String id, String contractId, String contractIdRelation, String tableOwner) {
|
|
|
+ public List<WbsTreeContractLazyVO> lazyQueryContractWbsTree(String id, String contractId, String contractIdRelation, String tableOwner,String description) {
|
|
|
if (org.apache.commons.lang.StringUtils.isEmpty(tableOwner)) {
|
|
|
throw new ServiceException("Param error,tableOwner cannot be empty");
|
|
|
}
|
|
@@ -720,6 +720,10 @@ public class UserServiceImpl extends BaseServiceImpl<UserMapper, User> implement
|
|
|
if (contractInfo != null) {
|
|
|
/* =========================== 施工合同段 =========================== */
|
|
|
if (new Integer(1).equals(contractInfo.getContractType())) {
|
|
|
+ String condition="AND";
|
|
|
+ if(StringUtil.isEmpty(description)){
|
|
|
+ condition="AND a.is_buss_show!=2 AND";
|
|
|
+ }
|
|
|
String sql = "SELECT is_custom,p_key_id,contract_id," +
|
|
|
"(SELECT id FROM u_contract_tree_drawings WHERE process_id = p_key_id AND is_deleted = 0 limit 1) AS drawingsId," +
|
|
|
"id,parent_id,node_type,type,wbs_type,is_buss_show as isBussShow,is_concrete,major_data_type,partition_code,old_id,contract_id_relation,is_concealed_works_node," +
|
|
@@ -729,11 +733,14 @@ public class UserServiceImpl extends BaseServiceImpl<UserMapper, User> implement
|
|
|
" AND b.status = 1 AND b.contract_id = " + contractId + " AND b.is_deleted = 0 ) AS hasChildren," +
|
|
|
"(SELECT CASE WHEN count(1) > 0 THEN 1 ELSE 0 END FROM m_wbs_tree_contract b WHERE b.parent_id = a.id AND b.type = 1" +
|
|
|
" AND b.status = 1 AND b.contract_id = " + contractId + " AND b.is_deleted = 0 AND is_custom = 1) AS isCustomChild " +
|
|
|
- "FROM m_wbs_tree_contract a WHERE a.node_type != 111 AND a.type = 1 AND a.status = 1 AND a.is_deleted = 0 " +
|
|
|
+ "FROM m_wbs_tree_contract a WHERE a.node_type != 111 AND a.type = 1 AND a.status = 1 "+condition+" a.is_deleted = 0 " +
|
|
|
"AND parent_id = " + (StringUtils.isNotEmpty(id) ? id : 0) + " AND contract_id = " + contractId + " " +
|
|
|
"ORDER BY a.sort,title,a.create_time";
|
|
|
+ System.out.println(sql);
|
|
|
List<WbsTreeContractLazyVO> lazyNodes = jdbcTemplate.query(sql, new BeanPropertyRowMapper<>(WbsTreeContractLazyVO.class));
|
|
|
if (lazyNodes.size() > 0) {
|
|
|
+
|
|
|
+
|
|
|
/*获取当前合同段节点本地缓存信息*/
|
|
|
List<WbsTreeContractLazyVO> nodesAll = this.getNodeAll(contractId);
|
|
|
List<WbsTreeContractLazyVO> distinctNodesAll = nodesAll.stream()
|