Explorar el Código

添加签证文件上传功能并优化代码结构

在 `GroupsController.cs` 中新增 `VisaFileUploadAndUpdate` 方法,用于上传和更新签证文件信息,同时调整了操作人信息的输出逻辑。更新了 `GeneralMethod.cs` 中的注释以明确功能。

在 `VisaDeleClientView.cs` 中移除不必要的 `using` 语句,并添加处理签证申请详细信息的新类和属性。

统一了多个仓储类中 `IsPay` 属性的赋值逻辑,确保在 `PayDId` 为 72 时将 `IsPay` 设置为 1,提升了代码的一致性和可维护性。
Lyyyi hace 1 mes
padre
commit
43eb170955

+ 31 - 1
OASystem/OASystem.Api/Controllers/GroupsController.cs

@@ -3,6 +3,7 @@ using Aspose.Words;
 using Aspose.Words.Drawing;
 using Aspose.Words.Tables;
 using DiffMatchPatch;
+using Dm.util;
 using Microsoft.AspNetCore.SignalR;
 using NPOI.SS.UserModel;
 using NPOI.SS.Util;
@@ -887,7 +888,7 @@ namespace OASystem.API.Controllers
                 
                     var operators = GeneralMethod.GetGroupModuleOperators(x.Id);
                     var operatorNames = new StringBuilder();
-                    operatorNames.AppendLine("各模块实际操作人:");
+                    //operatorNames.AppendLine("各模块实际操作人:");
                     if (operators.Any())
                     {
                         operators.ForEach(y => {
@@ -901,6 +902,7 @@ namespace OASystem.API.Controllers
                             else label = "暂未指定";
 
                             operatorNames.AppendLine($"{y.CTableName}:{label}");
+                            operatorNames.AppendLine();
                         });
                     }
 
@@ -2734,6 +2736,34 @@ FROM
 
         #region 团组&签证
 
+        #region 团组&签证 New
+        /// <summary>
+        ///  团组&签证 New
+        ///  上传签证文件(客户填写签证文件),新增或更新 签证信息
+        /// </summary>
+        /// <param name="file">请求dto</param>
+        /// <returns></returns>
+        [HttpPost]
+        [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
+        public async Task<IActionResult> VisaFileUploadAndUpdate(FormFile file)
+        {
+            //文件验证
+            if (file.Length < 1)
+            {
+
+            }
+
+
+
+
+            return Ok(JsonView(true));
+        }
+
+
+
+        #endregion
+
+
         /// <summary>
         ///  根据团组Id获取签证客户信息List
         /// </summary>

+ 1 - 1
OASystem/OASystem.Api/OAMethodLib/GeneralMethod.cs

@@ -1070,7 +1070,7 @@ namespace OASystem.API.OAMethodLib
         #endregion
 
 
-        #region 根据团ID获取各板块操作人
+        #region 根据团ID获取各板块实际操作人
 
         /// <summary>
         /// 获取 团组模块操作人

+ 366 - 9
OASystem/OASystem.Domain/ViewModels/CRM/VisaDeleClientView.cs

@@ -1,23 +1,19 @@
 using OASystem.Domain.Attributes;
 using OASystem.Domain.Entities.Customer;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
+using System.Text.Json.Serialization;
 
 namespace OASystem.Domain.ViewModels.CRM
 {
     /// <summary>
     /// 签证客户信息 View
     /// </summary>
-    public class VisaDeleClientView: Crm_DeleClient
+    public class VisaDeleClientView : Crm_DeleClient
     { }
 
     /// <summary>
     /// 签证客户信息 ListView
     /// </summary>
-    public class VisaDeleClientListView 
+    public class VisaDeleClientListView
     {
         /// <summary>
         /// Id
@@ -27,9 +23,13 @@ namespace OASystem.Domain.ViewModels.CRM
         /// <summary>
         /// 客户姓名
         /// </summary>
-        public string ClientName { get {
+        public string ClientName
+        {
+            get
+            {
                 return this.LastName + this.FirstName;
-            } }
+            }
+        }
 
         [Encrypted]
         public string LastName { get; set; }
@@ -113,7 +113,364 @@ namespace OASystem.Domain.ViewModels.CRM
 
 
     #region 新西兰、澳大利亚签证申请资料表
+    public class VisaApplication
+    {
+        /// <summary>
+        /// 其他国家访问记录
+        /// </summary>
+        [JsonPropertyName("其他国家")]
+        public string OtherCountries { get; set; }
+
+        /// <summary>
+        /// 申请人个人信息
+        /// </summary>
+        [JsonPropertyName("申请人个人信息")]
+        public ApplicantInfo ApplicantInfo { get; set; }
+
+        /// <summary>
+        /// 新西兰澳大利亚访问记录
+        /// </summary>
+        [JsonPropertyName("新西兰澳大利亚访问记录")]
+        public VisitHistory VisitHistory { get; set; }
+
+        /// <summary>
+        /// 拒签记录
+        /// </summary>
+        [JsonPropertyName("拒签记录")]
+        public List<RejectionRecord> RejectionRecords { get; set; }
+
+        /// <summary>
+        /// 教育经历
+        /// </summary>
+        [JsonPropertyName("教育经历")]
+        public List<EducationExperience> EducationExperiences { get; set; }
+
+        /// <summary>
+        /// 工作经历
+        /// </summary>
+        [JsonPropertyName("工作经历")]
+        public List<WorkExperience> WorkExperiences { get; set; }
+
+        /// <summary>
+        /// 服兵役历史
+        /// </summary>
+        [JsonPropertyName("服兵役历史")]
+        public List<MilitaryService> MilitaryServices { get; set; }
+
+        /// <summary>
+        /// 本人声明
+        /// </summary>
+        [JsonPropertyName("本人声明")]
+        public string Declaration { get; set; }
+    }
+
+    /// <summary>
+    /// 申请人个人信息
+    /// </summary>
+    public class ApplicantInfo
+    {
+        /// <summary>
+        /// 姓名
+        /// </summary>
+        [JsonPropertyName("姓名")]
+        public string Name { get; set; }
+
+        /// <summary>
+        /// 曾用名
+        /// </summary>
+        [JsonPropertyName("曾用名")]
+        public string FormerName { get; set; }
+
+        /// <summary>
+        /// 婚姻状况
+        /// </summary>
+        [JsonPropertyName("婚姻状况")]
+        public string MaritalStatus { get; set; }
+
+        /// <summary>
+        /// 出生地
+        /// </summary>
+        [JsonPropertyName("出生地")]
+        public string BirthPlace { get; set; }
+
+        /// <summary>
+        /// 出生日期
+        /// </summary>
+        [JsonPropertyName("出生日期")]
+        public string BirthDate { get; set; }
+
+        /// <summary>
+        /// 性别
+        /// </summary>
+        [JsonPropertyName("性别")]
+        public string Gender { get; set; }
+
+        /// <summary>
+        /// 手机
+        /// </summary>
+        [JsonPropertyName("手机")]
+        public string Mobile { get; set; }
+
+        /// <summary>
+        /// 现在住址
+        /// </summary>
+        [JsonPropertyName("现在住址")]
+        public string CurrentAddress { get; set; }
+
+        /// <summary>
+        /// 在职人员信息
+        /// </summary>
+        [JsonPropertyName("在职人员信息")]
+        public EmploymentInfo EmploymentInfo { get; set; }
+
+        /// <summary>
+        /// 关系信息
+        /// </summary>
+        [JsonPropertyName("关系信息")]
+        public List<RelationInfo> RelationInfos { get; set; }
+    }
+
+    /// <summary>
+    /// 在职人员信息
+    /// </summary>
+    public class EmploymentInfo
+    {
+        /// <summary>
+        /// 现单位名称
+        /// </summary>
+        [JsonPropertyName("现单位名称")]
+        public string CurrentCompanyName { get; set; }
+
+        /// <summary>
+        /// 现单位地址
+        /// </summary>
+        [JsonPropertyName("现单位地址")]
+        public string CurrentCompanyAddress { get; set; }
+
+        /// <summary>
+        /// 单位电话
+        /// </summary>
+        [JsonPropertyName("单位电话")]
+        public string CompanyPhone { get; set; }
+
+        /// <summary>
+        /// 目前职位
+        /// </summary>
+        [JsonPropertyName("目前职位")]
+        public string CurrentPosition { get; set; }
+
+        /// <summary>
+        /// 月收入
+        /// </summary>
+        [JsonPropertyName("月收入")]
+        public string MonthlyIncome { get; set; }
+    }
+
+    /// <summary>
+    /// 关系信息
+    /// </summary>
+    public class RelationInfo
+    {
+        /// <summary>
+        /// 关系
+        /// <summary>
+        /// 关系
+        /// </summary>
+        [JsonPropertyName("关系")]
+        public string Relation { get; set; }
+
+        /// <summary>
+        /// 姓名
+        /// </summary>
+        [JsonPropertyName("姓名")]
+        public string Name { get; set; }
+
+        /// <summary>
+        /// 出生日期
+        /// </summary>
+        [JsonPropertyName("出生日期")]
+        public string BirthDate { get; set; }
+
+        /// <summary>
+        /// 地址
+        /// </summary>
+        [JsonPropertyName("地址")]
+        public string Address { get; set; }
 
+        /// <summary>
+        /// 联系方式
+        /// </summary>
+        [JsonPropertyName("联系方式")]
+        public string ContactNumber { get; set; }
+    }
+
+    /// <summary>
+    /// 新西兰澳大利亚访问记录
+    /// </summary>
+    public class VisitHistory
+    {
+        /// <summary>
+        /// 第一次访问记录
+        /// </summary>
+        [JsonPropertyName("第一次")]
+        public Visit FirstVisit { get; set; }
+
+        /// <summary>
+        /// 第二次访问记录
+        /// </summary>
+        [JsonPropertyName("第二次")]
+        public Visit SecondVisit { get; set; }
+
+        /// <summary>
+        /// 第三次访问记录
+        /// </summary>
+        [JsonPropertyName("第三次")]
+        public Visit ThirdVisit { get; set; }
+    }
+
+    /// <summary>
+    /// 访问记录
+    /// </summary>
+    public class Visit
+    {
+        /// <summary>
+        /// 抵达日期
+        /// </summary>
+        [JsonPropertyName("抵达日期")]
+        public string ArrivalDate { get; set; }
+
+        /// <summary>
+        /// 离开日期
+        /// </summary>
+        [JsonPropertyName("离开日期")]
+        public string DepartureDate { get; set; }
+    }
+
+    /// <summary>
+    /// 拒签记录
+    /// </summary>
+    public class RejectionRecord
+    {
+        /// <summary>
+        /// 国家
+        /// </summary>
+        [JsonPropertyName("国家")]
+        public string Country { get; set; }
+
+        /// <summary>
+        /// 申请日期地点
+        /// </summary>
+        [JsonPropertyName("申请日期地点")]
+        public string ApplicationDateLocation { get; set; }
+
+        /// <summary>
+        /// 申请签证类别
+        /// </summary>
+        [JsonPropertyName("申请签证类别")]
+        public string VisaCategory { get; set; }
+
+        /// <summary>
+        /// 拒签原因
+        /// </summary>
+        [JsonPropertyName("拒签原因")]
+        public string RejectionReason { get; set; }
+    }
+
+    /// <summary>
+    /// 教育经历
+    /// </summary>
+    public class EducationExperience
+    {
+        /// <summary>
+        /// 院校名称
+        /// </summary>
+        [JsonPropertyName("院校名称")]
+        public string SchoolName { get; set; }
+
+        /// <summary>
+        /// 入学时间
+        /// </summary>
+        [JsonPropertyName("入学时间")]
+        public string EnrollmentDate { get; set; }
+
+        /// <summary>
+        /// 毕业时间
+        /// </summary>
+        [JsonPropertyName("毕业时间")]
+        public string GraduationDate { get; set; }
+
+        /// <summary>
+        /// 课程专业名称
+        /// </summary>
+        [JsonPropertyName("课程专业名称")]
+        public string CourseName { get; set; }
+    }
+
+    /// <summary>
+    /// 工作经历
+    /// </summary>
+    public class WorkExperience
+    {
+        /// <summary>
+        /// 单位名称
+        /// </summary>
+        [JsonPropertyName("单位名称")]
+        public string CompanyName { get; set; }
+
+        /// <summary>
+        /// 开始时间
+        /// </summary>
+        [JsonPropertyName("开始时间")]
+        public string StartDate { get; set; }
+
+        /// <summary>
+        /// 结束时间
+        /// </summary>
+        [JsonPropertyName("结束时间")]
+        public string EndDate { get; set; }
+
+        /// <summary>
+        /// 单位所在地
+        /// </summary>
+        [JsonPropertyName("单位所在地")]
+        public string CompanyLocation { get; set; }
+
+        /// <summary>
+        /// 职务
+        /// </summary>
+        [JsonPropertyName("职务")]
+        public string Position { get; set; }
+    }
+
+    /// <summary>
+    /// 服兵役历史
+    /// </summary>
+    public class MilitaryService
+    {
+        /// <summary>
+        /// 军衔
+        /// </summary>
+        [JsonPropertyName("军衔")]
+        public string Rank { get; set; }
+
+        /// <summary>
+        /// 所属部队
+        /// </summary>
+        [JsonPropertyName("所属部队")]
+        public string Unit { get; set; }
+
+        /// <summary>
+        /// 军种
+        /// </summary>
+        [JsonPropertyName("军种")]
+        public string Branch { get; set; }
+
+        /// <summary>
+        /// 服役时间
+        /// </summary>
+        [JsonPropertyName("服役时间")]
+        public string ServiceDate { get; set; }
+    }
 
     #endregion
 

+ 3 - 1
OASystem/OASystem.Infrastructure/Repositories/Groups/AirTicketResRepository.cs

@@ -451,7 +451,8 @@ namespace OASystem.Infrastructure.Repositories.Groups
 
                         //2025-04-07 第四次更改 PayDId == 72(刷卡) IsPay == 1
                         if (grp_CreditCard.PayDId == 72) grp_CreditCard.IsPay = 1;
-                        
+                        else grp_CreditCard.IsPay = 0;
+
                         //获取新汇率  int diId,int CId, int currencyId
                         var rate = await fn(dto.AirTicketResOpData.DiId, 85, dto.AirTicketResOpData.Currency);
 
@@ -664,6 +665,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
 
                         //2025-04-07 第四次更改 PayDId == 72(刷卡) IsPay == 1
                         if (grp_CreditCard.PayDId == 72) grp_CreditCard.IsPay = 1;
+                        else grp_CreditCard.IsPay = 0;
 
                         //获取新汇率  int diId,int CId, int currencyId
                         var rate = await fn(dto.AirTicketResOpData.DiId, 85, dto.AirTicketResOpData.Currency);

+ 1 - 0
OASystem/OASystem.Infrastructure/Repositories/Groups/CarTouristGuideGroundRepository.cs

@@ -1204,6 +1204,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
 
                 //2025-04-07 第四次更改 PayDId == 72(刷卡) IsPay == 1
                 if (c.PayDId == 72) c.IsPay = 1;
+                else c.IsPay = 0;
 
                 c.RMBPrice = c.PayMoney;
                 c.DayRate = 1;

+ 1 - 0
OASystem/OASystem.Infrastructure/Repositories/Groups/CustomersRepository.cs

@@ -380,6 +380,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
 
             //2025-04-07 第四次更改 PayDId == 72(刷卡) IsPay == 1
             if (c.PayDId == 72) c.IsPay = 1;
+            else c.IsPay = 0;
 
             c.RMBPrice = cus.InsuranceCosts;
             c.DayRate = 1;

+ 1 - 0
OASystem/OASystem.Infrastructure/Repositories/Groups/DecreasePaymentsRepository.cs

@@ -207,6 +207,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
 
                 //2025-04-07 第四次更改 PayDId == 72(刷卡) IsPay == 1
                 if (C.PayDId == 72) C.IsPay = 1;
+                else C.IsPay = 0;
 
                 C.DIId = grp_Decrease.DiId;
                 C.CId = id;

+ 2 - 0
OASystem/OASystem.Infrastructure/Repositories/Groups/InvitationOfficialActivitiesRepository.cs

@@ -329,6 +329,7 @@ Order By i.id  Desc ", sqlWhere);
 
                 //2025-04-07 第四次更改 PayDId == 72(刷卡) IsPay == 1
                 if (C.PayDId == 72) C.IsPay = 1;
+                else C.IsPay = 0;
 
                 C.ConsumptionPatterns = dto.ConsumptionPatterns;
                 C.ConsumptionDate = dto.ConsumptionDate;
@@ -483,6 +484,7 @@ Order By i.id  Desc ", sqlWhere);
                     {
                         //2025-04-07 第四次更改 PayDId == 72(刷卡) IsPay == 1
                         if (dto.PayDId == 72) grp_CreditCardPayment.IsPay = 1;
+                        else grp_CreditCardPayment.IsPay = 0;
 
                         grp_CreditCardPayment.PayMoney = dto.PayMoney;
                         grp_CreditCardPayment.PaymentCurrency = dto.PaymentCurrency;

+ 1 - 0
OASystem/OASystem.Infrastructure/Repositories/Groups/VisaPriceRepository.cs

@@ -337,6 +337,7 @@ Left Join Sys_SetData as sd With(Nolock) On c.PayDId = sd.Id
 
             //2025-04-07 第四次更改 PayDId == 72(刷卡) IsPay == 1
             if (c.PayDId == 72) c.IsPay = 1;
+            else c.IsPay = 0;
 
             c.RMBPrice = c.PayMoney;
             c.DayRate = 1.0000M;