|
|
@@ -960,6 +960,11 @@ 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, "
|
|
|
+ + " coalesce(initp.name, '未知') as initiatorName, "
|
|
|
+ + " coalesce((select group_concat(distinct cp.name order by cp.name separator '、') "
|
|
|
+ + " from audit cau join person cp on cp.personid = cau.personid "
|
|
|
+ + " where ap.ascode = 11 and cau.applyid = ap.applyid and cau.dcode = 31 "
|
|
|
+ + " and cau.audit_time is null and cau.acode in (51, 101)), '') as currentAuditors, "
|
|
|
+ " case "
|
|
|
+ " when lower(ap.flow_key) like '%articlechange%' then '变动审核' "
|
|
|
+ " when lower(ap.flow_key) like '%articledisable%' then '停用审核' "
|
|
|
@@ -978,12 +983,13 @@ public class ArticleService extends BaseTransaction {
|
|
|
+ " 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 ap.ascode = 11 and au.dcode = 31 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 "
|
|
|
+ + " left join person initp on initp.personid = ap.personid "
|
|
|
+ " 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 ";
|