Explorar o código

城市区间费用 详情(实体类、接口) 代码编写

Lyyyi hai 1 mes
pai
achega
9ab5e3c013

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 359 - 210
OASystem/OASystem.Api/Controllers/GroupsController.cs


+ 6 - 0
OASystem/OASystem.Api/Middlewares/ExceptionHandlingMiddleware.cs

@@ -75,6 +75,12 @@ namespace OASystem.API.Middlewares
                 // 根据异常类型设置不同的响应状态码和消息
                 switch (exception)
                 {
+                    case BusinessException businessEx: // 新增:处理 BusinessException
+                        response.StatusCode = StatusCodes.Status400BadRequest;
+                        errorResponse.Msg = businessEx.Message;
+                        errorResponse.Code = StatusCodes.Status400BadRequest; // 设置正确的 HTTP 状态码
+                        break;
+
                     case SqlException sqlEx when sqlEx.Number == -2:
                         response.StatusCode = StatusCodes.Status503ServiceUnavailable;
                         errorResponse.Msg = "数据库连接超时,请稍后重试。";

+ 38 - 6
OASystem/OASystem.Domain/Entities/Customer/Crm_DeleClient.cs

@@ -702,13 +702,45 @@ namespace OASystem.Domain.Entities.Customer
         public string MilSkill { get; set; }
 
         /// <summary>
-        /// 服役时间(单位:xxxx年xx月xx日) 起
+        /// 服役时间(单位:xxxx年xx月xx日) 起
         /// </summary>
-        public DateTime? ServeTimeBegin { get; set; }
-        /// <summary>
-        /// 服役时间(单位:xxxx年xx月xx日)止
-        /// </summary>
-        public DateTime? ServeTimeEnd { get; set; }
+        public string ServeDuration { get; set; }
+
+    }
+
+    /// <summary>
+    /// 拒签记录
+    /// </summary>
+    public class VisaRefusalRecord
+    {
+        public string Country { get; set; }
+
+        public DateTime Date { get; set; }
+
+        public string Reason { get; set; }
+    }
+
+    /// <summary>
+    /// 旅行历史
+    /// </summary>
+    public class TravelHistory
+    {
+        public string Country { get; set; }
+
+        public DateTime ArrivalDate { get; set; }
+
+        public DateTime DepartureDate { get; set; }
+
+        public string VisaType { get; set; }
+    }
+
+    /// <summary>
+    /// 已出访的国家
+    /// </summary>
+    public class CountryVisited
+    {
+        public string Country { get; set; }
 
+        public string VisitDate { get; set; }
     }
 }

+ 8 - 0
OASystem/OASystem.Domain/Entities/Groups/Grp_EnterExitCost.cs

@@ -280,5 +280,13 @@
         /// </summary>
         [SugarColumn(IsNullable = true, ColumnDataType = "varchar(30)")]
         public string LastUpdateTime { get; set; }
+
+        /// <summary>
+        /// 城市区间费用详情 
+        /// json 格式存储 CityIntervalInfo
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(max)")]
+        public string CityIntervalFeeDetails { get; set; }
+
     }
 }

+ 125 - 0
OASystem/OASystem.Domain/ViewModels/Groups/EnterExitCostView.cs

@@ -1290,4 +1290,129 @@ namespace OASystem.Domain.ViewModels.Groups
         /// </summary>
         public string LastUpdTime { get; set; }
     }
+
+    #region 境外用车
+
+    /// <summary>
+    /// 城市区间费用详情
+    /// </summary>
+    public class CityIntervalInfo
+    {
+        /// <summary>
+        /// 接送机费用合计
+        /// </summary>
+        public decimal APTFeeTotal { get; set; } = 0.00m;
+
+        /// <summary>
+        /// 接送机费用详情
+        /// </summary>
+        public List<RoundTripTransferInfo> APTFeeDetails { get; set; }
+
+        /// <summary>
+        /// 拉车费用合计
+        /// </summary>
+        public decimal PullCartFeeTotal { get; set; } = 0.00m;
+
+        /// <summary>
+        /// 拉车费用详情
+        /// </summary>
+        public List<PullCartInfo> PullCartFeeDetails { get; set; }
+
+        /// <summary>
+        /// 火车费用合计
+        /// </summary>
+        public decimal TrainFeeTotal { get; set; } = 0.00m;
+
+        /// <summary>
+        /// 火车费用详情
+        /// </summary>
+        public List<TrainInfo> TrainFeeDetails { get; set; }
+
+        /// <summary>
+        /// 城市机票费用合计
+        /// </summary>
+        public decimal CityAirTicketFeeTotal { get; set; } = 0.00m;
+
+        /// <summary>
+        /// 城市机票费用详情
+        /// </summary>
+        public List<CityAirTicketInfo> CityAirTicketFeeDetails { get; set; }
+    }
+
+    /// <summary>
+    /// 接送机
+    /// </summary>
+    public class RoundTripTransferInfo : CityIntervalBase
+    {
+        public int No { get; set; }
+
+        /// <summary>
+        /// 境外用车服务类型(接送机) Id
+        /// </summary>
+        public int OvId { get; set; }
+
+        /// <summary>
+        /// 导游成本
+        /// </summary>
+        public decimal GuideCost { get; set; }
+
+        /// <summary>
+        /// 其他成本
+        /// </summary>
+        public decimal OtherCost { get; set; }
+
+        /// <summary>
+        /// 服务次数
+        /// </summary>
+        public int ServiceCount { get; set; }
+
+    }
+
+    /// <summary>
+    /// 拉车
+    /// </summary>
+    public class PullCartInfo : CityIntervalBase { }
+
+    /// <summary>
+    /// 火车
+    /// </summary>
+    public class TrainInfo : CityIntervalBase { }
+
+    /// <summary>
+    /// 城市机票
+    /// </summary>
+    public class CityAirTicketInfo : CityIntervalBase { }
+
+
+    public class CityIntervalBase
+    {
+        /// <summary>
+        /// 成本
+        /// </summary>
+        public decimal Cost { get; set; }
+
+        /// <summary>
+        /// 系数
+        /// </summary>
+        public decimal Coefficient { get; set; }
+
+        /// <summary>
+        /// 国家、城市 成本币种
+        /// </summary>
+        public string CurrencyName { get; set; }
+
+        /// <summary>
+        /// 报价
+        /// </summary>
+        public decimal Quote { get; set; }
+
+        /// <summary>
+        /// 备注
+        /// </summary>
+        public string Remark { get; set; }
+    }
+
+
+    #endregion
+
 }

+ 10 - 8
OASystem/OASystem.Infrastructure/Repositories/Groups/ProcessOverviewRepository.cs

@@ -1391,13 +1391,13 @@ namespace OASystem.Infrastructure.Repositories.Groups
         public async Task<Result> SetNodeInfoAsync(ConfProcessSetActualDoneDto dto)
         {
             //参与人验证
-            if (dto.Participators?.Count < 1)
-            {
-                throw new BusinessException("参与人不能为空。");
-            }
+            if (dto.Participators?.Any() != true) throw new BusinessException("参与人不能为空。");
 
-            int nodeId = dto.NodeId;
             var isDtNul = DateTime.TryParse(dto.ActualDone, out DateTime actualDone);
+
+            if (!isDtNul) throw new BusinessException("实际操作时间为空或者格式不对。");
+
+            int nodeId = dto.NodeId;
             int currUserId = dto.CurrUserId;
             bool isFileUp = dto.IsFileUp;
 
@@ -1420,7 +1420,9 @@ namespace OASystem.Infrastructure.Repositories.Groups
                 OverallStatus = node.OverallStatus,
                 Operator = node.Operator,
                 OperationTime = node.OperationTime,
-                IsCurrent = node.IsCurrent
+                IsCurrent = node.IsCurrent,
+                IsFileUp = node.IsFileUp,
+                Participator = node.Participator,
             };
 
             if (isDtNul)
@@ -1429,13 +1431,13 @@ namespace OASystem.Infrastructure.Repositories.Groups
             }
 
             node.IsFileUp = isFileUp;
-            node.Participator = JsonConvert.SerializeObject(node.Participators);
+            node.Participator = JsonConvert.SerializeObject(dto.Participators);
 
             // 3. 保存节点更新
             await _sqlSugar.Updateable(node)
                 .UpdateColumns(n => new
                 {
-                    ActualDone = isDtNul ? node.ActualDone : null,
+                    n.ActualDone,
                     n.Participator,
                     n.IsFileUp,
                 })