Commit 402a8ef0 刘韬

标签数据对接smf

1 个父辈 ace7ed24
...@@ -135,6 +135,7 @@ ...@@ -135,6 +135,7 @@
<Compile Include="ServerCommunication.cs" /> <Compile Include="ServerCommunication.cs" />
<Compile Include="Setting_Str.cs" /> <Compile Include="Setting_Str.cs" />
<Compile Include="TextBlock.cs" /> <Compile Include="TextBlock.cs" />
<Compile Include="UnifiedDataHandler.cs" />
<Compile Include="UsersLogin.cs" /> <Compile Include="UsersLogin.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
......
/* using System;
* kaifa
*
*/
using System;
using System.Net; using System.Net;
using System.Text; using System.Text;
using System.Collections.Generic; using System.Collections.Generic;
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
using Model; using Model;
using Newtonsoft.Json; using Newtonsoft.Json;
using Newtonsoft.Json.Converters; using Newtonsoft.Json.Converters;
using OnlineStore.Common.util;
using System; using System;
using System.Collections.Concurrent; using System.Collections.Concurrent;
using System.Collections.Generic; using System.Collections.Generic;
...@@ -124,6 +125,7 @@ namespace BLL ...@@ -124,6 +125,7 @@ namespace BLL
DateTime time = DateTime.Now; DateTime time = DateTime.Now;
//构建发送给服务器的对象 //构建发送给服务器的对象
Operation lineOperation = getStatus(); Operation lineOperation = getStatus();
lineOperation.data = lineOperation.data.Union(UnifiedDataHandler.PrintNgMESData()).ToDictionary(x => x.Key, x => x.Value);
var returntxt = Http.PostJson(GetPostApi(), new Dictionary<string, string>(), lineOperation,900,false); var returntxt = Http.PostJson(GetPostApi(), new Dictionary<string, string>(), lineOperation,900,false);
Operation resultOperation = JsonConvert.DeserializeObject<Operation>(returntxt); Operation resultOperation = JsonConvert.DeserializeObject<Operation>(returntxt);
if (resultOperation==null) if (resultOperation==null)
...@@ -257,6 +259,7 @@ namespace BLL ...@@ -257,6 +259,7 @@ namespace BLL
public int seq; public int seq;
public int op; public int op;
public List<EquipMsg> msgList = new List<EquipMsg>(); public List<EquipMsg> msgList = new List<EquipMsg>();
public Dictionary<string, string> data = new Dictionary<string, string>();
} }
public class EquipMsg { public class EquipMsg {
......
...@@ -3,6 +3,7 @@ using BLL; ...@@ -3,6 +3,7 @@ using BLL;
using DocumentFormat.OpenXml.Bibliography; using DocumentFormat.OpenXml.Bibliography;
using Model; using Model;
using Newtonsoft.Json; using Newtonsoft.Json;
using OnlineStore.Common.util;
using SmartScan.Form; using SmartScan.Form;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
...@@ -214,8 +215,11 @@ namespace SmartScan ...@@ -214,8 +215,11 @@ namespace SmartScan
//Bitmap labelBmp = Common.labelEdit.PrintImage(Common.config.DefaultPrintLabel, content, out _); //Bitmap labelBmp = Common.labelEdit.PrintImage(Common.config.DefaultPrintLabel, content, out _);
BLLCommon.labelEdit.PrintLast(BLLCommon.config.DefaultPrintLabel, BLLCommon.config.PrinterName, BLLCommon.config.PrintLandscape, content, out string[] barcode); BLLCommon.labelEdit.PrintLast(BLLCommon.config.DefaultPrintLabel, BLLCommon.config.PrinterName, BLLCommon.config.PrintLandscape, content, out string[] barcode);
LogNet.log.Info(string.Format("打印标签 Label[{0}] Printer[{1}]", BLLCommon.config.DefaultPrintLabel, BLLCommon.config.PrinterName)); LogNet.log.Info(string.Format("打印标签 Label[{0}] Printer[{1}]", BLLCommon.config.DefaultPrintLabel, BLLCommon.config.PrinterName));
var bmp = BLLCommon.labelEdit.PrintImage(BLLCommon.config.DefaultPrintLabel, content, out _);
_=UnifiedDataHandler.PostSmfImageAsync(bmp, new Dictionary<string, string> { { "cid", BLLCommon.config.CID+"_2" } }, bmp.Width, bmp.Height);
bmp.Dispose();
//SaveRetrospect(labelBmp, barcode); //SaveRetrospect(labelBmp, barcode);
UnifiedDataHandler.RecordPrintNg(false, true, out string[] strarrys);
if (BLLCommon.config.PrintCompletedClear) if (BLLCommon.config.PrintCompletedClear)
BLLCommon.extension.Clear(); BLLCommon.extension.Clear();
} }
......
using Asa.FaceControl; using Asa.FaceControl;
using BLL; using BLL;
using Model; using Model;
using OnlineStore.Common.util;
using SmartScan.Form; using SmartScan.Form;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
...@@ -234,7 +235,10 @@ namespace SmartScan ...@@ -234,7 +235,10 @@ namespace SmartScan
List<Bitmap> image = new List<Bitmap>(Camera.CaptureAndGetCode(out workCodeInfo)); List<Bitmap> image = new List<Bitmap>(Camera.CaptureAndGetCode(out workCodeInfo));
if (image.Count > 0 && !BLL.Config.Backgrounder) picShow.Image = image[0]; if (image.Count > 0 && !BLL.Config.Backgrounder) picShow.Image = image[0];
if (image.Count > 0) if (image.Count > 0)
{
BLLCommon.mateEdit.CurrntBitmap = image[0]; BLLCommon.mateEdit.CurrntBitmap = image[0];
_ = UnifiedDataHandler.PostSmfImageAsync(BLLCommon.mateEdit.CurrntBitmap, new Dictionary<string, string> { { "cid", BLLCommon.config.CID + "_1" } }, BLLCommon.mateEdit.CurrntBitmap.Width, BLLCommon.mateEdit.CurrntBitmap.Height);
}
if (BLLCommon.config.TriggerOpenLight) if (BLLCommon.config.TriggerOpenLight)
BLLCommon.lightSource.TurnOff(); BLLCommon.lightSource.TurnOff();
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!