/// <summary> /// 得DN /// </summary> /// <param name="mode">mode</param> /// <param name="status"></param> /// <returns></returns> public IList<DNForUI> GetDeliveryListByModel(string mode, string status) { IList<DNForUI> ret = new List<DNForUI>(); IList<Delivery> getList = null; getList = currentRepository.GetDeliveryListByModel(mode, status); foreach (Delivery tmp in getList) { DNForUI ele = new DNForUI(); if (tmp.Qty <= productRepository.GetCombinedQtyByDN(tmp.DeliveryNo)) { continue; } ele.Qty = tmp.Qty; ele.PoNo = tmp.PoNo; ele.ShipDate = tmp.ShipDate; ele.Status = tmp.Status; ele.ModelName = tmp.ModelName; ele.DeliveryNo = tmp.DeliveryNo; ret.Add(ele); } return ret; }
/// <summary> /// /// </summary> /// <param name="custSN"></param> /// <param name="line"></param> /// <param name="code"></param> /// <param name="floor"></param> /// <param name="editor"></param> /// <param name="station"></param> /// <param name="customer"></param> /// <returns></returns> public ArrayList InputSN(string custSN, string line, string editor, string station, string customer) { logger.Debug("(CombineCOAandDNNew)InputSN start, custSn:" + custSN); try { List<string> erpara = new List<string>(); var currentProduct = CommonImpl.GetProductByInput(custSN, CommonImpl.InputTypeEnum.CustSN); string sessionKey = currentProduct.ProId; Session currentSession = SessionManager.GetInstance.GetSession(sessionKey, SessionType); if (currentSession == null) { currentSession = new Session(sessionKey, SessionType, editor, station, line, customer); Dictionary<string, object> wfArguments = new Dictionary<string, object>(); wfArguments.Add("Key", sessionKey); wfArguments.Add("Station", station); wfArguments.Add("CurrentFlowSession", currentSession); wfArguments.Add("Editor", editor); wfArguments.Add("PdLine", line); wfArguments.Add("Customer", customer); wfArguments.Add("SessionType", SessionType); string wfName, rlName; RouteManagementUtils.GetWorkflow(station, "CombineCOAandDNNew.xoml", "", out wfName, out rlName); WorkflowInstance instance = WorkflowRuntimeManager.getInstance.CreateXomlFisWorkflow(wfName, rlName, wfArguments); currentSession.AddValue(Session.SessionKeys.IsComplete, false); currentSession.SetInstance(instance); if (!SessionManager.GetInstance.AddSession(currentSession)) { currentSession.WorkflowInstance.Terminate("Session:" + sessionKey + " Exists."); FisException ex; erpara.Add(sessionKey); ex = new FisException("CHK020", erpara); throw ex; } currentSession.WorkflowInstance.Start(); currentSession.SetHostWaitOne(); } else { FisException ex; erpara.Add(sessionKey); ex = new FisException("CHK020", erpara); throw ex; } if (currentSession.Exception != null) { if (currentSession.GetValue(Session.SessionKeys.WFTerminated) != null) { currentSession.ResumeWorkFlow(); } throw currentSession.Exception; } //======================================================== ArrayList retList = new ArrayList(); Product curProduct = (Product)currentSession.GetValue(Session.SessionKeys.Product); Delivery curDn = (Delivery)currentSession.GetValue(Session.SessionKeys.Delivery); //如果是Win8 机型,如果Image D/L 未上传相关数据,则报告错误:“Win 8 信息不完整!” //if exists(select * from ModelBOM a (nolock), Part b (nolock) //where a.Material = @Model //and a.Component = b.PartNo //and b.BomNodeType = 'P1' //and b.Descr LIKE 'ECOA%') //select 'This product is WIN8 Model' //if 3 <> (select COUNT(*) from ProductInfo nolock //where ProductID = @ProductID and InfoType in ('P/N','Key', 'Hash')) //select 'Win 8 信息不完整!' string win8Flag = ""; IList<MoBOMInfo> win8list = bomRep.GetPnListByModelAndBomNodeTypeAndDescr(curProduct.Model, "P1", "ECOA"); if (win8list.Count > 0) { IList<string> typeList = new List<string>(); typeList.Add("P/N"); typeList.Add("Key"); typeList.Add("Hash"); IList<IMES.FisObject.FA.Product.ProductInfo> infoList = productRep.GetProductInfoList(curProduct.ProId, typeList); if (infoList == null || infoList.Count != 3) { SessionManager.GetInstance.RemoveSession(currentSession); FisException ex; erpara.Add(sessionKey); ex = new FisException("CHK885", erpara);//Win 8 信息不完整! throw ex; } win8Flag = "WIN8"; } //只有当前PRODUCT没有收集COA (Product_Part)并且在ModelBOM 中Model 下阶存在BomNodeType = 'P1', //且IMES_GetData..Part.Descr LIKE 'COA%' 的Part的情况下,才需要收集COA string coaPn = ""; string productCoa = ""; IHierarchicalBOM curBom = bomRep.GetHierarchicalBOMByModel(curProduct.Model); IList<IBOMNode> bomNodeList = curBom.FirstLevelNodes; foreach (IBOMNode bomNode in bomNodeList) { if ((bomNode.Part.BOMNodeType == "P1") && bomNode.Part.Descr.IndexOf("COA") == 0) { coaPn = bomNode.Part.PN; currentSession.AddValue("COABOMPart", bomNode.Part); break; } } if (!string.IsNullOrEmpty(coaPn)) { if (curProduct.ProductParts != null && curProduct.ProductParts.Count > 0) { foreach (ProductPart iprodpart in curProduct.ProductParts) { IPart curPart = partRep.GetPartByPartNo(iprodpart.PartID); if (curPart.BOMNodeType == "P1" && curPart.Descr.IndexOf("COA") == 0) { productCoa = curPart.PN; break; } } } } //(此处存在例外情况:当使用Code = @CustomerSN and Type = 'SN' //或者Code = @DeliveryNo and Type = 'DN'查询InternalCOA 表 存在记录时,不需要收集COA) if (!string.IsNullOrEmpty(coaPn)) { bool snflag = partRep.CheckExistInternalCOA(curProduct.CUSTSN, "SN"); bool dnflag = partRep.CheckExistInternalCOA(curProduct.CUSTSN, "DN"); if (snflag || dnflag) { coaPn = ""; } } ProductModel curModel = new ProductModel(); curModel.ProductID = curProduct.ProId; curModel.CustSN = curProduct.CUSTSN; curModel.Model = curProduct.Model; string custPN = ""; DNForUI autoDn = new DNForUI(); if (!curProduct.IsBT) { autoDn.DeliveryNo = curDn.DeliveryNo; autoDn.ModelName = curDn.ModelName; custPN = deliveryRep.GetDeliveryInfoValue(curDn.DeliveryNo, "PartNo"); int startindex = custPN.IndexOf("/") + 1; if (startindex < 0) { startindex = 0; } autoDn.Editor = custPN.Substring(startindex, custPN.Length - startindex);//CustomerPN autoDn.PoNo = curDn.PoNo; autoDn.ShipDate_Str = curDn.ShipDate.Year.ToString("d4") + "/" + curDn.ShipDate.Month.ToString("d2") + "/" + curDn.ShipDate.Day.ToString("d2"); autoDn.Qty = curDn.Qty; IList<IProduct> productList = new List<IProduct>(); productList = productRep.GetProductListByDeliveryNo(curDn.DeliveryNo); autoDn.ShipmentID = Convert.ToString(productList.Count);//packetQty } string cdsiFlag = (string)currentSession.GetValue("CDSI"); //保存正确COAPN currentSession.AddValue("COAPN", coaPn); currentSession.AddValue(Session.SessionKeys.COASN, ""); retList.Add(curModel); retList.Add(curProduct.IsBT); retList.Add(coaPn); retList.Add(autoDn); retList.Add(win8Flag); retList.Add(cdsiFlag); retList.Add(productCoa); //======================================================== return retList; } catch (FisException e) { logger.Error(e.mErrmsg, e); throw new Exception(e.mErrmsg); } catch (Exception e) { logger.Error(e.Message, e); throw new SystemException(e.Message); } finally { logger.Debug("(CombineCOAandDNNew)InputSN end, uutSn:" + custSN); } }
/// <summary> /// /// </summary> /// <param name="prodId"></param> /// <param name="printItems"></param> public ArrayList save(string prodId, IList<PrintItem> printItems) { logger.Debug("(CombineCOAandDNNewImpl)save start, [prodId]: " + prodId); FisException ex; List<string> erpara = new List<string>(); ArrayList retList = new ArrayList(); string sessionKey = prodId; try { Session session = SessionManager.GetInstance.GetSession(sessionKey, SessionType); if (session == null) { erpara.Add(sessionKey); ex = new FisException("CHK021", erpara); throw ex; } else { session.AddValue(Session.SessionKeys.PrintItems, printItems); session.AddValue(Session.SessionKeys.IsComplete, true); session.Exception = null; session.SwitchToWorkFlow(); //check workflow exception if (session.Exception != null) { if (session.GetValue(Session.SessionKeys.WFTerminated) != null) { session.ResumeWorkFlow(); } throw session.Exception; } Product curProduct = (Product)session.GetValue(Session.SessionKeys.Product); Delivery curDn = (Delivery)session.GetValue(Session.SessionKeys.Delivery); IList<PrintItem> printList = (IList<PrintItem>)session.GetValue(Session.SessionKeys.PrintItems); //Model 的第10,11码是”29” 或者”39” 的产品是出货日本的产品;否则,是非出货日本的产品 string jpmodel = curProduct.Model.Substring(9, 2); bool jpflag = false; if (jpmodel == "29" || jpmodel == "39") { jpflag = true; } string bindError = (string)session.GetValue("BindDNError"); string custPN = ""; DNForUI autoDn = new DNForUI(); if (!curProduct.IsBT) { autoDn.DeliveryNo = curDn.DeliveryNo; autoDn.ModelName = curDn.ModelName; custPN = deliveryRep.GetDeliveryInfoValue(curDn.DeliveryNo, "PartNo"); int startindex = custPN.IndexOf("/") + 1; if (startindex < 0) { startindex = 0; } autoDn.Editor = custPN.Substring(startindex, custPN.Length - startindex);//CustomerPN autoDn.PoNo = curDn.PoNo; autoDn.ShipDate_Str = curDn.ShipDate.Year.ToString("d4") + "/" + curDn.ShipDate.Month.ToString("d2") + "/" + curDn.ShipDate.Day.ToString("d2"); autoDn.Qty = curDn.Qty; IList<IProduct> productList = new List<IProduct>(); productList = productRep.GetProductListByDeliveryNo(curDn.DeliveryNo); autoDn.ShipmentID = Convert.ToString(productList.Count);//packetQty } retList.Add(printList); retList.Add(jpflag); retList.Add(autoDn); return retList; } } catch (FisException e) { logger.Error(e.mErrmsg); throw e; } catch (Exception e) { logger.Error(e.Message); throw e; } finally { logger.Debug("(CombineCOAandDNNewImpl)save end, [prodId]: " + prodId); } }
protected void hidbtn_DataEntry(Object sender, EventArgs e) { string inputData = this.hidData.Value.Trim(); string key = this.hidSessionKey.Value.Trim(); DNForUI info = new DNForUI(); IList<DeliveryPalletInfo> palletList = new List<DeliveryPalletInfo>(); IList<ProductModel> proList = new List<ProductModel>(); int i = 1; try { string pallet = this.hidPallet.Value.ToString(); string dnNo = this.hidDeliveryNo.Value.ToString(); palletList = iShipToCartonLabel.GetPalletInfoByDN(dnNo); int PalletQty = 0; int scanQty = 0; this.CmbPallet.InnerDropDownList.Items.Clear(); this.CmbPallet.InnerDropDownList.Items.Add(string.Empty); if (palletList != null && palletList.Count != 0) { foreach (DeliveryPalletInfo temp in palletList) { this.CmbPallet.InnerDropDownList.Items.Add(new ListItem(temp.palletNo + " " + temp.deliveryQty, temp.palletNo)); if (pallet != "") { if (pallet == temp.palletNo) { this.CmbPallet.setSelected(i); proList = iShipToCartonLabel.GetProductByPallet(temp.palletNo); bindProTable(proList, DEFAULT_ROWS); PalletQty = iShipToCartonLabel.GetQtyByPallet(temp.palletNo); scanQty = iShipToCartonLabel.GetScanQtyByPallet(temp.palletNo); lblQty2Content.Text = PalletQty.ToString(); lblScanQtyContent.Text = scanQty.ToString(); i++; } } else { if (i == 1) { proList = iShipToCartonLabel.GetProductByPallet(temp.palletNo); bindProTable(proList, DEFAULT_ROWS); PalletQty = iShipToCartonLabel.GetQtyByPallet(temp.palletNo); scanQty = iShipToCartonLabel.GetScanQtyByPallet(temp.palletNo); lblQty2Content.Text = PalletQty.ToString(); lblScanQtyContent.Text = scanQty.ToString(); this.CmbPallet.setSelected(1); i++; } } } } //inputFinish(); endWaitingCoverDiv(); } catch (FisException ex) { showErrorMessage(ex.mErrmsg); inputFinish(); } catch (Exception ex) { showErrorMessage(ex.Message); inputFinish(); } }
public IList<DNForUI> GetDNListByUI(string dn) { IList<DNForUI> dnUIList = new List<DNForUI>(); IList<Delivery> dnList = new List<Delivery>(); DateTime beginTime = DateTime.Now; string[] statuses = { "00", "87" }; IDeliveryRepository DeliveryRepository = RepositoryFactory.GetInstance().GetRepository<IDeliveryRepository, Delivery>(); beginTime = beginTime.AddDays(-2); dnList = DeliveryRepository.GetDeliveryListByStatusesAndModel(beginTime, statuses, "PC", 12); //ForTest /*Delivery d1 = new Delivery(); d1.ModelName = "d1Model"; d1.PoNo = "d1PoNo"; d1.ShipDate = beginTime; d1.DeliveryNo = "d1DeliveryNo"; d1.Qty = 123; dnList.Add(d1); */ //ForTest foreach (Delivery temp in dnList) { DNForUI item = new DNForUI(); item.ModelName = temp.ModelName; //Customer P/N item.DeliveryInfo = new Dictionary<string, string>(); string partProperty = (string)temp.GetExtendedProperty("PartNo"); if (!String.IsNullOrEmpty(partProperty) && partProperty.Contains('/')) { string[] tmpPartNo = partProperty.Split(new Char[] {'/'}, 2); item.DeliveryInfo.Add("PartNo", tmpPartNo[1]); } else { item.DeliveryInfo.Add("PartNo", ""); } //Customer P/N item.PoNo = temp.PoNo; item.ShipDate = temp.ShipDate; item.DeliveryNo = temp.DeliveryNo; item.Qty = temp.Qty; dnUIList.Add(item); } return dnUIList; }
public ArrayList ChangePrintLabel(string key) { logger.Debug("(ShipToCartonLabel)ChangePrintLabel start, [key]:" + key); FisException ex; List<string> erpara = new List<string>(); string sessionKey = key; ArrayList retValue = new ArrayList(); try { Session currentCommonSession = SessionManager.GetInstance.GetSession(sessionKey, Session.SessionType.Common); if (currentCommonSession == null) { erpara.Add(sessionKey); ex = new FisException("CHK021", erpara); throw ex; } else { currentCommonSession.Exception = null; currentCommonSession.SwitchToWorkFlow(); //check workflow exception if (currentCommonSession.Exception != null) { if (currentCommonSession.GetValue(Session.SessionKeys.WFTerminated) != null) { currentCommonSession.ResumeWorkFlow(); } throw currentCommonSession.Exception; } //Delivery Info Delivery currentDelivery = (Delivery)currentCommonSession.GetValue(Session.SessionKeys.Delivery); DNForUI item = new DNForUI(); item.ModelName = currentDelivery.ModelName; item.PoNo = currentDelivery.PoNo; item.DeliveryNo = currentDelivery.DeliveryNo; item.Qty = currentDelivery.Qty; item.DeliveryInfo = new Dictionary<string, string>(); string t = (string)currentDelivery.GetExtendedProperty("PartNo"); if (!String.IsNullOrEmpty(t) && t.Contains('/')) { string[] tmpPartNo = t.Split(new Char[] {'/'}, 2); item.DeliveryInfo.Add("PartNo", tmpPartNo[1]); retValue.Add(tmpPartNo[1]); } else { item.DeliveryInfo.Add("PartNo", ""); retValue.Add(""); } //Delivery Info //Location Info And Pallet Info string message = string.Empty; string pallet = string.Empty; if ((int)currentCommonSession.GetValue(Session.SessionKeys.MaintainAction) == 1) { message = (string)currentCommonSession.GetValue("LocationMess"); pallet = (string)currentCommonSession.GetValue(Session.SessionKeys.Pallet); } else { message = ""; pallet = ""; } //Location Info And Pallet Info IList<PrintItem> printParams = (IList<PrintItem>)currentCommonSession.GetValue(Session.SessionKeys.PrintItems); int printType = 0; int actionType = 0; if ((int)currentCommonSession.GetValue(Session.SessionKeys.MaintainAction) == 1) { printType = (int)currentCommonSession.GetValue(Session.SessionKeys.InfoValue); actionType = (int)currentCommonSession.GetValue(Session.SessionKeys.MaintainAction); } else { actionType = (int)currentCommonSession.GetValue(Session.SessionKeys.MaintainAction); printType = 0; } int changeLabel = (int)currentCommonSession.GetValue(Session.SessionKeys.labelBranch); string pdfname = ""; if ((int)currentCommonSession.GetValue(Session.SessionKeys.MaintainAction) == 1) { if ((int)currentCommonSession.GetValue(Session.SessionKeys.InfoValue) == 0) { pdfname = (string)currentCommonSession.GetValue("PDFFileName"); } } retValue.Add(item.ModelName); retValue.Add(item.PoNo); retValue.Add(item.DeliveryNo); retValue.Add(item.Qty.ToString()); retValue.Add(printType.ToString()); retValue.Add(printParams); retValue.Add(message); retValue.Add(pallet); retValue.Add(actionType.ToString()); retValue.Add(changeLabel.ToString()); retValue.Add(pdfname); return retValue; } } catch (FisException e) { logger.Error(e.mErrmsg); throw e; } catch (Exception e) { logger.Error(e.Message); throw e; } finally { logger.Debug("(ShipToCartonLabel)ChangePrintLabel end, [key]:" + key); } }
/// <summary> /// /// </summary> /// <param name="data"></param> /// <param name="type"></param> /// <param name="sessionKey"></param> /// <param name="printItemLst"></param> /// <param name="pdLine"></param> /// <param name="station"></param> /// <param name="editor"></param> /// <param name="customer"></param> /// <returns></returns> public ArrayList InputProcess(string data, int type, string sessionKey, IList<PrintItem> printItemLst, string pdLine, string station, string editor, string customer) { logger.Debug("ShipToCartonLabel WF start, pdLine:" + pdLine + " ,editor:" + editor + " ,station:" + station + " ,customer:" + customer); string currentSessionKey = Guid.NewGuid().ToString(); ArrayList retValue = new ArrayList(); try { Session currentCommonSession = SessionManager.GetInstance.GetSession(currentSessionKey, Session.SessionType.Common); if (currentCommonSession == null) { currentCommonSession = new Session(currentSessionKey, Session.SessionType.Common, editor, station, pdLine, customer); Dictionary<string, object> wfArguments = new Dictionary<string, object>(); wfArguments.Add("Key", currentSessionKey); wfArguments.Add("Station", station); wfArguments.Add("CurrentFlowSession", currentCommonSession); wfArguments.Add("Editor", editor); wfArguments.Add("PdLine", pdLine); wfArguments.Add("Customer", customer); wfArguments.Add("SessionType", Session.SessionType.Common); WorkflowInstance instance = WorkflowRuntimeManager.getInstance.CreateXomlFisWorkflow("ShipToCartonLabel.xoml", "ShipToCartonLabel.rules", wfArguments); if (data.Length == DEFINE_DN_LEN) { currentCommonSession.AddValue(Session.SessionKeys.MaintainAction, 0); currentCommonSession.AddValue(Session.SessionKeys.DeliveryNo, data); } else if (data.Length == DEFINE_SN_LEN) { currentCommonSession.AddValue(Session.SessionKeys.MaintainAction, 1); currentCommonSession.AddValue(Session.SessionKeys.CustSN, data); currentCommonSession.AddValue(Session.SessionKeys.PrintItems, printItemLst); currentCommonSession.AddValue(Session.SessionKeys.CN, type); } else { FisException ex; List<string> erpara = new List<string>(); erpara.Add(data); ex = new FisException("CHK837", erpara); throw ex; } currentCommonSession.SetInstance(instance); if (!SessionManager.GetInstance.AddSession(currentCommonSession)) { currentCommonSession.WorkflowInstance.Terminate("Session:" + currentSessionKey + " Exists."); FisException ex; List<string> erpara = new List<string>(); erpara.Add(currentSessionKey); ex = new FisException("CHK020", erpara); throw ex; } currentCommonSession.WorkflowInstance.Start(); currentCommonSession.SetHostWaitOne(); } else { FisException ex; List<string> erpara = new List<string>(); erpara.Add(currentSessionKey); ex = new FisException("CHK020", erpara); throw ex; } if (currentCommonSession.Exception != null) { if (currentCommonSession.GetValue(Session.SessionKeys.WFTerminated) != null) { currentCommonSession.ResumeWorkFlow(); } throw currentCommonSession.Exception; } int changeLabel = 0; if ((int)currentCommonSession.GetValue(Session.SessionKeys.MaintainAction) == 0) { changeLabel = 0; } else { changeLabel = (int)currentCommonSession.GetValue(Session.SessionKeys.labelBranch); } if (changeLabel == 1 && type == 0) { retValue.Add(currentSessionKey); } else { //Delivery Info Delivery currentDelivery = (Delivery)currentCommonSession.GetValue(Session.SessionKeys.Delivery); DNForUI item = new DNForUI(); item.ModelName = currentDelivery.ModelName; item.PoNo = currentDelivery.PoNo; item.DeliveryNo = currentDelivery.DeliveryNo; item.Qty = currentDelivery.Qty; item.DeliveryInfo = new Dictionary<string, string>(); string t = (string)currentDelivery.GetExtendedProperty("PartNo"); if (!String.IsNullOrEmpty(t) && t.Contains('/')) { string[] tmpPartNo = t.Split(new Char[] {'/'} ,2); item.DeliveryInfo.Add("PartNo", tmpPartNo[1]); retValue.Add(tmpPartNo[1]); } else { item.DeliveryInfo.Add("PartNo", ""); retValue.Add(""); } //Delivery Info //Location Info And Pallet Info string message = string.Empty; string pallet = string.Empty; if ((int)currentCommonSession.GetValue(Session.SessionKeys.MaintainAction) == 1) { message = (string)currentCommonSession.GetValue("LocationMess"); pallet = (string)currentCommonSession.GetValue(Session.SessionKeys.Pallet); } else { message = ""; pallet = ""; } //Location Info And Pallet Info IList<PrintItem> printParams = new List<PrintItem>(); if ((int)currentCommonSession.GetValue(Session.SessionKeys.MaintainAction) == 1) { printParams = (IList<PrintItem>)currentCommonSession.GetValue(Session.SessionKeys.PrintItems); } int printType = 0; int actionType = 0; if ((int)currentCommonSession.GetValue(Session.SessionKeys.MaintainAction) == 1) { printType = (int)currentCommonSession.GetValue(Session.SessionKeys.InfoValue); actionType = (int)currentCommonSession.GetValue(Session.SessionKeys.MaintainAction); } else { actionType = (int)currentCommonSession.GetValue(Session.SessionKeys.MaintainAction); printType = 2; } string pdfname = ""; if ((int)currentCommonSession.GetValue(Session.SessionKeys.MaintainAction) == 1) { if ((int)currentCommonSession.GetValue(Session.SessionKeys.InfoValue) == 0) { pdfname = (string)currentCommonSession.GetValue("PDFFileName"); } } retValue.Add(item.ModelName); retValue.Add(item.PoNo); retValue.Add(item.DeliveryNo); retValue.Add(item.Qty.ToString()); retValue.Add(printType.ToString()); retValue.Add(printParams); retValue.Add(message); retValue.Add(pallet); retValue.Add(actionType.ToString()); retValue.Add(changeLabel.ToString()); retValue.Add(pdfname); } return retValue; } catch (FisException e) { throw e; } catch (Exception e) { throw new SystemException(e.Message); } finally { logger.Debug("ShipToCartonLabel end, pdLine:" + pdLine + " ,editor:" + editor + " ,station:" + station + " ,customer:" + customer); } }
/// <summary> /// get dn palletinfo by palletno /// </summary> /// <param name="pltno"></param> /// <returns></returns> public IList<DNForUI> getInfoByPallet(string pltno) { try { IList<DNForUI> Infolist = new List<DNForUI>(); IPalletRepository palletRepository = RepositoryFactory.GetInstance().GetRepository<IPalletRepository, Pallet>(); IList<DeliveryPallet> dnpltlist = palletRepository.GetDeliveryPallet(pltno); if(dnpltlist!=null && dnpltlist.Count >0) { DNForUI dpinfo=null; foreach (DeliveryPallet dp in dnpltlist) { dpinfo = new DNForUI(); dpinfo.DeliveryNo =dp.DeliveryID; dpinfo.Qty =dp.DeliveryQty; dpinfo.PoNo = pltno; //pallet no Infolist.Add(dpinfo); } } return Infolist; } catch (FisException e) { logger.Error(e.mErrmsg, e); throw new Exception(e.mErrmsg); } catch (Exception e) { logger.Error(e.Message, e); throw new SystemException(e.Message); } }
/// <summary> /// 根据model获取对应的delivery信息列表按照ShipDate排序 /// </summary> /// <param name="model"></param> /// <returns>Delivery信息列表</returns> public IList<DNForUI> GetDeliveryListByCarton(string model, string status) { IDeliveryRepository dnRep = RepositoryFactory.GetInstance().GetRepository<IDeliveryRepository, Delivery>(); IList<Delivery> dnlist = dnRep.GetDeliveryListByShipDateAndModelAndStatus(model); IList<DNForUI> retlist = new List<DNForUI>(); foreach (Delivery dn in dnlist) { DNForUI dnInfo = new DNForUI(); dnInfo.DeliveryNo = dn.DeliveryNo; dnInfo.ShipDate = dn.ShipDate; dnInfo.Qty = dn.Qty; dnInfo.ModelName = dn.ModelName; retlist.Add(dnInfo); } return retlist; }