|
@@ -5050,30 +5050,31 @@ namespace OASystem.API.Controllers
|
|
|
decimal allPrice = dac1totalPrice + dac2totalPrice + _EnterExitCosts.Visa + _EnterExitCosts.Safe + _EnterExitCosts.Ticket;
|
|
|
|
|
|
//国际旅费
|
|
|
- string outsideJJ = "";
|
|
|
- string allPriceJJ = "";
|
|
|
+ string outsideAir = string.Empty;
|
|
|
+ string allPriceAir = string.Empty;
|
|
|
if (_EnterExitCosts.SumJJC == 1)
|
|
|
{
|
|
|
- outsideJJ = string.Format(@"经济舱:{0} 元/人", _EnterExitCosts.AirJJ.ToString("#0.00"));
|
|
|
- allPriceJJ = string.Format(@"经济舱:{0} 元/人", (allPrice + _EnterExitCosts.OutsideJJPay).ToString("#0.00"));
|
|
|
+ outsideAir += string.Format(@"经济舱:{0} 元/人;", _EnterExitCosts.AirJJ.ToString("#0.00"));
|
|
|
+ allPriceAir += string.Format(@"经济舱:{0} 元/人;", (allPrice + _EnterExitCosts.OutsideJJPay).ToString("#0.00"));
|
|
|
}
|
|
|
- string outsideGW = "";
|
|
|
- string allPriceGW = "";
|
|
|
+
|
|
|
if (_EnterExitCosts.SumGWC == 1)
|
|
|
{
|
|
|
- outsideGW = string.Format(@"公务舱:{0} 元/人", _EnterExitCosts.AirGW.ToString("#0.00"));
|
|
|
- allPriceGW = string.Format(@"公务舱:{0} 元/人", (allPrice + _EnterExitCosts.OutsideGWPay).ToString("#0.00"));
|
|
|
+ outsideAir += string.Format(@"公务舱:{0} 元/人;", _EnterExitCosts.AirGW.ToString("#0.00"));
|
|
|
+ allPriceAir += string.Format(@"公务舱:{0} 元/人;", (allPrice + _EnterExitCosts.OutsideGWPay).ToString("#0.00"));
|
|
|
}
|
|
|
|
|
|
- if (_EnterExitCosts.SumJJC == 1 || _EnterExitCosts.SumGWC == 1)
|
|
|
+ if (_EnterExitCosts.SumTDC == 1)
|
|
|
{
|
|
|
- string InTravelPriceStr = string.Format(@" ({0} {1})", outsideJJ, outsideGW);
|
|
|
- dic.Add("InTravelPrice", InTravelPriceStr);
|
|
|
-
|
|
|
- string FinalSumPriceStr = string.Format(@" ({0} {1})", allPriceJJ, allPriceGW);
|
|
|
- dic.Add("FinalSumPrice", FinalSumPriceStr);
|
|
|
+ outsideAir += string.Format(@"头等舱:{0} 元/人;", _EnterExitCosts.AirTD.ToString("#0.00"));
|
|
|
+ allPriceAir += string.Format(@"头等舱:{0} 元/人;", (allPrice + _EnterExitCosts.OutsideTDPay).ToString("#0.00"));
|
|
|
}
|
|
|
|
|
|
+ dic.Add("InTravelPrice", $"({outsideAir})");
|
|
|
+
|
|
|
+ dic.Add("FinalSumPrice", $"({allPriceAir})");
|
|
|
+
|
|
|
+
|
|
|
//dic.Add("VisaPay", _EnterExitCosts.Visa.ToString("#0.00"));
|
|
|
//dic.Add("SafePay", _EnterExitCosts.Safe.ToString("#0.00"));
|
|
|
//dic.Add("YiMiao", _EnterExitCosts.YiMiao.ToString("#0.00"));
|
|
@@ -5085,7 +5086,7 @@ namespace OASystem.API.Controllers
|
|
|
}
|
|
|
|
|
|
//模板文件名
|
|
|
- string strFileName = $"{_DelegationInfo.TeamName}因公出国(境)经费测算明细表.docx";
|
|
|
+ string strFileName = $"{_DelegationInfo.TeamName}因公出国(境)经费测算明细表{DateTime.UtcNow.ToString("yyyyMMddHHmmss")}.docx";
|
|
|
doc.Save(AppSettingsHelper.Get("WordBasePath") + "EnterExitCost/File/" + strFileName);
|
|
|
string url = AppSettingsHelper.Get("WordBaseUrl") + "Office/Word/EnterExitCost/File/" + strFileName;
|
|
|
return Ok(JsonView(true, "成功", new { Url = url }));
|
|
@@ -5252,8 +5253,12 @@ namespace OASystem.API.Controllers
|
|
|
designer.SetDataSource("cityTranffic", @$"其中:国外城市间机票费: {_EnterExitCosts.CityTranffic.ToString("#0.00")} 元");
|
|
|
designer.SetDataSource("sumCityTranffic", @$"{_EnterExitCosts.CityTranffic.ToString("#0.00")} ");
|
|
|
|
|
|
+ string cell4Str1 = string.Empty;
|
|
|
+ if (_EnterExitCosts.SumJJC == 1) cell4Str1 += $"经济舱:{_EnterExitCosts.AirJJ.ToString("#0.00")} 元/人;";
|
|
|
+ if (_EnterExitCosts.SumGWC == 1) cell4Str1 += $"公务舱:{_EnterExitCosts.AirGW.ToString("#0.00")} 元/人;";
|
|
|
+ if (_EnterExitCosts.SumTDC == 1) cell4Str1 += $"公务舱:{_EnterExitCosts.AirTD.ToString("#0.00")} 元/人;";
|
|
|
+ string cell4Str = $" 4.国际旅费:{cell4Str1}";
|
|
|
|
|
|
- string cell4Str = $" 4.国际旅费:经济舱:{_EnterExitCosts.AirJJ.ToString("#0.00")} 元/人,公务舱:{_EnterExitCosts.AirGW.ToString("#0.00")} 元/人";
|
|
|
string cellStr = $" 5.其他费用(";
|
|
|
if (_EnterExitCosts.Visa > 0) cellStr += $"签证费:{_EnterExitCosts.Visa.ToString("#0.00")}元,";
|
|
|
if (_EnterExitCosts.YiMiao > 0) cellStr += $"疫苗费:{_EnterExitCosts.YiMiao.ToString("#0.00")}元,";
|
|
@@ -5322,7 +5327,7 @@ namespace OASystem.API.Controllers
|
|
|
wb.CalculateFormula(true);
|
|
|
|
|
|
//模板文件名
|
|
|
- string strFileName = $"{_DelegationInfo.TeamName}-四川省商务厅出国经费财政先行审核表{DateTime.Now.ToString("yyyyMMddHHmmss")}.xls"; ;//$".xls";
|
|
|
+ string strFileName = $"{_DelegationInfo.TeamName}-四川省商务厅出国经费财政先行审核表{DateTime.Now.ToString("yyyyMMddHHmmss")}.xls";
|
|
|
designer.Workbook.Save(AppSettingsHelper.Get("WordBasePath") + "EnterExitCost/File/" + strFileName);
|
|
|
string url = AppSettingsHelper.Get("WordBaseUrl") + "Office/Word/EnterExitCost/File/" + strFileName;
|
|
|
return Ok(JsonView(true, "成功", new { Url = url }));
|
|
@@ -5610,7 +5615,6 @@ namespace OASystem.API.Controllers
|
|
|
NodeCollection allTables = doc.GetChildNodes(NodeType.Table, true);
|
|
|
Aspose.Words.Tables.Table table1 = allTables[0] as Aspose.Words.Tables.Table;
|
|
|
|
|
|
-
|
|
|
int accommodationStartIndex = 6;
|
|
|
decimal dac1totalPrice = 0.00M;
|
|
|
foreach (var dac in dac1)
|
|
@@ -5648,12 +5652,8 @@ namespace OASystem.API.Controllers
|
|
|
dac1totalPrice += rbmPrice;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
dic.Add("dac1totalPrice", dac1totalPrice.ToString("#0.00"));
|
|
|
|
|
|
-
|
|
|
builder.MoveToCell(0, accommodationStartIndex, 1, 0);
|
|
|
builder.Write("小计");
|
|
|
builder.MoveToCell(0, accommodationStartIndex, 8, 0);
|
|
@@ -5669,8 +5669,8 @@ namespace OASystem.API.Controllers
|
|
|
// int rowIndex = accommodationStartIndex;
|
|
|
// for (int i = 0; i < nullRow; i++)
|
|
|
// {
|
|
|
- // Row row = table1.Rows[rowIndex];
|
|
|
- // row.Remove();
|
|
|
+ // Aspose.Words.Tables.Row row = table1.Rows[rowIndex];
|
|
|
+ // row.Remove();
|
|
|
// rowIndex++;
|
|
|
// }
|
|
|
//}
|
|
@@ -5720,15 +5720,16 @@ namespace OASystem.API.Controllers
|
|
|
}
|
|
|
|
|
|
dic.Add("dac2totalPrice", dac2totalPrice.ToString("#0.00"));
|
|
|
+
|
|
|
+ Aspose.Words.Tables.Table table2 = allTables[1] as Aspose.Words.Tables.Table;
|
|
|
//删除空行
|
|
|
- if (dac2.Count < foodandotherRows)
|
|
|
- {
|
|
|
- //int nullRow = accommodationRows - dac2.Count;
|
|
|
- //while (table2.Rows.Count > dac2.Count)
|
|
|
- //{
|
|
|
- // table2.Rows.RemoveAt(dac2.Count);
|
|
|
- //}
|
|
|
- }
|
|
|
+ //if (dac2.Count < foodandotherRows)
|
|
|
+ //{
|
|
|
+ // while (table2.Rows.Count > dac2.Count)
|
|
|
+ // {
|
|
|
+ // table2.Rows.RemoveAt(dac2.Count);
|
|
|
+ // }
|
|
|
+ //}
|
|
|
|
|
|
dic.Add("CityTranffic", _EnterExitCosts.CityTranffic.ToString("#0.00"));
|
|
|
|
|
@@ -5751,7 +5752,7 @@ namespace OASystem.API.Controllers
|
|
|
builder.Write(dic[key]);
|
|
|
}
|
|
|
//模板文件名
|
|
|
- string strFileName = $"省级单位出(境)经费报销单.docx";
|
|
|
+ string strFileName = $"省级单位出(境)经费报销单{DateTime.UtcNow.ToString("yyyyMMddHHmmss")}.docx";
|
|
|
doc.Save(AppSettingsHelper.Get("WordBasePath") + "EnterExitCost/File/" + strFileName);
|
|
|
string url = AppSettingsHelper.Get("WordBaseUrl") + "Office/Word/EnterExitCost/File/" + strFileName;
|
|
|
return Ok(JsonView(true, "成功", new { Url = url }));
|