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/ToAPP/InboundBoxingAction.cs | 22 +++++++++++++++++++---
1 files changed, 19 insertions(+), 3 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA.Services/Services/ToAPP/InboundBoxingAction.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA.Services/Services/ToAPP/InboundBoxingAction.cs"
index d030bab..5a60fc4 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA.Services/Services/ToAPP/InboundBoxingAction.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA.Services/Services/ToAPP/InboundBoxingAction.cs"
@@ -13,6 +13,7 @@
using WIDESEA.Services.IServices.ToApp;
using WIDESEA.Services.Repositories;
using WIDESEA.Services.Services;
+using WIDESEA_Common.LogEnum;
using WIDESEA_Entity.DomainModels;
@@ -56,6 +57,9 @@
// 鏍囧噯鍊�
string Standard_value = saveModel.MainData["Standard_value"].ToString();
+
+ // 浜у湴
+ string Placeoforigin = saveModel.MainData["Placeoforigin"].ToString();
if (string.IsNullOrEmpty(madeUnit) || string.IsNullOrEmpty(materielId) || string.IsNullOrEmpty(materielType) || string.IsNullOrEmpty(NewOrOld))
throw new Exception($"鍘傚/杞/鍨嬪彿/妫�淇被鍨嬮兘涓嶈兘涓虹┖");
@@ -101,6 +105,8 @@
if (dt_EmptyPallet == null)
throw new Exception($"鎵樼洏鐮�:銆恵rfid}銆�,鍦ㄦ墭鐩樼鐞嗕腑锛屾棤璇ユ墭鐩橈紝璇峰厛娣诲姞鎵樼洏淇℃伅");
+
+
//鍒ゆ柇杞存壙鏈夋晥鏈熸槸鍚﹁秴杩�2骞�
if (DateTime.Now > Convert.ToDateTime(ProductDate).AddYears(2))
@@ -126,7 +132,7 @@
newBoxDetail.boxdtl_materielid = materielId;
newBoxDetail.boxdtl_qty = "1";
newBoxDetail.boxdtl_operator = UserContext.Current.UserTrueName;
- newBoxDetail.boxdtl_inboundUnit = "鏅虹菠";
+ newBoxDetail.boxdtl_inboundUnit = "鍖椾含鍔ㄨ溅娈�";
newBoxDetail.boxdtl_standard = NewOrOld;
newBoxDetail.boxdtl_carType = materielId;
newBoxDetail.boxdtl_type = materielType;
@@ -146,7 +152,7 @@
Dt_mes_goods_info info = new Dt_mes_goods_info();
info.mesInfo_id = Guid.NewGuid();
- info.mesInfo_inUnit = "鏅虹菠";
+ info.mesInfo_inUnit = "鍖椾含鍔ㄨ溅娈�";
info.mesInfo_madeUnit = madeUnit;
info.mesInfo_carType = materielId;
info.mesInfo_type = materielType;
@@ -157,6 +163,7 @@
info.mesInfo_qrCode = qrCode;
info.mesInfo_createDate = DateTime.Now;
info.mesInfo_bak_3 = Standard_value; // 浠ュ悗鏍囧噯鍊间粠杩欓噷鑾峰彇 鑲栦郊鏂板
+ info.mesInfo_bak_4 = Placeoforigin; // 杞存壙鐨勪骇鍦�
Dt_mes_goods_infoRepository.Instance.Add(info, true);
@@ -164,7 +171,16 @@
//鑾峰彇绌鸿揣浣�
- Dt_locationinfo emptyLocation = CommonFunction.GetEmptyLocationAction();
+ Dt_locationinfo emptyLocation = CommonFunction.GetEmptyLocationAction(1);
+
+ 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 tmpTaskInfo = CommonFunction.AddWMSTask_BoxPalletIn(emptyLocation, rfid, materielId, qrCode, materielType);
//淇敼璐т綅鐘舵��
--
Gitblit v1.9.3