diff --git a/WcsMain/Business/Convey/HistoryDataHandler/HisGetData/StackerInErr.cs b/WcsMain/Business/Convey/HistoryDataHandler/HisGetData/StackerInErr.cs
index 355471c..c73d679 100644
--- a/WcsMain/Business/Convey/HistoryDataHandler/HisGetData/StackerInErr.cs
+++ b/WcsMain/Business/Convey/HistoryDataHandler/HisGetData/StackerInErr.cs
@@ -31,7 +31,7 @@ public class StackerInErr(ConveyOperation conveyOperation, DataBaseData dataBase
public void ReadFail(string? disPlayName, string msg, string? area, AppRouterMethod routerMethodData)
{
int plcId = _dataBaseData.GetNewPlcTaskId() ?? StaticData.StaticInt.ErrPlcId;
- ConveyPLCTask plcTask = new(plcId, (short)ConveyRouterEnum.NoRead);
+ ConveyPLCTask plcTask = new(plcId, (short)ConveyRouterEnum.Go);
string errText = _conveyOperation.WriteTask(area, plcTask);
if (string.IsNullOrEmpty(errText))
{
diff --git a/WcsMain/Business/Convey/HistoryDataHandler/HisGetData/StackerOutC1.cs b/WcsMain/Business/Convey/HistoryDataHandler/HisGetData/StackerOutC1.cs
new file mode 100644
index 0000000..68a872b
--- /dev/null
+++ b/WcsMain/Business/Convey/HistoryDataHandler/HisGetData/StackerOutC1.cs
@@ -0,0 +1,144 @@
+using WcsMain.Business.Convey.HistoryDataHandler.HisGetData.I;
+using WcsMain.Common;
+using WcsMain.DataBase.Dao;
+using WcsMain.DataBase.TableEntity;
+using WcsMain.DataService;
+using WcsMain.Enum.Convey;
+using WcsMain.EquipOperation.Convey;
+using WcsMain.EquipOperation.Entity;
+using WcsMain.ExtendMethod;
+
+namespace WcsMain.Business.Convey.HistoryDataHandler.HisGetData;
+
+///
+/// 出库分流扫码器 C1
+///
+///
+/// 有异常的或者只有 6789站台拣选的去往二层
+///
+public class StackerOutC1(ConveyOperation conveyOperation, DataBaseData dataBaseData, AppConveyTaskDao conveyTaskDao) : IBaseGetData
+{
+ private readonly ConveyOperation _conveyOperation = conveyOperation;
+ private readonly DataBaseData _dataBaseData = dataBaseData;
+ private readonly AppConveyTaskDao _conveyTaskDao = conveyTaskDao;
+
+
+ ///
+ /// 读码失败
+ ///
+ ///
+ ///
+ ///
+ ///
+ public void ReadFail(string? disPlayName, string msg, string? area, AppRouterMethod routerMethodData)
+ {
+ int plcId = _dataBaseData.GetNewPlcTaskId() ?? StaticData.StaticInt.ErrPlcId;
+ ConveyPLCTask plcTask = new(plcId, (short)ConveyRouterEnum.Move);
+ string errText = _conveyOperation.WriteTask(area, plcTask);
+ if (string.IsNullOrEmpty(errText))
+ {
+ ConsoleLog.Success($"出库分流:{area} 读码失败,写入PLC成功,{plcTask}");
+ return;
+ }
+ ConsoleLog.Warning($"【警告】出库分流:{area} 读码失败,写入PLC失败,{plcTask},信息:{errText}");
+ return;
+ }
+
+ ///
+ /// 读码成功
+ ///
+ ///
+ ///
+ ///
+ ///
+ public void ReadSuccess(string? disPlayName, string msg, string? area, AppRouterMethod routerMethodData)
+ {
+ int plcId = _dataBaseData.GetNewPlcTaskId() ?? StaticData.StaticInt.ErrPlcId; // 获取一个 plcId
+ (string code, string direction) = msg.FormatDir();
+ /* 判断方向是否正确 */
+ string? routerDirection = routerMethodData.AllowDirection;
+ if (!string.IsNullOrEmpty(routerDirection))
+ {
+ string[] dirs = routerDirection.Split(',');
+ if (!dirs.Contains(direction))
+ {
+ ConsoleLog.Warning($"【警告】出库分流:{area} 箱码:{msg} 方向:{direction} 方向不正确,允许的方向为:{routerDirection}");
+ ConveyPLCTask plcTask = new(plcId, (short)ConveyRouterEnum.Move);
+ string errText = _conveyOperation.WriteTask(area, plcTask);
+ if (string.IsNullOrEmpty(errText))
+ {
+ ConsoleLog.Success($"出库分流:{area} 箱码:{msg},写入PLC成功,{plcTask}");
+ return;
+ }
+ ConsoleLog.Warning($"【警告】出库分流:{area} 箱码:{msg},写入PLC失败,{plcTask},信息:{errText}");
+ return;
+ }
+ }
+ /* 判断条码有没有拣选任务 */
+ List? conveyTasks = _conveyTaskDao.Query(new AppConveyTask { VehicleNo = code, TaskStatus = (int)ConveyTaskStatusEnum.create });
+ if(conveyTasks == default)
+ {
+ ConsoleLog.Warning($"【警告】出库分流:{area} 箱码:{msg} 查询任务失败,和服务器连接中断");
+ ConveyPLCTask plcTask = new(plcId, (short)ConveyRouterEnum.Go); // 连接中断去往拣选站台
+ string errText = _conveyOperation.WriteTask(area, plcTask);
+ if (string.IsNullOrEmpty(errText))
+ {
+ ConsoleLog.Success($"出库分流:{area} 箱码:{msg},写入PLC成功,{plcTask}");
+ return;
+ }
+ ConsoleLog.Warning($"【警告】出库分流:{area} 箱码:{msg},写入PLC失败,{plcTask},信息:{errText}");
+ return;
+ }
+ if(conveyTasks.Count < 1)
+ {
+ ConsoleLog.Warning($"【警告】出库分流:{area} 箱码:{msg} 无拣选任务");
+ ConveyPLCTask plcTask = new(plcId, (short)ConveyRouterEnum.Move);
+ string errText = _conveyOperation.WriteTask(area, plcTask);
+ if (string.IsNullOrEmpty(errText))
+ {
+ ConsoleLog.Success($"出库分流:{area} 箱码:{msg},写入PLC成功,{plcTask}");
+ return;
+ }
+ ConsoleLog.Warning($"【警告】出库分流:{area} 箱码:{msg},写入PLC失败,{plcTask},信息:{errText}");
+ return;
+ }
+ /* 检查是不是有 1~5 站台(pick1 区域)的拣选任务,若有则不移栽,走下层 */
+ List pick1Stand = CommonData.AppConveyStands.FindAll(f => f.StandType == (int)ConveyStandTypeEnum.pick && f.Area == "pick1");
+ List pick1Stands = pick1Stand.Select(f => f.StandId).ToList();
+ bool exists = false; // 默认不存在 1~5 站台(pick1 区域) 任务
+ foreach (var conveyTask in conveyTasks)
+ {
+ if (pick1Stands.Contains(conveyTask.Location))
+ {
+ exists = true;
+ break;
+ }
+ }
+ if(exists) // 存在该区域任务 1~5 站台(pick1 区域)
+ {
+ ConsoleLog.Info($"出库分流:{area} 箱码:{msg} 存在 1~5 站台任务");
+ ConveyPLCTask plcTask = new(plcId, (short)ConveyRouterEnum.Go); // 连接中断去往拣选站台
+ string errText = _conveyOperation.WriteTask(area, plcTask);
+ if (string.IsNullOrEmpty(errText))
+ {
+ ConsoleLog.Success($"出库分流:{area} 箱码:{msg},写入PLC成功,{plcTask}");
+ return;
+ }
+ ConsoleLog.Warning($"【警告】出库分流:{area} 箱码:{msg},写入PLC失败,{plcTask},信息:{errText}");
+ return;
+ }
+ else // 6~9 站台(pick2 区域)
+ {
+ ConsoleLog.Info($"出库分流:{area} 箱码:{msg} 不存在 1~5 站台任务");
+ ConveyPLCTask plcTask = new(plcId, (short)ConveyRouterEnum.Move);
+ string errText = _conveyOperation.WriteTask(area, plcTask);
+ if (string.IsNullOrEmpty(errText))
+ {
+ ConsoleLog.Success($"出库分流:{area} 箱码:{msg},写入PLC成功,{plcTask}");
+ return;
+ }
+ ConsoleLog.Warning($"【警告】出库分流:{area} 箱码:{msg},写入PLC失败,{plcTask},信息:{errText}");
+ return;
+ }
+ }
+}
diff --git a/WcsMain/Common/CommonData.cs b/WcsMain/Common/CommonData.cs
index 20f80a5..da5a300 100644
--- a/WcsMain/Common/CommonData.cs
+++ b/WcsMain/Common/CommonData.cs
@@ -41,6 +41,12 @@ public static class CommonData
[NotNull]
public static List? AppElTags { get; set; }
+ ///
+ /// 输送线的站台
+ ///
+ [NotNull]
+ public static List? AppConveyStands { get; set; }
+
///
/// 指示是否连接PLC
diff --git a/WcsMain/DataBase/Dao/AppConveyStandDao.cs b/WcsMain/DataBase/Dao/AppConveyStandDao.cs
new file mode 100644
index 0000000..9d3e1a2
--- /dev/null
+++ b/WcsMain/DataBase/Dao/AppConveyStandDao.cs
@@ -0,0 +1,46 @@
+using WcsMain.Common;
+using WcsMain.DataBase.TableEntity;
+using WcsMain.WcsAttribute.AutoFacAttribute;
+
+namespace WcsMain.DataBase.Dao;
+
+
+[Component]
+public class AppConveyStandDao
+{
+ ///
+ /// 查询
+ ///
+ ///
+ ///
+ public List? Query(AppConveyStand conveyStand)
+ {
+ try
+ {
+ var sqlFuc = CommonTool.DbServe.Queryable()
+ .WhereIF(conveyStand.StandId != default, w => w.StandId == conveyStand.StandId)
+ .WhereIF(conveyStand.StandType != default, w => w.StandType == conveyStand.StandType)
+ .WhereIF(conveyStand.StandStatus != default, w => w.StandStatus == conveyStand.StandStatus)
+ .WhereIF(conveyStand.Area != default, w => w.Area == conveyStand.Area)
+ .WhereIF(conveyStand.VehicleNo != default, w => w.VehicleNo == conveyStand.VehicleNo)
+ .WhereIF(conveyStand.Tag != default, w => w.Tag == conveyStand.Tag)
+ .WhereIF(conveyStand.Remark != default, w => w.Remark == conveyStand.Remark);
+ return sqlFuc.ToList();
+ }
+ catch (Exception ex)
+ {
+ _ = ex;
+ return default;
+ }
+ }
+
+ ///
+ /// 查询所有
+ ///
+ ///
+ public List? Query() => Query(new AppConveyStand());
+
+
+
+
+}
diff --git a/WcsMain/DataBase/Dao/AppConveyTaskDao.cs b/WcsMain/DataBase/Dao/AppConveyTaskDao.cs
index 1a882e0..b62310f 100644
--- a/WcsMain/DataBase/Dao/AppConveyTaskDao.cs
+++ b/WcsMain/DataBase/Dao/AppConveyTaskDao.cs
@@ -1,4 +1,5 @@
-using WcsMain.Common;
+using System.Threading.Tasks;
+using WcsMain.Common;
using WcsMain.DataBase.TableEntity;
using WcsMain.WcsAttribute.AutoFacAttribute;
@@ -34,6 +35,41 @@ public class AppConveyTaskDao
}
+ ///
+ /// 条件查询
+ ///
+ ///
+ ///
+ public List? Query(AppConveyTask conveyTask)
+ {
+ try
+ {
+ var sqlFuc = CommonTool.DbServe.Queryable()
+ .WhereIF(conveyTask.TaskId != default, w => w.TaskId == conveyTask.TaskId)
+ .WhereIF(conveyTask.TaskGroup != default, w => w.TaskGroup == conveyTask.TaskGroup)
+ .WhereIF(conveyTask.VehicleNo != default, w => w.VehicleNo == conveyTask.VehicleNo)
+ .WhereIF(conveyTask.TaskType != default, w => w.TaskType == conveyTask.TaskType)
+ .WhereIF(conveyTask.TaskStatus != default, w => w.TaskStatus == conveyTask.TaskStatus)
+ .WhereIF(conveyTask.Location != default, w => w.Location == conveyTask.Location)
+ .WhereIF(conveyTask.ArriveLocation != default, w => w.ArriveLocation == conveyTask.ArriveLocation)
+ .WhereIF(conveyTask.CreatePerson != default, w => w.CreatePerson == conveyTask.CreatePerson)
+ .WhereIF(conveyTask.Remark != default, w => w.Remark == conveyTask.Remark);
+ return sqlFuc.ToList();
+ }
+ catch(Exception ex)
+ {
+ _ = ex;
+ return default;
+ }
+ }
+
+ ///
+ /// 查询所有
+ ///
+ ///
+ public List? Query() => Query(new AppConveyTask());
+
+
@@ -69,6 +105,54 @@ public class AppConveyTaskDao
return 0;
}
}
-
+
+ ///
+ /// 联表查询任务,带出站台号,区域
+ ///
+ ///
+ ///
+ public List? QueryWithStandInfo(AppConveyTask conveyTask)
+ {
+ try
+ {
+ var sqlFuc = CommonTool.DbServe.Queryable()
+ .WhereIF(conveyTask.TaskId != default, w => w.TaskId == conveyTask.TaskId)
+ .WhereIF(conveyTask.TaskGroup != default, w => w.TaskGroup == conveyTask.TaskGroup)
+ .WhereIF(conveyTask.VehicleNo != default, w => w.VehicleNo == conveyTask.VehicleNo)
+ .WhereIF(conveyTask.TaskType != default, w => w.TaskType == conveyTask.TaskType)
+ .WhereIF(conveyTask.TaskStatus != default, w => w.TaskStatus == conveyTask.TaskStatus)
+ .WhereIF(conveyTask.Location != default, w => w.Location == conveyTask.Location)
+ .WhereIF(conveyTask.ArriveLocation != default, w => w.ArriveLocation == conveyTask.ArriveLocation)
+ .WhereIF(conveyTask.CreatePerson != default, w => w.CreatePerson == conveyTask.CreatePerson)
+ .WhereIF(conveyTask.Remark != default, w => w.Remark == conveyTask.Remark)
+ .LeftJoin((ct, cs) => ct.Location == cs.StandId)
+ .OrderBy(ct => ct.CreateTime)
+ .Select((ct, cs) => new JoinAppConveyTaskAndAppConveyStand
+ {
+ TaskId = ct.TaskId,
+ TaskGroup = ct.TaskGroup,
+ VehicleNo = ct.VehicleNo,
+ TaskType = ct.TaskType,
+ TaskStatus = ct.TaskStatus,
+ Location = ct.Location,
+ ArriveLocation = ct.ArriveLocation,
+ CreatePerson = ct.CreatePerson,
+ CreateTime = ct.CreateTime,
+ MoveTime = ct.MoveTime,
+ CompleteTime = ct.CompleteTime,
+ Remark = ct.Remark,
+ StandId = cs.StandId,
+ StandType = cs.StandType,
+ });
+ return sqlFuc.ToList();
+ }
+ catch (Exception ex)
+ {
+ _ = ex;
+ return default;
+ }
+ }
+
+
}
diff --git a/WcsMain/DataBase/Dao/BsPickStandDao.cs b/WcsMain/DataBase/Dao/BsPickStandDao.cs
deleted file mode 100644
index 3fc2de3..0000000
--- a/WcsMain/DataBase/Dao/BsPickStandDao.cs
+++ /dev/null
@@ -1,50 +0,0 @@
-using WcsMain.Common;
-using WcsMain.DataBase.TableEntity;
-using WcsMain.WcsAttribute.AutoFacAttribute;
-
-namespace WcsMain.DataBase.Dao;
-
-///
-/// tbl_bs_pick_stand 的操作类
-///
-[Component]
-public class BsPickStandDao
-{
-
- ///
- /// 查询所有数据
- ///
- ///
- public List? Query() => Query(new BsPickStand());
-
- ///
- /// 根据条件查询数据
- ///
- ///
- ///
- public List? Query(BsPickStand queryEntity)
- {
- try
- {
- var sqlFUc = CommonTool.DbServe.Queryable()
- .WhereIF(!string.IsNullOrEmpty(queryEntity.PickStand), w => w.PickStand == queryEntity.PickStand)
- .WhereIF(queryEntity.StandType != default, w => w.StandType == queryEntity.StandType)
- .WhereIF(queryEntity.StandStatus != default, w => w.StandStatus == queryEntity.StandStatus)
- .OrderBy(o => o.PickStand);
- return sqlFUc.ToList();
- }
- catch (Exception ex)
- {
- _ = ex;
- return default;
- }
-
-
-
-
-
- }
-
-
-
-}
\ No newline at end of file
diff --git a/WcsMain/DataBase/TableEntity/AppConveyStand.cs b/WcsMain/DataBase/TableEntity/AppConveyStand.cs
new file mode 100644
index 0000000..1b741fc
--- /dev/null
+++ b/WcsMain/DataBase/TableEntity/AppConveyStand.cs
@@ -0,0 +1,56 @@
+using SqlSugar;
+
+namespace WcsMain.DataBase.TableEntity;
+
+
+///
+/// 输送线 站台 表
+///
+[SugarTable("tbl_app_convey_stand")]
+public class AppConveyStand
+{
+ ///
+ /// 站台号
+ ///
+ [SugarColumn(IsPrimaryKey = true, ColumnName = "stand_id")]
+ public string? StandId { get; set; }
+
+ ///
+ /// 站台类型
+ ///
+ [SugarColumn(ColumnName = "stand_type")]
+ public int? StandType { get; set; }
+
+ ///
+ /// 站台状态
+ ///
+ [SugarColumn(ColumnName = "stand_status")]
+ public int? StandStatus { get; set; }
+
+ ///
+ /// 区域
+ ///
+ [SugarColumn(ColumnName = "area")]
+ public string? Area { get; set; }
+
+ ///
+ /// 载具号
+ ///
+ [SugarColumn(ColumnName = "vehicle_no")]
+ public string? VehicleNo { get; set; }
+
+ ///
+ /// 标记
+ ///
+ [SugarColumn(ColumnName = "tag")]
+ public string? Tag { get; set; }
+
+ ///
+ /// 备注
+ ///
+ [SugarColumn(ColumnName = "remark")]
+ public string? Remark { get;set; }
+
+
+
+}
diff --git a/WcsMain/DataBase/TableEntity/BsPickStand.cs b/WcsMain/DataBase/TableEntity/BsPickStand.cs
deleted file mode 100644
index 11ab4ca..0000000
--- a/WcsMain/DataBase/TableEntity/BsPickStand.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-using SqlSugar;
-
-namespace WcsMain.DataBase.TableEntity;
-
-///
-/// 拣选站台信息
-///
-[SugarTable("tbl_bs_pick_stand")]
-public class BsPickStand
-{
- ///
- /// 拣选站台名称
- ///
- [SugarColumn(ColumnName = "pick_stand")]
- public string? PickStand { get; set; }
-
- ///
- /// 拣选站台类型
- ///
- [SugarColumn(ColumnName = "stand_type")]
- public int? StandType { get; set; }
-
- ///
- /// 站台状态
- ///
- [SugarColumn(ColumnName = "stand_status")]
- public int? StandStatus { get; set; }
-
-
-}
\ No newline at end of file
diff --git a/WcsMain/DataBase/TableEntity/JoinAppConveyTaskAndAppConveyStand.cs b/WcsMain/DataBase/TableEntity/JoinAppConveyTaskAndAppConveyStand.cs
new file mode 100644
index 0000000..a99b2cb
--- /dev/null
+++ b/WcsMain/DataBase/TableEntity/JoinAppConveyTaskAndAppConveyStand.cs
@@ -0,0 +1,98 @@
+using SqlSugar;
+
+namespace WcsMain.DataBase.TableEntity;
+
+
+///
+/// 联表查询
+///
+public class JoinAppConveyTaskAndAppConveyStand
+{
+
+ ///
+ /// 任务号
+ ///
+ [SugarColumn(ColumnName = "task_id")]
+ public string? TaskId { get; set; }
+
+ ///
+ /// 任务组
+ ///
+ [SugarColumn(ColumnName = "task_group")]
+ public string? TaskGroup { get; set; }
+
+ ///
+ /// 载具号
+ ///
+ [SugarColumn(ColumnName = "vehicle_no")]
+ public string? VehicleNo { get; set; }
+
+ ///
+ /// 任务类型
+ ///
+ [SugarColumn(ColumnName = "task_type")]
+ public int? TaskType { get; set; }
+
+ ///
+ /// 任务状态
+ ///
+ [SugarColumn(ColumnName = "task_status")]
+ public int? TaskStatus { get; set; }
+
+ ///
+ /// 点位
+ ///
+ [SugarColumn(ColumnName = "location")]
+ public string? Location { get; set; }
+
+
+ ///
+ /// 实际到达的点位
+ ///
+ [SugarColumn(ColumnName = "arrive_location")]
+ public string? ArriveLocation { get; set; }
+
+ ///
+ /// 创建人
+ ///
+ [SugarColumn(ColumnName = "create_person")]
+ public string? CreatePerson { get; set; }
+
+ ///
+ /// 创建时间
+ ///
+ [SugarColumn(ColumnName = "create_time")]
+ public DateTime? CreateTime { get; set; }
+
+ ///
+ /// 移栽时间
+ ///
+ [SugarColumn(ColumnName = "move_time")]
+ public DateTime? MoveTime { get; set; }
+
+ ///
+ /// 完成时间
+ ///
+ [SugarColumn(ColumnName = "complete_time")]
+ public DateTime? CompleteTime { get; set; }
+
+ ///
+ /// 备注信息
+ ///
+ [SugarColumn(ColumnName = "remark")]
+ public string? Remark { get; set; }
+
+
+
+ ///
+ /// 站台号
+ ///
+ [SugarColumn(ColumnName = "stand_id")]
+ public string? StandId { get; set; }
+
+ ///
+ /// 站台类型
+ ///
+ [SugarColumn(ColumnName = "stand_type")]
+ public int? StandType { get; set; }
+}
diff --git a/WcsMain/Enum/Convey/ConveyStandTypeEnum.cs b/WcsMain/Enum/Convey/ConveyStandTypeEnum.cs
new file mode 100644
index 0000000..f954bd3
--- /dev/null
+++ b/WcsMain/Enum/Convey/ConveyStandTypeEnum.cs
@@ -0,0 +1,16 @@
+using WcsMain.Business.Convey.DataHandler.GetRouter;
+
+namespace WcsMain.Enum.Convey;
+
+///
+/// 箱式线站台类型
+///
+public enum ConveyStandTypeEnum
+{
+ pick = 1, // 拣选
+ send = 2, // 发货
+ receive = 3, // 收货
+ check = 4, // 复核
+
+
+}
diff --git a/WcsMain/StartAction/ServiceStart.cs b/WcsMain/StartAction/ServiceStart.cs
index 7c3f4bf..796a55d 100644
--- a/WcsMain/StartAction/ServiceStart.cs
+++ b/WcsMain/StartAction/ServiceStart.cs
@@ -19,7 +19,7 @@ namespace WcsMain.StartAction;
[Component]
public class ServiceStart(WcsCirculation wcsCirculation, ConnectPLCs connectPLCs, SocketOperation socketOperation,
AppStackerDao appStackerDao, AppLocationDao appLocationDao, AppConfigDao appConfigDao, ConnectPlcServe connectPlcServe,
- ConnectOprServe connectOprServe, AppElTagBaseDao appElTagBaseDao)
+ ConnectOprServe connectOprServe, AppElTagBaseDao appElTagBaseDao, AppConveyStandDao conveyStandDao)
{
private readonly AppConfigDao _appconfigDao = appConfigDao;
private readonly AppLocationDao _applocationDao = appLocationDao;
@@ -30,6 +30,7 @@ public class ServiceStart(WcsCirculation wcsCirculation, ConnectPLCs connectPLCs
private readonly ConnectPlcServe _connectPlcServe = connectPlcServe;
private readonly ConnectOprServe _connectOprServe = connectOprServe;
private readonly AppElTagBaseDao _appElTagBaseDao = appElTagBaseDao;
+ private readonly AppConveyStandDao _conveyStandDao = conveyStandDao;
private static string _errMsg = string.Empty;
@@ -42,6 +43,7 @@ public class ServiceStart(WcsCirculation wcsCirculation, ConnectPLCs connectPLCs
LoadingStackerData(); // 加载数据库中的堆垛机信息
LoadingLocationData(); // 加载数据库中的库位信息
LoadElTagBase(); // 加载电子标签基础资料
+ LoadConveyStand(); // 加载输送线站台基础资料
if (!string.IsNullOrEmpty(_errMsg))
{
@@ -133,7 +135,7 @@ public class ServiceStart(WcsCirculation wcsCirculation, ConnectPLCs connectPLCs
public void LoadingConfig()
{
if (!string.IsNullOrEmpty(_errMsg)) return;
- ConsoleLog.Info("正在加载数据库配置信息...");
+ //ConsoleLog.Info("正在加载数据库配置信息...");
List? Configs = _appconfigDao.Query();
if (Configs == default)
{
@@ -168,7 +170,7 @@ public class ServiceStart(WcsCirculation wcsCirculation, ConnectPLCs connectPLCs
public void LoadingStackerData()
{
if (!string.IsNullOrEmpty(_errMsg)) return;
- ConsoleLog.Info("正在加载堆垛机参数信息...");
+ //ConsoleLog.Info("正在加载堆垛机参数信息...");
List? appStackers = _appStackerDao.Select();
if (appStackers == default)
{
@@ -186,7 +188,7 @@ public class ServiceStart(WcsCirculation wcsCirculation, ConnectPLCs connectPLCs
public void LoadingLocationData()
{
if (!string.IsNullOrEmpty(_errMsg)) return;
- ConsoleLog.Info("正在加载库位信息...");
+ //ConsoleLog.Info("正在加载库位信息...");
List? appLocations = _applocationDao.Select();
if (appLocations == default)
{
@@ -203,7 +205,7 @@ public class ServiceStart(WcsCirculation wcsCirculation, ConnectPLCs connectPLCs
public void LoadElTagBase()
{
if (!string.IsNullOrEmpty(_errMsg)) return;
- ConsoleLog.Info("正在加载库位信息...");
+ //ConsoleLog.Info("正在电子标签基础资料信息...");
List? eltags = _appElTagBaseDao.Query();
if (eltags == default)
{
@@ -213,4 +215,22 @@ public class ServiceStart(WcsCirculation wcsCirculation, ConnectPLCs connectPLCs
}
CommonData.AppElTags = eltags;
}
+
+
+ ///
+ /// 加载输送线站台基础资料信息
+ ///
+ public void LoadConveyStand()
+ {
+ if (!string.IsNullOrEmpty(_errMsg)) return;
+ //ConsoleLog.Info("正在加载输送线基础资料信息...");
+ List? appConveyStands = _conveyStandDao.Query();
+ if (appConveyStands == default)
+ {
+ _errMsg = "加载输送线站台基础资料信息失败,请检查数据库服务器连接是否正常";
+ CommonData.AppConveyStands = [];
+ return;
+ }
+ CommonData.AppConveyStands = appConveyStands;
+ }
}
\ No newline at end of file