Browse Source

back to zhuhai

master
fajiao 2 years ago
parent
commit
cbf050731f
  1. 34
      AutoWeightServer/Center/DeviceCenter.cs
  2. 4
      AutoWeightServer/IfManager/Scales/ScalesManager.cs
  3. 2
      AutoWeightServer/UI/FrmBill.cs
  4. 2
      AutoWeightServer/UI/UC/UCCarOut.cs

34
AutoWeightServer/Center/DeviceCenter.cs

@ -68,8 +68,8 @@ namespace EC.AutoWeightServer.Center
OpenLightServer(); OpenLightServer();
OpenLedServer(); OpenLedServer();
OpenFingerPrintServer(); OpenFingerPrintServer();
//OpenYkPosServer(); OpenYkPosServer();
OpenPosServer(); //OpenPosServer();
} }
public void CloseDevices() public void CloseDevices()
@ -102,28 +102,28 @@ namespace EC.AutoWeightServer.Center
msgList.Add("指纹接口未连接"); msgList.Add("指纹接口未连接");
if (LedZKManager == null || !LedZKManager.IsConnected()) if (LedZKManager == null || !LedZKManager.IsConnected())
msgList.Add("Led屏未连接"); msgList.Add("Led屏未连接");
//if (!YkPosManager.IsConnected()) if (!YkPosManager.IsConnected())
//{
// msgList.Add("打印接口未连接");
//}
//else
//{
// if (YkPosManager.IsPaperExhaust())
// msgList.Add("打印接口纸尽");
// //if (YkPosManager.IsPaperWillExhaust())
// // msgList.Add("打印接口纸将尽");
//}
if (!PosManager.IsConnected())
{ {
msgList.Add("打印接口未连接"); msgList.Add("打印接口未连接");
} }
else else
{ {
if (PosManager.IsPaperExhaust()) if (YkPosManager.IsPaperExhaust())
msgList.Add("打印接口纸尽"); msgList.Add("打印接口纸尽");
//if (YkPosManager.IsPaperWillExhaust()) //if (YkPosManager.IsPaperWillExhaust())
// msgList.Add("打印接口纸将尽"); // 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()); var msg = string.Join("\n", msgList.ToArray());
if (!string.IsNullOrEmpty(msg)) if (!string.IsNullOrEmpty(msg))
UiExtendCenter.ShowErrorMsgBox(msg); UiExtendCenter.ShowErrorMsgBox(msg);
@ -321,7 +321,7 @@ namespace EC.AutoWeightServer.Center
/// 打印运单 /// 打印运单
/// </summary> /// </summary>
/// <param name="billEntity"></param> /// <param name="billEntity"></param>
public void PrintBill(TransportBillEntity billEntity) public void PrintYkPosBill(TransportBillEntity billEntity)
{ {
if (billEntity == null) if (billEntity == null)
return; return;
@ -409,7 +409,7 @@ namespace EC.AutoWeightServer.Center
PosManager = null; PosManager = null;
} }
public void PrintBIll(TransportBillEntity billEntity) public void PrintPosBill(TransportBillEntity billEntity)
{ {
if (PosManager == null || billEntity == null) if (PosManager == null || billEntity == null)
return; return;

4
AutoWeightServer/IfManager/Scales/ScalesManager.cs

@ -34,12 +34,12 @@ namespace EC.AutoWeightServer.IfManager.Scales
public bool StartServer() public bool StartServer()
{ {
Scales = new ScalesHuiZhou(_comName, _baudRate, _receivedBytesThreshold); Scales = new ScalesZhuHai(_comName, _baudRate, _receivedBytesThreshold);
Scales.OnRecData += RecData; Scales.OnRecData += RecData;
if (ServerConfig.WtTransmitFlag > 0) if (ServerConfig.WtTransmitFlag > 0)
{ {
_transmitPort = SerialPortManager.CreateSerialPort(ServerConfig.WtTransmitCom, _baudRate); _transmitPort = SerialPortManager.CreateSerialPort(ServerConfig.WtTransmitCom, _baudRate);
((ScalesHuiZhou)Scales).OnRecTransmit += RecTransmit; ((ScalesZhuHai)Scales).OnRecTransmit += RecTransmit;
} }
Scales.StartServer(); Scales.StartServer();
return true; return true;

2
AutoWeightServer/UI/FrmBill.cs

@ -62,7 +62,7 @@ namespace EC.AutoWeightServer.UI
if (_mainServer == null) return; if (_mainServer == null) return;
var cell = dataGridView.CurrentRow.Cells; var cell = dataGridView.CurrentRow.Cells;
var billEntity = ServiceCenter.BillService.GetBillBySerialNumber(cell[0].Value.ToString()); var billEntity = ServiceCenter.BillService.GetBillBySerialNumber(cell[0].Value.ToString());
_mainServer.DeviceCenter.PrintBill(billEntity); _mainServer.DeviceCenter.PrintYkPosBill(billEntity);
} }
} }
} }

2
AutoWeightServer/UI/UC/UCCarOut.cs

@ -392,7 +392,7 @@ namespace EC.AutoWeightServer.UI.UC
} }
btnConfirm.Enabled = false; btnConfirm.Enabled = false;
_mainServer.DeviceCenter.PrintBill(billEntity);//打印运输小票 _mainServer.DeviceCenter.PrintYkPosBill(billEntity);//打印运输小票
//_mainServer.DeviceCenter.PrintBill(billEntity);//打印存根小票 //_mainServer.DeviceCenter.PrintBill(billEntity);//打印存根小票
_mainServer.SetOutFinishState(plate);//离开出场界面 _mainServer.SetOutFinishState(plate);//离开出场界面
} }

Loading…
Cancel
Save