|
@@ -29,29 +29,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
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
|
|
(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)
|
|
|
|
|
- )
|
|
|
|
|
|
|
+ WHERE FIND_IN_SET(ur.`user_id` ,xx.currentApprover )
|
|
|
)
|
|
)
|
|
|
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
|
|
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)
|
|
|
|
|
- )
|
|
|
|
|
|
|
+ WHERE FIND_IN_SET(ur.`user_id` ,xx.historyApprover)
|
|
|
)
|
|
)
|
|
|
END historyApprover,
|
|
END historyApprover,
|
|
|
xx.currentApprover currentApproverIds,xx.userId
|
|
xx.currentApprover currentApproverIds,xx.userId
|
|
@@ -127,29 +111,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
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
|
|
(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)
|
|
|
|
|
- )
|
|
|
|
|
|
|
+ WHERE FIND_IN_SET(ur.`user_id` ,xx.currentApprover)
|
|
|
)
|
|
)
|
|
|
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
|
|
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)
|
|
|
|
|
- )
|
|
|
|
|
|
|
+ WHERE FIND_IN_SET(ur.`user_id` ,xx.historyApprover)
|
|
|
)
|
|
)
|
|
|
END historyApprover,
|
|
END historyApprover,
|
|
|
xx.currentApprover currentApproverIds,xx.userId
|
|
xx.currentApprover currentApproverIds,xx.userId
|