public void SetWipEntities(List <AscmWipRequirementOperations> list)
 {
     if (list != null && list.Count > 0)
     {
         var    wipEntityIds = list.Select(P => P.wipEntityId).Distinct();
         var    count        = wipEntityIds.Count();
         string ids          = string.Empty;
         for (int i = 0; i < count; i++)
         {
             if (!string.IsNullOrEmpty(ids))
             {
                 ids += ",";
             }
             ids += wipEntityIds.ElementAt(i);
             if ((i + 1) % 500 == 0 || (i + 1) == count)
             {
                 if (!string.IsNullOrEmpty(ids))
                 {
                     string sql = "from AscmWipEntities where wipEntityId in (" + ids + ")";
                     IList <AscmWipEntities> ilistAscmWipEntities = YnDaoHelper.GetInstance().nHibernateHelper.Find <AscmWipEntities>(sql);
                     sql = "from AscmWipDiscreteJobs where wipEntityId in (" + ids + ")";
                     IList <AscmWipDiscreteJobs> ilistAscmWipDiscreteJobs = YnDaoHelper.GetInstance().nHibernateHelper.Find <AscmWipDiscreteJobs>(sql);
                     List <AscmWipEntities>      listAscmWipEntities      = null;
                     List <AscmWipDiscreteJobs>  listAscmWipDiscreteJobs  = null;
                     if (ilistAscmWipEntities != null && ilistAscmWipEntities.Count > 0)
                     {
                         listAscmWipEntities = YnBaseClass2.Helper.ConvertHelper.ConvertIListToList <AscmWipEntities>(ilistAscmWipEntities);
                     }
                     if (ilistAscmWipDiscreteJobs != null && ilistAscmWipDiscreteJobs.Count > 0)
                     {
                         listAscmWipDiscreteJobs = YnBaseClass2.Helper.ConvertHelper.ConvertIListToList <AscmWipDiscreteJobs>(ilistAscmWipDiscreteJobs);
                         AscmWipDiscreteJobsService.GetInstance().SetLookupValues(listAscmWipDiscreteJobs);
                         AscmWipDiscreteJobsService.GetInstance().SetScheduleGroups(listAscmWipDiscreteJobs);
                         AscmWipDiscreteJobsService.GetInstance().SetMaterialItem(listAscmWipDiscreteJobs);
                     }
                     foreach (AscmWipRequirementOperations wipRequirementOperations in list)
                     {
                         if (listAscmWipEntities != null)
                         {
                             AscmWipEntities ascmWipEntities = listAscmWipEntities.Find(e => e.wipEntityId == wipRequirementOperations.wipEntityId);
                             if (ascmWipEntities != null)
                             {
                                 wipRequirementOperations.ascmWipEntities = ascmWipEntities;
                             }
                         }
                         if (listAscmWipDiscreteJobs != null)
                         {
                             AscmWipDiscreteJobs ascmWipDiscreteJobs = listAscmWipDiscreteJobs.Find(e => e.wipEntityId == wipRequirementOperations.wipEntityId);
                             if (ascmWipDiscreteJobs != null)
                             {
                                 wipRequirementOperations.ascmWipDiscreteJobs = ascmWipDiscreteJobs;
                             }
                         }
                     }
                 }
                 ids = string.Empty;
             }
         }
     }
 }
Пример #2
0
 public void SetWipEntities(List <AscmCuxWipReleaseHeaders> list)
 {
     if (list != null && list.Count > 0)
     {
         string ids = string.Empty;
         foreach (AscmCuxWipReleaseHeaders ascmCuxWipReleaseHeaders in list)
         {
             if (!string.IsNullOrEmpty(ids))
             {
                 ids += ",";
             }
             ids += "" + ascmCuxWipReleaseHeaders.wipEntityId + "";
         }
         string sql = "from AscmWipEntities where wipEntityId in (" + ids + ")";
         IList <AscmWipEntities> ilistAscmWipEntities = YnDaoHelper.GetInstance().nHibernateHelper.Find <AscmWipEntities>(sql);
         sql = "from AscmWipDiscreteJobs where wipEntityId in (" + ids + ")";
         IList <AscmWipDiscreteJobs> ilistAscmWipDiscreteJobs = YnDaoHelper.GetInstance().nHibernateHelper.Find <AscmWipDiscreteJobs>(sql);
         List <AscmWipEntities>      listAscmWipEntities      = null;
         List <AscmWipDiscreteJobs>  listAscmWipDiscreteJobs  = null;
         if (ilistAscmWipEntities != null && ilistAscmWipEntities.Count > 0)
         {
             listAscmWipEntities = YnBaseClass2.Helper.ConvertHelper.ConvertIListToList <AscmWipEntities>(ilistAscmWipEntities);
         }
         if (ilistAscmWipDiscreteJobs != null && ilistAscmWipDiscreteJobs.Count > 0)
         {
             listAscmWipDiscreteJobs = YnBaseClass2.Helper.ConvertHelper.ConvertIListToList <AscmWipDiscreteJobs>(ilistAscmWipDiscreteJobs);
             AscmWipDiscreteJobsService.GetInstance().SetLookupValues(listAscmWipDiscreteJobs);
             AscmWipDiscreteJobsService.GetInstance().SetScheduleGroups(listAscmWipDiscreteJobs);
             AscmWipDiscreteJobsService.GetInstance().SetMaterialItem(listAscmWipDiscreteJobs);
         }
         foreach (AscmCuxWipReleaseHeaders ascmCuxWipReleaseHeaders in list)
         {
             if (listAscmWipEntities != null)
             {
                 ascmCuxWipReleaseHeaders.ascmWipEntities = listAscmWipEntities.Find(e => e.wipEntityId == ascmCuxWipReleaseHeaders.wipEntityId);
             }
             if (listAscmWipDiscreteJobs != null)
             {
                 ascmCuxWipReleaseHeaders.ascmWipDiscreteJobs = listAscmWipDiscreteJobs.Find(e => e.wipEntityId == ascmCuxWipReleaseHeaders.wipEntityId);
             }
         }
     }
 }
Пример #3
0
        public void SetWipDiscreteJobs(List <AscmWmsPreparationDetail> list)
        {
            if (list == null || list.Count == 0)
            {
                return;
            }

            var    wipEntityIds = list.Select(P => P.wipEntityId).Distinct();
            var    count        = wipEntityIds.Count();
            string ids          = string.Empty;

            for (int i = 0; i < count; i++)
            {
                if (!string.IsNullOrEmpty(ids))
                {
                    ids += ",";
                }
                ids += wipEntityIds.ElementAt(i);
                if ((i + 1) % 500 == 0 || (i + 1) == count)
                {
                    if (!string.IsNullOrEmpty(ids))
                    {
                        string sql = "from AscmWipDiscreteJobs where wipEntityId in(" + ids + ")";
                        IList <AscmWipDiscreteJobs> ilistWipDiscreteJobs = YnDaoHelper.GetInstance().nHibernateHelper.Find <AscmWipDiscreteJobs>(sql);
                        if (ilistWipDiscreteJobs != null && ilistWipDiscreteJobs.Count > 0)
                        {
                            List <AscmWipDiscreteJobs> listWipDiscreteJobs = ilistWipDiscreteJobs.ToList();
                            AscmWipDiscreteJobsService.GetInstance().SetWipEntities(listWipDiscreteJobs);
                            AscmWipDiscreteJobsService.GetInstance().SetScheduleGroups(listWipDiscreteJobs);
                            AscmWipDiscreteJobsService.GetInstance().SetMaterialItem(listWipDiscreteJobs);
                            list.ForEach(P => P.ascmWipDiscreteJobs = listWipDiscreteJobs.Find(T => T.wipEntityId == P.wipEntityId));
                        }
                    }
                    ids = string.Empty;
                }
            }
        }
Пример #4
0
        public List <AscmCuxWipReleaseHeaders> GetList(YnPage ynPage, string sortName, string sortOrder, string queryWord, string whereOther, string whereWipDiscreteJobs)
        {
            List <AscmCuxWipReleaseHeaders> list = null;

            try
            {
                string whereWipEntityId = "";
                if (!string.IsNullOrEmpty(whereWipDiscreteJobs))
                {
                    //List<AscmWipDiscreteJobs> listWipDiscreteJobs = AscmWipDiscreteJobsService.GetInstance().GetList(ynPage, "", "", queryWord, whereWipDiscreteJobs);
                    List <AscmWipDiscreteJobs> listWipDiscreteJobs = AscmWipDiscreteJobsService.GetInstance().GetList(null, "", "", "", whereWipDiscreteJobs, false, false, false, false);
                    int    iCount = listWipDiscreteJobs.Count();
                    string ids    = string.Empty;
                    for (int i = 0; i < iCount; i++)
                    {
                        if (!string.IsNullOrEmpty(ids))
                        {
                            ids += ",";
                        }
                        ids += listWipDiscreteJobs[i].wipEntityId;
                        if ((i + 1) % 1000 == 0 || i + 1 == iCount)
                        {
                            if (!string.IsNullOrEmpty(ids))
                            {
                                if (!string.IsNullOrEmpty(whereWipEntityId))
                                {
                                    whereWipEntityId += " or ";
                                }
                                whereWipEntityId += "wipEntityId in ( " + ids + ")";
                            }
                            ids = string.Empty;
                        }
                    }
                    if (string.IsNullOrEmpty(whereWipEntityId))
                    {
                        whereWipEntityId = "wipEntityId in ( -1)";
                    }
                    //foreach (AscmWipDiscreteJobs ascmWipDiscreteJobs in listWipDiscreteJobs)
                    //{
                    //    if (whereWipEntityId != "")
                    //        whereWipEntityId += ",";
                    //    whereWipEntityId += ascmWipDiscreteJobs.wipEntityId;
                    //}
                    //if (!string.IsNullOrEmpty(whereWipEntityId))
                    //    whereWipEntityId = "wipEntityId in ( " + whereWipEntityId + ")";
                    //else
                    //    whereWipEntityId = "wipEntityId in ( -1)";
                }
                string sort = " order by releaseHeaderId ";
                if (!string.IsNullOrEmpty(sortName))
                {
                    sort = " order by " + sortName.Trim() + " ";
                    if (!string.IsNullOrEmpty(sortOrder))
                    {
                        sort += sortOrder.Trim();
                    }
                }
                //sort = ""; //不能在里面加order ,否则效率非常低
                string sql = "from AscmCuxWipReleaseHeaders";
                //string detailCount = "select count(*) from AscmCuxWipReleaseLines where releaseHeaderId= a.releaseHeaderId";
                //string totalNumber = "select sum(deliveryQuantity) from AscmDeliveryOrderDetail where mainId= a.id";
                //string sql1 = "select new AscmCuxWipReleaseHeaders(a,(" + detailCount + "),(" + totalNumber + ")) from AscmCuxWipReleaseHeaders a ";
                string sql1 = "select new AscmCuxWipReleaseHeaders(a) from AscmCuxWipReleaseHeaders a ";//,(" + detailCount + ")

                string where = "", whereQueryWord = "";
                if (!string.IsNullOrEmpty(queryWord))
                {
                    whereQueryWord = " (name like '%" + queryWord.Trim() + "%' or description like '%" + queryWord.Trim() + "%')";
                }
                where = YnBaseClass2.Helper.StringHelper.SqlWhereAndAdd(where, whereQueryWord);
                where = YnBaseClass2.Helper.StringHelper.SqlWhereAndAdd(where, whereOther);
                where = YnBaseClass2.Helper.StringHelper.SqlWhereAndAdd(where, whereWipEntityId);

                if (!string.IsNullOrEmpty(where))
                {
                    sql  += " where " + where;
                    sql1 += " where " + where;
                }
                //IList<AscmCuxWipReleaseHeaders> ilist = YnDaoHelper.GetInstance().nHibernateHelper.Find<AscmCuxWipReleaseHeaders>(sql + sort);
                IList <AscmCuxWipReleaseHeaders> ilist = null;
                if (ynPage != null)
                {
                    ilist = YnDaoHelper.GetInstance().nHibernateHelper.Find <AscmCuxWipReleaseHeaders>(sql1 + sort, sql, ynPage);
                }
                else
                {
                    ilist = YnDaoHelper.GetInstance().nHibernateHelper.Find <AscmCuxWipReleaseHeaders>(sql1 + sort);
                }
                if (ilist != null)
                {
                    list = YnBaseClass2.Helper.ConvertHelper.ConvertIListToList <AscmCuxWipReleaseHeaders>(ilist);
                    SetWipEntities(list);
                }
            }
            catch (Exception ex)
            {
                YnBaseClass2.Helper.LogHelper.GetLog().Error("查询失败(Find AscmCuxWipReleaseHeaders)", ex);
                throw ex;
            }
            return(list);
        }
Пример #5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                List <AscmWmsPreparationMain>   listAscmWmsPreparationMain   = null;
                List <AscmWmsPreparationDetail> listAscmWmsPreparationDetail = null;
                List <AscmWmsPreparationDetail> listDetail              = new List <AscmWmsPreparationDetail>();;
                AscmWmsPreparationMain          ascmWmsPreparationMain  = null;
                List <AscmWipDiscreteJobs>      listAscmWipDiscreteJobs = null;
                string wipSupplyType = "";
                string billNoStart = "", billNoEnd = "";
                string materialDocNumberStart = "", materialDocNumberEnd = "";
                string warehouseIdStart = "", warehouseIdEnd = "";
                string scheduledStartDateStart = "", scheduledStartDateEnd = "";
                string jobScheduleGroupsStart = "", jobScheduleGroupsEnd = "";
                string jobProductionLineStart = "", jobProductionLineEnd = "";
                if (!string.IsNullOrEmpty(Request.QueryString["docNumber"]))
                {
                    string docNumber = Request.QueryString["docNumber"];
                    if (!string.IsNullOrEmpty(docNumber))
                    {
                        listAscmWmsPreparationMain = AscmWmsPreparationMainService.GetInstance().GetList(" from AscmWmsPreparationMain where docNumber='" + docNumber + "'");
                        if (listAscmWmsPreparationMain != null && listAscmWmsPreparationMain.Count() > 0)
                        {
                            YnBaseDal.YnPage ynPage = new YnBaseDal.YnPage();
                            ynPage.SetPageSize(500);  //pageRows;
                            ynPage.SetCurrentPage(1); //pageNumber;

                            ascmWmsPreparationMain = listAscmWmsPreparationMain[0];
                            //listAscmWmsPreparationDetail = AscmWmsPreparationDetailService.GetInstance().GetSumList(null,"", "", ascmWmsPreparationMain.id, "", "");
                            //listAscmWmsPreparationDetail = AscmWmsPreparationDetailService.GetInstance().GetList(ynPage,"","",ascmWmsPreparationMain.id,"","");
                            listAscmWmsPreparationDetail = AscmWmsPreparationDetailService.GetInstance().GetList(null, "", "", ascmWmsPreparationMain.id, "", "");
                            AscmWmsPreparationDetailService.GetInstance().SetWipDiscreteJobs(listAscmWmsPreparationDetail);
                            List <AscmWarelocation> listAscmWarelocation = AscmWarelocationService.GetInstance().GetList("from AscmWarelocation");
                            if (listAscmWmsPreparationDetail != null && listAscmWmsPreparationDetail.Count() > 0)
                            {
                                foreach (AscmWmsPreparationDetail ascmWmsPreparationDetail in listAscmWmsPreparationDetail)
                                {
                                    var find = listAscmWarelocation.Find(item => item.id == ascmWmsPreparationDetail.warelocationId);
                                    if (find != null)
                                    {
                                        ascmWmsPreparationDetail.locationDocNumber = find.docNumber;
                                    }
                                }
                                billNoStart            = listAscmWmsPreparationDetail.OrderBy(item => item.wipEntityName).First().wipEntityName;
                                billNoEnd              = listAscmWmsPreparationDetail.OrderBy(item => item.wipEntityName).Last().wipEntityName;
                                materialDocNumberStart = listAscmWmsPreparationDetail.OrderBy(item => item.materialDocNumber).First().materialDocNumber;
                                materialDocNumberEnd   = listAscmWmsPreparationDetail.OrderBy(item => item.materialDocNumber).Last().materialDocNumber;
                                warehouseIdStart       = listAscmWmsPreparationDetail.OrderBy(item => item.warehouseId).First().warehouseId;
                                warehouseIdEnd         = listAscmWmsPreparationDetail.OrderBy(item => item.warehouseId).Last().warehouseId;
                                //wipSupplyType = listAscmWmsPreparationDetail[0].ascmMaterialItem.wipSupplyTypeCn;
                                jobScheduleGroupsStart = listAscmWmsPreparationDetail.OrderBy(item => item.jobScheduleGroupsName).First().jobScheduleGroupsName;
                                jobScheduleGroupsEnd   = listAscmWmsPreparationDetail.OrderBy(item => item.jobScheduleGroupsName).Last().jobScheduleGroupsName;
                                jobProductionLineStart = listAscmWmsPreparationDetail.OrderBy(item => item.jobProductionLine).First().jobProductionLine;
                                jobProductionLineEnd   = listAscmWmsPreparationDetail.OrderBy(item => item.jobProductionLine).Last().jobProductionLine;
                                //string billIds = "";
                                var vbillIds = listAscmWmsPreparationDetail.Select(item => item.wipEntityId).Distinct();
                                if (vbillIds != null)
                                {
                                    string billIds = string.Empty;
                                    foreach (int billId in vbillIds)
                                    {
                                        if (!string.IsNullOrEmpty(billIds))
                                        {
                                            billIds += ",";
                                        }
                                        billIds += "'" + billId + "'";
                                    }
                                    if (!string.IsNullOrEmpty(billIds))
                                    {
                                        string whereOther = " id in (" + billIds + ")";
                                        listAscmWipDiscreteJobs = AscmWipDiscreteJobsService.GetInstance().GetList(null, "", "", "", whereOther);
                                        scheduledStartDateStart = listAscmWipDiscreteJobs.OrderBy(item => item._scheduledStartDate).First()._scheduledStartDate;
                                        scheduledStartDateEnd   = listAscmWipDiscreteJobs.OrderBy(item => item._scheduledStartDate).Last()._scheduledStartDate;
                                    }
                                }
                                #region 合计 同种物料在一个货位,进行数量合计,同种物料在不同货位,进行分开显示
                                var groupByMaterial = listAscmWmsPreparationDetail.GroupBy(p => p.materialId);
                                foreach (IGrouping <int, AscmWmsPreparationDetail> ig in groupByMaterial)
                                {
                                    //判断此物料的有多少条数据
                                    List <AscmWmsPreparationDetail> list = listAscmWmsPreparationDetail.Where(item => item.materialId == ig.Key).ToList();
                                    if (list != null && list.Count() > 1)
                                    {
                                        var groupByWarelocation = list.GroupBy(p => p.warelocationId);
                                        foreach (IGrouping <int, AscmWmsPreparationDetail> igrouping in groupByWarelocation)
                                        {
                                            AscmWmsPreparationDetail ascmWmsPreparationDetail_ByWarelocation = igrouping.First();
                                            AscmWmsPreparationDetail ascmWmsPreparationDetail = new AscmWmsPreparationDetail();
                                            ascmWmsPreparationDetail.materialId = igrouping.Key;
                                            //ascmWmsPreparationDetail.ascmMaterialItem = ascmWmsPreparationDetail_ByWarelocation.ascmMaterialItem;
                                            ascmWmsPreparationDetail.warehouseId       = ascmWmsPreparationDetail_ByWarelocation.warehouseId;
                                            ascmWmsPreparationDetail.locationDocNumber = ascmWmsPreparationDetail_ByWarelocation.locationDocNumber;
                                            ascmWmsPreparationDetail.wipSupplyType     = ascmWmsPreparationDetail_ByWarelocation.wipSupplyType;
                                            ascmWmsPreparationDetail.planQuantity      = igrouping.Sum(P => P.planQuantity);
                                            //ascmWmsPreparationDetail.quantity = igrouping.Sum(P => P.quantity);
                                            ascmWmsPreparationDetail.issueQuantity       = igrouping.Sum(P => P.issueQuantity);
                                            ascmWmsPreparationDetail.containerBindNumber = igrouping.Sum(P => P.containerBindNumber);
                                            listDetail.Add(ascmWmsPreparationDetail);
                                        }
                                    }
                                    else
                                    {
                                        AscmWmsPreparationDetail _ascmWmsPreparationDetail = ig.First();
                                        AscmWmsPreparationDetail ascmWmsPreparationDetail  = new AscmWmsPreparationDetail();
                                        ascmWmsPreparationDetail.materialId = ig.Key;
                                        //ascmWmsPreparationDetail.ascmMaterialItem = _ascmWmsPreparationDetail.ascmMaterialItem;
                                        ascmWmsPreparationDetail.warehouseId       = _ascmWmsPreparationDetail.warehouseId;
                                        ascmWmsPreparationDetail.locationDocNumber = _ascmWmsPreparationDetail.locationDocNumber;
                                        ascmWmsPreparationDetail.wipSupplyType     = _ascmWmsPreparationDetail.wipSupplyType;
                                        ascmWmsPreparationDetail.planQuantity      = ig.Sum(P => P.planQuantity);
                                        //ascmWmsPreparationDetail.quantity = ig.Sum(P => P.quantity);
                                        ascmWmsPreparationDetail.issueQuantity       = ig.Sum(P => P.issueQuantity);
                                        ascmWmsPreparationDetail.containerBindNumber = ig.Sum(P => P.containerBindNumber);
                                        listDetail.Add(ascmWmsPreparationDetail);
                                    }
                                }
                                #endregion
                            }
                            #region Code128
                            System.IO.MemoryStream    memoryStream = new System.IO.MemoryStream();
                            MideaAscm.Code.BarCode128 barCode128   = new Code.BarCode128();
                            barCode128.TitleFont   = new System.Drawing.Font("宋体", 10);
                            barCode128.HeightImage = 50;
                            System.Drawing.Bitmap bitmap = barCode128.GetCodeImage(docNumber, docNumber, Code.BarCode128.Encode.Code128B);
                            bitmap.Save(memoryStream, System.Drawing.Imaging.ImageFormat.Gif);
                            if (listDetail != null && listDetail.Count() > 0)
                            {
                                listDetail = listDetail.OrderBy(item => item.materialDocNumber).ToList();
                                listDetail[0].barcodeShow = memoryStream.ToArray();
                            }
                            bitmap.Dispose();
                            #endregion

                            #region 条码 Code39
                            //System.IO.MemoryStream memoryStream = new System.IO.MemoryStream();
                            //YnBaseClass2.Helper.BarCode39 barCode39 = new YnBaseClass2.Helper.BarCode39();
                            //barCode39.WidthCU = 10;
                            //barCode39.WidthXI = 3;
                            //System.Drawing.Bitmap bitmap = barCode39.CreateBarCode(docNumber, docNumber, 0, 0);
                            //bitmap.Save(memoryStream, System.Drawing.Imaging.ImageFormat.Gif);
                            //bitmap.Dispose();
                            //if (listDetail != null && listDetail.Count()>0)
                            //    listDetail[0].barcodeShow = memoryStream.ToArray();
                            #endregion
                        }
                    }
                }
                ReportViewer1.ProcessingMode         = Microsoft.Reporting.WebForms.ProcessingMode.Local;
                ReportViewer1.LocalReport.ReportPath = Server.MapPath("WmsPreparationReport.rdlc");
                ReportDataSource rds1 = new ReportDataSource();
                rds1.Name  = "DataSet1";
                rds1.Value = listDetail;
                ReportViewer1.LocalReport.DataSources.Clear();//好像不clear也可以
                ReportViewer1.LocalReport.DataSources.Add(rds1);

                string title = "中央空调顺德工厂需求备料单";
                //string secondTitle = "车间任务物料需求报表";
                string userName = string.Empty;
                if (User.Identity.IsAuthenticated)
                {
                    userName = User.Identity.Name;
                }

                ReportParameter[] reportParameters = new ReportParameter[] {
                    new ReportParameter("ReportParameter_Title", title),
                    //new ReportParameter("ReportParameter_secondTitle", secondTitle),
                    new ReportParameter("ReportParameter_ReportTime", "打印时间:" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")),
                    new ReportParameter("ReportParameter_wipSupplyType", "供应类型:" + wipSupplyType),
                    new ReportParameter("ReportParameter_scheduledStartDate", "计划时间从:" + scheduledStartDateStart + " 至 " + scheduledStartDateEnd),
                    new ReportParameter("ReportParameter_BillNo", "任务从:" + billNoStart + " 至 " + billNoEnd),
                    new ReportParameter("ReportParameter_materialDocNumber", "组件从:" + materialDocNumberStart + " 至 " + materialDocNumberEnd),
                    new ReportParameter("ReportParameter_warehouseId", "子库从:" + warehouseIdStart + " 至 " + warehouseIdEnd),
                    new ReportParameter("ReportParameter_jobScheduleGroups", "计划组从:" + jobScheduleGroupsStart + " 至 " + jobScheduleGroupsEnd),
                    new ReportParameter("ReportParameter_jobProductionLine", "生产线从:" + jobProductionLineStart + " 至 " + jobProductionLineEnd),
                    new ReportParameter("ReportParameter_Printer", "打印人:" + userName),
                };
                ReportViewer1.LocalReport.SetParameters(reportParameters);
                ReportViewer1.LocalReport.Refresh();
            }
        }