Procházet zdrojové kódy

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

wangh před 1 rokem
rodič
revize
369c4c1cda
25 změnil soubory, kde provedl 1178 přidání a 1048 odebrání
  1. 1 1
      OASystem/EntitySync/Program.cs
  2. 76 1
      OASystem/OASystem.Api/Controllers/BusinessController.cs
  3. 74 3
      OASystem/OASystem.Api/Controllers/FinancialController.cs
  4. 234 54
      OASystem/OASystem.Api/Controllers/GroupsController.cs
  5. 170 5
      OASystem/OASystem.Api/Controllers/PersonnelModuleController.cs
  6. 0 1
      OASystem/OASystem.Api/OAMethodLib/GeneralMethod.cs
  7. 192 867
      OASystem/OASystem.Api/OAMethodLib/PayrollComputation.cs
  8. 4 67
      OASystem/OASystem.Api/appsettings.json
  9. 3 0
      OASystem/OASystem.Domain/AutoMappers/_baseMappingProfile.cs
  10. 21 0
      OASystem/OASystem.Domain/Dtos/Financial/ProceedsReceivedDto.cs
  11. 24 0
      OASystem/OASystem.Domain/Dtos/Groups/EnterExitCostDto.cs
  12. 11 0
      OASystem/OASystem.Domain/Dtos/Groups/GroupListDto.cs
  13. 12 0
      OASystem/OASystem.Domain/Dtos/Groups/VisaDto.cs
  14. 3 0
      OASystem/OASystem.Domain/Dtos/System/MessageDto.cs
  15. 3 3
      OASystem/OASystem.Domain/Entities/Groups/Grp_NationalTravelFee.cs
  16. 2 2
      OASystem/OASystem.Domain/Entities/PersonnelModule/Pm_WageSheet.cs
  17. 7 0
      OASystem/OASystem.Domain/Entities/System/Sys_Message.cs
  18. 49 1
      OASystem/OASystem.Domain/ViewModels/Groups/DelegationInfoView.cs
  19. 85 3
      OASystem/OASystem.Domain/ViewModels/Groups/EnterExitCostView.cs
  20. 67 14
      OASystem/OASystem.Domain/ViewModels/PersonnelModule/WageSheetView.cs
  21. 15 10
      OASystem/OASystem.Infrastructure/Repositories/Financial/ForeignReceivablesRepository.cs
  22. 66 0
      OASystem/OASystem.Infrastructure/Repositories/Groups/DelegationInfoRepository.cs
  23. 18 0
      OASystem/OASystem.Infrastructure/Repositories/Groups/DelegationVisaRepository.cs
  24. 31 7
      OASystem/OASystem.Infrastructure/Repositories/Groups/EnterExitCostRepository.cs
  25. 10 9
      OASystem/OASystem.Infrastructure/Repositories/System/MessageRepository.cs

+ 1 - 1
OASystem/EntitySync/Program.cs

@@ -78,7 +78,7 @@ db.CodeFirst.SetStringDefaultLength(50).BackupTable().InitTables(new Type[]
     //typeof(Grp_ScheduleInfo),
     //typeof(Grp_ScheduleDetailInfo),
     //typeof(Grp_SchedulePersonInfo)
-    //typeof(Sys_Message),
+    typeof(Sys_Message),
     //typeof(Sys_MessageReadAuth)
     //typeof(Crm_DeleClient)
     //typeof(Crm_NewClientData)

+ 76 - 1
OASystem/OASystem.Api/Controllers/BusinessController.cs

@@ -11,6 +11,8 @@ using OASystem.Domain.Entities.Resource;
 using OASystem.Domain.ViewModels.Business;
 using OASystem.Domain.ViewModels.Groups;
 using OASystem.Infrastructure.Repositories.Business;
+using OASystem.Infrastructure.Repositories.Groups;
+using OASystem.Infrastructure.Repositories.System;
 using Org.BouncyCastle.Asn1.Mozilla;
 
 namespace OASystem.API.Controllers
@@ -23,12 +25,85 @@ namespace OASystem.API.Controllers
     {
         private readonly IMapper _mapper;
         private readonly CommonBusRepository _busRep;
-        public BusinessController(IMapper mapper, CommonBusRepository busRep)
+        private readonly SetDataRepository _setDataRep;
+        private readonly DelegationInfoRepository _groupRep;
+        public BusinessController(IMapper mapper, CommonBusRepository busRep, SetDataRepository setDataRep, DelegationInfoRepository groupRep)
         {
             _mapper = mapper;
             _busRep = busRep;
+            _setDataRep = setDataRep;
+            _groupRep = groupRep;
         }
 
+        #region 团组信息 团组详情
+        /// <summary>
+        ///  团组信息 团组详情
+        /// </summary>
+        /// <param name="dto">团组info请求dto</param>
+        /// <returns></returns>
+        [HttpPost]
+        [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
+        public async Task<IActionResult> PostShareGroupInfo(ShareGroupInfoDto dto)
+        {
+            var groupData = await _groupRep.PostShareGroupInfo(dto);
+            if (groupData.Code != 0)
+            {
+                return Ok(JsonView(false, groupData.Msg));
+            }
+
+            return Ok(JsonView(groupData.Data));
+        }
+
+        /// <summary>
+        /// 团组信息 团组名称 List
+        /// </summary>
+        /// <param name="dto"></param>
+        /// <returns></returns>
+        [HttpPost]
+        [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
+        public async Task<IActionResult> GetGroupNameList(GroupNameDto dto)
+        {
+            var groupData = await _groupRep.GetGroupNameList(dto);
+            if (groupData.Code != 0)
+            {
+                return Ok(JsonView(false, groupData.Msg));
+            }
+
+            return Ok(JsonView(groupData.Data, groupData.Data.Count));
+        }
+
+        #endregion
+
+        #region 币种 List
+        /// <summary>
+        /// 币种 List
+        /// </summary>
+        /// <param name="dto"></param>
+        /// <returns></returns>
+        [HttpPost]
+        [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
+        public async Task<IActionResult> PostCurrencyList()
+        {
+            try
+            {
+                Result setData = await _setDataRep.GetSetDataBySTId(_setDataRep, 66); //币种类型
+                if (setData.Code == 0)
+                {
+                    return Ok(JsonView(true, "查询成功", setData.Data));
+                }
+                else
+                {
+                    return Ok(JsonView(false, setData.Msg));
+                }
+            }
+            catch (Exception)
+            {
+                return Ok(JsonView(false, "程序错误!"));
+                throw;
+            }
+        }
+        #endregion
+
         #region 会务物料单
 
         /// <summary>

+ 74 - 3
OASystem/OASystem.Api/Controllers/FinancialController.cs

@@ -397,10 +397,11 @@ namespace OASystem.API.Controllers
 
         #endregion
 
-        #region 对外收款账单
+        #region 对外收款账单 关联已收款项
 
         /// <summary>
         /// 对外收款账单 Select数据源(团组名,币种,汇款方式)
+        /// 关联已收款项
         /// </summary>
         /// <param name="dto"></param>
         /// <returns></returns>
@@ -423,10 +424,11 @@ namespace OASystem.API.Controllers
                 throw;
             }
         }
-        
+
         /// <summary>
         /// 对外收款账单 
         /// 账单详情
+        /// 关联已收款项
         /// </summary>
         /// <param name="dto"></param>
         /// <returns></returns>
@@ -450,10 +452,10 @@ namespace OASystem.API.Controllers
             }
         }
 
-
         /// <summary>
         /// 对外收款账单 
         /// 账单 删除
+        /// 关联已收款项
         /// </summary>
         /// <param name="dto"></param>
         /// <returns></returns>
@@ -480,6 +482,7 @@ namespace OASystem.API.Controllers
         /// <summary>
         /// 对外收款账单 
         /// 添加 And 更新
+        /// 关联已收款项
         /// </summary>
         /// <param name="dto"></param>
         /// <returns></returns>
@@ -506,6 +509,7 @@ namespace OASystem.API.Controllers
         /// <summary>
         /// 已收款项 
         /// 账单 删除
+        /// 关联已收款项
         /// </summary>
         /// <param name="dto"></param>
         /// <returns></returns>
@@ -532,6 +536,7 @@ namespace OASystem.API.Controllers
         /// <summary>
         /// 已收款项 
         /// 添加 And 更新
+        /// 关联已收款项
         /// </summary>
         /// <param name="dto"></param>
         /// <returns></returns>
@@ -558,6 +563,7 @@ namespace OASystem.API.Controllers
         /// <summary>
         /// 财务 已收款项
         /// 分配已收款项至 应收项下
+        /// 关联已收款项
         /// </summary>
         /// <param name="dto"></param>
         /// <returns></returns>
@@ -581,6 +587,71 @@ namespace OASystem.API.Controllers
             }
         }
 
+        ///// <summary>
+        ///// 财务 收款账单
+        ///// 导出Word(北京,四川)
+        ///// </summary>
+        ///// <param name="dto"></param>
+        ///// <returns></returns>
+        //[HttpPost]
+        //[ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
+        //public async Task<IActionResult> PostAccountReceivableWordExport(AccountReceivableWordExportDto dto)
+        //{
+        //    try
+        //    {
+        //        //模板处理
+        //        string typeName = string.Empty;
+        //        if (dto.TemplateType == 1) //四川
+        //        {
+        //            typeName = "四川";
+        //        }
+        //        else if (dto.TemplateType == 2) //北京 
+        //        {
+        //            typeName = "北京";
+        //        }
+        //        else return Ok(JsonView(false,"请选择正确的模板类型!"));
+
+        //        string wordTempName = string.Format("收款账单({0})模板.doc", typeName);
+
+
+        //    }
+        //    catch (Exception ex)
+        //    {
+        //        return Ok(JsonView(false, ex.Message));
+        //    }
+        //}
+        #endregion
+
+        #region 对外收款账单
+
+
+        /// <summary>
+        /// 对外收款账单 
+        /// 账单详情
+        /// </summary>
+        /// <param name="dto"></param>
+        /// <returns></returns>
+        [HttpPost]
+        [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
+        public async Task<IActionResult> PostGroupReceivablesInfoByDiId(ForForeignReceivablesInfoDto dto)
+        {
+            try
+            {
+                Result ffrData = await _ForForeignReceivablesRep.GetGroupReceivablesInfoByDiId(dto);
+                if (ffrData.Code != 0)
+                {
+                    return Ok(JsonView(false, ffrData.Msg));
+                }
+                return Ok(JsonView(true, ffrData.Msg, ffrData.Data));
+            }
+            catch (Exception ex)
+            {
+                return Ok(JsonView(false, ex.Message));
+                throw;
+            }
+        }
+
+
         #endregion
     }
 }

+ 234 - 54
OASystem/OASystem.Api/Controllers/GroupsController.cs

@@ -26,6 +26,8 @@ using System.Diagnostics;
 using MathNet.Numerics.Statistics.Mcmc;
 using AlibabaCloud.OpenApiClient.Models;
 using System;
+using NPOI.HPSF;
+using SqlSugar;
 
 namespace OASystem.API.Controllers
 {
@@ -45,6 +47,7 @@ namespace OASystem.API.Controllers
         private readonly InvitationOfficialActivitiesRepository _InvitationOfficialActivitiesRep;
         private readonly DelegationEnDataRepository _delegationEnDataRep;
         private readonly DelegationVisaRepository _delegationVisaRep;
+        private readonly MessageRepository _message;
         private readonly SqlSugarClient _sqlSugar;
         private string url;
         private string path;
@@ -54,7 +57,7 @@ namespace OASystem.API.Controllers
         public GroupsController(IMapper mapper, SqlSugarClient sqlSugar, GrpScheduleRepository grpScheduleRep, DelegationInfoRepository groupRepository,
             TaskAssignmentRepository taskAssignmentRep, AirTicketResRepository airTicketResRep, DecreasePaymentsRepository decreasePaymentsRep,
             InvitationOfficialActivitiesRepository InvitationOfficialActivitiesRep, DelegationEnDataRepository delegationEnDataRep, EnterExitCostRepository enterExitCostRep
-            , DelegationVisaRepository delegationVisaRep)
+            , DelegationVisaRepository delegationVisaRep, MessageRepository message)
         {
             _mapper = mapper;
             _grpScheduleRep = grpScheduleRep;
@@ -73,8 +76,10 @@ namespace OASystem.API.Controllers
             _delegationEnDataRep = delegationEnDataRep;
             _enterExitCostRep = enterExitCostRep;
             _delegationVisaRep = delegationVisaRep;
+            _message = message;
         }
 
+        
         #region 流程管控
 
         /// <summary>
@@ -226,7 +231,6 @@ namespace OASystem.API.Controllers
             return Ok(JsonView(groupData.Data));
         }
 
-
         /// <summary>
         ///  接团信息详情
         /// </summary>
@@ -363,23 +367,7 @@ namespace OASystem.API.Controllers
             return Ok(JsonView(groupData.Data));
         }
 
-        /// <summary>
-        /// 获取团组名称 List
-        /// </summary>
-        /// <param name="dto"></param>
-        /// <returns></returns>
-        [HttpPost]
-        [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
-        public async Task<IActionResult> GetGroupNameList(GroupNameDto dto)
-        {
-            var groupData = await _groupRepository.GetGroupNameList(dto);
-            if (groupData.Code != 0)
-            {
-                return Ok(JsonView(false, groupData.Msg));
-            }
-
-            return Ok(JsonView(groupData.Data, groupData.Data.Count));
-        }
+        
 
         /// <summary>
         /// 获取团组名称data  And 签证国别Data
@@ -499,6 +487,9 @@ namespace OASystem.API.Controllers
 
             List<VisaProgressImageView> list = _delegationVisaRep.GetVisaProgressImageList(dto.visaProgressCustomerId, dto.picType);
 
+            string url = AppSettingsHelper.Get("VisaProgressImageBaseUrl") + AppSettingsHelper.Get("VisaProgressImageFtpPath");
+            list.ForEach(s => s.url = url);
+
             return Ok(JsonView(list));
         }
 
@@ -525,25 +516,33 @@ namespace OASystem.API.Controllers
 
             DateTime dt1970 = new DateTime(1970, 1, 1, 0, 0, 0, 0);
             int sucNum = 0;
-            foreach (var item in dto.base64DataList)
+            try
             {
-                string imageName = dto.imageName + ((DateTime.Now.Ticks - dt1970.Ticks) / 10000).ToString();
-                string result = decodeBase64ToImage(item, imageName);
-
-                if (!string.IsNullOrEmpty(result))
+                foreach (var item in dto.base64DataList)
                 {
-                    Grp_VisaProgressCustomerPicture pic = new Grp_VisaProgressCustomerPicture();
-                    pic.CreateUserId = dto.CreateUserId;
-                    pic.PicName = imageName;
-                    pic.PicPath = result;
-                    pic.VisaProgressCustomerId = dto.visaProgressCustomerId;
+                    string imageName = dto.imageName + ((DateTime.Now.Ticks - dt1970.Ticks) / 10000).ToString();
+                    string result = decodeBase64ToImage(item, imageName);
 
-                    int insertResult = await _delegationVisaRep.AddAsync<Grp_VisaProgressCustomerPicture>(pic);
-                    if (insertResult > 0)
+                    if (!string.IsNullOrEmpty(result))
                     {
-                        sucNum++;
+                        Grp_VisaProgressCustomerPicture pic = new Grp_VisaProgressCustomerPicture();
+                        pic.CreateUserId = dto.CreateUserId;
+                        pic.PicName = imageName;
+                        pic.PicPath = result;
+                        pic.VisaProgressCustomerId = dto.visaProgressCustomerId;
+
+                        int insertResult = await _delegationVisaRep.AddAsync<Grp_VisaProgressCustomerPicture>(pic);
+                        if (insertResult > 0)
+                        {
+                            sucNum++;
+                        }
                     }
                 }
+
+            }
+            catch (Exception ex)
+            {
+                return Ok(JsonView(false, ex.Message));
             }
 
             string msg = string.Format(@"成功上传{0}张", sucNum);
@@ -566,9 +565,9 @@ namespace OASystem.API.Controllers
                 System.IO.MemoryStream ms = new System.IO.MemoryStream(arr);//转换成无法调整大小的MemoryStream对象
                 bitmap = new System.Drawing.Bitmap(ms);//将MemoryStream对象转换成Bitmap对象
 
-                var fileDir = AppSettingsHelper.Get("VisaProgressImageFtpPath");
+                var fileDir = AppSettingsHelper.Get("VisaProgressImageBasePath");
                 //文件名称
-                filename = "VisaProgress_" + DateTime.Now.ToString("yyyyMMddHHmmss") + "_" + imgName + ".jpg";//所要保存的相对路径及名字
+                filename = "VisaProgress_" + DateTime.Now.ToString("yyyyMMddHHmmss") + "_" + imgName + ".jpeg";//所要保存的相对路径及名字
                 //上传的文件的路径
                 string filePath = "";
                 if (!Directory.Exists(fileDir))
@@ -584,18 +583,89 @@ namespace OASystem.API.Controllers
                 bitmap.Save(filePath, System.Drawing.Imaging.ImageFormat.Jpeg);//保存到服务器路径
                 //bitmap.Save(filePath + ".bmp", System.Drawing.Imaging.ImageFormat.Bmp);
                 //bitmap.Save(filePath + ".gif", System.Drawing.Imaging.ImageFormat.Gif);
-                //bitmap.Save(filePath + ".png", System.Drawing.Imaging.ImageFormat.Png);
+                //bitmap.Save(filePath, System.Drawing.Imaging.ImageFormat.Png);
                 ms.Close();//关闭当前流,并释放所有与之关联的资源
                 bitmap.Dispose();
             }
             catch (Exception e)
             {
                 string massage = e.Message;
+                Logs("IOS图片上传Error:" + massage);
+                //filename = e.Message;
             }
             return filename;//返回相对路径
         }
 
 
+        /// <summary>
+        /// IOS获取团组签证拍照上传进度05(修改签证状态/通知)
+        /// </summary>
+        /// <param name="dto"></param>
+        /// <returns></returns>
+        [HttpPost]
+        [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
+        public async Task<ActionResult> PostIOSVisaProgressChangeStatus(IOS_VisaChangeStatusDto dto)
+        {
+            if (dto == null)
+            {
+                return Ok(JsonView(false, "请求错误:"));
+            }
+
+            string msg = "参数错误";
+            if (dto.diId > 0 && dto.visaStatus > 0 && dto.visaStatus < 4)
+            {
+                try
+                {
+                    //_delegationVisaRep.BeginTran();
+
+                    var updCount = await _delegationVisaRep._sqlSugar.Updateable<Grp_VisaProgressCustomer>()
+                        .SetColumns(it => it.WorkStatus == dto.visaStatus)
+                        .Where(s => s.Id == dto.visaProgressCustomerId)
+                        .ExecuteCommandAsync();
+                    if (updCount > 0 && dto.publishCode == 1) {
+
+                        _delegationVisaRep.ChangeDataBase(DBEnum.OA2014DB); //切换到新OA后删除
+                        GroupInfoDto grpDto = new GroupInfoDto() { Id = dto.diId };
+                        var groupData = await _groupRepository.GetGroupInfo(grpDto);
+                        _delegationVisaRep.ChangeDataBase(DBEnum.OA2023DB); //切换到新OA后删除
+                        if (groupData.Code != 0)
+                        {
+                            _delegationVisaRep.RollbackTran();
+                        }
+
+                        string title = string.Format(@"[签证进度更新]");
+                        string content = string.Format(@"测试文本");
+
+                        bool rst = await _message.AddMsg(new MessageDto()
+                        {
+                            Type = 5,
+                            IssuerId = dto.publisher,
+                            Title = title,
+                            Content = content,
+                            ReleaseTime = DateTime.Now,
+                            UIdList = new List<int> {
+                                234
+                            }
+                        });
+
+                        if (rst) {
+                            return Ok(JsonView(true, "发送通知成功"));
+                        }
+                    }
+
+                    //_delegationVisaRep.CommitTran();
+                }
+                catch (Exception)
+                {
+                    //_delegationVisaRep.RollbackTran();
+
+                }
+            }
+
+
+            return Ok(JsonView(true, msg));
+        }
+
         #endregion
 
         #region 团组任务分配
@@ -2445,7 +2515,6 @@ namespace OASystem.API.Controllers
             }
         }
 
-
         /// <summary>
         /// 团组模块 - 出入境费用 - 基础数据源(团组名称/币种类型)
         /// </summary>
@@ -2576,30 +2645,30 @@ namespace OASystem.API.Controllers
                                                                 Where gntf.Isdel = 0");
                 var nationalTravelFeeData = await _sqlSugar.SqlQueryable<NationalTravelFeeInfoView>(nationalTravelFeeSql).ToListAsync();
 
-                var nationalTravel = nationalTravelFeeData.GroupBy(it => it.Country).Select(it1 => it1.FirstOrDefault());
+                //var nationalTravel = nationalTravelFeeData.GroupBy(it => it.Country).Select(it1 => it1.FirstOrDefault());
 
-                List<dynamic> nationalTravelFeeData1 = new List<dynamic>();
+                //List<dynamic> nationalTravelFeeData1 = new List<dynamic>();
 
-                foreach (var item in nationalTravel)
-                {
-                    var cityData = nationalTravelFeeData.Where(it => it.Country == item.Country).ToList();
-                    var otherData = cityData.Where(it => it.City.Contains("其他城市")).FirstOrDefault();
-                    if (otherData != null)
-                    {
-                        cityData.Remove(otherData);
-                        cityData.Add(otherData);
-                    }
+                //foreach (var item in nationalTravel)
+                //{
+                //    var cityData = nationalTravelFeeData.Where(it => it.Country == item.Country).ToList();
+                //    var otherData = cityData.Where(it => it.City.Contains("其他城市")).FirstOrDefault();
+                //    if (otherData != null)
+                //    {
+                //        cityData.Remove(otherData);
+                //        cityData.Add(otherData);
+                //    }
 
 
-                    nationalTravelFeeData1.Add(new
-                    {
-                        Country = item.Country,
-                        CityData = cityData
-                    });
-                }
+                //    nationalTravelFeeData1.Add(new
+                //    {
+                //        Country = item.Country,
+                //        CityData = cityData
+                //    });
+                //}
 
                 sw.Stop();
-                return Ok(JsonView(true, "查询成功!耗时:" + sw.ElapsedMilliseconds + "ms", nationalTravelFeeData1));
+                return Ok(JsonView(true, "查询成功!耗时:" + sw.ElapsedMilliseconds + "ms", nationalTravelFeeData));
             }
             catch (Exception ex)
             {
@@ -2608,6 +2677,82 @@ namespace OASystem.API.Controllers
             }
         }
 
+        /// <summary>
+        /// 团组模块 - 出入境国家费用标准 Page List Data Source
+        /// </summary>
+        /// <returns></returns>
+        [HttpPost]
+        [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
+        public async Task<IActionResult> GetNationalTravelFeePageDataSource()
+        {
+           
+            string sql = string.Format(@"Select * From Grp_NationalTravelFee Where Isdel = 0  ");
+
+            var nationalTravelFeeData = await _groupRepository._sqlSugar.SqlQueryable<Grp_NationalTravelFee>(sql).ToListAsync();
+
+            List<string> countryData = new List<string>();
+
+            countryData.AddRange( nationalTravelFeeData.Select(it => it.Country ).ToList());
+            countryData = countryData.Distinct().ToList();
+
+            List<dynamic> dataSource = new List<dynamic>();
+            foreach (var item in countryData)
+            {
+                List<string> cityData1 = new List<string>();
+                cityData1 = nationalTravelFeeData.Where(it => it.Country == item).Select(it => it.City).ToList();
+                var countryData2 = new
+                {
+                    CountryName = item,
+                    CityData = cityData1
+                };
+                
+                dataSource.Add(countryData2);
+            }
+
+            return Ok(JsonView(true, "查询成功!", dataSource));
+        }
+
+        /// <summary>
+        /// 团组模块 - 出入境国家费用标准 Page List
+        /// </summary>
+        /// <returns></returns>
+        [HttpPost]
+        [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
+        public async Task<IActionResult> PostNationalTravelFeePage(NationalTravelFeePageDto dto)
+        {
+            int portId = dto.PortType;
+            if (portId != 1 && portId != 2 && portId != 3) return Ok(JsonView(false, "请输入正确的端口号!\r\n请求端口分类1 Web 2 Android 3 IOS")); 
+
+            if (dto.PageIndex == 0)  return Ok(JsonView(false, "当前页码数不能为0!"));
+            if (dto.PageSize == 0) return Ok(JsonView(false, "每页条数不能0!"));
+
+            string whereSql = string.Empty;
+            if (!string.IsNullOrEmpty(dto.Country))
+            {
+                whereSql += string.Format(@" And gntf.Country ='{0}'", dto.Country);
+            }
+
+            if (!string.IsNullOrEmpty(dto.City))
+            {
+                whereSql += string.Format(@" And gntf.City='{0}'", dto.City);
+            }
+
+            string pageSql = string.Format(@"Select * From (
+                                             Select row_number() over(order by gntf.LastUpdateTime Desc) as RowNumber,
+                                             ssd.Name as CurrencyCode, ssd.Remark as CurrencyName,su.CnName as LastUpdateUserName,gntf.* 
+                                             From Grp_NationalTravelFee gntf
+                                             Left Join Sys_SetData ssd On ssd.STid = 66 And gntf.Currency = ssd.Id
+                                             Left Join Sys_Users su On gntf.LastUpdateUserId = su.Id 
+                                             Where gntf.Isdel = 0 {0} ) temp ", whereSql);
+            RefAsync<int> total = 0;
+            var nationalTravelFeeData = await _groupRepository._sqlSugar.SqlQueryable<NationalTravelFeePageInfoView>(pageSql).ToPageListAsync(dto.PageIndex, dto.PageSize, total);
+
+
+
+            return Ok(JsonView(true, "查询成功!", nationalTravelFeeData, (int)total));
+
+        }
+
         /// <summary>
         /// 团组模块 - 出入境国家费用标准 - Add Or Update
         /// </summary>
@@ -2633,6 +2778,41 @@ namespace OASystem.API.Controllers
             }
         }
 
+        /// <summary>
+        /// 团组模块 - 出入境国家费用标准 - Del
+        /// </summary>
+        /// <returns></returns>
+        [HttpPost]
+        [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
+        public async Task<IActionResult> PostNationalTravelFeeDel(NationalTravelFeeDelDto dto)
+        {
+            try
+            {
+                Grp_NationalTravelFee _nationalTravelFee = new Grp_NationalTravelFee() { 
+                    Id = dto.Id,
+                    DeleteUserId = dto.DeleteUserId,
+                    DeleteTime = DateTime.Now.ToString("yyyy-MM-dd"),
+                    IsDel = 1
+                };
+
+                var delStatus = await _enterExitCostRep._sqlSugar.Updateable<Grp_NationalTravelFee>(_nationalTravelFee)
+                                               .UpdateColumns(it => new { it.DeleteTime, it.DeleteUserId, it.IsDel })
+                                               .WhereColumns(it => new { it.Id })
+                                               .ExecuteCommandAsync();
+
+                if (delStatus <= 0)
+                {
+                    return Ok(JsonView(false, "删除失败!"));
+                }
+
+                return Ok(JsonView(true, "操作成功!"));
+            }
+            catch (Exception ex)
+            {
+                return Ok(JsonView(false, ex.Message));
+            }
+        }
+
         #endregion
     }
 }

+ 170 - 5
OASystem/OASystem.Api/Controllers/PersonnelModuleController.cs

@@ -6,8 +6,10 @@ using OASystem.Domain.Entities.PersonnelModule;
 using OASystem.Domain.ViewModels.PersonnelModule;
 using OASystem.Domain.ViewModels.QiYeWeChat;
 using OASystem.Infrastructure.Repositories.PersonnelModule;
+using System.Data;
 using System.Diagnostics;
 using System.Globalization;
+using System.IO;
 
 namespace OASystem.API.Controllers
 {
@@ -357,16 +359,14 @@ namespace OASystem.API.Controllers
                     else
                     {
                         salary = salary = (PayrollComputation.ConvertToDecimal(salary / pm_WageSheet.WorkDays) * pm_WageSheet.RegularDays) + pm_WageSheet.Mealsupplement;
-                    }     
-
-                    
+                    }    
                 }
 
                 
                 decimal actualTotal = salary - totalDeduction;
                 pm_WageSheet.Should = salary;
                 pm_WageSheet.TotalDeductions = totalDeduction;
-                pm_WageSheet.TotalRealHair = actualTotal;
+                pm_WageSheet.TotalRealHair = actualTotal - pm_WageSheet.WithholdingTax;
                 pm_WageSheet.AfterTax = actualTotal - pm_WageSheet.WithholdingTax;
 
                 #endregion
@@ -489,7 +489,6 @@ namespace OASystem.API.Controllers
             return Ok(JsonView(true, "操作成功! 耗时:" + (sw.ElapsedMilliseconds/1000) + "s"));
         }
 
-
         /// <summary>
         /// 计算工资 By YearMonth And UserId
         /// </summary>
@@ -624,6 +623,172 @@ namespace OASystem.API.Controllers
             return Ok(JsonView(true, "操作成功!耗时:" + (sw.ElapsedMilliseconds / 1000) + "s", new { FileUrl = fileUrl }));
         }
 
+        /// <summary>
+        /// 下载个税模板
+        /// </summary>
+        /// <returns></returns>
+        [HttpPost]
+        [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
+        public async Task<IActionResult> WageSheetTaxTemplate()
+        {
+            string serverUrl = AppSettingsHelper.Get("WageSheetExcelBaseUrl");
+            return Ok(JsonView(true, "操作成功!",new { FileUrl = serverUrl + "Office/WageSheetFile/个税导入模板.xlsx" }));
+        }
+
+        /// <summary>
+        /// 上传个税
+        /// </summary>
+        /// <returns></returns>
+        [HttpPost]
+        [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
+        public async Task<IActionResult> UploadTax(IFormFile file)
+        {
+            try
+            {
+                var yearMonth = Request.Headers["YearMonth"].ToString();
+                //string yearMonth = "2023-10";
+                string ymFormat = "yyyy-MM";
+                DateTime yearMonthDt;
+                bool yearMonthDtIsValid = DateTime.TryParseExact(yearMonth, ymFormat, CultureInfo.InvariantCulture, DateTimeStyles.None, out yearMonthDt);
+                if (!yearMonthDtIsValid) return Ok(JsonView(false, "年月格式错误!正确时间格式:yyyy-MM  "));
+                if (file != null)
+                {
+                    var fileDir = AppSettingsHelper.Get("WageSheetExcelFptPath");
+                    //文件名称
+                    string projectFileName = file.FileName;
+
+                    //上传的文件的路径
+                    string filePath = "";
+
+
+                    if (!Directory.Exists(fileDir))
+                    {
+                        Directory.CreateDirectory(fileDir);
+                    }
+
+                    //上传的文件的路径
+                    filePath = fileDir + $@"\{projectFileName}";
+
+                    if (System.IO.File.Exists(filePath))
+                    {
+                        //删除文件
+                        System.IO.File.Delete(filePath);
+                    }
+
+                    using (FileStream fs = System.IO.File.Create(filePath))
+                    {
+                        file.CopyTo(fs);
+                        fs.Flush();
+                    }
+
+                    if (System.IO.File.Exists(filePath))
+                    {
+                        Workbook book = new Workbook(filePath);
+                        DataSet dataSet = new DataSet();
+                        if (book.Worksheets.Count > 0)
+                        {
+                            var sheet = book.Worksheets[0];
+
+                            if (sheet != null)
+                            {
+                                // sheets 中的数据必须存在
+                                if (sheet.Cells.MaxDataRow != -1 && sheet.Cells.MaxDataColumn != -1)
+                                {
+                                    // 方法 ExportDataTable 的参数说明
+                                    //  要导出的第一个单元格的行号。
+                                    //  要导出的第一个单元格的列号。
+                                    //  要导入的行数。
+                                    //  要导入的列数。
+                                    //  指示第一行的数据是否导出到DataTable的列名。
+                                    DataTable dataTable = sheet.Cells.ExportDataTable(0, 0, sheet.Cells.MaxDataRow + 1, sheet.Cells.MaxDataColumn + 1, true);
+                                    dataSet.Tables.Add(dataTable);
+
+                                    DataTable taxData = dataSet.Tables[0];
+
+                                    //公司部门
+                                    string sql = string.Format(@"Select row_number() over(order by pm_ws.Id) as Row_Number,
+                                         	sc.Id as CompanyId,sc.CompanyName,sd.Id as DepId,sd.DepName, 
+                                         	sys_u1.CnName Name,sys_u2.CnName LastUpdateUserName,pm_ws.* 
+                                         From Pm_WageSheet pm_ws
+                                         Left Join Sys_Users sys_u1 On pm_ws.UserId = sys_u1.Id
+                                         Left Join Sys_Users sys_u2 On pm_ws.LastUpdateUserId = sys_u2.Id
+                                         Left Join Sys_Company sc On  sys_u1.companyId = sc.Id
+                                         Left Join Sys_Department sd On sys_u1.DepId = sd.Id
+                                         Where pm_ws.IsDel = 0 And pm_ws.YearMonth = '{0}'
+                                         Order By UserId Asc ", yearMonth);
+                                    var wageSheetList = await _wageSheetRep._sqlSugar.SqlQueryable<WageSheetInfoView>(sql).ToListAsync();
+
+                                    if (wageSheetList.Count <= 0)
+                                    {
+                                        return Ok(JsonView(false, yearMonth + "工资数据不存在,请先添加工资数据!"));
+                                    }
+
+                                    for (int i = 0; i < taxData.Rows.Count; i++)
+                                    {
+                                        string name = taxData.Rows[i][0].ToString().Trim();
+
+                                        List<WageSheetInfoView> wageSheets = new List<WageSheetInfoView>();
+                                        wageSheets = wageSheetList.Where(it => it.Name.Equals(name)).ToList();
+                                        if (wageSheets.Count > 0)
+                                        {
+                                            wageSheetList.Where(it => it.Name.Equals(name))
+                                            .Select(it =>
+                                             {
+                                                 //修改 绩效不等于0.00M的数据
+                                                 decimal oldTax = it.WithholdingTax;
+                                                 decimal newTax = Convert.ToDecimal(taxData.Rows[i][1].ToString());
+                                                 it.WithholdingTax = newTax;
+                                                 it.TotalRealHair = it.Should - it.TotalDeductions - newTax;
+                                                 return it;
+                                             })
+                                            .ToList();
+                                        }
+                                    }
+                                    List<Pm_WageSheet> wageSheets1 = new List<Pm_WageSheet>();
+                                    wageSheets1 = _mapper.Map<List<Pm_WageSheet>>(wageSheetList);
+                                    var updateStatus = _wageSheetRep._sqlSugar
+                                        .Updateable(wageSheets1)
+                                        .UpdateColumns(it => new { it.WithholdingTax,it.TotalRealHair})
+                                        .ExecuteCommand();
+
+                                    if (updateStatus<0)
+                                    {
+                                        return Ok(JsonView(false, "操作失败!"));
+                                    }
+
+                                    if (System.IO.File.Exists(filePath))
+                                    {
+                                        //删除文件
+                                        System.IO.File.Delete(filePath);
+                                    }
+                                    return Ok(JsonView(true, "操作成功!"));
+
+                                }
+                            }
+                            else
+                            {
+                                return Ok(JsonView(false, "工作薄没有数据!"));
+                            }
+
+
+                        }
+                    }
+
+                    return Ok(JsonView(true, "上传成功!", projectFileName));
+                }
+                else
+                {
+                    return Ok(JsonView(false, "上传失败!"));
+                }
+            }
+            catch (Exception ex)
+            {
+                return Ok(JsonView(false, "程序错误!"));
+                throw;
+            }
+            return Ok(JsonView(true, "操作成功!"));
+        }
+
         #endregion
 
     }

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

@@ -126,6 +126,5 @@ namespace OASystem.API.OAMethodLib
 
         #endregion
 
-
     }
 }

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 192 - 867
OASystem/OASystem.Api/OAMethodLib/PayrollComputation.cs


+ 4 - 67
OASystem/OASystem.Api/appsettings.json

@@ -122,73 +122,10 @@
   "GrpFileBasePath": "C:/Server/File/OA2023/Office/GrpFile/",
 
   "VisaProgressImageBaseUrl": "http://132.232.92.186:24/",
-  "VisaProgressImageFtpPath": "C:/Server/File/OA2023/Image/Visa/",
+  "VisaProgressImageBasePath": "C:/Server/File/OA2023/Image/Visa/",
+  "VisaProgressImageFtpPath": "Image/Visa/",
 
-  //节假日
-  "HoliDayDataSource": [
-    {
-      "Year": "2023",
-      "Holidays": [
-        {
-          "HoliDate": "09-29",
-          "HoliName": "中秋"
-        },
-        {
-          "HoliDate": "09-30",
-          "HoliName": "中秋"
-        },
-        {
-          "HoliDate": "10-01",
-          "HoliName": "国庆"
-        },
-        {
-          "HoliDate": "10-02",
-          "HoliName": "国庆"
-        },
-        {
-          "HoliDate": "10-03",
-          "HoliName": "国庆"
-        },
-        {
-          "HoliDate": "10-04",
-          "HoliName": "国庆"
-        },
-        {
-          "HoliDate": "10-05",
-          "HoliName": "国庆"
-        },
-        {
-          "HoliDate": "10-06",
-          "HoliName": "国庆"
-        },
-        {
-          "HoliDate": "10-07",
-          "HoliName": "工作日"
-        },
-        {
-          "HoliDate": "10-08",
-          "HoliName": "工作日"
-        },
-        {
-          "HoliDate": "12-30",
-          "HoliName": "元旦"
-        },
-        {
-          "HoliDate": "12-31",
-          "HoliName": "元旦"
-        }
-      ]
-    },
-    {
-      "Year": "2024",
-      "Holidays": [
-        {
-          "HoliDate": "01-01",
-          "HoliName": "元旦"
-        }
-      ]
-    }
-
-  ]
+  "WageSheetExcelBaseUrl": "http://132.232.92.186:24/",
+  "WageSheetExcelFptPath": "C:/Server/File/OA2023/Office/WageSheetFile/"
 
 }

+ 3 - 0
OASystem/OASystem.Domain/AutoMappers/_baseMappingProfile.cs

@@ -215,6 +215,9 @@ namespace OASystem.Domain.AutoMappers
             CreateMap<WageAddOrEditDto, Pm_WageSheet>();
             CreateMap<WageSheetInfos, Pm_WageSheet>();
             CreateMap<SalaryCalculatorSingleDto, Pm_WageSheet>();
+            CreateMap<WageSheetInfoView, Pm_WageSheet>();
+            CreateMap<Pm_WageSheet, WageSheetInfoView>();
+
             CreateMap<Pm_WageSheet, WageSheetInfoView>();
 
             CreateMap<WageSheetMonthWorkdaysAddOrEditDto, Pm_WageIssueWorkingDay>();

+ 21 - 0
OASystem/OASystem.Domain/Dtos/Financial/ProceedsReceivedDto.cs

@@ -124,4 +124,25 @@ namespace OASystem.Domain.Dtos.Financial
         /// </summary>
         public List<int>? SubIds { get; set; }
     }
+    #region word Download
+
+    /// <summary>
+    /// 收款账单 word Download
+    /// </summary>
+    public class AccountReceivableWordExportDto
+    {
+        /// <summary>
+        /// 团组Id
+        /// </summary>
+        public int DiId { get; set; }
+
+        /// <summary>
+        /// 模板类型
+        /// 1 四川 2 北京
+        /// </summary>
+        public int TemplateType { get; set; }
+    }
+
+    #endregion
+
 }

+ 24 - 0
OASystem/OASystem.Domain/Dtos/Groups/EnterExitCostDto.cs

@@ -218,12 +218,36 @@ namespace OASystem.Domain.Dtos.Groups
 
     }
 
+    /// <summary>
+    /// 团组模块 - 出入境国家费用标准 Page List
+    /// </summary>
+    public class NationalTravelFeePageDto : DtoBase
+    {
+        /// <summary>
+        /// 国家
+        /// </summary>
+        public string Country { get; set; }
+
+        /// <summary>
+        /// 城市
+        /// </summary>
+        public string City { get; set; }
+    }
+
     /// <summary>
     /// 出入境费用子项删除
     /// </summary>
     public class EnterExitCostSubItemDelDto : DelBaseDto
     { }
 
+    /// <summary>
+    /// 团组模块 - 出入境国家费用标准 - Del
+    /// </summary>
+    public class NationalTravelFeeDelDto : DelBaseDto
+    {
+        
+    }
+
     /// <summary>
     /// 团组模块 - 出入境国家费用标准 - Add Or Update Dto
     /// </summary>

+ 11 - 0
OASystem/OASystem.Domain/Dtos/Groups/GroupListDto.cs

@@ -22,6 +22,17 @@ namespace OASystem.Domain.Dtos.Groups
     {
     }
 
+    /// <summary>
+    /// 获取团组singe Share 请求实体类
+    /// </summary>
+    public class ShareGroupInfoDto : PortDtoBase
+    {
+        /// <summary>
+        /// 团组Id 
+        /// </summary>
+        public int Id { get; set; }
+    }
+
     /// <summary>
     /// 获取团组singe 请求实体类
     /// </summary>

+ 12 - 0
OASystem/OASystem.Domain/Dtos/Groups/VisaDto.cs

@@ -30,4 +30,16 @@ namespace OASystem.Domain.Dtos.Groups
         public int visaProgressCustomerId { get; set; }
         public int CreateUserId { get; set; }
     }
+
+    public class IOS_VisaChangeStatusDto : PortDtoBase
+    {
+        public int visaStatus { get; set; }
+        public int visaProgressCustomerId { get; set; }
+        public int diId { get; set; }
+        /// <summary>
+        /// 0:不通知,1:发送通知
+        /// </summary>
+        public int publishCode { get; set; }
+        public int publisher { get; set; }
+    }
 }

+ 3 - 0
OASystem/OASystem.Domain/Dtos/System/MessageDto.cs

@@ -18,6 +18,7 @@ namespace OASystem.Domain.Dtos.System
         /// 2 团组流程管控消息
         /// 1 团组业务操作消息
         /// 2 费用审核消息
+        /// 5 团组签证进度通知
         /// </summary>
         public int Type { get; set; }
 
@@ -26,6 +27,8 @@ namespace OASystem.Domain.Dtos.System
         /// </summary>
         public int IssuerId { get; set; }
 
+        public int DiId { get; set; } = 0;
+
         /// <summary>
         /// 消息标题
         /// </summary>

+ 3 - 3
OASystem/OASystem.Domain/Entities/Groups/Grp_NationalTravelFee.cs

@@ -41,19 +41,19 @@ namespace OASystem.Domain.Entities.Groups
         /// <summary>
         /// 住宿费
         /// </summary>
-        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(50)")]
+        [SugarColumn(IsNullable = true, ColumnDataType = "decimal(10,2)")]
         public string? RoomCost { get; set; }
 
         /// <summary>
         /// 伙食费
         /// </summary>
-        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(50)")]
+        [SugarColumn(IsNullable = true, ColumnDataType = "decimal(10,2)")]
         public string? FoodCost { get; set; }
 
         /// <summary>
         /// 公杂费 
         /// </summary>
-        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(50)")]
+        [SugarColumn(IsNullable = true, ColumnDataType = "decimal(10,2)")]
         public string? PublicCost { get; set; }
 
         /// <summary>

+ 2 - 2
OASystem/OASystem.Domain/Entities/PersonnelModule/Pm_WageSheet.cs

@@ -197,7 +197,7 @@ namespace OASystem.Domain.Entities.PersonnelModule
         public decimal TotalDeductions { get; set; }
 
         /// <summary>
-        /// 实发合计
+        /// 实发合计(税后工资)
         /// </summary>
         [SugarColumn(IsNullable = true, ColumnDataType = "decimal(8,2)")]
         public decimal TotalRealHair { get; set; }
@@ -209,7 +209,7 @@ namespace OASystem.Domain.Entities.PersonnelModule
         public decimal WithholdingTax { get; set; }
 
         /// <summary>
-        /// 税后工资
+        /// 税后工资 弃用
         /// </summary>
         [SugarColumn(IsNullable = true, ColumnDataType = "decimal(8,2)")]
         public decimal AfterTax { get; set; }

+ 7 - 0
OASystem/OASystem.Domain/Entities/System/Sys_Message.cs

@@ -9,6 +9,7 @@ namespace OASystem.Domain.Entities.System
     /// <summary>
     /// 系统消息 表
     /// </summary>
+    [SugarTable("Sys_Message")]
     public class Sys_Message :EntityBase
     {
         /// <summary>
@@ -28,6 +29,12 @@ namespace OASystem.Domain.Entities.System
         [SugarColumn(IsNullable = true,ColumnDataType = "int")]
         public int IssuerId { get; set; }
 
+        /// <summary>
+        /// 团组Id,可为0
+        /// </summary>
+        [SugarColumn(IsNullable = true,ColumnDataType = "int")]
+        public int DiId { get; set; }
+
         /// <summary>
         /// 消息标题
         /// </summary>

+ 49 - 1
OASystem/OASystem.Domain/ViewModels/Groups/DelegationInfoView.cs

@@ -15,7 +15,55 @@ namespace OASystem.Domain.ViewModels.Groups
     /// 返回视图
     /// </summary>
     public class DelegationInfoView : Grp_DelegationInfo { }
-    
+
+    /// <summary>
+    /// 接团信息详情 共享
+    /// 返回视图
+    /// </summary>
+    public class ShareGroupInfoView
+    {
+        /// <summary>
+        /// 主键Id
+        /// </summary>
+        public int Id { get; set; }
+
+        /// <summary>
+        /// 团号
+        /// </summary>
+        public string? TourCode { get; set; }
+       
+        /// <summary>
+        /// 客户名称
+        /// </summary>
+        public string? ClientName { get; set; }
+
+        /// <summary>
+        /// 出访国家
+        /// </summary>
+        public string? VisitCountry { get; set; }
+
+        /// <summary>
+        /// 出团开始日期 
+        /// </summary>
+        public DateTime VisitStartDate { get; set; }
+
+        /// <summary>
+        /// 出团结束日期 
+        /// </summary>
+        public DateTime VisitEndDate { get; set; }
+
+        /// <summary>
+        /// 出行天数
+        /// </summary>
+        public int VisitDays { get; set; }
+
+        /// <summary>
+        /// 出行人数
+        /// </summary>
+        public int VisitPNumber { get; set; }
+
+    }
+
     /// <summary>
     /// 接团信息详情
     /// 返回视图

+ 85 - 3
OASystem/OASystem.Domain/ViewModels/Groups/EnterExitCostView.cs

@@ -90,6 +90,86 @@ namespace OASystem.Domain.ViewModels.Groups
         public DateTime? LastUpdateTime { get; set; }
     }
 
+    /// <summary>
+    /// 出入境国家(城市)费用标准 Page Info  View
+    /// </summary>
+    public class NationalTravelFeePageInfoView
+    {
+        /// <summary>
+        /// 行号
+        /// </summary>
+        public int RowNumber { get; set; }
+
+        public int Id { get; set; }
+
+        /// <summary>
+        /// 洲别
+        /// </summary>
+        public string? Continent { get; set; }
+
+        /// <summary>
+        /// 国家
+        /// </summary>
+        public string? Country { get; set; }
+
+        /// <summary>
+        /// 城市
+        /// </summary>
+        public string? City { get; set; }
+
+        /// <summary>
+        /// 币种
+        /// Sys_SetData STid=66
+        /// </summary>
+        public int Currency { get; set; }
+
+        /// <summary>
+        /// 币种code
+        /// </summary>
+        public string CurrencyCode { get; set; }
+
+        /// <summary>
+        /// 币种名称
+        /// </summary>
+        public string CurrencyName { get; set; }
+
+        /// <summary>
+        /// 住宿费
+        /// </summary>
+        public decimal RoomCost { get; set; }
+
+        /// <summary>
+        /// 伙食费
+        /// </summary>
+        public decimal FoodCost { get; set; }
+
+        /// <summary>
+        /// 公杂费 
+        /// </summary>
+        public decimal PublicCost { get; set; }
+
+        /// <summary>
+        /// 备注
+        /// </summary>
+        public string Remark { get; set; }
+
+        /// <summary>
+        /// 最后更新人 
+        /// </summary>
+        public int LastUpdateUserId { get; set; }
+
+        /// <summary>
+        /// 最后更新人
+        /// </summary>
+        public string LastUpdateUserName { get; set; }
+
+        /// <summary>
+        /// 最后更新时间 
+        /// </summary>
+        public DateTime? LastUpdateTime { get; set; } = DateTime.Now;
+
+    }
+
     /// <summary>
     /// 出入境费用info
     /// </summary>
@@ -333,9 +413,11 @@ namespace OASystem.Domain.ViewModels.Groups
             get
             {
                 string str = "";
-
-                if (City.Contains("城市")) str = Country;
-                else str = City;
+                if (!string.IsNullOrEmpty(Country))
+                {
+                    if (City.Contains("城市")) str = Country;
+                    else str = City;
+                }
 
                 return str;
 

+ 67 - 14
OASystem/OASystem.Domain/ViewModels/PersonnelModule/WageSheetView.cs

@@ -163,9 +163,15 @@ namespace OASystem.Domain.ViewModels.PersonnelModule
         public decimal TotalDeductions { get; set; }
 
         /// <summary>
-        /// 实发合计
+        /// 税前合计
         /// </summary>
-        public decimal TotalRealHair { get; set; }
+        public decimal BeforeTax
+        {
+            get
+            {
+                return Should - TotalDeductions;
+            }
+        }
 
         /// <summary>
         /// 代扣个税
@@ -173,9 +179,9 @@ namespace OASystem.Domain.ViewModels.PersonnelModule
         public decimal WithholdingTax { get; set; }
 
         /// <summary>
-        /// 税后工资
+        /// 实发合计(税后工资)
         /// </summary>
-        public decimal AfterTax { get; set; }
+        public decimal TotalRealHair { get; set; }
 
         /// <summary>
         /// 最后操作人
@@ -280,11 +286,6 @@ namespace OASystem.Domain.ViewModels.PersonnelModule
         /// </summary>
         public string? Ex_ItemsRemark { get; set; }
 
-        /// <summary>
-        /// 实发合计
-        /// </summary>
-        public decimal TotalRealHair { get; set; }
-
         /// <summary>
         /// 代扣个税
         /// </summary>
@@ -297,14 +298,14 @@ namespace OASystem.Domain.ViewModels.PersonnelModule
         {
             get
             {
-                return WithholdingTax + AfterTax;
+                return Should - TotalDeductions;
             }
         }
 
         /// <summary>
-        /// 税后工资
+        /// 实发合计(税后工资)
         /// </summary>
-        public decimal AfterTax { get; set; }
+        public decimal TotalRealHair { get; set; }
 
         /// <summary>
         /// 最后操作人
@@ -380,7 +381,6 @@ namespace OASystem.Domain.ViewModels.PersonnelModule
         /// </summary>
         public string? Name { get; set; }
 
-
         /// <summary>
         /// 税前合计
         /// </summary>
@@ -388,10 +388,15 @@ namespace OASystem.Domain.ViewModels.PersonnelModule
         {
             get
             {
-                return WithholdingTax + AfterTax;
+                return Should - TotalDeductions;
             }
         }
 
+        /// <summary>
+        /// 实发合计(税后工资)
+        /// </summary>
+        public decimal TotalRealHair { get; set; }
+
         /// <summary>
         /// 最后操作人
         /// </summary>
@@ -418,6 +423,54 @@ namespace OASystem.Domain.ViewModels.PersonnelModule
 
     #region 假勤 和 打卡 统计
 
+    /// <summary>
+    /// 假期详情
+    /// </summary>
+    public class LeaveDetails
+    {
+        /// <summary>
+        /// 假期类型Id
+        /// </summary>
+        public int TypeId { get; set; }
+
+        /// <summary>
+        /// 假期名称
+        /// </summary>
+        public string TypeName { get; set; }
+
+        /// <summary>
+        /// 开始日期
+        /// </summary>
+        public DateTime StartDt { get; set; }
+
+        /// <summary>
+        /// 结束日期
+        /// </summary>
+        public DateTime EndDt { get; set; }
+
+        /// <summary>
+        /// 时间展示类型:halfday-日期;hour-日期+时间
+        /// </summary>
+        public string DtType { get; set; }
+
+        /// <summary>
+        /// 时长单位
+        /// 小时/天
+        /// </summary>
+        public string Unit { get; set; }
+
+        /// <summary>
+        /// 请假时长
+        /// </summary>
+        public decimal New_Duration { get; set; }
+
+        /// <summary>
+        /// 申请时间
+        /// </summary>
+        public DateTime  ApplyDt { get; set; }
+    }
+
+
     public class Ex_Items
     {
         /// <summary>

+ 15 - 10
OASystem/OASystem.Infrastructure/Repositories/Financial/ForeignReceivablesRepository.cs

@@ -36,6 +36,8 @@ namespace OASystem.Infrastructure.Repositories.Financial
             _setDataRep = setDataRep;
         }
 
+        #region 关联已收款项
+
         /// <summary>
         /// 收款账单 数据源
         /// </summary>
@@ -45,13 +47,14 @@ namespace OASystem.Infrastructure.Repositories.Financial
             Result result = new() { Code = -2 };
 
             var groupNameData = await _delegationRep.GetGroupNameList(new GroupNameDto());
-            var currencyData = await _setDataRep.GetSetDataBySTId(_setDataRep,66); //币种
+            var currencyData = await _setDataRep.GetSetDataBySTId(_setDataRep, 66); //币种
             var remittanceMethodData = await _setDataRep.GetSetDataBySTId(_setDataRep, 14); //汇款方式
 
             result.Code = 0;
             result.Msg = "成功!";
-            result.Data = new {
-                GroupNameData= groupNameData.Data,
+            result.Data = new
+            {
+                GroupNameData = groupNameData.Data,
                 CurrencyData = currencyData.Data,
                 RemittanceMethodData = remittanceMethodData.Data
             };
@@ -79,14 +82,14 @@ namespace OASystem.Infrastructure.Repositories.Financial
             var groupProceedsReceivedList = await _sqlSugar.SqlQueryable<ProceedsReceivedView>(groupProceedsReceivedSql).ToListAsync();
 
             List<ProceedsReceivedView> NotFIDData = new List<ProceedsReceivedView>();
-            if (dto.PortType == 1 )
+            if (dto.PortType == 1)
             {
                 foreach (var item in groupReceivedList)
                 {
                     item._ProceedsReceivedDatas = groupProceedsReceivedList.Where(s => s.FID == item.Id).ToList();
                 }
 
-                NotFIDData = groupProceedsReceivedList.Where(s =>! groupReceivedList.Any(e => s.FID == e.Id)).ToList();
+                NotFIDData = groupProceedsReceivedList.Where(s => !groupReceivedList.Any(e => s.FID == e.Id)).ToList();
 
             }
 
@@ -158,11 +161,11 @@ namespace OASystem.Infrastructure.Repositories.Financial
             catch (Exception ex)
             {
                 _sqlSugar.RollbackTran();
-                result.Msg= ex.Message;
+                result.Msg = ex.Message;
                 return result;
             }
 
-            
+
 
             return result;
         }
@@ -209,7 +212,7 @@ namespace OASystem.Infrastructure.Repositories.Financial
                 }
                 if (_ForeignReceivables.Count > 0)
                 {
-                    var x =  _sqlSugar.Storageable(_ForeignReceivables).ToStorage();
+                    var x = _sqlSugar.Storageable(_ForeignReceivables).ToStorage();
                     addCount = x.AsInsertable.ExecuteCommand();        //不存在插入
                     updateCount = x.AsUpdateable.ExecuteCommand();    //存在更新
                 }
@@ -254,7 +257,7 @@ namespace OASystem.Infrastructure.Repositories.Financial
             //string sql = string.Format(@"Select * From Fin_ProceedsReceived Where IsDel=0 And Diid={0}", diids);
 
             var groupReceivedList = await _sqlSugar.Queryable<Fin_ForeignReceivables>()
-                .Where(pr =>  pr.IsDel == 0 && diids.Contains(pr.Diid)).ToListAsync();
+                .Where(pr => pr.IsDel == 0 && diids.Contains(pr.Diid)).ToListAsync();
 
             result.Code = 0;
             result.Msg = "查询成功!";
@@ -264,7 +267,9 @@ namespace OASystem.Infrastructure.Repositories.Financial
 
         }
 
+        #endregion
+
+
 
-       
     }
 }

+ 66 - 0
OASystem/OASystem.Infrastructure/Repositories/Groups/DelegationInfoRepository.cs

@@ -39,6 +39,72 @@ namespace OASystem.Infrastructure.Repositories.Groups
             _taskAssignmentRep = taskAssignmentRep;
         }
 
+        #region 团组信息 团组详情共享Api
+
+        /// <summary>
+        /// 团组信息 团组详情共享Api
+        /// </summary>
+        /// <param name="dto"></param>
+        /// <returns></returns>
+        public async Task<Result> PostShareGroupInfo(ShareGroupInfoDto dto)
+        {
+            Result result = new Result() { Code = -2, Msg = "未知错误" };
+
+            if (dto.PortType == 1 || dto.PortType == 2) //Web Or Android
+            {
+                string sql = string.Format(@"Select Id,TourCode,ClientName,VisitCountry,VisitStartDate,VisitEndDate,VisitDays,VisitPNumber 
+                                             From Grp_DelegationInfo Where Id = {0} And IsDel = 0", dto.Id);
+
+                var _DelegationInfo = await _sqlSugar.SqlQueryable<ShareGroupInfoView>(sql).FirstAsync();
+                if (_DelegationInfo != null)
+                {
+                    if (_DelegationInfo.VisitCountry.Contains("|"))
+                    {
+                        _DelegationInfo.VisitCountry = _DelegationInfo.VisitCountry.Replace("|", "、");
+                    }
+
+                    result.Code = 0;
+                    result.Msg = "成功!";
+                    result.Data = _DelegationInfo;
+                }
+                else result.Msg = "暂无该团组信息";
+            }
+
+            return result;
+
+        }
+
+        #endregion
+        /// <summary>
+        /// 获取接团信息Info
+        /// </summary>
+        /// <param name="dto"></param>
+        /// <returns></returns>
+        public async Task<Result> PostGroupInfo(GroupInfoDto dto)
+        {
+            Result result = new Result() { Code = -2, Msg = "未知错误" };
+
+            if (dto.PortType == 1 || dto.PortType == 2) //Web Or Android
+            {
+                string sql = string.Format(@"Select Id,SalesQuoteNo,TourCode,JietuanOperator,TeamLevSId,TeamDid,TeamName,ClientName,
+	                                                ClientUnit,VisitCountry,VisitDate,VisitDays,VisitPNumber,TontractTime,
+	                                                PayDay,PaymentMoney,VisitPurpose,SpecialNeeds,OtherNeeds,CGRWSPBMMC,CGRWSPWH,
+	                                                ZZSCBMMC,ZZSCSPWH,Remark,TellPhone
+                                             From Grp_DelegationInfo Where Id = {0} And IsDel = 0", dto.Id);
+
+                var _DelegationInfo = await _sqlSugar.SqlQueryable<DelegationInfoWebView>(sql).FirstAsync();
+                if (_DelegationInfo != null)
+                {
+                    result.Code = 0;
+                    result.Msg = "成功!";
+                    result.Data = _DelegationInfo;
+                }
+                else result.Msg = "暂无该团组信息";
+            }
+
+            return result;
+
+        }
         #region 团组
 
         /// <summary>

+ 18 - 0
OASystem/OASystem.Infrastructure/Repositories/Groups/DelegationVisaRepository.cs

@@ -3,6 +3,7 @@ using OASystem.Domain.Dtos.Groups;
 using OASystem.Domain.Entities.Groups;
 using OASystem.Domain.ViewModels.Groups;
 using OASystem.Domain.ViewModels.Resource;
+using SqlSugar;
 using System;
 using System.Collections.Generic;
 using System.Linq;
@@ -55,6 +56,23 @@ From DelegationInfo With(Nolock) {2}
             return rst;
         }
 
+        public Grp_DelegationVisaView GetDelegationInfo(int diId)
+        {
+            ChangeDataBase(DBEnum.OA2014DB);
+
+            string sql = string.Format(@" Select * From(Select ROW_NUMBER() Over(order By Id desc) as RowNumber, Id as DiId,
+TeamName,ClientUnit,ClientName,TeamLev,VisitDate,VisitDays,VisitPNumber
+From DelegationInfo With(Nolock) Where Id = {0}
+) as tb  ", diId);
+            Grp_DelegationVisaView rst = _sqlSugar.SqlQueryable<Grp_DelegationVisaView>(sql).First();
+
+            string sql2 = string.Format(@" Select * From Grp_VisaProgressCustomer With(Nolock) Where DiId={0} And IsDel=0 ", diId);
+            List<Grp_VisaProgressCustomer> listComplete = _sqlSugar.SqlQueryable<Grp_VisaProgressCustomer>(sql2).ToList();
+
+            rst.CompletePNumber = string.Format(@"已完成{0}人", listComplete.Count);
+            return rst;
+        }
+
         public List<DelegationVisaProgressView> GetDelegationProgressList(int diid)
         {
             ChangeDataBase(DBEnum.OA2014DB);

+ 31 - 7
OASystem/OASystem.Infrastructure/Repositories/Groups/EnterExitCostRepository.cs

@@ -222,9 +222,33 @@ namespace OASystem.Infrastructure.Repositories.Groups
 
             if (dto.PortType == 1) //web
             {
+
                 var _nationalTravelFee = _sqlSugar.Storageable<Grp_NationalTravelFee>(nationalTravelFee).ToStorage();
-                _nationalTravelFee.AsInsertable.ExecuteCommand();   //不存在插入
-                _nationalTravelFee.AsUpdateable.IgnoreColumns(it => new { it.CreateUserId, it.CreateTime, it.IsDel }).ExecuteCommand();   //存在更新
+                if (dto.Id != 0) //新增
+                {
+                    string selectSql = string.Format(@"Select * From Grp_NationalTravelFee 
+                                                   Where IsDel = 0 
+                                                   And Continent = '{0}' 
+                                                   And Country = '{1}'
+                                                   And City = '{2}'", dto.Continent, dto.Country, dto.City);
+                    Grp_NationalTravelFee nationalTravelFee1 = new Grp_NationalTravelFee();
+                    nationalTravelFee1 = await _sqlSugar.SqlQueryable<Grp_NationalTravelFee>(selectSql).FirstAsync();
+                    if (nationalTravelFee1 != null)
+                    {
+                        result.Msg = "该国家 城市已存在,请勿重复添加!";
+                        return result;
+                    }
+
+                    _nationalTravelFee.AsInsertable.ExecuteCommand();   //不存在插入
+                }
+                else
+                {
+                    _nationalTravelFee.AsUpdateable
+                    .IgnoreColumns(it => new { it.CreateUserId, it.CreateTime, it.IsDel })
+                    .WhereColumns(it => it.Id)
+                    .ExecuteCommand();   //存在更新
+                }
+
                 result.Code = 0;
             }
             else if (dto.PortType == 2) //Android
@@ -232,12 +256,12 @@ namespace OASystem.Infrastructure.Repositories.Groups
 
             }
             else if (dto.PortType == 3) //Ios
-            { 
-            
-            }else 
-                result.Msg=ErrorMsg.Error_Port_Msg;
+            {
+
+            }
+            else result.Msg = ErrorMsg.Error_Port_Msg;
+
 
-                
 
 
 

+ 10 - 9
OASystem/OASystem.Infrastructure/Repositories/System/MessageRepository.cs

@@ -44,7 +44,8 @@ namespace OASystem.Infrastructure.Repositories.System
                     DeleteUserId = null,
                     DeleteTime = "1990-01-01 00:00:00.000",
                     Remark = "",
-                    IsDel = 0
+                    IsDel = 0,
+                    DiId = msgDto.DiId
                 };
 
                 int? msgId = await _sqlSugar.Insertable(message).ExecuteReturnIdentityAsync();
@@ -53,11 +54,11 @@ namespace OASystem.Infrastructure.Repositories.System
                 List<Sys_MessageReadAuth> messageReadAuths = new List<Sys_MessageReadAuth>();
                 foreach (int item in msgDto.UIdList)
                 {
-                    Sys_MessageReadAuth messageReadAuth = new Sys_MessageReadAuth() 
+                    Sys_MessageReadAuth messageReadAuth = new Sys_MessageReadAuth()
                     {
                         MsgId = msgId.Value,
                         ReadableUId = item,
-                        ReadTime = new DateTime(1990,1,1),
+                        ReadTime = new DateTime(1990, 1, 1),
                         CreateUserId = msgDto.IssuerId,
                         CreateTime = DateTime.Now,
                         DeleteUserId = null,
@@ -173,12 +174,12 @@ namespace OASystem.Infrastructure.Repositories.System
             if (dto.PortType == 1 || dto.PortType == 2)
             {
 
-                  var msgReadStatus = await _sqlSugar.Updateable<Sys_MessageReadAuth>()
-                                      .Where(a => a.Id == dto.MsgAnthId)
-                                      .SetColumns(a => new Sys_MessageReadAuth
-                                      {
-                                          IsRead = 1
-                                      }).ExecuteCommandAsync();
+                var msgReadStatus = await _sqlSugar.Updateable<Sys_MessageReadAuth>()
+                                    .Where(a => a.Id == dto.MsgAnthId)
+                                    .SetColumns(a => new Sys_MessageReadAuth
+                                    {
+                                        IsRead = 1
+                                    }).ExecuteCommandAsync();
 
                 if (msgReadStatus > 0)
                 {