浏览代码

报批行程Api添加 , 公务出访保存修改。

yuanrf 8 月之前
父节点
当前提交
493a86888f

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

@@ -12099,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)