Przeglądaj źródła

增减款项 add/edit 参数更改

leiy 9 miesięcy temu
rodzic
commit
7fe0dd24d1

Plik diff jest za duży
+ 465 - 416
OASystem/OASystem.Api/Controllers/FinancialController.cs


+ 16 - 22
OASystem/OASystem.Api/Controllers/GroupsController.cs

@@ -2940,7 +2940,7 @@ namespace OASystem.API.Controllers
                 return Ok(JsonView(false, "程序错误!"));
             }
         }
-        
+
         /// <summary>
         /// 团组增减款项操作(Status:1.新增,2.修改)
         /// </summary>
@@ -2950,34 +2950,28 @@ namespace OASystem.API.Controllers
         [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
         public async Task<IActionResult> OpDecreasePayments(DecreasePaymentsOpDto dto)
         {
-            try
-            {
-                Result groupData = await _decreasePaymentsRep.OpDecreasePayments(dto);
-                if (groupData.Code != 0)
-                {
-                    return Ok(JsonView(false, groupData.Msg));
-                }
 
-                #region 应用推送
-                try
-                {
-                    int ccpId = groupData.Data.GetType().GetProperty("ccpId").GetValue(groupData.Data, null);
-                    int sign = groupData.Data.GetType().GetProperty("sign").GetValue(groupData.Data, null);
+            Result groupData = await _decreasePaymentsRep.OpDecreasePayments(dto);
+            if (groupData.Code != 0)
+            {
+                return Ok(JsonView(false, groupData.Msg));
+            }
 
-                    await AppNoticeLibrary.SendChatMsg_GroupStatus_ApplyFee(ccpId, sign, QiyeWeChatEnum.GuoJiaoLeaderChat);
-                }
-                catch (Exception ex)
-                {
-                }
-                #endregion
+            #region 应用推送
+            try
+            {
+                int ccpId = groupData.Data.GetType().GetProperty("ccpId").GetValue(groupData.Data, null);
+                int sign = groupData.Data.GetType().GetProperty("sign").GetValue(groupData.Data, null);
 
-                return Ok(JsonView(true, groupData.Msg, groupData.Data));
+                await AppNoticeLibrary.SendChatMsg_GroupStatus_ApplyFee(ccpId, sign, QiyeWeChatEnum.GuoJiaoLeaderChat);
             }
             catch (Exception ex)
             {
-                return Ok(JsonView(false, "程序错误!"));
-                throw;
             }
+            #endregion
+
+            return Ok(JsonView(true, groupData.Msg, groupData.Data));
+
         }
         /// <summary>
         /// 团组增减款项操作 删除

+ 1 - 0
OASystem/OASystem.Api/OASystem.API.csproj

@@ -28,6 +28,7 @@
     <PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="12.0.0" />
     <PackageReference Include="Betalgo.OpenAI.GPT3" Version="6.8.3" />
     <PackageReference Include="BouncyCastle.NetCore" Version="1.8.8" />
+    <PackageReference Include="EPPlus" Version="7.1.3" />
     <PackageReference Include="Flurl.Http" Version="3.2.4" />
     <PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.11" />
     <PackageReference Include="NPOI" Version="2.7.0" />

+ 1 - 1
OASystem/OASystem.Domain/Dtos/Groups/DecreasePaymentsDto.cs

@@ -63,7 +63,7 @@ namespace OASystem.Domain.Dtos.Groups
         /// <summary>
         /// 供应商类型
         /// </summary>
-        public int SupplierTypeId { get; set; }
+        public int SupplierTypeId { get; set; } = 0;
 
         /// <summary>
         /// 供应商名称

+ 0 - 9
OASystem/OASystem.Infrastructure/Repositories/Groups/DecreasePaymentsRepository.cs

@@ -39,15 +39,6 @@ namespace OASystem.Infrastructure.Repositories.Groups
             Result result = new Result() { Code = -2, Msg = "未知错误" };
             try
             {
-                //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());
-
-                //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);