|
@@ -103,11 +103,13 @@ namespace GxPress.Repository.Implement.WorkFlow
|
|
|
string sql = $@"SELECT
|
|
|
a.Id,a.FlowId
|
|
|
FROM
|
|
|
- ccpph.tede_flow_todo a
|
|
|
+ tede_flow_todo a
|
|
|
INNER JOIN
|
|
|
- ccpph.tede_process b ON a.ProcessId = b.id
|
|
|
+ tede_process b ON a.ProcessId = b.id
|
|
|
INNER JOIN
|
|
|
- ccpph.tede_flow c ON c.Id = a.FlowId
|
|
|
+ tede_flow c ON c.Id = a.FlowId
|
|
|
+ INNER JOIN
|
|
|
+ tede_user d on d.UserId=a.UserId
|
|
|
WHERE
|
|
|
a.UserId = {userId}
|
|
|
AND a.Type = '{type}'";
|
|
@@ -120,13 +122,13 @@ namespace GxPress.Repository.Implement.WorkFlow
|
|
|
OR a.FlowId IN (SELECT
|
|
|
FlowId
|
|
|
FROM
|
|
|
- ccpph.tede_flow_field_value
|
|
|
+ tede_flow_field_value
|
|
|
WHERE
|
|
|
StringValues LIKE '%{request.Keyword}%')
|
|
|
OR c.UserId IN (SELECT
|
|
|
Id
|
|
|
FROM
|
|
|
- ccpph.tede_user
|
|
|
+ tede_user
|
|
|
WHERE
|
|
|
Name LIKE '%{request.Keyword}%')
|
|
|
or a.FlowId In(SELECT
|
|
@@ -233,11 +235,11 @@ namespace GxPress.Repository.Implement.WorkFlow
|
|
|
string sql = $@"SELECT
|
|
|
count(1)
|
|
|
FROM
|
|
|
- ccpph.tede_flow_todo a
|
|
|
+ tede_flow_todo a
|
|
|
INNER JOIN
|
|
|
- ccpph.tede_process b ON a.ProcessId = b.id
|
|
|
+ tede_process b ON a.ProcessId = b.id
|
|
|
INNER JOIN
|
|
|
- ccpph.tede_flow c ON c.Id = a.FlowId
|
|
|
+ tede_flow c ON c.Id = a.FlowId
|
|
|
WHERE
|
|
|
a.UserId = {userId}
|
|
|
AND a.Type = '{type}'";
|
|
@@ -250,13 +252,13 @@ namespace GxPress.Repository.Implement.WorkFlow
|
|
|
OR a.FlowId IN (SELECT
|
|
|
FlowId
|
|
|
FROM
|
|
|
- ccpph.tede_flow_field_value
|
|
|
+ tede_flow_field_value
|
|
|
WHERE
|
|
|
StringValues LIKE '%{request.Keyword}%')
|
|
|
OR c.UserId IN (SELECT
|
|
|
Id
|
|
|
FROM
|
|
|
- ccpph.tede_user
|
|
|
+ tede_user
|
|
|
WHERE
|
|
|
Name LIKE '%{request.Keyword}%') or a.FlowId In(SELECT
|
|
|
FlowId
|
|
@@ -304,11 +306,11 @@ namespace GxPress.Repository.Implement.WorkFlow
|
|
|
string sql = $@"SELECT
|
|
|
count(1)
|
|
|
FROM
|
|
|
- ccpph.tede_flow_todo a
|
|
|
+ tede_flow_todo a
|
|
|
INNER JOIN
|
|
|
- ccpph.tede_process b ON a.ProcessId = b.id
|
|
|
+ tede_process b ON a.ProcessId = b.id
|
|
|
INNER JOIN
|
|
|
- ccpph.tede_flow c ON c.Id = a.FlowId
|
|
|
+ tede_flow c ON c.Id = a.FlowId
|
|
|
WHERE
|
|
|
a.UserId = {userId}
|
|
|
AND a.Type = '{type}'";
|
|
@@ -321,13 +323,13 @@ namespace GxPress.Repository.Implement.WorkFlow
|
|
|
OR a.FlowId IN (SELECT
|
|
|
FlowId
|
|
|
FROM
|
|
|
- ccpph.tede_flow_field_value
|
|
|
+ tede_flow_field_value
|
|
|
WHERE
|
|
|
StringValues LIKE '%{request.Keyword}%')
|
|
|
OR c.UserId IN (SELECT
|
|
|
Id
|
|
|
FROM
|
|
|
- ccpph.tede_user
|
|
|
+ tede_user
|
|
|
WHERE
|
|
|
Name LIKE '%{request.Keyword}%') or a.FlowId In(SELECT
|
|
|
FlowId
|
|
@@ -466,11 +468,11 @@ namespace GxPress.Repository.Implement.WorkFlow
|
|
|
string sql = $@"SELECT
|
|
|
a.Id,a.FlowId
|
|
|
FROM
|
|
|
- ccpph.tede_flow_todo a
|
|
|
+ tede_flow_todo a
|
|
|
INNER JOIN
|
|
|
- ccpph.tede_process b ON a.ProcessId = b.id
|
|
|
+ tede_process b ON a.ProcessId = b.id
|
|
|
INNER JOIN
|
|
|
- ccpph.tede_flow c ON c.Id = a.FlowId
|
|
|
+ tede_flow c ON c.Id = a.FlowId
|
|
|
WHERE
|
|
|
a.UserId = {userId}
|
|
|
AND a.Type = '{type}'";
|
|
@@ -483,13 +485,13 @@ namespace GxPress.Repository.Implement.WorkFlow
|
|
|
OR a.FlowId IN (SELECT
|
|
|
FlowId
|
|
|
FROM
|
|
|
- ccpph.tede_flow_field_value
|
|
|
+ tede_flow_field_value
|
|
|
WHERE
|
|
|
StringValues LIKE '%{request.Keyword}%')
|
|
|
OR c.UserId IN (SELECT
|
|
|
Id
|
|
|
FROM
|
|
|
- ccpph.tede_user
|
|
|
+ tede_user
|
|
|
WHERE
|
|
|
Name LIKE '%{request.Keyword}%') or a.FlowId In(SELECT
|
|
|
FlowId
|
|
@@ -769,7 +771,7 @@ namespace GxPress.Repository.Implement.WorkFlow
|
|
|
/// <returns></returns>
|
|
|
public async Task<int> FlowCcUReadCountAsync(int userId)
|
|
|
{
|
|
|
- string sql = $"SELECT count(1) FROM ccpph.tede_flow_todo a where a.UserId={userId} and a.Type='CarbonCopy' and a.IsRead=0 and a.IsDone=0 and a.ProcessId=(select Id from ccpph.tede_process where Id=a.ProcessId)";
|
|
|
+ string sql = $"SELECT count(1) FROM tede_flow_todo a where a.UserId={userId} and a.Type='CarbonCopy' and a.IsRead=0 and a.IsDone=0 and a.ProcessId=(select Id from tede_process where Id=a.ProcessId)";
|
|
|
var databaseType = StringUtils.ToEnum<DatabaseType>(_databaseTypeStr, DatabaseType.MySql);
|
|
|
var database = new Database(databaseType, _connectionString);
|
|
|
var connection = database.GetConnection();
|