|
@@ -726,7 +726,7 @@ public class UserServiceImpl extends BaseServiceImpl<UserMapper, User> implement
|
|
|
String sql = "SELECT is_custom,p_key_id,contract_id," +
|
|
|
"(SELECT is_reference_number FROM m_contract_info WHERE id="+contractId+") AS isReferenceNumber,"+
|
|
|
"(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,class_name,unit_name,node_class,unit_num,excellent_num,is_classifition,digitize_time,partition_code,old_id,contract_id_relation,is_concealed_works_node,wbs_id," +
|
|
|
+ "id,parent_id,node_type,type,wbs_type,is_buss_show as isBussShow,is_concrete,major_data_type,class_name,unit_name,node_class,unit_num,excellent_num,is_classifition,digitize_time,partition_code,old_id,contract_id_relation,is_concealed_works_node,wbs_id,sort,create_time," +
|
|
|
"CASE (SELECT count(1) FROM u_tree_contract_first AS tcf WHERE tcf.is_deleted = 0 AND tcf.wbs_node_id = a.p_key_id) " +
|
|
|
"WHEN 0 THEN 'false' ELSE 'true' END AS isFirst,IFNULL(if(length(trim(full_name))>0,full_name,node_name),node_name) AS title," +
|
|
|
"(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" +
|
|
@@ -734,8 +734,8 @@ public class UserServiceImpl extends BaseServiceImpl<UserMapper, User> implement
|
|
|
"(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 " +
|
|
|
- "AND parent_id = " + (StringUtils.isNotEmpty(id) ? id : 0) + " AND contract_id = " + contractId + " " +
|
|
|
- "ORDER BY a.sort,title,a.create_time";
|
|
|
+ "AND parent_id = " + (StringUtils.isNotEmpty(id) ? id : 0) + " AND contract_id = " + contractId;
|
|
|
+// " ORDER BY a.sort,title,a.create_time";
|
|
|
|
|
|
List<WbsTreeContractLazyVO> lazyNodes = jdbcTemplate.query(sql, new BeanPropertyRowMapper<>(WbsTreeContractLazyVO.class));
|
|
|
//资料填报 不返回已隐藏的节点
|
|
@@ -864,7 +864,7 @@ public class UserServiceImpl extends BaseServiceImpl<UserMapper, User> implement
|
|
|
String sql = "SELECT is_custom,p_key_id,contract_id," +
|
|
|
"(SELECT is_reference_number FROM m_contract_info WHERE id="+contractId+") AS isReferenceNumber,"+
|
|
|
"(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_concrete,major_data_type,class_name,unit_name,node_class,unit_num,excellent_num,is_classifition,digitize_time,partition_code,old_id,contract_id_relation,is_concealed_works_node,wbs_id," +
|
|
|
+ "id,parent_id,node_type,type,wbs_type,is_concrete,major_data_type,class_name,unit_name,node_class,unit_num,excellent_num,is_classifition,digitize_time,partition_code,old_id,contract_id_relation,is_concealed_works_node,wbs_id,sort,create_time," +
|
|
|
"CASE (SELECT count(1) FROM u_tree_contract_first AS tcf WHERE tcf.is_deleted = 0 AND tcf.wbs_node_id = a.p_key_id) " +
|
|
|
"WHEN 0 THEN 'false' ELSE 'true' END AS isFirst,IFNULL(if(length(trim(full_name))>0,full_name,node_name),node_name) AS title," +
|
|
|
"(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" +
|
|
@@ -872,8 +872,8 @@ public class UserServiceImpl extends BaseServiceImpl<UserMapper, User> implement
|
|
|
"(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 = " + sgContractId + " 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 " +
|
|
|
- "AND parent_id = " + (StringUtils.isNotEmpty(id) ? id : 0) + " AND contract_id = " + sgContractId + " " +
|
|
|
- "ORDER BY a.sort,title,a.create_time";
|
|
|
+ "AND parent_id = " + (StringUtils.isNotEmpty(id) ? id : 0) + " AND contract_id = " + sgContractId;
|
|
|
+// " ORDER BY a.sort,title,a.create_time";
|
|
|
List<WbsTreeContractLazyVO> lazyNodes = jdbcTemplate.query(sql, new BeanPropertyRowMapper<>(WbsTreeContractLazyVO.class));
|
|
|
if (lazyNodes.size() > 0) {
|
|
|
List<WbsTreeContractLazyVO> nodesAll = this.getNodeAll(sgContractId);
|