Browse Source

(更新)团组费用审核-团组增减款项

jiangjc 1 year ago
parent
commit
a3b2eb732c
1 changed files with 22 additions and 16 deletions
  1. 22 16
      OASystem/OASystem.Api/Controllers/GroupsController.cs

+ 22 - 16
OASystem/OASystem.Api/Controllers/GroupsController.cs

@@ -17,6 +17,7 @@ using static OASystem.Infrastructure.Repositories.Resource.AirTicketResRepositor
 using static OpenAI.GPT3.ObjectModels.SharedModels.IOpenAiModels;
 using Cell = Aspose.Words.Tables.Cell;
 using Row = Aspose.Words.Tables.Row;
+using System.Runtime.Intrinsics.Arm;
 
 namespace OASystem.API.Controllers
 {
@@ -36,7 +37,7 @@ namespace OASystem.API.Controllers
         private readonly SqlSugarClient _sqlSugar;
         private string url;
         private string path;
-        public GroupsController(IMapper mapper,SqlSugarClient sqlSugar, GrpScheduleRepository grpScheduleRep, DelegationInfoRepository groupRepository,
+        public GroupsController(IMapper mapper, SqlSugarClient sqlSugar, GrpScheduleRepository grpScheduleRep, DelegationInfoRepository groupRepository,
             TaskAssignmentRepository taskAssignmentRep, AirTicketResRepository airTicketResRep, DecreasePaymentsRepository decreasePaymentsRep)
         {
             _mapper = mapper;
@@ -500,8 +501,6 @@ namespace OASystem.API.Controllers
             exp.AndIF(_dto.AuditStatus != -1, it => it.IsAuditGM == _dto.AuditStatus);
             exp.AndIF(_dto.Label != -1, it => it.CTable == _dto.Label);
 
-
-            //缺少IF的语法糖 CTable
             List<Grp_CreditCardPayment> entityList = _groupRepository
                 .Query<Grp_CreditCardPayment>(s => s.DIId == _dto.DiId && s.IsDel == 0 && s.CreateUserId > 0)
                 .Where(exp.ToExpression())
@@ -552,7 +551,14 @@ namespace OASystem.API.Controllers
                     case 79:
                         _detail.BusName = "待增加";
                         break;
-
+                    case 98:
+                        Grp_DecreasePayments gdpRes = _groupRepository.Query<Grp_DecreasePayments>(s => s.Id == entity.CId).First();
+                        if (gdpRes != null)
+                        {
+                            _detail.PriceMsgContent = "备注:" + gdpRes.Remark;
+                            _detail.PriceNameContent = gdpRes.PriceName;
+                        }
+                        break;
                     default:
                         break;
                 }
@@ -944,7 +950,7 @@ namespace OASystem.API.Controllers
                 else
                 {
                     List<AirTicketReservationsView> _AirTicketReservations = groupData.Data;
-                    if (dto.Language=="CN")
+                    if (dto.Language == "CN")
                     {
                         Document doc = new Document(AppSettingsHelper.Get("WordBasePath") + "Template/电子客票行程单模板_CN.docx");
                         DocumentBuilder builder = new DocumentBuilder(doc);
@@ -1118,12 +1124,12 @@ namespace OASystem.API.Controllers
                             {
                                 if (!name.Contains(clientName))
                                 {
-                                    name+=clientName+",";
+                                    name += clientName + ",";
                                 }
                             }
                             if (!string.IsNullOrWhiteSpace(name))
                             {
-                                table.Range.Bookmarks["ClientName"].Text = name.Substring(0,name.Length-1);
+                                table.Range.Bookmarks["ClientName"].Text = name.Substring(0, name.Length - 1);
                             }
                             else
                             {
@@ -1156,7 +1162,7 @@ namespace OASystem.API.Controllers
                         int tableIndex = 0;//表格索引
                                            //得到文档中的第一个表格
                         Table table = (Table)doc.GetChild(NodeType.Table, tableIndex, true);
-                       
+
                         List<string> texts = new List<string>();
                         foreach (var item in _AirTicketReservations)
                         {
@@ -1170,7 +1176,7 @@ namespace OASystem.API.Controllers
                                     {
                                         transDic.Add(_AirCompany.CnName, _AirCompany.EnName);
                                     }
-                                    
+
                                 }
                                 else
                                 {
@@ -1178,7 +1184,7 @@ namespace OASystem.API.Controllers
                                     {
                                         transDic.Add("--", "--");
                                     }
-                                    
+
                                 }
                             }
                             string[] nameArray = Regex.Split(item.ClientName, "\\d+\\.", RegexOptions.IgnoreCase);
@@ -1186,7 +1192,7 @@ namespace OASystem.API.Controllers
                             string name = "";
                             foreach (string clientName in nameArray)
                             {
-                                name += clientName+",";
+                                name += clientName + ",";
                             }
                             if (!texts.Contains(name))
                             {
@@ -1213,14 +1219,14 @@ namespace OASystem.API.Controllers
                                     }
                                 }
                                 Res_ThreeCode End_Three = _sqlSugar.Queryable<Res_ThreeCode>().First(a => a.Three == tempstr[3].Substring(3, 3));
-                                
+
                                 if (End_Three != null)
                                 {
                                     if (!transDic.ContainsKey(End_Three.AirPort))
                                     {
                                         transDic.Add(End_Three.AirPort, End_Three.AirPort_En);
                                     }
-                                    
+
                                 }
                                 if (!texts.Contains(item.CTypeName))
                                 {
@@ -1254,7 +1260,7 @@ namespace OASystem.API.Controllers
                                     if (!string.IsNullOrEmpty(translateResult))
                                     {
                                         str = translateResult;
-                                        str =_airTicketResRep.Processing(str);
+                                        str = _airTicketResRep.Processing(str);
                                     }
 
                                     table.Range.Bookmarks["AirlineCompany"].Text = str;
@@ -1271,7 +1277,7 @@ namespace OASystem.API.Controllers
                             string names = "";
                             foreach (string clientName in nameArray)
                             {
-                                    names += clientName + ",";
+                                names += clientName + ",";
                             }
                             if (!string.IsNullOrWhiteSpace(names))
                             {
@@ -1335,7 +1341,7 @@ namespace OASystem.API.Controllers
                                     if (!string.IsNullOrEmpty(translateResult1))
                                     {
                                         str1 = translateResult1;
-                                        str1= _airTicketResRep.Processing(str1);
+                                        str1 = _airTicketResRep.Processing(str1);
                                     }
                                     EndCity = str1;
                                 }