From 741cc4cde8bc475366891e795988a11153eae07c Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期五, 10 一月 2025 22:48:39 +0800
Subject: [PATCH] Merge branch 'master' of http://115.159.85.185:8098/r/MeiRuiAn/HuaiAn
---
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/辅料仓/AGV_FLExtend.cs | 3 ++-
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockViewService.cs | 1 -
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/AGV/CTU_AGVController .cs | 2 +-
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/LocationInfoService.cs | 4 +++-
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/TaskEnum/TaskTypeEnum.cs | 6 ++++++
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json | 1 +
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs | 23 +++++++++++++++++++----
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json | 2 +-
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Stock/StockViewDTO.cs | 4 ----
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs | 10 ++++++----
10 files changed, 39 insertions(+), 17 deletions(-)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/TaskEnum/TaskTypeEnum.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/TaskEnum/TaskTypeEnum.cs"
index 0d8a1db..d2f364f 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/TaskEnum/TaskTypeEnum.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/TaskEnum/TaskTypeEnum.cs"
@@ -79,6 +79,12 @@
InboundJT = 570,
/// <summary>
+ /// 绌虹鍏ュ簱
+ /// </summary>
+ [Description("绌虹鍏ュ簱")]
+ InEmpty = 600,
+
+ /// <summary>
/// 宸烽亾鍐呯Щ搴�
/// </summary>
[Description("宸烽亾鍐呯Щ搴�")]
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/AGV/CTU_AGVController .cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/AGV/CTU_AGVController .cs"
index eacf3b7..16fbf0e 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/AGV/CTU_AGVController .cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/AGV/CTU_AGVController .cs"
@@ -109,7 +109,7 @@
if (agvUpdateModel.Method == "end")
{
- if (task.TaskType == TaskTypeEnum.Outbound.ObjToInt()) PutFinish(task.NextAddress);
+ if (task.TaskType == TaskTypeEnum.Outbound.ObjToInt() || task.TaskType == TaskTypeEnum.OutEmpty.ObjToInt()) PutFinish(task.NextAddress);
_taskService.TaskCompleted(task.TaskNum);
}
agvResponseContent.Code = "0";
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json"
index 3e0e1e8..e04bb50 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json"
@@ -23,7 +23,7 @@
// 娉ㄦ剰锛宧ttp://127.0.0.1:1818 鍜� http://localhost:1818 鏄笉涓�鏍风殑
"IPs": "http://127.0.0.1:8080,http://localhost:8080"
},
- "WMSApiAddress": "http://127.0.0.1:9293",
+ "WMSApiAddress": "http://127.0.0.1:9293", //"http://127.0.0.1:9283",姝e紡鐜鍦板潃
"ApiName": "WIDESEA",
"ExpMinutes": 120,
"QuartzJobAutoStart": true
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 d23cf79..50fb3c7 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"
@@ -195,7 +195,7 @@
task.NextAddress = router.NextPosi;
task.DeviceCode = stationManger.StationDeviceCode;
}
- else if(item.TaskType == TaskTypeEnum.MesOutbound.ObjToInt())
+ else if (item.TaskType == TaskTypeEnum.MesOutbound.ObjToInt())
{
task.NextAddress = router.NextPosi;
task.DeviceCode = stationManger.StackerCraneCode;
@@ -290,7 +290,7 @@
return WebResponseContent.Instance.Error($"鏈壘鍒扮珯鍙颁俊鎭�");
}
string address = AppSettings.Get("WMSApiAddress");
- if(string.IsNullOrEmpty(address))
+ if (string.IsNullOrEmpty(address))
{
return WebResponseContent.Instance.Error($"鏈壘鍒癢MSApi鍦板潃");
}
@@ -323,7 +323,7 @@
{
return WebResponseContent.Instance.Error($"鏈壘鍒癢MSApi鍦板潃");
}
- string responseStr = HttpHelper.Post($"{address}/api/Task/AssignRoadway?taskNum={taskNum}",roadwayNos.Serialize());
+ string responseStr = HttpHelper.Post($"{address}/api/Task/AssignRoadway?taskNum={taskNum}", roadwayNos.Serialize());
WebResponseContent? responseContent = JsonConvert.DeserializeObject<WebResponseContent>(responseStr);
if (responseContent != null && responseContent.Status && responseContent.Data != null)
{
@@ -346,7 +346,9 @@
/// <returns></returns>
public string? RequestAssignLocation(int taskNum, string roadwayNo)
{
- string responseStr = HttpHelper.Get($"http://127.0.0.1:9283/api/Task/AssignInboundTaskLocation?taskNum={taskNum}&roadwayNo={roadwayNo}");
+ string address = AppSettings.Get("WMSApiAddress");
+ if (string.IsNullOrEmpty(address)) throw new Exception("鏈壘鍒癢MSApi鍦板潃");
+ string responseStr = HttpHelper.Get($"{address}/api/Task/AssignInboundTaskLocation?taskNum={taskNum}&roadwayNo={roadwayNo}");
WebResponseContent? responseContent = JsonConvert.DeserializeObject<WebResponseContent>(responseStr);
if (responseContent != null && responseContent.Status && responseContent.Data != null)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\350\276\205\346\226\231\344\273\223/AGV_FLExtend.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\350\276\205\346\226\231\344\273\223/AGV_FLExtend.cs"
index a008ac2..8d00a08 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\350\276\205\346\226\231\344\273\223/AGV_FLExtend.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\350\276\205\346\226\231\344\273\223/AGV_FLExtend.cs"
@@ -35,7 +35,7 @@
{
TaskCode = task.AgvTaskNum,
ReqCode = DateTime.Now.ToString("yyyyMMddHHmmss"),
- TaskTyp = task.TaskType == TaskTypeEnum.Outbound.ObjToInt() ? "FLC" : "FLR",
+ TaskTyp = task.TaskType < TaskTypeEnum.Inbound.ObjToInt() ? "FLC" : "FLR",
ctnrCode = task.PalletCode,
PositionCodePath = new List<CodePath>()
{
@@ -94,6 +94,7 @@
};
var b = Layer > 9 ? "" + Layer : "0" + Layer;
var c = Column > 9 ? "" + Column : "0" + Column;
+ if (Column == 10) c = "010";
Address = a + b + c;
}
else
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/LocationInfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/LocationInfoService.cs"
index 2178c1e..b291525 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/LocationInfoService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/LocationInfoService.cs"
@@ -165,7 +165,7 @@
}
stockInfos.Add(stockInfo);
}
- var LocationCodes = stockInfos/*.Where(x => x.LocationCode != "骞冲簱浣�")*/.Select(stockInfo => stockInfo.LocationCode).ToList();
+ var LocationCodes = stockInfos.Where(x => x.LocationCode != "骞冲簱浣�").Select(stockInfo => stockInfo.LocationCode).ToList();
List<Dt_LocationInfo> locationInfos = Repository.QueryData(x => LocationCodes.Contains(x.LocationCode));
locationInfos.ForEach(x =>
{
@@ -203,6 +203,8 @@
_ => throw new Exception($"鏈畾涔夌殑鎺�,鍦板潃:銆恵locationCode}銆�"),
};
var Column = locationCode.Substring(4, 2);
+ if (locationCode.Length == 7)
+ Column = locationCode.Substring(5, 2);
var Layer = locationCode.Substring(2, 2);
locationCode = "AGV_FL-" + Row + "-0" + Column + "-0" + Layer + "-01";
return locationCode;
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Stock/StockViewDTO.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Stock/StockViewDTO.cs"
index 1360345..93237cc 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Stock/StockViewDTO.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Stock/StockViewDTO.cs"
@@ -18,10 +18,6 @@
/// <summary>
/// 璐т綅缂栧彿
/// </summary>
- public int WarehouseId { get; set; }
- /// <summary>
- ///
- /// </summary>
public string LocationCode { get; set; }
/// <summary>
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockViewService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockViewService.cs"
index 116b3ab..2055a6c 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockViewService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockViewService.cs"
@@ -81,7 +81,6 @@
ISugarQueryable<StockViewDTO> list = sugarQueryable1.InnerJoin(sugarQueryable, (b, a) => a.LocationCode == b.LocationCode).Select((b, a)
=> new StockViewDTO
{
- WarehouseId=a.WarehouseId,
LocationCode = b.LocationCode,
Column = a.Column,
CreateDate = b.CreateDate,
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs"
index 3edf979..36030d6 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs"
@@ -112,7 +112,12 @@
{
x.AGVArea = agvDescription;
});
- string response = HttpHelper.Post("http://127.0.0.1:9281/api/Task/ReceiveTask", taskDTOs.Serialize());
+ string address = AppSettings.Get("WCSApiAddress");
+ if (string.IsNullOrEmpty(address))
+ {
+ return WebResponseContent.Instance.Error($"鏈壘鍒癢CSApi鍦板潃");
+ }
+ string response = HttpHelper.Post($"{address}/api/Task/ReceiveTask", taskDTOs.Serialize());
return JsonConvert.DeserializeObject<WebResponseContent>(response) ?? WebResponseContent.Instance.Error("杩斿洖閿欒");
}
@@ -130,7 +135,12 @@
{
try
{
- string response = HttpHelper.Post("http://127.0.0.1:9281/api/CTU_AGV/PutFinish", code);
+ string address = AppSettings.Get("WCSApiAddress");
+ if (string.IsNullOrEmpty(address))
+ {
+ return WebResponseContent.Instance.Error($"鏈壘鍒癢CSApi鍦板潃");
+ }
+ string response = HttpHelper.Post($"{address}/api/CTU_AGV/PutFinish?code=" + code);
return JsonConvert.DeserializeObject<WebResponseContent>(response) ?? WebResponseContent.Instance.Error("杩斿洖閿欒");
}
@@ -192,7 +202,7 @@
if (stockInfo.PalletType == PalletTypeEnum.Empty.ObjToInt())
{
stockInfo.StockStatus = StockStatusEmun.鍏ュ簱瀹屾垚.ObjToInt();
- task.TaskStatus = (int)TaskStatusEnum.Finish;
+ task.TaskStatus = TaskStatusEnum.Finish.ObjToInt();
_unitOfWorkManage.BeginTran();
BaseDal.DeleteAndMoveIntoHty(task, App.User.UserId > 0 ? OperateTypeEnum.浜哄伐瀹屾垚 : OperateTypeEnum.鑷姩瀹屾垚);
_basicService.LocationInfoService.UpdateLocationStatus(locationInfo, stockInfo.PalletType, LocationStatusEnum.InStock, stockInfo.WarehouseId);
@@ -332,7 +342,7 @@
List<Dt_OutboundOrderDetail> outboundOrderDetails = new List<Dt_OutboundOrderDetail>();
List<Dt_MesOutboundOrder> mesOutboundOrders = new List<Dt_MesOutboundOrder>();
- if ((outStockLockInfos == null || outStockLockInfos.Count == 0) && warehouse.WarehouseCode != WarehouseEnum.HA64.ToString())
+ if ((outStockLockInfos == null || outStockLockInfos.Count == 0) && warehouse.WarehouseCode != WarehouseEnum.HA64.ToString() && task.TaskType != TaskTypeEnum.OutEmpty.ObjToInt())
{
return WebResponseContent.Instance.Error($"鏈壘鍒板嚭搴撹鎯呬俊鎭�");
}
@@ -384,6 +394,11 @@
stockInfo.StockStatus = StockStatusEmun.鍑哄簱瀹屾垚.ObjToInt();
_stockService.StockInfoService.Repository.UpdateData(stockInfo);
}
+ else if (task.TaskType == TaskTypeEnum.OutEmpty.ObjToInt())
+ {
+ _basicService.LocationInfoService.UpdateLocationStatus(locationInfo, stockInfo.PalletType, LocationStatusEnum.Free, stockInfo.WarehouseId);
+ _stockService.StockInfoService.Repository.DeleteAndMoveIntoHty(stockInfo, App.User.UserId == 0 ? OperateTypeEnum.鑷姩瀹屾垚 : OperateTypeEnum.浜哄伐瀹屾垚);
+ }
else if (task.TaskType == TaskTypeEnum.MesOutbound.ObjToInt())
{
_outboundService.MesOutboundOrderService.Repository.UpdateData(mesOutboundOrders);
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json"
index 4dc0d11..7b50cb5 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json"
@@ -26,6 +26,7 @@
},
"WCS": "http://localhost:9291/api/Task/",
+ "WCSApiAddress": "http://127.0.0.1:9291",//"http://127.0.0.1:9281",姝e紡鐜鍦板潃
"LogAopEnable": false,
"PrintSql": true, //鎵撳嵃SQL璇彞
"ApiName": "WIDESEA",
--
Gitblit v1.9.3