//生成评估Excel private void GenExlbut_Click(object sender, EventArgs e) { //未选择文件无法生成,必须excelHelper、excelHelper_another不为空时才能计算下面 if (excelHelper == null) { MessageBox.Show("未选择生产报告,请重新选择!"); return; } //生成需要打开第二个生产报告 if (excelHelper_another == null) { MessageBox.Show("未选择另一个轨道的生产报告,请重新选择!"); return; } #region 获取信息和对应的DataTable,获取结果的成功与失败,判断是否找到对应sheet和是否打开正确的Excel //获取位置信息从getFirstSheetDataTable中提取处理,sheet1和sheet2都有需要的地方 //getEveryInfo(); //第二个sheet DataTable的获取 //验证是不是同一个轨道,Line1或Lin2,从Result获取 string sheetName_Result = "Result"; //主要数据从sheetName_CustomerReport获取 string sheetName_CustomerReport = "CustomerReport_1T"; //DataTable genDT2 = getSecondSheetDataTable(sheetName_CustomerReport, jobName); //第一个sheet DataTable的获取 //需要第二个中的cycletime赋值 //DataTable genDT = getFirstSheetDataTable(); #endregion //未选择文件无法生成 //if (excelHelper == null || genDT == null) { MessageBox.Show("第一次选择的生产报告未找到对应的工作表,请确认后重新选择!"); return; } //生成需要打开第二个生产报告 //if (excelHelper_another == null || genDT2 == null) { MessageBox.Show("第二次选择的生产报告与第一次选择的程式名不同,或未找到对应的工作表sheet,请确认后重新选择!"); return; } #region //调用保存对话框 string excelFileName = ComprehensiveStaticClass.SaveExcleDialogShow(); //保存所需信息到Excel //ComprehensiveSaticClass.genExcelfromBaseComprehensive(excelFileName, baseComprehensive); }
public void getBaseComprehensiveList() { if (layoutInfoList_File.layoutExpressEveryInfo_list.Count == summaryInfoList_File.expressSummaryEveryInfo_list.Count) { int addLenght = layoutInfoList_File.layoutExpressEveryInfo_list.Count; for (int i = 0; i < addLenght; i++) { //resultInfoTable_tuple_list.Add(new Tuple<SummaryEveryInfo, layoutExpressEveryInfo>( // summaryInfoList_File.SummaryEveryInfo_list[i], layoutInfoList_File.layoutExpressEveryInfo_list[i])); EvaluationReportClass baseComprehensive = new EvaluationReportClass(ComprehensiveStaticClass.GetTimeStamp()); baseComprehensive.Jobname = summaryInfoList_File.expressSummaryEveryInfo_list[i].Jobname; baseComprehensive.ToporBot = summaryInfoList_File.expressSummaryEveryInfo_list[i].ToporBot; baseComprehensive.TargetConveyor = summaryInfoList_File.expressSummaryEveryInfo_list[i].TargetConveyor; //Convery为productModle //baseComprehensive.Conveyor = summaryInfoList_File.expressSummaryEveryInfo_list[i].Conveyor; //baseComprehensive.ModuleCount = summaryInfoList_File.expressSummaryEveryInfo_list[i].ModuleCount; baseComprehensive.SummaryDT = summaryInfoList_File.expressSummaryEveryInfo_list[i].SummaryDT; baseComprehensive.ModulepictureDataByte = summaryInfoList_File.expressSummaryEveryInfo_list[i].ModulepictureDataByte; //baseComprehensive.layoutDT = layoutInfoList_File.layoutExpressEveryInfo_list[i].layoutExpressDT; baseComprehensive.feederNozzleDT = layoutInfoList_File.layoutExpressEveryInfo_list[i].feederNozzleDT; baseComprehensive.feederNozzleDT = layoutInfoList_File.layoutExpressEveryInfo_list[i].totalfeederNozzleDT; baseComprehensive_list.Add(baseComprehensive); } } else { MessageBox.Show("Excel报告job数量和CustomerReport存在差异。/n请确认Excel表格后重新选择!"); //执行析构函数 } }
public void getEveryInfo() { //如果打开没有Result的表格,打开其他非报告的表格,则返回DataTable null,重置 if (Resultdt == null) { MessageBox.Show(string.Format("未找到{0}表单,请重新选择!", "Result")); return; } getPannelCalculationMachineconf_Point(); //getJOBs(); //getCalculationPatterns(); getMachineconfPatterns(); //Job的DataTable,17列固定,bot有6列名字与top重复,//'''''暂时支取前11列,无bot信息''''' DataTable JobDT = getJOBDataTable(); /* * //读取calculation Patterns * //for (int i = 0; i < calculation_Pattern_POints.Rank; i++) * for (int i = 0; i < 1; i++) * { * //MessageBox.Show("calculation_Pattern_POints:" + calculation_Pattern_POints[i][0] + calculation_Pattern_POints[i][1]); * } */ //读取machineconf Patterns,及其下的 machine count //for (int i = 0; i < machineconf_Pattern_POints.Rank; i++),若真循环会不断覆盖值,多个job时需要做到动态添加,或者没获取一个信息则处理一个信心。 //.Rank获取的数据也不对,.Rank获取的是维数,不是第一维的个数 //循环获取多个job是对应的信息 #region //各个信息声明在循环获取的外部,但又不是全局变量 // 模组数 int machineCount; // 机器种类 string machineKind; // 所有的Module Type string[] allModuleTypeString; //所有的HEAD Type string[] allHeadTypeString; //字典,存放<模组类型:模组个数> Dictionary <string, int> module_Statistics; //模组种类,即module_Statistics的key ////M3、M6三代、二代\一代的使用 //string moduleKind3_III = "M3III"; //string moduleKind6_III = "M6III"; //string moduleKind3_II = "M3II"; //string moduleKind6_II = "M6II"; //string moduleKind3_I = "M3I"; //string moduleKind6_I = "M6I"; //字典,存放<HeadType:头个数> Dictionary <string, int> Head_Statistics; //中间图片位置信息 string Line_short; //图片信息 List <PicturesInfo> pictureInfoList = null; //---生成Excel各个栏的数据 int boardQty; string Pannelsize; string Line; string Head_Type; string jobName; string cycleTime; string placementNumber; string cPH; string conveyor; string TargetConveyor; string remark; #endregion //拆分开,处理所有Machine configration下面的表格的点 //位置点变量,以开始point,结束point为一组的方式存放 List <int[][]> machineconf_Pattern_All_Group_points = new List <int[][]>(); for (int i = 0; i < machineconf_Pattern_POints.GetLength(0); i++) { //判断是否双面生产,双面获取双面,单面获取单面 int[][] Customer_reportPoints = getCustomer_reportPoints(machineconf_Pattern_POints[i], machineconf_Pattern_POints[i + 1]); if (Customer_reportPoints == null) {//没有任何报告生成 continue; } //获取当前 if (i < machineconf_Pattern_POints.GetLength(0) - 1) { int[][] oneSide_point_Group = new int[][] { machineconf_Pattern_POints[i], machineconf_Pattern_POints[i + 1] }; machineconf_Pattern_All_Group_points.Add(oneSide_point_Group); if (Customer_reportPoints.GetLength(0) == 2) {//top面和bottom面的双面 int[] anotherSide_startPoint = Customer_reportPoints[1]; int[] anotherSide_endPoint = new int[2] { machineconf_Pattern_POints[i + 1][0], Customer_reportPoints[1][1] }; int[][] anotherSide_point_Group = new int[][] { anotherSide_startPoint, anotherSide_endPoint }; machineconf_Pattern_All_Group_points.Add(anotherSide_point_Group); } } else { //对于最后一个的处理,将结束位置设置为null,getSpecifyString_NextRow会获取开始位置到DataTable结束的位置 int[][] oneSide_point_Group = new int[][] { machineconf_Pattern_POints[i], null }; machineconf_Pattern_All_Group_points.Add(oneSide_point_Group); if (Customer_reportPoints.GetLength(0) == 2) {//top面和bottom面的双面 int[] anotherSide_startPoint = Customer_reportPoints[1]; //int[] anotherSide_endPoint = new int[2] { machineconf_Pattern_POints[i + 1][0], Customer_reportPoints[1][1] }; int[][] anotherSide_point_Group = new int[][] { anotherSide_startPoint, null }; machineconf_Pattern_All_Group_points.Add(anotherSide_point_Group); } #region 111 /* * //string findString_machineCount = "Machine count"; * string machineCountString = getSpecifyString_NextRow(findString_machineCount, machineconf_Pattern_POints[i]); * machineCount = Convert.ToInt32(machineCountString); * // MessageBox.Show("machineCount:" + machineCount); * * //获取机器种类 * //string findString_machineKind = "Machine kind"; * string machineKindString = getSpecifyString_NextRow(findString_machineKind, machineconf_Pattern_POints[i]); * machineKind = machineKindString; * * * //获取组合line的信息 * //////获取所有的Module Type, * //string findString_AllModuleType = "Module Type"; * allModuleTypeString = getSpecifyString_NextRow(findString_AllModuleType, machineconf_Pattern_POints[i], machineCount); * * //创建统计模组信息的字典 * module_Statistics = new Dictionary<string, int>(); * //初始化,仅记录M3III,M6III,初始为0 * #region 使用先添加key再统计信息的方法,不灵活 * //module_Statistics.Add(moduleKind3_III, 0); * //module_Statistics.Add(moduleKind6_III, 0); * * //for (int j = 0; j < allModuleTypeString.Length; j++) * //{ * // if (allModuleTypeString[j] == moduleKind3_III) * // { * // module_Statistics[moduleKind3_III] += 1; * // } * // else if (allModuleTypeString[j] == moduleKind6_III) * // { * // module_Statistics[moduleKind6_III] += 1; * // } * * //} * * ////拼接Line字符串 * ////计算base信息 * //int baseCount_4M = ((module_Statistics[moduleKind3_III] + module_Statistics[moduleKind6_III] * 2) / 4); * //int baseCount_2M; * //if (((module_Statistics[moduleKind3_III] + module_Statistics[moduleKind6_III] * 2) % 4) != 0) * //{ * // baseCount_2M = 1; * //} * //else * //{ * // baseCount_2M = 0; * //} * * ////"/r/n" 回车换行符 * //Line = ""; * //Line_short = ""; * //Line_short = machineKind + "-(" + moduleKind3_III + "*" + module_Statistics[moduleKind3_III].ToString() + "+" + moduleKind6_III + "*" + module_Statistics[moduleKind6_III] + ")"; * //Line = machineKind + "-(" + moduleKind3_III + "*" + module_Statistics[moduleKind3_III].ToString() + "+" + moduleKind6_III + "*" + module_Statistics[moduleKind6_III] + ")" + "\n" + "4M BASE III*" + baseCount_4M.ToString() + "+2M BASE III*" + baseCount_2M.ToString(); * ////MessageBox.Show(Line); #endregion * #region 重新统计模组信息 * for (int j = 0; j < allModuleTypeString.Length; j++) * { * if (module_Statistics.ContainsKey(allModuleTypeString[j])) * { * module_Statistics[allModuleTypeString[j]]++; * } * else * { * module_Statistics.Add(allModuleTypeString[j], 1); * } * } #endregion * * //Try LT-Try统计 * int count_LT_Tray = 0; * int count_LTC_Tray = 0; * * //拼接Line字符串 * * //重新计算base信息 * //存储模组对应Base的个数,1个M3 module 对应1个M的base,2个M3 module或1个M6 Module对应2Mbase,4个M3 module或2个M6 Module对应4Mbase * //base尽可能少的分配 * int Count_M = 0; * //单独统计M#、M6个数 * int Count_M3 = 0; * int Count_M6 = 0; * foreach (var moduleKind in module_Statistics) * { * if (moduleKind.Key.Substring(0, 2) == "M3") * { * Count_M += moduleKind.Value; * Count_M3 += moduleKind.Value; * } * if (moduleKind.Key.Substring(0, 2) == "M6") * { * Count_M += moduleKind.Value * 2; * Count_M6 += moduleKind.Value; * } * } * int baseCount_4M = (Count_M / 4); * int baseCount_2M = 0; * if ((Count_M % 4) != 0) * { * baseCount_2M = 1; * } * * //"/r/n" 回车换行符 * Line = ""; * Line_short = ""; * foreach (var item in module_Statistics) * { * Line_short += item.Key + "*" + item.Value.ToString() + "+"; * } * Line_short = machineKind + "-(" + Line_short.Substring(0, Line_short.Length - 1) + ")"; * //判断4Mhe 2M base的数量,进行拼接 * if (baseCount_2M == 0 && baseCount_4M != 0) * { * Line = Line_short + "\n" + "4M BASE III*" + baseCount_4M.ToString(); * } * if (baseCount_2M != 0 && baseCount_4M != 0) * { * Line = Line_short + "\n" + "4M BASE III*" + baseCount_4M.ToString() + "+2M BASE III*" + baseCount_2M.ToString(); * } * if (baseCount_2M != 0 && baseCount_4M == 0) * { * Line = Line_short + "\n" + "2M BASE III*" + baseCount_2M.ToString(); * } * * //MessageBox.Show(Line); * * //获取组合"Head Type"的信息 * //////获取所有的"Head Type", * //string findString_AllHeadType = "Head Type"; * allHeadTypeString = getSpecifyString_NextRow(findString_AllHeadType, machineconf_Pattern_POints[i], machineCount); * * //统计头的信息 字典 * Head_Statistics = new Dictionary<string, int>(); * * for (int j = 0; j < allHeadTypeString.Length; j++) * { * // 只有两种情况,包含key和不包含key * if (Head_Statistics.ContainsKey(allHeadTypeString[j])) * { * Head_Statistics[allHeadTypeString[j]] += 1; * } * else //if (!Head_Statistics.ContainsKey(allHeadTypeString[j])) * { * Head_Statistics.Add(allHeadTypeString[j], 1); * } * * } * * //拼接Head Type * Head_Type = ""; * foreach (var item in Head_Statistics) * { * Head_Type += item.Key + "*" + item.Value + "+"; * } * Head_Type = Head_Type.Substring(0, Head_Type.Length - 1); * // MessageBox.Show(Head_Type); * #region * //NPOI导出生成图片,不用判断格式,jpg和png均可生成。 * //获取图片 * //pictureInfoList = new List<PicturesInfo>(); * //ISheet sheet = excelHelper.ExcelToIsheet("Result"); * ///int maxColumn = ExcelHelper.sheetColumns(sheet); * //仅处理只有一个程式的情况,machineconf_Pattern_POints,到文档结束。 * //pictureInfoList = NpoiExtend.GetAllPictureInfos(sheet, machineconf_Pattern_POints[i][0], sheet.LastRowNum, machineconf_Pattern_POints[i][1], maxColumn); * #endregion * * //获取CPH * //string findString_CPH = "CPH"; * cPH = getSpecifyString_NextRow(findString_CPH, machineconf_Pattern_POints[i]); * * //获取Conveyor,Dual,single * //string findString_Conveyor = "Conveyor"; * conveyor = getSpecifyString_NextColumn(findString_Conveyor, machineconf_Pattern_POints[i]); * * //获取 几轨的程式 * //string findString_TargetConveyor = "TargetConveyor"; * TargetConveyor = getSpecifyString_NextColumn(findString_TargetConveyor, machineconf_Pattern_POints[i]); * * //生成Remake信息 * // * double gonglv = Count_M3 * power_Dictionary["M3III"] + Count_M6 * power_Dictionary["M6III"] + * baseCount_2M * power_Dictionary["2MBase"] + baseCount_4M * power_Dictionary["4MBase"] + * count_LT_Tray * power_Dictionary["LT-Tray"] + count_LTC_Tray * power_Dictionary["LTC-Tray"]; * int haoqiliang = baseCount_4M * air_Consumption_Dictionary["4MBase"] + baseCount_2M * air_Consumption_Dictionary["2MBase"]; * int countu_ip = baseCount_2M + baseCount_4M; * double baseLength = baseLength_Dictionary["2MBase"] * baseCount_2M + baseLength_Dictionary["4MBase"] * baseCount_4M; * //最后拼接 * remark = string.Format("功率:{0}\n耗气量:{1}\n长度:{2}\nIP数:{3}", * gonglv, haoqiliang, baseLength, countu_ip); */ #endregion } } //判断jobDT的数量和machineconf_Pattern_All_Group_points的数量是否一致 if (JobDT.Rows.Count != machineconf_Pattern_All_Group_points.Count) { MessageBox.Show("程序或文件发生了严重的故障!请联系软件作者!!!"); } //根据job的数量 生成summaryinfo for (int i = 0; i < JobDT.Rows.Count; i++) { //每一个的信息 //job name jobName = JobDT.Rows[i]["Name"].ToString(); //获取"Board qty" string BoardQtyString = JobDT.Rows[i]["Board qty"].ToString(); boardQty = Convert.ToInt32(BoardQtyString); //Length Width string Length = JobDT.Rows[i]["Length"].ToString(); string Width = JobDT.Rows[i]["Width"].ToString(); Pannelsize = Length + "*" + Width; //cycletime是line1和 line2的两个时间的平均,但是是在两个报告,两个Excel里面 //string findString_cycleTime = "Cycle time"; //string cycleTime_line1 = getSpecifyString_NextRow(findString_cycleTime, JOBs[i], 3, 17); //cycleTime = cycleTime_line1; string cycleTime_single = JobDT.Rows[i]["Cycle time"].ToString(); //Part qty placementNumber = JobDT.Rows[i]["Part qty"].ToString(); ///////////////////////////////////------------------- //machineconf_Pattern_All_Group_points 成组的开始结束位置 string machineCountString = getSpecifyString_NextRow(findString_machineCount, machineconf_Pattern_All_Group_points[i][0], machineconf_Pattern_All_Group_points[i][1]); machineCount = Convert.ToInt32(machineCountString); // MessageBox.Show("machineCount:" + machineCount); machineKind = getSpecifyString_NextRow(findString_machineKind, machineconf_Pattern_All_Group_points[i][0], machineconf_Pattern_All_Group_points[i][1]); //machineKind = machineKindString; //获取组合line的信息 //获取机器数 allModuleTypeString = getSpecifyString_NextRow(findString_AllModuleType, machineconf_Pattern_All_Group_points[i][0], machineconf_Pattern_All_Group_points[i][1], machineCount); //创建统计模组信息的字典 module_Statistics = new Dictionary <string, int>(); //初始化,仅记录M3III,M6III,初始为0 #region 使用先添加key再统计信息的方法,不灵活 //module_Statistics.Add(moduleKind3_III, 0); //module_Statistics.Add(moduleKind6_III, 0); //for (int j = 0; j < allModuleTypeString.Length; j++) //{ // if (allModuleTypeString[j] == moduleKind3_III) // { // module_Statistics[moduleKind3_III] += 1; // } // else if (allModuleTypeString[j] == moduleKind6_III) // { // module_Statistics[moduleKind6_III] += 1; // } //} ////拼接Line字符串 ////计算base信息 //int baseCount_4M = ((module_Statistics[moduleKind3_III] + module_Statistics[moduleKind6_III] * 2) / 4); //int baseCount_2M; //if (((module_Statistics[moduleKind3_III] + module_Statistics[moduleKind6_III] * 2) % 4) != 0) //{ // baseCount_2M = 1; //} //else //{ // baseCount_2M = 0; //} ////"/r/n" 回车换行符 //Line = ""; //Line_short = ""; //Line_short = machineKind + "-(" + moduleKind3_III + "*" + module_Statistics[moduleKind3_III].ToString() + "+" + moduleKind6_III + "*" + module_Statistics[moduleKind6_III] + ")"; //Line = machineKind + "-(" + moduleKind3_III + "*" + module_Statistics[moduleKind3_III].ToString() + "+" + moduleKind6_III + "*" + module_Statistics[moduleKind6_III] + ")" + "\n" + "4M BASE III*" + baseCount_4M.ToString() + "+2M BASE III*" + baseCount_2M.ToString(); ////MessageBox.Show(Line); #endregion #region 重新统计模组信息 for (int j = 0; j < allModuleTypeString.Length; j++) { if (module_Statistics.ContainsKey(allModuleTypeString[j])) { module_Statistics[allModuleTypeString[j]]++; } else { module_Statistics.Add(allModuleTypeString[j], 1); } } #endregion //Try LT-Try统计 int count_LT_Tray = 0; int count_LTC_Tray = 0; #region//拼接Line字符串 //重新计算base信息 //存储模组对应Base的个数,1个M3 module 对应1个M的base,2个M3 module或1个M6 Module对应2Mbase,4个M3 module或2个M6 Module对应4Mbase //base尽可能少的分配 int Count_M = 0; //单独统计M#、M6个数 int Count_M3 = 0; int Count_M6 = 0; foreach (var moduleKind in module_Statistics) { if (moduleKind.Key.Substring(0, 2) == "M3") { Count_M += moduleKind.Value; Count_M3 += moduleKind.Value; } if (moduleKind.Key.Substring(0, 2) == "M6") { Count_M += moduleKind.Value * 2; Count_M6 += moduleKind.Value; } } int baseCount_4M = (Count_M / 4); int baseCount_2M = 0; if ((Count_M % 4) != 0) { baseCount_2M = 1; } //"/r/n" 回车换行符 Line = ""; Line_short = ""; foreach (var item in module_Statistics) { Line_short += item.Key + "*" + item.Value.ToString() + "+"; } Line_short = machineKind + "-(" + Line_short.Substring(0, Line_short.Length - 1) + ")"; //判断4Mhe 2M base的数量,进行拼接 if (baseCount_2M == 0 && baseCount_4M != 0) { Line = Line_short + "\n" + "4M BASE III*" + baseCount_4M.ToString(); } if (baseCount_2M != 0 && baseCount_4M != 0) { Line = Line_short + "\n" + "4M BASE III*" + baseCount_4M.ToString() + "+2M BASE III*" + baseCount_2M.ToString(); } if (baseCount_2M != 0 && baseCount_4M == 0) { Line = Line_short + "\n" + "2M BASE III*" + baseCount_2M.ToString(); } #endregion #region//获取组合"Head Type"的信息 allHeadTypeString = getSpecifyString_NextRow(findString_AllHeadType, machineconf_Pattern_All_Group_points[i][0], machineconf_Pattern_All_Group_points[i][1], machineCount); //统计头的信息 字典 Head_Statistics = new Dictionary <string, int>(); for (int j = 0; j < allHeadTypeString.Length; j++) { // 只有两种情况,包含key和不包含key if (Head_Statistics.ContainsKey(allHeadTypeString[j])) { Head_Statistics[allHeadTypeString[j]] += 1; } else //if (!Head_Statistics.ContainsKey(allHeadTypeString[j])) { Head_Statistics.Add(allHeadTypeString[j], 1); } } //拼接Head Type Head_Type = ""; foreach (var item in Head_Statistics) { Head_Type += item.Key + "*" + item.Value + "+"; } Head_Type = Head_Type.Substring(0, Head_Type.Length - 1); // MessageBox.Show(Head_Type); #endregion #region //NPOI导出生成图片,不用判断格式,jpg和png均可生成。 //获取图片 //pictureInfoList = new List<PicturesInfo>(); //ISheet sheet = excelHelper.ExcelToIsheet("Result"); ///int maxColumn = ExcelHelper.sheetColumns(sheet); //仅处理只有一个程式的情况,machineconf_Pattern_POints,到文档结束。 //pictureInfoList = NpoiExtend.GetAllPictureInfos(sheet, machineconf_Pattern_POints[i][0], sheet.LastRowNum, machineconf_Pattern_POints[i][1], maxColumn); //已不从文档中获取图片 #endregion cPH = getSpecifyString_NextRow(findString_CPH, machineconf_Pattern_All_Group_points[i][0], machineconf_Pattern_All_Group_points[i][1]); conveyor = getSpecifyString_NextColumn(findString_Conveyor, machineconf_Pattern_All_Group_points[i][0], machineconf_Pattern_All_Group_points[i][1]); TargetConveyor = getSpecifyString_NextColumn(findString_TargetConveyor, machineconf_Pattern_All_Group_points[i][0], machineconf_Pattern_All_Group_points[i][1]); #region //生成Remake信息 // double gonglv = Count_M3 * ComprehensiveStaticClass.power_Dictionary["M3III"] + Count_M6 * ComprehensiveStaticClass.power_Dictionary["M6III"] + baseCount_2M * ComprehensiveStaticClass.power_Dictionary["2MBase"] + baseCount_4M * ComprehensiveStaticClass.power_Dictionary["4MBase"] + count_LT_Tray * ComprehensiveStaticClass.power_Dictionary["LT-Tray"] + count_LTC_Tray * ComprehensiveStaticClass.power_Dictionary["LTC-Tray"]; int haoqiliang = baseCount_4M * ComprehensiveStaticClass.air_Consumption_Dictionary["4MBase"] + baseCount_2M * ComprehensiveStaticClass.air_Consumption_Dictionary["2MBase"]; int countu_ip = baseCount_2M + baseCount_4M; double baseLength = ComprehensiveStaticClass.baseLength_Dictionary["2MBase"] * baseCount_2M + ComprehensiveStaticClass.baseLength_Dictionary["4MBase"] * baseCount_4M; //最后拼接 remark = string.Format("功率:{0}\n耗气量:{1}\n长度:{2}\nIP数:{3}", gonglv, haoqiliang, baseLength, countu_ip); #endregion /////由以上信息获取最后的DataTable //使用泛型list存放info信息,信息个数根据job个数确定。 ExpressSummaryEveryInfo expressSummaryEveryInfo = new ExpressSummaryEveryInfo(); expressSummaryEveryInfo.Jobname = jobName; expressSummaryEveryInfo.TargetConveyor = TargetConveyor; expressSummaryEveryInfo.ProductionMode = conveyor; //expressSummaryEveryInfo.ModuleCount = machineCount; //, cPH 两个轨道综合的CPH,由Layoutinfo获取 expressSummaryEveryInfo.SummaryDT = ComprehensiveStaticClass.getExpressSummayDataTable(boardQty, Line, Head_Type, jobName, Pannelsize, placementNumber, remark); expressSummaryEveryInfo.ModulepictureDataByte = ComprehensiveStaticClass.GenModulesPicture(allModuleTypeString, module_Statistics); expressSummaryEveryInfo.AllModuleType = allModuleTypeString; expressSummaryEveryInfo.AllHeadType = allHeadTypeString; expressSummaryEveryInfo_list.Add(expressSummaryEveryInfo); } }