From 9de6c7c6d835ba5161d64114d154bfc7676244a1 Mon Sep 17 00:00:00 2001
From: 陈勇 <竞男@ASUNA>
Date: 星期一, 06 四月 2026 12:44:43 +0800
Subject: [PATCH] 同步
---
项目代码/WMS/WMSServer/WIDESEA_StoragIntegrationServices/WCS/Partial/RequestEmptyInboundRoadWayNo.cs | 39 +++++++++++++++++++++++++--------------
1 files changed, 25 insertions(+), 14 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServer/WIDESEA_StoragIntegrationServices/WCS/Partial/RequestEmptyInboundRoadWayNo.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServer/WIDESEA_StoragIntegrationServices/WCS/Partial/RequestEmptyInboundRoadWayNo.cs"
index cbca152..261c5bf 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServer/WIDESEA_StoragIntegrationServices/WCS/Partial/RequestEmptyInboundRoadWayNo.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServer/WIDESEA_StoragIntegrationServices/WCS/Partial/RequestEmptyInboundRoadWayNo.cs"
@@ -11,6 +11,7 @@
using WIDESEA_DTO;
using WIDESEA_Model.Models;
using WIDESEA_Repository;
+using WIDESEA_StorageBasicRepository;
using WIDESEAWCS_BasicInfoRepository;
using WIDESEAWCS_Model.Models;
@@ -28,18 +29,30 @@
WebResponseContent response = new WebResponseContent();
try
{
+
+ //濡備换鍔″凡瀛樺湪鍒� 杩斿洖姝や换鍔�
+ var checkTask = _taskRepository.QueryFirst(x => x.PalletCode == json.PalletCode && x.PVI == json.PVI);
+ if (checkTask != null)
+ {
+ return response.OK("鐢宠鍏ュ簱鎴愬姛", data: checkTask);
+ }
+
var carInfo = _carBodyInfoRepository.QueryFirst(x => x.RFID == json.PVI && x.PalletCode == json.PalletCode);
- if (carInfo == null) throw new Exception("鏈煡绌烘挰淇℃伅,鏃犳硶鍏ュ簱");
- //{
- // Dt_CarBodyInfo _CarBodyInfo = new Dt_CarBodyInfo //娴嬭瘯
- // {
- // PVI = "J25000660",
- // RFID = json.PVI,
- // BodyStatus = 0,
- // CarType = 1,
- // };
- //}
+ if (carInfo == null)
+ {
+ Dt_CarBodyInfo dt_CarBodyInfo = new Dt_CarBodyInfo
+ {
+ PalletCode = json.PalletCode,
+ CarType = 3,
+ PVI = json.PalletCode,
+ RFID = json.PalletCode,
+ BodyStatus = 0
+ };
+ _carBodyInfoRepository.AddData(dt_CarBodyInfo);
+
+ carInfo = _carBodyInfoRepository.QueryFirst(x => x.RFID == json.PVI && x.PalletCode == json.PalletCode);
+ }
var maxGroup = _locationRepository.QueryData(x => x.LocationType == 3 && x.LocationStatus == (int)LocationEnum.Free && x.EnalbeStatus == (int)EnableEnum.Enable)
.GroupBy(x => x.RoadwayNo)
@@ -77,13 +90,11 @@
TaskNum = _taskRepository.GetTaskNo().Result,
Creater = "Systeam",
PVI = json.PVI,
-
+ CarType = carInfo.CarType
};
_unitOfWorkManage.BeginTran();
_taskRepository.AddData(newtask);
- //location.LocationStatus = (int)LocationEnum.InStockDisable;
- //_locationRepository.UpdateData(location);
_unitOfWorkManage.CommitTran();
response.OK("绌烘挰鐢宠鍏ュ簱鎴愬姛", data: newtask);
@@ -92,7 +103,7 @@
}
catch (Exception ex)
{
- response.Error($"璇锋眰宸烽亾鍙峰け璐�:{ex.Message}");
+ response.Error($"绌烘挰璇锋眰宸烽亾鍙峰け璐�:{ex.Message}");
}
return response;
}
--
Gitblit v1.9.3