|
@@ -314,8 +314,11 @@
|
|
|
</update>
|
|
|
<update id="syncCurrentFormInProject">
|
|
|
UPDATE m_wbs_tree_private
|
|
|
- SET html_url = #{wbsTreePrivate.htmlUrl} , init_table_name = #{wbsTreePrivate.initTableName} , init_table_id = #{wbsTreePrivate.initTableId}
|
|
|
- WHERE project_id = #{wbsTreePrivate.projectId} and excel_id = #{wbsTreePrivate.excelId}
|
|
|
+ SET html_url = #{wbsTreePrivate.htmlUrl},
|
|
|
+ init_table_name = #{wbsTreePrivate.initTableName},
|
|
|
+ init_table_id = #{wbsTreePrivate.initTableId}
|
|
|
+ WHERE project_id = #{wbsTreePrivate.projectId}
|
|
|
+ and excel_id = #{wbsTreePrivate.excelId}
|
|
|
</update>
|
|
|
|
|
|
<select id="lazyTree" resultMap="treeNodeResultMap">
|
|
@@ -454,31 +457,30 @@
|
|
|
AND project_id = #{projectId}
|
|
|
</select>
|
|
|
<select id="selectByNodeTable" resultType="org.springblade.manager.vo.WbsNodeTableVO">
|
|
|
- SELECT wt.p_key_id AS "pKeyId",
|
|
|
- wt.id AS id,
|
|
|
- wt.wbs_type AS wbsType,
|
|
|
- wt.node_name AS tableName,
|
|
|
- wt.full_name,
|
|
|
- wt.update_time,
|
|
|
+ SELECT wt.p_key_id AS "pKeyId",
|
|
|
+ wt.id AS id,
|
|
|
+ wt.wbs_type AS wbsType,
|
|
|
+ wt.node_name AS tableName,
|
|
|
+ IFNULL(if(length(trim(wt.full_name)) > 0, wt.full_name, wt.node_name), wt.node_name) AS fullName,
|
|
|
case
|
|
|
when wt.table_type in (1, 9) then 1
|
|
|
when wt.table_type in (2, 10) then 2
|
|
|
else wt.table_type
|
|
|
- end as tableType,
|
|
|
- wt.`status` AS isCreateTable,
|
|
|
- wt.table_owner AS tableOwner,
|
|
|
+ end as tableType,
|
|
|
+ wt.`status` AS isCreateTable,
|
|
|
+ wt.table_owner AS tableOwner,
|
|
|
wt.is_link_table,
|
|
|
wt.init_table_name,
|
|
|
- wt.init_table_id as initTableId,
|
|
|
- wt.excel_id AS excelId,
|
|
|
+ wt.init_table_id as initTableId,
|
|
|
+ wt.excel_id AS excelId,
|
|
|
wt.sort,
|
|
|
wt.status,
|
|
|
- wt.fill_rate AS "fillRate",
|
|
|
- wt.html_url AS htmlUrl,
|
|
|
+ wt.fill_rate AS "fillRate",
|
|
|
+ wt.html_url AS htmlUrl,
|
|
|
(SELECT count(1)
|
|
|
FROM m_wbs_form_element
|
|
|
WHERE f_id = wt.init_table_id
|
|
|
- and is_deleted = 0) AS "elementTotal"
|
|
|
+ and is_deleted = 0) AS "elementTotal"
|
|
|
FROM m_wbs_tree_private AS wt
|
|
|
WHERE wt.type = 2
|
|
|
AND wt.is_deleted = 0
|
|
@@ -487,7 +489,7 @@
|
|
|
AND wt.project_id = #{projectId}
|
|
|
AND wt.trial_tab_contract_id is null
|
|
|
AND (wt.wbs_type != 2 OR wt.table_type IN (1,2,9,10))
|
|
|
- ORDER BY wt.sort, wt.full_name, wt.p_key_id, wt.update_time
|
|
|
+ ORDER BY wt.sort, fullName
|
|
|
</select>
|
|
|
<select id="getByCondition" resultType="org.springblade.manager.entity.WbsTreePrivate">
|
|
|
SELECT *
|
|
@@ -596,7 +598,7 @@
|
|
|
wt.table_owner as tableOwner,
|
|
|
wt.is_link_table,
|
|
|
wt.init_table_name,
|
|
|
- wt.init_table_id initTableId,
|
|
|
+ wt.init_table_id initTableId,
|
|
|
wt.excel_id as excelId,
|
|
|
wt.sort,
|
|
|
wt.status,
|