| | |
| | | |
| | | using Bro.Common.Helper; |
| | | using Bro.Common.Interface; |
| | | using Bro.M135.Common; |
| | | using Bro.UI.Model.Winform; |
| | | using Sunny.UI; |
| | | using System; |
| | |
| | | //只有在打印机异常时再次下发打印任务后,才能获取到打印机状态。这是因为打印机驱动程序通常只在处理打印请求时更新其状态信息。如果打印机没有接收到新的打印任务,可能无法立即反映出真实状态。 |
| | | textBox2.Text = "taskNum:" + taskNum + ",statuscode:" + statuscode + ",status:" + status; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | int num = 0; |
| | | //发送 |
| | | private void button5_Click(object sender, EventArgs e) |
| | | { |
| | | //mqtt.Send("2", "DS02217", Config141.basketcode, "1", (num++).ToString()); |
| | | string Msg = Task.Run(() => Process141.mqtt.MESForBasketAsync(textBox3.Text, textBox4.Text, textBox5.Text, textBox6.Text, textBox7.Text)).Result; |
| | | if (Msg == null) |
| | | { |
| | | CommonLogger.LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"RabbitMQ返回数据为 null"); |
| | | } |
| | | else |
| | | { |
| | | CommonLogger.LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"RabbitMQ返回数据为 {Msg}"); |
| | | } |
| | | } |
| | | |
| | | int pronum = 0; |
| | | private void button6_Click(object sender, EventArgs e)//sn,result,zword,zno,entray |
| | | { |
| | | string Msg = Task.Run(() => Process141.mqtt.MESForProduceAsync(new ProductModel() { SN = textBox3.Text, Result = textBox4.Text }, textBox5.Text, Convert.ToInt32(textBox6.Text), textBox7.Text)).Result; |
| | | if (Msg == null) |
| | | { |
| | | CommonLogger.LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"RabbitMQ 物料 返回数据为 null"); |
| | | } |
| | | else |
| | | { |
| | | CommonLogger.LogAsync(DateTime.Now, EnumHelper.LogLevel.Exception, $"RabbitMQ 物料 返回数据为 {Msg}"); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | } |