Browse Source

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

leiy 9 months ago
parent
commit
e91906cce1

+ 11 - 7
OASystem/OASystem.Api/Controllers/FinancialController.cs

@@ -912,7 +912,7 @@ namespace OASystem.API.Controllers
                     if (doc.Range.Bookmarks["Team"] != null)
                     {
                         Bookmark mark = doc.Range.Bookmarks["Team"];
-                        mark.Text = _DelegationInfo.VisitCountry == null ? "" : _DelegationInfo.VisitCountry.Replace("|","、").ToString();
+                        mark.Text = _DelegationInfo.VisitCountry == null ? "" : _DelegationInfo.VisitCountry.Replace("|", "、").ToString();
                     }
 
                     //付款日期
@@ -1029,7 +1029,7 @@ namespace OASystem.API.Controllers
                         bookmarkArr.Add("ClientUnit", ClientItem.Key); //单位
                         bookmarkArr.Add("VisitStartDate", _DelegationInfo.VisitStartDate.ToString("yyyy年MM月dd日"));//出发日期
                         bookmarkArr.Add("name", string.Join(",", ClientItem.Select(x => x.Name).ToArray()).TrimEnd(','));//全部人员信息
-                        bookmarkArr.Add("VisitCountry", _DelegationInfo.VisitCountry.Replace("|","、"));//出访国家
+                        bookmarkArr.Add("VisitCountry", _DelegationInfo.VisitCountry.Replace("|", "、"));//出访国家
                         bookmarkArr.Add("dayTime", DateTime.Now.ToString("yyyy年MM月dd日"));//今天日期
 
                         var ClientItemList = ClientItem.ToList();
@@ -1212,7 +1212,8 @@ namespace OASystem.API.Controllers
                                 otherFee += _EnterExitCosts.Ticket;
                                 otherFeestr += $"参展门票费{_EnterExitCosts.Ticket.ToString("#0.00")}元、";
                             }
-                            if (otherFeestr.Length > 0) {
+                            if (otherFeestr.Length > 0)
+                            {
                                 otherFeestr = otherFeestr.Substring(0, otherFeestr.Length - 1);
                                 otherFeestr += "等费用";
                             }
@@ -2334,6 +2335,9 @@ namespace OASystem.API.Controllers
 
             Dictionary<int, string> dic_setData = new Dictionary<int, string>();
 
+            Sys_SetDataType stGZ = _daiRep.Query<Sys_SetDataType>(s => s.Name == "公转").First();
+            Sys_SetDataType stSZ = _daiRep.Query<Sys_SetDataType>(s => s.Name == "私转").First();
+
             foreach (var item in DailyFeePaymentData)
             {
                 if (_dailyIds != null)
@@ -2362,7 +2366,7 @@ namespace OASystem.API.Controllers
                     if (sd_transfer != null)
                     {
                         item.transferParentId = sd_transfer.STid;
-                        item.transferParentIdStr = sd_transfer.STid == 0 ? "公转" : sd_transfer.STid == 1 ? "私转" : "";
+                        item.transferParentIdStr = sd_transfer.STid == stGZ.Id ? "公转" : sd_transfer.STid == stSZ.Id ? "私转" : "";
                     }
                 }
                 else
@@ -2372,7 +2376,7 @@ namespace OASystem.API.Controllers
                     {
                         item.transferTypeIdStr = sd_transfer.Name;
                         item.transferParentId = sd_transfer.STid;
-                        item.transferParentIdStr = sd_transfer.STid == 0 ? "公转" : sd_transfer.STid == 1 ? "私转" : "";
+                        item.transferParentIdStr = sd_transfer.STid == stGZ.Id ? "公转" : sd_transfer.STid == stSZ.Id ? "私转" : "";
                         dic_setData.Add(item.transferTypeId, sd_transfer.Name);
                     }
                 }
@@ -2391,8 +2395,8 @@ namespace OASystem.API.Controllers
                 }
             }
 
-            decimal total_gz = DailyFeePaymentData.Where(s => s.transferParentId == 0).Sum(d => d.SumPrice ?? 0M);
-            decimal total_sz = DailyFeePaymentData.Where(s => s.transferParentId == 1).Sum(d => d.SumPrice ?? 0M);
+            decimal total_gz = DailyFeePaymentData.Where(s => s.transferParentId == stGZ.Id).Sum(d => d.SumPrice ?? 0M);
+            decimal total_sz = DailyFeePaymentData.Where(s => s.transferParentId == stSZ.Id).Sum(d => d.SumPrice ?? 0M);
 
             var result = new tree_Fin_DailyFeePaymentResult() { gz = total_gz, sz = total_sz, dataList = DailyFeePaymentData };
 

+ 20 - 0
OASystem/OASystem.Api/Controllers/ResourceController.cs

@@ -134,6 +134,26 @@ namespace OASystem.API.Controllers
                 throw;
             }
         }
+
+        /// <summary>
+        /// 根据Id查询车公司详细数据
+        /// </summary>
+        /// <returns></returns>
+        [HttpPost]
+        [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
+        public async Task<IActionResult> QuerCarDataDetailById(QueryCarDataDetailDto dto)
+        {
+            string sql = string.Format(@" Select * From Res_CarData With(Nolock) Where Id = {0} ", dto.Id);
+            CarDataDetailDataView info = _resItemInfoRep._sqlSugar.SqlQueryable<CarDataDetailDataView>(sql).First();
+            if (info == null)
+            {
+                return Ok(JsonView(false, "未找到相关数据!"));
+            }
+
+            return Ok(JsonView(true, "查询成功", info));
+        }
+
+
         /// <summary>
         /// 车公司信息添加
         /// </summary>

+ 6 - 0
OASystem/OASystem.Domain/Dtos/Resource/CarDataDto.cs

@@ -26,6 +26,12 @@ namespace OASystem.Domain.Dtos.Resource
         /// </summary>
         public string ContactTel { get; set; }
     }
+
+    public class QueryCarDataDetailDto : PortDtoBase
+    {
+        public int Id { get; set; }
+    }
+
     /// <summary>
     /// 添加车公司数据参数
     /// </summary>

+ 128 - 2
OASystem/OASystem.Domain/ViewModels/Resource/CarDataView.cs

@@ -1,4 +1,5 @@
-using OASystem.Domain.Entities.Resource;
+using OASystem.Domain.Entities;
+using OASystem.Domain.Entities.Resource;
 using System;
 using System.Collections.Generic;
 using System.Linq;
@@ -7,7 +8,7 @@ using System.Threading.Tasks;
 
 namespace OASystem.Domain.ViewModels.Resource
 {
-    public class CarDataView:Res_CarData
+    public class CarDataView : Res_CarData
     {
     }
 
@@ -16,4 +17,129 @@ namespace OASystem.Domain.ViewModels.Resource
         public int Id { get; set; }
         public string UnitArea { get; set; }
     }
+
+
+    public class CarDataDetailDataView
+    {
+        public int Id { get; set; }
+
+        /// <summary>
+        /// 服务评分
+        /// </summary>
+        public int Score { get; set; }
+
+        /// <summary>
+        /// 区域
+        /// </summary>
+        public string UnitArea { get; set; }
+
+        /// <summary>
+        /// 公司名称
+        /// </summary>
+        public string UnitName { get; set; }
+
+        /// <summary>
+        /// 地址
+        /// </summary>
+        public string Address { get; set; }
+
+
+
+
+        /// <summary>
+        /// 联系人
+        /// </summary>
+        public string Contact { get; set; }
+
+        /// <summary>
+        /// 联系人手机号
+        /// </summary>
+        public string ContactTel { get; set; }
+
+        /// <summary>
+        /// 联系人邮箱
+        /// </summary>
+        public string ContactEmail { get; set; }
+
+        /// <summary>
+        /// 联系人传真
+        /// </summary>
+        public string ContactFax { get; set; }
+
+        /// <summary>
+        /// 其他信息
+        /// </summary>
+        public string OtherInfo { get; set; }
+
+
+
+
+        /// <summary>
+        /// 车描述
+        /// </summary>
+        public string CarDes { get; set; }
+
+        /// <summary>
+        /// 车图片路径
+        /// 存储多个 使用/r/n
+        /// </summary>
+        public string CarPicPaths { get; set; }
+
+
+        
+        /// <summary>
+        /// 相关的车辆资质
+        /// A B C  选择
+        /// </summary>
+        public string QualificationScore { get; set; }
+
+        /// <summary>
+        /// 车辆2-4年新,VIP及以上需要2年新
+        /// A B C  选择
+        /// </summary>
+        public string CarAgeScore { get; set; }
+
+        /// <summary>
+        /// 车身干净,无文字图片等
+        /// A B C  选择
+        /// </summary>
+        public string CleanImgScore { get; set; }
+
+        /// <summary>
+        /// 车内整洁、无异味
+        /// A B C  选择
+        /// </summary>
+        public string SmellScore { get; set; }
+
+        /// <summary>
+        /// 提前备水,纸巾等
+        /// A B C  选择
+        /// </summary>
+        public string WaterPaperScore { get; set; }
+
+        /// <summary>
+        /// 车辆配置高(皮座椅等)
+        /// A B C  选择
+        /// </summary>
+        public string HardwareScore { get; set; }
+
+        /// <summary>
+        /// 时间概念强
+        /// A B C  选择
+        /// </summary>
+        public string TimeScore { get; set; }
+
+        /// <summary>
+        /// 安全意识高
+        /// A B C  选择
+        /// </summary>
+        public string SafetyScore { get; set; }
+
+        /// <summary>
+        /// 司机驾龄时间长,提前熟悉路线
+        /// A B C  选择
+        /// </summary>
+        public string DrivingAgeScore { get; set; }
+
+    }
 }

+ 18 - 12
OASystem/OASystem.Infrastructure/Repositories/Financial/DailyFeePaymentRepository.cs

@@ -364,19 +364,25 @@ namespace OASystem.Infrastructure.Repositories.Financial
             Fin_DailyFeePayment _DailyFeePayment = await _sqlSugar.Queryable<Fin_DailyFeePayment>().Where(it => it.Id == dto.Id && it.IsDel == 0).FirstAsync();
             if (_DailyFeePayment != null)
             {
-                if (_DailyFeePayment.FAudit != 0 && _DailyFeePayment.MAudit != 0)
+                //if (_DailyFeePayment.FAudit != 0 && _DailyFeePayment.MAudit != 0)
+                //{
+                //    result.Msg = "财务和总经理均已审核,不可修改!";
+                //    return result;
+                //}
+                //else if (_DailyFeePayment.FAudit != 0)
+                //{
+                //    result.Msg = "财务已审核,不可修改!";
+                //    return result;
+                //}
+                //else if (_DailyFeePayment.MAudit != 0)
+                //{
+                //    result.Msg = "总经理已审核,不可修改!";
+                //    return result;
+                //}
+
+                if (_DailyFeePayment.FAudit == 1 || _DailyFeePayment.MAudit == 1)
                 {
-                    result.Msg = "财务和总经理均已审核,不可修改!";
-                    return result;
-                }
-                else if (_DailyFeePayment.FAudit != 0)
-                {
-                    result.Msg = "财务已审核,不可修改!";
-                    return result;
-                }
-                else if (_DailyFeePayment.MAudit != 0)
-                {
-                    result.Msg = "总经理已审核,不可修改!";
+                    result.Msg = "审核已通过,不可修改!";
                     return result;
                 }
 

+ 5 - 2
OASystem/OASystem.Infrastructure/Repositories/Resource/OfficialActivitiesRepository.cs

@@ -188,8 +188,11 @@ namespace OASystem.Infrastructure.Repositories.Resource
             {
                 _sqlSugar.BeginTran();
 
-                string selectSql = string.Format(@"select * from Res_OfficialActivities where Client='{0}' and Address='{1}' and IsDel='{2}'", dto.Client, dto.Address, 0);
-                var res_InvitationOfficial = await _sqlSugar.SqlQueryable<Res_OfficialActivities>(selectSql).FirstAsync();//查询是否存在
+                //处理sql注入 2024-05-22 袁
+                //string selectSql = string.Format(@"select * from Res_OfficialActivities where Client='{0}' and Address='{1}' and IsDel='{2}'", dto.Client, dto.Address, 0);
+                //var res_InvitationOfficial = await _sqlSugar.SqlQueryable<Res_OfficialActivities>(selectSql).FirstAsync();//查询是否存在
+                var res_InvitationOfficial = await _sqlSugar.Queryable< Res_OfficialActivities >().FirstAsync(x=>x.Client == dto.Client && x.Address == dto.Address && x.IsDel == 0 && x.DiId == dto.DiId);
+
                 if (res_InvitationOfficial != null)
                 {
                     _sqlSugar.RollbackTran();