wanggang 1 year ago
parent
commit
974be0d8ca
  1. 22
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/INVOICE_SERVICE.cs

22
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/INVOICE_SERVICE.cs

@ -242,15 +242,16 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
string _fileName = $"{classDisplayName}_{Guid.NewGuid().ToString()}.xlsx"; string _fileName = $"{classDisplayName}_{Guid.NewGuid().ToString()}.xlsx";
byte[] result = null; byte[] result = null;
switch (input.FileType) result = await _excel.ExportAsByteArray(dtoDetails);
{ //switch (input.FileType)
case 0: //{
result = await _csv.ExportAsByteArray(dtoDetails); // case 0:
break; // result = await _csv.ExportAsByteArray(dtoDetails);
case 1: // break;
result = await _excel.ExportAsByteArray(dtoDetails); // case 1:
break; // result = await _excel.ExportAsByteArray(dtoDetails);
} // break;
//}
result.ShouldNotBeNull(); result.ShouldNotBeNull();
//保存导出文件到服务器存成二进制 //保存导出文件到服务器存成二进制
@ -293,8 +294,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
_excel.Append(mgroup, "发票结算分组对应" + itm.InvbillNum).SeparateBySheet(); _excel.Append(mgroup, "发票结算分组对应" + itm.InvbillNum).SeparateBySheet();
_excel.Append(adjp, "发票调整数据" + itm.InvbillNum).SeparateBySheet(); _excel.Append(adjp, "发票调整数据" + itm.InvbillNum).SeparateBySheet();
_excel.Append(nolist, "结算分组零件" + itm.InvbillNum); _excel.Append(nolist, "结算分组零件" + itm.InvbillNum);
} }
var result = _excel.ExportAppendDataAsByteArray(); var result = _excel.ExportAppendDataAsByteArray();
@ -379,7 +378,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
inv.RealnvBillNum = newinv.RealnvBillNum; inv.RealnvBillNum = newinv.RealnvBillNum;
inv.RealAmt = newinv.RealAmt; inv.RealAmt = newinv.RealAmt;
inv.TaxDiff = inv.TaxAmt-newinv.RealAmt; inv.TaxDiff = inv.TaxAmt-newinv.RealAmt;
} }
foreach (var detail in invdetail) foreach (var detail in invdetail)
{ {

Loading…
Cancel
Save