|
@@ -91,11 +91,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
SELECT xx1.* FROM (
|
|
SELECT xx1.* FROM (
|
|
|
SELECT xx.id,xx.applyNum,xx.subscriber,xx.subName,xx.chemicalNames,xx.createTime,xx.overTime,xx.approvalContent,xx.approvalStatus,
|
|
SELECT xx.id,xx.applyNum,xx.subscriber,xx.subName,xx.chemicalNames,xx.createTime,xx.overTime,xx.approvalContent,xx.approvalStatus,
|
|
|
CASE WHEN xx.approvalStatus = 0 THEN
|
|
CASE WHEN xx.approvalStatus = 0 THEN
|
|
|
- (SELECT GROUP_CONCAT(ur.user_id,';',ur.nick_name) FROM sys_user ur WHERE FIND_IN_SET(ur.user_id,xx.currentApprover))
|
|
|
|
|
|
|
+ (SELECT GROUP_CONCAT(ur.user_id,';',ur.nick_name) FROM sys_user ur
|
|
|
|
|
+ WHERE ur.`user_id`
|
|
|
|
|
+ IN (
|
|
|
|
|
+ SELECT
|
|
|
|
|
+ SUBSTRING_INDEX(SUBSTRING_INDEX(xx.currentApprover,',', b.help_topic_id + 1), ',', -1) result
|
|
|
|
|
+ FROM
|
|
|
|
|
+ mysql.help_topic b
|
|
|
|
|
+ WHERE
|
|
|
|
|
+ b.help_topic_id < (LENGTH(xx.currentApprover) - LENGTH(REPLACE(xx.currentApprover, ',', '')) + 1)
|
|
|
|
|
+ )
|
|
|
|
|
+ )
|
|
|
ELSE ''
|
|
ELSE ''
|
|
|
END currentApprover,
|
|
END currentApprover,
|
|
|
CASE WHEN xx.approvalStatus = 3 THEN ''
|
|
CASE WHEN xx.approvalStatus = 3 THEN ''
|
|
|
- ELSE (SELECT GROUP_CONCAT(ur.user_id,';',ur.nick_name) FROM sys_user ur WHERE FIND_IN_SET(ur.user_id,xx.historyApprover))
|
|
|
|
|
|
|
+ ELSE (SELECT GROUP_CONCAT(ur.user_id,';',ur.nick_name) FROM sys_user ur
|
|
|
|
|
+ WHERE ur.`user_id`
|
|
|
|
|
+ IN (
|
|
|
|
|
+ SELECT
|
|
|
|
|
+ SUBSTRING_INDEX(SUBSTRING_INDEX(xx.historyApprover,',', b.help_topic_id + 1), ',', -1) result
|
|
|
|
|
+ FROM
|
|
|
|
|
+ mysql.help_topic b
|
|
|
|
|
+ WHERE
|
|
|
|
|
+ b.help_topic_id < (LENGTH(xx.historyApprover) - LENGTH(REPLACE(xx.historyApprover, ',', '')) + 1)
|
|
|
|
|
+ )
|
|
|
|
|
+ )
|
|
|
END historyApprover,
|
|
END historyApprover,
|
|
|
xx.currentApprover currentApproverIds,xx.userId
|
|
xx.currentApprover currentApproverIds,xx.userId
|
|
|
FROM (
|
|
FROM (
|
|
@@ -168,11 +188,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
SELECT xx1.* FROM (
|
|
SELECT xx1.* FROM (
|
|
|
SELECT xx.id,xx.applyNum,xx.subscriber,xx.subName,xx.chemicalNames,xx.createTime,xx.overTime,xx.approvalContent,xx.approvalStatus,
|
|
SELECT xx.id,xx.applyNum,xx.subscriber,xx.subName,xx.chemicalNames,xx.createTime,xx.overTime,xx.approvalContent,xx.approvalStatus,
|
|
|
CASE WHEN xx.approvalStatus = 0 THEN
|
|
CASE WHEN xx.approvalStatus = 0 THEN
|
|
|
- (SELECT GROUP_CONCAT(ur.user_id,';',ur.nick_name) FROM sys_user ur WHERE FIND_IN_SET(ur.user_id,xx.currentApprover))
|
|
|
|
|
|
|
+ (SELECT GROUP_CONCAT(ur.user_id,';',ur.nick_name) FROM sys_user ur
|
|
|
|
|
+ WHERE ur.`user_id`
|
|
|
|
|
+ IN (
|
|
|
|
|
+ SELECT
|
|
|
|
|
+ SUBSTRING_INDEX(SUBSTRING_INDEX(xx.currentApprover,',', b.help_topic_id + 1), ',', -1) result
|
|
|
|
|
+ FROM
|
|
|
|
|
+ mysql.help_topic b
|
|
|
|
|
+ WHERE
|
|
|
|
|
+ b.help_topic_id < (LENGTH(xx.currentApprover) - LENGTH(REPLACE(xx.currentApprover, ',', '')) + 1)
|
|
|
|
|
+ )
|
|
|
|
|
+ )
|
|
|
ELSE ''
|
|
ELSE ''
|
|
|
END currentApprover,
|
|
END currentApprover,
|
|
|
CASE WHEN xx.approvalStatus = 3 THEN ''
|
|
CASE WHEN xx.approvalStatus = 3 THEN ''
|
|
|
- ELSE (SELECT GROUP_CONCAT(ur.user_id,';',ur.nick_name) FROM sys_user ur WHERE FIND_IN_SET(ur.user_id,xx.historyApprover))
|
|
|
|
|
|
|
+ ELSE (SELECT GROUP_CONCAT(ur.user_id,';',ur.nick_name) FROM sys_user ur
|
|
|
|
|
+ WHERE ur.`user_id`
|
|
|
|
|
+ IN (
|
|
|
|
|
+ SELECT
|
|
|
|
|
+ SUBSTRING_INDEX(SUBSTRING_INDEX(xx.historyApprover,',', b.help_topic_id + 1), ',', -1) result
|
|
|
|
|
+ FROM
|
|
|
|
|
+ mysql.help_topic b
|
|
|
|
|
+ WHERE
|
|
|
|
|
+ b.help_topic_id < (LENGTH(xx.historyApprover) - LENGTH(REPLACE(xx.historyApprover, ',', '')) + 1)
|
|
|
|
|
+ )
|
|
|
|
|
+ )
|
|
|
END historyApprover,
|
|
END historyApprover,
|
|
|
xx.currentApprover currentApproverIds,xx.userId
|
|
xx.currentApprover currentApproverIds,xx.userId
|
|
|
FROM (
|
|
FROM (
|