From 557f02072fa311eefe3123aa44afebac22adc465 Mon Sep 17 00:00:00 2001
From: xiaojiao <xiaojiao@kaokeziliao.com>
Date: 星期五, 24 四月 2026 17:24:43 +0800
Subject: [PATCH] 4-24
---
项目代码/WMS/WIDESEA_WMSServer/WIDESEA.Services/Services/ToWCS/Partial/InboundLogic.cs | 18 +++++++++++++++---
1 files changed, 15 insertions(+), 3 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA.Services/Services/ToWCS/Partial/InboundLogic.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA.Services/Services/ToWCS/Partial/InboundLogic.cs"
index 5fd14fa..f96e8e1 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA.Services/Services/ToWCS/Partial/InboundLogic.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA.Services/Services/ToWCS/Partial/InboundLogic.cs"
@@ -59,11 +59,15 @@
public WebResponseContent ReceiveWeightResultFromWCS(SaveModel saveModel)
{
WebResponseContent content = new WebResponseContent();
-
try
{
string barcode = saveModel.MainData["barcode"].ToString();
string weight = saveModel.MainData["weight"].ToString();
+
+ if (weight == null || weight == "0")
+ {
+ throw new Exception($"鎵樼洏鍙凤細銆恵barcode}銆戯紝閲嶉噺涓嶅涓嶇鍚堣瀹�");
+ }
Dt_taskinfo taskInfo = Dt_taskinfoRepository.Instance.FindFirst(x => x.task_barcode == barcode);
if (null == taskInfo)
@@ -73,7 +77,7 @@
//娌℃湁缁勭洏淇℃伅锛岃鏄庤閲嶉噺鏄┖鎵樼洏鐨勯噸閲�
if (null == boxHead)
{
- Dt_EmptyPallet dt_Empty= Dt_EmptyPalletRepository.Instance.FindFirst(x => x.EmptyPallet_name == barcode);
+ Dt_EmptyPallet dt_Empty = Dt_EmptyPalletRepository.Instance.FindFirst(x => x.EmptyPallet_name == barcode);
if (null == dt_Empty)
{
Dt_EmptyPallet dt_Empty1 = new Dt_EmptyPallet();
@@ -474,7 +478,15 @@
content = Dt_taskinfoRepository.Instance.DbContextBeginTransaction(() =>
{
//鑾峰彇绌鸿揣浣�
- Dt_locationinfo emptyLocation = CommonFunction.GetEmptyLocationAction();
+ Dt_locationinfo emptyLocation = CommonFunction.GetEmptyLocationAction(2);
+ LogRecord.WriteLog((int)LogEnum.InBound, $"鎵樼洏鏉$爜锛歿barcode},鍒嗛厤鐨勮揣浣嶅彿{emptyLocation.location_id}锛岃揣浣嶇姸鎬侊細{emptyLocation.location_state}");
+ VV_ContainerInfo_EmptyPallet SelectLocation = VV_ContainerInfo_EmptyPalletRepository.Instance.FindFirst(x => x.location_id == emptyLocation.location_id);
+ VV_ContainerInfo conInfohw = VV_ContainerInfoRepository.Instance.FindFirst(x => x.location_id == emptyLocation.location_id);
+ if (SelectLocation != null || conInfohw != null)
+ {
+ LogRecord.WriteLog((int)LogEnum.InBound, $"鍒嗛厤鐨勮揣浣嶅凡鏈夎揣,璐т綅鍙穥emptyLocation.location_id}");
+ throw new Exception($"鍒嗛厤鐨勮揣浣嶅凡鏈夎揣,璐т綅鍙穥SelectLocation.location_id}");
+ }
Dt_taskinfo taskinfo = new Dt_taskinfo();
taskinfo.task_id = Guid.NewGuid();
--
Gitblit v1.9.3