|
@@ -38,24 +38,16 @@ namespace OASystem.Infrastructure.Repositories.Groups
|
|
|
Result result = new Result() { Code = -2, Msg = "未知错误" };
|
|
|
try
|
|
|
{
|
|
|
- string UserId = "";
|
|
|
- List<Grp_GroupsTaskAssignment> gtaUIdList = _sqlSugar.Queryable<Grp_GroupsTaskAssignment>().Where(a => a.DIId == dto.DiId && a.IsDel == 0 && a.CTId == 98).ToList();
|
|
|
- foreach (Grp_GroupsTaskAssignment gta in gtaUIdList)
|
|
|
- UserId += gta.UId + ",";
|
|
|
+ //string UserId = "0";
|
|
|
+ //List<Grp_GroupsTaskAssignment> gtaUIdList = _sqlSugar.Queryable<Grp_GroupsTaskAssignment>().Where(a => a.DIId == dto.DiId && a.IsDel == 0 && a.CTId == 98).ToList();
|
|
|
+ //UserId = string.Join(",", gtaUIdList.Select(it => it.UId).ToList());
|
|
|
|
|
|
- if (!string.IsNullOrWhiteSpace(UserId))
|
|
|
- {
|
|
|
- UserId = UserId.Substring(0, UserId.Length - 1);
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- UserId = "0";
|
|
|
- }
|
|
|
string sql = string.Format(@"select Id,DiId,PriceName,Price,(select name from Sys_SetData where id=s.Currency) as Currency,FilePath,
|
|
|
(select CnName from Sys_Users where Id=s.CreateUserId) as 'CreateUserName',CreateTime,(select IsAuditGM from
|
|
|
- Grp_CreditCardPayment where CTable=98 and CId=s.Id and IsDel=0) as 'isAudit' from Grp_DecreasePayments s where DIID={0} and IsDel=0 and s.CreateUserId in ({1}) ", dto.DiId,UserId);
|
|
|
+ Grp_CreditCardPayment where CTable=98 and CId=s.Id and IsDel=0) as 'isAudit' from Grp_DecreasePayments s
|
|
|
+ where DIID={0} and IsDel=0 and s.CreateUserId in ({1}) ", dto.DiId, dto.UserId);
|
|
|
List<DecreasePaymentsView> _DecreasePayments = await _sqlSugar.SqlQueryable<DecreasePaymentsView>(sql).ToListAsync();
|
|
|
- if (_DecreasePayments.Count != 0)
|
|
|
+ if (_DecreasePayments.Count > 0)
|
|
|
{
|
|
|
result = new Result() { Code = 0, Msg = "查询成功!", Data = _DecreasePayments };
|
|
|
}
|
|
@@ -66,7 +58,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
|
|
|
}
|
|
|
catch (Exception ex)
|
|
|
{
|
|
|
- result = new Result() { Code = -2, Msg = "未知错误" };
|
|
|
+ result = new Result() { Code = -2, Msg = ex.Message };
|
|
|
}
|
|
|
return result;
|
|
|
}
|