From cbf050731fcb75ac72aa5dea86cfa88ef13c47e1 Mon Sep 17 00:00:00 2001 From: fajiao <1519100073@qq.com> Date: Wed, 24 Aug 2022 13:02:13 +0800 Subject: [PATCH] back to zhuhai --- AutoWeightServer/Center/DeviceCenter.cs | 34 +++++++++---------- .../IfManager/Scales/ScalesManager.cs | 4 +-- AutoWeightServer/UI/FrmBill.cs | 2 +- AutoWeightServer/UI/UC/UCCarOut.cs | 2 +- 4 files changed, 21 insertions(+), 21 deletions(-) diff --git a/AutoWeightServer/Center/DeviceCenter.cs b/AutoWeightServer/Center/DeviceCenter.cs index 5346785..380868a 100644 --- a/AutoWeightServer/Center/DeviceCenter.cs +++ b/AutoWeightServer/Center/DeviceCenter.cs @@ -68,8 +68,8 @@ namespace EC.AutoWeightServer.Center OpenLightServer(); OpenLedServer(); OpenFingerPrintServer(); - //OpenYkPosServer(); - OpenPosServer(); + OpenYkPosServer(); + //OpenPosServer(); } public void CloseDevices() @@ -102,28 +102,28 @@ namespace EC.AutoWeightServer.Center msgList.Add("指纹接口未连接"); if (LedZKManager == null || !LedZKManager.IsConnected()) msgList.Add("Led屏未连接"); - //if (!YkPosManager.IsConnected()) - //{ - // msgList.Add("打印接口未连接"); - //} - //else - //{ - // if (YkPosManager.IsPaperExhaust()) - // msgList.Add("打印接口纸尽"); - // //if (YkPosManager.IsPaperWillExhaust()) - // // msgList.Add("打印接口纸将尽"); - //} - if (!PosManager.IsConnected()) + if (!YkPosManager.IsConnected()) { msgList.Add("打印接口未连接"); } else { - if (PosManager.IsPaperExhaust()) + if (YkPosManager.IsPaperExhaust()) msgList.Add("打印接口纸尽"); //if (YkPosManager.IsPaperWillExhaust()) // msgList.Add("打印接口纸将尽"); } + //if (!PosManager.IsConnected()) + //{ + // msgList.Add("打印接口未连接"); + //} + //else + //{ + // if (PosManager.IsPaperExhaust()) + // msgList.Add("打印接口纸尽"); + // //if (YkPosManager.IsPaperWillExhaust()) + // // msgList.Add("打印接口纸将尽"); + //} var msg = string.Join("\n", msgList.ToArray()); if (!string.IsNullOrEmpty(msg)) UiExtendCenter.ShowErrorMsgBox(msg); @@ -321,7 +321,7 @@ namespace EC.AutoWeightServer.Center /// 打印运单 /// /// - public void PrintBill(TransportBillEntity billEntity) + public void PrintYkPosBill(TransportBillEntity billEntity) { if (billEntity == null) return; @@ -409,7 +409,7 @@ namespace EC.AutoWeightServer.Center PosManager = null; } - public void PrintBIll(TransportBillEntity billEntity) + public void PrintPosBill(TransportBillEntity billEntity) { if (PosManager == null || billEntity == null) return; diff --git a/AutoWeightServer/IfManager/Scales/ScalesManager.cs b/AutoWeightServer/IfManager/Scales/ScalesManager.cs index 046501e..659deca 100644 --- a/AutoWeightServer/IfManager/Scales/ScalesManager.cs +++ b/AutoWeightServer/IfManager/Scales/ScalesManager.cs @@ -34,12 +34,12 @@ namespace EC.AutoWeightServer.IfManager.Scales public bool StartServer() { - Scales = new ScalesHuiZhou(_comName, _baudRate, _receivedBytesThreshold); + Scales = new ScalesZhuHai(_comName, _baudRate, _receivedBytesThreshold); Scales.OnRecData += RecData; if (ServerConfig.WtTransmitFlag > 0) { _transmitPort = SerialPortManager.CreateSerialPort(ServerConfig.WtTransmitCom, _baudRate); - ((ScalesHuiZhou)Scales).OnRecTransmit += RecTransmit; + ((ScalesZhuHai)Scales).OnRecTransmit += RecTransmit; } Scales.StartServer(); return true; diff --git a/AutoWeightServer/UI/FrmBill.cs b/AutoWeightServer/UI/FrmBill.cs index 1970eea..2c41dc3 100644 --- a/AutoWeightServer/UI/FrmBill.cs +++ b/AutoWeightServer/UI/FrmBill.cs @@ -62,7 +62,7 @@ namespace EC.AutoWeightServer.UI if (_mainServer == null) return; var cell = dataGridView.CurrentRow.Cells; var billEntity = ServiceCenter.BillService.GetBillBySerialNumber(cell[0].Value.ToString()); - _mainServer.DeviceCenter.PrintBill(billEntity); + _mainServer.DeviceCenter.PrintYkPosBill(billEntity); } } } diff --git a/AutoWeightServer/UI/UC/UCCarOut.cs b/AutoWeightServer/UI/UC/UCCarOut.cs index 72ec537..3bbbd05 100644 --- a/AutoWeightServer/UI/UC/UCCarOut.cs +++ b/AutoWeightServer/UI/UC/UCCarOut.cs @@ -392,7 +392,7 @@ namespace EC.AutoWeightServer.UI.UC } btnConfirm.Enabled = false; - _mainServer.DeviceCenter.PrintBill(billEntity);//打印运输小票 + _mainServer.DeviceCenter.PrintYkPosBill(billEntity);//打印运输小票 //_mainServer.DeviceCenter.PrintBill(billEntity);//打印存根小票 _mainServer.SetOutFinishState(plate);//离开出场界面 }