diff --git a/Aucma.Scada.Business/InStoreBusiness.cs b/Aucma.Scada.Business/InStoreBusiness.cs
index 115bb75..6e216ea 100644
--- a/Aucma.Scada.Business/InStoreBusiness.cs
+++ b/Aucma.Scada.Business/InStoreBusiness.cs
@@ -115,12 +115,12 @@ namespace Aucma.Scada.Business
//Task.Run(() =>
//{
// Thread.Sleep(6000);
- // for (int i = 1; i < 12; i++)
+ // for (int i = 1; i < 2; i++)
// {
- // InStore(appConfig.shellStoreCode, "B23600000781110900" + i.ToString().PadLeft(2, '0'));
- // Thread.Sleep(1000 * 30);
- // InStore(appConfig.linerStoreCode, "L23600000788110900" + i.ToString().PadLeft(2, '0'));
- // Thread.Sleep(1000 * 30);
+ // InStore("B2401018302500586001" + i.ToString().PadLeft(2, '0') , "169.254.100.169");
+ // // Thread.Sleep(1000 * 30);
+ // // InStore(appConfig.linerStoreCode, "L23600000788110900" + i.ToString().PadLeft(2, '0'));
+ // // Thread.Sleep(1000 * 30);
// }
//});
@@ -131,10 +131,19 @@ namespace Aucma.Scada.Business
///
///
///
- private void InStore(string storeCode, string materialCode)
+ private void InStore(string materialCode,string scannerIp)
{
try
{
+ string storeCode = string.Empty;
+ if (appConfig.shellHikRobotIp.Equals(scannerIp))
+ {
+ storeCode = appConfig.shellStoreCode;
+ }
+ else
+ {
+ storeCode = appConfig.linerStoreCode;
+ }
PrintLogInfoMessage($"扫码成功,物料码:{materialCode}");
string materialType = SubStringMaterialCode(materialCode);
#region Delete By wenjy 2023-10-30 11:41:00 取消通过数据库获取货道数量、在途量,改为通过PLC获取货道信息
@@ -151,17 +160,17 @@ namespace Aucma.Scada.Business
{
#region 2023-12-15 更新过点数据,插入记录到MATERIAL_COMPLETION表
- PrintBarCode print =_printBarCodeServices.query(materialCode);
- string planCode = _productPlanInfoServices.GetPlanCode(print.OrderCode, appConfig.stationCode);
- MaterialCompletion completion = new MaterialCompletion();
- completion.OrderCode = print.OrderCode;
- completion.MaterialBarcode = materialCode;
- completion.MaterialCode = print.MaterialCode;
- completion.MaterialName = print.MaterialName;
- completion.StationName = appConfig.stationCode;
- completion.CompleteDate = DateTime.Now;
- completion.planCode = planCode;
- _iMaterialCompletionServices.Add(completion);
+ //PrintBarCode print =_printBarCodeServices.query(materialCode);
+ //string planCode = _productPlanInfoServices.GetPlanCode(print.OrderCode, appConfig.stationCode);
+ //MaterialCompletion completion = new MaterialCompletion();
+ //completion.OrderCode = print.OrderCode;
+ //completion.MaterialBarcode = materialCode;
+ //completion.MaterialCode = print.MaterialCode;
+ //completion.MaterialName = print.MaterialName;
+ //completion.StationName = appConfig.stationCode;
+ //completion.CompleteDate = DateTime.Now;
+ //completion.planCode = planCode;
+ //_iMaterialCompletionServices.Add(completion);
#endregion
//spaceInfo.onRouteAmount += 1; //通过PLC获取货道信息(在库、在途数量)时不需要修改在途数量
@@ -173,7 +182,7 @@ namespace Aucma.Scada.Business
//报警停线
PrintLogInfoMessage($"物料码:{materialCode};未匹配到可用货道");
}
- }
+ }
catch (Exception ex)
{
PrintLogErrorMessage("入库业务异常", ex);
@@ -260,10 +269,12 @@ namespace Aucma.Scada.Business
RealTaskInfo taskInfo = _taskInfoService.GetTaskInfoByStoreCode(appConfig.shellStoreCode, appConfig.instoreTaskType);
if (taskInfo != null)
{
- PrintLogInfoMessage($"下发箱壳入库任务:{taskInfo.taskCode};仓库{taskInfo.storeCode};货道:{taskInfo.spaceCode}");
+
int result = taskHandle.SendShellTask_InStore(taskInfo);
if (result==1)
{
+
+
PrintLogInfoMessage($"箱壳入库任务:{taskInfo.taskCode};下发成功,等待PLC执行反馈");
shellSemaphore.Wait(); //一直堵塞直到信号量释放
@@ -305,7 +316,7 @@ namespace Aucma.Scada.Business
RealTaskInfo taskInfo = _taskInfoService.GetTaskInfoByStoreCode(appConfig.linerStoreCode, appConfig.instoreTaskType);
if (taskInfo != null)
{
- PrintLogInfoMessage($"下发内胆入库任务:{taskInfo.taskCode};仓库{taskInfo.storeCode};货道:{taskInfo.spaceCode}");
+
int result = taskHandle.SendLinerTask_InStore(taskInfo);
if (result==1)
{
diff --git a/Aucma.Scada.Business/InStoreTaskHandle.cs b/Aucma.Scada.Business/InStoreTaskHandle.cs
index a699aa7..e6f785f 100644
--- a/Aucma.Scada.Business/InStoreTaskHandle.cs
+++ b/Aucma.Scada.Business/InStoreTaskHandle.cs
@@ -104,61 +104,76 @@ namespace Aucma.Scada.Business
Task.Run(() =>
{
- while (true)
+ try
{
- if (_plcDictionary.Count > 0)
+ while (true)
{
- IPlc _plc = _plcDictionary[appConfig.shellStoreCode];
- if (_plc != null && _plc.IsConnected)
+ if (_plcDictionary.Count > 0)
{
-
- List taskList = _taskInfoService.GetTaskInfosForInstore(appConfig.shellStoreCode, appConfig.instoreTaskType, 2);
- if (taskList != null && taskList.Count > 0)
+ IPlc _plc = _plcDictionary[appConfig.shellStoreCode];
+ if (_plc != null)
{
- foreach (RealTaskInfo taskInfo in taskList)
+
+ List taskList = _taskInfoService.GetTaskInfosForInstore(appConfig.shellStoreCode, appConfig.instoreTaskType, 2);
+ if (taskList != null && taskList.Count > 0)
{
- SpaceAddress spaceAddress = spaceConfig.GetSpaceAddress(appConfig.shellStoreCode, taskInfo.spaceCode);
- JudgeIsFinish(taskInfo, _plc, spaceAddress, appConfig.shellStoreCode);
+ foreach (RealTaskInfo taskInfo in taskList)
+ {
+ SpaceAddress spaceAddress = spaceConfig.GetSpaceAddress(appConfig.shellStoreCode, taskInfo.spaceCode);
+ JudgeIsFinish(taskInfo, _plc, spaceAddress, appConfig.shellStoreCode);
+ }
}
}
+ else
+ {
+ logHelper.Info($"PLC信息为空或连接失败,通过{appConfig.shellStoreCode}未获取到该仓库对应的PLC信息");
+ }
}
- else
- {
- logHelper.Info($"PLC信息为空或连接失败,通过{appConfig.shellStoreCode}未获取到该仓库对应的PLC信息");
- }
- }
- Thread.Sleep(1000);
- };
+ Thread.Sleep(1000);
+ };
+ }
+ catch (Exception ex)
+ {
+
+ logHelper.Error(ex.Message.ToString());
+ }
});
//内胆线程
Task.Run(() =>
{
- while (true)
+ try
{
- if (_plcDictionary.Count > 0)
+ while (true)
{
- IPlc _plc = _plcDictionary[appConfig.linerStoreCode];
- if (_plc != null && _plc.IsConnected)
+ if (_plcDictionary.Count > 0)
{
- // 修改这个方法
- List taskList = _taskInfoService.GetTaskInfosForInstore(appConfig.linerStoreCode, appConfig.instoreTaskType, 2);
- if (taskList != null && taskList.Count > 0)
+ IPlc _plc = _plcDictionary[appConfig.linerStoreCode];
+ if (_plc != null)
{
- foreach (RealTaskInfo taskInfo in taskList)
+ // 修改这个方法
+ List taskList = _taskInfoService.GetTaskInfosForInstore(appConfig.linerStoreCode, appConfig.instoreTaskType, 2);
+ if (taskList != null && taskList.Count > 0)
{
- SpaceAddress spaceAddress = spaceConfig.GetSpaceAddress(appConfig.linerStoreCode, taskInfo.spaceCode);
- JudgeIsFinish(taskInfo, _plc, spaceAddress, appConfig.linerStoreCode);
+ foreach (RealTaskInfo taskInfo in taskList)
+ {
+ SpaceAddress spaceAddress = spaceConfig.GetSpaceAddress(appConfig.linerStoreCode, taskInfo.spaceCode);
+ JudgeIsFinish(taskInfo, _plc, spaceAddress, appConfig.linerStoreCode);
+ }
}
}
+ else
+ {
+ logHelper.Info($"PLC信息为空或连接失败,通过{appConfig.linerStoreCode}未获取到该仓库对应的PLC信息");
+ }
}
- else
- {
- logHelper.Info($"PLC信息为空或连接失败,通过{appConfig.linerStoreCode}未获取到该仓库对应的PLC信息");
- }
- }
- Thread.Sleep(1000);
- };
+ Thread.Sleep(1000);
+ };
+ }
+ catch (Exception ex)
+ {
+ logHelper.Error(ex.Message.ToString());
+ }
});
}
@@ -191,8 +206,7 @@ namespace Aucma.Scada.Business
if (_plc != null)
{
- if (_plc.IsConnected)
- {
+
if (_plc.readInt32ByAddress(plcConfig.in_shell_answer) == 1)
{
logHelper.Info("箱壳入库应答字为1,货道号:" + plcConfig.in_shell_spaceCode + ";写" + short.Parse(taskInfo.spaceCode.Substring(5, 1)));
@@ -211,11 +225,7 @@ namespace Aucma.Scada.Business
result = 2;
logHelper.PlcLog("应答字为2,下发新任务plc未就绪");
}
- }
- else
- {
- logHelper.Info($"仓库{taskInfo.storeCode};PLC未连接");
- }
+
}
else
{
diff --git a/Aucma.Scada.Business/OutStoreTaskHandle.cs b/Aucma.Scada.Business/OutStoreTaskHandle.cs
index 680488e..3ca75f4 100644
--- a/Aucma.Scada.Business/OutStoreTaskHandle.cs
+++ b/Aucma.Scada.Business/OutStoreTaskHandle.cs
@@ -429,13 +429,16 @@ namespace Aucma.Scada.Business
{
//var info = shellTaskInfos.Where(x => x.taskStatus != 3).ToList();
var info = GetTaskInfoByTaskStatus(appConfig.shellStoreCode);
- for (int i = 0; i < info.Count; i++)
+ if(info != null)
{
- var item = info[i];
- ReadShellFinish_OutStore(item);
- Console.WriteLine($"箱壳任务:{item.taskCode};物料:{item.materialCode};出库完成");
- item.taskStatus = 3;
- shellTaskInfos.Add(item);
+ for (int i = 0; i < info.Count; i++)
+ {
+ var item = info[i];
+ ReadShellFinish_OutStore(item);
+ Console.WriteLine($"箱壳任务:{item.taskCode};物料:{item.materialCode};出库完成");
+ item.taskStatus = 3;
+ shellTaskInfos.Add(item);
+ }
}
Thread.Sleep(1000);
@@ -454,13 +457,16 @@ namespace Aucma.Scada.Business
{
//var info = linerTaskInfos.Where(x => x.taskStatus != 3).ToList();
var info = GetTaskInfoByTaskStatus(appConfig.linerStoreCode);
- for (int i = 0; i < info.Count; i++)
+ if(info != null)
{
- var item = info[i];
- ReadLinerFinish_OutStore(item);
- Console.WriteLine($"内胆任务:{item.taskCode};物料:{item.materialCode};出库完成");
- item.taskStatus = 3;
- linerTaskInfos.Add(item);
+ for (int i = 0; i < info.Count; i++)
+ {
+ var item = info[i];
+ ReadLinerFinish_OutStore(item);
+ Console.WriteLine($"内胆任务:{item.taskCode};物料:{item.materialCode};出库完成");
+ item.taskStatus = 3;
+ linerTaskInfos.Add(item);
+ }
}
Thread.Sleep(1000);
diff --git a/Aucma.Scada.Business/bin/Debug/Aucma.Scada.Business.dll b/Aucma.Scada.Business/bin/Debug/Aucma.Scada.Business.dll
index 58f876f..a97eca5 100644
Binary files a/Aucma.Scada.Business/bin/Debug/Aucma.Scada.Business.dll and b/Aucma.Scada.Business/bin/Debug/Aucma.Scada.Business.dll differ
diff --git a/Aucma.Scada.Business/bin/Debug/Aucma.Scada.Business.pdb b/Aucma.Scada.Business/bin/Debug/Aucma.Scada.Business.pdb
index 055ab57..5122184 100644
Binary files a/Aucma.Scada.Business/bin/Debug/Aucma.Scada.Business.pdb and b/Aucma.Scada.Business/bin/Debug/Aucma.Scada.Business.pdb differ
diff --git a/Aucma.Scada.Business/bin/Debug/Aucma.Scada.HikRobot.dll b/Aucma.Scada.Business/bin/Debug/Aucma.Scada.HikRobot.dll
index d9b8d2c..c5eb488 100644
Binary files a/Aucma.Scada.Business/bin/Debug/Aucma.Scada.HikRobot.dll and b/Aucma.Scada.Business/bin/Debug/Aucma.Scada.HikRobot.dll differ
diff --git a/Aucma.Scada.Business/bin/Debug/Aucma.Scada.HikRobot.pdb b/Aucma.Scada.Business/bin/Debug/Aucma.Scada.HikRobot.pdb
index 6056f31..03c793d 100644
Binary files a/Aucma.Scada.Business/bin/Debug/Aucma.Scada.HikRobot.pdb and b/Aucma.Scada.Business/bin/Debug/Aucma.Scada.HikRobot.pdb differ
diff --git a/Aucma.Scada.Business/bin/Debug/Aucma.Scada.Model.pdb b/Aucma.Scada.Business/bin/Debug/Aucma.Scada.Model.pdb
index 2f9d099..bb1c5b3 100644
Binary files a/Aucma.Scada.Business/bin/Debug/Aucma.Scada.Model.pdb and b/Aucma.Scada.Business/bin/Debug/Aucma.Scada.Model.pdb differ
diff --git a/Aucma.Scada.Business/bin/Debug/HighWayIot.Config.dll b/Aucma.Scada.Business/bin/Debug/HighWayIot.Config.dll
index ab4c9d8..a9bb518 100644
Binary files a/Aucma.Scada.Business/bin/Debug/HighWayIot.Config.dll and b/Aucma.Scada.Business/bin/Debug/HighWayIot.Config.dll differ
diff --git a/Aucma.Scada.Business/bin/Debug/HighWayIot.Config.pdb b/Aucma.Scada.Business/bin/Debug/HighWayIot.Config.pdb
index 0322de1..17d6959 100644
Binary files a/Aucma.Scada.Business/bin/Debug/HighWayIot.Config.pdb and b/Aucma.Scada.Business/bin/Debug/HighWayIot.Config.pdb differ
diff --git a/Aucma.Scada.Business/bin/Debug/HighWayIot.Repository.dll b/Aucma.Scada.Business/bin/Debug/HighWayIot.Repository.dll
index 0b08b08..5dbf48b 100644
Binary files a/Aucma.Scada.Business/bin/Debug/HighWayIot.Repository.dll and b/Aucma.Scada.Business/bin/Debug/HighWayIot.Repository.dll differ
diff --git a/Aucma.Scada.Business/bin/Debug/HighWayIot.Repository.pdb b/Aucma.Scada.Business/bin/Debug/HighWayIot.Repository.pdb
index 7564a7c..fb56bc9 100644
Binary files a/Aucma.Scada.Business/bin/Debug/HighWayIot.Repository.pdb and b/Aucma.Scada.Business/bin/Debug/HighWayIot.Repository.pdb differ
diff --git a/Aucma.Scada.HikRobot/MvCodeHelper.cs b/Aucma.Scada.HikRobot/MvCodeHelper.cs
index 2cbfb38..f03293b 100644
--- a/Aucma.Scada.HikRobot/MvCodeHelper.cs
+++ b/Aucma.Scada.HikRobot/MvCodeHelper.cs
@@ -17,7 +17,7 @@ namespace Aucma.Core.Scanner
private static AppConfig appConfig = AppConfig.Instance;
public static bool m_bGrabbing = true;
#region 委托事件
- public delegate void RefreshMaterialCodeStr(string storeCode, string materialCodeStr);
+ public delegate void RefreshMaterialCodeStr(string materialCodeStr, string ip);
public static event RefreshMaterialCodeStr RefreshMaterialCodeStrEvent;
///
/// 日志信息刷新
@@ -66,7 +66,12 @@ namespace Aucma.Core.Scanner
try
{
RefreshLogMessageEvent?.Invoke("获取扫码器设备列表,进入DeviceListAcq()方法");
-
+
+ // 内胆扫码器ip
+ string LinerScannerIp = appConfig.linerHikRobotIp;
+ // 箱壳扫码器ip
+ string ShellScannerIp = appConfig.linerHikRobotIp;
+
System.GC.Collect();
m_stDeviceList.nDeviceNum = 0;
// 获取设备列表
@@ -96,7 +101,9 @@ namespace Aucma.Core.Scanner
// 获取ip
string ip = ((stGigEDeviceInfo.nCurrentIp & 0xff000000) >> 24) + "." + ((stGigEDeviceInfo.nCurrentIp & 0x00ff0000) >> 16) + "." + ((stGigEDeviceInfo.nCurrentIp & 0x0000ff00) >> 8) + "." + (stGigEDeviceInfo.nCurrentIp & 0x000000ff);
- // Console.WriteLine($"打印扫码设备信息,下标:{i};IP:{ip}");
+ // 只连接配置的扫码器
+ if (!ip.Equals(LinerScannerIp) && !ip.Equals(ShellScannerIp)) continue;
+
Console.Write("扫码器设备[" + i + "],ip:" + ip);
// 创建第i个设备
stDevInfo = (MvCodeReader.MV_CODEREADER_DEVICE_INFO)Marshal.PtrToStructure(m_stDeviceList.pDeviceInfo[i], typeof(MvCodeReader.MV_CODEREADER_DEVICE_INFO));
@@ -181,14 +188,9 @@ namespace Aucma.Core.Scanner
RefreshLogMessageEvent?.Invoke("相机ip:" + hashmap.Value + " Get CodeNum: " + "CodeNum[" + i.ToString() + "], CodeString[" + strCode + "]");
if (!string.IsNullOrEmpty(strCode))
{
- // 获取到条码处理业务
- if (appConfig.shellHikRobotIp == hashmap.Value)
- {
- RefreshMaterialCodeStrEvent?.Invoke(appConfig.shellStoreCode, strCode);
- }else if(appConfig.linerHikRobotIp == hashmap.Value)
- {
- RefreshMaterialCodeStrEvent?.Invoke(appConfig.linerStoreCode, strCode);
- }
+
+ RefreshMaterialCodeStrEvent?.Invoke(strCode,hashmap.Value);
+
}
}
}
diff --git a/Aucma.Scada.HikRobot/bin/Debug/Aucma.Scada.HikRobot.dll b/Aucma.Scada.HikRobot/bin/Debug/Aucma.Scada.HikRobot.dll
index d9b8d2c..c5eb488 100644
Binary files a/Aucma.Scada.HikRobot/bin/Debug/Aucma.Scada.HikRobot.dll and b/Aucma.Scada.HikRobot/bin/Debug/Aucma.Scada.HikRobot.dll differ
diff --git a/Aucma.Scada.HikRobot/bin/Debug/Aucma.Scada.HikRobot.pdb b/Aucma.Scada.HikRobot/bin/Debug/Aucma.Scada.HikRobot.pdb
index 6056f31..03c793d 100644
Binary files a/Aucma.Scada.HikRobot/bin/Debug/Aucma.Scada.HikRobot.pdb and b/Aucma.Scada.HikRobot/bin/Debug/Aucma.Scada.HikRobot.pdb differ
diff --git a/Aucma.Scada.HikRobot/bin/Debug/HighWayIot.Config.dll b/Aucma.Scada.HikRobot/bin/Debug/HighWayIot.Config.dll
index ab4c9d8..a9bb518 100644
Binary files a/Aucma.Scada.HikRobot/bin/Debug/HighWayIot.Config.dll and b/Aucma.Scada.HikRobot/bin/Debug/HighWayIot.Config.dll differ
diff --git a/Aucma.Scada.HikRobot/bin/Debug/HighWayIot.Config.pdb b/Aucma.Scada.HikRobot/bin/Debug/HighWayIot.Config.pdb
index 0322de1..17d6959 100644
Binary files a/Aucma.Scada.HikRobot/bin/Debug/HighWayIot.Config.pdb and b/Aucma.Scada.HikRobot/bin/Debug/HighWayIot.Config.pdb differ
diff --git a/Aucma.Scada.Model/Aucma.Scada.Model.csproj b/Aucma.Scada.Model/Aucma.Scada.Model.csproj
index fe1c280..e8b484b 100644
--- a/Aucma.Scada.Model/Aucma.Scada.Model.csproj
+++ b/Aucma.Scada.Model/Aucma.Scada.Model.csproj
@@ -47,6 +47,7 @@
+
diff --git a/Aucma.Scada.Model/bin/Debug/Aucma.Scada.Model.dll b/Aucma.Scada.Model/bin/Debug/Aucma.Scada.Model.dll
index ad579f4..289dba9 100644
Binary files a/Aucma.Scada.Model/bin/Debug/Aucma.Scada.Model.dll and b/Aucma.Scada.Model/bin/Debug/Aucma.Scada.Model.dll differ
diff --git a/Aucma.Scada.Model/bin/Debug/Aucma.Scada.Model.pdb b/Aucma.Scada.Model/bin/Debug/Aucma.Scada.Model.pdb
index 2f9d099..bb1c5b3 100644
Binary files a/Aucma.Scada.Model/bin/Debug/Aucma.Scada.Model.pdb and b/Aucma.Scada.Model/bin/Debug/Aucma.Scada.Model.pdb differ
diff --git a/Aucma.Scada.Model/domain/BaseMaterialInfo.cs b/Aucma.Scada.Model/domain/BaseMaterialInfo.cs
new file mode 100644
index 0000000..b0eb682
--- /dev/null
+++ b/Aucma.Scada.Model/domain/BaseMaterialInfo.cs
@@ -0,0 +1,43 @@
+using SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Security.Principal;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Aucma.Scada.Model.domain
+{
+ [SugarTable("BASE_MATERIALINFO")]
+ public class BaseMaterialInfo
+ {
+ ///
+ /// 主键标识
+ ///
+ [SugarColumn(ColumnName = "OBJ_ID", IsPrimaryKey = true, IsIdentity = true)]
+ public int ObjId { get; set; }
+
+ ///
+ /// 物料编号
+ ///
+ [SugarColumn(ColumnName = "MATERIAL_CODE")]
+ public string MaterialCode { get; set; }
+
+ ///
+ /// 物料名称
+ ///
+ [SugarColumn(ColumnName = "MATERIAL_NAME")]
+ public string MaterialName { get; set; }
+ ///
+ /// 物料小类
+ ///
+ [SugarColumn(ColumnName = "MATERIAL_SUBCLASS")]
+ public string MaterialSubclass { get; set; }
+
+ ///
+ /// 物料sap类型,FERT成品
+ ///
+ [SugarColumn(ColumnName = "MATERIAL_TYPE")]
+ public string MaterialType { get; set; }
+ }
+}
diff --git a/Aucma.Scada.Model/domain/BaseSpaceInfo.cs b/Aucma.Scada.Model/domain/BaseSpaceInfo.cs
index e943681..7c55e0f 100644
--- a/Aucma.Scada.Model/domain/BaseSpaceInfo.cs
+++ b/Aucma.Scada.Model/domain/BaseSpaceInfo.cs
@@ -51,7 +51,7 @@ namespace Aucma.Scada.Model.domain
public int spaceType { get; set; }
///
- /// 物料类型
+ /// 物料类型A
///
[SugarColumn(ColumnName = "MATERIAL_TYPE")]
public string materialType { get; set; }
@@ -97,5 +97,32 @@ namespace Aucma.Scada.Model.domain
///
[SugarColumn(ColumnName = "UNUSUAL_FLAG")]
public int unusualFlag { get; set; }
+
+ ///
+ /// 物料类型B
+ ///
+ [SugarColumn(ColumnName = "TYPE_CODE_B")]
+ public string typeCodeB { get; set; }
+ ///
+ /// 物料类型C
+ ///
+ [SugarColumn(ColumnName = "TYPE_CODE_C")]
+ public string typeCodeC { get; set; }
+ ///
+ /// 物料类型(名称)A
+ ///
+ [SugarColumn(ColumnName = "TYPE_NAME_A")]
+ public string typeNameA { get; set; }
+ ///
+ /// 物料类型(名称)B
+ ///
+ [SugarColumn(ColumnName = "TYPE_NAME_B")]
+ public string typeNameB { get; set; }
+ ///
+ /// 物料类型(名称)C
+ ///
+ [SugarColumn(ColumnName = "TYPE_NAME_C")]
+ public string typeNameC { get; set; }
+
}
}
diff --git a/Aucma.Scada.UI/Aucma.Scada.UI.csproj b/Aucma.Scada.UI/Aucma.Scada.UI.csproj
index 05b1cfb..960ef23 100644
--- a/Aucma.Scada.UI/Aucma.Scada.UI.csproj
+++ b/Aucma.Scada.UI/Aucma.Scada.UI.csproj
@@ -126,6 +126,9 @@
MaterialStatisticsWindow.xaml
+
+ SelectType.xaml
+
ShellInventory.xaml
@@ -152,6 +155,7 @@
+
@@ -207,6 +211,10 @@
Designer
MSBuild:Compile
+
+ Designer
+ MSBuild:Compile
+
Designer
MSBuild:Compile
diff --git a/Aucma.Scada.UI/MainWindow.xaml b/Aucma.Scada.UI/MainWindow.xaml
index f1c2674..81713af 100644
--- a/Aucma.Scada.UI/MainWindow.xaml
+++ b/Aucma.Scada.UI/MainWindow.xaml
@@ -38,14 +38,19 @@
-
+
+
+
+
+
+
+
+
diff --git a/Aucma.Scada.UI/Page/AssemblyPlan/PlanInfoEditWindow.xaml b/Aucma.Scada.UI/Page/AssemblyPlan/PlanInfoEditWindow.xaml
index a8d41eb..b65304a 100644
--- a/Aucma.Scada.UI/Page/AssemblyPlan/PlanInfoEditWindow.xaml
+++ b/Aucma.Scada.UI/Page/AssemblyPlan/PlanInfoEditWindow.xaml
@@ -144,7 +144,7 @@
Foreground="#FFFFFF" SelectedItem="{Binding SelectedDataItem}" MouseLeftButtonDown="dataGrid_MouseLeftButtonDown">
-
+
diff --git a/Aucma.Scada.UI/Page/InventoryInfo/LinerInventory.xaml b/Aucma.Scada.UI/Page/InventoryInfo/LinerInventory.xaml
index edb045e..ea4d270 100644
--- a/Aucma.Scada.UI/Page/InventoryInfo/LinerInventory.xaml
+++ b/Aucma.Scada.UI/Page/InventoryInfo/LinerInventory.xaml
@@ -129,7 +129,7 @@
-
+
@@ -161,7 +161,9 @@
-
+
diff --git a/Aucma.Scada.UI/Page/InventoryInfo/SelectType.xaml b/Aucma.Scada.UI/Page/InventoryInfo/SelectType.xaml
new file mode 100644
index 0000000..015305f
--- /dev/null
+++ b/Aucma.Scada.UI/Page/InventoryInfo/SelectType.xaml
@@ -0,0 +1,134 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Aucma.Scada.UI/Page/InventoryInfo/SelectType.xaml.cs b/Aucma.Scada.UI/Page/InventoryInfo/SelectType.xaml.cs
new file mode 100644
index 0000000..fa83fc1
--- /dev/null
+++ b/Aucma.Scada.UI/Page/InventoryInfo/SelectType.xaml.cs
@@ -0,0 +1,42 @@
+using Aucma.Scada.UI.viewModel.InventoryInfo;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Shapes;
+
+namespace Aucma.Scada.UI.Page.InventoryInfo
+{
+ ///
+ /// SelectType.xaml 的交互逻辑
+ ///
+ public partial class SelectType : Window
+ {
+ private SelectTypeViewModel viewModel = null;
+ public SelectType(int ncount, string spaceCode)
+ {
+ InitializeComponent();
+ viewModel = new SelectTypeViewModel(ncount, spaceCode);
+ this.DataContext = viewModel;
+ viewModel.closeEvent += closeWindow;
+ }
+
+ private void DataGrid_SelectionChanged(object sender, SelectionChangedEventArgs e)
+ {
+ viewModel.MouseClick(sender);
+ }
+
+ private void closeWindow()
+ {
+ this.Close();
+ }
+ }
+}
diff --git a/Aucma.Scada.UI/Page/InventoryInfo/ShellInventory.xaml b/Aucma.Scada.UI/Page/InventoryInfo/ShellInventory.xaml
index de25800..2a44de6 100644
--- a/Aucma.Scada.UI/Page/InventoryInfo/ShellInventory.xaml
+++ b/Aucma.Scada.UI/Page/InventoryInfo/ShellInventory.xaml
@@ -130,7 +130,7 @@
-
+
@@ -162,7 +162,9 @@
-
+
diff --git a/Aucma.Scada.UI/bin/Debug/Aucma.Scada.Business.dll b/Aucma.Scada.UI/bin/Debug/Aucma.Scada.Business.dll
index 58f876f..a97eca5 100644
Binary files a/Aucma.Scada.UI/bin/Debug/Aucma.Scada.Business.dll and b/Aucma.Scada.UI/bin/Debug/Aucma.Scada.Business.dll differ
diff --git a/Aucma.Scada.UI/bin/Debug/Aucma.Scada.Business.pdb b/Aucma.Scada.UI/bin/Debug/Aucma.Scada.Business.pdb
index 055ab57..5122184 100644
Binary files a/Aucma.Scada.UI/bin/Debug/Aucma.Scada.Business.pdb and b/Aucma.Scada.UI/bin/Debug/Aucma.Scada.Business.pdb differ
diff --git a/Aucma.Scada.UI/bin/Debug/Aucma.Scada.HikRobot.dll b/Aucma.Scada.UI/bin/Debug/Aucma.Scada.HikRobot.dll
index d9b8d2c..c5eb488 100644
Binary files a/Aucma.Scada.UI/bin/Debug/Aucma.Scada.HikRobot.dll and b/Aucma.Scada.UI/bin/Debug/Aucma.Scada.HikRobot.dll differ
diff --git a/Aucma.Scada.UI/bin/Debug/Aucma.Scada.HikRobot.pdb b/Aucma.Scada.UI/bin/Debug/Aucma.Scada.HikRobot.pdb
index 6056f31..03c793d 100644
Binary files a/Aucma.Scada.UI/bin/Debug/Aucma.Scada.HikRobot.pdb and b/Aucma.Scada.UI/bin/Debug/Aucma.Scada.HikRobot.pdb differ
diff --git a/Aucma.Scada.UI/bin/Debug/Aucma.Scada.Model.dll b/Aucma.Scada.UI/bin/Debug/Aucma.Scada.Model.dll
index ad579f4..289dba9 100644
Binary files a/Aucma.Scada.UI/bin/Debug/Aucma.Scada.Model.dll and b/Aucma.Scada.UI/bin/Debug/Aucma.Scada.Model.dll differ
diff --git a/Aucma.Scada.UI/bin/Debug/Aucma.Scada.Model.pdb b/Aucma.Scada.UI/bin/Debug/Aucma.Scada.Model.pdb
index 2f9d099..bb1c5b3 100644
Binary files a/Aucma.Scada.UI/bin/Debug/Aucma.Scada.Model.pdb and b/Aucma.Scada.UI/bin/Debug/Aucma.Scada.Model.pdb differ
diff --git a/Aucma.Scada.UI/bin/Debug/Aucma.Scada.UI.exe b/Aucma.Scada.UI/bin/Debug/Aucma.Scada.UI.exe
index 7b1f842..4dcffab 100644
Binary files a/Aucma.Scada.UI/bin/Debug/Aucma.Scada.UI.exe and b/Aucma.Scada.UI/bin/Debug/Aucma.Scada.UI.exe differ
diff --git a/Aucma.Scada.UI/bin/Debug/Aucma.Scada.UI.pdb b/Aucma.Scada.UI/bin/Debug/Aucma.Scada.UI.pdb
index 6003154..01e9a28 100644
Binary files a/Aucma.Scada.UI/bin/Debug/Aucma.Scada.UI.pdb and b/Aucma.Scada.UI/bin/Debug/Aucma.Scada.UI.pdb differ
diff --git a/Aucma.Scada.UI/bin/Debug/HighWayIot.Config.dll b/Aucma.Scada.UI/bin/Debug/HighWayIot.Config.dll
index ab4c9d8..a9bb518 100644
Binary files a/Aucma.Scada.UI/bin/Debug/HighWayIot.Config.dll and b/Aucma.Scada.UI/bin/Debug/HighWayIot.Config.dll differ
diff --git a/Aucma.Scada.UI/bin/Debug/HighWayIot.Config.pdb b/Aucma.Scada.UI/bin/Debug/HighWayIot.Config.pdb
index 0322de1..17d6959 100644
Binary files a/Aucma.Scada.UI/bin/Debug/HighWayIot.Config.pdb and b/Aucma.Scada.UI/bin/Debug/HighWayIot.Config.pdb differ
diff --git a/Aucma.Scada.UI/bin/Debug/HighWayIot.Repository.dll b/Aucma.Scada.UI/bin/Debug/HighWayIot.Repository.dll
index 0b08b08..5dbf48b 100644
Binary files a/Aucma.Scada.UI/bin/Debug/HighWayIot.Repository.dll and b/Aucma.Scada.UI/bin/Debug/HighWayIot.Repository.dll differ
diff --git a/Aucma.Scada.UI/bin/Debug/HighWayIot.Repository.pdb b/Aucma.Scada.UI/bin/Debug/HighWayIot.Repository.pdb
index 7564a7c..fb56bc9 100644
Binary files a/Aucma.Scada.UI/bin/Debug/HighWayIot.Repository.pdb and b/Aucma.Scada.UI/bin/Debug/HighWayIot.Repository.pdb differ
diff --git a/Aucma.Scada.UI/bin/Debug/config/App.Ini b/Aucma.Scada.UI/bin/Debug/config/App.Ini
index ae151a4..0897ba5 100644
--- a/Aucma.Scada.UI/bin/Debug/config/App.Ini
+++ b/Aucma.Scada.UI/bin/Debug/config/App.Ini
@@ -1,7 +1,7 @@
[system]
#ݿ
-mesConnStr=Data Source=175.27.215.92/helowin;User ID=aucma_mes;Password=aucma
-scadaConnStr=Data Source=175.27.215.92/helowin;User ID=aucma_scada;Password=aucma
+mesConnStr=Data Source=10.100.72.20/ORCLCDB;User ID=c##aucma_mes;Password=aucma
+scadaConnStr=Data Source=10.100.72.20/ORCLCDB;User ID=c##aucma_scada;Password=aucma
#λ
stationCode=1002
@@ -9,9 +9,9 @@ stationCode=1002
stationName=ڵװ
#ǿ
-shellStoreCode=XKJCK-001
+shellStoreCode=XKK-001
#ڵ
-linerStoreCode=NDJCK-001
+linerStoreCode=NDK-001
#ͱ
shellMaterialType =400
diff --git a/Aucma.Scada.UI/bin/Debug/config/Plc.Ini b/Aucma.Scada.UI/bin/Debug/config/Plc.Ini
index ba20d71..17a9d47 100644
--- a/Aucma.Scada.UI/bin/Debug/config/Plc.Ini
+++ b/Aucma.Scada.UI/bin/Debug/config/Plc.Ini
@@ -8,7 +8,7 @@
[shell_inStore_address]
=D7000
Ӧ=D7010
-=D7020
+
#ڵַ
[liner_inStore_address]
=D7000
diff --git a/Aucma.Scada.UI/bin/Debug/config/PlcSpace.Ini b/Aucma.Scada.UI/bin/Debug/config/PlcSpace.Ini
index b1c7ed0..15aab8b 100644
--- a/Aucma.Scada.UI/bin/Debug/config/PlcSpace.Ini
+++ b/Aucma.Scada.UI/bin/Debug/config/PlcSpace.Ini
@@ -1,63 +1,63 @@
#ǿϢ Ƿ=D7221 ״̬=D7231 ֿ״̬=D7300 #豸״̬,0δ״̬,1Զ,2ά״̬,ֹ
-[XKJCK-001_XK_001]
+[XKK-001_XK_001]
ڿ=D7201
;=D7211
=D7021
=D7240
-[XKJCK-001_XK_002]
+[XKK-001_XK_002]
ڿ=D7202
;=D7212
=D7022
=D7240
-[XKJCK-001_XK_003]
+[XKK-001_XK_003]
ڿ=D7203
;=D7213
=D7023
=D7240
-[XKJCK-001_XK_004]
+[XKK-001_XK_004]
ڿ=D7204
;=D7214
=D7024
=D7240
-[XKJCK-001_XK_005]
+[XKK-001_XK_005]
ڿ=D7205
;=D7215
=D7025
=D7240
-[XKJCK-001_XK_006]
+[XKK-001_XK_006]
ڿ=D7206
;=D7216
=D7026
=D7240
#ڵϢ
-[NDJCK-001_ND_001]
+[NDK-001_ND_001]
ڿ=D7201
;=D7211
=D7021
=D7240
-[NDJCK-001_ND_002]
+[NDK-001_ND_002]
ڿ=D7202
;=D7212
=D7022
=D7240
-[NDJCK-001_ND_003]
+[NDK-001_ND_003]
ڿ=D7203
;=D7213
=D7023
=D7240
-[NDJCK-001_ND_004]
+[NDK-001_ND_004]
ڿ=D7204
;=D7214
=D7024
=D7240
-[NDJCK-001_ND_005]
+[NDK-001_ND_005]
ڿ=D7205
;=D7215
=D7025
=D7240
-[NDJCK-001_ND_006]
+[NDK-001_ND_006]
ڿ=D7206
;=D7216
=D7026
diff --git a/Aucma.Scada.UI/viewModel/AssemblyPlan/QuantityIssuedViewModel.cs b/Aucma.Scada.UI/viewModel/AssemblyPlan/QuantityIssuedViewModel.cs
index 018064c..d60f5c6 100644
--- a/Aucma.Scada.UI/viewModel/AssemblyPlan/QuantityIssuedViewModel.cs
+++ b/Aucma.Scada.UI/viewModel/AssemblyPlan/QuantityIssuedViewModel.cs
@@ -61,7 +61,7 @@ namespace Aucma.Scada.UI.viewModel.AssemblyPlan
var productPlanInfo = _PlanInfo;
if(productPlanInfo != null)
- {
+ { // 8302501428
var materialType = productPlanInfo.materialCode;
bool shellResult = assemblyPlanBusiness.JudgmentStock(productPlanInfo, Convert.ToInt32(_TransmitAmount), appConfig.shellMaterialType,appConfig.shellStoreCode);
diff --git a/Aucma.Scada.UI/viewModel/InventoryInfo/LinerInventoryViewModel.cs b/Aucma.Scada.UI/viewModel/InventoryInfo/LinerInventoryViewModel.cs
index e9a4b01..2c8a2af 100644
--- a/Aucma.Scada.UI/viewModel/InventoryInfo/LinerInventoryViewModel.cs
+++ b/Aucma.Scada.UI/viewModel/InventoryInfo/LinerInventoryViewModel.cs
@@ -31,6 +31,10 @@ namespace Aucma.Scada.UI.viewModel.InventoryInfo
{
#region 事件绑定
+
+ // 设置型号
+ SubmitCommand = new RelayCommand(obj => SubmitCommandExecute(obj));
+
UpdateInStoreFlagCommand = new RelayCommand