小修改

This commit is contained in:
zjh 2025-12-05 16:34:01 +08:00
parent ce42064543
commit 8e4e7a871a
2 changed files with 2 additions and 2 deletions

View File

@ -10,7 +10,7 @@ import lombok.NoArgsConstructor;
@SQLQuery(value = { @SQLQuery(value = {
@SQL(view = "getAllSubsystem", @SQL(view = "getAllSubsystem",
sql = "SELECT DISTINCT mp.subsystem_name FROM yfsjglpt_model_parameter mp INNER JOIN yfsjglpt_model_parameter_and_template mpat ON mp.id = mpat.parameter_id INNER JOIN yfsjglpt_model_template mt ON mpat.template_id = mt.id INNER JOIN ( SELECT template_name, MAX(version) AS max_version FROM yfsjglpt_model_template WHERE status = 'COMPLETE' GROUP BY template_name ) latest ON mt.template_name = latest.template_name AND mt.version = latest.max_version WHERE mt.status = 'COMPLETE' ORDER BY mt.template_name, mp.subsystem_name, mp.parameter_name"), sql = "SELECT DISTINCT mp.subsystem_name FROM yfsjglpt_model_parameter mp INNER JOIN yfsjglpt_model_parameter_and_template mpat ON mp.id = mpat.parameter_id INNER JOIN yfsjglpt_model_template mt ON mpat.template_id = mt.id INNER JOIN ( SELECT template_name, MAX(version) AS max_version FROM yfsjglpt_model_template WHERE status = 'COMPLETE' GROUP BY template_name ) latest ON mt.template_name = latest.template_name AND mt.version = latest.max_version WHERE mt.status = 'COMPLETE' ORDER BY mp.subsystem_name"),
@SQL(view = "selectParametersByTemplateId", sql = @SQL(view = "selectParametersByTemplateId", sql =
"select p.* from yfsjglpt_model_parameter p left join yfsjglpt_model_parameter_and_template tap on p.id = tap.parameter_id where tap.template_id = #templateId"), "select p.* from yfsjglpt_model_parameter p left join yfsjglpt_model_parameter_and_template tap on p.id = tap.parameter_id where tap.template_id = #templateId"),
@SQL(view = "selectMaxNumber", sql = @SQL(view = "selectMaxNumber", sql =

View File

@ -13,7 +13,7 @@ import java.util.List;
@SQL(view = "getApprovalByUserIdAndIds", @SQL(view = "getApprovalByUserIdAndIds",
sql = "SELECT af.id AS \"flowId\", t.id AS \"templateId\", t.template_name AS \"templateName\", t.version AS \"version\", t.status AS \"status\" , af.create_by AS \"createBy\", af.created_time AS \"createdTime\" , CASE WHEN current_node = 'PROOFREAD' THEN proofread_users WHEN current_node = 'REVIEW' THEN review_users WHEN current_node = 'COUNTERSIGN' THEN countersign_users WHEN current_node = 'APPROVE' THEN approve_users END AS current_users FROM yfsjglpt_model_approval_flow af JOIN yfsjglpt_model_template t ON af.template_id = t.id WHERE t.template_name like CONCAT('%',#templateName, '%') and t.status like CONCAT('%',#status, '%') and af.flow_type = 1 and af.id NOT IN (#ids) AND af.create_by = #createBy"), sql = "SELECT af.id AS \"flowId\", t.id AS \"templateId\", t.template_name AS \"templateName\", t.version AS \"version\", t.status AS \"status\" , af.create_by AS \"createBy\", af.created_time AS \"createdTime\" , CASE WHEN current_node = 'PROOFREAD' THEN proofread_users WHEN current_node = 'REVIEW' THEN review_users WHEN current_node = 'COUNTERSIGN' THEN countersign_users WHEN current_node = 'APPROVE' THEN approve_users END AS current_users FROM yfsjglpt_model_approval_flow af JOIN yfsjglpt_model_template t ON af.template_id = t.id WHERE t.template_name like CONCAT('%',#templateName, '%') and t.status like CONCAT('%',#status, '%') and af.flow_type = 1 and af.id NOT IN (#ids) AND af.create_by = #createBy"),
@SQL(view = "getTodoAndTemplate", @SQL(view = "getTodoAndTemplate",
sql = "SELECT af.id AS \"flowId\", t.id AS \"templateId\", t.template_name AS \"templateName\", t.version AS \"version\", t.status AS \"status\" , af.create_by AS \"createBy\" , xu.username AS \"username\", af.created_time AS \"createdTime\" , CASE WHEN current_node = 'PROOFREAD' THEN proofread_users WHEN current_node = 'REVIEW' THEN review_users WHEN current_node = 'COUNTERSIGN' THEN countersign_users WHEN current_node = 'APPROVE' THEN approve_users END AS current_users FROM yfsjglpt_model_approval_flow af JOIN yfsjglpt_model_template t ON af.template_id = t.id LEFT JOIN xdap_users xu ON xu.id = af.create_by WHERE t.template_name LIKE CONCAT('%', #templateName, '%') AND t.status LIKE CONCAT('%', #status, '%') AND t.created_time LIKE CONCAT('%', #createdTime, '%') AND xu.username LIKE CONCAT('%', #username, '%') AND af.flow_type = 1 AND (af.id IN (#ids) OR af.create_by = #createBy) ORDER BY CASE af.status WHEN 'COMPLETE' THEN 1 WHEN 'APPROVING' THEN 2 WHEN 'DRAFT' THEN 3 WHEN 'RETURNED' THEN 4 WHEN 'REJECTED' THEN 5 ELSE 6 END ASC") sql = "SELECT af.id AS \"flowId\", t.id AS \"templateId\", t.template_name AS \"templateName\", t.version AS \"version\", t.status AS \"status\" , af.create_by AS \"createBy\" , xu.username AS \"username\", af.created_time AS \"createdTime\" , CASE WHEN current_node = 'PROOFREAD' THEN proofread_users WHEN current_node = 'REVIEW' THEN review_users WHEN current_node = 'COUNTERSIGN' THEN countersign_users WHEN current_node = 'APPROVE' THEN approve_users END AS current_users FROM yfsjglpt_model_approval_flow af JOIN yfsjglpt_model_template t ON af.template_id = t.id LEFT JOIN xdap_users xu ON xu.id = af.create_by WHERE t.template_name LIKE CONCAT('%', #templateName, '%') AND t.status LIKE CONCAT('%', #status, '%') AND t.created_time LIKE CONCAT('%', #createdTime, '%') AND xu.username LIKE CONCAT('%', #username, '%') AND af.flow_type = 1 AND (af.id IN (#ids) OR af.create_by = #createBy) ORDER BY CASE t.status WHEN 'COMPLETE' THEN 1 WHEN 'APPROVING' THEN 2 WHEN 'DRAFT' THEN 3 WHEN 'REJECTED' THEN 4 ELSE 5 END ASC")
}) })
@Data @Data
public class TodoAndTemplateView { public class TodoAndTemplateView {