Переглянути джерело

客户端划分树查询调整

huangjn 3 роки тому
батько
коміт
38eca5091d

+ 10 - 0
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/vo/TreeNodeVO.java

@@ -34,6 +34,8 @@ public class TreeNodeVO extends BaseNode<TreeNode> {
 
     private String tenantId;
 
+    private String partitionCode;
+
     public TreeNodeVO() {
     }
 
@@ -109,6 +111,14 @@ public class TreeNodeVO extends BaseNode<TreeNode> {
         this.value = value;
     }
 
+    public String getPartitionCode() {
+        return partitionCode;
+    }
+
+    public void setPartitionCode(String partitionCode) {
+        this.partitionCode = partitionCode;
+    }
+
     public String toString() {
         return "TreeNode(deptCategory=" + this.getDeptCategory() + ",tenantId" + this.getTenantId() + ",isExistForm" + this.getIsExistForm() + ",wbsType=" + this.getWbsType() + ", primaryKeyId=" + this.getPrimaryKeyId() + ", type=" + this.getType() + ", title=" + this.getTitle() + ", key=" + this.getKey() + ", value=" + this.getValue() + ")";
     }

+ 5 - 2
blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/ContractInfoMapper.xml

@@ -56,6 +56,7 @@
         <result column="type" property="type"/>
         <result column="primaryKeyId" property="primaryKeyId"/>
         <result column="wbsType" property="wbsType"/>
+        <result column="partition_code" property="partitionCode"/>
     </resultMap>
 
 
@@ -157,17 +158,19 @@
         wbs_type AS wbsType,
         id,
         parent_id,
-        IFNULL(full_name,dept_name) AS title,
+        IFNULL(if(length(trim(full_name)) > 0, full_name, dept_name),dept_name) AS title,
         type AS "type",
         dept_category AS deptCategory,
         id AS "value",
         id AS "key",
-        partition_code AS partitionCode
+        partition_code
         FROM
         m_wbs_tree_contract
         WHERE
         is_deleted = 0
         AND STATUS = 1
+        /* major_data_type = 5是日志类型,日志类型不需要直接在划分树上体现 */
+        AND (major_data_type != 5 or major_data_type is null)
         <if test="wbsId!=null and wbsId!=''">
             and wbs_id = #{wbsId}
         </if>