Browse Source

1、酒店预订-->自动审核 处理相关问题
2、费用审核-->酒店预订-->详细信息处理成本相关金额
3、三公费用明细-->文档下载(成都市因公临时出国任务和预算审批意见表)-->处理文件名称
4、三明细费用明细 --> 操作更改 发送消息

amigotrip 9 months ago
parent
commit
e82160b6c4

+ 108 - 70
OASystem/OASystem.Api/Controllers/GroupsController.cs

@@ -147,7 +147,7 @@ namespace OASystem.API.Controllers
             CheckBoxsRepository checkBoxs, GroupCostRepository GroupCostRepository, CostTypeHotelNumberRepository CostTypeHotelNumberRepository,
             CheckBoxsRepository checkBoxs, GroupCostRepository GroupCostRepository, CostTypeHotelNumberRepository CostTypeHotelNumberRepository,
             GroupCostParameterRepository GroupCostParameterRepository, HotelPriceRepository hotelPriceRep, CustomersRepository customersRep, SetDataRepository setDataRep,
             GroupCostParameterRepository GroupCostParameterRepository, HotelPriceRepository hotelPriceRep, CustomersRepository customersRep, SetDataRepository setDataRep,
             TourClientListRepository tourClientListRep, TeamRateRepository teamRateRep, IHubContext<ChatHub, IChatClient> hubContext, UsersRepository usersRep, IJuHeApiService juHeApi,
             TourClientListRepository tourClientListRep, TeamRateRepository teamRateRep, IHubContext<ChatHub, IChatClient> hubContext, UsersRepository usersRep, IJuHeApiService juHeApi,
-            InvertedListRepository invertedListRep, VisaFeeInfoRepository visaFeeInfoRep, TicketBlackCodeRepository ticketBlackCodeRep, HotelInquiryRepository hotelInquiryRep, 
+            InvertedListRepository invertedListRep, VisaFeeInfoRepository visaFeeInfoRep, TicketBlackCodeRepository ticketBlackCodeRep, HotelInquiryRepository hotelInquiryRep,
             ThreeCodeRepository threeCodeRepository, FeeAuditRepository feeAuditRep)
             ThreeCodeRepository threeCodeRepository, FeeAuditRepository feeAuditRep)
         {
         {
             _mapper = mapper;
             _mapper = mapper;
@@ -1452,7 +1452,7 @@ namespace OASystem.API.Controllers
                 /*
                 /*
                  * 成本信息
                  * 成本信息
                  */
                  */
-                var groupCost = _groupRepository.Query<Grp_GroupCostParameter >(s => s.DiId == _dto.DiId && s.IsDel == 0).First();
+                var groupCost = _groupRepository.Query<Grp_GroupCostParameter>(s => s.DiId == _dto.DiId && s.IsDel == 0).First();
                 decimal _groupRate = 0.0000M;
                 decimal _groupRate = 0.0000M;
                 string _groupCurrencyCode = "-";
                 string _groupCurrencyCode = "-";
                 if (groupCost != null)
                 if (groupCost != null)
@@ -1558,15 +1558,25 @@ namespace OASystem.API.Controllers
                                          checkOut = Convert.ToDateTime(hotelReservations.CheckOutDate);
                                          checkOut = Convert.ToDateTime(hotelReservations.CheckOutDate);
                                 int hotel_days = (int)(checkOut - checkIn).TotalDays;
                                 int hotel_days = (int)(checkOut - checkIn).TotalDays;
 
 
-                                string roomFeeStr = "";
-                                if (hotelReservations.SingleRoomPrice>0) 
-                                    roomFeeStr += $"<br/><span style='width:70px;display: inline-block;'></span>单间:{hotelReservations.SingleRoomPrice.ToString("#0.00")} * {hotelReservations.SingleRoomCount}";
-                                if (hotelReservations.DoubleRoomPrice > 0) 
-                                    roomFeeStr += $"<br/><span style='width:70px;display: inline-block;'></span>双人间:{hotelReservations.DoubleRoomPrice.ToString("#0.00")} * {hotelReservations.DoubleRoomCount}";
-                                if (hotelReservations.SuiteRoomPrice > 0) 
-                                    roomFeeStr += $"<br/><span style='width:70px;display: inline-block;'></span>套房:{hotelReservations.SuiteRoomPrice.ToString("#0.00")} * {hotelReservations.SuiteRoomCount}";
-                                if (hotelReservations.OtherRoomPrice > 0) 
-                                    roomFeeStr += $"<br/><span style='width:70px;display: inline-block;'></span>其他:{hotelReservations.OtherRoomPrice.ToString("#0.00")} * {hotelReservations.OtherRoomCount}";
+                                string roomFeeStr = "", roomFeestr1 = "";
+
+                                //是否比较房型价格
+                                bool __isSingle = false, __isDouble = false, __isSuite = false, __isOther = false;
+
+                                roomFeeStr += $"<br/><span style='width:70px;display: inline-block;'></span>";
+
+                                if (hotelReservations.SingleRoomPrice > 0)
+                                { roomFeestr1 += $"单间:{hotelReservations.SingleRoomPrice.ToString("#0.00")} * {hotelReservations.SingleRoomCount}"; __isSingle = true; }
+                                if (hotelReservations.DoubleRoomPrice > 0)
+                                { roomFeestr1 += $"双人间:{hotelReservations.DoubleRoomPrice.ToString("#0.00")} * {hotelReservations.DoubleRoomCount}"; __isDouble = true; }
+                                if (hotelReservations.SuiteRoomPrice > 0)
+                                { roomFeestr1 += $"套房:{hotelReservations.SuiteRoomPrice.ToString("#0.00")} * {hotelReservations.SuiteRoomCount}"; __isSuite = true; }
+                                if (hotelReservations.OtherRoomPrice > 0)
+                                { roomFeestr1 += $"其他:{hotelReservations.OtherRoomPrice.ToString("#0.00")} * {hotelReservations.OtherRoomCount}"; __isOther = true; }
+
+                                if (roomFeestr1.Length > 0) roomFeeStr += roomFeestr1;
+                                else roomFeeStr += "  0.00 * 0";
+
 
 
                                 decimal governmentRentFee = 0.00M, cityTaxFee = 0.00M, breakfastFee = 0.00M, roomFee = 0.00M;
                                 decimal governmentRentFee = 0.00M, cityTaxFee = 0.00M, breakfastFee = 0.00M, roomFee = 0.00M;
                                 string governmentRentBool = "否", cityTaxBool = "否", breakfastBool = "否", roomBool = "否";
                                 string governmentRentBool = "否", cityTaxBool = "否", breakfastBool = "否", roomBool = "否";
@@ -1640,7 +1650,7 @@ namespace OASystem.API.Controllers
                                     }
                                     }
                                 }
                                 }
 
 
-                                string hotelCostTitalStr = "<span style='font-weight:800;'>成本信息</span><br/>"; 
+                                string hotelCostTitalStr = "<span style='font-weight:800;'>成本信息</span><br/>";
                                 string hotelCostStr = "";
                                 string hotelCostStr = "";
                                 decimal hotelCsotTotal = 0.00M;
                                 decimal hotelCsotTotal = 0.00M;
                                 if (groupCost != null)
                                 if (groupCost != null)
@@ -1650,7 +1660,7 @@ namespace OASystem.API.Controllers
                                     hotelCostStr += $"{groupCost.Currency}(汇率:{groupCost.Rate.ToString("#0.0000")})<br/>";
                                     hotelCostStr += $"{groupCost.Currency}(汇率:{groupCost.Rate.ToString("#0.0000")})<br/>";
                                 }
                                 }
 
 
-                                
+
                                 if (checkOut > checkIn) checkOut = checkOut.AddDays(-1);
                                 if (checkOut > checkIn) checkOut = checkOut.AddDays(-1);
 
 
 
 
@@ -1661,26 +1671,30 @@ namespace OASystem.API.Controllers
                                 {
                                 {
                                     hotelCsotTotal += item.Sum(x => x.HotelSingleRoomFee) + item.Sum(x => x.HotelDoubleRoomFee) + item.Sum(x => x.HotelSuiteRoomFee) + item.Sum(x => x.HotelSuiteFee);
                                     hotelCsotTotal += item.Sum(x => x.HotelSingleRoomFee) + item.Sum(x => x.HotelDoubleRoomFee) + item.Sum(x => x.HotelSuiteRoomFee) + item.Sum(x => x.HotelSuiteFee);
                                     hotelCost_day += @$"{item.First()?.Date ?? "-"}";
                                     hotelCost_day += @$"{item.First()?.Date ?? "-"}";
-                                    if (item.Sum(x => x.HotelSingleRoomFee) != 0) hotelCost_day += @$"   单间:{item.Sum(x => x.HotelSingleRoomFee).ToString("#0.00")}"; 
+                                    if (item.Sum(x => x.HotelSingleRoomFee) != 0) hotelCost_day += @$"   单间:{item.Sum(x => x.HotelSingleRoomFee).ToString("#0.00")}";
+                                    else { if (__isSingle) hotelCost_day += @$"   单间:0.00"; }
                                     if (item.Sum(x => x.HotelDoubleRoomFee) != 0) hotelCost_day += @$"   双人间:{item.Sum(x => x.HotelDoubleRoomFee).ToString("#0.00")}";
                                     if (item.Sum(x => x.HotelDoubleRoomFee) != 0) hotelCost_day += @$"   双人间:{item.Sum(x => x.HotelDoubleRoomFee).ToString("#0.00")}";
+                                    else { if (__isDouble) hotelCost_day += @$"   双人间:0.00"; }
                                     if (item.Sum(x => x.HotelSuiteRoomFee) != 0) hotelCost_day += @$"   小套房/豪华套房:{item.Sum(x => x.HotelSuiteRoomFee).ToString("#0.00")}";
                                     if (item.Sum(x => x.HotelSuiteRoomFee) != 0) hotelCost_day += @$"   小套房/豪华套房:{item.Sum(x => x.HotelSuiteRoomFee).ToString("#0.00")}";
-                                    if (item.Sum(x => x.HotelSuiteFee) != 0)  hotelCost_day += @$"   套房:{item.Sum(x => x.HotelSuiteFee).ToString("#0.00")}";
+                                    else { if (__isSuite) hotelCost_day += @$"   小套房/豪华套房:0.00"; }
+                                    if (item.Sum(x => x.HotelSuiteFee) != 0) hotelCost_day += @$"   套房:{item.Sum(x => x.HotelSuiteFee).ToString("#0.00")}";
+                                    else { if (__isOther) hotelCost_day += @$"   套房:0.00"; }
                                     hotelCost_day += @$"</br>";
                                     hotelCost_day += @$"</br>";
                                 }
                                 }
 
 
-                                string hotelBreakfastStr = "",hotelGovernmentRentStr = "",hotelCityTaxStr="" ;
+                                string hotelBreakfastStr = "", hotelGovernmentRentStr = "", hotelCityTaxStr = "";
                                 if (breakfastFee > 0) hotelBreakfastStr = $"酒店早餐: {breakfastFee.ToString("#0.00")} {breakfastCode} {breakfastName} 当时汇率 {breakfastData?.Rate.ToString("#0.0000")} <br/>是否由地接代付:{breakfastBool}<br/><br/>";
                                 if (breakfastFee > 0) hotelBreakfastStr = $"酒店早餐: {breakfastFee.ToString("#0.00")} {breakfastCode} {breakfastName} 当时汇率 {breakfastData?.Rate.ToString("#0.0000")} <br/>是否由地接代付:{breakfastBool}<br/><br/>";
                                 if (governmentRentFee > 0) hotelGovernmentRentStr = $"地税: {governmentRentFee.ToString("#0.00")} {governmentRentCode} {governmentRentName} 当时汇率 {governmentRentData?.Rate.ToString("#0.0000")} <br/>是否由地接代付:{governmentRentBool}<br/><br/>";
                                 if (governmentRentFee > 0) hotelGovernmentRentStr = $"地税: {governmentRentFee.ToString("#0.00")} {governmentRentCode} {governmentRentName} 当时汇率 {governmentRentData?.Rate.ToString("#0.0000")} <br/>是否由地接代付:{governmentRentBool}<br/><br/>";
                                 if (cityTaxFee > 0) hotelCityTaxStr = $"城市税: {cityTaxFee.ToString("#0.00")} {cityTaxCode} {cityTaxName} 当时汇率 {cityTaxData?.Rate.ToString("#0.0000")} <br/>是否由地接代付:{cityTaxBool}<br/>";
                                 if (cityTaxFee > 0) hotelCityTaxStr = $"城市税: {cityTaxFee.ToString("#0.00")} {cityTaxCode} {cityTaxName} 当时汇率 {cityTaxData?.Rate.ToString("#0.0000")} <br/>是否由地接代付:{cityTaxBool}<br/>";
 
 
                                 string hotelCostTotalStr = "";// $"&nbsp;&nbsp;成本合计:{hotelCsotTotal.ToString("#0.00")}<br/>";
                                 string hotelCostTotalStr = "";// $"&nbsp;&nbsp;成本合计:{hotelCsotTotal.ToString("#0.00")}<br/>";
-                                _detail.PriceMsgContent = $"{hotelCostTitalStr}{hotelCostStr}{hotelCostTotalStr}{hotelCost_day}<br/>"+
+                                _detail.PriceMsgContent = $"{hotelCostTitalStr}{hotelCostStr}{hotelCostTotalStr}{hotelCost_day}<br/>" +
                                                           $"<span style='font-weight:800;'>{hotelReservations.HotelName} [{hotelReservations.CheckInDate} - {hotelReservations.CheckOutDate}]</span><br/>" +
                                                           $"<span style='font-weight:800;'>{hotelReservations.HotelName} [{hotelReservations.CheckInDate} - {hotelReservations.CheckOutDate}]</span><br/>" +
                                                           $"信用卡金额:{_detail.WaitPay} ({hotelCurrncyName})<br/>" +
                                                           $"信用卡金额:{_detail.WaitPay} ({hotelCurrncyName})<br/>" +
                                                           $"房间说明: {hotelReservations.Remark} <br/>" +
                                                           $"房间说明: {hotelReservations.Remark} <br/>" +
                                                           $"房间费用: {roomCode} {roomName} 当时汇率 {roomData?.Rate.ToString("#0.0000")}{roomFeeStr}  <br/>是否由地接代付:{roomBool}<br/><br/>" +
                                                           $"房间费用: {roomCode} {roomName} 当时汇率 {roomData?.Rate.ToString("#0.0000")}{roomFeeStr}  <br/>是否由地接代付:{roomBool}<br/><br/>" +
-                                                          $"{hotelBreakfastStr}"+
-                                                          $"{hotelGovernmentRentStr}"+
+                                                          $"{hotelBreakfastStr}" +
+                                                          $"{hotelGovernmentRentStr}" +
                                                           $"{hotelCityTaxStr}";
                                                           $"{hotelCityTaxStr}";
                                 _detail.PriceNameContent = hotelReservations.HotelName;
                                 _detail.PriceNameContent = hotelReservations.HotelName;
                             }
                             }
@@ -1720,7 +1734,7 @@ namespace OASystem.API.Controllers
                                 //    _detail.PriceNameContent = touristGuideGroundReservations.Area;
                                 //    _detail.PriceNameContent = touristGuideGroundReservations.Area;
                                 //}
                                 //}
 
 
-                                var touristGuideGroundReservationsContents = 
+                                var touristGuideGroundReservationsContents =
                                     _CarTouristGuideGroundReservationsContent.Where(s => s.CTGGRId == touristGuideGroundReservations.Id && s.IsDel == 0 && s.Price != 0).ToList();
                                     _CarTouristGuideGroundReservationsContent.Where(s => s.CTGGRId == touristGuideGroundReservations.Id && s.IsDel == 0 && s.Price != 0).ToList();
 
 
                                 string priceMsg = $"<span style='font-weight:800;'>{touristGuideGroundReservations.PriceName}({touristGuideGroundReservations.ServiceStartTime} - {touristGuideGroundReservations.ServiceEndTime})</span><br/>";
                                 string priceMsg = $"<span style='font-weight:800;'>{touristGuideGroundReservations.PriceName}({touristGuideGroundReservations.ServiceStartTime} - {touristGuideGroundReservations.ServiceEndTime})</span><br/>";
@@ -1742,13 +1756,13 @@ namespace OASystem.API.Controllers
                                         carCurrencyName = currencyData.Remark;
                                         carCurrencyName = currencyData.Remark;
                                     }
                                     }
 
 
-                                    string opCostStr =string.Empty;
+                                    string opCostStr = string.Empty;
                                     decimal opCostTypePrice = 0.00M;
                                     decimal opCostTypePrice = 0.00M;
                                     #region 处理成本各项费用
                                     #region 处理成本各项费用
 
 
                                     var opDate = item.DatePrice?.ToString("yyyy-MM-dd");
                                     var opDate = item.DatePrice?.ToString("yyyy-MM-dd");
 
 
-                                    
+
                                     var opCost = groupCostDetails.Where(x => x.Date.Equals(opDate)).ToList();
                                     var opCost = groupCostDetails.Where(x => x.Date.Equals(opDate)).ToList();
 
 
                                     if (opCost.Count > 0)
                                     if (opCost.Count > 0)
@@ -1776,12 +1790,12 @@ namespace OASystem.API.Controllers
                                             //case 91: opCostTypePrice = opCost.Sum(x => x.CarFee); break; //992 住补费用 -- 暂无
                                             //case 91: opCostTypePrice = opCost.Sum(x => x.CarFee); break; //992 住补费用 -- 暂无
                                             case 994: opCostTypePrice = opCost.Sum(x => x.TranslatorFee); break; //994 翻译费
                                             case 994: opCostTypePrice = opCost.Sum(x => x.TranslatorFee); break; //994 翻译费
                                             case 1059: opCostTypePrice = opCost.Sum(x => x.GuideOverTimeFee); break; //1059    导游超时费用
                                             case 1059: opCostTypePrice = opCost.Sum(x => x.GuideOverTimeFee); break; //1059    导游超时费用
-                                            //case 91: opCostTypePrice = opCost.Sum(x => x.CarFee); break; //1070    尾款金额
-                                            //case 91: opCostTypePrice = opCost.Sum(x => x.CarFee); break; //1071    其他额外费用
-                                            //case 91: opCostTypePrice = opCost.Sum(x => x.CarFee); break; //1073    翻译超时费
-                                            //case 91: opCostTypePrice = opCost.Sum(x => x.CarFee); break; //1074    早餐超支费用
-                                            //case 91: opCostTypePrice = opCost.Sum(x => x.CarFee); break; //1075    午餐超支费用
-                                            //case 91: opCostTypePrice = opCost.Sum(x => x.CarFee); break; //1076    晚餐超支费用
+                                                                                                                     //case 91: opCostTypePrice = opCost.Sum(x => x.CarFee); break; //1070    尾款金额
+                                                                                                                     //case 91: opCostTypePrice = opCost.Sum(x => x.CarFee); break; //1071    其他额外费用
+                                                                                                                     //case 91: opCostTypePrice = opCost.Sum(x => x.CarFee); break; //1073    翻译超时费
+                                                                                                                     //case 91: opCostTypePrice = opCost.Sum(x => x.CarFee); break; //1074    早餐超支费用
+                                                                                                                     //case 91: opCostTypePrice = opCost.Sum(x => x.CarFee); break; //1075    午餐超支费用
+                                                                                                                     //case 91: opCostTypePrice = opCost.Sum(x => x.CarFee); break; //1076    晚餐超支费用
                                         }
                                         }
                                         opCostStr = $"&nbsp;&nbsp;/&nbsp;&nbsp;成本:{opCostTypePrice.ToString("#0.00")} {_groupCurrencyCode}(汇率:{_groupRate.ToString("#0.0000")})";
                                         opCostStr = $"&nbsp;&nbsp;/&nbsp;&nbsp;成本:{opCostTypePrice.ToString("#0.00")} {_groupCurrencyCode}(汇率:{_groupRate.ToString("#0.0000")})";
                                     }
                                     }
@@ -4059,6 +4073,21 @@ namespace OASystem.API.Controllers
                     return Ok(JsonView(false, data.Msg));
                     return Ok(JsonView(false, data.Msg));
                 }
                 }
 
 
+                //生成默认文件pdf并且通知人员
+                var fileView = await GeneralMethod.EnterExitCostDownload(new EnterExitCostDownloadDto()
+                {
+                    DiId = dto.DiId,
+                    ExportType = 1,
+                    SubTypeId = 1005
+                }, "pdf");
+
+                //发送通知
+                string fileUrl = (string)fileView.Data.GetType().GetProperty("Url").GetValue(fileView.Data, null);
+                int sign = (int)data.Data.GetType().GetProperty("sign").GetValue(data.Data, null);
+                string url = string.Format("http://oa.pan-american-intl.com:4399/?sign={0}&fileUrl={1}", sign, fileUrl);
+                await AppNoticeLibrary.SendUserMsg_GroupShare_ToGM(dto.DiId, "208", dto.UserId, url);
+
+
                 return Ok(JsonView(true, data.Msg, data.Data));
                 return Ok(JsonView(true, data.Msg, data.Data));
             }
             }
             catch (Exception ex)
             catch (Exception ex)
@@ -4817,7 +4846,7 @@ namespace OASystem.API.Controllers
                         wb.CalculateFormula(true);
                         wb.CalculateFormula(true);
 
 
                         //模板文件名
                         //模板文件名
-                        string strFileName = $"四川省商务厅出国经费财政先行审核表.xls";
+                        string strFileName = $"{_DelegationInfo.TeamName}-四川省商务厅出国经费财政先行审核表{DateTime.Now.ToString("yyyyMMddHHmmss")}.xls"; ;//$".xls";
                         designer.Workbook.Save(AppSettingsHelper.Get("WordBasePath") + "EnterExitCost/File/" + strFileName);
                         designer.Workbook.Save(AppSettingsHelper.Get("WordBasePath") + "EnterExitCost/File/" + strFileName);
                         string url = AppSettingsHelper.Get("WordBaseUrl") + "Office/Word/EnterExitCost/File/" + strFileName;
                         string url = AppSettingsHelper.Get("WordBaseUrl") + "Office/Word/EnterExitCost/File/" + strFileName;
                         return Ok(JsonView(true, "成功", new { Url = url }));
                         return Ok(JsonView(true, "成功", new { Url = url }));
@@ -4997,7 +5026,7 @@ namespace OASystem.API.Controllers
                         }
                         }
 
 
                         //模板文件名
                         //模板文件名
-                        string strFileName = $"{_DelegationInfo.TeamName}成都市因公临时出国任务和预算审批意见表(外专培训团专用).docx";
+                        string strFileName = $"{_DelegationInfo.TeamName}-成都市因公临时出国任务和预算审批意见表(外专培训团专用).docx";
                         doc.Save(AppSettingsHelper.Get("WordBasePath") + "EnterExitCost/File/" + strFileName);
                         doc.Save(AppSettingsHelper.Get("WordBasePath") + "EnterExitCost/File/" + strFileName);
                         string url = AppSettingsHelper.Get("WordBaseUrl") + "Office/Word/EnterExitCost/File/" + strFileName;
                         string url = AppSettingsHelper.Get("WordBaseUrl") + "Office/Word/EnterExitCost/File/" + strFileName;
                         return Ok(JsonView(true, "成功", new { Url = url }));
                         return Ok(JsonView(true, "成功", new { Url = url }));
@@ -5357,6 +5386,9 @@ namespace OASystem.API.Controllers
                 return Ok(JsonView(false, data.Msg));
                 return Ok(JsonView(false, data.Msg));
             }
             }
 
 
+            
+
+
             return Ok(JsonView(true, data.Msg, data.Data));
             return Ok(JsonView(true, data.Msg, data.Data));
 
 
         }
         }
@@ -5982,8 +6014,8 @@ namespace OASystem.API.Controllers
                 }
                 }
 
 
                 //自动审核
                 //自动审核
-                await _feeAuditRep.FeeAutomaticAudit(2,dto.DiId,dto.CTGGRId);
-                
+                await _feeAuditRep.FeeAutomaticAudit(2, dto.DiId, dto.CTGGRId);
+
                 #region 应用推送
                 #region 应用推送
                 try
                 try
                 {
                 {
@@ -6379,7 +6411,8 @@ namespace OASystem.API.Controllers
                                 cell.SetCellValue(setCellValue); //写入单元格
                                 cell.SetCellValue(setCellValue); //写入单元格
                             }
                             }
 
 
-                            if (overspendSoure.ContainsKey(thisSid)) {
+                            if (overspendSoure.ContainsKey(thisSid))
+                            {
                                 var overspendId = overspendSoure[thisSid];
                                 var overspendId = overspendSoure[thisSid];
                                 whereForResult = arr.Where(x => x.SId == item.SId && DateTime.Compare(x.DatePrice.ObjToDate(), item.DatePrice.ObjToDate()) == 0).ToList();
                                 whereForResult = arr.Where(x => x.SId == item.SId && DateTime.Compare(x.DatePrice.ObjToDate(), item.DatePrice.ObjToDate()) == 0).ToList();
                             }
                             }
@@ -6813,7 +6846,7 @@ namespace OASystem.API.Controllers
                     }
                     }
                 }
                 }
 
 
-                CityStr = GeneralMethod.GetGroupCityLine(diid,"/");
+                CityStr = GeneralMethod.GetGroupCityLine(diid, "/");
                 _travelList = _sqlSugar.Queryable<Grp_TravelList>().Where(x => x.Diid == diid && x.IsDel == 0 && x.Issel == 1).ToList();
                 _travelList = _sqlSugar.Queryable<Grp_TravelList>().Where(x => x.Diid == diid && x.IsDel == 0 && x.Issel == 1).ToList();
             }
             }
 
 
@@ -8978,7 +9011,8 @@ namespace OASystem.API.Controllers
                             var groupCosts = _usersRep._sqlSugar.Queryable<Grp_GroupCost>().Where(it => it.IsDel == 0 && it.Diid == dto.DiId).ToList();
                             var groupCosts = _usersRep._sqlSugar.Queryable<Grp_GroupCost>().Where(it => it.IsDel == 0 && it.Diid == dto.DiId).ToList();
                             var initDatas = groupCosts.Select(it => new { date = it.Date, week = it.Date.GetWeek() == "" ? "-" : it.Date.GetWeek(), itinerary = it.ITIN }).ToList();
                             var initDatas = groupCosts.Select(it => new { date = it.Date, week = it.Date.GetWeek() == "" ? "-" : it.Date.GetWeek(), itinerary = it.ITIN }).ToList();
 
 
-                            modulePromptInfo.Data = new {
+                            modulePromptInfo.Data = new
+                            {
                                 airFeeData = datas,
                                 airFeeData = datas,
                                 airInitData = initDatas
                                 airInitData = initDatas
                             };
                             };
@@ -9153,7 +9187,8 @@ ORDER by  gctggrc.id DESC
                     }
                     }
                 }
                 }
 
 
-                var view = dbResult.Select(x => {
+                var view = dbResult.Select(x =>
+                {
 
 
                     decimal dp = 0.00M;
                     decimal dp = 0.00M;
                     var startB = DateTime.TryParse(x.Start.ToString(), out DateTime startD);
                     var startB = DateTime.TryParse(x.Start.ToString(), out DateTime startD);
@@ -9384,7 +9419,8 @@ ORDER by  gctggrc.id DESC
             {
             {
                 if (pageFunAuthView.EditAuth == 0) return Ok(JsonView(false, "您没有编辑权限!"));
                 if (pageFunAuthView.EditAuth == 0) return Ok(JsonView(false, "您没有编辑权限!"));
 
 
-            } else return Ok(JsonView(false, "请输入正确的数据Id!"));
+            }
+            else return Ok(JsonView(false, "请输入正确的数据Id!"));
 
 
             #endregion
             #endregion
 
 
@@ -9397,7 +9433,7 @@ ORDER by  gctggrc.id DESC
             }
             }
 
 
             #region 应用推送
             #region 应用推送
-            
+
             try
             try
             {
             {
                 int ccpId = (int)_view.Data.GetType().GetProperty("ccpId").GetValue(_view.Data, null);
                 int ccpId = (int)_view.Data.GetType().GetProperty("ccpId").GetValue(_view.Data, null);
@@ -9406,7 +9442,7 @@ ORDER by  gctggrc.id DESC
                 await AppNoticeLibrary.SendChatMsg_GroupStatus_ApplyFee(ccpId, sign, QiyeWeChatEnum.GuoJiaoLeaderChat);
                 await AppNoticeLibrary.SendChatMsg_GroupStatus_ApplyFee(ccpId, sign, QiyeWeChatEnum.GuoJiaoLeaderChat);
 
 
                 //自动审核
                 //自动审核
-                await _feeAuditRep.FeeAutomaticAudit(1,_dto.DiId,hotelId);
+                await _feeAuditRep.FeeAutomaticAudit(1, _dto.DiId, hotelId);
 
 
             }
             }
             catch (Exception ex)
             catch (Exception ex)
@@ -11549,12 +11585,12 @@ ORDER by  gctggrc.id DESC
 
 
             bool isDepStatus = await GeneralMethod.IsMarketingStaff(dto.CurrUserId);
             bool isDepStatus = await GeneralMethod.IsMarketingStaff(dto.CurrUserId);
             List<Grp_DelegationInfo> groupInfos = new List<Grp_DelegationInfo>();
             List<Grp_DelegationInfo> groupInfos = new List<Grp_DelegationInfo>();
-            groupInfos =  _sqlSugar.Queryable<Grp_DelegationInfo>()
+            groupInfos = _sqlSugar.Queryable<Grp_DelegationInfo>()
                                         .Where(it => it.IsDel == 0)
                                         .Where(it => it.IsDel == 0)
                                         .WhereIF(isDepStatus, it => it.JietuanOperator == dto.CurrUserId)
                                         .WhereIF(isDepStatus, it => it.JietuanOperator == dto.CurrUserId)
                                         .OrderByDescending(it => it.CreateUserId)
                                         .OrderByDescending(it => it.CreateUserId)
                                         .ToList();
                                         .ToList();
-            if (groupInfos.Count < 1) return Ok(JsonView(false,"暂无和你相关的团组信息!"));
+            if (groupInfos.Count < 1) return Ok(JsonView(false, "暂无和你相关的团组信息!"));
 
 
             var country = groupInfos.Select(it => it.VisitCountry).ToList();
             var country = groupInfos.Select(it => it.VisitCountry).ToList();
             var diids = groupInfos.Select(it => it.Id).ToList();
             var diids = groupInfos.Select(it => it.Id).ToList();
@@ -11597,11 +11633,11 @@ ORDER by  gctggrc.id DESC
                                           .ToList();
                                           .ToList();
 
 
 
 
-            var teamNames = groupInfos.Where(it => !string.IsNullOrEmpty(it.TeamName) )
+            var teamNames = groupInfos.Where(it => !string.IsNullOrEmpty(it.TeamName))
                                       .Select(it => it.TeamName).ToList();
                                       .Select(it => it.TeamName).ToList();
 
 
             stopwatch.Stop();
             stopwatch.Stop();
-            return Ok(JsonView(true, $"操作成功,耗时{stopwatch.ElapsedMilliseconds} ms", new { teamNames,countriesDatas, citiesDatas = cityDatas }));
+            return Ok(JsonView(true, $"操作成功,耗时{stopwatch.ElapsedMilliseconds} ms", new { teamNames, countriesDatas, citiesDatas = cityDatas }));
 
 
         }
         }
 
 
@@ -12248,7 +12284,7 @@ And (UnitName != '' Or UnitName != null) {sqlWhere}");
                                              .Where(it => countrys.Contains(it.Name_CN))
                                              .Where(it => countrys.Contains(it.Name_CN))
                                              .WhereIF(!string.IsNullOrEmpty(dto.Search), it => it.Name_CN.Contains(dto.Search))
                                              .WhereIF(!string.IsNullOrEmpty(dto.Search), it => it.Name_CN.Contains(dto.Search))
                                              .Select(it => new { id = it.Id, name = it.Name_CN })
                                              .Select(it => new { id = it.Id, name = it.Name_CN })
-                                             .ToPageListAsync(dto.PageIndex,dto.PageSize, total);
+                                             .ToPageListAsync(dto.PageIndex, dto.PageSize, total);
 
 
             return Ok(JsonView(true, MsgTips.Succeed, countyDatas, total));
             return Ok(JsonView(true, MsgTips.Succeed, countyDatas, total));
         }
         }
@@ -12289,7 +12325,7 @@ And (UnitName != '' Or UnitName != null) {sqlWhere}");
             watch.Start();
             watch.Start();
             RefAsync<int> total = 0;
             RefAsync<int> total = 0;
             var countyDatas = await _sqlSugar.Queryable<Res_OfficialActivities>()
             var countyDatas = await _sqlSugar.Queryable<Res_OfficialActivities>()
-                                             .InnerJoin<Grp_DelegationInfo>((oa,di) => oa.DiId == di.Id)
+                                             .InnerJoin<Grp_DelegationInfo>((oa, di) => oa.DiId == di.Id)
                                              .Where((oa, di) => oa.IsDel == 0)
                                              .Where((oa, di) => oa.IsDel == 0)
                                              .WhereIF(!string.IsNullOrEmpty(dto.Search), (oa, di) => di.TeamName.Contains(dto.Search))
                                              .WhereIF(!string.IsNullOrEmpty(dto.Search), (oa, di) => di.TeamName.Contains(dto.Search))
                                              .OrderBy((oa, di) => new { id = SqlFunc.Desc(di.Id) })
                                              .OrderBy((oa, di) => new { id = SqlFunc.Desc(di.Id) })
@@ -12326,7 +12362,8 @@ And (UnitName != '' Or UnitName != null) {sqlWhere}");
                                              .ToPageListAsync(dto.PageIndex, dto.PageSize, total);
                                              .ToPageListAsync(dto.PageIndex, dto.PageSize, total);
             var userDatas = _sqlSugar.Queryable<Sys_Users>().Where(x => x.IsDel == 0).ToList();
             var userDatas = _sqlSugar.Queryable<Sys_Users>().Where(x => x.IsDel == 0).ToList();
             var setDatas = _sqlSugar.Queryable<Sys_SetData>().Where(x => x.IsDel == 0).ToList();
             var setDatas = _sqlSugar.Queryable<Sys_SetData>().Where(x => x.IsDel == 0).ToList();
-            infos.ForEach(x => {
+            infos.ForEach(x =>
+            {
                 x.TeamDid = setDatas.Find(y => int.Parse(x.TeamDid) == y.Id)?.Name ?? "-";
                 x.TeamDid = setDatas.Find(y => int.Parse(x.TeamDid) == y.Id)?.Name ?? "-";
                 x.JietuanOperator = userDatas.Find(y => int.Parse(x.JietuanOperator) == y.Id)?.CnName ?? "-";
                 x.JietuanOperator = userDatas.Find(y => int.Parse(x.JietuanOperator) == y.Id)?.CnName ?? "-";
                 x.TeamLevSId = setDatas.Find(y => int.Parse(x.TeamLevSId) == y.Id)?.Name ?? "-";
                 x.TeamLevSId = setDatas.Find(y => int.Parse(x.TeamLevSId) == y.Id)?.Name ?? "-";
@@ -12449,19 +12486,20 @@ And (UnitName != '' Or UnitName != null) {sqlWhere}");
                                     {
                                     {
                                         threeCodeStr.Add(end);
                                         threeCodeStr.Add(end);
                                     }
                                     }
-                                    else {
+                                    else
+                                    {
                                         threeCodeStr.Add(start);
                                         threeCodeStr.Add(start);
                                         threeCodeStr.Add(end);
                                         threeCodeStr.Add(end);
                                     }
                                     }
                                 }
                                 }
                             }
                             }
                         }
                         }
-                        var threeCodeList =  _threeCodeRepository.QueryThreeCodeArray(threeCodeStr);
+                        var threeCodeList = _threeCodeRepository.QueryThreeCodeArray(threeCodeStr);
                         var last = threeCodeStr.Last();
                         var last = threeCodeStr.Last();
                         foreach (var item in threeCodeStr)
                         foreach (var item in threeCodeStr)
                         {
                         {
                             cityPath += (threeCodeList.Keys.Contains(item) ? threeCodeList[item].City : "【未知三字码】") + "-";
                             cityPath += (threeCodeList.Keys.Contains(item) ? threeCodeList[item].City : "【未知三字码】") + "-";
-                            if(item.Equals(last))
+                            if (item.Equals(last))
                             {
                             {
                                 stay = threeCodeList.Keys.Contains(item) ? threeCodeList[item].City : "【未知三字码】";
                                 stay = threeCodeList.Keys.Contains(item) ? threeCodeList[item].City : "【未知三字码】";
                             }
                             }
@@ -12499,7 +12537,7 @@ And (UnitName != '' Or UnitName != null) {sqlWhere}");
                     x.Diid,
                     x.Diid,
                     chiList = chiList.Select(x1 => new
                     chiList = chiList.Select(x1 => new
                     {
                     {
-                        timeInterval = x1.Time == null ? new string [1] : x1.Time.Split('-'),
+                        timeInterval = x1.Time == null ? new string[1] : x1.Time.Split('-'),
                         x1.Details,
                         x1.Details,
                         x1.ParentId,
                         x1.ParentId,
                         x1.Id
                         x1.Id
@@ -12509,10 +12547,10 @@ And (UnitName != '' Or UnitName != null) {sqlWhere}");
 
 
             data = data with
             data = data with
             {
             {
-                 content = resultArr,
+                content = resultArr,
             };
             };
 
 
-            jw = JsonView(true,"获取成功!",data);
+            jw = JsonView(true, "获取成功!", data);
 
 
             return Ok(jw);
             return Ok(jw);
         }
         }
@@ -12526,7 +12564,7 @@ And (UnitName != '' Or UnitName != null) {sqlWhere}");
         public IActionResult DeleteApprovalJourney(DeleteApprovalJourney dto)
         public IActionResult DeleteApprovalJourney(DeleteApprovalJourney dto)
         {
         {
             var jw = JsonView(false);
             var jw = JsonView(false);
-            var group = _sqlSugar.Queryable<Grp_DelegationInfo>().First(x=>x.Id == dto.Diid && x.IsDel == 0);
+            var group = _sqlSugar.Queryable<Grp_DelegationInfo>().First(x => x.Id == dto.Diid && x.IsDel == 0);
             if (group == null)
             if (group == null)
             {
             {
                 jw.Msg = "团组参数有误!";
                 jw.Msg = "团组参数有误!";
@@ -12537,7 +12575,7 @@ And (UnitName != '' Or UnitName != null) {sqlWhere}");
             {
             {
                 _sqlSugar.BeginTran();
                 _sqlSugar.BeginTran();
 
 
-                var arr = _sqlSugar.Queryable<Grp_ApprovalTravel>().Where(x => x.Diid == dto.Diid && x.IsDel == 0).Select(x=>x.Id).ToList();
+                var arr = _sqlSugar.Queryable<Grp_ApprovalTravel>().Where(x => x.Diid == dto.Diid && x.IsDel == 0).Select(x => x.Id).ToList();
 
 
                 _ = _sqlSugar.Updateable<Grp_ApprovalTravelDetails>().SetColumns(x => new Grp_ApprovalTravelDetails
                 _ = _sqlSugar.Updateable<Grp_ApprovalTravelDetails>().SetColumns(x => new Grp_ApprovalTravelDetails
                 {
                 {
@@ -12597,10 +12635,10 @@ And (UnitName != '' Or UnitName != null) {sqlWhere}");
 
 
             _sqlSugar.BeginTran();
             _sqlSugar.BeginTran();
 
 
-            if (chiArr.Where(x=>x.id == 0).Count() == chiArr.Count)
+            if (chiArr.Where(x => x.id == 0).Count() == chiArr.Count)
             {
             {
                 var parentIds = dto.Arr.Select(x => x.id).ToList();
                 var parentIds = dto.Arr.Select(x => x.id).ToList();
-                _sqlSugar.Updateable<Grp_ApprovalTravelDetails>().Where(x => parentIds.Contains(x.ParentId) && x.IsDel == 0).SetColumns(x=>new Grp_ApprovalTravelDetails
+                _sqlSugar.Updateable<Grp_ApprovalTravelDetails>().Where(x => parentIds.Contains(x.ParentId) && x.IsDel == 0).SetColumns(x => new Grp_ApprovalTravelDetails
                 {
                 {
                     DeleteTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),
                     DeleteTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),
                     DeleteUserId = dto.UserId,
                     DeleteUserId = dto.UserId,
@@ -12610,13 +12648,13 @@ And (UnitName != '' Or UnitName != null) {sqlWhere}");
 
 
             try
             try
             {
             {
-                 _ =  _sqlSugar.Insertable<Grp_ApprovalTravelDetails>(chiArr.Where(x => x.id == 0).Select(x => new Grp_ApprovalTravelDetails
+                _ = _sqlSugar.Insertable<Grp_ApprovalTravelDetails>(chiArr.Where(x => x.id == 0).Select(x => new Grp_ApprovalTravelDetails
                 {
                 {
                     CreateTime = DateTime.Now,
                     CreateTime = DateTime.Now,
                     CreateUserId = dto.UserId,
                     CreateUserId = dto.UserId,
                     Details = x.details,
                     Details = x.details,
                     ParentId = x.parentId,
                     ParentId = x.parentId,
-                    Time = x.timeInterval.Where(x=>!string.IsNullOrWhiteSpace(x)).Count() > 1 ? x.timeInterval[0] + "-" + x.timeInterval[1] : "",
+                    Time = x.timeInterval.Where(x => !string.IsNullOrWhiteSpace(x)).Count() > 1 ? x.timeInterval[0] + "-" + x.timeInterval[1] : "",
                     Remark = "",
                     Remark = "",
                     IsDel = 0
                     IsDel = 0
                 }).ToList()).ExecuteCommand();
                 }).ToList()).ExecuteCommand();
@@ -12627,7 +12665,7 @@ And (UnitName != '' Or UnitName != null) {sqlWhere}");
                     Details = x.details,
                     Details = x.details,
                     ParentId = x.parentId,
                     ParentId = x.parentId,
                     Time = x.timeInterval.Where(x => !string.IsNullOrWhiteSpace(x)).Count() > 1 ? x.timeInterval[0] + "-" + x.timeInterval[1] : "",
                     Time = x.timeInterval.Where(x => !string.IsNullOrWhiteSpace(x)).Count() > 1 ? x.timeInterval[0] + "-" + x.timeInterval[1] : "",
-                }).ToList()).UpdateColumns(x=> new Grp_ApprovalTravelDetails
+                }).ToList()).UpdateColumns(x => new Grp_ApprovalTravelDetails
                 {
                 {
                     Details = x.Details,
                     Details = x.Details,
                     ParentId = x.ParentId,
                     ParentId = x.ParentId,
@@ -12640,7 +12678,7 @@ And (UnitName != '' Or UnitName != null) {sqlWhere}");
                     Date = x.date,
                     Date = x.date,
                 }).ToList()).UpdateColumns(x => new Grp_ApprovalTravel
                 }).ToList()).UpdateColumns(x => new Grp_ApprovalTravel
                 {
                 {
-                     Date = x.Date
+                    Date = x.Date
                 }).ExecuteCommand();
                 }).ExecuteCommand();
 
 
                 _sqlSugar.CommitTran();
                 _sqlSugar.CommitTran();
@@ -12828,10 +12866,10 @@ And (UnitName != '' Or UnitName != null) {sqlWhere}");
                             IFormatProvider ifp = new CultureInfo("zh-CN", true);
                             IFormatProvider ifp = new CultureInfo("zh-CN", true);
                             if (DateTime.TryParseExact(flightTime, "HH小时mm分钟", ifp, DateTimeStyles.None, out DateTime flightDataTime))
                             if (DateTime.TryParseExact(flightTime, "HH小时mm分钟", ifp, DateTimeStyles.None, out DateTime flightDataTime))
                             {
                             {
-                                flightTime = flightDataTime.Hour > 0 
-                                    ? flightDataTime.Hour.ToString() + "小时" + (flightDataTime.Minute > 0  
-                                    ? flightDataTime.Minute.ToString() + "分钟": "") : flightDataTime.Minute > 0 
-                                    ? flightDataTime.Minute.ToString() + "分钟" : "" ;
+                                flightTime = flightDataTime.Hour > 0
+                                    ? flightDataTime.Hour.ToString() + "小时" + (flightDataTime.Minute > 0
+                                    ? flightDataTime.Minute.ToString() + "分钟" : "") : flightDataTime.Minute > 0
+                                    ? flightDataTime.Minute.ToString() + "分钟" : "";
                             }
                             }
 
 
 
 
@@ -12874,7 +12912,7 @@ And (UnitName != '' Or UnitName != null) {sqlWhere}");
                             CreateUserId = dto.Userid,
                             CreateUserId = dto.Userid,
                             ParentId = 0,
                             ParentId = 0,
                             Details = trip
                             Details = trip
-                        }) ;
+                        });
 
 
                         var threeCodeList = _threeCodeRepository.QueryThreeCodeArray(threeCodeStr);
                         var threeCodeList = _threeCodeRepository.QueryThreeCodeArray(threeCodeStr);
                         var last = threeCodeStr.Last();
                         var last = threeCodeStr.Last();
@@ -12945,7 +12983,7 @@ And (UnitName != '' Or UnitName != null) {sqlWhere}");
                 jw.Code = 400;
                 jw.Code = 400;
                 jw.Msg = "生成失败!" + ex.Message;
                 jw.Msg = "生成失败!" + ex.Message;
             }
             }
-            
+
             return Ok(jw);
             return Ok(jw);
         }
         }
 
 
@@ -12997,7 +13035,7 @@ And (UnitName != '' Or UnitName != null) {sqlWhere}");
                 var ChiRep = _sqlSugar.Queryable<Grp_ApprovalTravelDetails>().Where(x => x.IsDel == 0 && x.ParentId == item.Id).ToList();
                 var ChiRep = _sqlSugar.Queryable<Grp_ApprovalTravelDetails>().Where(x => x.IsDel == 0 && x.ParentId == item.Id).ToList();
 
 
                 SetCells(tableOne, doc, SetIndex, 0, textTime);
                 SetCells(tableOne, doc, SetIndex, 0, textTime);
-                
+
                 SetIndex++;
                 SetIndex++;
 
 
                 if (ChiRep.Count > 0)
                 if (ChiRep.Count > 0)
@@ -13100,7 +13138,7 @@ And (UnitName != '' Or UnitName != null) {sqlWhere}");
 
 
             if (val.Contains("\r\n"))
             if (val.Contains("\r\n"))
             {
             {
-                var spArr = val.Split("\r\n").Where(x=>!string.IsNullOrWhiteSpace(x));
+                var spArr = val.Split("\r\n").Where(x => !string.IsNullOrWhiteSpace(x));
                 foreach (var item in spArr)
                 foreach (var item in spArr)
                 {
                 {
                     //新建一个段落
                     //新建一个段落
@@ -13179,7 +13217,7 @@ And (UnitName != '' Or UnitName != null) {sqlWhere}");
 
 
             if (param.ContainsKey("isJson"))
             if (param.ContainsKey("isJson"))
             {
             {
-            
+
             }
             }
 
 
             if (headValues != null)
             if (headValues != null)
@@ -13229,7 +13267,7 @@ And (UnitName != '' Or UnitName != null) {sqlWhere}");
                 client.Dispose();
                 client.Dispose();
             }
             }
 
 
-             return Ok(jw);
+            return Ok(jw);
         }
         }
 
 
         #endregion
         #endregion

File diff suppressed because it is too large
+ 1337 - 1
OASystem/OASystem.Api/OAMethodLib/GeneralMethod.cs


+ 28 - 1
OASystem/OASystem.Api/OAMethodLib/QiYeWeChatAPI/AppNotice/Config.cs

@@ -295,7 +295,6 @@ namespace OASystem.API.OAMethodLib.QiYeWeChatAPI.AppNotice
             return result;
             return result;
         }
         }
 
 
-
         /// <summary>
         /// <summary>
         /// 成本通知发送给用户
         /// 成本通知发送给用户
         /// </summary>
         /// </summary>
@@ -320,11 +319,39 @@ namespace OASystem.API.OAMethodLib.QiYeWeChatAPI.AppNotice
             return result;
             return result;
         }
         }
 
 
+        /// <summary>
+        /// 出入境费用明细更改通知发送给用户
+        /// </summary>
+        /// <returns></returns>
+        public static string GroupShare_ToGM(GroupShare_ToGMModel info)
+        {
+            string result = string.Format(@" `出入境费用明细操作通知`  
+
+>团组:<font color='info'>{0}</font> 
+
+>操作人员:{1}
+>操作时间:<font color='comment'>{2}</font> 
+
+<font color='comment'>- </font>
+
+[详细信息请前往OA系统查看]({3}) ", info.TeamName, info.CreateUser, info.RefreshDate, info.Url);
+
+            return result;
+        }
+
+
     }
     }
 
 
 
 
     #region 实体类
     #region 实体类
 
 
+    public class GroupShare_ToGMModel : GroupShare_ToUserModel
+    {
+        public string CreateUser { get; set; }
+
+        public string Url { get; set; }
+    }
+
     public class GroupShare_ToUserModel
     public class GroupShare_ToUserModel
     {
     {
         public string TeamName { get; set; }
         public string TeamName { get; set; }

+ 40 - 0
OASystem/OASystem.Api/OAMethodLib/QiYeWeChatAPI/AppNotice/Library.cs

@@ -4,6 +4,7 @@ using OASystem.Domain.Entities.Groups;
 using OASystem.Domain.ViewModels.Groups;
 using OASystem.Domain.ViewModels.Groups;
 using OASystem.Domain.ViewModels.QiYeWeChat;
 using OASystem.Domain.ViewModels.QiYeWeChat;
 using OASystem.Infrastructure.Repositories.Groups;
 using OASystem.Infrastructure.Repositories.Groups;
+using static OpenAI.GPT3.ObjectModels.SharedModels.IOpenAiModels;
 
 
 namespace OASystem.API.OAMethodLib.QiYeWeChatAPI.AppNotice
 namespace OASystem.API.OAMethodLib.QiYeWeChatAPI.AppNotice
 {
 {
@@ -784,6 +785,45 @@ namespace OASystem.API.OAMethodLib.QiYeWeChatAPI.AppNotice
 
 
         #endregion
         #endregion
 
 
+
+        #region 三公费用更改通知
+
+
+        /// <summary>
+        /// 三公费用更改通知发送总经理(21)
+        /// </summary>
+        /// <param name="sign"></param>
+        /// <returns></returns>
+        public static async Task<bool> SendUserMsg_GroupShare_ToGM(int diId,string receivedUserId, int updateUserId, string url)
+        {
+
+            Grp_DelegationInfo groupInfo = _grpDeleRep.Query<Grp_DelegationInfo>(s => s.Id == diId).First();
+            List<string> qwUserIdList =new List<string>() { receivedUserId };
+
+            GroupShare_ToGMModel info = new GroupShare_ToGMModel()
+            {
+                RefreshDate = DateTime.Now.ToString("yyyy-MM-dd HH:mm"),
+                TeamName = groupInfo.TeamName,
+                CreateUser = _grpDeleRep.Query<Sys_Users>(s => s.Id == updateUserId).First()?.CnName ?? "-",
+                Url = url
+            };
+
+            if (qwUserIdList.Count > 0)
+            {
+                ResponseBase result = await _qiYeWeChatApiService.GroupStatus_SendMessage_ToUser_Markdown(qwUserIdList, MarkdownLib.GroupShare_ToGM(info));
+                if (result.errcode != 0)
+                {
+                    //抄送日志 
+                    return false;
+                }
+            }
+
+            return true;
+        }
+
+        #endregion
+
+
         #region 成本通知
         #region 成本通知
 
 
         /// <summary>
         /// <summary>

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

@@ -9,6 +9,7 @@ using OASystem.Infrastructure.Tools;
 using System;
 using System;
 using System.Collections.Generic;
 using System.Collections.Generic;
 using System.Linq;
 using System.Linq;
+using System.Security.Policy;
 using System.Text;
 using System.Text;
 using System.Threading.Tasks;
 using System.Threading.Tasks;
 
 
@@ -299,6 +300,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
                     _sqlSugar.CommitTran();
                     _sqlSugar.CommitTran();
                     result.Code = 0;
                     result.Code = 0;
                     result.Msg = "操作成功!";
                     result.Msg = "操作成功!";
+                    result.Data = new { sign = enterExitId };
 
 
                 }
                 }
                 catch (Exception ex)
                 catch (Exception ex)