ÎļþÃû´Ó Tiger.Business.WMS/Transaction/OtherInLocationChecking.cs ÐÞ¸Ä |
| | |
| | | #region Propertys & Variables |
| | | |
| | | public string UserCode { get; set; } |
| | | public static long UserId { get; set; } |
| | | public long UserId { get; set; } |
| | | public string VenderCode { get; set; } |
| | | public string LotNo { get; set; } |
| | | public string SecondVenderCode { get; set; } |
| | |
| | | return action; |
| | | } |
| | | input.AuthOption.OrgCode = input.AuthOption.OrgCode.IsNullOrEmpty() ? input.AuthOption.CurOrg : input.AuthOption.OrgCode; |
| | | Result<Inventory> result = WarehouseName.Contains("客ä¾") ? WMS_ITEM_Biz.WmsItem.GetK(input.SN, input.AuthOption, false) : WMS_ITEM_Biz.WmsItem.Get(input.SN, input.AuthOption, false); |
| | | Result<IInventory> result = WarehouseName.Contains("客ä¾") ? WMS_ITEM_Biz.WmsItem.GetK(input.SN, input.AuthOption, false) : WMS_ITEM_Biz.WmsItem.Get(input.SN, input.AuthOption, false); |
| | | if (result.Flag != Result.Flags.Success) |
| | | { |
| | | action.IsSuccessed = false; |
| | | action.LocaleMsg = result.LocaleMsg; |
| | | return action; |
| | | } |
| | | var curBarcode = result.Data; |
| | | if (!curBarcode.IsQRCode) |
| | | var curInv = result.Data as Inventory; |
| | | if (!curInv.IsQRCode) |
| | | { |
| | | action.IsSuccessed = false; |
| | | action.LocaleMsg = Biz.L("WMS.CustSupChk.ScanItem.NotQrCode", curBarcode.Barcode.MetaSn); |
| | | action.LocaleMsg = Biz.L("WMS.CustSupChk.ScanItem.NotQrCode", curInv.Barcode.MetaSn); |
| | | return action; |
| | | } |
| | | //夿æ¡ç æ¯å¦ä¸ºæå°å
è£
|
| | | if (!new[] { Barcode.Types.Small, Barcode.Types.Other }.Contains(curBarcode.Barcode.Type)) |
| | | if (!new[] { Barcode.Types.Small, Barcode.Types.Other }.Contains(curInv.Barcode.Type)) |
| | | { |
| | | action.IsSuccessed = false; |
| | | action.LocaleMsg = Biz.L("WMS.CustSupChk.ScanItem.TypeError", curBarcode.SN); |
| | | action.LocaleMsg = Biz.L("WMS.CustSupChk.ScanItem.TypeError", curInv.SN); |
| | | return action; |
| | | } |
| | | //夿æ¡ç ç¶æä¸ºä¸å卿已䏿¶å¯ä»¥æ¸
ç¹(!nDisassembleBarcode.isNormalStatus ||) |
| | | //ç©æéªè¯ |
| | | if (curBarcode.ItemInfo.IsNullOrEmpty() || curBarcode.ItemInfo.IS_ACTIVE == "N") |
| | | if (curInv.ItemInfo.IsNullOrEmpty() || curInv.ItemInfo.IS_ACTIVE == "N") |
| | | { |
| | | action.IsSuccessed = false; |
| | | action.LocaleMsg = Biz.L("WMS.ProdMReq.ScanItem.ItemCodeNotExistsOrNotActive", curBarcode.ItemInfo.ITEM_CODE.IsNullOrEmpty(curBarcode.Barcode.ItemCode)); |
| | | action.LocaleMsg = Biz.L("WMS.ProdMReq.ScanItem.ItemCodeNotExistsOrNotActive", curInv.ItemInfo.ITEM_CODE.IsNullOrEmpty(curInv.Barcode.ItemCode)); |
| | | return action; |
| | | } |
| | | if (!new[] { WMS_ITEM.STATUSs.NotExists, WMS_ITEM.STATUSs.OffShelf }.Contains(curBarcode.Status)) |
| | | if (!new[] { WMS_ITEM.STATUSs.NotExists, WMS_ITEM.STATUSs.OffShelf }.Contains(curInv.Status)) |
| | | { |
| | | action.IsSuccessed = false; |
| | | action.LocaleMsg = Biz.L("WMS.CustSupChk.ScanItem.ExistItem", curBarcode.ItemInfo.ITEM_CODE); |
| | | action.LocaleMsg = Biz.L("WMS.CustSupChk.ScanItem.ExistItem", curInv.ItemInfo.ITEM_CODE); |
| | | return action; |
| | | } |
| | | BIZ_ERP_OTH_IN_SNExt snExt = new(); |
| | | // BIZ_ERP_OTH_IN_SN scanResult = Business.Biz.Db.Queryable<BIZ_ERP_OTH_IN_SN>().Where(q=>q.SN==curBarcode.Barcode.SN).First(); |
| | | //éªè¯æ¡ç æ¯å¦å·²åè¿æ¸
ç¹ |
| | | var scanResult = Biz.Db.Queryable<BIZ_ERP_OTH_IN_SN>().Where(t => t.SN.ToUpper() == curBarcode.SN.ToUpper()).First(); |
| | | var scanResult = Biz.Db.Queryable<BIZ_ERP_OTH_IN_SN>().Where(t => t.SN.ToUpper() == curInv.SN.ToUpper()).First(); |
| | | if (!scanResult.IsNullOrEmpty() && scanResult.STATUS > WMS_ITEM.STATUSs.Counted.GetValue()) |
| | | { |
| | | action.IsSuccessed = false; |
| | | action.LocaleMsg = Biz.L("WMS.CustSupChk.ScanItem.BarcodeCounted", curBarcode.SN); |
| | | action.LocaleMsg = Biz.L("WMS.CustSupChk.ScanItem.BarcodeCounted", curInv.SN); |
| | | return action; |
| | | } |
| | | var isNo = true; |
| | |
| | | scanResult.CREATE_USER = UserCode; |
| | | scanResult.BUSINESSCODE = "OTH_" + UserCode; |
| | | scanResult.WAREHOUSECODE = WarehouseCode; |
| | | scanResult.SN = curBarcode.Barcode.SN; |
| | | scanResult.ITEM_CODE = curBarcode.Barcode.ItemCode; |
| | | scanResult.QTY = curBarcode.Barcode.Qty ?? 0; |
| | | scanResult.DATECODE = curBarcode.Barcode.ProdDate ?? DateTime.MinValue; |
| | | scanResult.SN = curInv.Barcode.SN; |
| | | scanResult.ITEM_CODE = curInv.Barcode.ItemCode; |
| | | scanResult.QTY = curInv.Barcode.Qty ?? 0; |
| | | scanResult.DATECODE = curInv.Barcode.ProdDate ?? DateTime.MinValue; |
| | | scanResult.LOTNO = LotNo; //item.Barcode.LotNo; |
| | | scanResult.STATUS = WMS_ITEM.STATUSs.Counted.GetValue(); |
| | | scanResult.META_SN = input.SN; |
| | |
| | | //scanResult.ID = Guid.NewGuid().ToString(); |
| | | scanResult.BUSINESSCODE = "OTH_" + UserCode; |
| | | scanResult.WAREHOUSECODE = WarehouseCode; |
| | | scanResult.SN = curBarcode.SN; |
| | | scanResult.ITEM_CODE = curBarcode.ItemInfo.ITEM_CODE; |
| | | scanResult.QTY = curBarcode.Barcode.Qty ?? 0; |
| | | scanResult.DATECODE = curBarcode.Barcode.ProdDate ?? DateTime.MinValue; |
| | | scanResult.SN = curInv.SN; |
| | | scanResult.ITEM_CODE = curInv.ItemInfo.ITEM_CODE; |
| | | scanResult.QTY = curInv.Barcode.Qty ?? 0; |
| | | scanResult.DATECODE = curInv.Barcode.ProdDate ?? DateTime.MinValue; |
| | | scanResult.LOTNO = LotNo; //item.Barcode.LotNo; |
| | | scanResult.STATUS = WMS_ITEM.STATUSs.Counted.GetValue(); |
| | | scanResult.META_SN = input.SN; |
| | |
| | | snExt.STATUS = scanResult.STATUS; |
| | | snExt.WH_CODE = scanResult.WAREHOUSECODE; |
| | | snExt.WH_NAME = WarehouseName; |
| | | snExt.MName = curBarcode.ItemInfo?.ITEM_NAME; |
| | | snExt.MDesc = curBarcode.ItemInfo?.SPEC; |
| | | snExt.MUom = curBarcode.ItemInfo?.UNIT; |
| | | snExt.MName = curInv.ItemInfo?.ITEM_NAME; |
| | | snExt.MDesc = curInv.ItemInfo?.SPEC; |
| | | snExt.MUom = curInv.ItemInfo?.UNIT; |
| | | |
| | | //ä¿åå°æ°æ®åº |
| | | var db = Business.Biz.Db; |
| | |
| | | AUTH_ORG = input.AuthOption.CurOrg, |
| | | CREATE_USER = UserCode, |
| | | OrderNo = UserCode, |
| | | Barcodes = curBarcode.SN, |
| | | Barcodes = curInv.SN, |
| | | CustomsNo = CustomsNo.Replace("ï¼", ",").Trim().Split(',')[0], |
| | | AccountingNo = CustomsNo.Replace("ï¼", ",").Trim().Split(',')[1], |
| | | CountsType = BIZ_ERP_CUSTOMS.CountsEnum.OtherInput |