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 | 36 ++++++++++++++++++++++++++++++------
1 files changed, 30 insertions(+), 6 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 8b6d52a..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"
@@ -2,6 +2,7 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
+using System.Linq;
using System.Text;
using WIDESEA.Common;
using WIDESEA.Core.Enums;
@@ -12,6 +13,7 @@
using WIDESEA.Services.IServices.ToApp;
using WIDESEA.Services.Repositories;
using WIDESEA.Services.Services;
+using WIDESEA_Common.LogEnum;
using WIDESEA_Entity.DomainModels;
@@ -53,6 +55,12 @@
//鐢熶骇鏃ユ湡
string ProductDate = saveModel.MainData["ProductDate"].ToString();
+ // 鏍囧噯鍊�
+ 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($"鍘傚/杞/鍨嬪彿/妫�淇被鍨嬮兘涓嶈兘涓虹┖");
@@ -93,9 +101,11 @@
throw new Exception($"鎵樼洏鐮�:銆恵rfid}銆戝凡缁忓瓨鍦ㄤ簬绌烘墭鐩樺簱瀛樹腑,璐т綅鍙�:{conInfoEmpty.location_id}");
//鏌ユ壘璇ユ墭鐩樻槸鍚︿箣鍓嶅叆杩囧簱锛岀粍鐩樿繘搴撶殑鎵樼洏涔嬪墠蹇呴』宸茬粡鍏ヨ繃搴撶殑
- Dt_container_head_hty head_Hty = Dt_container_head_htyRepository.Instance.FindFirst(x => x.containerhead_barcode == rfid);
- if (head_Hty == null)
- throw new Exception($"鎵樼洏鐮�:銆恵rfid}銆戣鎵樼洏鏃犲叆搴撹褰曪紝鏃犳硶缁勭洏锛岃鍏堝皢鍏剁┖鎵樼洏鐘舵�佸叆搴擄紝鍦ㄥ懠鍙┖鎵樼洏鍑哄簱杩涜缁勭洏鍏ュ簱");
+ Dt_EmptyPallet dt_EmptyPallet = Dt_EmptyPalletRepository.Instance.Find(x => x.EmptyPallet_name == rfid).FirstOrDefault();
+ if (dt_EmptyPallet == null)
+ throw new Exception($"鎵樼洏鐮�:銆恵rfid}銆�,鍦ㄦ墭鐩樼鐞嗕腑锛屾棤璇ユ墭鐩橈紝璇峰厛娣诲姞鎵樼洏淇℃伅");
+
+
//鍒ゆ柇杞存壙鏈夋晥鏈熸槸鍚﹁秴杩�2骞�
@@ -122,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;
@@ -142,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;
@@ -152,11 +162,25 @@
info.mesInfo_createType = "mes";
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);
+
+
+
//鑾峰彇绌鸿揣浣�
- 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