|
@@ -42,10 +42,22 @@ namespace OASystem.Infrastructure.Repositories.Groups
|
|
|
//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());
|
|
|
|
|
|
- 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 DiId = {0} and IsDel=0) as 'isAudit' from Grp_DecreasePayments s
|
|
|
- where DIID={0} and IsDel=0 and s.CreateUserId in ({1}) ", dto.DiId, dto.UserId);
|
|
|
+ //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 DiId = {0} and IsDel=0) as 'isAudit' from Grp_DecreasePayments s
|
|
|
+ // where DIID={0} and IsDel=0 and s.CreateUserId in ({1}) ", dto.DiId, dto.UserId);
|
|
|
+
|
|
|
+ string sqlWhere = "";
|
|
|
+ if (dto.IsPaySign != -1) {
|
|
|
+ sqlWhere += string.Format(@" And ccp.IsPay = {0} ", dto.IsPaySign);
|
|
|
+ }
|
|
|
+
|
|
|
+ string sql = string.Format(@" Select gdp.Id,gdp.DiId,gdp.PriceName,gdp.Price,sd1.[Name] as Currency,gdp.FilePath,su.CnName as CreateUserName,
|
|
|
+ccp.IsAuditDM as isAudit,ccp.IsPay
|
|
|
+From Grp_DecreasePayments as gdp With(Nolock) Left Join Grp_CreditCardPayment as ccp With(Nolock) On gdp.Id = ccp.CId
|
|
|
+Left Join Sys_SetData as sd1 On gdp.Currency = sd1.Id
|
|
|
+Left Join Sys_Users as su On gdp.CreateUserId = su.Id
|
|
|
+Where gdp.DiId = {0} And ccp.CTable = 98 {2} And ccp.IsDel = 0 And gdp.IsDel = 0 And gdp.CreateUserId in ({1}) ", dto.DiId, dto.UserId, sqlWhere);
|
|
|
List<DecreasePaymentsView> _DecreasePayments = await _sqlSugar.SqlQueryable<DecreasePaymentsView>(sql).ToListAsync();
|
|
|
if (_DecreasePayments.Count > 0)
|
|
|
{
|