Selaa lähdekoodia

冲突解决

master
pry 2 vuotta sitten
vanhempi
commit
728a368c57
6 muutettua tiedostoa jossa 71 lisäystä ja 8 poistoa
  1. +4
    -3
      HBLConsole.Business/IotReport.cs
  2. +17
    -2
      HBLConsole.Business/MessageServer/Base.cs
  3. +2
    -2
      HBLConsole.Factory/SimpleFactory.cs
  4. +16
    -0
      HBLConsole.MORKD/Control_MORKD.cs
  5. +16
    -0
      HBLConsole.MORKIC/Control_MORKIC.cs
  6. +16
    -1
      HBLConsole.MORKS/Control_MORKS.cs

+ 4
- 3
HBLConsole.Business/IotReport.cs Näytä tiedosto

@@ -29,7 +29,7 @@ namespace HBLConsole.Business
else MessageLog.GetInstance.Show($"设备{InternetInfo.DeviceName}阿里云连接失败.不能上报业务信息");
string NameSpace = $"HBLConsole.{GeneralConfig.DeviceType}";//Load 加载的是dll的名称,GetType获取的是全命名空间下的类
Type type = Assembly.Load(NameSpace).GetType($"{NameSpace}.Control_{GeneralConfig.DeviceType}");
control = Activator.CreateInstance(type) as IControl;
control = (IControl)type?.GetProperty("Instance").GetValue(null);
}
/// <summary>
/// 是否连接成功
@@ -67,13 +67,14 @@ namespace HBLConsole.Business
new DevSXBase { SXMC="设备软件",SXLX="上位机",SXStatus=true }
}
});
bool IsAllowRun = GetTypeValue<bool>("AllowRun");
bool TemperatureReached = GetTypeValue<bool>("TemperatureReached");
bool MissingBowl = GetTypeValue<bool>("MissingBowl");
bool TurntableLowerLimit = GetTypeValue<bool>("TurntableLowerLimit");

//设置扩展属性与状态,连接上机器人后才会处罚
if (IsAllowRun)
if (GeneralConfig.Healthy)
{
iOTDevSXModel.SetKZSX(new DevSX
{
@@ -117,7 +118,7 @@ namespace HBLConsole.Business
{
ThreadOperate.GetInstance.StartLong(new Action(() =>
{
if (iSLinks && GeneralConfig.DeviceType.ToString() == "MO7RKS")
if (iSLinks && GeneralConfig.DeviceType.ToString() == "MORKS")
{
SetData();
IOTDev.GetInstance().IOT_Publish(IOTDev.PubTopic, iOTDevSXModel.Tojson());


+ 17
- 2
HBLConsole.Business/MessageServer/Base.cs Näytä tiedosto

@@ -154,8 +154,23 @@ namespace HBLConsole.Business.MessageServer
{
MessageLog.GetInstance.Show(ex.ToString());
}
var res = JsonConvert.DeserializeObject<OrderStatusChangeRsp>(result);
return res?.Result == 2;
var res = JsonConvert.DeserializeObject<OrderStatusRsp>(result);
return res == null ? false: res.isSuccess;
}
public class OrderStatusRsp
{
/// <summary>
/// 子订单ID
/// </summary>
public string SuborderId { get; set; }
/// <summary>
/// 订单状态
/// </summary>
public int Result { get; set; } = 0;
public bool isSuccess { get; set; }
public bool data { get; set; }
public string msg { get; set; }

}
}
}

+ 2
- 2
HBLConsole.Factory/SimpleFactory.cs Näytä tiedosto

@@ -74,10 +74,10 @@ namespace HBLConsole.Factory
/// </summary>
public void DeviceInit()
{
//return;
string NameSpace = $"HBLConsole.{DeviceType}";//Load 加载的是dll的名称,GetType获取的是全命名空间下的类
Type type = Assembly.Load(NameSpace).GetType($"{NameSpace}.Control_{DeviceType}");
control = Activator.CreateInstance(type) as IControl;
//control = Activator.CreateInstance(type) as IControl;
control = (IControl)type?.GetProperty("Instance").GetValue(null);
//IControl business = (IControl)type?.GetProperty("GetInstance").GetValue(null);
GetBatchingInfo();
control?.Init();


+ 16
- 0
HBLConsole.MORKD/Control_MORKD.cs Näytä tiedosto

@@ -13,6 +13,22 @@ namespace HBLConsole.MORKD
{
public class Control_MORKD : IControl
{
#region 单例模式
private static Control_MORKD _instance;
public static Control_MORKD Instance
{
get
{
if (_instance == null)
_instance = new Control_MORKD();
return _instance;
}
}
public Control_MORKD()
{

}
#endregion
GVL_MORKD mORKD = new GVL_MORKD();
public void ConnectOk()
{


+ 16
- 0
HBLConsole.MORKIC/Control_MORKIC.cs Näytä tiedosto

@@ -28,6 +28,22 @@ namespace HBLConsole.MORKIC
*/
public class Control_MORKIC : IControl
{
#region 单例模式
private static Control_MORKIC _instance;
public static Control_MORKIC Instance
{
get
{
if (_instance == null)
_instance = new Control_MORKIC();
return _instance;
}
}
public Control_MORKIC()
{

}
#endregion
GVL_MORIC mORKD = new GVL_MORIC();
//咖啡机主控程序
private CoffeeMachine coffeeMachine;


+ 16
- 1
HBLConsole.MORKS/Control_MORKS.cs Näytä tiedosto

@@ -19,8 +19,23 @@ namespace HBLConsole.MORKS
{
public class Control_MORKS : IControl
{
public GVL_MORKS mORKS { get; set; } = new GVL_MORKS();
#region 单例模式
private static Control_MORKS _instance;
public static Control_MORKS Instance
{
get
{
if (_instance == null)
_instance = new Control_MORKS();
return _instance;
}
}
public Control_MORKS()
{

}
#endregion
public GVL_MORKS mORKS { get; set; } = new GVL_MORKS();
public void Init()
{
Test();


Ladataan…
Peruuta
Tallenna