Browse Source

修改导出excel数据模板

callm 6 days ago
parent
commit
4d79e724b7

+ 18 - 17
UAS_MES_LGDZ/DataOperate/ExcelHandler.cs

@@ -126,7 +126,7 @@ namespace UAS_MES_NEW.DataOperate
                     row2.Cells[0].CellStyle = style; row2.Cells[1].CellStyle = style;
                     row2.CreateCell(2); row2.CreateCell(3); row2.Cells[2].SetCellValue(custname); row2.Cells[2].CellStyle = style;
                     row2.Cells[2].CellStyle = style; row2.Cells[3].CellStyle = style;
-                    row2.CreateCell(4); row2.CreateCell(5); row2.Cells[4].SetCellValue("文件编号://"+ filecode); row2.Cells[4].CellStyle = style;
+                    row2.CreateCell(4); row2.CreateCell(5); row2.Cells[4].SetCellValue("文件编号:"+ filecode); row2.Cells[4].CellStyle = style;
                     row2.Cells[4].CellStyle = style; row2.Cells[5].CellStyle = style;
                     row2.CreateCell(6); row2.CreateCell(7); row2.Cells[6].SetCellValue("发行日期:" + releasedate); row2.Cells[6].CellStyle = style;
                     row2.Cells[6].CellStyle = style; row2.Cells[7].CellStyle = style;
@@ -145,7 +145,7 @@ namespace UAS_MES_NEW.DataOperate
                     row3.Cells[0].CellStyle = style; row3.Cells[1].CellStyle = style;
                     row3.CreateCell(2); row3.CreateCell(3); row3.Cells[2].SetCellValue(spec);
                     row3.Cells[2].CellStyle = style; row3.Cells[3].CellStyle = style;
-                    row3.CreateCell(4); row3.CreateCell(5); row3.Cells[4].SetCellValue(bomversion);
+                    row3.CreateCell(4); row3.CreateCell(5); row3.Cells[4].SetCellValue("BOM编号:"+bomversion);
                     row3.Cells[4].CellStyle = style; row3.Cells[5].CellStyle = style;
                     row3.CreateCell(6); row3.CreateCell(7); row3.Cells[6].SetCellValue("生效日期:" + workdate);
                     row3.Cells[6].CellStyle = style; row3.Cells[7].CellStyle = style;
@@ -157,41 +157,42 @@ namespace UAS_MES_NEW.DataOperate
                     sheet1.AddMergedRegion(cellRangeAddress8);
                     sheet1.AddMergedRegion(cellRangeAddress9);
                     sheet1.AddMergedRegion(cellRangeAddress10);
-                    row4.CreateCell(0); row4.CreateCell(1); row4.Cells[0].SetCellValue("程序名称\t\r\n");
+                    row4.CreateCell(0); row4.CreateCell(1); row4.Cells[0].SetCellValue("程序名称");
                     row4.Cells[0].CellStyle = style; row4.Cells[1].CellStyle = style;
-                    row4.CreateCell(2); row4.CreateCell(3); row4.Cells[2].SetCellValue(DataTable.Rows[i]["STF_CODE"].ToString() + "\t\r\n");
+                    row4.CreateCell(2); row4.CreateCell(3); row4.Cells[2].SetCellValue(DataTable.Rows[i]["STF_CODE"].ToString() + "");
                     row4.Cells[2].CellStyle = style; row4.Cells[3].CellStyle = style;
-                    row4.CreateCell(4); row4.CreateCell(5); row4.Cells[4].SetCellValue("面别:    "+ tableab + "\t\r\n");
+                    row4.CreateCell(4); row4.CreateCell(5); row4.Cells[4].SetCellValue("面别:    "+ tableab + "");
                     row4.Cells[4].CellStyle = style; row4.Cells[5].CellStyle = style;
+                    row4.CreateCell(6); row4.CreateCell(7); row4.Cells[6].SetCellValue("ECN记录:" + ecn);
+                    row4.Cells[6].CellStyle = style; row4.Cells[7].CellStyle = style;
                     //机器名称
                     IRow row5 = sheet1.CreateRow(4);
-                    CellRangeAddress cellRangeAddress14 = new CellRangeAddress(5, 5, 0, 1);
-                    CellRangeAddress cellRangeAddress15 = new CellRangeAddress(5, 5, 2, 3);
-                    CellRangeAddress cellRangeAddress16 = new CellRangeAddress(5, 5, 4, 5);
-                    CellRangeAddress cellRangeAddress20 = new CellRangeAddress(5, 6, 6, 7);
-                    sheet1.AddMergedRegion(cellRangeAddress20);
+                    CellRangeAddress cellRangeAddress14 = new CellRangeAddress(4, 4, 0, 1);
+                    CellRangeAddress cellRangeAddress15 = new CellRangeAddress(4, 4, 2, 3);
+                    CellRangeAddress cellRangeAddress16 = new CellRangeAddress(4, 4, 4, 5);
+                    CellRangeAddress cellRangeAddress20 = new CellRangeAddress(4, 5, 6, 7);
                     sheet1.AddMergedRegion(cellRangeAddress14);
                     sheet1.AddMergedRegion(cellRangeAddress15);
                     sheet1.AddMergedRegion(cellRangeAddress16);
                     sheet1.AddMergedRegion(cellRangeAddress20);
-                    row5.CreateCell(0); row5.CreateCell(1); row5.Cells[0].SetCellValue("机器名称\t\r\n");
+                    row5.CreateCell(0); row5.CreateCell(1); row5.Cells[0].SetCellValue("机器名称");
                     row5.Cells[0].CellStyle = style; row5.Cells[1].CellStyle = style;
-                    row5.CreateCell(2); row5.CreateCell(3); row5.Cells[2].SetCellValue(machinename+"\t\r\n");
+                    row5.CreateCell(2); row5.CreateCell(3); row5.Cells[2].SetCellValue(machinename);
                     row5.Cells[2].CellStyle = style; row5.Cells[3].CellStyle = style;
-                    row5.CreateCell(4); row5.CreateCell(5); row5.Cells[4].SetCellValue("QA确认:\t\r\n");
+                    row5.CreateCell(4); row5.CreateCell(5); row5.Cells[4].SetCellValue("QA确认:");
                     row5.Cells[4].CellStyle = style; row5.Cells[5].CellStyle = style;
                     row5.CreateCell(6); row5.CreateCell(7); row5.Cells[6].SetCellValue("文控签章:");
                     row5.Cells[6].CellStyle = style; row5.Cells[7].CellStyle = style;
 
                     //制作
                     IRow row6 = sheet1.CreateRow(5);
-                    CellRangeAddress cellRangeAddress17 = new CellRangeAddress(6, 6, 0, 1);
-                    CellRangeAddress cellRangeAddress18 = new CellRangeAddress(6, 6, 2, 3);
-                    CellRangeAddress cellRangeAddress19 = new CellRangeAddress(6, 6, 4, 5);
+                    CellRangeAddress cellRangeAddress17 = new CellRangeAddress(5, 5, 0, 1);
+                    CellRangeAddress cellRangeAddress18 = new CellRangeAddress(5, 5, 2, 3);
+                    CellRangeAddress cellRangeAddress19 = new CellRangeAddress(5, 5, 4, 5);
                     sheet1.AddMergedRegion(cellRangeAddress17);
                     sheet1.AddMergedRegion(cellRangeAddress18);
                     sheet1.AddMergedRegion(cellRangeAddress19);
-                    row6.CreateCell(0); row6.CreateCell(1); row6.Cells[0].SetCellValue("制作:");
+                    row6.CreateCell(0); row6.CreateCell(1); row6.Cells[0].SetCellValue("制作:"+ mademan);
                     row6.Cells[0].CellStyle = style; row6.Cells[1].CellStyle = style;
                     row6.CreateCell(2); row6.CreateCell(3); row6.Cells[2].SetCellValue(User.CurrentStepName);
                     row6.Cells[2].CellStyle = style; row6.Cells[3].CellStyle = style;

+ 1 - 1
UAS_MES_LGDZ/FunctionCode/Special/Special_DeleteWN.cs

@@ -82,7 +82,7 @@ namespace UAS_MES_NEW.Special
                 sqls.Add("delete from AGINGRECORD where ar_sncode='" + ms_sncode + "' and ar_macode='" + ms_makecode + "'");
                 sqls.Add("delete from steppassed where sp_sncode='" + ms_sncode + "' or sp_sncode='"+ms_code+"' and sp_makecode='" + ms_makecode + "'");
                 //删除IMIE分配记录
-                sqls.Add("update  makeimeilist set mil_status=0,mil_sncode='',mil_psn='' where mil_sncode='" + ms_sncode + "' and mil_makecode='" + ms_makecode + "'");
+                sqls.Add("update  makeimeilist set mil_status=0,mil_sncode='' where mil_sncode='" + ms_sncode + "' and mil_makecode='" + ms_makecode + "'");
                 //更新MAC使用记录
                 sqls.Add("update makeserial set ms_nextmacode='' where ms_sncode='" + ms_sncode + "' or ms_code='" + ms_code + "' and ms_nextmacode='" + ms_makecode + "'");
                 sqls.Add("update  makeaddresslist set mal_status=0,mal_sncode='' where mal_sncode='" + ms_sncode + "' and mal_makecode='" + ms_makecode + "'");