Exemplo n.º 1
0
        public void CreateRepack(Resolver resolver)
        {
            IList <RepackDetail> repackDetailList = executeMgr.ConvertTransformerListToRepackDetail(resolver.Transformers);

            if (repackDetailList.Count == 0)
            {
                throw new BusinessErrorException("MasterData.Inventory.Repack.Error.RepackDetailEmpty");
            }
            Repack repack = repackMgr.CreateRepack(repackDetailList, userMgr.LoadUser(resolver.UserCode, false, true));

            resolver.Code         = repack.RepackNo;
            resolver.Transformers = null;
            resolver.Command      = BusinessConstants.CS_BIND_VALUE_TRANSFORMERDETAIL;
            resolver.Result       = languageMgr.TranslateMessage("MasterData.Inventory.Repack.Successfully", resolver.UserCode);


            #region 打印
            if (resolver.IsCSClient)
            {
                IList <Hu> huList = new List <Hu>();
                repack = repackMgr.LoadRepack(resolver.Code, true);
                foreach (RepackDetail repackDet in repack.RepackDetails)
                {
                    if (repackDet.IOType == BusinessConstants.IO_TYPE_OUT && repackDet.LocationLotDetail.Hu != null &&
                        repackDet.LocationLotDetail.Hu.PrintCount == 0)
                    {
                        huList.Add(repackDet.LocationLotDetail.Hu);
                    }
                }
                resolver.PrintUrl = PrintHu(huList, resolver.UserCode);
            }
            #endregion
        }
Exemplo n.º 2
0
        public override IList <object> GetDataList(string code)
        {
            IList <object> list   = new List <object>();
            Repack         repack = repackMgr.LoadRepack(code, true);

            if (repack != null)
            {
                list.Add(repack);
            }
            return(list);
        }