From 1d685ca799f0b50ad63336963511cbbf21ab2e4c Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期四, 18 十二月 2025 09:41:53 +0800
Subject: [PATCH] 需求优化
---
项目代码/WCS/WCSServices/WIDESEAWCS_Tasks/原料库/ConveyorLineJob_YL1ndFloor.cs | 2
项目代码/龙利得PDA/common/config.js | 4
项目代码/WCS/WCSServices/WIDESEAWCS_Common/TaskEnum/TaskTypeEnum.cs | 6
项目代码/WCS/WCSServices/WIDESEAWCS_Tasks/成品仓/StackerCraneJob_CP.cs | 10
项目代码/WMS/WMSServices/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs | 4
项目资料/接口协议/博斯通利拓接口.V2.xlsx | 0
项目代码/WCS/WCSServices/WIDESEAWCS_Server/Controllers/AGV/AGVController.cs | 6
项目代码/WCS/WCSServices/WIDESEAWCS_Tasks/原料库/StackerCraneJob_YLSC3.cs | 10
项目代码/WCS/WCSServices/WIDESEAWCS_Tasks/成品仓/ConveyorLineJob_CPA.cs | 42 +---
项目代码/WCS/WCSServices/WIDESEAWCS_TaskInfoService/TaskService.cs | 21 +
项目代码/WCS/WCSServices/WIDESEAWCS_Tasks/成品仓/ConveyorLineJob_CPB.cs | 47 +++++
项目代码/WCS/WCSServices/WIDESEAWCS_Tasks/原料库/StackerCraneJob_YLSC2.cs | 2
项目代码/WMS/WMSServices/WIDESEA_Common/TaskEnum/TaskTypeEnum.cs | 6
项目代码/WMS/WMSServices/WIDESEA_WMSServer/Filter/CustomProfile.cs | 2
项目代码/WMS/WMSServices/WIDESEA_Common/CommonEnum/StationAreaEnum.cs | 7
项目代码/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Inbound.cs | 316 +++++++++++++++++++++++++----------
项目代码/WCS/WCSServices/WIDESEAWCS_Tasks/成品仓/AGV_CPExtend.cs | 2
项目代码/WMS/WMSServices/WIDESEA_Model/Models/TaskInfo/Dt_Task.cs | 2
项目代码/WMS/WMSServices/WIDESEA_BasicService/Service/LocationInfoService_Common.cs | 2
项目代码/WMS/WMSServices/WIDESEA_ITaskInfoService/ITaskService.cs | 2
项目资料/接口协议/WMS文档20251119.docx | 0
项目资料/接口协议/WMS文档20251216.docx | 0
项目代码/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Outbound.cs | 5
项目代码/WCS/WCSServices/WIDESEAWCS_ITaskInfoService/ITaskService.cs | 2
24 files changed, 355 insertions(+), 145 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Common/TaskEnum/TaskTypeEnum.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Common/TaskEnum/TaskTypeEnum.cs"
index 992b7c0..7b0aa03 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Common/TaskEnum/TaskTypeEnum.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Common/TaskEnum/TaskTypeEnum.cs"
@@ -112,6 +112,12 @@
Inbound = 510,
/// <summary>
+ /// 浜屾ゼ绔欑偣鎴愬搧鍏ュ簱
+ /// </summary>
+ [Description("浜屾ゼ绔欑偣鎴愬搧鍏ュ簱")]
+ Inbound2ndFloor = 515,
+
+ /// <summary>
/// 鐩樼偣鍏ュ簱
/// </summary>
[Description("鐩樼偣鍏ュ簱")]
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_ITaskInfoService/ITaskService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_ITaskInfoService/ITaskService.cs"
index 1f44b21..f17ce7c 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_ITaskInfoService/ITaskService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_ITaskInfoService/ITaskService.cs"
@@ -87,7 +87,7 @@
/// 璇锋眰鍘熸枡鍏ュ簱宸烽亾
/// </summary>
/// <returns></returns>
- WebResponseContent AssignYLRoadwayNo(string palletCode);
+ WebResponseContent AssignYLRoadwayNo(string palletCode, int wide = 0, int thickness = 0, int weight = 0);
/// <summary>
/// 璇锋眰鍏ュ簱浠诲姟
/// </summary>
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Server/Controllers/AGV/AGVController.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Server/Controllers/AGV/AGVController.cs"
index 362e527..e1f0907 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Server/Controllers/AGV/AGVController.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Server/Controllers/AGV/AGVController.cs"
@@ -511,7 +511,7 @@
/// <summary>
/// 鑾峰彇妗佹灦鏀炬枡淇″彿
/// </summary>
- public W_TrussCartonDB GetCartonPut(string StationCode)
+ private W_TrussCartonDB GetCartonPut(string StationCode)
{
switch (StationCode)
{
@@ -534,7 +534,7 @@
/// <summary>
/// 鑾峰彇妗佹灦璇锋眰淇″彿
/// </summary>
- public W_TrussCartonDB GetCartonRequest(string StationCode)
+ private W_TrussCartonDB GetCartonRequest(string StationCode)
{
switch (StationCode)
{
@@ -558,7 +558,7 @@
/// <summary>
/// 鑾峰彇妗佹灦杩涘叆淇″彿
/// </summary>
- public R_TrussCartonDB GetCarton(string StationCode)
+ private R_TrussCartonDB GetCarton(string StationCode)
{
switch (StationCode)
{
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_TaskInfoService/TaskService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_TaskInfoService/TaskService.cs"
index 820e628..202738c 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_TaskInfoService/TaskService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_TaskInfoService/TaskService.cs"
@@ -18,6 +18,7 @@
using Newtonsoft.Json;
using SqlSugar;
using System.Diagnostics.CodeAnalysis;
+using System.Net.Http.Headers;
using WIDESEA_DTO.Agv;
using WIDESEAWCS_Common;
using WIDESEAWCS_Common.APIEnum;
@@ -266,12 +267,24 @@
{
//鎴愬搧鍏ュ簱
List<Dt_Router> routers = _routerRepository.QueryData(x => x.InOutType == item.TaskType && x.StartPosi=="AGV" && x.ChildPosiDeviceCode==item.RoadWay);
- router = routers.FirstOrDefault();
- if (routers.Count == 1)
+ if (routers.Count==0)
{
+ router = _routerRepository.QueryFirst(x => x.InOutType == item.TaskType && x.StartPosi == "AGV");
+ if (router==null)
+ return WebResponseContent.Instance.Error($"鏈壘鍒拌矾鐢遍厤缃俊鎭�");
task.NextAddress = router.NextPosi;
task.DeviceCode = router.ChildPosi;
}
+ else
+ {
+ router = routers.FirstOrDefault();
+ if (routers.Count == 1)
+ {
+ task.NextAddress = router.NextPosi;
+ task.DeviceCode = router.ChildPosi;
+ }
+ }
+
}
tasks.Add(task);
}
@@ -432,7 +445,7 @@
/// 璇锋眰鍘熸枡鍏ュ簱宸烽亾
/// </summary>
/// <returns></returns>
- public WebResponseContent AssignYLRoadwayNo(string palletCode)
+ public WebResponseContent AssignYLRoadwayNo(string palletCode, int wide = 0, int thickness = 0, int weight = 0)
{
WebResponseContent content = new WebResponseContent();
try
@@ -442,7 +455,7 @@
{
return WebResponseContent.Instance.Error($"鏈壘鍒癢MSApi鍦板潃");
}
- string responseStr = HttpHelper.Get($"{address}/api/Task/AssignYLRoadwayNo?palletCode={palletCode}");
+ string responseStr = HttpHelper.Get($"{address}/api/Task/AssignYLRoadwayNo?palletCode={palletCode}&wide={wide}&thickness={thickness}&weight={weight}");
WebResponseContent? responseContent = JsonConvert.DeserializeObject<WebResponseContent>(responseStr);
if (responseContent != null && responseContent.Status && responseContent.Data != null)
{
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\345\216\237\346\226\231\345\272\223/ConveyorLineJob_YL1ndFloor.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\345\216\237\346\226\231\345\272\223/ConveyorLineJob_YL1ndFloor.cs"
index feb8c6f..3d32d3f 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\345\216\237\346\226\231\345\272\223/ConveyorLineJob_YL1ndFloor.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\345\216\237\346\226\231\345\272\223/ConveyorLineJob_YL1ndFloor.cs"
@@ -119,7 +119,7 @@
{
if (string.IsNullOrEmpty(task.Roadway) && string.IsNullOrEmpty(task.NextAddress))
{
- WebResponseContent content = _taskService.AssignYLRoadwayNo(task.PalletCode);
+ WebResponseContent content = _taskService.AssignYLRoadwayNo(task.PalletCode,weight: conveyorLineInfoRead.WR_Weight, thickness: conveyorLineInfoRead.WR_Height, wide: conveyorLineInfoRead.WR_Width);
if (!content.Status)
{
WriteError(item.StationCode, $"璇锋眰鍏ュ簱澶辫触锛歿content.Message}");
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\345\216\237\346\226\231\345\272\223/StackerCraneJob_YLSC2.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\345\216\237\346\226\231\345\272\223/StackerCraneJob_YLSC2.cs"
index f346954..4926ef0 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\345\216\237\346\226\231\345\272\223/StackerCraneJob_YLSC2.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\345\216\237\346\226\231\345\272\223/StackerCraneJob_YLSC2.cs"
@@ -61,7 +61,7 @@
}
//commonStackerCrane.CheckStackerCraneTaskCompleted();//闃叉浠诲姟瀹屾垚浜嬩欢鐩戞祴瓒呮椂锛屽啀鎵嬪姩瑙﹀彂涓�娆�
//鑾峰彇褰撳墠鍫嗗灈鏈虹姸鎬�
- if (commonStackerCrane.StackerCraneWorkStatusValue == StackerCraneWorkStatus.WorkCompleted)
+ if (commonStackerCrane.CurrentTaskNum > 0 && (commonStackerCrane.StackerCraneWorkStatusValue == StackerCraneWorkStatus.WorkCompleted || commonStackerCrane.Communicator.Read<short>("DB1000.40.0") == 3))
{
StackerCraneTaskCompletedEventArgs e = new StackerCraneTaskCompletedEventArgs(commonStackerCrane.CurrentTaskNum);
CommonStackerCrane_StackerCraneTaskCompletedEventHandler(commonStackerCrane, e);
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\345\216\237\346\226\231\345\272\223/StackerCraneJob_YLSC3.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\345\216\237\346\226\231\345\272\223/StackerCraneJob_YLSC3.cs"
index 8b355c0..403de01 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\345\216\237\346\226\231\345\272\223/StackerCraneJob_YLSC3.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\345\216\237\346\226\231\345\272\223/StackerCraneJob_YLSC3.cs"
@@ -66,7 +66,7 @@
commonStackerCrane.CheckStackerCraneTaskCompleted();//闃叉浠诲姟瀹屾垚浜嬩欢鐩戞祴瓒呮椂锛屽啀鎵嬪姩瑙﹀彂涓�娆�
//鑾峰彇褰撳墠鍫嗗灈鏈虹姸鎬�
- if (commonStackerCrane.CurrentTaskNum>0 && commonStackerCrane.StackerCraneWorkStatusValue == StackerCraneWorkStatus.WorkCompleted)
+ if (commonStackerCrane.CurrentTaskNum>0 && (commonStackerCrane.StackerCraneWorkStatusValue == StackerCraneWorkStatus.WorkCompleted || commonStackerCrane.Communicator.Read<short>("DB1000.40.0") == 3))
{
StackerCraneTaskCompletedEventArgs e = new StackerCraneTaskCompletedEventArgs(commonStackerCrane.CurrentTaskNum);
CommonStackerCrane_StackerCraneTaskCompletedEventHandler(commonStackerCrane, e);
@@ -362,8 +362,8 @@
CommonConveyorLine client = (CommonConveyorLine)device;
if (client.GetValue<ConveyorLineDBName, short>(ConveyorLineDBName.InteractiveSignal, stationManger.StationCode) != 99)//鍑哄簱绔欏彴鏈鍗犵敤
{
- task.NextAddress = stationManger.StackerCraneStationCode;
- _taskRepository.UpdateData(task);
+ //task.NextAddress = stationManger.StackerCraneStationCode;
+ //_taskRepository.UpdateData(task);
return task;
}
else
@@ -398,6 +398,10 @@
YLStackerCraneTaskCommand stackerCraneTaskCommand = new YLStackerCraneTaskCommand();
stackerCraneTaskCommand.PalletType = Convert.ToInt16(task.PalletType);
+ if (task.TaskLength>=1200 && task.TaskLength<1630)
+ {
+ stackerCraneTaskCommand.PalletType = 3;
+ }
stackerCraneTaskCommand.TaskNum = task.TaskNum;
stackerCraneTaskCommand.WorkType = 5;
if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup)//鍒ゆ柇鏄惁鏄叆搴撲换鍔�
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\346\210\220\345\223\201\344\273\223/AGV_CPExtend.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\346\210\220\345\223\201\344\273\223/AGV_CPExtend.cs"
index 90d7cc3..28dbd16 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\346\210\220\345\223\201\344\273\223/AGV_CPExtend.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\346\210\220\345\223\201\344\273\223/AGV_CPExtend.cs"
@@ -183,7 +183,7 @@
agvTaskSend.Variables.Add(pointDetail2);
agvTaskSend.Variables.Add(complete);
}
- if (task.TaskType==TaskTypeEnum.OutCarton.ObjToInt())
+ if (stationMangerStart.AGVStationCode.StartsWith("PNT_2")|| stationMangerEnd.AGVStationCode.StartsWith("PNT_2"))
{
agvTaskSend.AgvGroupCode = "GAOc";
}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\346\210\220\345\223\201\344\273\223/ConveyorLineJob_CPA.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\346\210\220\345\223\201\344\273\223/ConveyorLineJob_CPA.cs"
index f198bbf..b4b5965 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\346\210\220\345\223\201\344\273\223/ConveyorLineJob_CPA.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\346\210\220\345\223\201\344\273\223/ConveyorLineJob_CPA.cs"
@@ -70,7 +70,7 @@
OtherDevice device = (OtherDevice)value;
List<string> deviceStations = device.DeviceProDTOs.Select(x => x.DeviceChildCode).ToList();
//鑾峰彇鏈夊崗璁殑杈撻�佺嚎
- List<Dt_StationManger> stationMangers = _stationMangerRepository.QueryData();
+ List<Dt_StationManger> stationMangers = _stationMangerRepository.QueryData(x=>x.StationDeviceCode==device.DeviceCode);
foreach (var item in stationMangers.Where(x => deviceStations.Contains(x.StationCode)))
{
DeviceProDTO? deviceProRead = device.DeviceProDTOs.Where(x => x.DeviceChildCode == item.StationCode && x.DeviceProParamType == nameof(R_ConveyorLineCPDB)).OrderBy(x => x.DeviceProOffset).FirstOrDefault();
@@ -80,38 +80,26 @@
R_ConveyorLineCPInfo conveyorLineInfoRead = device.Communicator.ReadCustomer<R_ConveyorLineCPInfo>(deviceProRead.DeviceProAddress);
if (conveyorLineInfoRead != null && conveyorLineInfoRead.Command == 2 && conveyorLineInfoRead.TaskNo > 0 && item.StationType == StationTypeEnum.StationType_OnlyInbound.ObjToInt()) //浜屾ゼ绾夸綋鍏ュ簱绔欏彴->鍫嗗灈鏈�
{
- //鑾峰彇鍏ュ簱绔欏彴鏄惁瀛樺湪鍏ュ簱浠诲姟
Dt_Task task = _taskRepository.QueryFirst(x => x.TaskNum == conveyorLineInfoRead.TaskNo && x.NextAddress == item.StationCode && _taskService.TaskInboundTypes.Contains(x.TaskType) && x.TaskState == TaskStatusEnum.Line_Executing.ObjToInt() && x.DeviceCode == device.DeviceCode);
if (task != null)
{
- Dt_StationManger stationManger = stationMangers.FirstOrDefault(x => x.StationCode == task.SourceAddress);
- if (stationManger != null)
+ //鍒嗛厤璐т綅
+ string? local = _taskService.RequestAssignLocation(task.TaskNum, task.Roadway);
+ //鍒嗛厤璐т綅
+ if (!string.IsNullOrEmpty(local))
{
- string? local = "";
- switch (stationManger.AGVStationCode.ObjToInt() % 2)
- {
- case 1:
- local = task.Roadway + "-001-062-001-01";
- break;
- case 0:
- local = task.Roadway + "-002-062-001-01";
- break;
- default:
- WriteError(item.StationName, $"鏈壘鍒板彲鍒嗛厤宸烽亾{task.TaskNum}");
- break;
- }
- //鍒嗛厤璐т綅
- if (!string.IsNullOrEmpty(local))
- {
- task.CurrentAddress = item.StackerCraneStationCode;
- task.TargetAddress = local;
- task.NextAddress = local;
- task.DeviceCode = item.StackerCraneCode;
- _taskService.UpdateTask(task, TaskStatusEnum.SC_Execute);
- WriteInfo(item.StationName, $"浠诲姟鍙�:{task.TaskNum}杩涜鍫嗗灈鏈哄叆搴�");
- }
+ task.CurrentAddress = item.StackerCraneStationCode;
+ task.TargetAddress = local;
+ task.NextAddress = local;
+ task.DeviceCode = item.StackerCraneCode;
+ _taskService.UpdateTask(task, TaskStatusEnum.SC_Execute);
+ WriteInfo(item.StationName, $"浠诲姟鍙�:{task.TaskNum}杩涜鍫嗗灈鏈哄叆搴�");
}
}
+ else
+ {
+ WriteError(item.StationName, $"鏈壘鍒皗item.StationCode}鐨勪换鍔conveyorLineInfoRead.TaskNo}");
+ }
}
else if (conveyorLineInfoRead != null && conveyorLineInfoRead.Command == 4 && conveyorLineInfoRead.TaskNo <= 0 && item.StationType == StationTypeEnum.StationType_OnlyOutbound.ObjToInt()) //浜屾ゼ绾夸綋鍑哄簱绔欏彴
{
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\346\210\220\345\223\201\344\273\223/ConveyorLineJob_CPB.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\346\210\220\345\223\201\344\273\223/ConveyorLineJob_CPB.cs"
index 07edfd5..ffded56 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\346\210\220\345\223\201\344\273\223/ConveyorLineJob_CPB.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\346\210\220\345\223\201\344\273\223/ConveyorLineJob_CPB.cs"
@@ -70,7 +70,7 @@
{
OtherDevice device = (OtherDevice)value;
List<string> deviceStations = device.DeviceProDTOs.Select(x => x.DeviceChildCode).Distinct().ToList();
- List<Dt_StationManger> stationMangers = _stationMangerRepository.QueryData();
+ List<Dt_StationManger> stationMangers = _stationMangerRepository.QueryData(x => x.StationDeviceCode == device.DeviceCode);
foreach (var item in stationMangers.Where(x => deviceStations.Contains(x.StationCode)))
{
DeviceProDTO? deviceProRead = device.DeviceProDTOs.Where(x => x.DeviceChildCode == item.StationCode && x.DeviceProParamType == nameof(R_ConveyorLineCPDB)).OrderBy(x => x.DeviceProOffset).FirstOrDefault();
@@ -144,7 +144,11 @@
}
}
}
- else if (conveyorLineInfoRead != null && conveyorLineInfoRead.Command == 2 && conveyorLineInfoRead.TaskNo > 0)
+ }
+ else if (item.StationType == StationTypeEnum.StationType_OnlyOutbound.ObjToInt() && deviceProRead != null)
+ {//鍏ュ簱RGV鎺ラ┏浣嶄氦浜�
+ R_ConveyorLineCPInfo conveyorLineInfoRead = device.Communicator.ReadCustomer<R_ConveyorLineCPInfo>(deviceProRead.DeviceProAddress);
+ if (conveyorLineInfoRead != null && conveyorLineInfoRead.Command == 2 && conveyorLineInfoRead.TaskNo > 0)
{
Dt_Task task = _taskRepository.QueryFirst(x => x.TaskNum == conveyorLineInfoRead.TaskNo && x.NextAddress == item.StationCode && _taskService.TaskOutboundTypes.Contains(x.TaskType) && x.TaskState == TaskStatusEnum.Line_Executing.ObjToInt() && x.DeviceCode == device.DeviceCode);
if (task != null)
@@ -166,6 +170,45 @@
}
}
}
+ else if (item.StationType == StationTypeEnum.StationType_OnlyInbound.ObjToInt() && deviceProRead != null && deviceProWrite != null)
+ {
+ R_ConveyorLineCPInfo conveyorLineInfoRead = device.Communicator.ReadCustomer<R_ConveyorLineCPInfo>(deviceProRead.DeviceProAddress);
+ //鎴愬搧涓�妤煎叆搴撳彛鍐欏叆瀵瑰簲鍏ュ簱绔欏彴鍦板潃
+ if (conveyorLineInfoRead != null && conveyorLineInfoRead.Command == 4 && !string.IsNullOrEmpty(conveyorLineInfoRead.PalletCode))
+ {
+ Dt_Task task = _taskRepository.QueryFirst(x => x.PalletCode == conveyorLineInfoRead.PalletCode && x.CurrentAddress == item.StationCode && _taskService.TaskInboundTypes.Contains(x.TaskType) && x.TaskState == TaskStatusEnum.AGV_Finish.ObjToInt() && x.DeviceCode == device.DeviceCode);
+ if (task != null)
+ {
+ //鍒嗛厤宸烽亾 瀛樺叆鎵樼洏鏁版嵁
+ List<Dt_Router> routers = _routerService.QueryNextRoutes(item.StationCode, task.Roadway, task.TaskType);
+ Dt_Router? router = routers.FirstOrDefault();
+ if (routers == null || routers.Count == 0 || router == null)
+ {
+ WriteError(item.StationName, $"鏈壘鍒板搴旇矾鐢变俊鎭�,璁惧缂栧彿:{item.StationCode},浠诲姟鍙�:{task.TaskNum}");
+ continue;
+ }
+ if (routers.Count > 1)
+ {
+ WriteError(item.StationName, $"璺敱淇℃伅閰嶇疆閿欒,璁惧缂栧彿:{item.StationCode},浠诲姟鍙�:{task.TaskNum}");
+ continue;
+ }
+ //鍐欏叆鍏ュ簱绾夸綋鍦板潃
+ device.SetValue(W_ConveyorLineCPDB.W_TargetAddress, router.NextPosi, item.StationCode);
+ device.SetValue(W_ConveyorLineCPDB.W_TaskNo, task.TaskNum, item.StationCode);
+ device.SetValue(W_ConveyorLineCPDB.W_Command, 1, item.StationCode);
+ //鏇存柊浠诲姟淇℃伅
+ task.CurrentAddress = item.StationCode;
+ task.NextAddress = router.NextPosi;
+ task.DeviceCode = router.ChildPosiDeviceCode;
+ _taskService.UpdateTask(task, TaskStatusEnum.Line_Executing);
+ WriteInfo(item.StationName, $"浠诲姟鍙穥conveyorLineInfoRead.TaskNo}涓嬩竴姝�");
+ }
+ else
+ {
+ WriteError(item.StationName, $"鏈壘鍒拌澶囧瓙缂栧彿{item.StationCode}鐨勫崗璁俊鎭�");
+ }
+ }
+ }
else if (item.StationType == StationTypeEnum.StationType_InboundAndOutbound.ObjToInt() && deviceProRead != null)
{//鍏ュ簱RGV鎺ラ┏浣嶄氦浜�
R_ConveyorLineCPInfo conveyorLineInfoRead = device.Communicator.ReadCustomer<R_ConveyorLineCPInfo>(deviceProRead.DeviceProAddress);
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\346\210\220\345\223\201\344\273\223/StackerCraneJob_CP.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\346\210\220\345\223\201\344\273\223/StackerCraneJob_CP.cs"
index 2fdc8c7..f7a83e6 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\346\210\220\345\223\201\344\273\223/StackerCraneJob_CP.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\346\210\220\345\223\201\344\273\223/StackerCraneJob_CP.cs"
@@ -23,6 +23,7 @@
using SqlSugar.Extensions;
using WIDESEAWCS_Tasks.ConveyorLineJob;
using WIDESEAWCS_QuartzJob.Repository;
+using WIDESEAWCS_QuartzJob.StackerCrane;
namespace WIDESEAWCS_Tasks
{
@@ -57,8 +58,13 @@
{
commonStackerCrane.StackerCraneTaskCompletedEventHandler += CommonStackerCrane_StackerCraneTaskCompletedEventHandler;//璁㈤槄浠诲姟瀹屾垚浜嬩欢
}
- commonStackerCrane.CheckStackerCraneTaskCompleted();//闃叉浠诲姟瀹屾垚浜嬩欢鐩戞祴瓒呮椂锛屽啀鎵嬪姩瑙﹀彂涓�娆�
- if (commonStackerCrane.StackerCraneAutoStatusValue == StackerCraneAutoStatus.Automatic && commonStackerCrane.StackerCraneStatusValue == StackerCraneStatus.Normal && commonStackerCrane.StackerCraneWorkStatusValue == StackerCraneWorkStatus.Standby)
+ //commonStackerCrane.CheckStackerCraneTaskCompleted();//闃叉浠诲姟瀹屾垚浜嬩欢鐩戞祴瓒呮椂锛屽啀鎵嬪姩瑙﹀彂涓�娆�
+ if (commonStackerCrane.CurrentTaskNum > 0 && (commonStackerCrane.StackerCraneWorkStatusValue == StackerCraneWorkStatus.WorkCompleted || commonStackerCrane.Communicator.Read<short>("DB1000.40.0") == 3))
+ {
+ StackerCraneTaskCompletedEventArgs e = new StackerCraneTaskCompletedEventArgs(commonStackerCrane.CurrentTaskNum);
+ CommonStackerCrane_StackerCraneTaskCompletedEventHandler(commonStackerCrane, e);
+ }
+ else if (commonStackerCrane.StackerCraneAutoStatusValue == StackerCraneAutoStatus.Automatic && commonStackerCrane.StackerCraneStatusValue == StackerCraneStatus.Normal && commonStackerCrane.StackerCraneWorkStatusValue == StackerCraneWorkStatus.Standby)
{
short stackerError = commonStackerCrane.Communicator.Read<short>("DB1000.54.0");
if (stackerError == 0)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_BasicService/Service/LocationInfoService_Common.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_BasicService/Service/LocationInfoService_Common.cs"
index 45b7e5c..408d4bf 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_BasicService/Service/LocationInfoService_Common.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_BasicService/Service/LocationInfoService_Common.cs"
@@ -128,7 +128,7 @@
Dt_LocationInfo locationInfo = new Dt_LocationInfo();
foreach (var item in locationInfosMedium)
{
- if (item.Layer == 7 || item.Layer == 8)
+ if (LayerLimit && (item.Layer == 7 || item.Layer == 8))
{
locationInfo = item;
break;
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Common/CommonEnum/StationAreaEnum.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Common/CommonEnum/StationAreaEnum.cs"
index 2a8e55b..cc38534 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Common/CommonEnum/StationAreaEnum.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Common/CommonEnum/StationAreaEnum.cs"
@@ -109,6 +109,11 @@
/// 浜屾ゼ闆惧寲
/// </summary>
[Description("浜屾ゼ闆惧寲")]
- 浜屾ゼ闆惧寲 = 17
+ 浜屾ゼ闆惧寲 = 17,
+ /// <summary>
+ /// 浜屾ゼ鎴愬搧搴撶紦瀛樺尯
+ /// </summary>
+ [Description("浜屾ゼ鎴愬搧搴撶紦瀛樺尯")]
+ 浜屾ゼ鎴愬搧搴撶紦瀛樺尯 = 18
}
}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Common/TaskEnum/TaskTypeEnum.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Common/TaskEnum/TaskTypeEnum.cs"
index 8381df3..61a71e3 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Common/TaskEnum/TaskTypeEnum.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Common/TaskEnum/TaskTypeEnum.cs"
@@ -106,6 +106,12 @@
Inbound = 510,
/// <summary>
+ /// 浜屾ゼ绔欑偣鎴愬搧鍏ュ簱
+ /// </summary>
+ [Description("浜屾ゼ绔欑偣鎴愬搧鍏ュ簱")]
+ Inbound2ndFloor = 515,
+
+ /// <summary>
/// 鐩樼偣鍏ュ簱
/// </summary>
[Description("鐩樼偣鍏ュ簱")]
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_ITaskInfoService/ITaskService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_ITaskInfoService/ITaskService.cs"
index 88fc6d7..4293f6d 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_ITaskInfoService/ITaskService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_ITaskInfoService/ITaskService.cs"
@@ -89,7 +89,7 @@
/// 鍒嗛厤鍘熸枡宸烽亾
/// </summary>
/// <returns></returns>
- string AssignYLRoadwayNo(string palletCode);
+ string AssignYLRoadwayNo(string palletCode, int wide = 0, int thickness = 0, int weight = 0);
/// <summary>
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/TaskInfo/Dt_Task.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/TaskInfo/Dt_Task.cs"
index 38cd103..75af67b 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/TaskInfo/Dt_Task.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_Model/Models/TaskInfo/Dt_Task.cs"
@@ -184,7 +184,7 @@
public string WorkCentreCode { get; set; }
/// <summary>
- /// 鐗╂枡缂栧彿
+ /// MES璁″垝Id
/// </summary>
[ImporterHeader(Name = "MES璁″垝Id")]
[ExporterHeader(DisplayName = "MES璁″垝Id")]
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Inbound.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Inbound.cs"
index 5d9e50b..e20a855 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Inbound.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Inbound.cs"
@@ -405,98 +405,200 @@
}
if (orderType>0) //鏂板巶绾稿嵎骞冲彴鍏ュ簱
{
- //鑾峰彇涓诲崟
- Dt_InboundOrder inboundOrder = BaseDal.Db.Queryable<Dt_InboundOrder>().Where(x=>x.OrderType==orderType).Includes(x=>x.Details).Where(x=>x.Details.Any(v=>v.BarCode==palletCode)).First();
- if (inboundOrder==null)
+ InOrderTypeEnum inOrderTypeEnum = (InOrderTypeEnum)orderType;
+ if (inOrderTypeEnum== InOrderTypeEnum.PurchaseIn)
{
- throw new Exception($"鏈壘鍒版潯鐮亄palletCode}鍏ュ簱鍗曟嵁淇℃伅");
- }
- Dt_InboundOrderDetail inboundOrderDetail = inboundOrder.Details.FirstOrDefault(x=>x.BarCode == palletCode);
- if (inboundOrderDetail==null)
- {
- throw new Exception($"鏈壘鍒板叆搴撳崟鍙蜂负{inboundOrder.UpperOrderNo}鏉$爜{palletCode}鍗曟嵁淇℃伅");
- }
- if (inboundOrderDetail.MaterialWide < 690)
- {
- return content.Error("鏂板巶鐗╂枡骞呭闄愬埗涓�690-2700mm");
- }
- if (inboundOrderDetail.MaterialThick<=0)
- {
- return content.Error("鐗╂枡鐩村緞闇�瑕佸ぇ浜�0");
- }
- if (inboundOrderDetail.OrderDetailStatus != InOrderStatusEnum.鏈紑濮�.ObjToInt())
- {
- throw new Exception($"鏉$爜{palletCode}淇℃伅宸插叆搴撴垨鍏ュ簱涓�");
- }
- Dt_YLInboundCache? yLInboundCache = _inboundRepository.YLInboundCacheRepository.QueryData(x => x.InvOrg == MaterielInvOrgEnum.鏂板巶.ToString()).FirstOrDefault();
- if (yLInboundCache == null)
- {
- throw new Exception("鏈壘鍒板師鏂欐潯鐮佺紦瀛樹俊鎭�");
- }
- int Id = yLInboundCache.Id;
- if (yLInboundCache.BarCode == palletCode)
- {
- throw new Exception($"鏉$爜{palletCode}宸叉壂鐮�");
- }
- else if (yLInboundCache.BarCode != palletCode && yLInboundCache.BindStatus == WhetherEnum.True.ObjToInt())
- {
- yLInboundCache = _mapper.Map<Dt_YLInboundCache>(inboundOrderDetail);
- yLInboundCache.Id = Id;
+ //鑾峰彇涓诲崟
+ Dt_PurchaseOrder inboundOrder = BaseDal.Db.Queryable<Dt_PurchaseOrder>().Includes(x => x.Details).Where(x => x.Details.Any(v => v.BarCode == palletCode)).First();
- //鑾峰彇鐗╂枡
- Dt_MaterielInfo materielInfo = _basicRepository.MaterielInfoRepository.QueryFirst(x => x.MaterielCode == inboundOrderDetail.MaterialCode);
- //鐢熸垚搴撳瓨缁勭洏淇℃伅
- Dt_StockInfo stockInfo = new Dt_StockInfo()
+ if (inboundOrder == null)
{
- MaterielInvOrgId = materielInfo.MaterielInvOrgId,
- PalletCode = inboundOrderDetail.BarCode,
- RfidCode = "",
- LocationCode = "",
- PalletType = 1,
- WarehouseId = materielInfo.WarehouseId,
- StockAttribute = materielInfo.MaterielSourceType,
- StockStatus = StockStatusEmun.缁勭洏鏆傚瓨.ObjToInt(),
- MaterielSpec = materielInfo.MaterielSpec,
- Unit = materielInfo.MaterielUnit,
- MaterielThickness = inboundOrderDetail.MaterialThick,
- MaterielWide = inboundOrderDetail.MaterialWide,
- MaterielWeight = inboundOrderDetail.MaterialWeight,
- MaterielCode = materielInfo.MaterielCode,
- MaterielName = materielInfo.MaterielName,
- BatchNo=inboundOrderDetail.MaterialLot,
- StockLength = inboundOrderDetail.OrderQuantity
- };
- if (inboundOrderDetail.MaterialWide > 1200)
- {
- stockInfo.PalletType = 2;
+ throw new Exception($"鏈壘鍒版潯鐮亄palletCode}閲囪喘鍏ュ簱鍗曟嵁淇℃伅");
}
- inboundOrderDetail.OrderDetailStatus = InOrderStatusEnum.鍏ュ簱涓�.ObjToInt();
- _unitOfWorkManage.BeginTran();
- _inboundRepository.YLInboundCacheRepository.UpdateData(yLInboundCache);
- //鏂板缁勭洏淇℃伅
- _stockRepository.StockInfoRepository.AddData(stockInfo);
- if (inboundOrder.InboundOrderStatus == InOrderStatusEnum.鏈紑濮�.ObjToInt())
+ Dt_PurchaseOrderDetail inboundOrderDetail = inboundOrder.Details.FirstOrDefault(x => x.BarCode == palletCode);
+
+ if (inboundOrderDetail == null)
{
- inboundOrder.InboundOrderStatus = InOrderStatusEnum.鍏ュ簱涓�.ObjToInt();
- _inboundRepository.InboundOrderRepository.UpdateData(inboundOrder);
+ throw new Exception($"鏈壘鍒板叆搴撳崟鍙蜂负{inboundOrder.PurchaseOrderNo}鏉$爜{palletCode}鍗曟嵁淇℃伅");
}
- _inboundRepository.InboundOrderDetailRepository.UpdateData(inboundOrderDetail);
- //鍚姩绾夸綋
- WebResponseContent webResponse = YLPurchasePush();
- if (!webResponse.Status)
+ if (inboundOrderDetail.PurchaseDetailWide < 690)
{
- throw new Exception(webResponse.Message);
+ return content.Error("鏂板巶鐗╂枡骞呭闄愬埗涓�690-2700mm");
}
- _unitOfWorkManage.CommitTran();
- Dt_StockInfo stockInfoAdd = _stockRepository.StockInfoRepository.QueryFirst(x => x.PalletCode == stockInfo.PalletCode);
- //璁板綍搴撳瓨鍙樺姩
- _recordService.StockQuantityChangeRecordService.AddStockChangeRecord(stockInfoAdd, 0, stockInfoAdd.StockLength, StockChangeTypeEnum.MaterielGroup);
- return content.OK("鎴愬姛", yLInboundCache);
+ if (inboundOrderDetail.PurchaseDetailThickness <= 0)
+ {
+ return content.Error("鐗╂枡鐩村緞闇�瑕佸ぇ浜�0");
+ }
+ if (inboundOrderDetail.PurchaseDetailStatus != InOrderStatusEnum.鏈紑濮�.ObjToInt())
+ {
+ throw new Exception($"鏉$爜{palletCode}淇℃伅宸插叆搴撴垨鍏ュ簱涓�");
+ }
+ Dt_YLInboundCache? yLInboundCache = _inboundRepository.YLInboundCacheRepository.QueryData(x => x.InvOrg == MaterielInvOrgEnum.鏂板巶.ToString()).FirstOrDefault();
+ if (yLInboundCache == null)
+ {
+ throw new Exception("鏈壘鍒板師鏂欐潯鐮佺紦瀛樹俊鎭�");
+ }
+ int Id = yLInboundCache.Id;
+ if (yLInboundCache.BarCode == palletCode)
+ {
+ throw new Exception($"鏉$爜{palletCode}宸叉壂鐮�");
+ }
+ else if (yLInboundCache.BarCode != palletCode && yLInboundCache.BindStatus == WhetherEnum.True.ObjToInt())
+ {
+ yLInboundCache = _mapper.Map<Dt_YLInboundCache>(inboundOrderDetail);
+ yLInboundCache.Id = Id;
+
+ //鑾峰彇鐗╂枡
+ Dt_MaterielInfo materielInfo = _basicRepository.MaterielInfoRepository.QueryFirst(x => x.MaterielCode == inboundOrderDetail.MaterialCode);
+ //鐢熸垚搴撳瓨缁勭洏淇℃伅
+ Dt_StockInfo stockInfo = new Dt_StockInfo()
+ {
+ MaterielInvOrgId = materielInfo.MaterielInvOrgId,
+ PalletCode = inboundOrderDetail.BarCode,
+ RfidCode = "",
+ LocationCode = "",
+ PalletType = 1,
+ WarehouseId = materielInfo.WarehouseId,
+ StockAttribute = materielInfo.MaterielSourceType,
+ StockStatus = StockStatusEmun.缁勭洏鏆傚瓨.ObjToInt(),
+ MaterielSpec = materielInfo.MaterielSpec,
+ Unit = materielInfo.MaterielUnit,
+ MaterielThickness = inboundOrderDetail.PurchaseDetailThickness,
+ MaterielWide = inboundOrderDetail.PurchaseDetailWide,
+ MaterielWeight = inboundOrderDetail.PurchaseDetailWeight,
+ MaterielCode = materielInfo.MaterielCode,
+ MaterielName = materielInfo.MaterielName,
+ BatchNo = inboundOrderDetail.MaterialLot,
+ StockLength = inboundOrderDetail.PurchaseDetailQuantity
+ };
+ if (inboundOrderDetail.PurchaseDetailWide > 1200)
+ {
+ stockInfo.PalletType = 2;
+ }
+ inboundOrderDetail.PurchaseDetailStatus = InOrderStatusEnum.鍏ュ簱涓�.ObjToInt();
+ _unitOfWorkManage.BeginTran();
+ _inboundRepository.YLInboundCacheRepository.UpdateData(yLInboundCache);
+ //鏂板缁勭洏淇℃伅
+ _stockRepository.StockInfoRepository.AddData(stockInfo);
+ if (inboundOrder.PurchaseOrderStatus == InOrderStatusEnum.鏈紑濮�.ObjToInt())
+ {
+ inboundOrder.PurchaseOrderStatus = InOrderStatusEnum.鍏ュ簱涓�.ObjToInt();
+ _inboundRepository.PurchaseOrderRepository.UpdateData(inboundOrder);
+ }
+ _inboundRepository.PurchaseOrderDetailRepository.UpdateData(inboundOrderDetail);
+ //鍚姩绾夸綋
+ WebResponseContent webResponse = YLPurchasePush();
+ if (!webResponse.Status)
+ {
+ throw new Exception(webResponse.Message);
+ }
+ _unitOfWorkManage.CommitTran();
+ Dt_StockInfo stockInfoAdd = _stockRepository.StockInfoRepository.QueryFirst(x => x.PalletCode == stockInfo.PalletCode);
+ //璁板綍搴撳瓨鍙樺姩
+ _recordService.StockQuantityChangeRecordService.AddStockChangeRecord(stockInfoAdd, 0, stockInfoAdd.StockLength, StockChangeTypeEnum.MaterielGroup);
+ return content.OK("鎴愬姛", yLInboundCache);
+ }
+ else
+ {
+ throw new Exception($"涓婂嵎鏉$爜{yLInboundCache.BarCode}杩樻湭杩涜缁戝畾");
+ }
}
else
{
- throw new Exception($"涓婂嵎鏉$爜{yLInboundCache.BarCode}杩樻湭杩涜缁戝畾");
+ //鑾峰彇涓诲崟
+ Dt_InboundOrder inboundOrder = BaseDal.Db.Queryable<Dt_InboundOrder>().Where(x => x.OrderType == orderType).Includes(x => x.Details).Where(x => x.Details.Any(v => v.BarCode == palletCode)).First();
+ if (inboundOrder == null)
+ {
+ throw new Exception($"鏈壘鍒版潯鐮亄palletCode}鍏ュ簱鍗曟嵁淇℃伅");
+ }
+ Dt_InboundOrderDetail inboundOrderDetail = inboundOrder.Details.FirstOrDefault(x => x.BarCode == palletCode);
+ if (inboundOrderDetail == null)
+ {
+ throw new Exception($"鏈壘鍒板叆搴撳崟鍙蜂负{inboundOrder.UpperOrderNo}鏉$爜{palletCode}鍗曟嵁淇℃伅");
+ }
+ if (inboundOrderDetail.MaterialWide < 690)
+ {
+ return content.Error("鏂板巶鐗╂枡骞呭闄愬埗涓�690-2700mm");
+ }
+ if (inboundOrderDetail.MaterialThick <= 0)
+ {
+ return content.Error("鐗╂枡鐩村緞闇�瑕佸ぇ浜�0");
+ }
+ if (inboundOrderDetail.OrderDetailStatus != InOrderStatusEnum.鏈紑濮�.ObjToInt())
+ {
+ throw new Exception($"鏉$爜{palletCode}淇℃伅宸插叆搴撴垨鍏ュ簱涓�");
+ }
+ Dt_YLInboundCache? yLInboundCache = _inboundRepository.YLInboundCacheRepository.QueryData(x => x.InvOrg == MaterielInvOrgEnum.鏂板巶.ToString()).FirstOrDefault();
+ if (yLInboundCache == null)
+ {
+ throw new Exception("鏈壘鍒板師鏂欐潯鐮佺紦瀛樹俊鎭�");
+ }
+ int Id = yLInboundCache.Id;
+ if (yLInboundCache.BarCode == palletCode)
+ {
+ throw new Exception($"鏉$爜{palletCode}宸叉壂鐮�");
+ }
+ else if (yLInboundCache.BarCode != palletCode && yLInboundCache.BindStatus == WhetherEnum.True.ObjToInt())
+ {
+ yLInboundCache = _mapper.Map<Dt_YLInboundCache>(inboundOrderDetail);
+ yLInboundCache.Id = Id;
+
+ //鑾峰彇鐗╂枡
+ Dt_MaterielInfo materielInfo = _basicRepository.MaterielInfoRepository.QueryFirst(x => x.MaterielCode == inboundOrderDetail.MaterialCode);
+ //鐢熸垚搴撳瓨缁勭洏淇℃伅
+ Dt_StockInfo stockInfo = new Dt_StockInfo()
+ {
+ MaterielInvOrgId = materielInfo.MaterielInvOrgId,
+ PalletCode = inboundOrderDetail.BarCode,
+ RfidCode = "",
+ LocationCode = "",
+ PalletType = 1,
+ WarehouseId = materielInfo.WarehouseId,
+ StockAttribute = materielInfo.MaterielSourceType,
+ StockStatus = StockStatusEmun.缁勭洏鏆傚瓨.ObjToInt(),
+ MaterielSpec = materielInfo.MaterielSpec,
+ Unit = materielInfo.MaterielUnit,
+ MaterielThickness = inboundOrderDetail.MaterialThick,
+ MaterielWide = inboundOrderDetail.MaterialWide,
+ MaterielWeight = inboundOrderDetail.MaterialWeight,
+ MaterielCode = materielInfo.MaterielCode,
+ MaterielName = materielInfo.MaterielName,
+ BatchNo = inboundOrderDetail.MaterialLot,
+ StockLength = inboundOrderDetail.OrderQuantity
+ };
+ if (inboundOrderDetail.MaterialWide > 1200)
+ {
+ stockInfo.PalletType = 2;
+ }
+ inboundOrderDetail.OrderDetailStatus = InOrderStatusEnum.鍏ュ簱涓�.ObjToInt();
+ _unitOfWorkManage.BeginTran();
+ _inboundRepository.YLInboundCacheRepository.UpdateData(yLInboundCache);
+ //鏂板缁勭洏淇℃伅
+ _stockRepository.StockInfoRepository.AddData(stockInfo);
+ if (inboundOrder.InboundOrderStatus == InOrderStatusEnum.鏈紑濮�.ObjToInt())
+ {
+ inboundOrder.InboundOrderStatus = InOrderStatusEnum.鍏ュ簱涓�.ObjToInt();
+ _inboundRepository.InboundOrderRepository.UpdateData(inboundOrder);
+ }
+ _inboundRepository.InboundOrderDetailRepository.UpdateData(inboundOrderDetail);
+ //鍚姩绾夸綋
+ WebResponseContent webResponse = YLPurchasePush();
+ if (!webResponse.Status)
+ {
+ throw new Exception(webResponse.Message);
+ }
+ _unitOfWorkManage.CommitTran();
+ Dt_StockInfo stockInfoAdd = _stockRepository.StockInfoRepository.QueryFirst(x => x.PalletCode == stockInfo.PalletCode);
+ //璁板綍搴撳瓨鍙樺姩
+ _recordService.StockQuantityChangeRecordService.AddStockChangeRecord(stockInfoAdd, 0, stockInfoAdd.StockLength, StockChangeTypeEnum.MaterielGroup);
+ return content.OK("鎴愬姛", yLInboundCache);
+ }
+ else
+ {
+ throw new Exception($"涓婂嵎鏉$爜{yLInboundCache.BarCode}杩樻湭杩涜缁戝畾");
+ }
}
+
}
else //鑰佸巶绾稿嵎骞冲彴鍏ュ簱
{
@@ -686,7 +788,7 @@
/// <param name="palletCode">鏉$爜鍙�</param>
/// <returns></returns>
/// <exception cref="Exception"></exception>
- public string AssignYLRoadwayNo(string palletCode)
+ public string AssignYLRoadwayNo(string palletCode, int wide = 0, int thickness = 0, int weight = 0)
{
try
{
@@ -704,10 +806,19 @@
string roadwayNo = "";
+ bool isReturn=false;
+
if (stockInfo.MaterielInvOrgId==MaterielInvOrgEnum.鏂板巶.ObjToInt())
{
+ if (wide>0 && thickness>0 && weight>0)
+ {
+ stockInfo.CheckThickness = thickness;
+ stockInfo.CheckWeight = weight;
+ stockInfo.CheckWide = wide;
+ isReturn = true;
+ }
//闄愬埗鐩村緞
- if (stockInfo.CheckThickness >= 300 && stockInfo.CheckThickness <= 1300 && stockInfo.MaterielWide >= 690 && stockInfo.MaterielWide <= 2700)
+ if (stockInfo.CheckThickness >= 300 && stockInfo.CheckThickness <= 1300 && stockInfo.MaterielWide >= 690 && stockInfo.MaterielWide <= 2500)
{
//鑾峰彇鍒嗛厤
List<LocationCount> locationCounts = Db.Queryable<Dt_LocationInfo>().Where(x => x.WarehouseId == warehouse.WarehouseId && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && x.EnableStatus == EnableStatusEnum.Normal.ObjToInt() && x.RoadwayNo.Contains("YLDual") && (stockInfo.PalletType == LocationTypeEnum.MediumPallet.ObjToInt() ? x.LocationType == LocationTypeEnum.MediumPallet.ObjToInt(): x.LocationType == LocationTypeEnum.SmallPallet.ObjToInt())).GroupBy(x => x.RoadwayNo).Select(x => new LocationCount { RoadwayNo = x.RoadwayNo, Count = SqlFunc.AggregateCount(x) }).OrderBy(x => x.RoadwayNo).ToList();
@@ -720,17 +831,33 @@
//闄愬埗
if (stockInfo.CheckThickness >= 800 && stockInfo.CheckThickness <= 1500 && stockInfo.MaterielWide >= 700 && stockInfo.MaterielWide <= 2500)
{
- bool LayerLimit = false;
- if (stockInfo.CheckThickness > 1300)
+ bool LayerLimit = stockInfo.CheckThickness > 1300;
+ bool RoadwayLimit = stockInfo.MaterielWide > 2200;
+ var query = Db.Queryable<Dt_LocationInfo>()
+ .Where(x => x.WarehouseId == warehouse.WarehouseId
+ && x.LocationStatus == (int)LocationStatusEnum.Free
+ && x.EnableStatus == (int)EnableStatusEnum.Normal
+ && x.RoadwayNo.Contains("YL"))
+ .Select(x => new { x.RoadwayNo, x.Columns });
+
+ // 鏍规嵁鏉′欢杩囨护
+ if (LayerLimit)
{
- LayerLimit = true;
+ query = query.Where(x => x.Columns >= 56 && !x.RoadwayNo.Contains("YLDual"));
}
- //鑾峰彇鍒嗛厤
- List<LocationCount> locationCounts = Db.Queryable<Dt_LocationInfo>().Where(x => x.WarehouseId == warehouse.WarehouseId && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && x.EnableStatus == EnableStatusEnum.Normal.ObjToInt() && x.RoadwayNo.Contains("YL") && !x.RoadwayNo.Contains("YLDual") && (LayerLimit ? x.Columns>=56 : x.Columns<=55)).GroupBy(x => x.RoadwayNo).Select(x => new LocationCount { RoadwayNo = x.RoadwayNo, Count = SqlFunc.AggregateCount(x) }).OrderBy(x => x.RoadwayNo).ToList();
- if (stockInfo.MaterielWide > 2200)
+ if (RoadwayLimit)
{
- locationCounts = Db.Queryable<Dt_LocationInfo>().Where(x => x.WarehouseId == warehouse.WarehouseId && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && x.EnableStatus == EnableStatusEnum.Normal.ObjToInt() && x.RoadwayNo == "SC02_YL" && (LayerLimit ? x.Columns >= 56 : x.Columns <= 55)).GroupBy(x => x.RoadwayNo).Select(x => new LocationCount { RoadwayNo = x.RoadwayNo, Count = SqlFunc.AggregateCount(x) }).OrderBy(x => x.RoadwayNo).ToList();
+ query = query.Where(x => !x.RoadwayNo.Contains("SC01_YL"));
}
+ List<LocationCount> locationCounts = query
+ .GroupBy(x => x.RoadwayNo)
+ .Select(x => new LocationCount
+ {
+ RoadwayNo = x.RoadwayNo,
+ Count = SqlFunc.AggregateCount(x)
+ })
+ .OrderBy(x => x.RoadwayNo)
+ .ToList();
roadwayNo = HandleRoadway(locationCounts, warehouse);
}
@@ -742,7 +869,12 @@
roadwayNo = HandleRoadway(locationCounts, warehouse);
}
}
-
+
+ if (isReturn && !string.IsNullOrEmpty(roadwayNo))
+ {
+ _stockRepository.StockInfoRepository.UpdateData(stockInfo);
+ }
+
return !string.IsNullOrEmpty(roadwayNo) ? (roadwayNo) : throw new Exception("鏈壘鍒板彲鍒嗛厤宸烽亾");
}
catch (Exception ex)
@@ -1264,6 +1396,10 @@
Quantity = inboundOrderDetail.OrderQuantity,
PalletType = 1
};
+ if (agvstation.StationArea==StationAreaEnum.浜屾ゼ鎴愬搧搴撶紦瀛樺尯.ToString())
+ {
+ newTask.TaskType = TaskTypeEnum.Inbound2ndFloor.ObjToInt();
+ }
inboundOrderDetail.OrderDetailStatus = InOrderStatusEnum.鍏ュ簱涓�.ObjToInt();
_unitOfWorkManage.BeginTran();
if (inboundOrder.InboundOrderStatus == InOrderStatusEnum.鏈紑濮�.ObjToInt())
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Outbound.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Outbound.cs"
index bc8997a..8217f9e 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Outbound.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Outbound.cs"
@@ -164,6 +164,7 @@
return content.Error($"璐т綅鐘舵�佷笉姝g‘");
}
Dt_StockInfo stockInfo = _stockRepository.StockInfoRepository.QueryFirst(x => x.PalletCode == task.PalletCode);
+ int wareId=stockInfo.WarehouseId;
if (stockInfo != null && stockInfo.StockStatus == StockStatusEmun.鍑哄簱閿佸畾.ObjToInt())
{
task.TaskStatus = TaskStatusEnum.Finish.ObjToInt();
@@ -207,7 +208,7 @@
}
}
}
- _basicService.LocationInfoService.UpdateLocationStatus(locationInfoStart, stockInfo.PalletType, LocationStatusEnum.Free, stockInfo.WarehouseId);
+ _basicService.LocationInfoService.UpdateLocationStatus(locationInfoStart, stockInfo.PalletType, LocationStatusEnum.Free, wareId);
BaseDal.DeleteAndMoveIntoHty(task, App.User.UserId > 0 ? OperateTypeEnum.浜哄伐瀹屾垚 : OperateTypeEnum.鑷姩瀹屾垚);
_unitOfWorkManage.CommitTran();
}
@@ -242,7 +243,7 @@
DispatchPlanMaterialId=item.OrderDetailId,
UnitCode=item.Unit,
GradeCode="001",
- MainQuantity=item.AssignQuantity,
+ MainQuantity=item.OriginalQuantity,
AssistUnitCode=item.AssistUnit,
LocationCode= address,
LotNumber=item.BatchNo,
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs"
index 6b27ca9..f09f439 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs"
@@ -201,9 +201,9 @@
/// <param name="palletCode"></param>
/// <returns></returns>
[HttpPost, HttpGet, Route("AssignYLRoadwayNo"), AllowAnonymous]
- public WebResponseContent AssignYLRoadwayNo(string palletCode)
+ public WebResponseContent AssignYLRoadwayNo(string palletCode,int wide = 0, int thickness = 0, int weight = 0)
{
- string roadWay= Service.AssignYLRoadwayNo(palletCode);
+ string roadWay= Service.AssignYLRoadwayNo(palletCode, wide, thickness, wide);
if (string.IsNullOrEmpty(roadWay))
{
return WebResponseContent.Instance.Error("鏈壘鍒板彲鍒嗛厤宸烽亾");
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Filter/CustomProfile.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Filter/CustomProfile.cs"
index 17c5bec..d526399 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Filter/CustomProfile.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Filter/CustomProfile.cs"
@@ -83,6 +83,8 @@
CreateMap<InboundDetailItem, Dt_InboundOrderDetail>().ForMember(x => x.OrderQuantity, b => b.MapFrom(b => b.MaterialQty)).ForMember(x => x.OrderDetailStatus, b => b.MapFrom(b => InOrderStatusEnum.鏈紑濮�.ObjToInt())).ForMember(x => x.MaterialThick, b => b.MapFrom(b => b.Thickness)).ForMember(x => x.MaterialWide, b => b.MapFrom(b => b.Wide)).ForMember(x => x.MaterialWeight, b => b.MapFrom(b => b.Weight)).ForMember(x => x.OrderQuantity, b => b.MapFrom(b => b.MaterialQty));
//鍗氭�濋�氱紦瀛橀噰璐浆鎹�
CreateMap<Dt_InboundOrderDetail, Dt_YLInboundCache>().ForMember(x => x.Id, b => b.MapFrom(b => 0)).ForMember(x => x.BindStatus, b => b.MapFrom(b => WhetherEnum.False.ObjToInt())).ForMember(x => x.RfidCode, b => b.MapFrom(b => "")).ForMember(x => x.MaterialNo, b => b.MapFrom(b => b.MaterialCode)).ForMember(x => x.InvOrg, b => b.MapFrom(b => MaterielInvOrgEnum.鏂板巶.ToString()));
+ //浜屾湡缂撳瓨閲囪喘杞崲
+ CreateMap<Dt_PurchaseOrderDetail, Dt_YLInboundCache>().ForMember(x => x.Id, b => b.MapFrom(b => 0)).ForMember(x => x.BindStatus, b => b.MapFrom(b => WhetherEnum.False.ObjToInt())).ForMember(x => x.RfidCode, b => b.MapFrom(b => "")).ForMember(x => x.MaterialNo, b => b.MapFrom(b => b.MaterialCode)).ForMember(x => x.InvOrg, b => b.MapFrom(b => MaterielInvOrgEnum.鏂板巶.ToString())).ForMember(x => x.MaterialWide, b => b.MapFrom(b => b.PurchaseDetailWide)).ForMember(x => x.MaterialThick, b => b.MapFrom(b => b.PurchaseDetailThickness)).ForMember(x => x.ProcurementLength, b => b.MapFrom(b => b.PurchaseDetailQuantity)).ForMember(x => x.DeliveryQty, b => b.MapFrom(b => b.PurchaseDetailWeight));
//鍗氭�濋�氬嚭搴撹鎯呰�佸巶鍑哄簱绾夸綋缂撳瓨杞崲
CreateMap<Dt_OutStockLockInfo, Dt_OutLineView>().ForMember(x => x.Id, b => b.MapFrom(b => 0));
}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/\351\276\231\345\210\251\345\276\227PDA/common/config.js" "b/\351\241\271\347\233\256\344\273\243\347\240\201/\351\276\231\345\210\251\345\276\227PDA/common/config.js"
index 03b55ec..8831f24 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/\351\276\231\345\210\251\345\276\227PDA/common/config.js"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/\351\276\231\345\210\251\345\276\227PDA/common/config.js"
@@ -1,6 +1,6 @@
let config = {
- baseUrl: 'http://192.168.35.3:9283',
- //baseUrl: 'http://127.0.0.1:9293',
+ //baseUrl: 'http://192.168.35.3:9283',
+ baseUrl: 'http://127.0.0.1:9293',
urls: [
'http://192.168.35.3:9283',
'http://192.168.35.3:9283'
diff --git "a/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\345\215\217\350\256\256/WMS\346\226\207\346\241\24320251119.docx" "b/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\345\215\217\350\256\256/WMS\346\226\207\346\241\24320251119.docx"
new file mode 100644
index 0000000..d7dbf57
--- /dev/null
+++ "b/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\345\215\217\350\256\256/WMS\346\226\207\346\241\24320251119.docx"
Binary files differ
diff --git "a/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\345\215\217\350\256\256/WMS\346\226\207\346\241\24320251216.docx" "b/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\345\215\217\350\256\256/WMS\346\226\207\346\241\24320251216.docx"
new file mode 100644
index 0000000..5bc42db
--- /dev/null
+++ "b/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\345\215\217\350\256\256/WMS\346\226\207\346\241\24320251216.docx"
Binary files differ
diff --git "a/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\345\215\217\350\256\256/\345\215\232\346\226\257\351\200\232\345\210\251\346\213\223\346\216\245\345\217\243.V2.xlsx" "b/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\345\215\217\350\256\256/\345\215\232\346\226\257\351\200\232\345\210\251\346\213\223\346\216\245\345\217\243.V2.xlsx"
index f5acce2..e4cc948 100644
--- "a/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\345\215\217\350\256\256/\345\215\232\346\226\257\351\200\232\345\210\251\346\213\223\346\216\245\345\217\243.V2.xlsx"
+++ "b/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\345\215\217\350\256\256/\345\215\232\346\226\257\351\200\232\345\210\251\346\213\223\346\216\245\345\217\243.V2.xlsx"
Binary files differ
--
Gitblit v1.9.3