|
@@ -333,38 +333,37 @@ namespace UAS_LabelMachine
|
|
|
switch (Type)
|
|
switch (Type)
|
|
|
{
|
|
{
|
|
|
case "FixRow":
|
|
case "FixRow":
|
|
|
-
|
|
|
|
|
|
|
+ //清理系统取出来的数据
|
|
|
BaseUtil.CleanDataTableData(FirstDT);
|
|
BaseUtil.CleanDataTableData(FirstDT);
|
|
|
-
|
|
|
|
|
//首页参数拼接
|
|
//首页参数拼接
|
|
|
string First_OrderCode = "";
|
|
string First_OrderCode = "";
|
|
|
string First_Prspec = "";
|
|
string First_Prspec = "";
|
|
|
string First_Batch = "";
|
|
string First_Batch = "";
|
|
|
- string First_WID = "";
|
|
|
|
|
|
|
+ ArrayList<string> First_WID = new ArrayList<string>();
|
|
|
for (int i = 0; i < rowNum; i++)
|
|
for (int i = 0; i < rowNum; i++)
|
|
|
{
|
|
{
|
|
|
IRow row1 = sheet.CreateRow(PaintIndex);
|
|
IRow row1 = sheet.CreateRow(PaintIndex);
|
|
|
PaintIndex = PaintIndex + 1;
|
|
PaintIndex = PaintIndex + 1;
|
|
|
row1.HeightInPoints = 20;
|
|
row1.HeightInPoints = 20;
|
|
|
//不包含的订单号
|
|
//不包含的订单号
|
|
|
- if (!First_OrderCode.Contains(DataTable.Rows[i]["pd_ordercode"].ToString()))
|
|
|
|
|
|
|
+ if (DataTable.Columns.Contains("pd_ordercode") && !First_OrderCode.Contains(DataTable.Rows[i]["pd_ordercode"].ToString()))
|
|
|
{
|
|
{
|
|
|
First_OrderCode += DataTable.Rows[i]["pd_ordercode"].ToString() + " ";
|
|
First_OrderCode += DataTable.Rows[i]["pd_ordercode"].ToString() + " ";
|
|
|
}
|
|
}
|
|
|
//不包含的物料型号
|
|
//不包含的物料型号
|
|
|
- if (!First_Prspec.Contains(DataTable.Rows[i]["pr_spec"].ToString()))
|
|
|
|
|
|
|
+ if (DataTable.Columns.Contains("pr_spec") && !First_Prspec.Contains(DataTable.Rows[i]["pr_spec"].ToString()))
|
|
|
{
|
|
{
|
|
|
First_Prspec += DataTable.Rows[i]["pr_spec"].ToString() + " ";
|
|
First_Prspec += DataTable.Rows[i]["pr_spec"].ToString() + " ";
|
|
|
}
|
|
}
|
|
|
//不包含扩撒批号
|
|
//不包含扩撒批号
|
|
|
- if (!First_Batch.Contains(DataTable.Rows[i]["扩散批号"].ToString()))
|
|
|
|
|
|
|
+ if (DataTable.Columns.Contains("扩散批号") && !First_Batch.Contains(DataTable.Rows[i]["扩散批号"].ToString()))
|
|
|
{
|
|
{
|
|
|
First_Batch += DataTable.Rows[i]["扩散批号"].ToString() + " ";
|
|
First_Batch += DataTable.Rows[i]["扩散批号"].ToString() + " ";
|
|
|
}
|
|
}
|
|
|
//不包含Wafer_id
|
|
//不包含Wafer_id
|
|
|
- if (!First_WID.Contains(DataTable.Rows[i]["Wafer_ID"].ToString()))
|
|
|
|
|
|
|
+ if (DataTable.Columns.Contains("Wafer_ID") &&!First_WID.Contains(DataTable.Rows[i]["Wafer_ID"].ToString()))
|
|
|
{
|
|
{
|
|
|
- First_WID += DataTable.Rows[i]["Wafer_ID"].ToString() + " ";
|
|
|
|
|
|
|
+ First_WID.Add(DataTable.Rows[i]["Wafer_ID"].ToString());
|
|
|
}
|
|
}
|
|
|
if (i / PageSize >= 1 && i % PageSize == 0)
|
|
if (i / PageSize >= 1 && i % PageSize == 0)
|
|
|
{
|
|
{
|
|
@@ -376,14 +375,14 @@ namespace UAS_LabelMachine
|
|
|
dr["pd_ordercode"] = First_OrderCode;
|
|
dr["pd_ordercode"] = First_OrderCode;
|
|
|
dr["pr_spec"] = First_Prspec;
|
|
dr["pr_spec"] = First_Prspec;
|
|
|
dr["ch_splitbatch"] = First_Batch;
|
|
dr["ch_splitbatch"] = First_Batch;
|
|
|
- dr["ch_waterid"] = First_WID;
|
|
|
|
|
|
|
+ dr["ch_waterid"] = BaseUtil.GetArrStr(First_WID," ");
|
|
|
dr["num"] = PageSize;
|
|
dr["num"] = PageSize;
|
|
|
dr["io_qty"] = sumCount;
|
|
dr["io_qty"] = sumCount;
|
|
|
FirstDT.Rows.Add(dr);
|
|
FirstDT.Rows.Add(dr);
|
|
|
First_OrderCode = "";
|
|
First_OrderCode = "";
|
|
|
First_Prspec = "";
|
|
First_Prspec = "";
|
|
|
First_Batch = "";
|
|
First_Batch = "";
|
|
|
- First_WID = "";
|
|
|
|
|
|
|
+ First_WID.Clear();
|
|
|
for (int j = 0; j < columnNum - 4; j++)
|
|
for (int j = 0; j < columnNum - 4; j++)
|
|
|
{
|
|
{
|
|
|
if (j == 0)
|
|
if (j == 0)
|
|
@@ -409,8 +408,8 @@ namespace UAS_LabelMachine
|
|
|
//每次到了页数开始分页
|
|
//每次到了页数开始分页
|
|
|
if (i % PageSize == 0 || i == rowNum - 1)
|
|
if (i % PageSize == 0 || i == rowNum - 1)
|
|
|
{
|
|
{
|
|
|
- //第一行添加客户信息
|
|
|
|
|
- if (i != rowNum - 1)
|
|
|
|
|
|
|
+ //第一行添加客户信息 rownum只有一行的情
|
|
|
|
|
+ if (i != rowNum - 1 || rowNum == 1)
|
|
|
{
|
|
{
|
|
|
for (int j = 0; j < columnNum - 3; j++)
|
|
for (int j = 0; j < columnNum - 3; j++)
|
|
|
{
|
|
{
|
|
@@ -505,8 +504,8 @@ namespace UAS_LabelMachine
|
|
|
dr["pd_ordercode"] = First_OrderCode;
|
|
dr["pd_ordercode"] = First_OrderCode;
|
|
|
dr["pr_spec"] = First_Prspec;
|
|
dr["pr_spec"] = First_Prspec;
|
|
|
dr["ch_splitbatch"] = First_Batch;
|
|
dr["ch_splitbatch"] = First_Batch;
|
|
|
- dr["ch_waterid"] = First_WID;
|
|
|
|
|
- dr["num"] =(i% PageSize)+1;
|
|
|
|
|
|
|
+ dr["ch_waterid"] = BaseUtil.GetArrStr(First_WID, " ");
|
|
|
|
|
+ dr["num"] = (i % PageSize) + 1;
|
|
|
dr["io_qty"] = sumCount;
|
|
dr["io_qty"] = sumCount;
|
|
|
FirstDT.Rows.Add(dr);
|
|
FirstDT.Rows.Add(dr);
|
|
|
row1 = sheet.CreateRow(PaintIndex);
|
|
row1 = sheet.CreateRow(PaintIndex);
|
|
@@ -544,7 +543,8 @@ namespace UAS_LabelMachine
|
|
|
row1.CreateCell(j);
|
|
row1.CreateCell(j);
|
|
|
row1.Cells[j].SetCellValue(totalCount);
|
|
row1.Cells[j].SetCellValue(totalCount);
|
|
|
}
|
|
}
|
|
|
- else if (j == columnNum - 5)
|
|
|
|
|
|
|
+ //原本是j == columnNum - 5因为还有spec和order两列隐藏列,所以需要在往后移动
|
|
|
|
|
+ else if (j == columnNum - 7)
|
|
|
{
|
|
{
|
|
|
row1.CreateCell(j);
|
|
row1.CreateCell(j);
|
|
|
row1.Cells[j].SetCellValue(rowNum);
|
|
row1.Cells[j].SetCellValue(rowNum);
|
|
@@ -729,7 +729,7 @@ namespace UAS_LabelMachine
|
|
|
row1.CreateCell(j);
|
|
row1.CreateCell(j);
|
|
|
row1.Cells[j].SetCellValue(totalCount);
|
|
row1.Cells[j].SetCellValue(totalCount);
|
|
|
}
|
|
}
|
|
|
- else if (j == columnNum - 5)
|
|
|
|
|
|
|
+ else if (j == columnNum - 7)
|
|
|
{
|
|
{
|
|
|
row1.CreateCell(j);
|
|
row1.CreateCell(j);
|
|
|
row1.Cells[j].SetCellValue(rowNum);
|
|
row1.Cells[j].SetCellValue(rowNum);
|
|
@@ -915,7 +915,7 @@ namespace UAS_LabelMachine
|
|
|
row1.CreateCell(j);
|
|
row1.CreateCell(j);
|
|
|
row1.Cells[j].SetCellValue(totalCount);
|
|
row1.Cells[j].SetCellValue(totalCount);
|
|
|
}
|
|
}
|
|
|
- else if (j == columnNum - 5)
|
|
|
|
|
|
|
+ else if (j == columnNum - 7)
|
|
|
{
|
|
{
|
|
|
row1.CreateCell(j);
|
|
row1.CreateCell(j);
|
|
|
row1.Cells[j].SetCellValue(rowNum);
|
|
row1.Cells[j].SetCellValue(rowNum);
|