DS7_JinGang
hanxuntao 2 years ago
commit dbb912234a

@ -310,6 +310,9 @@ namespace DSWeb.Common.DB
public string { get; set; }
public decimal? { get; set; }
public string { get; set; }
/// <summary>
/// 第一层包装皮重
/// </summary>
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 bool? { get; set; }
public string { get; set; }
public long DJYCHILDRENID { get; set; }
}
[Table("t_op_state")]
@ -680,6 +685,8 @@ namespace DSWeb.Common.DB
public DateTime? { get; set; }
public decimal? { get; set; }
public int? { get; set; }
public long? DJYCTNID { get; set; }
}
[Table("t_op_ams")]
@ -815,6 +822,58 @@ namespace DSWeb.Common.DB
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_code_goods_md> t_code_goods { get; set; }
public DbSet<t_ch_fee_md> t_ch_fee { get; set; }
}
}

@ -32,6 +32,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" />
</connectionStrings>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />

File diff suppressed because one or more lines are too long

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

Loading…
Cancel
Save