| | |
| | | using Tiger.IBusiness; |
| | | using Tiger.Model.MES.Yada; |
| | | using Tiger.Model.Entitys.MES.U9C; |
| | | using System.Security.Policy; |
| | | using Tiger.Model.Entitys.MES.Position; |
| | | |
| | | namespace Tiger.Business.WMS.Transaction |
| | | { |
| | |
| | | action.IsSuccessed = false; |
| | | //action.LocaleMsg = Biz.L("条码为非法条码"); |
| | | action.LocaleMsg = Biz.L("WMS.WmsItem.Barcode.IllegalFailure", input.SN); |
| | | return action; |
| | | return SetOutPutMqttMsg(action, input.Locale); ; |
| | | } |
| | | |
| | | if (barcode.Type == Barcode.Types.OuterPackage) |
| | |
| | | action.IsSuccessed = false; |
| | | //action.LocaleMsg = Biz.L("ASN单中不存在条码[{0}]"); |
| | | action.LocaleMsg = Biz.L("WMS.Count_BIZ_U9_ASN.SnNotExists", input.SN); |
| | | return action; |
| | | return SetOutPutMqttMsg(action, input.Locale); ; |
| | | } |
| | | if (CurSn.First().AUTH_ORG != input.AuthOption.CurOrg) |
| | | { |
| | | action.IsSuccessed = false; |
| | | //action.LocaleMsg = Biz.L($"条码所属组织[{0}]与当前登录组织[{1}]不一致,请重新选择组织"); |
| | | action.LocaleMsg = Biz.L("WMS.Count_BIZ_U9_ASN.OrgNotCorrect", CurSn.First().AUTH_ORG, input.AuthOption.CurOrg); |
| | | return action; |
| | | return SetOutPutMqttMsg(action, input.Locale); ; |
| | | } |
| | | //验证条码是否正确 |
| | | if (CurSn.First().STATUS > WMS_ITEM.STATUSs.Incoming.GetValue()) |
| | |
| | | action.IsSuccessed = false; |
| | | //action.LocaleMsg = Biz.L("状态[{0}]异常,请重新扫描"); |
| | | action.LocaleMsg = Biz.L("WMS.Default.ScanItem.StatusException", CurSn.First().STATUS.GetEnumDesc<WMS_ITEM.STATUSs>()); |
| | | return action; |
| | | return SetOutPutMqttMsg(action, input.Locale); ; |
| | | } |
| | | |
| | | //执行清点数据处理 |
| | |
| | | //action.CatchExceptionWithLog(ex, $"扫描条码[{0}]复核异常"); |
| | | action.CatchExceptionWithLog(ex, Biz.L("WMS.Default.ScanItem.ScanException", input.SN)); |
| | | } |
| | | return action; |
| | | return SetOutPutMqttMsg(action, input.Locale); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | |
| | | //重置工序 |
| | | ResetScan(); |
| | | return action; |
| | | return SetOutPutMqttMsg(action, locale); ; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | var orderNo = input.Data; |
| | | try |
| | | { |
| | | var order = await MainDB.Queryable<BIZ_U9_ASN>().Where(q => q.ORDER_NO == orderNo).IncludesAllFirstLayer().FirstAsync(); |
| | | var order = await MainDB.Queryable<BIZ_U9_ASN>().Where(q => q.ORDER_NO == orderNo).Includes(q => q.Details, d => d._ItemInfos).IncludesAllFirstLayer().FirstAsync(); |
| | | if (order.IsNullOrEmpty()) |
| | | { |
| | | action.IsSuccessed = false; |
| | |
| | | IsLogin = true, |
| | | CreateRcvBySrcASNParam = new () |
| | | { |
| | | aSNToRcvTransDTOs = order.Details.Select(q => new ASNToRcvTransDTO { ASNLineKey = q.ID, TransQty = new() { m_amount1 = q.QTY } }).ToList(), |
| | | aSNToRcvTransDTOs = order.Details.Select(q => new ASNToRcvTransDTO |
| | | { |
| | | ASNLineKey = q.ID, |
| | | TransQty = new() { m_amount1 = q.QTY }, |
| | | BinInfoList = new() { new() { Bin = new () { m_code = q.ItemInfo.DEFAULT_LOCATION }, LocationQtySU = q.QTY, LocationQtyTU = q.QTY } }, |
| | | }).ToList(), |
| | | } |
| | | }; |
| | | var result = await DI.Resolve<IWMS_U9C>().CreateRcvBySrcASN(iInput); |
| | |
| | | var receipt = new BIZ_U9_RECEIPT(); |
| | | receipt.Details = new(); |
| | | receipt.SnList = new(); |
| | | DbClient U9Cdb = Biz.DataSource["YadaU9C"].Client; |
| | | var list = U9Cdb.Queryable<mes_ReturnedDocInfo>().Where(x => x.RcvId == result.Data[0].ID.ToDouble() && x.DocNo == result.Data[0].Code).ToList(); |
| | | var list = Biz.DataSource["YadaU9C"].Client.Queryable<mes_ReturnedDocInfo>().Where(x => x.RcvId == result.Data[0].ID.ToDouble() && x.DocNo == result.Data[0].Code).ToList(); |
| | | |
| | | if (list != null && list.Count > 0) |
| | | { |
| | |
| | | ORDER_NO = item.DocNo, |
| | | LINE_NO = item.DocLineNo.ToString(), |
| | | ITEM_CODE = item.ItemCode, |
| | | QTY = item.RtnFillQtyTU.ToDouble(), // mes单据数量 --U9退补数量 |
| | | QTY = item.EyeballingQtyTU.ToDouble(), // mes单据数量 --U9退补数量 |
| | | QTY_GIFT = asnDtl.QTY_GIFT, |
| | | ASN_ID = item.SrcASNDocId.ToString(), |
| | | ASN_NO =asnDtl.ORDER_NO, |