From f02d3a8ffc05a10a64859b2a16d5d43c8abb0fb9 Mon Sep 17 00:00:00 2001
From: xiaojiao <xiaojiao@kaokeziliao.com>
Date: 星期一, 23 三月 2026 11:13:36 +0800
Subject: [PATCH] 北京回长沙的最终版
---
项目代码/WMS/WIDESEA_WMSServer/WIDESEA.Services/Services/ToWCS/Partial/InboundLogic.cs | 53 +++++++++++++++++++++++++++++++++++++++++++----------
1 files changed, 43 insertions(+), 10 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 0f377fa..e39492e 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,23 @@
//娌℃湁缁勭洏淇℃伅锛岃鏄庤閲嶉噺鏄┖鎵樼洏鐨勯噸閲�
if (null == boxHead)
{
- taskInfo.task_weight = weight;
+ Dt_EmptyPallet dt_Empty = Dt_EmptyPalletRepository.Instance.FindFirst(x => x.EmptyPallet_name == barcode);
+ if (null == dt_Empty)
+ {
+ Dt_EmptyPallet dt_Empty1 = new Dt_EmptyPallet();
+ dt_Empty1.EmptyPallet_name = barcode;
+ dt_Empty1.EmptyPallet_palletweight = weight;
+ dt_Empty1.EmptyPallet_creator = "WMS";
+ dt_Empty1.EmptyPallet_createtime = DateTime.Now;
+ dt_Empty1.EmptyPallet_modifier = "WMS";
+ dt_Empty1.EmptyPallet_modifiertime = DateTime.Now;
+ Dt_EmptyPalletRepository.Instance.Add(dt_Empty1,true);
+ taskInfo.task_weight = weight;
+ }
+ else
+ {
+ taskInfo.task_weight = dt_Empty.EmptyPallet_palletweight;
+ }
Dt_taskinfoRepository.Instance.Update(taskInfo, true);
}
else//鏈夌粍鐩樹俊鎭紝璇存槑璇ラ噸閲忔槸杞存壙瀹炴墭鐨勯噸閲�
@@ -120,7 +140,7 @@
Dt_taskinfo task = Dt_taskinfoRepository.Instance.FindFirst(r => LayerToStation.inboundStations.Contains(r.task_endstation)
|| LayerToStation.outboundStations.Contains(r.task_beginstation));
if (null != task)
- return content.Error("鍒囨崲搴旀�ユā寮忚娓呯悊鍏ュ簱鍖虹幇鏈変换鍔�.");
+ return content.Error("璇锋竻鐞嗗叆搴撳尯鐜版湁浠诲姟.");
content = WCSApi.ChangeLineModel(saveModel);
if (content.Status)
@@ -130,8 +150,6 @@
string model = string.Empty;
if (modelValue == "normal")
model = "姝e父妯″紡";
- else if (modelValue == "emerge")
- model = "搴旀�ユā寮�";
if (general_Info.general_inline_current_model != model)
{
general_Info.general_inline_current_model = model;
@@ -149,6 +167,23 @@
}
Logger.AddLog(Core.Enums.LoggerType.Edit, saveModel, content, content);
return content;
+ }
+
+ /// <summary>
+ /// 鑾峰彇鍏ュ簱鍖哄煙鍜屽嚭搴撳尯鍩熺殑妯″紡
+ /// </summary>
+ /// <returns></returns>
+ public WebResponseContent GetInorOutMODELS(SaveModel saveModel)
+ {
+ WebResponseContent content = new WebResponseContent();
+ try
+ {
+ return content;
+ }
+ catch (Exception)
+ {
+ throw;
+ }
}
@@ -433,14 +468,12 @@
Dt_container_head head = Dt_container_headRepository.Instance.FindFirst(r => r.containerhead_barcode == barcode);
if (null != head)
return content.Error("褰撳墠鎵樼洏鍙峰凡瀛樺湪搴撻噷,璇锋鏌�:" + barcode);
- Dt_container_head_hty container_Head_Hty = Dt_container_head_htyRepository.Instance.Find(x => x.containerhead_barcode == barcode
- && x.containerhead_operatetype == "empty" && x.containerhead_creator != "WCS")
- .OrderByDescending(x => x.containerhead_finishtime).First();
+ Dt_EmptyPallet dt_Empty = Dt_EmptyPalletRepository.Instance.Find(x => x.EmptyPallet_name == barcode).FirstOrDefault();
decimal weight = 0;
- if (null != container_Head_Hty)
+ if (null != dt_Empty)
{
- weight = string.IsNullOrEmpty(container_Head_Hty.containerhead_palletweight) ? 0 : decimal.Parse(container_Head_Hty.containerhead_palletweight);
+ weight = string.IsNullOrEmpty(dt_Empty.EmptyPallet_palletweight) ? 0 : decimal.Parse(dt_Empty.EmptyPallet_palletweight);
}
content = Dt_taskinfoRepository.Instance.DbContextBeginTransaction(() =>
{
--
Gitblit v1.9.3