|
|
@@ -957,6 +957,41 @@ public class ArticleService extends BaseTransaction {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ private List<Map<String, Object>> getArticleFlowList(GeneralDBAccess gdba, Long articleid) throws Exception {
|
|
|
+ String sql = " select ap.applyid, ap.ascode, "
|
|
|
+ + " coalesce(asc1.name, '未知状态') as statusName, "
|
|
|
+ + " case "
|
|
|
+ + " when lower(ap.flow_key) like '%articlechange%' then '变动审核' "
|
|
|
+ + " when lower(ap.flow_key) like '%articledisable%' then '停用审核' "
|
|
|
+ + " when lower(ap.flow_key) like '%articleenable%' then '启用审核' "
|
|
|
+ + " when lower(ap.flow_key) like '%articlerelease%' then '发布审核' "
|
|
|
+ + " else '文章审核' "
|
|
|
+ + " end as flowName, "
|
|
|
+ + " case "
|
|
|
+ + " when ap.ascode = 11 then 'warning' "
|
|
|
+ + " when ap.ascode in (41, 51) then 'success' "
|
|
|
+ + " when ap.ascode in (21, 31, 61) then 'danger' "
|
|
|
+ + " else 'info' "
|
|
|
+ + " end as statusType, "
|
|
|
+ + " date_format(ap.create_time, '%Y-%m-%d %H:%i:%s') as createTime, "
|
|
|
+ + " ifnull(date_format(ap.end_time, '%Y-%m-%d %H:%i:%s'), '') as endTime, "
|
|
|
+ + " ifnull((select au.auditid from audit au "
|
|
|
+ + " where au.applyid = ap.applyid and au.dcode <> 72 "
|
|
|
+ + " order by case "
|
|
|
+ + " when ap.ascode = 11 and au.audit_time is null and au.acode in (51, 101) then 0 "
|
|
|
+ + " when au.audit_time is not null then 1 "
|
|
|
+ + " else 2 end, "
|
|
|
+ + " ifnull(au.steps, 0) desc, au.auditid desc limit 1), 0) as auditid "
|
|
|
+ + " from apply ap "
|
|
|
+ + " left join apply_status_code asc1 on asc1.apply_status_code = ap.ascode "
|
|
|
+ + " where ap.dcode <> 72 and ap.table_name = 'article' and ap.table_key = 'articleid' "
|
|
|
+ + " and ap.table_key_value = :articleid "
|
|
|
+ + " order by case when ap.ascode = 11 then 0 else 1 end, ap.create_time desc, ap.applyid desc ";
|
|
|
+ SqlCommandImpl sqlCmd = new SqlCommandImpl(sql);
|
|
|
+ sqlCmd.setString("articleid", articleid);
|
|
|
+ return gdba.selectAsMapList(sqlCmd);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 文章信息
|
|
|
*
|
|
|
@@ -1022,6 +1057,7 @@ public class ArticleService extends BaseTransaction {
|
|
|
setRequestAttribute("navAllName", navAllName);
|
|
|
|
|
|
setRequestAttribute("copyNav", GsonUtil.toJson(articleCopyList));
|
|
|
+ setRequestAttribute("articleFlowList", GsonUtil.toJson(getArticleFlowList(gdba, article.getArticleid())));
|
|
|
WebsiteNavigation navigation = getWebsiteNavigationById(gdba, article.getNavigationid());
|
|
|
String articleContentForPreview;
|
|
|
try {
|