DS7_JinGang
hanxuntao 2 years ago
commit dbb912234a

@ -310,6 +310,9 @@ namespace DSWeb.Common.DB
public string { get; set; } public string { get; set; }
public decimal? { get; set; } public decimal? { get; set; }
public string { get; set; } public string { get; set; }
/// <summary>
/// 第一层包装皮重
/// </summary>
public string { get; set; } public string { get; set; }
public string { get; set; } public string { get; set; }
public string { get; set; } public string { get; set; }
@ -621,6 +624,8 @@ namespace DSWeb.Common.DB
public string { get; set; } public string { get; set; }
public bool? { get; set; } public bool? { get; set; }
public string { get; set; } public string { get; set; }
public long DJYCHILDRENID { get; set; }
} }
[Table("t_op_state")] [Table("t_op_state")]
@ -680,6 +685,8 @@ namespace DSWeb.Common.DB
public DateTime? { get; set; } public DateTime? { get; set; }
public decimal? { get; set; } public decimal? { get; set; }
public int? { get; set; } public int? { get; set; }
public long? DJYCTNID { get; set; }
} }
[Table("t_op_ams")] [Table("t_op_ams")]
@ -815,6 +822,58 @@ namespace DSWeb.Common.DB
public string { get; set; } public string { get; set; }
} }
[Table("t_ch_fee")]
public partial class t_ch_fee_md {
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public string CH_ID { get; set; }
public string { get; set; }
public string { get; set; }
public string { get; set; }
public string { get; set; }
public string { get; set; }
public string { get; set; }
public string { get; set; }
public string { get; set; }
public decimal? { get; set; }
public decimal? { get; set; }
public decimal? { get; set; }
public string { get; set; }
public decimal? { get; set; }
public string { get; set; }
public decimal? { get; set; }
public decimal? { get; set; }
public decimal? { get; set; }
public DateTime? { get; set; }
public string { get; set; }
public DateTime? { get; set; }
public string { get; set; }
public DateTime? { get; set; }
public string { get; set; }
public bool? { get; set; }
public int? id { get; set; }
public string { get; set; }
public int? { get; set; }
public decimal? { get; set; }
public bool? { get; set; }
public bool? { get; set; }
public bool? { get; set; }
public int? { get; set; }
public string { get; set; }
public DateTime? { get; set; }
public bool? { get; set; }
public bool? { get; set; }
public decimal? { get; set; }
public decimal? { get; set; }
public decimal? { get; set; }
public string { get; set; }
public string { get; set; }
public string { get; set; }
public string { get; set; }
public decimal? { get; set; }
public string { get; set; }
public decimal? { get; set; }
}
} }

@ -33,7 +33,10 @@ namespace DSWeb.Common.DB
public DbSet<t_sys_code_emp_md> t_sys_code_emp { get; set; } public DbSet<t_sys_code_emp_md> t_sys_code_emp { get; set; }
public DbSet<t_code_goods_md> t_code_goods { get; set; } public DbSet<t_code_goods_md> t_code_goods { get; set; }
public DbSet<t_ch_fee_md> t_ch_fee { get; set; }
} }
} }

@ -22,7 +22,7 @@
<add key="ReceiveMQUri" value="amqp://djy_booking_new:123qwe@47.104.207.5:12567/djy_booking_new" /> <add key="ReceiveMQUri" value="amqp://djy_booking_new:123qwe@47.104.207.5:12567/djy_booking_new" />
--> -->
<add key="ReceiveMQUri" value="amqp://djy_booking_new:123qwe@60.209.125.238:12567/djy_booking_new" /> <add key="ReceiveMQUri" value="amqp://djy_booking_new:123qwe@60.209.125.238:12567/djy_booking_new" />
</appSettings> </appSettings>
<connectionStrings> <connectionStrings>
<!--本地开发 <!--本地开发
@ -31,6 +31,7 @@
--> -->
<!--实际地址--> <!--实际地址-->
<add name="DS6DB" connectionString="Data Source=60.209.125.238,52314;Initial Catalog=HECHUAN;Persist Security Info=True;User ID=sa;Password=Ds20040201" providerName="System.Data.SqlClient" /> <add name="DS6DB" connectionString="Data Source=60.209.125.238,52314;Initial Catalog=HECHUAN;Persist Security Info=True;User ID=sa;Password=Ds20040201" providerName="System.Data.SqlClient" />
</connectionStrings> </connectionStrings>
<startup> <startup>

File diff suppressed because one or more lines are too long

@ -14,6 +14,7 @@ using DSWeb.MvcShipping.DAL.MsOpSeaeDAL;
using NPOI.OpenXmlFormats; using NPOI.OpenXmlFormats;
using DSWeb.MvcShipping.Models.MsOpSeae; using DSWeb.MvcShipping.Models.MsOpSeae;
using NPOI.SS.Formula.Functions; using NPOI.SS.Formula.Functions;
using System.Drawing;
namespace DSWeb.Areas.CommMng.DAL namespace DSWeb.Areas.CommMng.DAL
{ {
@ -31,7 +32,7 @@ namespace DSWeb.Areas.CommMng.DAL
public DBResult MakePdf_BillCheckOut(BillCheckOut_md head,string path) public DBResult MakePdf_BillCheckOut(BillCheckOut_md head,string path)
{ {
var result = new DBResult(); var result = new DBResult();
var errorindex = 0.0;
try try
{ {
@ -110,12 +111,12 @@ namespace DSWeb.Areas.CommMng.DAL
//内容文字字体 黑色11 //内容文字字体 黑色11
iTextSharp.text.Font infos = new iTextSharp.text.Font(bfComic, 11, 0, iTextSharp.text.BaseColor.BLACK); iTextSharp.text.Font infos = new iTextSharp.text.Font(bfComic, 11, 0, iTextSharp.text.BaseColor.BLACK);
//抬头地址字体 黑色11 下划线 //抬头地址字体 黑色11 下划线
iTextSharp.text.Font address = new iTextSharp.text.Font(bfComic, 14, Font.UNDERLINE, iTextSharp.text.BaseColor.BLACK); iTextSharp.text.Font address = new iTextSharp.text.Font(bfComic, 14, iTextSharp.text.Font.UNDERLINE, iTextSharp.text.BaseColor.BLACK);
//红色内容 红色11 //红色内容 红色11
iTextSharp.text.Font redinfos = new iTextSharp.text.Font(bfComic, 12, 0, iTextSharp.text.BaseColor.RED); iTextSharp.text.Font redinfos = new iTextSharp.text.Font(bfComic, 12, 0, iTextSharp.text.BaseColor.RED);
#region 条码号 #region 条码号
BarCodeDrawing _Code39 = new BarCodeDrawing(); BarCodeDrawing _Code39 = new BarCodeDrawing();
@ -126,15 +127,27 @@ namespace DSWeb.Areas.CommMng.DAL
var = head.CHECKOUTNO; var = head.CHECKOUTNO;
System.Drawing.Image _codeImage = _Code39.GetCodeImage(, BarCodeDrawing.BarCodeDrawingModel.BarCodeDrawingNormal, true); System.Drawing.Image _codeImage = _Code39.GetCodeImage(, BarCodeDrawing.BarCodeDrawingModel.BarCodeDrawingNormal, true);
errorindex = 1;
System.IO.MemoryStream _Stream = new System.IO.MemoryStream(); System.IO.MemoryStream _Stream = new System.IO.MemoryStream();
errorindex = 1.1;
ImageConverter imgconv = new ImageConverter();
_codeImage.Save(_Stream, System.Drawing.Imaging.ImageFormat.Jpeg); _codeImage.Save(_Stream, System.Drawing.Imaging.ImageFormat.Jpeg);
string markPath = System.Environment.CurrentDirectory + $"\\temp{条码号}.jpg"; byte[] bytes = (byte[])imgconv.ConvertTo(_codeImage, typeof(byte[]));
_codeImage.Save(markPath); Stream stream = new MemoryStream(bytes);
errorindex = 1.2;
iTextSharp.text.Image im = iTextSharp.text.Image.GetInstance(markPath); //string markPath = System.Environment.CurrentDirectory + $"\\temp{条码号}.jpg";
//_codeImage.Save(markPath);
//_codeImage.Dispose();
iTextSharp.text.Image im = iTextSharp.text.Image.GetInstance(stream);
errorindex = 1.3;
im.SetAbsolutePosition(width - 280, height - 60 - 80); im.SetAbsolutePosition(width - 280, height - 60 - 80);
errorindex = 1.4;
im.ScaleAbsolute(260, 40); im.ScaleAbsolute(260, 40);
errorindex = 1.5;
//document.Add(im); //document.Add(im);
#endregion #endregion
@ -168,7 +181,7 @@ namespace DSWeb.Areas.CommMng.DAL
.Leading = 22; .Leading = 22;
document.Add(); document.Add();
errorindex = 2;
#endregion #endregion
@ -221,6 +234,8 @@ namespace DSWeb.Areas.CommMng.DAL
billlist.Add(rec); billlist.Add(rec);
} }
errorindex = 3;
foreach (var item in body) foreach (var item in body)
{ {
var MBLNO = new iTextSharp.text.Paragraph(item.MBLNO, infos); var MBLNO = new iTextSharp.text.Paragraph(item.MBLNO, infos);
@ -263,6 +278,8 @@ namespace DSWeb.Areas.CommMng.DAL
//document.Add(newinfo); //document.Add(newinfo);
} }
errorindex = 4;
document.Add(table); document.Add(table);
//感谢 //感谢
@ -287,7 +304,7 @@ namespace DSWeb.Areas.CommMng.DAL
document.Close(); document.Close();
File.Delete(markPath); //File.Delete(markPath);
head.MAILPDFURL = SaveUrlName; head.MAILPDFURL = SaveUrlName;
@ -295,10 +312,19 @@ namespace DSWeb.Areas.CommMng.DAL
cdc.SaveChanges(); cdc.SaveChanges();
errorindex = 5;
result.OK(filename); result.OK(filename);
} }
catch (Exception ex) { catch (Exception ex) {
result.SetErrorInfo(ex.Message); var innermsg = "";
if (ex.InnerException != null) {
if (ex.InnerException.Message != null) {
innermsg = ex.InnerException.Message;
}
}
result.SetErrorInfo($"PDFHelper{errorindex}:"+ex.Message+$"[{innermsg}]");
} }
return result; return result;

Loading…
Cancel
Save