public void FillResolverByASN(Resolver resolver) { User user = userMgr.CheckAndLoadUser(resolver.UserCode); InProcessLocation inProcessLocation = inProcessLocationMgr.CheckAndLoadInProcessLocation(resolver.Input); //if (!user.HasPermission(inProcessLocation.PartyFrom.Code) || // !user.HasPermission(inProcessLocation.PartyTo.Code)) //{ // throw new BusinessErrorException("Common.Business.Error.NoPermission"); //} #region CopyProperty from ASN resolver.Code = inProcessLocation.IpNo; resolver.Status = inProcessLocation.Status; //resolver.IsDetailContainHu = inProcessLocation.IsDetailContainHu; resolver.IsScanHu = inProcessLocation.IsReceiptScanHu; if (inProcessLocation.InProcessLocationDetails != null && inProcessLocation.InProcessLocationDetails.Count > 0) { OrderHead orderHead = inProcessLocation.InProcessLocationDetails[0].OrderLocationTransaction.OrderDetail.OrderHead; resolver.AntiResolveHu = orderHead.AntiResolveHu; resolver.FulfillUnitCount = orderHead.FulfillUnitCount; resolver.AllowExceed = orderHead.AllowExceed; } resolver.PickBy = inProcessLocation.IsDetailContainHu ? BusinessConstants.CODE_MASTER_PICKBY_HU : BusinessConstants.CODE_MASTER_PICKBY_ITEM; //resolver.PickBy = inProcessLocation.IsReceiptScanHu ? BusinessConstants.CODE_MASTER_PICKBY_HU : BusinessConstants.CODE_MASTER_PICKBY_ITEM; resolver.OrderType = inProcessLocation.OrderType; //resolver.AntiResolveHu = #endregion }
private Resolver ShipOrder(Resolver resolver) { InProcessLocation inProcessLocation = null; if (resolver.CodePrefix == BusinessConstants.CODE_PREFIX_PICKLIST) { inProcessLocation = orderMgr.ShipOrder(resolver.Code, resolver.UserCode); } else { IList <InProcessLocationDetail> inProcessLocationDetailList = orderMgr.ConvertTransformerToInProcessLocationDetail(resolver.Transformers); if (inProcessLocationDetailList.Count > 0) { inProcessLocation = orderMgr.ShipOrder(inProcessLocationDetailList, resolver.UserCode); } else { throw new BusinessErrorException("OrderDetail.Error.OrderDetailShipEmpty"); } } #region 打印 if (resolver.NeedPrintAsn && resolver.IsCSClient) { resolver.PrintUrl = PrintASN(inProcessLocation); } #endregion resolver.Transformers = TransformerHelper.ConvertInProcessLocationDetailsToTransformers(inProcessLocation.InProcessLocationDetails); resolver.Result = languageMgr.TranslateMessage("Common.Business.ASNIs", resolver.UserCode, inProcessLocation.IpNo); resolver.Code = inProcessLocation.IpNo; resolver.Command = BusinessConstants.CS_BIND_VALUE_TRANSFORMER; return(resolver); }
private void BindData(InProcessLocation ip) { //PartyFrom this.tbPartyFrom.ReadonlyTextBox_DataBind(ip.PartyFrom.Code, ip.PartyFrom.Name); //PartyTo this.tbPartyTo.ReadonlyTextBox_DataBind(ip.PartyTo.Code, ip.PartyTo.Name); //ShipFrom if (ip.ShipFrom != null) { this.tbShipFrom.ReadonlyTextBox_DataBind(ip.ShipFrom.Code, ip.ShipFrom.Address); } //ShipTo if (ip.ShipTo != null) { this.tbShipTo.ReadonlyTextBox_DataBind(ip.ShipTo.Code, ip.ShipTo.Address); } //Carrier //todo //DockDescription this.tbDockDescription.ReadonlyTextBox_DataBind(null, ip.DockDescription); }
/* * 填充报表头 * * Param pageIndex 页号 * Param orderHead 订单头对象 * Param orderDetails 订单明细对象 */ private void FillHead(InProcessLocation inProcessLocation) { //首部 //No. string ipNo = inProcessLocation.IpNo; if (inProcessLocation.PrintCount > 0) { ipNo += " (" + inProcessLocation.PrintCount.ToString() + ")"; } this.SetRowCell(3, 14, ipNo); //收货单位 this.SetRowCell(5, 2, inProcessLocation.PartyTo.Name); if (inProcessLocation.OrderType == BusinessConstants.CODE_MASTER_ORDER_TYPE_VALUE_TRANSFER) { //移库路线上没有shipto,暂时取默认的地址 ShipAddress shipAddress = shipAddressMgr.GetDefaultShipAddress(inProcessLocation.PartyTo); this.SetRowCell(5, 9, shipAddress == null ? string.Empty : shipAddress.Address); } else { //地址 this.SetRowCell(5, 9, inProcessLocation.ShipTo == null ? string.Empty : inProcessLocation.ShipTo.Address); } //卸货地点 //运输方法 //车号 //介绍信编号 //货物出门性质 CodeMaster codeMaster = codeMasterMgr.LoadCodeMaster(BusinessConstants.CODE_MASTER_ORDER_TYPE, inProcessLocation.OrderType); this.SetRowCell(6, 16, codeMaster.Description); }
public void CloseInProcessLocation() { RequiredFieldValidator rfvDisposition = (RequiredFieldValidator)this.FV_InProcessLocation.FindControl("rfvDisposition"); RequiredFieldValidator rfvReferenceOrderNo = (RequiredFieldValidator)this.FV_InProcessLocation.FindControl("rfvReferenceOrderNo"); if (rfvDisposition.IsValid && rfvReferenceOrderNo.IsValid) { InProcessLocation ip = TheInProcessLocationMgr.LoadInProcessLocation(this.IpNo); try { ip.Disposition = ((TextBox)this.FV_InProcessLocation.FindControl("tbDisposition")).Text.Trim(); ip.ReferenceOrderNo = ((TextBox)this.FV_InProcessLocation.FindControl("tbReferenceOrderNo")).Text.Trim(); if (ip.Type == BusinessConstants.CODE_MASTER_INPROCESS_LOCATION_TYPE_VALUE_GAP) { //gap直接关闭,不需要处理差异 TheInProcessLocationMgr.CloseInProcessLocation(ip, this.CurrentUser, false); } else { TheInProcessLocationMgr.CloseInProcessLocation(ip, this.CurrentUser, true); TheTransportationOrderMgr.TryCompleteTransportationOrder(ip, this.CurrentUser); } UpdateView(); } catch (BusinessErrorException ex) { throw ex; } } }
public void TryCompleteTransportationOrder(InProcessLocation ip, User user) { DetachedCriteria criteria = DetachedCriteria.For(typeof(TransportationOrderDetail)); criteria.Add(Expression.Eq("InProcessLocation.IpNo", ip.IpNo)); IList <TransportationOrderDetail> orderDetailList = criteriaMgr.FindAll <TransportationOrderDetail>(criteria); if (orderDetailList != null && orderDetailList.Count > 0) { bool canComplete = true; TransportationOrder order = this.LoadTransportationOrder(orderDetailList[0].TransportationOrder.OrderNo); foreach (TransportationOrderDetail orderDetail in order.OrderDetails) { if (orderDetail.InProcessLocation.Status == BusinessConstants.CODE_MASTER_STATUS_VALUE_CREATE) { canComplete = false; break; } } if (order.Status == BusinessConstants.CODE_MASTER_STATUS_VALUE_INPROCESS && canComplete) { CompleteTransportationOrder(order, user); } } }
public void InitPageParameter(InProcessLocation ip) { bool isScanHu = (ip.InProcessLocationDetails[0].HuId != null); List <Transformer> transformerList = TransformerHelper.ConvertInProcessLocationDetailsToTransformers(ip.InProcessLocationDetails); this.ucTransformer.InitPageParameter(transformerList, this.ModuleType, BusinessConstants.TRANSFORMER_MODULE_TYPE_SHIPVIEW, isScanHu); this.ucTransformer.InitialUIForAsn(ip); }
public void AddInProcessLocation(InProcessLocation inProcessLocation) { if (this.InProcessLocations == null) { this.InProcessLocations = new List <InProcessLocation>(); } this.InProcessLocations.Add(inProcessLocation); }
public void UpdateView() { InProcessLocation ip = TheInProcessLocationMgr.LoadInProcessLocation(this.IpNo); Controls_TextBox tbCurrentOperation = (Controls_TextBox)this.FV_InProcessLocation.FindControl("tbCurrentOperation"); TextBox tbCurrentActivity = (TextBox)this.FV_InProcessLocation.FindControl("tbCurrentActivity"); tbCurrentOperation.Text = ip.CurrentOperation.ToString(); tbCurrentActivity.Text = ip.CurrentActivity; }
protected void GV_List_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { InProcessLocation ip = (InProcessLocation)e.Row.DataItem; e.Row.FindControl("lbtnView").Visible = ip.CurrentActivity == null ? true : false; e.Row.FindControl("ShowConFirm").Visible = ip.CurrentActivity == null ? false : true; } }
protected override void SetBaseInfo(Resolver resolver) { if (resolver.BarcodeHead == BusinessConstants.BARCODE_HEAD_BIN) { setBaseMgr.FillResolverByBin(resolver); } else if (resolver.CodePrefix == BusinessConstants.CODE_PREFIX_ORDER) { resolver.Transformers = null; OrderHead orderHead = orderHeadMgr.LoadOrderHead(resolver.Input); #region 校验 if (!partyMgr.CheckPartyPermission(resolver.UserCode, orderHead.PartyTo.Code)) { throw new BusinessErrorException("Common.Error.NoRegionPermission", orderHead.PartyTo.Code); } if (orderHead.Status != BusinessConstants.CODE_MASTER_STATUS_VALUE_INPROCESS) { throw new BusinessErrorException("Order.Error.StatusErrorWhenReceive", orderHead.Status, orderHead.OrderNo); } if (orderHead.Type == BusinessConstants.CODE_MASTER_ORDER_TYPE_VALUE_PRODUCTION) { throw new BusinessErrorException("Order.Error.OrderShipIsNotProduction", orderHead.OrderNo, orderHead.Type); } #endregion setBaseMgr.FillResolverByOrder(resolver); } else if (resolver.CodePrefix == BusinessConstants.CODE_PREFIX_ASN) { resolver.Transformers = null; InProcessLocation ip = inProcessLocationMgr.LoadInProcessLocation(resolver.Input); #region 校验 if (!partyMgr.CheckPartyPermission(resolver.UserCode, ip.PartyTo.Code)) { throw new BusinessErrorException("Common.Error.NoRegionPermission", ip.PartyTo.Code); } if (ip.Status == BusinessConstants.CODE_MASTER_STATUS_VALUE_CLOSE) { throw new BusinessErrorException("InProcessLocation.Error.StatusErrorWhenReceive", ip.Status, ip.IpNo); } #endregion setBaseMgr.FillResolverByASN(resolver); } else { throw new TechnicalException("Error BarcodeHead:" + resolver.BarcodeHead + " and CodePrefix:" + resolver.CodePrefix); } }
//重置发货数 public static void ClearShippedQty(InProcessLocation inProcessLocation) { if (inProcessLocation.InProcessLocationDetails != null && inProcessLocation.InProcessLocationDetails.Count > 0) { foreach (InProcessLocationDetail inProcessLocationDetail in inProcessLocation.InProcessLocationDetails) { inProcessLocationDetail.Qty = 0; } } }
public void InitPageParameter(InProcessLocation ip, bool printASN) { this.GV_List.DataSource = ip.InProcessLocationDetails; this.GV_List.DataBind(); if (printASN) { this.PrintASN(ip); } }
protected void PrintDasAuto(object sender, EventArgs e) { InProcessLocation inProcessLocation = TheInProcessLocationMgr.LoadInProcessLocation(IpNo, true); IList <object> list = new List <object>(); list.Add(inProcessLocation); list.Add(inProcessLocation.InProcessLocationDetails); string printUrl = TheReportMgr.WriteToFile("DasAutoAsn.xls", list); Page.ClientScript.RegisterStartupScript(GetType(), "method", " <script language='javascript' type='text/javascript'>PrintOrder('" + printUrl + "'); </script>"); }
private ReceiptNote InProcessLocation2ReceiptNote(InProcessLocation inProcessLocation) { ReceiptNote receiptNote = new ReceiptNote(); receiptNote.OrderNo = inProcessLocation.IpNo; receiptNote.CreateDate = inProcessLocation.CreateDate; receiptNote.CreateUser = inProcessLocation.CreateUser == null ? string.Empty : inProcessLocation.CreateUser.Code; receiptNote.Status = inProcessLocation.Status; return(receiptNote); }
protected void GV_List_RowDataBound(object sender, GridViewRowEventArgs e) { if (!IsExport) { if (e.Row.RowType == DataControlRowType.DataRow) { InProcessLocation ip = (InProcessLocation)e.Row.DataItem; e.Row.FindControl("lbtnEdit").Visible = this.AsnType != BusinessConstants.CODE_MASTER_INPROCESS_LOCATION_TYPE_VALUE_GAP && ip.Status != BusinessConstants.CODE_MASTER_STATUS_VALUE_CLOSE; } } }
public override IList <object> GetDataList(string code) { IList <object> list = new List <object>(); InProcessLocation inProcessLocation = inProcessLocationMgr.LoadInProcessLocation(code, true); if (inProcessLocation != null) { list.Add(inProcessLocation); } return(list); }
private string PrintASN(InProcessLocation inProcessLocation) { IList <object> list = new List <object>(); list.Add(inProcessLocation); list.Add(inProcessLocation.InProcessLocationDetails); string printUrl = reportMgr.WriteToFile(inProcessLocation.AsnTemplate, list); //this.PrintOrder(printUrl); //报表url return(printUrl); }
private void RePrintASN() { if (GV_List.Rows.Count == 0) { return; } HiddenField hfId = (HiddenField)GV_List.Rows[0].FindControl("hfId"); InProcessLocationDetail ipDet = TheInProcessLocationDetailMgr.LoadInProcessLocationDetail(int.Parse(hfId.Value)); InProcessLocation inProcessLocation = TheInProcessLocationMgr.LoadInProcessLocation(ipDet.InProcessLocation.IpNo, true); this.PrintASN(inProcessLocation); }
public void CancelTransportationOrder(TransportationOrder order, User user) { if (order.Status == BusinessConstants.CODE_MASTER_STATUS_VALUE_CLOSE || order.Status == BusinessConstants.CODE_MASTER_STATUS_VALUE_COMPLETE) { throw new BusinessErrorException("TransportationOrder.Error.StatusErrorWhenCancel", order.Status, order.OrderNo); } #region 检查开过票的不能取消 IList <TransportationActBill> actBillList = transportationActBillMgr.GetTransportationActBill(order); var i = (from c in actBillList where c.BilledAmount > 0 select c).Count(); #endregion if (i > 0) { throw new BusinessErrorException("TransportationOrder.Error.BillAmountErrorWhenCancel", order.OrderNo); } #region 关闭actbill if (actBillList != null && actBillList.Count > 0) { foreach (TransportationActBill actBill in actBillList) { actBill.Status = BusinessConstants.CODE_MASTER_STATUS_VALUE_CLOSE; actBill.LastModifyDate = DateTime.Now; actBill.LastModifyUser = user; transportationActBillMgr.UpdateTransportationActBill(actBill); } } #endregion #region 除与asn的关联 foreach (TransportationOrderDetail orderDetail in order.OrderDetails) { InProcessLocation ip = orderDetail.InProcessLocation; ip.IsReferenced = false; inProcessLocationMgr.UpdateInProcessLocation(ip); } #endregion #region 更新运单头 order.CancelDate = DateTime.Now; order.CancelUser = user; order.LastModifyDate = DateTime.Now; order.LastModifyUser = user; order.Status = BusinessConstants.CODE_MASTER_STATUS_VALUE_CANCEL; this.UpdateTransportationOrder(order); #endregion }
public void CreateInProcessLocationDetail(InProcessLocation inProcessLocation, OrderLocationTransaction outOrderLocationTransaction, IList <InventoryTransaction> inventoryTransactionList) { if (inventoryTransactionList != null && inventoryTransactionList.Count > 0) { InProcessLocationDetail mergedInProcessLocationDetail = null; foreach (InventoryTransaction inventoryTransaction in inventoryTransactionList) { if (inventoryTransaction.Hu == null && !inventoryTransaction.IsConsignment) { #region 合并发货数量 //没有HU && 非寄售才可以合并 if (mergedInProcessLocationDetail == null) { mergedInProcessLocationDetail = new InProcessLocationDetail(); mergedInProcessLocationDetail.InProcessLocation = inProcessLocation; mergedInProcessLocationDetail.OrderLocationTransaction = outOrderLocationTransaction; } mergedInProcessLocationDetail.Qty += (0 - inventoryTransaction.Qty) / outOrderLocationTransaction.UnitQty; #endregion } else { InProcessLocationDetail inProcessLocationDetail = new InProcessLocationDetail(); inProcessLocationDetail.InProcessLocation = inProcessLocation; inProcessLocationDetail.OrderLocationTransaction = outOrderLocationTransaction; if (inventoryTransaction.Hu != null) { inProcessLocationDetail.HuId = inventoryTransaction.Hu.HuId; inProcessLocationDetail.LotNo = inventoryTransaction.Hu.LotNo; } inProcessLocationDetail.IsConsignment = inventoryTransaction.IsConsignment; inProcessLocationDetail.PlannedBill = inventoryTransaction.PlannedBill; inProcessLocationDetail.Qty = (0 - inventoryTransaction.Qty) / outOrderLocationTransaction.UnitQty; inProcessLocation.AddInProcessLocationDetail(inProcessLocationDetail); this.CreateInProcessLocationDetail(inProcessLocationDetail); } } if (mergedInProcessLocationDetail != null) { inProcessLocation.AddInProcessLocationDetail(mergedInProcessLocationDetail); this.CreateInProcessLocationDetail(mergedInProcessLocationDetail); } } }
protected void lbtnDel_Click(object sender, EventArgs e) { if (Session["IpList"] != null) { IList <InProcessLocation> ipl = (IList <InProcessLocation>)Session["IpList"]; string ipNo = ((System.Web.UI.WebControls.LinkButton)sender).CommandArgument; InProcessLocation ip = TheInProcessLocationMgr.LoadInProcessLocation(ipNo); ipl.Remove(ip); GV_List.DataSource = ipl; GV_List.DataBind(); Session["IpList"] = ipl; } }
public void InitPageParameter(InProcessLocation ip, bool printASN, string action) { this.IpNo = ip.IpNo; this.Action = action; this.ucEdit.Action = action; if (ip.Status != BusinessConstants.CODE_MASTER_STATUS_VALUE_CLOSE) { this.btnAdjustLocFrom.Visible = true; if (this.AsnType == BusinessConstants.CODE_MASTER_INPROCESS_LOCATION_TYPE_VALUE_GAP) { this.btnAdjustLocFrom.Visible = true; this.btnAdjustLocTo.Visible = true; this.btnClose.Visible = false; } else { this.btnAdjustLocFrom.Text = "${Common.Button.Cancel}"; this.btnAdjustLocTo.Visible = false; if (ip.Status == BusinessConstants.CODE_MASTER_STATUS_VALUE_INPROCESS) { this.btnAdjustLocFrom.Visible = false; this.btnClose.Visible = true; } else { this.btnAdjustLocFrom.Visible = true; this.btnClose.Visible = false; } } } else { this.btnClose.Visible = false; this.btnAdjustLocFrom.Visible = false; this.btnAdjustLocTo.Visible = false; } if (this.btnClose.Visible) { this.ucEdit.Action = "Close"; } this.ucEdit.InitPageParameter(ip.IpNo); this.ucDetailList.InitPageParameter(ip.IpNo); if (printASN) { this.PrintASN(ip); } }
private void ShipRender(object sender, EventArgs e) { OrderHead orderHead = (OrderHead)sender; try { InProcessLocation inProcessLocation = TheOrderMgr.ShipOrder(orderHead.OrderDetails, this.CurrentUser); this.FV_Order.DataBind(); UpdateView(); ShowSuccessMessage("MasterData.Order.OrderHead.Update.Successfully", this.OrderNo); } catch (BusinessErrorException ex) { this.ShowErrorMessage(ex); } }
//临时解决一下问题,ASN多次收货,执行中的会显示发货数和已收数 public void InitialUIForAsn(InProcessLocation ip) { if (ip.Status == BusinessConstants.CODE_MASTER_STATUS_VALUE_INPROCESS) { this.GV_List.Columns[9].Visible = true; this.GV_List.Columns[9].HeaderText = TheLanguageMgr.TranslateMessage("Common.Business.Qty", this.CurrentUser); this.GV_List.Columns[11].HeaderText = TheLanguageMgr.TranslateMessage("Common.Business.QtyToReceive", this.CurrentUser); this.GV_List.DataBind(); } else if (ip.Status == BusinessConstants.CODE_MASTER_STATUS_VALUE_CLOSE) { this.GV_List.Columns[9].Visible = true; this.GV_List.Columns[9].HeaderText = TheLanguageMgr.TranslateMessage("Common.Business.Qty", this.CurrentUser); this.GV_List.Columns[11].Visible = false; this.GV_List.DataBind(); } }
protected override void GetDetail(Resolver resolver) { InProcessLocation inProcessLocation = null; //订单发货 if (resolver.CodePrefix == BusinessConstants.CODE_PREFIX_ORDER) { if (resolver.Transformers != null && resolver.Transformers.Count > 0) { foreach (Transformer transformer in resolver.Transformers) { if (resolver.Input.Trim().ToUpper() == transformer.OrderNo.Trim().ToUpper()) { throw new BusinessErrorException("Common.Business.Error.ReScan", resolver.Code); } } //校验订单配置选项 this.CheckOrderConfigValid(resolver.Input, resolver.Transformers[0].OrderNo); } else { resolver.Transformers = new List <Transformer>(); } inProcessLocation = orderMgr.ConvertOrderToInProcessLocation(resolver.Input); if (inProcessLocation == null || inProcessLocation.InProcessLocationDetails == null || inProcessLocation.InProcessLocationDetails.Count == 0) { throw new BusinessErrorException("Common.Business.Error.NoDetailToShip"); } if (resolver.IsScanHu && resolver.CodePrefix != BusinessConstants.CODE_PREFIX_PICKLIST) { OrderHelper.ClearShippedQty(inProcessLocation);//清空发货数 } List <Transformer> newTransformerList = TransformerHelper.ConvertInProcessLocationDetailsToTransformers(inProcessLocation.InProcessLocationDetails); resolver.Transformers = resolver.Transformers == null ? new List <Transformer>() : resolver.Transformers; resolver.Transformers.AddRange(newTransformerList); } //拣货单发货 else if (resolver.CodePrefix == BusinessConstants.CODE_PREFIX_PICKLIST) { //inProcessLocation = orderMgr.ConvertPickListToInProcessLocation(resolver.Input); IList <PickListResult> pickListResultList = pickListResultMgr.GetPickListResult(resolver.Input); resolver.Transformers = Utility.TransformerHelper.ConvertPickListResultToTransformer(pickListResultList); } resolver.Command = BusinessConstants.CS_BIND_VALUE_TRANSFORMER; }
public void InitPageParameter(InProcessLocation ip, bool printASN) { this.IpNo = ip.IpNo; this.Action = "View"; this.ucEdit.Action = "View"; this.btnClose.Visible = false; this.ucEdit.InitPageParameter(ip.IpNo); this.ucDetailList.InitPageParameter(ip); //if (ip.Status == BusinessConstants.CODE_MASTER_STATUS_VALUE_CREATE) //{ // this.btnUpdate.Visible = true; //} if (printASN) { this.PrintASN(ip); } }
public void InitPageParameter(InProcessLocation inProcessLocation) { IList <InProcessLocationDetail> inProcessLocationDetailList = new List <InProcessLocationDetail>(); if (inProcessLocation.InProcessLocationDetails != null && inProcessLocation.InProcessLocationDetails.Count > 0) { foreach (InProcessLocationDetail inProcessLocationDetail in inProcessLocation.InProcessLocationDetails) { if (inProcessLocationDetail.HuId != null) { inProcessLocationDetailList.Add(inProcessLocationDetail); } } } this.GV_List.DataSource = inProcessLocationDetailList; this.GV_List.DataBind(); }
public void CreateInProcessLocationDetail(InProcessLocation inProcessLocation, OrderLocationTransaction outOrderLocationTransaction, IList <Hu> huList) { if (huList != null && huList.Count > 0) { foreach (Hu hu in huList) { InProcessLocationDetail inProcessLocationDetail = new InProcessLocationDetail(); inProcessLocationDetail.InProcessLocation = inProcessLocation; inProcessLocationDetail.OrderLocationTransaction = outOrderLocationTransaction; inProcessLocationDetail.HuId = hu.HuId; inProcessLocationDetail.LotNo = hu.LotNo; inProcessLocationDetail.Qty = hu.Qty * hu.UnitQty / outOrderLocationTransaction.UnitQty; //先乘Hu.UnitQty转为基本单位,在除outOrderLocationTransaction.UnitQty转为订单单位。 inProcessLocation.AddInProcessLocationDetail(inProcessLocationDetail); this.CreateInProcessLocationDetail(inProcessLocationDetail); } } }
public Resolver ReceiveOrder(Resolver resolver) { ReceiptDetail recDet = new ReceiptDetail(); IList <ReceiptDetail> receiptDetailList = orderMgr.ConvertTransformerToReceiptDetail(resolver.Transformers); InProcessLocation ip = null; if (resolver.CodePrefix == BusinessConstants.CODE_PREFIX_ASN) { ip = inProcessLocationMgr.LoadInProcessLocation(resolver.Code); } Receipt receipt = orderMgr.ReceiveOrder(receiptDetailList, resolver.UserCode, ip, resolver.ExternalOrderNo); resolver.Transformers = TransformerHelper.ConvertReceiptToTransformer(receipt.ReceiptDetails); resolver.Code = receipt.ReceiptNo; resolver.BinCode = string.Empty; resolver.Result = languageMgr.TranslateMessage("Common.Business.RecNoIs", resolver.UserCode, receipt.ReceiptNo); resolver.Command = BusinessConstants.CS_BIND_VALUE_TRANSFORMER; return(resolver); }