Procházet zdrojové kódy

Merge branch 'develop' of http://132.232.92.186:3000/XinXiBu/OA2023 into develop

leiy před 10 měsíci
rodič
revize
4c530f7da7

+ 44 - 0
OASystem/OASystem.Api/Controllers/GroupsController.cs

@@ -7739,6 +7739,32 @@ namespace OASystem.API.Controllers
             JsonView jw = null;
             bool isTrue = false;
 
+            #region 复制团组成本
+            //if (dto.Diid == 2581)
+            //{
+            //    dto.Diid = 2599;
+            //    dto.CheckBoxs.ForEach(x =>
+            //    {
+            //        x.Diid = 2599;
+            //    });
+
+            //    dto.GroupCosts.ForEach(x =>
+            //    {
+            //        x.Diid = 2599;
+            //    });
+
+            //    dto.CostTypeHotelNumbers.ForEach(x =>
+            //    {
+            //        x.Diid = 2599;
+            //    });
+
+            //    dto.GroupCostParameters.ForEach(x =>
+            //    {
+            //        x.DiId = 2599;
+            //    });
+            //}
+            #endregion
+
             var Grp_groups = _mapper.Map<List<Grp_GroupCost>>(dto.GroupCosts);
             Grp_groups.ForEach(x => { x.CreateUserId = dto.Userid; x.CreateTime = DateTime.Now; }); //.ToString("yyyy-MM-dd HH:mm:ss")
             var Grp_CheckBoxs = _mapper.Map<List<Grp_CheckBoxs>>(dto.CheckBoxs);
@@ -12073,6 +12099,24 @@ ORDER by  gctggrc.id DESC
 
         #endregion
 
+        /// <summary>
+        /// 报批行程初始化
+        /// </summary>
+        /// <param name="dto"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public IActionResult ApprovalJourneyInit(ApprovalJourneyDto dto)
+        {
+            const int chiNumber = 5;
+            var jw = JsonView(false);
+            if (dto.Diid == -1)
+            {
+                dto.Diid = _sqlSugar.Queryable<Grp_DelegationInfo>().First(x => x.IsDel == 0).Id;
+            }
+            return Ok(jw);
+        }
+
+
 
         //        /// <summary>
         //        /// 

+ 14 - 0
OASystem/OASystem.Domain/Dtos/Groups/ApprovalJourneyDto.cs

@@ -0,0 +1,14 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace OASystem.Domain.Dtos.Groups
+{
+    public class ApprovalJourneyDto
+    {
+        public int Diid { get; set; }
+
+    }
+}

+ 7 - 3
OASystem/OASystem.Infrastructure/Repositories/Resource/OfficialActivitiesRepository.cs

@@ -239,8 +239,13 @@ namespace OASystem.Infrastructure.Repositories.Resource
                             return  new Result() { Code = -1, Msg = "添加失败!" };
                         }
                     }
-
-                   
+                    else
+                    {
+                        _sqlSugar.CommitTran();
+                        result.Code = 0;
+                        result.Msg = "添加成功!";
+                        return result;
+                    }
                 }
             }
             else if (dto.Status == 2)//修改
@@ -281,7 +286,6 @@ namespace OASystem.Infrastructure.Repositories.Resource
             {
                 return new Result() { Code = -1, Msg = "请传入Status参数,1添加 2修改!" };
             }
-            return result;
         }
 
         public async Task<Result> PostReqReqSampleTips(string country, string Area,string client)