Bläddra i källkod

44

样式分支
fyf 2 år sedan
förälder
incheckning
74956ce551
5 ändrade filer med 49 tillägg och 18 borttagningar
  1. +6
    -6
      BPASmartClient.DRCoffee/CoffeeMachine.cs
  2. +9
    -4
      BPASmartClient.Device/DeviceStatus.cs
  3. +8
    -8
      BPASmartClient.KLMCoffee/CoffeeMachine.cs
  4. +13
    -0
      BPASmartClient.KLMCoffee/Protocal/FaultMessage.cs
  5. +13
    -0
      BPASmartClient.KLMCoffee/Protocal/UpkeepMessage.cs

+ 6
- 6
BPASmartClient.DRCoffee/CoffeeMachine.cs Visa fil

@@ -137,19 +137,19 @@ namespace BPASmartClient.DRCoffee
/// <param name="package"></param>
public void ProcessPackage(DrCoffeePackage package)
{
if (((DrCoffeeStatus)status["CoffeeStatus"]) == DrCoffeeStatus.Running && package.Status != DrCoffeeStatus.Running)
if (((DrCoffeeStatus)status["Status"]) == DrCoffeeStatus.Running && package.Status != DrCoffeeStatus.Running)
{
status["CoffeeStatus"] = package.Status;
status["Status"] = package.Status;
lastRefreshTime = DateTime.Now;
new DRCoffee_CoffeEndCookEvent() { Id = DeviceId }.Publish();
}
else status["CoffeeStatus"] = package.Status;
else status["Status"] = package.Status;
status["AppStatus"] = package.ApplicationStatus;
status["Warning"] = package.Warning;
status["Fault"] = package.Fault;

if ((DrCoffeeStatus)status["CoffeeStatus"] == DrCoffeeStatus.Warning
|| (DrCoffeeStatus)status["CoffeeStatus"] == DrCoffeeStatus.Fault
if ((DrCoffeeStatus)status["Status"] == DrCoffeeStatus.Warning
|| (DrCoffeeStatus)status["Status"] == DrCoffeeStatus.Fault
|| (DrCoffeeWarning)status["Warning"] != DrCoffeeWarning.无警告
|| (DrCoffeeFault)status["Fault"] != DrCoffeeFault.无故障
)
@@ -162,7 +162,7 @@ namespace BPASmartClient.DRCoffee

protected override void InitStatus()
{
status["CoffeeStatus"] = DrCoffeeStatus.Wait;
status["Status"] = DrCoffeeStatus.Wait;
status["AppStatus"] = DrCoffeeAppStatus.应用无状态;
status["Warning"] = DrCoffeeWarning.无警告;
status["Fault"] = DrCoffeeFault.无故障;


+ 9
- 4
BPASmartClient.Device/DeviceStatus.cs Visa fil

@@ -31,10 +31,15 @@ namespace BPASmartClient.Device
{"False","异常" },
{"True","正常" },

{"CoffeeStatus","咖啡机状态" },
{"AppStatus","咖啡机应用状态" },
{"Warning","咖啡机告警" },
{"Fault","咖啡机故障" }
{"Status","状态" },
{"AppStatus","应用状态" },
{"Warning","告警" },
{"Fault","故障" },
{"drinkType","饮品类型" },
{"taskIndex","任务序号" },
{"Keep","维修保护" },
{"progress","工作进度" }


};


+ 8
- 8
BPASmartClient.KLMCoffee/CoffeeMachine.cs Visa fil

@@ -139,12 +139,12 @@ namespace BPASmartClient.KLMCoffee
SystemStatusModel systemStatus = new K95Command().StateResolution(data);
if (systemStatus != null)
{
status["temStatus"] = systemStatus.temStatus;
status["Status"] = systemStatus.temStatus;
status["drinkType"] = systemStatus.drinkType;
status["taskIndex"] = systemStatus.taskIndex;
status["AppStatus"] = systemStatus.taskIndex;
status["progress"] = systemStatus.progress;
status["faultMessage"] = systemStatus.faultMessage;
status["upkeepMessage"] = systemStatus.upkeepMessage;
status["Warning"] = systemStatus.faultMessage.dataFault();
status["Keep"] = systemStatus.upkeepMessage;
if (systemStatus.faultMessage.IsFault() || systemStatus.upkeepMessage.IsUpkeep())
IsWork=false;
else
@@ -160,12 +160,12 @@ namespace BPASmartClient.KLMCoffee

protected override void InitStatus()
{
status["temStatus"] = K95SysTemStatus.空闲状态;
status["Status"] = K95SysTemStatus.空闲状态;
status["drinkType"] = DrinkType.意式;
status["taskIndex"] = TaskIndex.无任务;
status["AppStatus"] = TaskIndex.无任务;
status["progress"] = 0;
status["faultMessage"] = new FaultMessage(0x00,0x00);
status["upkeepMessage"] = new UpkeepMessage(0x00);
status["Warning"] = new FaultMessage(0x00,0x00).dataFault();
status["Keep"] = new UpkeepMessage(0x00).dataFault();

}



+ 13
- 0
BPASmartClient.KLMCoffee/Protocal/FaultMessage.cs Visa fil

@@ -104,5 +104,18 @@ namespace BPASmartClient.KLMCoffee.Protocal
}
return false;
}

public string dataFault()
{
string message = string.Empty;
foreach (System.Reflection.PropertyInfo info in this.GetType().GetProperties())
{
if ((bool)info.GetValue(this) == true)
{
message= message +" "+ info.Name;
}
}
return string.IsNullOrEmpty(message)?"无": message;
}
}
}

+ 13
- 0
BPASmartClient.KLMCoffee/Protocal/UpkeepMessage.cs Visa fil

@@ -44,5 +44,18 @@ namespace BPASmartClient.KLMCoffee.Protocal
}
return false;
}

public string dataFault()
{
string message = string.Empty;
foreach (System.Reflection.PropertyInfo info in this.GetType().GetProperties())
{
if ((bool)info.GetValue(this) == true)
{
message = message + " " + info.Name;
}
}
return string.IsNullOrEmpty(message) ? "无" : message;
}
}
}

Laddar…
Avbryt
Spara