From d0cc37c3c11859cc55f30624692dca55be2b8a32 Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期一, 29 十二月 2025 07:26:51 +0800
Subject: [PATCH] 变更及代码优化
---
项目代码/WMS/WMSServices/WIDESEA_TaskInfoService/MesTaskService.cs | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/MesTaskService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/MesTaskService.cs"
index 752fc07..182cac7 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/MesTaskService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/MesTaskService.cs"
@@ -228,6 +228,7 @@
//閫�鏂�
List<Dt_StockInfo> stockInfos=new List<Dt_StockInfo>();
List<Dt_Task> tasksNew = new List<Dt_Task>();
+ List<Dt_AGVStationInfo> _AGVStationInfos = new List<Dt_AGVStationInfo>();
foreach (var item in returnIssueDTOs.Where(x => x.ReturnMaterial != null))
{
MESReturnMaterial? returnMaterial = item.ReturnMaterial;
@@ -309,13 +310,25 @@
TaskTypeEnum taskTypeEnum = aGVStationInfo.StationArea switch
{
nameof(StationAreaEnum.涓�妤煎嵃鍒�) => TaskTypeEnum.PrintYLBackInbound,
+ nameof(StationAreaEnum.涓�妤肩焊寮犳穻鑶�) => TaskTypeEnum.PaperFilmYLBackInbound,
+ nameof(StationAreaEnum.涓�妤兼棤绾烘穻鑶�) => TaskTypeEnum.WFBLMYLBackInbound,
_ => throw new Exception("鏈壘鍒板搴斾换鍔�")
};
+ if (taskTypeEnum== TaskTypeEnum.WFBLMYLBackInbound)
+ {
+ Dt_AGVStationInfo? stationInfo = AssignWFBStation(_AGVStationInfos?.Select(x=>x.AGVStationCode).ToList()) ?? throw new Exception("鏈壘鍒板彲鐢ㄦ棤绾哄竷鏆傚瓨鏋�");
+ newTask.NextAddress = stationInfo.AGVStationCode;
+ newTask.TargetAddress = stationInfo.AGVStationCode;
+ newTask.Roadway = "AGV";
+ stationInfo.IsOccupied = 1;
+ _AGVStationInfos.Add(stationInfo);
+ }
newTask.TaskType = taskTypeEnum.ObjToInt();
tasksNew.Add(newTask);
}
_unitOfWorkManage.BeginTran();
BaseDal.AddData(tasksNew);
+ _basicRepository.AGVStationInfoRepository.UpdateData(_AGVStationInfos);
_stockRepository.StockInfoRepository.AddData(stockInfos);
_unitOfWorkManage.CommitTran();
//鎺ㄩ�佷换鍔�
--
Gitblit v1.9.3