From a4342e58b21d24428285f78abb95d6a87ccf5979 Mon Sep 17 00:00:00 2001
From: 陈勇 <竞男@ASUNA>
Date: 星期一, 30 三月 2026 16:02:36 +0800
Subject: [PATCH] 同步
---
项目代码/WMS/WMSServer/WIDESEA_StorageTaskServices/Task/Partial/Dt_TaskService.cs | 22 +++++++++++++++-------
1 files changed, 15 insertions(+), 7 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServer/WIDESEA_StorageTaskServices/Task/Partial/Dt_TaskService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServer/WIDESEA_StorageTaskServices/Task/Partial/Dt_TaskService.cs"
index c1dc994..2c47791 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServer/WIDESEA_StorageTaskServices/Task/Partial/Dt_TaskService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServer/WIDESEA_StorageTaskServices/Task/Partial/Dt_TaskService.cs"
@@ -44,14 +44,23 @@
}
var carBody = _carBodyRepository.QueryFirst(x => x.PalletCode == input.PalletCode);
- if (carBody == null) throw new Exception($"杞﹁韩{input.PalletCode}淇℃伅涓嶅瓨鍦�");
+ if (carBody != null) throw new Exception($"绌烘挰{input.PalletCode}淇℃伅宸插瓨鍦�");
+
+ Dt_CarBodyInfo dt_CarBodyInfo = new Dt_CarBodyInfo
+ {
+ PalletCode = input.PalletCode,
+ CarType = 3,
+ PVI = input.PalletCode,
+ RFID = input.PalletCode,
+ BodyStatus = 0
+ };
//BDCManager bDCManager = new BDCManager(_bdcConfigurationService, _locationRepository, _roadWayInfoRepository);
//await bDCManager.AddToBDC(carBody);
// 鑾峰彇搴撲綅
- var location = RequestLocation(stationInfo.RoadwayNo, carBody.CarType);
+ var location = RequestLocation(stationInfo.RoadwayNo, 3);
if (location == null)
{
return content.Error("鏃犳硶鑾峰彇璐т綅淇℃伅鎴栧簱浣嶅凡婊�");
@@ -69,16 +78,16 @@
PalletCode = input.PalletCode,
SourceAddress = stationInfo.stationLocation,
TaskState = (int)TaskInStatusEnum.InNew,
- TaskType = (int)TaskInboundTypeEnum.Inbound,
+ TaskType = (int)TaskInboundTypeEnum.InTray,
TaskNum = await BaseDal.GetTaskNo(),
Creater = "Systeam",
PVI = input.PVI,
-
};
_unitOfWorkManage.BeginTran();
BaseDal.AddData(newtask);
+ _carBodyRepository.AddData(dt_CarBodyInfo);
location.LocationStatus = (int)LocationEnum.InStockDisable;
_locationRepository.UpdateData(location);
_unitOfWorkManage.CommitTran();
@@ -148,17 +157,16 @@
DtLocationInfo locationinfo = new DtLocationInfo();
if (carType == 1 || carType == 3)
{
- locationinfo = dtLocationInfos.Where(x => x.LocationStatus == (int)LocationEnum.Free && x.EnalbeStatus == 1).OrderBy(x => x.Layer).ThenBy(x => x.Column).ThenBy(x => x.Row).FirstOrDefault();
+ locationinfo = dtLocationInfos.Where(x => x.LocationStatus == (int)LocationEnum.Free && x.EnalbeStatus == 1).OrderBy(x => x.Column).ThenBy(x => x.Layer).ThenBy(x => x.Row).FirstOrDefault();
}
else if (carType == 2)
{
- locationinfo = dtLocationInfos.Where(x => x.LocationStatus == (int)LocationEnum.Free && x.EnalbeStatus == 1).OrderBy(x => x.Layer).ThenByDescending(x => x.Column).ThenBy(x => x.Row).FirstOrDefault();
+ locationinfo = dtLocationInfos.Where(x => x.LocationStatus == (int)LocationEnum.Free && x.EnalbeStatus == 1).OrderByDescending(x => x.Column).ThenBy(x => x.Layer).ThenBy(x => x.Row).FirstOrDefault();
}
//else if (carType == 3)
//{
// locationinfo = dtLocationInfos.Where(x => x.LocationStatus == (int)LocationEnum.Free && x.EnalbeStatus == 1).OrderBy(x => x.Column).ThenBy(x => x.Row).ThenBy(x => x.Layer).FirstOrDefault();
//}
-
return locationinfo;
}
--
Gitblit v1.9.3