Browse Source

添加超支系数默认

yuanrf 8 months ago
parent
commit
942a0ac66a
1 changed files with 81 additions and 0 deletions
  1. 81 0
      OASystem/OASystem.Api/Controllers/FinancialController.cs

+ 81 - 0
OASystem/OASystem.Api/Controllers/FinancialController.cs

@@ -3908,6 +3908,87 @@ Group by PriceType ", dto.diId);
             return Ok(jw);
         }
 
+        /// <summary>
+        /// 获取超支系数配置 
+        /// </summary>
+        /// <returns></returns>
+        [HttpPost]
+        public IActionResult QueryCoefficientConfig()
+        {
+            var arr =  _sqlSugar.Queryable<Sys_SetData>().Where(x => x.STid == 80 && x.IsDel == 0).ToList();
+
+            var carCoefficient = new int[] { 1050 }; //2.4
+
+            var menpiaoCoefficient = new int[] { 1086 }; // 1.2
+
+            var airCoefficient = new int[] { 1035, 1036 }; // 2.0
+
+            var HotelCoefficient = new int[] { 1044, 1045, 1046, 1041, 1042, 1043, 1038 }; // 1.5
+
+            var fanyiCoefficient = new int[] { 1087 }; // 1.5
+
+            var resultArr = new
+                 ArrayList();
+
+            foreach (var item in arr)
+            {
+                var a = new { coefficient = 1M, id = 0 };
+                if (carCoefficient.Contains(item.Id))
+                {
+                    a = a with
+                    {
+                        coefficient = 2.4M,
+                        id = item.Id
+                    };
+                }
+                else if (menpiaoCoefficient.Contains(item.Id))
+                {
+                    a = a with
+                    {
+                        coefficient = 1.2M,
+                        id = item.Id
+                    };
+                }
+                else if (airCoefficient.Contains(item.Id))
+                {
+                    a = a with
+                    {
+                        coefficient = 2.0M,
+                        id = item.Id
+                    };
+                }
+                else if (HotelCoefficient.Contains(item.Id))
+                {
+                    a = a with
+                    {
+                        coefficient = 1.5M,
+                        id = item.Id
+                    };
+                }
+                else if (fanyiCoefficient.Contains(item.Id))
+                {
+                    a = a with
+                    {
+                        coefficient = 1.5M,
+                        id = item.Id
+                    };
+                }
+                else
+                {
+                    a = a with
+                    {
+                        coefficient = 1M,
+                        id = item.Id
+                    };
+                }
+
+                resultArr.Add(a);
+            }
+
+
+            return Ok(JsonView(true, "获取成功!", resultArr));
+        }
+
         #endregion
 
         #region 信用卡对账