Browse Source

其他款项-出行物资 --> 自动审核 测试、代码优化

LEIYI 5 months ago
parent
commit
4b61ad16cf

+ 1 - 1
OASystem/OASystem.Infrastructure/Repositories/Groups/DecreasePaymentsRepository.cs

@@ -338,7 +338,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
                         {
                             CommitTran();
 
-                            var data = new { ccpId = grp_CreditCardPayment.Id, sign = 2,dataId = grp_CreditCardPayment.Id };
+                            var data = new { ccpId = grp_CreditCardPayment.Id, sign = 2,dataId = grp_Decrease.Id };
 
                             return new JsonView() { Code = 200, Msg = "修改成功!", Data = data };
                         }

+ 5 - 3
OASystem/OASystem.Infrastructure/Repositories/Groups/FeeAuditRepository.cs

@@ -49,7 +49,6 @@ namespace OASystem.Infrastructure.Repositories.Groups
             //币种验证  统一为currencycode三字码
             if (int.TryParse(_teamCurrency,out int currency)) _teamCurrency = setData.Find(x => x.Id == currency)?.Name ?? "";
 
-
             string costContentSql = $"Select * From Grp_GroupCost";
             var costContents =  _sqlSugar.SqlQueryable<GroupCostAuditView>(costContentSql).Where(x => x.IsDel == 0 && x.Diid == diId).ToList();
             if (costContents.Count < 1) { _view.Msg = $"团组成本信息未填写!"; return _view; }
@@ -384,7 +383,10 @@ namespace OASystem.Infrastructure.Repositories.Groups
                 }
 
                 var teNames = setData.Where(x => x.STid == 91).Select(x => x.Name).ToList();
-                var otherFeeDatas = _sqlSugar.Queryable<Grp_DecreasePayments>().Where(x => x.IsDel == 0 && teNames.Contains(x.PriceName)).ToList();
+                var otherFeeDatas = _sqlSugar.Queryable<Grp_DecreasePayments>()
+                    .InnerJoin<Grp_CreditCardPayment>((dp,ccp) => dp.Id == ccp.CId && ccp.CTable == 98 && ccp.IsDel == 0)
+                    .Where((dp, ccp) => dp.IsDel == 0 && teNames.Contains(dp.PriceName))
+                    .ToList();
                 decimal otherFeeCNYTotal = otherFeeDatas.Sum(x => x.FeeTotal);  //其他费用出行物资总金额
                 if (groupCostCNYTotal <= 0.00M)
                 {
@@ -399,7 +401,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
                     QuashAudit(currModule, diId, dataId);
                     return _view;
                 }
-
+                isAutoAudit = true;
                 //2.判断是否自动审核
                 if (isAutoAudit)
                 {