From b834b2c0977af30a5040c9b8416d930608fc845d Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期五, 06 三月 2026 16:27:58 +0800
Subject: [PATCH] 优化四向车接口
---
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/WIDESEAWCS_Tasks.csproj | 2
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_IBasicInfoService/IStationMangerService.cs | 6 +
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_ITaskInfoService/ITaskService.cs | 2
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskMethods.cs | 78 +++++++-----
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_BasicInfoService/StationMangerService.cs | 7 +
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/WMS/WMSController.cs | 2
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/KLSTaskMethods.cs | 10 +
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/.config/dotnet-tools.json | 12 ++
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/RgvCommand.cs | 3
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/RGV/FOURBOT/FOURBOToccupyStation.cs | 5
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/RGV/FOURBOT/FOURBOTTaskStatusNotify.cs | 9 +
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/WIDESEAWCS_TaskInfoService.csproj | 4
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/TestJob.cs | 52 +++-----
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/BasicInfo/Dt_StationManger.cs | 6
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Properties/PublishProfiles/FolderProfile.pubxml | 6
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/RGV/FOURBOT/FOURBOTNewMovePodTask.cs | 3
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/Task/RGVTaskExtend.cs | 53 ++++++--
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/RGVTaskMethods.cs | 25 ++-
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/Task/TaskJob.cs | 4
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs | 12 +
20 files changed, 191 insertions(+), 110 deletions(-)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_BasicInfoService/StationMangerService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_BasicInfoService/StationMangerService.cs"
index 1f1dba1..59a785e 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_BasicInfoService/StationMangerService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_BasicInfoService/StationMangerService.cs"
@@ -20,9 +20,14 @@
public IRepository<Dt_StationManger> Repository => BaseDal;
+ public Dt_StationManger GetStationInfo(string fromLocationCode)
+ {
+ return BaseDal.QueryFirst(x => x.StationCode == fromLocationCode);
+ }
+
public Dt_StationManger GetInStationInfo(string fromLocationCode)
{
- return BaseDal.QueryFirst(x => x.StationCode == fromLocationCode && x.StationType == StationTypeEnum.StationType_OnlyInbound.ObjToInt());
+ return BaseDal.QueryFirst(x => x.StationCode == fromLocationCode && (x.StationType == StationTypeEnum.StationType_OnlyInbound.ObjToInt() || x.StationType == StationTypeEnum.StationType_InboundAndOutbound.ObjToInt()));
}
/// <summary>
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/Task/RgvCommand.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/RgvCommand.cs"
similarity index 94%
rename from "\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/Task/RgvCommand.cs"
rename to "\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/RgvCommand.cs"
index 3458fcb..7e511ae 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/Task/RgvCommand.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/RgvCommand.cs"
@@ -3,9 +3,8 @@
using System.Linq;
using System.Text;
using System.Threading.Tasks;
-using WIDESEAWCS_QuartzJob.DeviceBase;
-namespace WIDESEAWCS_Tasks
+namespace WIDESEAWCS_Common
{
public enum QualityInspectionCommandEnum
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/RGV/FOURBOT/FOURBOTNewMovePodTask.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/RGV/FOURBOT/FOURBOTNewMovePodTask.cs"
index be0bafc..7497613 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/RGV/FOURBOT/FOURBOTNewMovePodTask.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/RGV/FOURBOT/FOURBOTNewMovePodTask.cs"
@@ -12,6 +12,9 @@
/// </summary>
public class FOURBOTnewMovePodTask
{
+ public string warehouseID { get; set; } = "HETU";
+ public string clientCode { get; set; } = "WCS";
+ public string requestID { get; set; } = DateTime.Now.ToString("yyyyMMddHHmmss");
/// <summary>
/// 浼樺厛绾�
/// </summary>
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/RGV/FOURBOT/FOURBOTTaskStatusNotify.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/RGV/FOURBOT/FOURBOTTaskStatusNotify.cs"
index 95f8cc7..cd57307 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/RGV/FOURBOT/FOURBOTTaskStatusNotify.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/RGV/FOURBOT/FOURBOTTaskStatusNotify.cs"
@@ -6,6 +6,15 @@
namespace WIDESEAWCS_DTO.RGV.FOURBOT
{
+ public class RGVReturnInfo
+ {
+ public long messageID { get; set; }
+ public int messageType { get; set; }
+ public string warehouseID { get; set; }
+ public string createTime { get; set; }
+ public FOURBOTTaskStatusNotify content { get; set; }
+ }
+
/// <summary>
/// 鍥涘悜杞︿换鍔$姸鎬佹洿鏂版秷鎭�
/// </summary>
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/RGV/FOURBOT/FOURBOToccupyStation.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/RGV/FOURBOT/FOURBOToccupyStation.cs"
index b6dffd9..e6c4dc5 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/RGV/FOURBOT/FOURBOToccupyStation.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/RGV/FOURBOT/FOURBOToccupyStation.cs"
@@ -15,6 +15,9 @@
/// 绔欑偣缂栫爜
/// </summary>
public string stationCode { get; set; }
+ public string warehouseID { get; set; } = "HETU";
+ public string clientCode { get; set; } = "WCS";
+ public string requestID { get; set; } = DateTime.Now.ToString("yyyyMMddHHmmss");
/// <summary>
/// 鎵樼洏鍙�
@@ -24,7 +27,7 @@
/// <summary>
/// 鎵樼洏瑙勬牸鍚嶇О
/// </summary>
- public string layoutID { get; set; }
+ public string layoutID { get; set; } = "609284257625407509";
/// <summary>
/// 鎵樼洏閲嶉噺(kg)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_IBasicInfoService/IStationMangerService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_IBasicInfoService/IStationMangerService.cs"
index e279a5c..c083eac 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_IBasicInfoService/IStationMangerService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_IBasicInfoService/IStationMangerService.cs"
@@ -13,6 +13,12 @@
{
public IRepository<Dt_StationManger> Repository { get; }
/// <summary>
+ /// 鑾峰彇绔欏彴淇℃伅
+ /// </summary>
+ /// <param name="fromLocationCode"></param>
+ /// <returns></returns>
+ Dt_StationManger GetStationInfo(string fromLocationCode);
+ /// <summary>
/// 鑾峰彇鍏ュ簱绔欏彴
/// </summary>
/// <param name="fromLocationCode"></param>
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_ITaskInfoService/ITaskService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_ITaskInfoService/ITaskService.cs"
index ab4439a..6412caf 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_ITaskInfoService/ITaskService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_ITaskInfoService/ITaskService.cs"
@@ -226,7 +226,7 @@
/// <param name="deviceTypeEnum"></param>
/// <param name="locationStatusEnum"></param>
/// <returns></returns>
- WebResponseContent UpdateLocationStatus(Dt_Task task, DeviceTypeEnum deviceTypeEnum, LocationStatusEnum locationStatusEnum);
+ WebResponseContent UpdateLocationStatus(string locationCode,string palletCode, DeviceTypeEnum deviceTypeEnum, LocationStatusEnum locationStatusEnum);
WebResponseContent ModifyWMSLayoutZone(WMSUpdateLocationArea wMSUpdateLocationArea);
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/BasicInfo/Dt_StationManger.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/BasicInfo/Dt_StationManger.cs"
index f1b351f..7f514e7 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/BasicInfo/Dt_StationManger.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/BasicInfo/Dt_StationManger.cs"
@@ -39,9 +39,9 @@
public int StationType { get; set; }
/// <summary>
- /// 瀵瑰簲鍥涘悜杞︾偣ID
+ /// 瀵瑰簲鍥涘悜杞﹀褰㈡娴嬬偣ID
/// </summary>
- [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "瀵瑰簲鍥涘悜杞︾偣ID")]
+ [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "瀵瑰簲鍥涘悜杞﹀褰㈡娴嬬偣ID")]
public string RGVStationCode { get; set; }
/// <summary>
@@ -69,7 +69,7 @@
[SugarColumn(IsNullable = false, ColumnDescription = "绔欏彴鏄惁鍙敤")]
public int IsOccupied { get; set; }
/// <summary>
- /// 澶囨敞(澶栧舰妫�娴嬬偣ID)
+ /// 澶囨敞
/// </summary>
[SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "澶囨敞")]
public string Remark { get; set; }
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/.config/dotnet-tools.json" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/.config/dotnet-tools.json"
new file mode 100644
index 0000000..08f38b7
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/.config/dotnet-tools.json"
@@ -0,0 +1,12 @@
+{
+ "version": 1,
+ "isRoot": true,
+ "tools": {
+ "dotnet-ef": {
+ "version": "10.0.3",
+ "commands": [
+ "dotnet-ef"
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/WMS/WMSController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/WMS/WMSController.cs"
index fdc28a3..87e0b50 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/WMS/WMSController.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/WMS/WMSController.cs"
@@ -99,7 +99,7 @@
/// </summary>
/// <param name="AreaCode">鍖哄煙鍙�</param>
/// <returns></returns>
- [HttpPost, Route("QueryStation"), AllowAnonymous]
+ [HttpGet, HttpPost, Route("QueryStation"), AllowAnonymous]
public WMSReturn QueryStation(string AreaCode)
{
WebResponseContent content = _taskService.LocationInquiry(AreaCode);
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Properties/PublishProfiles/FolderProfile.pubxml" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Properties/PublishProfiles/FolderProfile.pubxml"
index 36847ea..3232f23 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Properties/PublishProfiles/FolderProfile.pubxml"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Properties/PublishProfiles/FolderProfile.pubxml"
@@ -10,8 +10,12 @@
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<PublishProvider>FileSystem</PublishProvider>
- <PublishUrl>bin\Release\net6.0\publish\</PublishUrl>
+ <PublishUrl>E:\IISText\GaoPu</PublishUrl>
<WebPublishMethod>FileSystem</WebPublishMethod>
<_TargetId>Folder</_TargetId>
+ <SiteUrlToLaunchAfterPublish />
+ <TargetFramework>net6.0</TargetFramework>
+ <ProjectGuid>487fa45b-ea1a-4aca-bb5b-0f6708f462c0</ProjectGuid>
+ <SelfContained>false</SelfContained>
</PropertyGroup>
</Project>
\ No newline at end of file
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/KLSTaskMethods.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/KLSTaskMethods.cs"
index e842337..708abe3 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/KLSTaskMethods.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/KLSTaskMethods.cs"
@@ -119,7 +119,15 @@
#region 6 瑁佸壀閫佽揣
public WebResponseContent CJCarryTaske(TaskDTO taskDTO, int taskType)
{
- return WebResponseContent.Instance.OK();
+ try
+ {
+
+ return WebResponseContent.Instance.OK();
+ }
+ catch (Exception ex)
+ {
+ throw new Exception(ex.Message);
+ }
}
#endregion
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/RGVTaskMethods.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/RGVTaskMethods.cs"
index 6fcb806..055df4a 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/RGVTaskMethods.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/RGVTaskMethods.cs"
@@ -44,7 +44,7 @@
TaskType = taskType,
SourceAddress = taskDTO.fromLocationCode,
CurrentAddress = taskDTO.fromLocationCode,
- NextAddress = stationManger.Remark,//鎵惧叆搴撶珯鍙板搴旂殑澶栧舰妫�娴嬬紪鍙�
+ NextAddress = stationManger.RGVStationCode,//鎵惧叆搴撶珯鍙板搴旂殑澶栧舰妫�娴嬬紪鍙�
TargetAddress = "",
//Remark = taskDTO.toAreaCode,
Creater = "WMS",
@@ -58,8 +58,8 @@
}
catch (Exception ex)
{
- Db.Ado.RollbackTran();
- return WebResponseContent.Instance.Error(ex.Message);
+ //Db.Ado.RollbackTran();
+ throw new Exception(ex.Message);
}
}
/// <summary>
@@ -93,16 +93,23 @@
Creater = "WMS",
};
rGVLocationInfo.LocationStatus = LocationStatusEnum.OutLock.ObjToInt();
- Db.Ado.BeginTran();
- BaseDal.AddData(dt_Task);
- _rGVLocationInfoService.Repository.UpdateData(rGVLocationInfo);
- Db.Ado.CommitTran();
+ try
+ {
+ Db.Ado.BeginTran();
+ BaseDal.AddData(dt_Task);
+ _rGVLocationInfoService.Repository.UpdateData(rGVLocationInfo);
+ Db.Ado.CommitTran();
+ }
+ catch (Exception ex)
+ {
+ Db.Ado.RollbackTran();
+ throw new Exception(ex.Message);
+ }
return WebResponseContent.Instance.OK();
}
catch (Exception ex)
{
- Db.Ado.RollbackTran();
- return WebResponseContent.Instance.Error(ex.Message);
+ throw new Exception(ex.Message);
}
}
#endregion
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskMethods.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskMethods.cs"
index 618e8ce..58e2b7d 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskMethods.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskMethods.cs"
@@ -1,4 +1,5 @@
-锘縰sing Magicodes.IE.Core;
+锘縰sing Autofac.Core;
+using Magicodes.IE.Core;
using NetTaste;
using System;
using System.Collections.Generic;
@@ -18,6 +19,7 @@
using WIDESEAWCS_DTO.RGV.FOURBOT;
using WIDESEAWCS_DTO.WMS;
using WIDESEAWCS_Model.Models;
+using WIDESEAWCS_QuartzJob;
namespace WIDESEAWCS_TaskInfoService
{
@@ -37,13 +39,13 @@
WebResponseContent content = new WebResponseContent();
GALAXISUpdateTaskStatus gALAXIS = new();
- FOURBOTTaskStatusNotify Rgv = new();//鍥涘悜杞︿换鍔$姸鎬侀�氱煡
+ RGVReturnInfo Rgv = new();//鍥涘悜杞︿换鍔$姸鎬侀�氱煡
HIKROBOTTaskProcessReport hIKROBOT = new();//娴峰悍鏈哄櫒浜�
try
{
if (deviceTypeEnum == DeviceTypeEnum.GALAXIS)
{
- gALAXIS = TaskDTO.Serialize().DeserializeObject<GALAXISUpdateTaskStatus>();
+ gALAXIS = TaskDTO.Serialize().DeserializeObject<GALAXISUpdateTaskStatus>();
if (gALAXIS == null) throw new Exception("鍙傛暟杞崲澶辫触锛�");
var task = BaseDal.QueryFirst(x => x.WMSTaskNum == gALAXIS.taskId);
if (task == null) throw new Exception($"鏈壘鍒颁换鍔�,浠诲姟缂栧彿銆恵gALAXIS.taskId}銆�");
@@ -63,8 +65,8 @@
}
else if (deviceTypeEnum == DeviceTypeEnum.HIKROBOT)
{
- hIKROBOT=TaskDTO.Serialize().DeserializeObject<HIKROBOTTaskProcessReport>();
- if (hIKROBOT==null) throw new Exception("鍙傛暟杞崲澶辫触锛�");
+ hIKROBOT = TaskDTO.Serialize().DeserializeObject<HIKROBOTTaskProcessReport>();
+ if (hIKROBOT == null) throw new Exception("鍙傛暟杞崲澶辫触锛�");
var task = BaseDal.QueryFirst(x => x.WMSTaskNum == hIKROBOT.robotTaskCode);
if (task == null) throw new Exception($"鏈壘鍒颁换鍔�,浠诲姟缂栧彿銆恵hIKROBOT.robotTaskCode}銆�");
switch (hIKROBOT.extra.values.method)
@@ -76,33 +78,39 @@
TaskFromCompleted(task, deviceTypeEnum);
break;
default:
- task.TaskState = ReturnTaskStatus(gALAXIS.taskStatus, deviceTypeEnum);
+ task.TaskState = ReturnTaskStatus(hIKROBOT.extra.values.method, deviceTypeEnum);
BaseDal.UpdateData(task);
break;
}
}
else //鍥涘悜杞�
{
- Rgv = TaskDTO.Serialize().DeserializeObject<FOURBOTTaskStatusNotify>();
- if (Rgv==null) throw new Exception("鍙傛暟杞崲澶辫触锛�");
- var task = BaseDal.QueryFirst(x => x.WMSTaskNum == Rgv.taskID.ToString());
- if (task==null) throw new Exception($"鏈壘鍒颁换鍔�,浠诲姟缂栧彿銆恵Rgv.taskID}銆�");
- switch (Rgv.status)
+ Rgv = TaskDTO.Serialize().DeserializeObject<RGVReturnInfo>();
+ if (Rgv == null) throw new Exception("鍙傛暟杞崲澶辫触锛�");
+ //var task = BaseDal.QueryFirst(x => x.RGVTaskId == Rgv.content.taskID);
+ var task = BaseDal.QueryFirst(x => x.PalletCode == Rgv.content.podID);
+ if (task == null) throw new Exception($"鏈壘鍒颁换鍔�,浠诲姟缂栧彿銆恵Rgv.content.taskID}銆�");
+ if (Rgv.messageType == 72)//灏忚溅椤惰捣璐х墿
{
- case 2:
- TaskCompleted(task, deviceTypeEnum);
- break;
- case 4:
- TaskFromCompleted(task, deviceTypeEnum);
- break;
- default:
- task.TaskState = ReturnTaskStatus(gALAXIS.taskStatus, deviceTypeEnum);
- break;
+ TaskFromCompleted(task, deviceTypeEnum);
+ //缁欒川妫�闂ㄥ啓鍏ュ惎鍔ㄤ俊鍙�
+ var device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == "F1") as OtherDevice ?? throw new Exception("鏈壘鍒�1妤艰川妫�闂ㄨ澶囦俊鎭�");
+ device.SetValue(QualityInspectionCommandEnum.StartqualityInspection, true, task.SourceAddress);
}
-
-
+ else if (Rgv.messageType == 10)
+ {
+ if (task.TaskState == (int)TaskStatusEnum.TakeFinish && Rgv.content.status == 4)
+ {
+ task.TaskState = (int)TaskStatusEnum.CheckShapeing;
+ BaseDal.UpdateData(task);
+ }
+ else if (task.TaskState == (int)TaskStatusEnum.Puting && Rgv.content.status == 4)
+ {
+ TaskCompleted(task, deviceTypeEnum);
+ }
+ }
}
- return content.OK();
+ return content.OK();
}
catch (Exception ex)
{
@@ -124,7 +132,7 @@
logObject = hIKROBOT;
deviceName = "娴峰悍鏈哄櫒浜�";
}
- else if (Rgv != null && Rgv.taskID != 0)
+ else if (Rgv != null && Rgv.content.taskID != 0)
{
logObject = Rgv;
deviceName = "鍥涘悜杞�";
@@ -193,7 +201,7 @@
{
dt_Task.TaskState = TaskStatusEnum.TakeFinish.ObjToInt();
Db.Ado.BeginTran();
- UpdateLocationStatus(dt_Task, deviceTypeEnum, LocationStatusEnum.Free);
+ UpdateLocationStatus(dt_Task.SourceAddress, dt_Task.PalletCode, deviceTypeEnum, LocationStatusEnum.Free);
BaseDal.UpdateData(dt_Task);
Db.Ado.CommitTran();
return WebResponseContent.Instance.OK();
@@ -245,7 +253,7 @@
if (agvContent.code != 0) dt_Task.ExceptionMessage = agvContent.msg;
}
Db.Ado.BeginTran();
- UpdateLocationStatus(dt_Task, deviceTypeEnum, LocationStatusEnum.InStock);
+ UpdateLocationStatus(dt_Task.TargetAddress, dt_Task.PalletCode, deviceTypeEnum, LocationStatusEnum.InStock);
if (agvContent != null && agvContent.code == 0)
BaseDal.DeleteAndMoveIntoHty(dt_Task, OperateTypeEnum.鑷姩瀹屾垚);
else
@@ -269,22 +277,22 @@
/// <param name="deviceTypeEnum"></param>
/// <param name="locationStatusEnum"></param>
/// <returns></returns>
- public WebResponseContent UpdateLocationStatus(Dt_Task takse, DeviceTypeEnum deviceTypeEnum, LocationStatusEnum locationStatusEnum)
+ public WebResponseContent UpdateLocationStatus(string locationCode, string palletCode, DeviceTypeEnum deviceTypeEnum, LocationStatusEnum locationStatusEnum)
{
try
{
if (deviceTypeEnum == DeviceTypeEnum.GALAXIS)
{
- Dt_KLSLocationInfo? dt_KLSLocationInfo = _kLSLocationInfoService.Repository.QueryFirst(x => x.LocationCode == takse.SourceAddress);
+ Dt_KLSLocationInfo? dt_KLSLocationInfo = _kLSLocationInfoService.Repository.QueryFirst(x => x.LocationCode == locationCode);
if (dt_KLSLocationInfo != null)
{
- if (locationStatusEnum== LocationStatusEnum.Free) //濡傛灉璧风偣瀹屾垚灏辩粰璐т綅璧嬪�兼墭鐩樺彿
+ if (locationStatusEnum == LocationStatusEnum.Free) //濡傛灉璧风偣瀹屾垚灏辩粰璐т綅璧嬪�兼墭鐩樺彿
{
dt_KLSLocationInfo.PalletCode = "";
}
else
{
- dt_KLSLocationInfo.PalletCode = takse.PalletCode;
+ dt_KLSLocationInfo.PalletCode = palletCode;
}
dt_KLSLocationInfo.LocationStatus = locationStatusEnum.ObjToInt();
_kLSLocationInfoService.Repository.UpdateData(dt_KLSLocationInfo);
@@ -292,7 +300,7 @@
}
else if (deviceTypeEnum == DeviceTypeEnum.HIKROBOT)
{
- Dt_HKLocationInfo? dt_HKLocationInfo = _hKLocationInfoService.Repository.QueryFirst(x => x.LocationCode == takse.SourceAddress);
+ Dt_HKLocationInfo? dt_HKLocationInfo = _hKLocationInfoService.Repository.QueryFirst(x => x.LocationCode == locationCode);
if (dt_HKLocationInfo != null)
{
if (locationStatusEnum == LocationStatusEnum.Free) //濡傛灉璧风偣瀹屾垚灏辩粰璐т綅璧嬪�兼墭鐩樺彿
@@ -301,7 +309,7 @@
}
else
{
- dt_HKLocationInfo.PalletCode = takse.PalletCode;
+ dt_HKLocationInfo.PalletCode = palletCode;
}
dt_HKLocationInfo.LocationStatus = locationStatusEnum.ObjToInt();
_hKLocationInfoService.Repository.UpdateData(dt_HKLocationInfo);
@@ -309,7 +317,7 @@
}
else if (deviceTypeEnum == DeviceTypeEnum.YuanLiJuHe)
{
- Dt_RGVLocationInfo dt_RGVLocationInfo = _rGVLocationInfoService.Repository.QueryFirst(x => x.LocationCode == takse.SourceAddress);
+ Dt_RGVLocationInfo dt_RGVLocationInfo = _rGVLocationInfoService.Repository.QueryFirst(x => x.LocationCode == locationCode);
//杩欓噷灏嗕换鍔$殑鎵樼洏鍙风粰璐т綅琛ㄤ腑鐨凱alletCode瀛楁銆�
if (dt_RGVLocationInfo != null)
@@ -320,13 +328,13 @@
}
else
{
- dt_RGVLocationInfo.PalletCode = takse.PalletCode;
+ dt_RGVLocationInfo.PalletCode = palletCode;
}
dt_RGVLocationInfo.LocationStatus = locationStatusEnum.ObjToInt();
_rGVLocationInfoService.Repository.UpdateData(dt_RGVLocationInfo);
}
}
- else//搴撳绔欏彴
+ else//骞冲簱搴撲綅
{
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs"
index 7e831ac..7eb458b 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs"
@@ -20,6 +20,7 @@
using System.Diagnostics.CodeAnalysis;
using WIDESEAWCS_BasicInfoService;
using WIDESEAWCS_Common;
+using WIDESEAWCS_Common.LocationEnum;
using WIDESEAWCS_Common.TaskEnum;
using WIDESEAWCS_Core;
using WIDESEAWCS_Core.BaseRepository;
@@ -69,7 +70,7 @@
/// </summary>
public IRepository<Dt_Task> Repository => BaseDal;
- public TaskService(IRepository<Dt_Task> BaseDal, IRouterService routerService, ITaskExecuteDetailService taskExecuteDetailService, IRepository<Dt_TaskExecuteDetail> taskExecuteDetailRepository, IMapper mapper, IKLSLocationInfoService kLSLocationInfoService, IRGVLocationInfoService rGVLocationInfoService, IHKLocationInfoService hKLocationInfoService, IApiInfoService apiInfoService, ITrackloginfoService trackloginfoService) : base(BaseDal)
+ public TaskService(IRepository<Dt_Task> BaseDal, IRouterService routerService, ITaskExecuteDetailService taskExecuteDetailService, IRepository<Dt_TaskExecuteDetail> taskExecuteDetailRepository, IMapper mapper, IKLSLocationInfoService kLSLocationInfoService, IRGVLocationInfoService rGVLocationInfoService, IHKLocationInfoService hKLocationInfoService, IApiInfoService apiInfoService, ITrackloginfoService trackloginfoService, IStationMangerService stationMangerService) : base(BaseDal)
{
_routerService = routerService;
_taskExecuteDetailService = taskExecuteDetailService;
@@ -80,6 +81,7 @@
_hKLocationInfoService = hKLocationInfoService;
_apiInfoService = apiInfoService;
_trackloginfoService = trackloginfoService;
+ _stationMangerService=stationMangerService;
}
public WebResponseContent ReceiveWMSTask([NotNull] List<WMSTasksDTO> taskDTOs)
{
@@ -328,8 +330,8 @@
Dt_ApiInfo? apiInfo = _apiInfoService.Repository.QueryFirst(x => x.ApiCode == nameof(HIKROBOTTaskGrade));
if (apiInfo == null) throw new Exception("鏈壘鍒板洓鍚戣溅AGV浠诲姟涓嬪彂鎺ュ彛閰嶇疆淇℃伅锛佽妫�鏌ユ帴鍙i厤缃�");
string response = HttpHelper.Post(apiInfo.ApiAddress, request.Serialize());
- HIKROBOTReturn hIKROBOTReturn=response.DeserializeObject<HIKROBOTReturn>();
- if (hIKROBOTReturn.code == "SUCCESS0"&&hIKROBOTReturn.message=="鎴愬姛")
+ HIKROBOTReturn hIKROBOTReturn = response.DeserializeObject<HIKROBOTReturn>();
+ if (hIKROBOTReturn.code == "SUCCESS0" && hIKROBOTReturn.message == "鎴愬姛")
{
BaseDal.UpdateData(dt_Task);
return content.OK("淇敼浠诲姟浼樺厛绾ф垚鍔�", dt_Task);
@@ -1072,10 +1074,10 @@
{
try
{
- var Agvlocation = _rGVLocationInfoService.Repository.QueryData(x=> fOURBOTStorageStatusNotify.storageCode.Contains(x.LocationCode));
+ var Agvlocation = _rGVLocationInfoService.Repository.QueryData(x => fOURBOTStorageStatusNotify.storageCode.Contains(x.LocationCode));
foreach (var item in Agvlocation)
{
- item.LocationStatus = (int)(fOURBOTStorageStatusNotify.disable==0?EnableStatusEnum.Normal:EnableStatusEnum.Disable);
+ item.LocationStatus = (int)(fOURBOTStorageStatusNotify.disable == 0 ? EnableStatusEnum.Normal : EnableStatusEnum.Disable);
}
_rGVLocationInfoService.UpdateData(Agvlocation);
return WebResponseContent.Instance.OK();
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/WIDESEAWCS_TaskInfoService.csproj" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/WIDESEAWCS_TaskInfoService.csproj"
index f1fe745..ed4d0dd 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/WIDESEAWCS_TaskInfoService.csproj"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/WIDESEAWCS_TaskInfoService.csproj"
@@ -7,6 +7,10 @@
</PropertyGroup>
<ItemGroup>
+ <PackageReference Include="WIDESEAWCS_QuartzJob" Version="3.0.11" />
+ </ItemGroup>
+
+ <ItemGroup>
<ProjectReference Include="..\WIDESEAWCS_BasicInfoService\WIDESEAWCS_BasicInfoService.csproj" />
<ProjectReference Include="..\WIDESEAWCS_ITaskInfoService\WIDESEAWCS_ITaskInfoService.csproj" />
</ItemGroup>
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/Task/RGVTaskExtend.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/Task/RGVTaskExtend.cs"
index b8b1bdd..9ca6eda 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/Task/RGVTaskExtend.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/Task/RGVTaskExtend.cs"
@@ -37,15 +37,21 @@
{
fOURBOTnewMovePodTask.priority = item.Grade;
fOURBOTnewMovePodTask.podID = item.PalletCode;
- fOURBOTnewMovePodTask.destination = item.NextAddress;
+ //fOURBOTnewMovePodTask.destination = item.NextAddress;
fOURBOTnewMovePodTask.desExt = new
{
unload = 0//鏄惁鏀句笅瀹瑰櫒,0鍚�1鏄�
};
- fOURBOTnewMovePodTask.desType = 2;
+ fOURBOTnewMovePodTask.taskExt = new
+ {
+ keepRobot = 1,
+ keepRobotTimeout = 1
+ };
+ fOURBOTnewMovePodTask.desType = 1;
+ fOURBOTnewMovePodTask.desNodeID = item.NextAddress;
string response = HttpHelper.Post(apiInfo.ApiAddress, fOURBOTnewMovePodTask.Serialize());
FOURBOTReturn fOURBOTReturn = response.DeserializeObject<FOURBOTReturn>();
- content.Data= fOURBOTReturn;
+ content.Data = fOURBOTReturn;
if (fOURBOTReturn.returnCode == 0)
{
string dataJson = fOURBOTReturn.data.ToString();
@@ -68,7 +74,7 @@
}
finally
{
- _trackloginfoService.AddTrackLog(fOURBOTnewMovePodTask, content, "涓嬪彂鍥涘悜杞︽柊寤哄叆搴撲换鍔�", "","");
+ _trackloginfoService.AddTrackLog(fOURBOTnewMovePodTask, content, "涓嬪彂鍥涘悜杞︽柊寤哄叆搴撲换鍔�", "", "");
}
}
#endregion
@@ -82,7 +88,7 @@
{
object requestData = null; // 娣诲姞鍙橀噺璁板綍璇锋眰鏁版嵁
- WebResponseContent content =new WebResponseContent();
+ WebResponseContent content = new WebResponseContent();
try
{
Dt_ApiInfo? apiInfo = _apiInfoService.Repository.QueryFirst(x => x.ApiCode == nameof(GetBlockPodContentDto)) ?? throw new Exception("鏈壘鍒板洓鍚戣溅浠诲姟涓嬪彂鎺ュ彛閰嶇疆淇℃伅锛佽妫�鏌ユ帴鍙i厤缃�");
@@ -104,13 +110,13 @@
//content.candidatePodIDs = tasks.Select(x => x.PalletCode).ToList();
string response = HttpHelper.Post(apiInfo.ApiAddress, request.Serialize());
FOURBOTReturn fOURBOTReturn = response.DeserializeObject<FOURBOTReturn>();
- content.Data= fOURBOTReturn;
+ content.Data = fOURBOTReturn;
if (fOURBOTReturn.returnCode == 0)
{
//ReturnBlockPodResultDto getBlockPod = fOURBOTReturn.data as ReturnBlockPodResultDto ?? throw new Exception("鏈幏鍙栧埌闃荤鎵樼洏鍏崇郴鏁版嵁");
var dataJson = fOURBOTReturn.data.ToString();
ReturnBlockPodResultDto? getBlockPod = JsonConvert.DeserializeObject<ReturnBlockPodResultDto>(dataJson);
- if (getBlockPod.Result.Count==0)
+ if (getBlockPod.Result.Count == 0)
{
throw new Exception("鏈幏鍙栧埌闃荤鎵樼洏鍏崇郴鏁版嵁");
}
@@ -179,12 +185,18 @@
{
priority = item.Grade,
podID = item.PalletCode,
- destination = rGVLocationInfo.LocationCode,
+ desStorageID = rGVLocationInfo.LocationCode,
+ //destination = rGVLocationInfo.LocationCode,
desExt = new { unload = 1 }, // 鏄惁鏀句笅瀹瑰櫒,0鍚�1鏄�
desType = 2
};
+ fOURBOTnewMovePodTask.taskExt = new
+ {
+ autoToRest = 1
+ };
item.CurrentAddress = item.NextAddress;
item.NextAddress = rGVLocationInfo.LocationCode;
+ item.TargetAddress = rGVLocationInfo.LocationCode;
item.Roadway = rGVLocationInfo.RoadwayNo;
string response = HttpHelper.Post(apiInfo.ApiAddress, fOURBOTnewMovePodTask.Serialize());
@@ -224,7 +236,7 @@
content.Error($"鍥涘悜杞︽帴鍙h繑鍥為敊璇細{ex.Message}");
}
tasksToUpdate.Add(item);
- }
+ }
#endregion
#region 鏇存柊鏁版嵁
// 濡傛灉鏈夐渶瑕佹洿鏂扮殑鏁版嵁锛屾墠鎵ц浜嬪姟
@@ -248,7 +260,7 @@
_unitOfWorkManage.RollbackTran();
WriteError(nameof(TaskJob), ex.Message, ex);
}
- }
+ }
#endregion
}
catch (Exception ex)
@@ -275,7 +287,7 @@
{
Dt_StationManger stationManger = _stationMangerService.GetInStationInfo(item.SourceAddress);
item.CurrentAddress = item.NextAddress;
- item.NextAddress = stationManger.RGVStationCode;
+ item.NextAddress = stationManger.StationCode;
fOURBOTnewMovePodTask.priority = item.Grade;
fOURBOTnewMovePodTask.podID = item.PalletCode;
fOURBOTnewMovePodTask.destination = item.NextAddress;
@@ -283,7 +295,11 @@
{
unload = 1//鏄惁鏀句笅瀹瑰櫒,0鍚�1鏄�
};
- fOURBOTnewMovePodTask.desType = 2;
+ fOURBOTnewMovePodTask.taskExt = new
+ {
+ autoToRest = 1
+ };
+ fOURBOTnewMovePodTask.desType = 5;
string response = HttpHelper.Post(apiInfo.ApiAddress, fOURBOTnewMovePodTask.Serialize());
FOURBOTReturn fOURBOTReturn = response.DeserializeObject<FOURBOTReturn>();
content.Data = fOURBOTReturn;
@@ -369,7 +385,7 @@
List<MoveBlockPodContentDto> moveBlocks = new List<MoveBlockPodContentDto>();
try
{
-
+
Dt_ApiInfo? apiInfo = _apiInfoService.Repository.QueryFirst(x => x.ApiCode == nameof(MoveBlockPodContentDto)) ?? throw new Exception("鏈壘鍒板洓鍚戣溅鎵归噺鎼繍闃荤鎵樹换鍔℃帴鍙i厤缃俊鎭紒璇锋鏌ユ帴鍙i厤缃�");
foreach (var item in tasks)
{
@@ -427,7 +443,7 @@
var takes = _taskService.Repository.QueryFirst(x => x.Roadway == item.Roadway && x.TaskType == (int)TaskTypeEnum.CPMoveInventory);
if (takes == null)
{
- item.TaskState = (int)TaskStatusEnum.RGV_WaitSend;
+ item.TaskState = (int)TaskStatusEnum.RGV_WaitSend;
}
}
_taskService.UpdateData(tasks);
@@ -450,6 +466,7 @@
foreach (var item in tasks)
{
var stationManger = _stationMangerService.GetOutStationInfo(item.TargetAddress);
+ item.NextAddress = stationManger.StationCode;
if (stationManger.IsOccupied != LocationStatusEnum.Free.ObjToInt()) continue;
#region 涓嬪彂鍑哄簱浠诲姟
fOURBOTnewMovePodTask.priority = item.Grade;
@@ -459,10 +476,14 @@
{
unload = 0//鏄惁鏀句笅瀹瑰櫒,0鍚�1鏄�
};
- fOURBOTnewMovePodTask.desType = 2;
+ fOURBOTnewMovePodTask.taskExt = new
+ {
+ autoToRest = 1
+ };
+ fOURBOTnewMovePodTask.desType = 5;
string response = HttpHelper.Post(apiInfo.ApiAddress, fOURBOTnewMovePodTask.Serialize());
FOURBOTReturn fOURBOTReturn = response.DeserializeObject<FOURBOTReturn>();
- content.Data= fOURBOTReturn;
+ content.Data = fOURBOTReturn;
if (fOURBOTReturn.returnCode == 0)
{
string dataJson = fOURBOTReturn.data.ToString();
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/Task/TaskJob.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/Task/TaskJob.cs"
index 62f4f3c..deaccf2 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/Task/TaskJob.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/Task/TaskJob.cs"
@@ -49,9 +49,9 @@
{
try
{
- SendNewTask();
+ //SendNewTask();
- SendWaitToTask();
+ //SendWaitToTask();
}
catch (Exception ex)
{
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/TestJob.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/TestJob.cs"
index e89ac29..86e82b2 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/TestJob.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/TestJob.cs"
@@ -11,6 +11,7 @@
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
+using WIDESEAWCS_Common;
using WIDESEAWCS_Common.TaskEnum;
using WIDESEAWCS_Communicator;
using WIDESEAWCS_Core.Helper;
@@ -21,6 +22,7 @@
using WIDESEAWCS_QuartzJob.DeviceBase;
using WIDESEAWCS_QuartzJob.DTO;
using WIDESEAWCS_QuartzJob.StackerCrane.Enum;
+using WIDESEAWCS_TaskInfoService;
namespace WIDESEAWCS_Tasks
{
@@ -48,25 +50,14 @@
// _taskService.Repository 浠撳偍灞傦紝杩涜鏁版嵁搴撹闂�-
try
{
+ List<Dt_Task> Uptasks = new List<Dt_Task>();
var taskList = _taskService.Repository.QueryData(x => x.TaskType == TaskTypeEnum.CPInbound.ObjToInt() && x.TaskState == TaskStatusEnum.CheckShapeing.ObjToInt());
//浠诲姟鐨勭洰鏍囧湴鍧�瀵逛簬绔欏彴鍙凤紱
foreach (var task in taskList)
{
- ////鎵惧埌瀵逛簬绔欏彴鐨勭鐞嗕俊鎭紝鐪嬬湅杩欎釜绔欏彴鏈夋病鏈夎揣锛屽鏋滄湁璐х殑璇濓紝灏辫繘琛岃川妫�锛屽鏋滄病鏈夎揣鐨勮瘽锛屽氨涓嶈繘琛岃川妫�
- //var stationMangers = _stationMangerService.Repository.QueryFirst(x => x.StationCode == task.SourceAddress);
- //device.SetValue(QualityInspectionCommandEnum.StartqualityInspection,true,task.SourceAddress);
- //濡傛灉鏈夎揣鐨勮瘽锛屾墠杩涜璐ㄦ锛屾妸绔欏彴鐘舵�佽涓哄崰鐢�
- var R_StockAvailableSymbol = device.GetValue<QualityInspectionCommandEnum, bool>(QualityInspectionCommandEnum.R_StockAvailableSymbol, task.SourceAddress);
- if (R_StockAvailableSymbol == true)
+ if (device.GetValue<QualityInspectionCommandEnum, bool>(QualityInspectionCommandEnum.R_QualityInspection, task.SourceAddress))
{
- //stationMangers.IsOccupied=1;//鏀逛负鍗犵敤
- //寮�鍚川妫�
- device.SetValue(QualityInspectionCommandEnum.StartqualityInspection, true, task.SourceAddress);
- //濡傛灉璇诲埌璐ㄦ鎵ц涓负true鐨勮瘽锛屽氨鍏抽棴璐ㄦ
- if (device.GetValue<QualityInspectionCommandEnum, bool>(QualityInspectionCommandEnum.R_QualityInspection, task.SourceAddress))
- {
- device.SetValue(QualityInspectionCommandEnum.StartqualityInspection, false, task.SourceAddress);
- }
+ device.SetValue(QualityInspectionCommandEnum.StartqualityInspection, false, task.SourceAddress);
//鍐嶈鍙栬川妫�缁撴灉
var qualityResult = device.GetValue<QualityInspectionCommandEnum, bool>(QualityInspectionCommandEnum.R_QualityInspectionInProgress, task.SourceAddress);
//宸﹁秴瀹借鍛�
@@ -75,35 +66,34 @@
var R_RightWideWarning = device.GetValue<QualityInspectionCommandEnum, bool>(QualityInspectionCommandEnum.R_RightWideWarning, task.SourceAddress);
//瓒呴珮璀﹀憡
var R_ExtremeWarning = device.GetValue<QualityInspectionCommandEnum, bool>(QualityInspectionCommandEnum.R_ExtremeWarning, task.SourceAddress);
+ //鍐欏叆鍋滄璐ㄦ淇″彿
+ device.SetValue(QualityInspectionCommandEnum.StopqualityInspection, true, task.SourceAddress);
if (qualityResult)
{
//濡傛灉璐ㄦ閫氳繃浜嗭紝灏辨妸浠诲姟鐘舵�佹敼涓鸿川妫�瀹屾垚
task.TaskState = TaskStatusEnum.CheckShapeingOk.ObjToInt();
+ Uptasks.Add(task);
}
- else if (R_LeftOverWidthWarning)
+ else
{
- task.ExceptionMessage += "璐ㄦ澶辫触锛屽乏瓒呭";
task.TaskState = TaskStatusEnum.CheckShapeingNG.ObjToInt();
- }
- else if (R_RightWideWarning)
- {
- task.ExceptionMessage += "璐ㄦ澶辫触锛屽彸瓒呭";
- }
- else if (R_ExtremeWarning)
- {
- task.ExceptionMessage += "璐ㄦ澶辫触,瓒呴珮";
- }
- else if (qualityResult == false) //濡傛灉璐ㄦ澶辫触锛屽氨澶嶄綅
- {
+ task.ExceptionMessage = "璐ㄦ澶辫触";
+ if (R_LeftOverWidthWarning) task.ExceptionMessage += ",宸﹁秴瀹�";
+ if (R_RightWideWarning) task.ExceptionMessage += ",鍙宠秴瀹�";
+ if (R_ExtremeWarning) task.ExceptionMessage += ",瓒呴珮";
+ Uptasks.Add(task);
//鍐欏叆澶嶄綅淇″彿
device.SetValue(QualityInspectionCommandEnum.FaultReset, true, task.SourceAddress);
}
- //鍐欏叆鍋滄璐ㄦ淇″彿
- device.SetValue(QualityInspectionCommandEnum.StopqualityInspection, true, task.SourceAddress);
}
-
+ else
+ {
+ //鍐欏叆鍋滄璐ㄦ淇″彿
+ device.SetValue(QualityInspectionCommandEnum.StopqualityInspection, false, task.SourceAddress);
+ device.SetValue(QualityInspectionCommandEnum.StartqualityInspection, true, task.SourceAddress);
+ }
}
-
+ _taskService.UpdateData(Uptasks);
WriteInfo(device.DeviceName, "infoLog");
WriteDebug(device.DeviceName, "debugLog");
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/WIDESEAWCS_Tasks.csproj" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/WIDESEAWCS_Tasks.csproj"
index 3f53268..ecedd2a 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/WIDESEAWCS_Tasks.csproj"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/WIDESEAWCS_Tasks.csproj"
@@ -7,7 +7,7 @@
</PropertyGroup>
<ItemGroup>
- <PackageReference Include="WIDESEAWCS_QuartzJob" Version="3.0.9" />
+ <PackageReference Include="WIDESEAWCS_QuartzJob" Version="3.0.11" />
</ItemGroup>
<ItemGroup>
--
Gitblit v1.9.3