提交代码

This commit is contained in:
高飞 2025-03-31 10:44:47 +08:00
parent 6dc89f6242
commit 1731276f30
12 changed files with 75 additions and 27 deletions

Binary file not shown.

View File

@ -261,6 +261,9 @@
</f:DatePicker>
</Editor>
</f:RenderField>
<f:WindowField ColumnID="myUploadFile5" Width="160px" WindowID="Window6" HeaderText="预热照片" TextAlign="Center" HeaderTextAlign="Center"
Text="预热照片" ToolTip="预热照片" DataTextFormatString="{0}" DataIFrameUrlFields="JOT_ID5"
DataIFrameUrlFormatString="../../AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/HJGL/HotProessManage&menuId=90579BE7-E38C-4CD2-6666-755169FF3BB2&edit=1" DataWindowTitleFormatString="附件上传 - {0}" />
<f:WindowField ColumnID="myUploadFile1" Width="160px" WindowID="Window6" HeaderText="热电偶照片" TextAlign="Center" HeaderTextAlign="Center"
Text="热电偶照片" ToolTip="热电偶照片" DataTextFormatString="{0}" DataIFrameUrlFields="JOT_ID1"
DataIFrameUrlFormatString="../../AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/HJGL/HotProessManage&menuId=90579BE7-E38C-4CD2-6666-755169FF3BB2&edit=1" DataWindowTitleFormatString="附件上传 - {0}" />

View File

@ -121,7 +121,7 @@ namespace FineUIPro.Web.HJGL.HotProessManage
if (this.tvControlItem.SelectedNode.CommandName == "项目名称")
{
strSql = @"SELECT JointInfo.ProjectId,JointInfo.JOT_ID,Project.ProjectCode,HotProessItem.PrintDate,Sort1,Sort2,Sort3,Sort4,Sort5,
JointInfo.JOT_ID+'1' as JOT_ID1, JointInfo.JOT_ID+'2' as JOT_ID2,JointInfo.JOT_ID+'3' as JOT_ID3,JointInfo.JOT_ID+'4' as JOT_ID4,
JointInfo.JOT_ID+'1' as JOT_ID1, JointInfo.JOT_ID+'2' as JOT_ID2,JointInfo.JOT_ID+'3' as JOT_ID3,JointInfo.JOT_ID+'4' as JOT_ID4,JointInfo.JOT_ID+'5' as JOT_ID5,
(CASE WHEN v.RepairMark IS NOT NULL THEN (JointInfo.JOT_JointNo+v.RepairMark)
ELSE JointInfo.JOT_JointNo END )+isnull((select Top 1 HardRepairMark from dbo.HJGL_CH_HotProessTrustItem a where a.JOT_ID=HotProessItem.JOT_ID and a.HotProessTrustId=HotProessItem.HotProessTrustId and a.ProessTypes=HotProessItem.ProessTypes),'') AS JOT_JointNo,IsoInfo.ISO_IsoNo,IsoInfo.ISO_ID,
(CASE WHEN Steel.STE_Code IS NOT NULL AND Steel2.STE_Code IS NOT NULL and Steel.STE_Code!=Steel2.STE_Code
@ -1366,7 +1366,7 @@ namespace FineUIPro.Web.HJGL.HotProessManage
NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0);
int i = 2;
strSql = @"SELECT JointInfo.ProjectId,JointInfo.JOT_ID,Project.ProjectCode,HotProessItem.PrintDate,HotProessTrust.HotProessTrustCode,(select Top 1 TrustDate from dbo.HJGL_CH_HotProessTrustItem a where a.JOT_ID=HotProessItem.JOT_ID and a.HotProessTrustId=HotProessItem.HotProessTrustId) as TrustDate,
JointInfo.JOT_ID+'1' as JOT_ID1, JointInfo.JOT_ID+'2' as JOT_ID2,JointInfo.JOT_ID+'3' as JOT_ID3,JointInfo.JOT_ID+'4' as JOT_ID4,
JointInfo.JOT_ID+'1' as JOT_ID1, JointInfo.JOT_ID+'2' as JOT_ID2,JointInfo.JOT_ID+'3' as JOT_ID3,JointInfo.JOT_ID+'4' as JOT_ID4,JointInfo.JOT_ID+'5' as JOT_ID5,
(CASE WHEN v.RepairMark IS NOT NULL THEN (JointInfo.JOT_JointNo+v.RepairMark)
ELSE JointInfo.JOT_JointNo END )+isnull((select Top 1 HardRepairMark from dbo.HJGL_CH_HotProessTrustItem a where a.JOT_ID=HotProessItem.JOT_ID and a.HotProessTrustId=HotProessItem.HotProessTrustId and a.ProessTypes=HotProessItem.ProessTypes),'') AS JOT_JointNo,IsoInfo.ISO_IsoNo,IsoInfo.ISO_ID,
(CASE WHEN Steel.STE_Code IS NOT NULL AND Steel2.STE_Code IS NOT NULL and Steel.STE_Code!=Steel2.STE_Code
@ -1403,20 +1403,21 @@ namespace FineUIPro.Web.HJGL.HotProessManage
NPOI.SS.UserModel.IRow row;
NPOI.SS.UserModel.ICell cell;
List<string> jotIds = new List<string>();
int col13 = 0, col14 = 0, col15 = 0, col16 = 0;
int col13 = 0, col14 = 0, col15 = 0, col16 = 0, col17 = 0;
for (int j = 0; j < tb.Rows.Count; j++)
{
if (!jotIds.Contains(tb.Rows[j]["JOT_ID"].ToString()))
{
string jotId = tb.Rows[j]["JOT_ID"].ToString();
jotIds.Add(jotId);
var attachFile5 = attachFiles.FirstOrDefault(x => x.ToKeyId == (jotId + "5"));
var attachFile1 = attachFiles.FirstOrDefault(x => x.ToKeyId == (jotId + "1"));
var attachFile2 = attachFiles.FirstOrDefault(x => x.ToKeyId == (jotId + "2"));
var attachFile3 = attachFiles.FirstOrDefault(x => x.ToKeyId == (jotId + "3"));
var attachFile4 = attachFiles.FirstOrDefault(x => x.ToKeyId == (jotId + "4"));
if (attachFile1 != null)
if (attachFile5 != null)
{
string url = BLL.Funs.RootPath + attachFile1.AttachUrl;
string url = BLL.Funs.RootPath + attachFile5.AttachUrl;
if (File.Exists(url))
{
System.Drawing.Image image = System.Drawing.Image.FromFile(url);
@ -1426,9 +1427,9 @@ namespace FineUIPro.Web.HJGL.HotProessManage
}
}
}
if (attachFile2 != null)
if (attachFile1 != null)
{
string url = BLL.Funs.RootPath + attachFile2.AttachUrl;
string url = BLL.Funs.RootPath + attachFile1.AttachUrl;
if (File.Exists(url))
{
System.Drawing.Image image = System.Drawing.Image.FromFile(url);
@ -1438,9 +1439,9 @@ namespace FineUIPro.Web.HJGL.HotProessManage
}
}
}
if (attachFile3 != null)
if (attachFile2 != null)
{
string url = BLL.Funs.RootPath + attachFile3.AttachUrl;
string url = BLL.Funs.RootPath + attachFile2.AttachUrl;
if (File.Exists(url))
{
System.Drawing.Image image = System.Drawing.Image.FromFile(url);
@ -1450,9 +1451,9 @@ namespace FineUIPro.Web.HJGL.HotProessManage
}
}
}
if (attachFile4 != null)
if (attachFile3 != null)
{
string url = BLL.Funs.RootPath + attachFile4.AttachUrl;
string url = BLL.Funs.RootPath + attachFile3.AttachUrl;
if (File.Exists(url))
{
System.Drawing.Image image = System.Drawing.Image.FromFile(url);
@ -1462,6 +1463,18 @@ namespace FineUIPro.Web.HJGL.HotProessManage
}
}
}
if (attachFile4 != null)
{
string url = BLL.Funs.RootPath + attachFile4.AttachUrl;
if (File.Exists(url))
{
System.Drawing.Image image = System.Drawing.Image.FromFile(url);
if (image.Width > col17)
{
col17 = image.Width;
}
}
}
i++;
}
}
@ -1481,6 +1494,10 @@ namespace FineUIPro.Web.HJGL.HotProessManage
{
sheet.SetColumnWidth(16, col16 * 37);
}
if (col17 > 0)
{
sheet.SetColumnWidth(17, col17 * 37);
}
i = 2;
jotIds.Clear();
for (int j = 0; j < tb.Rows.Count; j++)
@ -1490,11 +1507,24 @@ namespace FineUIPro.Web.HJGL.HotProessManage
string jotId = tb.Rows[j]["JOT_ID"].ToString();
jotIds.Add(jotId);
row = sheet.CreateRow(i);
var attachFile5 = attachFiles.FirstOrDefault(x => x.ToKeyId == (jotId + "5"));
var attachFile1 = attachFiles.FirstOrDefault(x => x.ToKeyId == (jotId + "1"));
var attachFile2 = attachFiles.FirstOrDefault(x => x.ToKeyId == (jotId + "2"));
var attachFile3 = attachFiles.FirstOrDefault(x => x.ToKeyId == (jotId + "3"));
var attachFile4 = attachFiles.FirstOrDefault(x => x.ToKeyId == (jotId + "4"));
int height = 0;
if (attachFile5 != null)
{
string url = BLL.Funs.RootPath + attachFile5.AttachUrl;
if (File.Exists(url))
{
System.Drawing.Image image = System.Drawing.Image.FromFile(url);
if (image.Height > height)
{
height = image.Height;
}
}
}
if (attachFile1 != null)
{
string url = BLL.Funs.RootPath + attachFile1.AttachUrl;
@ -1617,15 +1647,26 @@ namespace FineUIPro.Web.HJGL.HotProessManage
cell.SetCellValue(string.Empty);
cell = row.CreateCell(17);
cell.CellStyle = cellStyle;
cell.SetCellValue(string.Empty);
cell = row.CreateCell(18);
cell.CellStyle = cellStyle;
cell.SetCellValue(tb.Rows[j]["Remark"].ToString());
if (attachFile5 != null)
{
string fp = BLL.Funs.RootPath + attachFile5.AttachUrl;
if (File.Exists(fp))
{
byte[] fileBytes = File.ReadAllBytes(fp);
TryAddPicture(sheet, i, 13, fileBytes, PictureType.PNG);
}
}
if (attachFile1 != null)
{
string fp = BLL.Funs.RootPath + attachFile1.AttachUrl;
if (File.Exists(fp))
{
byte[] fileBytes = File.ReadAllBytes(fp);
TryAddPicture(sheet, i, 13, fileBytes, PictureType.PNG);
TryAddPicture(sheet, i, 14, fileBytes, PictureType.PNG);
}
}
if (attachFile2 != null)
@ -1634,7 +1675,7 @@ namespace FineUIPro.Web.HJGL.HotProessManage
if (File.Exists(fp))
{
byte[] fileBytes = File.ReadAllBytes(fp);
TryAddPicture(sheet, i, 14, fileBytes, PictureType.PNG);
TryAddPicture(sheet, i, 15, fileBytes, PictureType.PNG);
}
}
if (attachFile3 != null)
@ -1643,7 +1684,7 @@ namespace FineUIPro.Web.HJGL.HotProessManage
if (File.Exists(fp))
{
byte[] fileBytes = File.ReadAllBytes(fp);
TryAddPicture(sheet, i, 15, fileBytes, PictureType.PNG);
TryAddPicture(sheet, i, 16, fileBytes, PictureType.PNG);
}
}
if (attachFile4 != null)
@ -1652,7 +1693,7 @@ namespace FineUIPro.Web.HJGL.HotProessManage
if (File.Exists(fp))
{
byte[] fileBytes = File.ReadAllBytes(fp);
TryAddPicture(sheet, i, 16, fileBytes, PictureType.PNG);
TryAddPicture(sheet, i, 17, fileBytes, PictureType.PNG);
}
}

View File

@ -547,17 +547,21 @@ namespace FineUIPro.Web.HJGL.HotProessManage
string jotId = dic[a];
if (b == 16)
{
jotId += "1";
jotId += "5";
}
else if (b == 17)
{
jotId += "2";
jotId += "1";
}
else if (b == 18)
{
jotId += "3";
jotId += "2";
}
else if (b == 19)
{
jotId += "3";
}
else if (b == 20)
{
jotId += "4";
}

View File

@ -99,7 +99,7 @@
</f:RenderField>
<f:RenderField Width="120px" ColumnID="Warrantybook" DataField="Warrantybook" FieldType="String"
HeaderText="质保书号" HeaderTextAlign="Center" TextAlign="Center">
HeaderText="入库自编号" HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
<f:RenderField Width="130px" ColumnID="Number" DataField="Number" FieldType="String"
HeaderText="流水号" HeaderTextAlign="Center" TextAlign="Center">

View File

@ -79,13 +79,13 @@
<publishTime>09/10/2013 16:29:20</publishTime>
</File>
<File Include="bin/BLL.dll">
<publishTime>03/12/2025 10:55:18</publishTime>
<publishTime>03/27/2025 09:47:29</publishTime>
</File>
<File Include="bin/BLL.dll.config">
<publishTime>07/03/2024 11:01:05</publishTime>
</File>
<File Include="bin/BLL.pdb">
<publishTime>03/12/2025 10:55:18</publishTime>
<publishTime>03/27/2025 09:47:29</publishTime>
</File>
<File Include="bin/BouncyCastle.Crypto.dll">
<publishTime>12/17/2020 21:32:28</publishTime>
@ -115,10 +115,10 @@
<publishTime>07/25/2012 11:48:56</publishTime>
</File>
<File Include="bin/Model.dll">
<publishTime>03/12/2025 10:55:15</publishTime>
<publishTime>03/27/2025 09:47:29</publishTime>
</File>
<File Include="bin/Model.pdb">
<publishTime>03/12/2025 10:55:15</publishTime>
<publishTime>03/27/2025 09:47:29</publishTime>
</File>
<File Include="bin/Newtonsoft.Json.dll">
<publishTime>02/18/2018 09:44:54</publishTime>
@ -316,10 +316,10 @@
<publishTime>02/01/2018 12:20:56</publishTime>
</File>
<File Include="bin/WebAPI.dll">
<publishTime>03/12/2025 10:55:21</publishTime>
<publishTime>03/27/2025 09:47:33</publishTime>
</File>
<File Include="bin/WebAPI.pdb">
<publishTime>03/12/2025 10:55:21</publishTime>
<publishTime>03/27/2025 09:47:33</publishTime>
</File>
<File Include="bin/WebGrease.dll">
<publishTime>01/23/2014 13:57:34</publishTime>
@ -445,7 +445,7 @@
<publishTime>07/03/2024 11:01:07</publishTime>
</File>
<File Include="Web.config">
<publishTime>03/12/2025 10:55:47</publishTime>
<publishTime>03/27/2025 09:47:47</publishTime>
</File>
</ItemGroup>
</Project>