private List <CompleteDocInfoDTOData> CreateCompleteDocInfos(List <ProductBarCodeByCompleteApplyDTO> barCodeDTOs) { List <CompleteDocInfoDTOData> docInfoList = new List <CompleteDocInfoDTOData>(); CompleteDocInfoDTOData docInfoDTO = new CompleteDocInfoDTOData(); docInfoDTO.BusinessDate = Base.Context.LoginDate; docInfoDTO.CompleteList = new List <WOInfoDTOData>(); docInfoList.Add(docInfoDTO); foreach (ProductBarCodeByCompleteApplyDTO barCodeDTO in barCodeDTOs) { ItemMaster item = new ItemMaster.EntityKey(barCodeDTO.ItemID).GetEntity(); CompleteApplyDocLine completeApplyDocLine = new CompleteApplyDocLine.EntityKey(barCodeDTO.CompleteApplyDocLine).GetEntity(); WOInfoDTOData woInfoDTO = new WOInfoDTOData(); woInfoDTO.CompleteQty = (decimal)(barCodeDTO.ActualLength / 1000.0); //生成批号数据 LotMaster.EntityKey lotKey = LotBuilder.CreateLot(item, barCodeDTO.BarCode, barCodeDTO.ActualLength); woInfoDTO.LotMaster = lotKey.ID; woInfoDTO.LotNo = lotKey.GetEntity().LotCode; woInfoDTO.MOKey = new WOKeyData(); woInfoDTO.MOKey.ID = completeApplyDocLine.MOKey.ID; //扩展字段 woInfoDTO.DescFlexField = GetRcvRptDocLineDescFlexField(completeApplyDocLine); docInfoDTO.CompleteList.Add(woInfoDTO); } return(docInfoList); }
private void SetTransOutLineLotInfo(TransOutLine transOutLine, LotMaster.EntityKey lotKey) { if (lotKey == null) { return; } LotMaster lotMaster = lotKey.GetEntity(); transOutLine.LotInfo = new LotMasterInfo(); transOutLine.LotInfo.DisabledDatetime = lotMaster.InvalidTime; transOutLine.LotInfo.LotCode = lotMaster.LotCode; transOutLine.LotInfo.LotMaster = lotMaster; transOutLine.LotInfo.LotValidDate = lotMaster.ValidDate; }
private void SetRcvLineLotInfo(RcvLine rcvLine, LotMaster.EntityKey lotKey) { if (lotKey == null) { return; } LotMaster lotMaster = lotKey.GetEntity(); //rcvLine.RcvLotKey = lotKey; //rcvLine.RcvLotCode = lotMaster.LotCode; rcvLine.InvLotKey = lotKey; rcvLine.InvLotCode = lotMaster.LotCode; rcvLine.InvLotEnableDate = lotMaster.EffectiveDatetime; rcvLine.InvLotValidDate = lotMaster.ValidDate; }