fyf pirms 2 gadiem
vecāks
revīzija
466987608a
7 mainītis faili ar 50 papildinājumiem un 38 dzēšanām
  1. +14
    -14
      BPASmartClient.MorkT/Control_MorkT.cs
  2. +9
    -3
      BPASmartClient.MorkTM/Control_MorkTM.cs
  3. +20
    -4
      BPASmartClient.MorkTM/PolymerBatching.cs
  4. +1
    -10
      BPASmartClient.MorkTM/ViewModel/DebugViewModel.cs
  5. +4
    -4
      BPASmartClient/App.config
  6. +1
    -1
      BPASmartClient/MainWindow.xaml
  7. +1
    -2
      SmartClient.sln

+ 14
- 14
BPASmartClient.MorkT/Control_MorkT.cs Parādīt failu

@@ -76,21 +76,21 @@ namespace BPASmartClient.MorkT

public override void MainTask()
{
if (morkTime.AddMinutes(Global.TimeInterval).Minute == DateTime.Now.Minute)
{
morkTime = DateTime.Now;
if ((ELebaiRModel)peripheralStatus["RobotMode"] == ELebaiRModel.空闲状态)
{
MessageLog.GetInstance.Show("机器人开始自嗨!");
EventBus.EventBus.GetInstance().Publish(new LebaiRobot_SetValueEvent { DeviceId = DeviceId, RobotSetValue = 0 }, (o) => { });
EventBus.EventBus.GetInstance().Publish(new LebaiRobot_LebaiSenceEvent { DeviceId = DeviceId, LebaiSence = Lebai_qsqdCode.SENCE_自嗨 });
Wait();
EventBus.EventBus.GetInstance().Publish(new LebaiRobot_SetValueEvent { DeviceId = DeviceId, RobotSetValue = 1 }, (o) => { });
Thread.Sleep(50);
}
//if (morkTime.AddMinutes(Global.TimeInterval).Minute == DateTime.Now.Minute)
//{
// morkTime = DateTime.Now;
// if ((ELebaiRModel)peripheralStatus["RobotMode"] == ELebaiRModel.空闲状态)
// {
// MessageLog.GetInstance.Show("机器人开始自嗨!");
// EventBus.EventBus.GetInstance().Publish(new LebaiRobot_SetValueEvent { DeviceId = DeviceId, RobotSetValue = 0 }, (o) => { });
// EventBus.EventBus.GetInstance().Publish(new LebaiRobot_LebaiSenceEvent { DeviceId = DeviceId, LebaiSence = Lebai_qsqdCode.SENCE_自嗨 });
// Wait();
// EventBus.EventBus.GetInstance().Publish(new LebaiRobot_SetValueEvent { DeviceId = DeviceId, RobotSetValue = 1 }, (o) => { });
// Thread.Sleep(50);
// }

}
else if (morkTime.AddMinutes(Global.TimeInterval) < DateTime.Now) morkTime = DateTime.Now;
//}
//else if (morkTime.AddMinutes(Global.TimeInterval) < DateTime.Now) morkTime = DateTime.Now;
#region morkt流程
//if (morkT.waitMorkOrder != null)//更新订单取走状态
//{


+ 9
- 3
BPASmartClient.MorkTM/Control_MorkTM.cs Parādīt failu

@@ -14,14 +14,14 @@ namespace BPASmartClient.MorkTM
{
public class Control_MorkTM : BaseDevice
{
public override DeviceClientType DeviceType => throw new NotImplementedException();
public override global::BPA.Message.Enum.DeviceClientType DeviceType { get { return BPA.Message.Enum.DeviceClientType.TMC_MT; } }

GVL_MorkTM morkTM = new GVL_MorkTM();
public override void DoMain()
{
ServerInit();
DataParse();
PolymerBatching.GetMaterialInfo();
ActionManage.GetInstance.Register(new Action<object>((o) =>
{
if (o != null && o is WritePar writePar) WriteData(writePar.Address, writePar.Value);
@@ -158,7 +158,13 @@ namespace BPASmartClient.MorkTM

public override void SimOrder()
{
throw new NotImplementedException();
ActionManage.GetInstance.Register(new Action<object>((o) =>
{
if (o is string goodName)
{

}
}), "");
}

public override void Stop()


+ 20
- 4
BPASmartClient.MorkTM/PolymerBatching.cs Parādīt failu

@@ -6,19 +6,35 @@ using System.Threading.Tasks;

namespace BPASmartClient.MorkTM
{
public enum Material
public enum MaterialPosion
{
Material_Top_1, Material_Top_2, Material_Top_3, Material_Top_4, Material_Top_5, Material_Top_6,
Material_Mid_1, Material_Mid_2, Material_Mid_3, Material_Mid_4, Material_Mid_5, Material_Mid_6, Material_Mid_7, Material_Mid_8, Material_Mid_9, Material_Mid_10,
Marerial_Bottom_1, Marerial_Bottom_2, Marerial_Bottom_3, Marerial_Top_4,Marerial_Bottom_5, Marerial_Bottom_6
Marerial_Bottom_1, Marerial_Bottom_2, Marerial_Bottom_3, Marerial_Bottom_4, Marerial_Bottom_5, Marerial_Bottom_6,
Matetial_Tea_1, Matetial_Tea_2, Matetial_Tea_3, Matetial_Tea_4, Matetial_Tea_5, Matetial_Tea_6

}
public enum TeaStorageBox
public enum OutMaterialPosion
{
TeaStorageBox_1, TeaStorageBox_2, TeaStorageBox_3, TeaStorageBox_4, TeaStorageBox_5, TeaStorageBox_6
OutMaterial_1, OutMaterial_2, OutMaterial_3, OutMaterial_4, OutMaterial_5, OutMaterial_6, OutMaterial_7, OutMaterial_8, OutMaterial_9, OutMaterial_10
}

public class PolymerBatching
{
public static void GetMaterialInfo()
{
Array arrayPosion = Enum.GetValues(typeof(MaterialPosion));
Array arrayOutPosion = Enum.GetValues(typeof(OutMaterialPosion));
for (int i = 0; i < arrayPosion.Length; i++)
{
int j = (int)Math.Ceiling((double)(i + 1) / 3) - 1;
GoodsMaterialPosion.Add((MaterialPosion)arrayPosion.GetValue(i), (OutMaterialPosion)arrayOutPosion.GetValue(j));

}
}

public static Dictionary<MaterialPosion, OutMaterialPosion> GoodsMaterialPosion = new Dictionary<MaterialPosion, OutMaterialPosion>();
}
}

+ 1
- 10
BPASmartClient.MorkTM/ViewModel/DebugViewModel.cs Parādīt failu

@@ -33,16 +33,7 @@ namespace BPASmartClient.MorkTM.ViewModel
public DebugViewModel()
{
foreach(TeaStorageBox code in Enum.GetValues(typeof(TeaStorageBox)))
{
Materials.Add(code.ToString());
}

foreach (Material materials in Enum.GetValues(typeof(Material)))
{
Materials.Add(materials.ToString());
}

}
}


+ 4
- 4
BPASmartClient/App.config Parādīt failu

@@ -7,14 +7,14 @@
<add key="IsEnableTest" value="false"/>

<!--测试环境-->
<add key="apollouri" value="http://10.2.1.21:28080/"/>
<!--<add key="apollouri" value="http://10.2.1.21:28080/"/>
<add key="AppId" value="test1_HostComputer"/>
<add key ="Namespaces" value="DEV.test1.Config"/>
<add key ="Namespaces" value="DEV.test1.Config"/>-->

<!--开发环境-->
<!--<add key="apollouri" value="http://10.2.1.21:28080/"/>
<add key="apollouri" value="http://10.2.1.21:28080/"/>
<add key="AppId" value="dev1_common"/>
<add key ="Namespaces" value="DEV.Config"/>-->
<add key ="Namespaces" value="DEV.Config"/>

<!--正式环境-->
<!--<add key="apollouri" value="http://47.108.65.220:28080/"/>


+ 1
- 1
BPASmartClient/MainWindow.xaml Parādīt failu

@@ -55,7 +55,7 @@
<StackPanel
x:Name="myPanel"
Orientation="Horizontal"
Visibility="Collapsed">
Visibility="Hidden">
<Button
Width="120"
Height="40"


+ 1
- 2
SmartClient.sln Parādīt failu

@@ -1,6 +1,6 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Blend for Visual Studio Version 17
# Visual Studio Version 17
VisualStudioVersion = 17.0.32002.185
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmartClient.DRCoffee", "BPASmartClient.DRCoffee\BPASmartClient.DRCoffee.csproj", "{31E9DC70-5889-4BA5-A5BA-FFDE66AFF314}"
@@ -1165,7 +1165,6 @@ Global
{E7168B03-68E5-4285-BB95-5660F877577A} = {8712125E-14CD-4E1B-A1CE-4BDE03805942}
{A49E1C5A-9489-451C-9CE6-CEA586234B84} = {8712125E-14CD-4E1B-A1CE-4BDE03805942}
{099E047C-F40E-47A3-A5BA-81FC1500D5E8} = {3D1D0E04-03FD-480A-8CF8-6E01A2E28625}
{76B6B333-0109-4EE8-A9B2-3E53A7421D92} = {9FB27073-61A0-4FE3-94DB-5FDDE062332F}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {9AEC9B81-0222-4DE9-B642-D915C29222AC}


Notiek ielāde…
Atcelt
Saglabāt