From 8fe1b8a379ae9704f776f736962e1d9d635d0a89 Mon Sep 17 00:00:00 2001 From: lilili Date: Tue, 18 Apr 2023 15:19:43 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=88=90=E5=93=81=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E5=85=A5=E5=BA=93=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ICSSoft.FromERP/ICSWareHouseLotInfoDoc.cs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/ICSSoft.FromERP/ICSSoft.FromERP/ICSWareHouseLotInfoDoc.cs b/ICSSoft.FromERP/ICSSoft.FromERP/ICSWareHouseLotInfoDoc.cs index 4458478..58bba90 100644 --- a/ICSSoft.FromERP/ICSSoft.FromERP/ICSWareHouseLotInfoDoc.cs +++ b/ICSSoft.FromERP/ICSSoft.FromERP/ICSWareHouseLotInfoDoc.cs @@ -68,7 +68,23 @@ namespace ICSSoft.FromERP var warehouse = db.ICSWarehouse.SingleOrDefault(e=>e.WarehouseCode==data.WHCode); string location = db.ICSLocation.Where(e=>e.WHID== warehouse.ID&&e.WorkPoint==workPoint).FirstOrDefault()?.LocationCode; string sql = $@"EXEC Addins_GetSerialCode '{workPoint}','ICSInventoryLot','LotNO','KCP{rcvCode}{sequence}',5;"; - string lotNo = ICSHelper.ExecuteScalar(CommandType.Text, sql).ToString(); + string lotNo; + if (data.IsSerialNumber == "ZS01") + { + var extention = db.ICSExtension.Where(e => e.ID==data.ExtensionID)?.SingleOrDefault(); + if (extention!=null) + { + lotNo = extention.BatchCode; + } + else + { + lotNo = ICSHelper.ExecuteScalar(CommandType.Text, sql).ToString(); + } + } + else + { + lotNo = ICSHelper.ExecuteScalar(CommandType.Text, sql).ToString(); + } //条码 var inventoryLot = new ICSInventoryLot() {