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();
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
/// 打印运单
/// </summary>
/// <param name="billEntity"></param>
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;

4
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;

2
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);
}
}
}

2
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);//离开出场界面
}

Loading…
Cancel
Save