|
@@ -935,6 +935,9 @@ namespace OASystem.API.Controllers
|
|
|
List<Grp_DayAndCost> dac3 = _DayAndCosts.Where(it => it.Type == 3).ToList(); //公杂费
|
|
|
List<Grp_DayAndCost> dac4 = _DayAndCosts.Where(it => it.Type == 4).ToList(); //培训费
|
|
|
|
|
|
+ //币种Data
|
|
|
+ var currData = _sqlSugar.Queryable<Sys_SetData>().Where(it => it.IsDel == 0 && it.STid == 66).ToList();
|
|
|
+
|
|
|
var DeleClientList = _sqlSugar.Queryable<Grp_TourClientList>()
|
|
|
.LeftJoin<Crm_DeleClient>((tcl, dc) => tcl.ClientId == dc.Id && dc.IsDel == 0)
|
|
|
.LeftJoin<Crm_CustomerCompany>((tcl, dc, cc) => dc.CrmCompanyId == cc.Id && dc.IsDel == 0)
|
|
@@ -1043,11 +1046,13 @@ namespace OASystem.API.Controllers
|
|
|
int days = dac1.FindAll(x => x.Place == item.Place).Count();
|
|
|
SetCells(ChildTable, doc, rowIndex, 0, item.Place);
|
|
|
SetCells(ChildTable, doc, rowIndex, 1, days + "晚");
|
|
|
- SetCells(ChildTable, doc, rowIndex, 2, item.Cost + item.Currency + "/晚");
|
|
|
+
|
|
|
+ string currencyCode = currData.Find(it => it.Id == item.Currency)?.Name ?? "Unknown";
|
|
|
+ SetCells(ChildTable, doc, rowIndex, 2, item.Cost.ToString("#0.00") + currencyCode + "/晚");
|
|
|
SetCells(ChildTable, doc, rowIndex, 3, " 汇率" + (item.SubTotal / item.Cost).ToString("#0.00"));
|
|
|
SetCells(ChildTable, doc, rowIndex, 4, "CNY" + item.SubTotal * days + "\r\n");
|
|
|
rowIndex++;
|
|
|
- zsinfo += item.Place + " " + days + "晚 " + item.Cost + item.Currency + "/晚" + " 汇率" + (item.SubTotal / item.Cost).ToString("#0.00") + " CNY" + item.SubTotal * days + "\r\n";
|
|
|
+ zsinfo += item.Place + " " + days + "晚 " + item.Cost.ToString("#0.00") + currencyCode + "/晚" + " 汇率" + (item.SubTotal / item.Cost).ToString("#0.0000") + " CNY" + item.SubTotal * days + "\r\n";
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -1078,11 +1083,13 @@ namespace OASystem.API.Controllers
|
|
|
int days = dac2.FindAll(x => x.Place == item.Place).Count();
|
|
|
SetCells(ChildTable1, doc, rowIndex, 0, item.Place);
|
|
|
SetCells(ChildTable1, doc, rowIndex, 1, days + "天");
|
|
|
- SetCells(ChildTable1, doc, rowIndex, 2, item.Cost + item.Currency + "/天");
|
|
|
+
|
|
|
+ string currencyCode = currData.Find(it => it.Id == item.Currency)?.Name ?? "Unknown";
|
|
|
+ SetCells(ChildTable1, doc, rowIndex, 2, item.Cost.ToString("#0.00") + currencyCode + "/天");
|
|
|
SetCells(ChildTable1, doc, rowIndex, 3, " 汇率" + (item.SubTotal / item.Cost).ToString("#0.00"));
|
|
|
SetCells(ChildTable1, doc, rowIndex, 4, "CNY" + item.SubTotal * days);
|
|
|
rowIndex++;
|
|
|
- hsinfo += item.Place + " " + days + "天 " + item.Cost + item.Currency + "/天" + " 汇率" + (item.SubTotal / item.Cost).ToString("#0.00") + " CNY" + item.SubTotal * days + "\r\n";
|
|
|
+ hsinfo += item.Place + " " + days + "天 " + item.Cost.ToString("#0.00") + currencyCode + "/天" + " 汇率" + (item.SubTotal / item.Cost).ToString("#0.0000") + " CNY" + item.SubTotal * days + "\r\n";
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -1113,11 +1120,13 @@ namespace OASystem.API.Controllers
|
|
|
int days = dac3.FindAll(x => x.Place == item.Place).Count();
|
|
|
SetCells(ChildTable2, doc, rowIndex, 0, item.Place);
|
|
|
SetCells(ChildTable2, doc, rowIndex, 1, days + "天");
|
|
|
- SetCells(ChildTable2, doc, rowIndex, 2, item.Cost + item.Currency + "/天");
|
|
|
+
|
|
|
+ string currencyCode = currData.Find(it => it.Id == item.Currency)?.Name ?? "Unknown";
|
|
|
+ SetCells(ChildTable2, doc, rowIndex, 2, item.Cost.ToString("#0.00") + currencyCode + "/天");
|
|
|
SetCells(ChildTable2, doc, rowIndex, 3, " 汇率" + (item.SubTotal / item.Cost).ToString("#0.00"));
|
|
|
SetCells(ChildTable2, doc, rowIndex, 4, "CNY" + item.SubTotal * days + "\r\n");
|
|
|
rowIndex++;
|
|
|
- gzinfo += item.Place + " " + days + "天 " + item.Cost + item.Currency + "/天" + " 汇率" + (item.SubTotal / item.Cost).ToString("#0.00") + " CNY" + item.SubTotal * days + "\r\n";
|
|
|
+ gzinfo += item.Place + " " + days + "天 " + item.Cost.ToString("#0.00") + currencyCode + "/天" + " 汇率" + (item.SubTotal / item.Cost).ToString("#0.00") + " CNY" + item.SubTotal * days + "\r\n";
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -1169,7 +1178,7 @@ namespace OASystem.API.Controllers
|
|
|
}
|
|
|
}
|
|
|
//MemoryStream outSteam = new MemoryStream();
|
|
|
- string filsPath = AppSettingsHelper.Get("WordBasePath") + $"ForeignReceivables/File/{ClientItem.Key}.docx";
|
|
|
+ string filsPath = AppSettingsHelper.Get("WordBasePath") + $"ForeignReceivables/File/{ClientItem.Key.Replace("\n","")}.docx";
|
|
|
doc.Save(filsPath);
|
|
|
filesToZip.Add(filsPath);
|
|
|
//streams.Add(ClientItem.Key + ".docx", outSteam.ToArray());
|