|
@@ -44,6 +44,7 @@ using System.IO;
|
|
|
using StackExchange.Redis;
|
|
using StackExchange.Redis;
|
|
|
using Org.BouncyCastle.Utilities;
|
|
using Org.BouncyCastle.Utilities;
|
|
|
using Aspose.Words.Drawing;
|
|
using Aspose.Words.Drawing;
|
|
|
|
|
+using Aspose.Cells.Charts;
|
|
|
|
|
|
|
|
namespace OASystem.API.Controllers
|
|
namespace OASystem.API.Controllers
|
|
|
{
|
|
{
|
|
@@ -4069,20 +4070,29 @@ namespace OASystem.API.Controllers
|
|
|
[HttpPost]
|
|
[HttpPost]
|
|
|
public async Task<IActionResult> ExportGroupCostExcelFile(GroupCostExportExcelFile dto)
|
|
public async Task<IActionResult> ExportGroupCostExcelFile(GroupCostExportExcelFile dto)
|
|
|
{
|
|
{
|
|
|
- //Workbook SourceBook1 = new Workbook();
|
|
|
|
|
- //List<string> fileList = new List<string>();
|
|
|
|
|
|
|
+
|
|
|
|
|
+ var jw = JsonView(false);
|
|
|
|
|
|
|
|
if (dto.Diid == 0)
|
|
if (dto.Diid == 0)
|
|
|
{
|
|
{
|
|
|
return Ok(JsonView(false, "请传递团组id"));
|
|
return Ok(JsonView(false, "请传递团组id"));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ var deleInfo = await _groupRepository.PostGroupInfo(new GroupInfoDto { Id = dto.Diid, PortType = 1 });
|
|
|
|
|
+ if (deleInfo.Code != 0)
|
|
|
|
|
+ {
|
|
|
|
|
+ return Ok(JsonView(false, "团组信息查询失败!"));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ var di = deleInfo.Data as DelegationInfoWebView;
|
|
|
|
|
+ if (di == null)
|
|
|
|
|
+ {
|
|
|
|
|
+ return Ok(JsonView(false, "团组信息查询失败!"));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
List<GroupCost_Excel> List_GC1 = new List<GroupCost_Excel>();
|
|
List<GroupCost_Excel> List_GC1 = new List<GroupCost_Excel>();
|
|
|
WorkbookDesigner designer = new WorkbookDesigner();
|
|
WorkbookDesigner designer = new WorkbookDesigner();
|
|
|
|
|
|
|
|
- //var style = new Aspose.Cells.Style();
|
|
|
|
|
- //style.IsTextWrapped = true;
|
|
|
|
|
-
|
|
|
|
|
designer.Workbook = new Workbook(AppSettingsHelper.Get("ExcelBasePath") + ("Template/团组-成本.xls"));
|
|
designer.Workbook = new Workbook(AppSettingsHelper.Get("ExcelBasePath") + ("Template/团组-成本.xls"));
|
|
|
|
|
|
|
|
var List_GC = _GroupCostRepository.GetAllByDiid(dto.Diid);
|
|
var List_GC = _GroupCostRepository.GetAllByDiid(dto.Diid);
|
|
@@ -4147,161 +4157,884 @@ namespace OASystem.API.Controllers
|
|
|
designer.SetDataSource("Currency", dto.title.Currency);
|
|
designer.SetDataSource("Currency", dto.title.Currency);
|
|
|
//designer.SetDataSource("HotelXS", txtHotelXS.Text);
|
|
//designer.SetDataSource("HotelXS", txtHotelXS.Text);
|
|
|
designer.SetDataSource("Rate", dto.title.Rate);
|
|
designer.SetDataSource("Rate", dto.title.Rate);
|
|
|
- //酒店 标间 单间 套房 小套房 小套房/豪华套房 等 间数
|
|
|
|
|
|
|
+
|
|
|
|
|
+ var hotels = _CostTypeHotelNumberRepository.GetCostTypeHotelNumberByDiid(dto.Diid);
|
|
|
|
|
+ var Aparams = hotels.Find(x => x.Type == "Default");
|
|
|
|
|
+ if (Aparams == null)
|
|
|
|
|
+ {
|
|
|
|
|
+ return Ok(jw);
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
//酒店数量
|
|
//酒店数量
|
|
|
- //designer.SetDataSource("SGRNumber", txtSGRNumber.Text);
|
|
|
|
|
- //designer.SetDataSource("TBRNumber", txtTBRNumber.Text);
|
|
|
|
|
- //designer.SetDataSource("JSESNumber", txtJSESNumber.Text);
|
|
|
|
|
- //designer.SetDataSource("SUITENumber", txtSUITENumber.Text);
|
|
|
|
|
-
|
|
|
|
|
- //#region
|
|
|
|
|
- //designer.SetDataSource("VisaName", "签证(CNY)");
|
|
|
|
|
- //designer.SetDataSource("VisaDRCB", txtVisaCost.Text);
|
|
|
|
|
- //designer.SetDataSource("VisaRS", txtVisaNum.Text);
|
|
|
|
|
- //designer.SetDataSource("VisaXS", txtVisaXS.Text);
|
|
|
|
|
- //designer.SetDataSource("VisaZCB", lblVisaZCB.Text);
|
|
|
|
|
- //designer.SetDataSource("VisaDRBJ", lblVisaDRBJ.Text);
|
|
|
|
|
- //designer.SetDataSource("VisaZBJ", lblVisaZBJ.Text);
|
|
|
|
|
- //designer.SetDataSource("VisaDRLR", lblVisaDRLR.Text);
|
|
|
|
|
- //designer.SetDataSource("VisaZLR", lblVisaZLR.Text);
|
|
|
|
|
-
|
|
|
|
|
- //designer.SetDataSource("BXName", "保险(CNY)");
|
|
|
|
|
- //designer.SetDataSource("BXDRCB", txtBXCB.Text);
|
|
|
|
|
- //designer.SetDataSource("BXRS", txtBXRS.Text);
|
|
|
|
|
- //designer.SetDataSource("BXXS", txtBXXS.Text);
|
|
|
|
|
- //designer.SetDataSource("BXZCB", lblBXZCB.Text);
|
|
|
|
|
- //designer.SetDataSource("BXDRBJ", lblBXDRBJ.Text);
|
|
|
|
|
- //designer.SetDataSource("BXZBJ", lblBXZBJ.Text);
|
|
|
|
|
- //designer.SetDataSource("BXDRLR", lblBXDRLR.Text);
|
|
|
|
|
- //designer.SetDataSource("BXZLR", lblBXZLR.Text);
|
|
|
|
|
-
|
|
|
|
|
- //designer.SetDataSource("HSName", "核酸检测(CNY)");
|
|
|
|
|
- //designer.SetDataSource("HSDRCB", txtHSCB.Text);
|
|
|
|
|
- //designer.SetDataSource("HSRS", txtHSRS.Text);
|
|
|
|
|
- //designer.SetDataSource("HSXS", txtHSXS.Text);
|
|
|
|
|
- //designer.SetDataSource("HSZCB", lblHSZCB.Text);
|
|
|
|
|
- //designer.SetDataSource("HSDRBJ", lblHSDRBJ.Text);
|
|
|
|
|
- //designer.SetDataSource("HSZBJ", lblHSZBJ.Text);
|
|
|
|
|
- //designer.SetDataSource("HSDRLR", lblHSDRLR.Text);
|
|
|
|
|
- //designer.SetDataSource("HSZLR", lblHSZLR.Text);
|
|
|
|
|
-
|
|
|
|
|
- //designer.SetDataSource("AirJJCName", "机票-经济舱(CNY)");
|
|
|
|
|
- //designer.SetDataSource("JPJJCCB", tbJJCCB.Text);
|
|
|
|
|
- //designer.SetDataSource("JPJJCPnum", tbJJCPnum.Text);
|
|
|
|
|
- //designer.SetDataSource("JPJJCXS", BtxtJPJJCXS.Text);
|
|
|
|
|
- //designer.SetDataSource("JPJJCZCB", lbJJCZCB.Text);
|
|
|
|
|
- //designer.SetDataSource("JPJJCDRBJ", lblJJCDRBJ.Text);
|
|
|
|
|
- //designer.SetDataSource("JPJJCZBJ", lblJJCZBJ.Text);
|
|
|
|
|
- //designer.SetDataSource("JPJJCDRLR", lblJJCDRLR.Text);
|
|
|
|
|
- //designer.SetDataSource("JPJJCZLR", LBLJJCZLR.Text);
|
|
|
|
|
-
|
|
|
|
|
- //designer.SetDataSource("AirGWCName", "机票-公务舱(CNY)");
|
|
|
|
|
- //designer.SetDataSource("JPGWCCB", tbGWCCB.Text);
|
|
|
|
|
- //designer.SetDataSource("JPGWCPNum", tbGWCPNum.Text);
|
|
|
|
|
- //designer.SetDataSource("JPGWCXS", txtJPGWCXS.Text);
|
|
|
|
|
- //designer.SetDataSource("JPGWCZCB", lbGWCZCB.Text);
|
|
|
|
|
- //designer.SetDataSource("JPGWCDRBJ", lblGWCDRBJ.Text);
|
|
|
|
|
- //designer.SetDataSource("JPGWCZBJ", lblGWCZBJ.Text);
|
|
|
|
|
- //designer.SetDataSource("JPGWCDRLR", lblGWCDRLR.Text);
|
|
|
|
|
- //designer.SetDataSource("JPGWCZLR", lblGWCZLR.Text);
|
|
|
|
|
-
|
|
|
|
|
- //designer.SetDataSource("HCPCB", txtHCPCB.Text);
|
|
|
|
|
- //designer.SetDataSource("HCPRS", txtHCPRS.Text);
|
|
|
|
|
- //designer.SetDataSource("HCPXS", txtHCPXS.Text);
|
|
|
|
|
- //designer.SetDataSource("HCPZCB", lblHCPZCB.Text);
|
|
|
|
|
- //designer.SetDataSource("HCPDRBJ", lblHCPDRBJ.Text);
|
|
|
|
|
- //designer.SetDataSource("HCPZBJ", lblHCPZBJ.Text);
|
|
|
|
|
- //designer.SetDataSource("HCPDRLR", lblHCPDRLR.Text);
|
|
|
|
|
- //designer.SetDataSource("HCPZLR", lblHCPZLR.Text);
|
|
|
|
|
-
|
|
|
|
|
- //designer.SetDataSource("CPCB", txtCPCB.Text);
|
|
|
|
|
- //designer.SetDataSource("CPRS", txtCPRS.Text);
|
|
|
|
|
- //designer.SetDataSource("CPXS", txtCPXS.Text);
|
|
|
|
|
- //designer.SetDataSource("CPZCB", lblCPZCB.Text);
|
|
|
|
|
- //designer.SetDataSource("CPDRBJ", lblCPDRBJ.Text);
|
|
|
|
|
- //designer.SetDataSource("CPZBJ", lblCPZBJ.Text);
|
|
|
|
|
- //designer.SetDataSource("CPDRLR", lblCPDRLR.Text);
|
|
|
|
|
- //designer.SetDataSource("CPZLR", lblCPZLR.Text);
|
|
|
|
|
-
|
|
|
|
|
- ////TBR
|
|
|
|
|
- //designer.SetDataSource("HotelTBRDRCB", lblHotelTBRDRCB.Text);
|
|
|
|
|
- //designer.SetDataSource("HotelTBRRS", txtHotelTBRRS.Text);
|
|
|
|
|
- //designer.SetDataSource("HotelTBRXS", txtHoteLTBRXS.Text);
|
|
|
|
|
- //designer.SetDataSource("HotelTBRCB", lblHotelTBRCB.Text);
|
|
|
|
|
- //designer.SetDataSource("HotelTBRDRBJ", lblHotelTBRDRBJ.Text);
|
|
|
|
|
- //designer.SetDataSource("HotelTBRZBJ", lblHotelTBRZBJ.Text);
|
|
|
|
|
- //designer.SetDataSource("HotelTBRDRLR", lblHotelTBRDRLR.Text);
|
|
|
|
|
- //designer.SetDataSource("HotelTBRZLR", lblHotelTBRZLR.Text);
|
|
|
|
|
-
|
|
|
|
|
- ////SGR
|
|
|
|
|
- //designer.SetDataSource("HotelSGRDRCB", lblHotelSGRDRCB.Text);
|
|
|
|
|
- //designer.SetDataSource("HotelSGRRS", txtHotelSGRRS.Text);
|
|
|
|
|
- //designer.SetDataSource("HotelSGRXS", txtHotelSGRXS.Text);
|
|
|
|
|
- //designer.SetDataSource("HotelSGRCB", lblHotelSGRZCB.Text);
|
|
|
|
|
- //designer.SetDataSource("HotelSGRDRBJ", lblHotelSGRDRBJ.Text);
|
|
|
|
|
- //designer.SetDataSource("HotelSGRZBJ", lblHotelSGRZBJ.Text);
|
|
|
|
|
- //designer.SetDataSource("HotelSGRDRLR", lblHotelSGRDRLR.Text);
|
|
|
|
|
- //designer.SetDataSource("HotelSGRZLR", lblHotelSGRZLR.Text);
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- ////JS/ES
|
|
|
|
|
- //designer.SetDataSource("HotelJSESDRCB", lblHotelJSESDRCB.Text);
|
|
|
|
|
- //designer.SetDataSource("HotelJSESRS", txtHotelJSESRS.Text);
|
|
|
|
|
- //designer.SetDataSource("HotelJSESXS", txtHotelJSESXS.Text);
|
|
|
|
|
- //designer.SetDataSource("HotelJSESCB", lblHotelJSESZCB.Text);
|
|
|
|
|
- //designer.SetDataSource("HotelJSESDRBJ", lblHotelJSESDRBJ.Text);
|
|
|
|
|
- //designer.SetDataSource("HotelJSESZBJ", lblHotelJSESZBJ.Text);
|
|
|
|
|
- //designer.SetDataSource("HotelJSESDRLR", lblHotelJSESDRLR.Text);
|
|
|
|
|
- //designer.SetDataSource("HotelJSESZLR", lblHotelJSESZLR.Text);
|
|
|
|
|
-
|
|
|
|
|
- ////SUITE
|
|
|
|
|
- //designer.SetDataSource("HotelSUITEDRCB", lblHotelSUITEDRCB.Text);
|
|
|
|
|
- //designer.SetDataSource("HotelSUITERS", txtHotelSUITERS.Text);
|
|
|
|
|
- //designer.SetDataSource("HotelSUITEXS", txtHotelSUITEXS.Text);
|
|
|
|
|
- //designer.SetDataSource("HotelSUITECB", lblHotelSUITEZCB.Text);
|
|
|
|
|
- //designer.SetDataSource("HotelSUITEDRBJ", lblHotelSUITEDRBJ.Text);
|
|
|
|
|
- //designer.SetDataSource("HotelSUITEZBJ", lblHotelSUITEZBJ.Text);
|
|
|
|
|
- //designer.SetDataSource("HotelSUITEDRLR", lblHotelSUITEDRLR.Text);
|
|
|
|
|
- //designer.SetDataSource("HotelSUITEZLR", lblHotelSUITEZLR.Text);
|
|
|
|
|
-
|
|
|
|
|
- //designer.SetDataSource("DJDRCB", lblDJDRCB.Text);
|
|
|
|
|
- //designer.SetDataSource("DJRS", txtDJRS.Text);
|
|
|
|
|
- //designer.SetDataSource("DJXS", txtDJXS.Text);
|
|
|
|
|
- //designer.SetDataSource("DJCB", lblDJCB.Text);
|
|
|
|
|
- //designer.SetDataSource("DJDRBJ", lblDJDRBJ.Text);
|
|
|
|
|
- //designer.SetDataSource("DJZBJ", lblDJZBJ.Text);
|
|
|
|
|
- //designer.SetDataSource("DJDRLR", lblDJDRLR.Text);
|
|
|
|
|
- //designer.SetDataSource("DJZLR", lblDJZLR.Text);
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- //designer.SetDataSource("GWDRCD", lblGWDRCD.Text);
|
|
|
|
|
- //designer.SetDataSource("GWRS", txtGWRS.Text);
|
|
|
|
|
- //designer.SetDataSource("GWXS", txtGWXS.Text);
|
|
|
|
|
- //designer.SetDataSource("GWCB", lblGWCB.Text);
|
|
|
|
|
- //designer.SetDataSource("GWDRBJ", lblGWDRBJ.Text);
|
|
|
|
|
- //designer.SetDataSource("GWZBJ", lblGWZBJ.Text);
|
|
|
|
|
- //designer.SetDataSource("GWDRLR", lblGWDRLR.Text);
|
|
|
|
|
- //designer.SetDataSource("GWZLR", lblGWZLR.Text);
|
|
|
|
|
-
|
|
|
|
|
- //designer.SetDataSource("LYJDRCB", lblLYJDRCB.Text);
|
|
|
|
|
- //designer.SetDataSource("LYJRS", txtLYJRS.Text);
|
|
|
|
|
- //designer.SetDataSource("LYJXS", txtLYJXS.Text);
|
|
|
|
|
- //designer.SetDataSource("LYJCB", lblLYJCB.Text);
|
|
|
|
|
- //designer.SetDataSource("LYJDRBJ", lblLYJDRBJ.Text);
|
|
|
|
|
- //designer.SetDataSource("LYJZBJ", lblLYJZBJ.Text);
|
|
|
|
|
- //designer.SetDataSource("LYJDRLR", lblLYJDRLR.Text);
|
|
|
|
|
- //designer.SetDataSource("LYJZLR", lblLYJZLR.Text);
|
|
|
|
|
- //#endregion
|
|
|
|
|
|
|
+ var txtSGRNumber = Aparams.SGR.ToString();
|
|
|
|
|
+ var txtTBRNumber = Aparams.TBR.ToString();
|
|
|
|
|
+ var txtJSESNumber = Aparams.JSES.ToString();
|
|
|
|
|
+ var txtSUITENumbe = Aparams.SUITE.ToString();
|
|
|
|
|
+
|
|
|
|
|
+ if (dto.costType == "B")
|
|
|
|
|
+ {
|
|
|
|
|
+ Aparams = hotels.Find(x => x.Type == "A");
|
|
|
|
|
+ var Bparams = hotels.Find(x => x.Type == "B");
|
|
|
|
|
+ if (Aparams == null || Bparams == null)
|
|
|
|
|
+ {
|
|
|
|
|
+ return Ok(jw);
|
|
|
|
|
+ }
|
|
|
|
|
+ txtSGRNumber = "A段人数:" + Aparams.SGR.ToString() + " B段人数:" + Bparams.SGR.ToString();
|
|
|
|
|
+ txtTBRNumber = "A段人数:" + Aparams.TBR.ToString() + " B段人数:" + Bparams.TBR.ToString();
|
|
|
|
|
+ txtJSESNumber = "A段人数:" + Aparams.JSES.ToString() + " B段人数:" + Bparams.JSES.ToString();
|
|
|
|
|
+ txtSUITENumbe = "A段人数:" + Aparams.SUITE.ToString() + " B段人数:" + Bparams.SUITE.ToString();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ designer.SetDataSource("SGRNumber", txtSGRNumber);
|
|
|
|
|
+ designer.SetDataSource("TBRNumber", txtTBRNumber);
|
|
|
|
|
+ designer.SetDataSource("JSESNumber", txtJSESNumber);
|
|
|
|
|
+ designer.SetDataSource("SUITENumber", txtSUITENumbe);
|
|
|
|
|
+
|
|
|
|
|
+ var ws = designer.Workbook.Worksheets[0];
|
|
|
|
|
+ int Row = List_GC.Count;
|
|
|
|
|
+ int startIndex = 11;
|
|
|
|
|
+ int HideRows = 0;
|
|
|
|
|
+ List<int> hideRowsList = new List<int>();
|
|
|
|
|
+ decimal TzZCB2 = 0.00M, TzZLR2 = 0.00M, TzZBJ2 = 0.00M;
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ #region A段left数据
|
|
|
|
|
+ var left = dto.leftInfo.Find(x => x.Type == "A");
|
|
|
|
|
+ if (left == null)
|
|
|
|
|
+ {
|
|
|
|
|
+ return Ok(jw);
|
|
|
|
|
+ }
|
|
|
|
|
+ var leftBindData = left.leftinfoNumber.Find(x => x.title.Contains("签证"));
|
|
|
|
|
+ if (leftBindData != null)
|
|
|
|
|
+ {
|
|
|
|
|
+
|
|
|
|
|
+ designer.SetDataSource("VisaDRCB", leftBindData.cb);
|
|
|
|
|
+ designer.SetDataSource("VisaRS", leftBindData.rs);
|
|
|
|
|
+ designer.SetDataSource("VisaXS", leftBindData.xs);
|
|
|
|
|
+ designer.SetDataSource("VisaZCB", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("VisaDRBJ", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs));
|
|
|
|
|
+ designer.SetDataSource("VisaZBJ", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("VisaDRLR", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs) - decimal.Parse(leftBindData.cb));
|
|
|
|
|
+ designer.SetDataSource("VisaZLR", ((decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs)) - decimal.Parse(leftBindData.cb)) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ }
|
|
|
|
|
+ else {
|
|
|
|
|
+ hideRowsList.Add(Row + startIndex + HideRows);
|
|
|
|
|
+ //ws.Cells.HideRows((Row + startIndex + HideRows), 2);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ HideRows += 2;
|
|
|
|
|
+ leftBindData = left.leftinfoNumber.Find(x => x.title.Contains("保险"));
|
|
|
|
|
+ if (leftBindData != null)
|
|
|
|
|
+ {
|
|
|
|
|
+
|
|
|
|
|
+ designer.SetDataSource("BXDRCB", leftBindData.cb);
|
|
|
|
|
+ designer.SetDataSource("BXRS", leftBindData.rs);
|
|
|
|
|
+ designer.SetDataSource("BXXS", leftBindData.xs);
|
|
|
|
|
+ designer.SetDataSource("BXZCB", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("BXDRBJ", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs));
|
|
|
|
|
+ designer.SetDataSource("BXZBJ", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("BXDRLR", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs) - decimal.Parse(leftBindData.cb));
|
|
|
|
|
+ designer.SetDataSource("BXZLR", ((decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs)) - decimal.Parse(leftBindData.cb)) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ hideRowsList.Add(Row + startIndex + HideRows);
|
|
|
|
|
+ //ws.Cells.HideRows((Row + startIndex + HideRows), 2);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ HideRows += 2;
|
|
|
|
|
+ leftBindData = left.leftinfoNumber.Find(x => x.title.Contains("核酸"));
|
|
|
|
|
+ if (leftBindData != null)
|
|
|
|
|
+ {
|
|
|
|
|
+ designer.SetDataSource("HSDRCB", leftBindData.cb);
|
|
|
|
|
+ designer.SetDataSource("HSRS", leftBindData.rs);
|
|
|
|
|
+ designer.SetDataSource("HSXS", leftBindData.xs);
|
|
|
|
|
+ designer.SetDataSource("HSZCB", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("HSDRBJ", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs));
|
|
|
|
|
+ designer.SetDataSource("HSZBJ", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("HSDRLR", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs) - decimal.Parse(leftBindData.cb));
|
|
|
|
|
+ designer.SetDataSource("HSZLR", ((decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs)) - decimal.Parse(leftBindData.cb)) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ hideRowsList.Add(Row + startIndex + HideRows);
|
|
|
|
|
+ //ws.Cells.HideRows((Row + startIndex + HideRows), 2);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ HideRows += 2;
|
|
|
|
|
+ leftBindData = left.leftinfoNumber.Find(x => x.title.Contains("经济舱"));
|
|
|
|
|
+ if (leftBindData != null)
|
|
|
|
|
+ {
|
|
|
|
|
+
|
|
|
|
|
+ designer.SetDataSource("JPJJCCB", leftBindData.cb);
|
|
|
|
|
+ designer.SetDataSource("JPJJCPnum", leftBindData.rs);
|
|
|
|
|
+ designer.SetDataSource("JPJJCXS", leftBindData.xs);
|
|
|
|
|
+ designer.SetDataSource("JPJJCZCB", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("JPJJCDRBJ", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs));
|
|
|
|
|
+ designer.SetDataSource("JPJJCZBJ", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("JPJJCDRLR", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs) - decimal.Parse(leftBindData.cb));
|
|
|
|
|
+ designer.SetDataSource("JPJJCZLR", ((decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs)) - decimal.Parse(leftBindData.cb)) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ hideRowsList.Add(Row + startIndex + HideRows);
|
|
|
|
|
+ //ws.Cells.HideRows((Row + startIndex + HideRows), 2);
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
+ HideRows += 2;
|
|
|
|
|
+ leftBindData = left.leftinfoNumber.Find(x => x.title.Contains("公务舱"));
|
|
|
|
|
+ if (leftBindData != null)
|
|
|
|
|
+ {
|
|
|
|
|
+
|
|
|
|
|
+ designer.SetDataSource("JPGWCCB", leftBindData.cb);
|
|
|
|
|
+ designer.SetDataSource("JPGWCPNum", leftBindData.rs);
|
|
|
|
|
+ designer.SetDataSource("JPGWCXS", leftBindData.xs);
|
|
|
|
|
+ designer.SetDataSource("JPGWCZCB", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("JPGWCDRBJ", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs));
|
|
|
|
|
+ designer.SetDataSource("JPGWCZBJ", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("JPGWCDRLR", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs) - decimal.Parse(leftBindData.cb));
|
|
|
|
|
+ designer.SetDataSource("JPGWCZLR", ((decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs)) - decimal.Parse(leftBindData.cb)) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ hideRowsList.Add(Row + startIndex + HideRows);
|
|
|
|
|
+ //ws.Cells.HideRows((Row + startIndex + HideRows), 2);
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+ HideRows += 2;
|
|
|
|
|
+ leftBindData = left.leftinfoNumber.Find(x => x.title.Contains("TBR"));
|
|
|
|
|
+ if (leftBindData != null)
|
|
|
|
|
+ {
|
|
|
|
|
+ ////TBR
|
|
|
|
|
+ designer.SetDataSource("HotelTBRDRCB", leftBindData.cb);
|
|
|
|
|
+ designer.SetDataSource("HotelTBRRS", leftBindData.rs);
|
|
|
|
|
+ designer.SetDataSource("HotelTBRXS", leftBindData.xs);
|
|
|
|
|
+ designer.SetDataSource("HotelTBRCB", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("HotelTBRDRBJ", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs));
|
|
|
|
|
+ designer.SetDataSource("HotelTBRZBJ", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("HotelTBRDRLR", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs) - decimal.Parse(leftBindData.cb));
|
|
|
|
|
+ designer.SetDataSource("HotelTBRZLR", ((decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs)) - decimal.Parse(leftBindData.cb)) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ hideRowsList.Add(Row + startIndex + HideRows);
|
|
|
|
|
+ //ws.Cells.HideRows((Row + startIndex + HideRows), 2);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ HideRows += 2;
|
|
|
|
|
+ leftBindData = left.leftinfoNumber.Find(x => x.title.Contains("SGR"));
|
|
|
|
|
+ if (leftBindData != null)
|
|
|
|
|
+ {
|
|
|
|
|
+ ////SGR
|
|
|
|
|
+ designer.SetDataSource("HotelSGRDRCB", leftBindData.cb);
|
|
|
|
|
+ designer.SetDataSource("HotelSGRRS", leftBindData.rs);
|
|
|
|
|
+ designer.SetDataSource("HotelSGRXS", leftBindData.xs);
|
|
|
|
|
+ designer.SetDataSource("HotelSGRCB", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("HotelSGRDRBJ", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs));
|
|
|
|
|
+ designer.SetDataSource("HotelSGRZBJ", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("HotelSGRDRLR", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs) - decimal.Parse(leftBindData.cb));
|
|
|
|
|
+ designer.SetDataSource("HotelSGRZLR", ((decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs)) - decimal.Parse(leftBindData.cb)) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ hideRowsList.Add(Row + startIndex + HideRows);
|
|
|
|
|
+ // ws.Cells.HideRows((Row + startIndex + HideRows), 2);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ HideRows += 2;
|
|
|
|
|
+ leftBindData = left.leftinfoNumber.Find(x => x.title.Contains("JSES"));
|
|
|
|
|
+ if (leftBindData != null)
|
|
|
|
|
+ {
|
|
|
|
|
+ ////JS/ES
|
|
|
|
|
+ designer.SetDataSource("HotelJSESDRCB", leftBindData.cb);
|
|
|
|
|
+ designer.SetDataSource("HotelJSESRS", leftBindData.rs);
|
|
|
|
|
+ designer.SetDataSource("HotelJSESXS", leftBindData.xs);
|
|
|
|
|
+ designer.SetDataSource("HotelJSESCB", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("HotelJSESDRBJ", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs));
|
|
|
|
|
+ designer.SetDataSource("HotelJSESZBJ", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("HotelJSESDRLR", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs) - decimal.Parse(leftBindData.cb));
|
|
|
|
|
+ designer.SetDataSource("HotelJSESZLR", ((decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs)) - decimal.Parse(leftBindData.cb)) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ hideRowsList.Add(Row + startIndex + HideRows);
|
|
|
|
|
+ // ws.Cells.HideRows((Row + startIndex + HideRows), 2);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ HideRows += 2;
|
|
|
|
|
+ leftBindData = left.leftinfoNumber.Find(x => x.title.Contains("SUITE"));
|
|
|
|
|
+ if (leftBindData != null)
|
|
|
|
|
+ {
|
|
|
|
|
+ ////SUITE
|
|
|
|
|
+ designer.SetDataSource("HotelSUITEDRCB", leftBindData.cb);
|
|
|
|
|
+ designer.SetDataSource("HotelSUITERS", leftBindData.rs);
|
|
|
|
|
+ designer.SetDataSource("HotelSUITEXS", leftBindData.xs);
|
|
|
|
|
+ designer.SetDataSource("HotelSUITECB", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("HotelSUITEDRBJ", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs));
|
|
|
|
|
+ designer.SetDataSource("HotelSUITEZBJ", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("HotelSUITEDRLR", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs) - decimal.Parse(leftBindData.cb));
|
|
|
|
|
+ designer.SetDataSource("HotelSUITEZLR", ((decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs)) - decimal.Parse(leftBindData.cb)) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ hideRowsList.Add(Row + startIndex + HideRows);
|
|
|
|
|
+ // ws.Cells.HideRows((Row + startIndex + HideRows), 2);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ HideRows += 2;
|
|
|
|
|
+ leftBindData = left.leftinfoNumber.Find(x => x.title.Contains("地接"));
|
|
|
|
|
+ if (leftBindData != null)
|
|
|
|
|
+ {
|
|
|
|
|
+ designer.SetDataSource("DJDRCB", leftBindData.cb);
|
|
|
|
|
+ designer.SetDataSource("DJRS", leftBindData.rs);
|
|
|
|
|
+ designer.SetDataSource("DJXS", leftBindData.xs);
|
|
|
|
|
+ designer.SetDataSource("DJCB", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("DJDRBJ", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs));
|
|
|
|
|
+ designer.SetDataSource("DJZBJ", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("DJDRLR", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs) - decimal.Parse(leftBindData.cb));
|
|
|
|
|
+ designer.SetDataSource("DJZLR", ((decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs)) - decimal.Parse(leftBindData.cb)) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ hideRowsList.Add(Row + startIndex + HideRows);
|
|
|
|
|
+ //ws.Cells.HideRows((Row + startIndex + HideRows), 2);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ HideRows += 2;
|
|
|
|
|
+ leftBindData = left.leftinfoNumber.Find(x => x.title.Contains("火车票"));
|
|
|
|
|
+ if (leftBindData != null)
|
|
|
|
|
+ {
|
|
|
|
|
+ designer.SetDataSource("HCPCB", leftBindData.cb);
|
|
|
|
|
+ designer.SetDataSource("HCPRS", leftBindData.rs);
|
|
|
|
|
+ designer.SetDataSource("HCPXS", leftBindData.xs);
|
|
|
|
|
+ designer.SetDataSource("HCPZCB", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("HCPDRBJ", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs));
|
|
|
|
|
+ designer.SetDataSource("HCPZBJ", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("HCPDRLR", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs) - decimal.Parse(leftBindData.cb));
|
|
|
|
|
+ designer.SetDataSource("HCPZLR", ((decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs)) - decimal.Parse(leftBindData.cb)) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ hideRowsList.Add(Row + startIndex + HideRows);
|
|
|
|
|
+ //ws.Cells.HideRows((Row + startIndex + HideRows), 2);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ HideRows += 2;
|
|
|
|
|
+ leftBindData = left.leftinfoNumber.Find(x => x.title.Contains("船票"));
|
|
|
|
|
+ if (leftBindData != null)
|
|
|
|
|
+ {
|
|
|
|
|
+ designer.SetDataSource("CPCB", leftBindData.cb);
|
|
|
|
|
+ designer.SetDataSource("CPRS", leftBindData.rs);
|
|
|
|
|
+ designer.SetDataSource("CPXS", leftBindData.xs);
|
|
|
|
|
+ designer.SetDataSource("CPZCB", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("CPDRBJ", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs));
|
|
|
|
|
+ designer.SetDataSource("CPZBJ", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("CPDRLR", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs) - decimal.Parse(leftBindData.cb));
|
|
|
|
|
+ designer.SetDataSource("CPZLR", ((decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs)) - decimal.Parse(leftBindData.cb)) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ hideRowsList.Add(Row + startIndex + HideRows);
|
|
|
|
|
+ //ws.Cells.HideRows((Row + startIndex + HideRows), 2);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ HideRows += 2;
|
|
|
|
|
+ leftBindData = left.leftinfoNumber.Find(x => x.title.Contains("公务单人"));
|
|
|
|
|
+ if (leftBindData != null)
|
|
|
|
|
+ {
|
|
|
|
|
+ designer.SetDataSource("GWDRCD", leftBindData.cb);
|
|
|
|
|
+ designer.SetDataSource("GWRS", leftBindData.rs);
|
|
|
|
|
+ designer.SetDataSource("GWXS", leftBindData.xs);
|
|
|
|
|
+ designer.SetDataSource("GWCB", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("GWDRBJ", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs));
|
|
|
|
|
+ designer.SetDataSource("GWZBJ", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("GWDRLR", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs) - decimal.Parse(leftBindData.cb));
|
|
|
|
|
+ designer.SetDataSource("GWZLR", ((decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs)) - decimal.Parse(leftBindData.cb)) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ hideRowsList.Add(Row + startIndex + HideRows);
|
|
|
|
|
+ //ws.Cells.HideRows((Row + startIndex + HideRows), 2);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ HideRows += 2;
|
|
|
|
|
+ leftBindData = left.leftinfoNumber.Find(x => x.title.Contains("零用金"));
|
|
|
|
|
+ if (leftBindData != null)
|
|
|
|
|
+ {
|
|
|
|
|
+ designer.SetDataSource("LYJDRCB", leftBindData.cb);
|
|
|
|
|
+ designer.SetDataSource("LYJRS", leftBindData.rs);
|
|
|
|
|
+ designer.SetDataSource("LYJXS", leftBindData.xs);
|
|
|
|
|
+ designer.SetDataSource("LYJCB", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("LYJDRBJ", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs));
|
|
|
|
|
+ designer.SetDataSource("LYJZBJ", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("LYJDRLR", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs) - decimal.Parse(leftBindData.cb));
|
|
|
|
|
+ designer.SetDataSource("LYJZLR", ((decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs)) - decimal.Parse(leftBindData.cb)) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ hideRowsList.Add(Row + startIndex + HideRows);
|
|
|
|
|
+ //ws.Cells.HideRows((Row + startIndex + HideRows), 2);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ #endregion
|
|
|
|
|
+
|
|
|
|
|
+ #region A段Right信息
|
|
|
|
|
+
|
|
|
|
|
+ var right = dto.rightInfo.Find(x => x.Type == "A");
|
|
|
|
|
+ if (right == null)
|
|
|
|
|
+ {
|
|
|
|
|
+ return Ok(jw);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ HideRows += 4;
|
|
|
|
|
+ var rightBindData = right.rightInfoNumber.Find(x => x.title.Contains("经济舱 TBR"));
|
|
|
|
|
+ if (rightBindData!= null)
|
|
|
|
|
+ {
|
|
|
|
|
+ //经济舱 + 双人间 TBR
|
|
|
|
|
+ designer.SetDataSource("lblJJCTBRDRCB", rightBindData.cb);
|
|
|
|
|
+ designer.SetDataSource("txtJJCTBRRS", rightBindData.rs);
|
|
|
|
|
+ designer.SetDataSource("lblJJCTBRZCB", decimal.Parse(rightBindData.cb) * decimal.Parse(rightBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("lblJJCTBRDRBJ", rightBindData.bj);
|
|
|
|
|
+ designer.SetDataSource("lblJJCTBRZBJ", decimal.Parse(rightBindData.bj) * decimal.Parse(rightBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("lblJJCTBRDRLR", decimal.Parse(rightBindData.bj) - decimal.Parse(rightBindData.cb));
|
|
|
|
|
+ designer.SetDataSource("lblJJCTBRZLR", (decimal.Parse(rightBindData.bj) - decimal.Parse(rightBindData.cb)) * decimal.Parse(rightBindData.rs));
|
|
|
|
|
+ TzZCB2 += decimal.Parse(rightBindData.cb) * decimal.Parse(rightBindData.rs);
|
|
|
|
|
+ TzZLR2 += (decimal.Parse(rightBindData.bj) - decimal.Parse(rightBindData.cb)) * decimal.Parse(rightBindData.rs);
|
|
|
|
|
+ TzZBJ2 += decimal.Parse(rightBindData.bj) * decimal.Parse(rightBindData.rs);
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ hideRowsList.Add(Row + startIndex + HideRows);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ HideRows += 2;
|
|
|
|
|
+ rightBindData = right.rightInfoNumber.Find(x => x.title.Contains("经济舱 SGR"));
|
|
|
|
|
+ if (rightBindData != null)
|
|
|
|
|
+ {
|
|
|
|
|
+ //经济舱 + 单人间 SGR
|
|
|
|
|
+ designer.SetDataSource("lblJJCSGRDRCB", rightBindData.cb);
|
|
|
|
|
+ designer.SetDataSource("txtJJCSGRRS", rightBindData.rs);
|
|
|
|
|
+ designer.SetDataSource("lblJJCSGRZCB", decimal.Parse(rightBindData.cb) * decimal.Parse(rightBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("lblJJCSGRDRBJ", rightBindData.bj);
|
|
|
|
|
+ designer.SetDataSource("lblJJCSGRZBJ", decimal.Parse(rightBindData.bj) * decimal.Parse(rightBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("lblJJCSGRDRLR", decimal.Parse(rightBindData.bj) - decimal.Parse(rightBindData.cb));
|
|
|
|
|
+ designer.SetDataSource("lblJJCSGRZLR", (decimal.Parse(rightBindData.bj) - decimal.Parse(rightBindData.cb)) * decimal.Parse(rightBindData.rs));
|
|
|
|
|
+ TzZCB2 += decimal.Parse(rightBindData.cb) * decimal.Parse(rightBindData.rs);
|
|
|
|
|
+ TzZLR2 += (decimal.Parse(rightBindData.bj) - decimal.Parse(rightBindData.cb)) * decimal.Parse(rightBindData.rs);
|
|
|
|
|
+ TzZBJ2 += decimal.Parse(rightBindData.bj) * decimal.Parse(rightBindData.rs);
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ hideRowsList.Add(Row + startIndex + HideRows);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ HideRows += 2;
|
|
|
|
|
+ rightBindData = right.rightInfoNumber.Find(x => x.title.Contains("公务舱 SGR"));
|
|
|
|
|
+ if (rightBindData != null)
|
|
|
|
|
+ {
|
|
|
|
|
+ //公务舱 + 单人间 SGR
|
|
|
|
|
+ designer.SetDataSource("lblGWCSGRCB", rightBindData.cb);
|
|
|
|
|
+ designer.SetDataSource("lblGWCSGRRS", rightBindData.rs);
|
|
|
|
|
+ designer.SetDataSource("lblGWCSGRZCB", decimal.Parse(rightBindData.cb) * decimal.Parse(rightBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("lblGWCSGRDRBJ", rightBindData.bj);
|
|
|
|
|
+ designer.SetDataSource("lblGWCSGRZBJ", decimal.Parse(rightBindData.bj) * decimal.Parse(rightBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("lblGWCSGRDRLR", decimal.Parse(rightBindData.bj) - decimal.Parse(rightBindData.cb));
|
|
|
|
|
+ designer.SetDataSource("lblGWCSGRZLR", (decimal.Parse(rightBindData.bj) - decimal.Parse(rightBindData.cb)) * decimal.Parse(rightBindData.rs));
|
|
|
|
|
+ TzZCB2 += decimal.Parse(rightBindData.cb) * decimal.Parse(rightBindData.rs);
|
|
|
|
|
+ TzZLR2 += (decimal.Parse(rightBindData.bj) - decimal.Parse(rightBindData.cb)) * decimal.Parse(rightBindData.rs);
|
|
|
|
|
+ TzZBJ2 += decimal.Parse(rightBindData.bj) * decimal.Parse(rightBindData.rs);
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ hideRowsList.Add(Row + startIndex + HideRows);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ HideRows += 2;
|
|
|
|
|
+ rightBindData = right.rightInfoNumber.Find(x => x.title.Contains("公务舱 JS/ES"));
|
|
|
|
|
+ if (rightBindData != null)
|
|
|
|
|
+ {
|
|
|
|
|
+ //公务舱 + 小套房 JSES
|
|
|
|
|
+ designer.SetDataSource("lblGWCJSESDRCB", rightBindData.cb);
|
|
|
|
|
+ designer.SetDataSource("txtGWCJSESRS", rightBindData.rs);
|
|
|
|
|
+ designer.SetDataSource("lblGWCJSESZCB", decimal.Parse(rightBindData.cb) * decimal.Parse(rightBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("lblGWCJSESDRBJ", rightBindData.bj);
|
|
|
|
|
+ designer.SetDataSource("lblGWCJSESZBJ", decimal.Parse(rightBindData.bj) * decimal.Parse(rightBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("lblGWCJSESDRLR", decimal.Parse(rightBindData.bj) - decimal.Parse(rightBindData.cb));
|
|
|
|
|
+ designer.SetDataSource("lblGWCJSESZLR", (decimal.Parse(rightBindData.bj) - decimal.Parse(rightBindData.cb)) * decimal.Parse(rightBindData.rs));
|
|
|
|
|
+ TzZCB2 += decimal.Parse(rightBindData.cb) * decimal.Parse(rightBindData.rs);
|
|
|
|
|
+ TzZLR2 += (decimal.Parse(rightBindData.bj) - decimal.Parse(rightBindData.cb)) * decimal.Parse(rightBindData.rs);
|
|
|
|
|
+ TzZBJ2 += decimal.Parse(rightBindData.bj) * decimal.Parse(rightBindData.rs);
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ hideRowsList.Add(Row + startIndex + HideRows);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ HideRows += 2;
|
|
|
|
|
+ rightBindData = right.rightInfoNumber.Find(x => x.title.Contains("公务舱 SUITE"));
|
|
|
|
|
+ if (rightBindData != null)
|
|
|
|
|
+ {
|
|
|
|
|
+ //公务舱 + 小套房 JSES
|
|
|
|
|
+ designer.SetDataSource("lblGWCSUITEDRCB", rightBindData.cb);
|
|
|
|
|
+ designer.SetDataSource("txtGWCSUITERS", rightBindData.rs);
|
|
|
|
|
+ designer.SetDataSource("lblGWCSUITEZCB", decimal.Parse(rightBindData.cb) * decimal.Parse(rightBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("lblGWCSUITEDRBJ", rightBindData.bj);
|
|
|
|
|
+ designer.SetDataSource("lblGWCSUITEZBJ", decimal.Parse(rightBindData.bj) * decimal.Parse(rightBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("lblGWCSUITEDRLR", decimal.Parse(rightBindData.bj) - decimal.Parse(rightBindData.cb));
|
|
|
|
|
+ designer.SetDataSource("lblGWCSUITEZLR", (decimal.Parse(rightBindData.bj) - decimal.Parse(rightBindData.cb)) * decimal.Parse(rightBindData.rs));
|
|
|
|
|
+ TzZCB2 += decimal.Parse(rightBindData.cb) * decimal.Parse(rightBindData.rs);
|
|
|
|
|
+ TzZLR2 += (decimal.Parse(rightBindData.bj) - decimal.Parse(rightBindData.cb)) * decimal.Parse(rightBindData.rs);
|
|
|
|
|
+ TzZBJ2 += decimal.Parse(rightBindData.bj) * decimal.Parse(rightBindData.rs);
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ hideRowsList.Add(Row + startIndex + HideRows);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ HideRows += 2;
|
|
|
|
|
+ rightBindData = right.rightInfoNumber.Find(x => x.title.Contains("经济舱 SUITE"));
|
|
|
|
|
+ if (rightBindData != null)
|
|
|
|
|
+ {
|
|
|
|
|
+ //经济舱 + 大套房
|
|
|
|
|
+ designer.SetDataSource("lblJJCSUITEDRCB", rightBindData.cb);
|
|
|
|
|
+ designer.SetDataSource("txtJJCSUITERS", rightBindData.rs);
|
|
|
|
|
+ designer.SetDataSource("lblJJCSUITEZCB", decimal.Parse(rightBindData.cb) * decimal.Parse(rightBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("lblJJCSUITEDRBJ", rightBindData.bj);
|
|
|
|
|
+ designer.SetDataSource("lblJJCSUITEZBJ", decimal.Parse(rightBindData.bj) * decimal.Parse(rightBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("lblJJCSUITEDRLR", decimal.Parse(rightBindData.bj) - decimal.Parse(rightBindData.cb));
|
|
|
|
|
+ designer.SetDataSource("lblJJCSUITEZLR", (decimal.Parse(rightBindData.bj) - decimal.Parse(rightBindData.cb)) * decimal.Parse(rightBindData.rs));
|
|
|
|
|
+ TzZCB2 += decimal.Parse(rightBindData.cb) * decimal.Parse(rightBindData.rs);
|
|
|
|
|
+ TzZLR2 += (decimal.Parse(rightBindData.bj) - decimal.Parse(rightBindData.cb)) * decimal.Parse(rightBindData.rs);
|
|
|
|
|
+ TzZBJ2 += decimal.Parse(rightBindData.bj) * decimal.Parse(rightBindData.rs);
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ hideRowsList.Add(Row + startIndex + HideRows);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ #endregion
|
|
|
|
|
+
|
|
|
|
|
+ #region B段标题清空
|
|
|
|
|
+ designer.SetDataSource("CostBDRCB", "");
|
|
|
|
|
+ designer.SetDataSource("CostBRS", "");
|
|
|
|
|
+ designer.SetDataSource("CostBXS", "");
|
|
|
|
|
+ designer.SetDataSource("CostBZCB", "");
|
|
|
|
|
+ designer.SetDataSource("CostBDRBJ", "");
|
|
|
|
|
+ designer.SetDataSource("CostBZBJ", "");
|
|
|
|
|
+ designer.SetDataSource("CostBDRLR", "");
|
|
|
|
|
+ designer.SetDataSource("CostBZLR", "");
|
|
|
|
|
+
|
|
|
|
|
+ designer.SetDataSource("CostBDRCBOM", "");
|
|
|
|
|
+ designer.SetDataSource("CostBRSOM", "");
|
|
|
|
|
+ designer.SetDataSource("CostBZCBOM", "");
|
|
|
|
|
+ designer.SetDataSource("CostBDRBJOM", "");
|
|
|
|
|
+ designer.SetDataSource("CostBZBJOM", "");
|
|
|
|
|
+ designer.SetDataSource("CostBDRLROM", "");
|
|
|
|
|
+ designer.SetDataSource("CostBZLROM", "");
|
|
|
|
|
+ #endregion
|
|
|
|
|
+
|
|
|
|
|
+ designer.SetDataSource("HotelTBRName", "酒店TBR单间成本(CNY)");
|
|
|
|
|
+ designer.SetDataSource("HotelSGRName", "酒店SGR单间成本(CNY)");
|
|
|
|
|
+ designer.SetDataSource("HotelJSESName", "酒店JSES单间成本(CNY)");
|
|
|
|
|
+ designer.SetDataSource("HotelSUITEName", "酒店SUITE单间成本(CNY)");
|
|
|
|
|
+
|
|
|
|
|
+ designer.SetDataSource("DJName", "地接(CNY)");
|
|
|
|
|
+ designer.SetDataSource("HCPName", "地接-火车票(CNY)");
|
|
|
|
|
+ designer.SetDataSource("CPName", "地接-船票(CNY)");
|
|
|
|
|
+ designer.SetDataSource("GWName", "公务(CNY)");
|
|
|
|
|
+ designer.SetDataSource("YQHName", "邀请函(CNY)");
|
|
|
|
|
+ designer.SetDataSource("LYJName", "零用金(CNY)");
|
|
|
|
|
+ designer.SetDataSource("HSName", "核酸检测(CNY)");
|
|
|
|
|
+ designer.SetDataSource("AirGWCName", "机票-公务舱(CNY)");
|
|
|
|
|
+ designer.SetDataSource("AirJJCName", "机票-经济舱(CNY)");
|
|
|
|
|
+ designer.SetDataSource("BXName", "保险(CNY)");
|
|
|
|
|
+ designer.SetDataSource("VisaName", "签证(CNY)");
|
|
|
|
|
+
|
|
|
|
|
+ #region B段基本数据
|
|
|
|
|
+ if (dto.costType == "B")
|
|
|
|
|
+ {
|
|
|
|
|
+ left = dto.leftInfo.Find(x => x.Type == "B");
|
|
|
|
|
+ if (left == null)
|
|
|
|
|
+ {
|
|
|
|
|
+ return Ok(jw);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ #region B段left数据
|
|
|
|
|
+ leftBindData = left.leftinfoNumber.Find(x => x.title.Contains("核酸"));
|
|
|
|
|
+ if (leftBindData != null)
|
|
|
|
|
+ {
|
|
|
|
|
+ designer.SetDataSource("BHSDRCB", leftBindData.cb);
|
|
|
|
|
+ designer.SetDataSource("BHSRS", leftBindData.rs);
|
|
|
|
|
+ designer.SetDataSource("BHSXS", leftBindData.xs);
|
|
|
|
|
+ designer.SetDataSource("BHSZCB", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("BHSDRBJ", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs));
|
|
|
|
|
+ designer.SetDataSource("BHSZBJ", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("BHSDRLR", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs) - decimal.Parse(leftBindData.cb));
|
|
|
|
|
+ designer.SetDataSource("BHSZLR", ((decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs)) - decimal.Parse(leftBindData.cb)) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ leftBindData = left.leftinfoNumber.Find(x => x.title.Contains("经济舱"));
|
|
|
|
|
+ if (leftBindData != null)
|
|
|
|
|
+ {
|
|
|
|
|
+
|
|
|
|
|
+ designer.SetDataSource("BJPJJCCB", leftBindData.cb);
|
|
|
|
|
+ designer.SetDataSource("BJPJJCPnum", leftBindData.rs);
|
|
|
|
|
+ designer.SetDataSource("BJPJJCXS", leftBindData.xs);
|
|
|
|
|
+ designer.SetDataSource("BJPJJCZCB", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("BJPJJCDRBJ", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs));
|
|
|
|
|
+ designer.SetDataSource("BJPJJCZBJ", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("BJPJJCDRLR", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs) - decimal.Parse(leftBindData.cb));
|
|
|
|
|
+ designer.SetDataSource("BJPJJCZLR", ((decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs)) - decimal.Parse(leftBindData.cb)) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ leftBindData = left.leftinfoNumber.Find(x => x.title.Contains("公务舱"));
|
|
|
|
|
+ if (leftBindData != null)
|
|
|
|
|
+ {
|
|
|
|
|
+ designer.SetDataSource("BJPGWCCB", leftBindData.cb);
|
|
|
|
|
+ designer.SetDataSource("BJPGWCPNum", leftBindData.rs);
|
|
|
|
|
+ designer.SetDataSource("BJPGWCXS", leftBindData.xs);
|
|
|
|
|
+ designer.SetDataSource("BJPGWCZCB", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("BJPGWCDRBJ", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs));
|
|
|
|
|
+ designer.SetDataSource("BJPGWCZBJ", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("BJPGWCDRLR", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs) - decimal.Parse(leftBindData.cb));
|
|
|
|
|
+ designer.SetDataSource("BJPGWCZLR", ((decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs)) - decimal.Parse(leftBindData.cb)) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ leftBindData = left.leftinfoNumber.Find(x => x.title.Contains("火车票"));
|
|
|
|
|
+ if (leftBindData != null)
|
|
|
|
|
+ {
|
|
|
|
|
+ designer.SetDataSource("BHCPCB", leftBindData.cb);
|
|
|
|
|
+ designer.SetDataSource("BHCPRS", leftBindData.rs);
|
|
|
|
|
+ designer.SetDataSource("BHCPXS", leftBindData.xs);
|
|
|
|
|
+ designer.SetDataSource("BHCPZCB", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("BHCPDRBJ", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs));
|
|
|
|
|
+ designer.SetDataSource("BHCPZBJ", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("BHCPDRLR", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs) - decimal.Parse(leftBindData.cb));
|
|
|
|
|
+ designer.SetDataSource("BHCPZLR", ((decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs)) - decimal.Parse(leftBindData.cb)) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ leftBindData = left.leftinfoNumber.Find(x => x.title.Contains("船票"));
|
|
|
|
|
+ if (leftBindData != null)
|
|
|
|
|
+ {
|
|
|
|
|
+ designer.SetDataSource("BCPCB", leftBindData.cb);
|
|
|
|
|
+ designer.SetDataSource("BCPRS", leftBindData.rs);
|
|
|
|
|
+ designer.SetDataSource("BCPXS", leftBindData.xs);
|
|
|
|
|
+ designer.SetDataSource("BCPZCB", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("BCPDRBJ", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs));
|
|
|
|
|
+ designer.SetDataSource("BCPZBJ", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("BCPDRLR", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs) - decimal.Parse(leftBindData.cb));
|
|
|
|
|
+ designer.SetDataSource("BCPZLR", ((decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs)) - decimal.Parse(leftBindData.cb)) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //TBR
|
|
|
|
|
+ leftBindData = left.leftinfoNumber.Find(x => x.title.Contains("TBR"));
|
|
|
|
|
+ if (leftBindData != null)
|
|
|
|
|
+ {
|
|
|
|
|
+ designer.SetDataSource("BHotelTBRDRCB", leftBindData.cb);
|
|
|
|
|
+ designer.SetDataSource("BHotelTBRRS", leftBindData.rs);
|
|
|
|
|
+ designer.SetDataSource("BHotelTBRXS", leftBindData.xs);
|
|
|
|
|
+ designer.SetDataSource("BHotelTBRCB", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("BHotelTBRDRBJ", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs));
|
|
|
|
|
+ designer.SetDataSource("BHotelTBRZBJ", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("BHotelTBRDRLR", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs) - decimal.Parse(leftBindData.cb));
|
|
|
|
|
+ designer.SetDataSource("BHotelTBRZLR", ((decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs)) - decimal.Parse(leftBindData.cb)) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //SGR
|
|
|
|
|
+ leftBindData = left.leftinfoNumber.Find(x => x.title.Contains("SGR"));
|
|
|
|
|
+ if (leftBindData != null)
|
|
|
|
|
+ {
|
|
|
|
|
+ designer.SetDataSource("BHotelSGRDRCB", leftBindData.cb);
|
|
|
|
|
+ designer.SetDataSource("BHotelSGRRS", leftBindData.rs);
|
|
|
|
|
+ designer.SetDataSource("BHotelSGRXS", leftBindData.xs);
|
|
|
|
|
+ designer.SetDataSource("BHotelSGRCB", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("BHotelSGRDRBJ", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs));
|
|
|
|
|
+ designer.SetDataSource("BHotelSGRZBJ", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("BHotelSGRDRLR", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs) - decimal.Parse(leftBindData.cb));
|
|
|
|
|
+ designer.SetDataSource("BHotelSGRZLR", ((decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs)) - decimal.Parse(leftBindData.cb)) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //JS/ES
|
|
|
|
|
+ leftBindData = left.leftinfoNumber.Find(x => x.title.Contains("JSES"));
|
|
|
|
|
+ if (leftBindData != null)
|
|
|
|
|
+ {
|
|
|
|
|
+ designer.SetDataSource("BHotelJSESDRCB", leftBindData.cb);
|
|
|
|
|
+ designer.SetDataSource("BHotelJSESRS", leftBindData.rs);
|
|
|
|
|
+ designer.SetDataSource("BHotelJSESXS", leftBindData.xs);
|
|
|
|
|
+ designer.SetDataSource("BHotelJSESCB", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("BHotelJSESDRBJ", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs));
|
|
|
|
|
+ designer.SetDataSource("BHotelJSESZBJ", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("BHotelJSESDRLR", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs) - decimal.Parse(leftBindData.cb));
|
|
|
|
|
+ designer.SetDataSource("BHotelJSESZLR", ((decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs)) - decimal.Parse(leftBindData.cb)) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //SUITE
|
|
|
|
|
+ leftBindData = left.leftinfoNumber.Find(x => x.title.Contains("SUITE"));
|
|
|
|
|
+ if (leftBindData != null)
|
|
|
|
|
+ {
|
|
|
|
|
+ designer.SetDataSource("BHotelSUITEDRCB", leftBindData.cb);
|
|
|
|
|
+ designer.SetDataSource("BHotelSUITERS", leftBindData.rs);
|
|
|
|
|
+ designer.SetDataSource("BHotelSUITEXS", leftBindData.xs);
|
|
|
|
|
+ designer.SetDataSource("BHotelSUITECB", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("BHotelSUITEDRBJ", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs));
|
|
|
|
|
+ designer.SetDataSource("BHotelSUITEZBJ", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("BHotelSUITEDRLR", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs) - decimal.Parse(leftBindData.cb));
|
|
|
|
|
+ designer.SetDataSource("BHotelSUITEZLR", ((decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs)) - decimal.Parse(leftBindData.cb)) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ leftBindData = left.leftinfoNumber.Find(x => x.title.Contains("地接"));
|
|
|
|
|
+ if (leftBindData != null)
|
|
|
|
|
+ {
|
|
|
|
|
+ designer.SetDataSource("BDJDRCB", leftBindData.cb);
|
|
|
|
|
+ designer.SetDataSource("BDJRS", leftBindData.rs);
|
|
|
|
|
+ designer.SetDataSource("BDJXS", leftBindData.xs);
|
|
|
|
|
+ designer.SetDataSource("BDJCB", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("BDJDRBJ", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs));
|
|
|
|
|
+ designer.SetDataSource("BDJZBJ", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("BDJDRLR", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs) - decimal.Parse(leftBindData.cb));
|
|
|
|
|
+ designer.SetDataSource("BDJZLR", ((decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs)) - decimal.Parse(leftBindData.cb)) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ leftBindData = left.leftinfoNumber.Find(x => x.title.Contains("公务单人"));
|
|
|
|
|
+ if (leftBindData != null)
|
|
|
|
|
+ {
|
|
|
|
|
+ designer.SetDataSource("BGWDRCD", leftBindData.cb);
|
|
|
|
|
+ designer.SetDataSource("BGWRS", leftBindData.rs);
|
|
|
|
|
+ designer.SetDataSource("BGWXS", leftBindData.xs);
|
|
|
|
|
+ designer.SetDataSource("BGWCB", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("BGWDRBJ", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs));
|
|
|
|
|
+ designer.SetDataSource("BGWZBJ", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("BGWDRLR", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs) - decimal.Parse(leftBindData.cb));
|
|
|
|
|
+ designer.SetDataSource("BGWZLR", ((decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs)) - decimal.Parse(leftBindData.cb)) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ #region 优化方案
|
|
|
|
|
+ //Dictionary<string, object> excelBind = new Dictionary<string, object>();
|
|
|
|
|
+ //excelBind.Add("零用金", new {
|
|
|
|
|
+ //cb="",
|
|
|
|
|
+ //rs="",
|
|
|
|
|
+ //xs ="",
|
|
|
|
|
+ //zcb = "",
|
|
|
|
|
+ //});
|
|
|
|
|
+ #endregion
|
|
|
|
|
+
|
|
|
|
|
+ leftBindData = left.leftinfoNumber.Find(x => x.title.Contains("零用金"));
|
|
|
|
|
+ if (leftBindData != null)
|
|
|
|
|
+ {
|
|
|
|
|
+ designer.SetDataSource("BLYJDRCB", leftBindData.cb);
|
|
|
|
|
+ designer.SetDataSource("BLYJRS", leftBindData.rs);
|
|
|
|
|
+ designer.SetDataSource("BLYJXS", leftBindData.xs);
|
|
|
|
|
+ designer.SetDataSource("BLYJCB", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("BLYJDRBJ", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs));
|
|
|
|
|
+ designer.SetDataSource("BLYJZBJ", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("BLYJDRLR", decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs) - decimal.Parse(leftBindData.cb));
|
|
|
|
|
+ designer.SetDataSource("BLYJZLR", ((decimal.Parse(leftBindData.cb) * decimal.Parse(leftBindData.xs)) - decimal.Parse(leftBindData.cb)) * decimal.Parse(leftBindData.rs));
|
|
|
|
|
+ }
|
|
|
|
|
+ #endregion
|
|
|
|
|
+
|
|
|
|
|
+ #region B段Right信息
|
|
|
|
|
+
|
|
|
|
|
+ right = dto.rightInfo.Find(x => x.Type == "B");
|
|
|
|
|
+ if (right == null)
|
|
|
|
|
+ {
|
|
|
|
|
+ return Ok(jw);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ rightBindData = right.rightInfoNumber.Find(x => x.title.Contains("经济舱 TBR"));
|
|
|
|
|
+ if (rightBindData!= null)
|
|
|
|
|
+ {
|
|
|
|
|
+ //经济舱 + 双人间 TBR
|
|
|
|
|
+ designer.SetDataSource("BlblJJCTBRDRCB", rightBindData.cb);
|
|
|
|
|
+ designer.SetDataSource("BtxtJJCTBRRS", rightBindData.rs);
|
|
|
|
|
+ designer.SetDataSource("BlblJJCTBRZCB", decimal.Parse(rightBindData.cb) * decimal.Parse(rightBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("BlblJJCTBRDRBJ", rightBindData.bj);
|
|
|
|
|
+ designer.SetDataSource("BlblJJCTBRZBJ", decimal.Parse(rightBindData.bj) * decimal.Parse(rightBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("BlblJJCTBRDRLR", decimal.Parse(rightBindData.bj) - decimal.Parse(rightBindData.cb));
|
|
|
|
|
+ designer.SetDataSource("BlblJJCTBRZLR", (decimal.Parse(rightBindData.bj) - decimal.Parse(rightBindData.cb)) * decimal.Parse(rightBindData.rs));
|
|
|
|
|
+ TzZCB2 += decimal.Parse(rightBindData.cb) * decimal.Parse(rightBindData.rs);
|
|
|
|
|
+ TzZLR2 += (decimal.Parse(rightBindData.bj) - decimal.Parse(rightBindData.cb)) * decimal.Parse(rightBindData.rs);
|
|
|
|
|
+ TzZBJ2 += decimal.Parse(rightBindData.bj) * decimal.Parse(rightBindData.rs);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ rightBindData = right.rightInfoNumber.Find(x => x.title.Contains("经济舱 SGR"));
|
|
|
|
|
+ if (rightBindData != null)
|
|
|
|
|
+ {
|
|
|
|
|
+ //经济舱 + 单人间 SGR
|
|
|
|
|
+ designer.SetDataSource("BlblJJCSGRDRCB", rightBindData.cb);
|
|
|
|
|
+ designer.SetDataSource("BtxtJJCSGRRS", rightBindData.rs);
|
|
|
|
|
+ designer.SetDataSource("BlblJJCSGRZCB", decimal.Parse(rightBindData.cb) * decimal.Parse(rightBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("BlblJJCSGRDRBJ", rightBindData.bj);
|
|
|
|
|
+ designer.SetDataSource("BlblJJCSGRZBJ", decimal.Parse(rightBindData.bj) * decimal.Parse(rightBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("BlblJJCSGRDRLR", decimal.Parse(rightBindData.bj) - decimal.Parse(rightBindData.cb));
|
|
|
|
|
+ designer.SetDataSource("BlblJJCSGRZLR", (decimal.Parse(rightBindData.bj) - decimal.Parse(rightBindData.cb)) * decimal.Parse(rightBindData.rs));
|
|
|
|
|
+ TzZCB2 += decimal.Parse(rightBindData.cb) * decimal.Parse(rightBindData.rs);
|
|
|
|
|
+ TzZLR2 += (decimal.Parse(rightBindData.bj) - decimal.Parse(rightBindData.cb)) * decimal.Parse(rightBindData.rs);
|
|
|
|
|
+ TzZBJ2 += decimal.Parse(rightBindData.bj) * decimal.Parse(rightBindData.rs);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ rightBindData = right.rightInfoNumber.Find(x => x.title.Contains("公务舱 SGR"));
|
|
|
|
|
+ if (rightBindData != null)
|
|
|
|
|
+ {
|
|
|
|
|
+ //公务舱 + 单人间 SGR
|
|
|
|
|
+ designer.SetDataSource("BlblGWCSGRCB", rightBindData.cb);
|
|
|
|
|
+ designer.SetDataSource("BlblGWCSGRRS", rightBindData.rs);
|
|
|
|
|
+ designer.SetDataSource("BlblGWCSGRZCB", decimal.Parse(rightBindData.cb) * decimal.Parse(rightBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("BlblGWCSGRDRBJ", rightBindData.bj);
|
|
|
|
|
+ designer.SetDataSource("BlblGWCSGRZBJ", decimal.Parse(rightBindData.bj) * decimal.Parse(rightBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("BlblGWCSGRDRLR", decimal.Parse(rightBindData.bj) - decimal.Parse(rightBindData.cb));
|
|
|
|
|
+ designer.SetDataSource("BlblGWCSGRZLR", (decimal.Parse(rightBindData.bj) - decimal.Parse(rightBindData.cb)) * decimal.Parse(rightBindData.rs));
|
|
|
|
|
+ TzZCB2 += decimal.Parse(rightBindData.cb) * decimal.Parse(rightBindData.rs);
|
|
|
|
|
+ TzZLR2 += (decimal.Parse(rightBindData.bj) - decimal.Parse(rightBindData.cb)) * decimal.Parse(rightBindData.rs);
|
|
|
|
|
+ TzZBJ2 += decimal.Parse(rightBindData.bj) * decimal.Parse(rightBindData.rs);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ rightBindData = right.rightInfoNumber.Find(x => x.title.Contains("公务舱 JS/ES"));
|
|
|
|
|
+ if (rightBindData != null)
|
|
|
|
|
+ {
|
|
|
|
|
+ //公务舱 + 小套房 JSES
|
|
|
|
|
+ designer.SetDataSource("BlblGWCJSESDRCB", rightBindData.cb);
|
|
|
|
|
+ designer.SetDataSource("BtxtGWCJSESRS", rightBindData.rs);
|
|
|
|
|
+ designer.SetDataSource("BlblGWCJSESZCB", decimal.Parse(rightBindData.cb) * decimal.Parse(rightBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("BlblGWCJSESDRBJ", rightBindData.bj);
|
|
|
|
|
+ designer.SetDataSource("BlblGWCJSESZBJ", decimal.Parse(rightBindData.bj) * decimal.Parse(rightBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("BlblGWCJSESDRLR", decimal.Parse(rightBindData.bj) - decimal.Parse(rightBindData.cb));
|
|
|
|
|
+ designer.SetDataSource("BlblGWCJSESZLR", (decimal.Parse(rightBindData.bj) - decimal.Parse(rightBindData.cb)) * decimal.Parse(rightBindData.rs));
|
|
|
|
|
+ TzZCB2 += decimal.Parse(rightBindData.cb) * decimal.Parse(rightBindData.rs);
|
|
|
|
|
+ TzZLR2 += (decimal.Parse(rightBindData.bj) - decimal.Parse(rightBindData.cb)) * decimal.Parse(rightBindData.rs);
|
|
|
|
|
+ TzZBJ2 += decimal.Parse(rightBindData.bj) * decimal.Parse(rightBindData.rs);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ rightBindData = right.rightInfoNumber.Find(x => x.title.Contains("公务舱 SUITE"));
|
|
|
|
|
+ if (rightBindData != null)
|
|
|
|
|
+ {
|
|
|
|
|
+ //公务舱 + 小套房 JSES
|
|
|
|
|
+ designer.SetDataSource("BlblGWCSUITEDRCB", rightBindData.cb);
|
|
|
|
|
+ designer.SetDataSource("BtxtGWCSUITERS", rightBindData.rs);
|
|
|
|
|
+ designer.SetDataSource("BlblGWCSUITEZCB", decimal.Parse(rightBindData.cb) * decimal.Parse(rightBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("BlblGWCSUITEDRBJ", rightBindData.bj);
|
|
|
|
|
+ designer.SetDataSource("BlblGWCSUITEZBJ", decimal.Parse(rightBindData.bj) * decimal.Parse(rightBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("BlblGWCSUITEDRLR", decimal.Parse(rightBindData.bj) - decimal.Parse(rightBindData.cb));
|
|
|
|
|
+ designer.SetDataSource("BlblGWCSUITEZLR", (decimal.Parse(rightBindData.bj) - decimal.Parse(rightBindData.cb)) * decimal.Parse(rightBindData.rs));
|
|
|
|
|
+ TzZCB2 += decimal.Parse(rightBindData.cb) * decimal.Parse(rightBindData.rs);
|
|
|
|
|
+ TzZLR2 += (decimal.Parse(rightBindData.bj) - decimal.Parse(rightBindData.cb)) * decimal.Parse(rightBindData.rs);
|
|
|
|
|
+ TzZBJ2 += decimal.Parse(rightBindData.bj) * decimal.Parse(rightBindData.rs);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ rightBindData = right.rightInfoNumber.Find(x => x.title.Contains("经济舱 SUITE"));
|
|
|
|
|
+ if (rightBindData != null)
|
|
|
|
|
+ {
|
|
|
|
|
+ //经济舱 + 大套房
|
|
|
|
|
+ designer.SetDataSource("BlblJJCSUITEDRCB", rightBindData.cb);
|
|
|
|
|
+ designer.SetDataSource("BtxtJJCSUITERS", rightBindData.rs);
|
|
|
|
|
+ designer.SetDataSource("BlblJJCSUITEZCB", decimal.Parse(rightBindData.cb) * decimal.Parse(rightBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("BlblJJCSUITEDRBJ", rightBindData.bj);
|
|
|
|
|
+ designer.SetDataSource("BlblJJCSUITEZBJ", decimal.Parse(rightBindData.bj) * decimal.Parse(rightBindData.rs));
|
|
|
|
|
+ designer.SetDataSource("BlblJJCSUITEDRLR", decimal.Parse(rightBindData.bj) - decimal.Parse(rightBindData.cb));
|
|
|
|
|
+ designer.SetDataSource("BlblJJCSUITEZLR", (decimal.Parse(rightBindData.bj) - decimal.Parse(rightBindData.cb)) * decimal.Parse(rightBindData.rs));
|
|
|
|
|
+ TzZCB2 += decimal.Parse(rightBindData.cb) * decimal.Parse(rightBindData.rs);
|
|
|
|
|
+ TzZLR2 += (decimal.Parse(rightBindData.bj) - decimal.Parse(rightBindData.cb)) * decimal.Parse(rightBindData.rs);
|
|
|
|
|
+ TzZBJ2 += decimal.Parse(rightBindData.bj) * decimal.Parse(rightBindData.rs);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ #endregion
|
|
|
|
|
+
|
|
|
|
|
+ #region 标题
|
|
|
|
|
+ designer.SetDataSource("CostBDRCB", "单人成本");
|
|
|
|
|
+ designer.SetDataSource("CostBRS", "人数");
|
|
|
|
|
+ designer.SetDataSource("CostBXS", "系数");
|
|
|
|
|
+ designer.SetDataSource("CostBZCB", "总成本");
|
|
|
|
|
+ designer.SetDataSource("CostBDRBJ", "单人报价");
|
|
|
|
|
+ designer.SetDataSource("CostBZBJ", "总报价");
|
|
|
|
|
+ designer.SetDataSource("CostBDRLR", "单人利润");
|
|
|
|
|
+ designer.SetDataSource("CostBZLR", "总利润");
|
|
|
|
|
+
|
|
|
|
|
+ designer.SetDataSource("CostBDRCBOM", "单人成本");
|
|
|
|
|
+ designer.SetDataSource("CostBRSOM", "人数");
|
|
|
|
|
+ designer.SetDataSource("CostBZCBOM", "总成本");
|
|
|
|
|
+ designer.SetDataSource("CostBDRBJOM", "单人报价");
|
|
|
|
|
+ designer.SetDataSource("CostBZBJOM", "总报价");
|
|
|
|
|
+ designer.SetDataSource("CostBDRLROM", "单人利润");
|
|
|
|
|
+ designer.SetDataSource("CostBZLROM", "总利润");
|
|
|
|
|
+ #endregion
|
|
|
|
|
+ }
|
|
|
|
|
+ #endregion
|
|
|
|
|
+
|
|
|
|
|
+ designer.SetDataSource("TzZCB2", TzZCB2);
|
|
|
|
|
+ designer.SetDataSource("TzZBJ2", TzZBJ2);
|
|
|
|
|
+ designer.SetDataSource("TzZLR2", TzZLR2);
|
|
|
|
|
+
|
|
|
|
|
+ string[] dataSourceKeys = new string[]
|
|
|
|
|
+ {
|
|
|
|
|
+ "VF",
|
|
|
|
|
+ "TGS",
|
|
|
|
|
+ "TGOF",
|
|
|
|
|
+ "TGM",
|
|
|
|
|
+ "TGA",
|
|
|
|
|
+ "TGTF",
|
|
|
|
|
+ "TGEF",
|
|
|
|
|
+ "CFM",
|
|
|
|
|
+ "CFOF",
|
|
|
|
|
+ "B",
|
|
|
|
|
+ "L",
|
|
|
|
|
+ "D",
|
|
|
|
|
+ "TBR",
|
|
|
|
|
+ "SGR",
|
|
|
|
|
+ "JSES",
|
|
|
|
|
+ "Suite",
|
|
|
|
|
+ "TV",
|
|
|
|
|
+ "1L",
|
|
|
|
|
+ "IF",
|
|
|
|
|
+ "EF",
|
|
|
|
|
+ "BRF",
|
|
|
|
|
+ "TE",
|
|
|
|
|
+ "TGT",
|
|
|
|
|
+ "DRVT",
|
|
|
|
|
+ "PC",
|
|
|
|
|
+ "TLF",
|
|
|
|
|
+ "ECT"
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ foreach (var item in dataSourceKeys)
|
|
|
|
|
+ {
|
|
|
|
|
+ var find = dto.titleModel.FirstOrDefault(x => x.label.Replace(" ", "").Replace("/", "") == item);
|
|
|
|
|
+ if (find != null)
|
|
|
|
|
+ {
|
|
|
|
|
+ designer.SetDataSource(item, find.text);
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ designer.SetDataSource(item, 0);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
designer.SetDataSource(dt);
|
|
designer.SetDataSource(dt);
|
|
|
|
|
+ //根据数据源处理生成报表内容
|
|
|
|
|
+ designer.Process();
|
|
|
designer.Workbook.Worksheets[0].Name = "清单";
|
|
designer.Workbook.Worksheets[0].Name = "清单";
|
|
|
|
|
+ Worksheet sheet = designer.Workbook.Worksheets[0];
|
|
|
|
|
|
|
|
|
|
+ foreach (var Rowindex in hideRowsList)
|
|
|
|
|
+ {
|
|
|
|
|
+ ws.Cells.HideRows(Rowindex, 2);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ byte[] bytes = null;
|
|
|
|
|
+ string strFileName = di.TeamName + "-团组-成本.xls";
|
|
|
|
|
+ using (MemoryStream stream = new MemoryStream())
|
|
|
|
|
+ {
|
|
|
|
|
+ designer.Workbook.Save(stream, Aspose.Cells.SaveFormat.Xlsx);
|
|
|
|
|
+ bytes = stream.ToArray();
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- return Ok();
|
|
|
|
|
|
|
+ return Ok(JsonView(true, "", new
|
|
|
|
|
+ {
|
|
|
|
|
+ Data = bytes,
|
|
|
|
|
+ strFileName,
|
|
|
|
|
+ }));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
#endregion
|
|
#endregion
|