|
|
|
@ -1,10 +1,11 @@ |
|
|
|
using ButcherFactory.BO; |
|
|
|
using ButcherFactory.BO.Utils; |
|
|
|
using System; |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.IO; |
|
|
|
using System.Linq; |
|
|
|
using System.Text; |
|
|
|
using ButcherFactory.BO; |
|
|
|
using ButcherFactory.BO.Utils; |
|
|
|
using System; |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.Drawing; |
|
|
|
using System.IO; |
|
|
|
using System.Linq; |
|
|
|
using System.Text; |
|
|
|
using System.Threading.Tasks; |
|
|
|
|
|
|
|
namespace ButcherFactory.SegmentProduction_ |
|
|
|
@ -37,8 +38,13 @@ namespace ButcherFactory.SegmentProduction_ |
|
|
|
var imgUrl = string.Format(IMGFILE, id); |
|
|
|
var url = string.Format(AppContext.ConnectInfo.TraceBackUrl + "?code={0}", entity.BarCode); |
|
|
|
BwpClientPrint.BwpClientWebPrint.Create2DPic(url, imgUrl, 120); |
|
|
|
dic.Add("$ImageUrl", imgUrl); |
|
|
|
|
|
|
|
var barImgUrl = string.Format(IMGFILE, id + "_bar"); |
|
|
|
BwpClientPrint.BwpClientWebPrint.CreateBarCode("69212203" + entity.Goods_Code, barImgUrl, new Size(120, 40)); |
|
|
|
dic.Add("$BarImg", barImgUrl); |
|
|
|
dic.Add("$Weight", string.Format("{0:#0.##}{1}", entity.Weight, entity.MainUnit)); |
|
|
|
|
|
|
|
dic.Add("$ImageUrl", imgUrl); |
|
|
|
BwpClientPrint.BwpClientWebPrint.Print(PRINTFILE + template, dic); |
|
|
|
AfterPrint(); |
|
|
|
} |
|
|
|
@ -81,11 +87,12 @@ namespace ButcherFactory.SegmentProduction_ |
|
|
|
id++; |
|
|
|
if (TempImage == null) |
|
|
|
TempImage = new DirectoryInfo("TempImg"); |
|
|
|
var files = TempImage.GetFiles(); |
|
|
|
if (files.Length > 10) |
|
|
|
{ |
|
|
|
var last = files.OrderBy(x => x.CreationTime).First().FullName; |
|
|
|
File.Delete(last); |
|
|
|
var files = TempImage.GetFiles(); |
|
|
|
while (files.Length > 20) |
|
|
|
{ |
|
|
|
var last = files.OrderBy(x => x.CreationTime).First().FullName; |
|
|
|
File.Delete(last); |
|
|
|
files = TempImage.GetFiles(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|