feat(hjgl)焊前准备,日报管理增加附件

This commit is contained in:
2026-06-24 16:56:00 +08:00
parent dfc9095282
commit 4670220614
23 changed files with 598 additions and 65 deletions
+40
View File
@@ -54,10 +54,50 @@ namespace BLL
var weldjoint = db.View_HJGL_WeldJoint var weldjoint = db.View_HJGL_WeldJoint
.Where(p => p.WeldJointId == WeldJointId) .Where(p => p.WeldJointId == WeldJointId)
.FirstOrDefault(); .FirstOrDefault();
if (weldjoint != null)
{
SetWeldingDailyAttachUrl(db, weldjoint);
}
return weldjoint; return weldjoint;
} }
} }
/// <summary>
/// 回填小程序日报上传的焊前、焊后附件路径
/// </summary>
/// <param name="db">数据库上下文</param>
/// <param name="weldJoint">焊口详情</param>
private static void SetWeldingDailyAttachUrl(Model.SGGLDB db, Model.View_HJGL_WeldJoint weldJoint)
{
var tempDetail = db.HJGL_WeldingDailyTempDetail
.Where(x => x.WeldJointId == weldJoint.WeldJointId)
.OrderByDescending(x => x.SubmitDate)
.FirstOrDefault();
if (tempDetail == null)
{
return;
}
weldJoint.PreWeldAttachUrl = GetAttachUrl(db, Const.HJGL_WeldReportMenuId, tempDetail.TempDetailId + "#Before");
weldJoint.PostWeldAttachUrl = GetAttachUrl(db, Const.HJGL_WeldReportMenuId, tempDetail.TempDetailId + "#After");
}
/// <summary>
/// 按菜单和业务ID获取附件路径
/// </summary>
/// <param name="db">数据库上下文</param>
/// <param name="menuId">菜单ID</param>
/// <param name="toKeyId">业务ID</param>
/// <returns>附件路径</returns>
private static string GetAttachUrl(Model.SGGLDB db, string menuId, string toKeyId)
{
var attachUrl = db.AttachFile
.Where(x => x.MenuId == menuId && x.ToKeyId == toKeyId)
.Select(x => x.AttachUrl)
.FirstOrDefault();
return string.IsNullOrEmpty(attachUrl) ? attachUrl : attachUrl.Replace('\\', '/');
}
#region #region
@@ -41,8 +41,56 @@ namespace BLL
Misalignment = x.Misalignment Misalignment = x.Misalignment
}; };
return query.FirstOrDefault(); var item = query.FirstOrDefault();
if (item != null)
{
SetInspectionAttachUrl(db, item);
} }
return item;
}
}
/// <summary>
/// 回填下料、组对抽检附件路径
/// </summary>
/// <param name="db">数据库上下文</param>
/// <param name="item">焊前抽检基础信息</param>
private static void SetInspectionAttachUrl(Model.SGGLDB db, Model.PreWeldJointItem item)
{
var cuttingCheckId = db.HJGL_PreWeldCuttingCheck
.Where(x => x.WeldJointId == item.WeldJointId)
.Select(x => x.CuttingCheckId)
.FirstOrDefault();
if (!string.IsNullOrEmpty(cuttingCheckId))
{
item.CuttingAttachUrl1 = GetAttachUrl(db, Const.HJGL_PreWeldCuttingCheckMenuId, cuttingCheckId);
}
var fitupCheckId = db.HJGL_PreWeldFitupCheck
.Where(x => x.WeldJointId == item.WeldJointId)
.Select(x => x.FitupCheckId)
.FirstOrDefault();
if (!string.IsNullOrEmpty(fitupCheckId))
{
item.FitupAttachUrl1 = GetAttachUrl(db, Const.HJGL_PreWeldFitupCheckMenuId, fitupCheckId);
}
}
/// <summary>
/// 按菜单和业务ID获取附件路径
/// </summary>
/// <param name="db">数据库上下文</param>
/// <param name="menuId">菜单ID</param>
/// <param name="toKeyId">业务ID</param>
/// <returns>附件路径</returns>
private static string GetAttachUrl(Model.SGGLDB db, string menuId, string toKeyId)
{
var attachUrl = db.AttachFile
.Where(x => x.MenuId == menuId && x.ToKeyId == toKeyId)
.Select(x => x.AttachUrl)
.FirstOrDefault();
return string.IsNullOrEmpty(attachUrl) ? attachUrl : attachUrl.Replace('\\', '/');
} }
/// <summary> /// <summary>
@@ -92,6 +140,8 @@ namespace BLL
check.Remark = item.Remark; check.Remark = item.Remark;
db.SubmitChanges(); db.SubmitChanges();
SaveInspectionAttachUrl(item.AttachUrl1, Const.HJGL_PreWeldCuttingCheckMenuId, check.CuttingCheckId);
} }
} }
@@ -158,6 +208,32 @@ namespace BLL
weldJoint.Misalignment = item.Misalignment; weldJoint.Misalignment = item.Misalignment;
db.SubmitChanges(); db.SubmitChanges();
SaveInspectionAttachUrl(item.AttachUrl1, Const.HJGL_PreWeldFitupCheckMenuId, check.FitupCheckId);
}
}
/// <summary>
/// 保存焊前抽检附件,空附件时清理原附件。
/// </summary>
/// <param name="attachUrl">附件路径</param>
/// <param name="menuId">菜单ID</param>
/// <param name="dataId">业务数据ID</param>
private static void SaveInspectionAttachUrl(string attachUrl, string menuId, string dataId)
{
// AttachUrl1 为 null 表示旧调用方未传附件参数,避免误删已有附件;空字符串表示明确清空附件。
if (attachUrl == null)
{
return;
}
if (!string.IsNullOrEmpty(attachUrl))
{
UploadFileService.SaveAttachUrl(UploadFileService.GetSourceByAttachUrl(attachUrl, 10, null), attachUrl, menuId, dataId);
}
else
{
CommonService.DeleteAttachFileById(menuId, dataId);
} }
} }
} }
@@ -277,6 +277,77 @@ namespace BLL
return BLL.WeldingDailyService.SaveWeldingDailyTempDetailByMobile(WeldJointId, Personid, time, weldingLocation, welderType); return BLL.WeldingDailyService.SaveWeldingDailyTempDetailByMobile(WeldJointId, Personid, time, weldingLocation, welderType);
} }
/// <summary>
/// 保存焊接日报并维护焊前、焊后附件
/// </summary>
/// <param name="newItem">焊接日报及附件参数</param>
/// <returns>错误信息</returns>
public static string SaveWeldingDailyByWeldJointIdWithAttach(Model.WeldingDailyByWeldJointAttachItem newItem)
{
if (newItem == null)
{
return "参数不能为空";
}
string res = BLL.WeldingDailyService.SaveWeldingDailyTempDetailByMobile(newItem.WeldJointId, newItem.Personid, newItem.time, newItem.weldingLocation, newItem.welderType);
if (!string.IsNullOrEmpty(res))
{
return res;
}
DateTime weldingDate;
if (!DateTime.TryParse(newItem.time, out weldingDate))
{
return "焊接日期不正确";
}
weldingDate = weldingDate.Date;
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
var tempDetail = db.HJGL_WeldingDailyTempDetail.FirstOrDefault(x => x.WeldJointId == newItem.WeldJointId
&& x.WeldingDate >= weldingDate
&& x.WeldingDate < weldingDate.AddDays(1)
&& x.AuditState == 0);
if (tempDetail == null)
{
return "未找到待审核日报明细";
}
SaveWeldingDailyTempAttachUrl(newItem.PreWeldAttachUrl, tempDetail.TempDetailId + "#Before");
SaveWeldingDailyTempAttachUrl(newItem.PostWeldAttachUrl, tempDetail.TempDetailId + "#After");
// 明细表仅有一个附件字段,合并记录焊前、焊后附件路径,便于台账直接展示。
var preWeldAttachUrl = APIUpLoadFileService.getFileUrl(Const.HJGL_WeldReportMenuId, tempDetail.TempDetailId + "#Before", null);
var postWeldAttachUrl = APIUpLoadFileService.getFileUrl(Const.HJGL_WeldReportMenuId, tempDetail.TempDetailId + "#After", null);
tempDetail.AttachUrl = string.Join(",", new[] { preWeldAttachUrl, postWeldAttachUrl }.Where(x => !string.IsNullOrEmpty(x)));
db.SubmitChanges();
}
return string.Empty;
}
/// <summary>
/// 保存焊接日报待审核附件,null 表示不变,空字符串表示清空。
/// </summary>
/// <param name="attachUrl">附件路径</param>
/// <param name="toKeyId">附件关联业务ID</param>
private static void SaveWeldingDailyTempAttachUrl(string attachUrl, string toKeyId)
{
if (attachUrl == null)
{
return;
}
if (!string.IsNullOrEmpty(attachUrl))
{
UploadFileService.SaveAttachUrl(UploadFileService.GetSourceByAttachUrl(attachUrl, 10, null), attachUrl, Const.HJGL_WeldReportMenuId, toKeyId);
}
else
{
CommonService.DeleteAttachFileById(Const.HJGL_WeldReportMenuId, toKeyId);
}
}
#region #region
/// <summary> /// <summary>
/// 保存焊接日报明细 /// 保存焊接日报明细
+2 -2
View File
@@ -176,7 +176,7 @@
<f:Grid ID="Grid3" ShowBorder="false" ShowHeader="false" Title="入库明细条码表" EnableCollapse="true" <f:Grid ID="Grid3" ShowBorder="false" ShowHeader="false" Title="入库明细条码表" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="Id" DataIDField="Id" AllowSorting="true" runat="server" BoxFlex="1" DataKeyNames="Id" DataIDField="Id" AllowSorting="true"
SortField="Id" SortDirection="DESC" EnableColumnLines="true" EnableTextSelection="true" SortField="Id" SortDirection="DESC" EnableColumnLines="true" EnableTextSelection="true"
AllowPaging="true" IsDatabasePaging="true" PageSize="10000" OnRowCommand="Grid3_RowCommand"> AllowPaging="true" IsDatabasePaging="true" PageSize="10000" OnRowCommand="Grid3_RowCommand" AllowColumnLocking="true">
<Columns> <Columns>
<f:TemplateField ColumnID="tfNumber" Width="50px" HeaderText="序号" HeaderTextAlign="Center" <f:TemplateField ColumnID="tfNumber" Width="50px" HeaderText="序号" HeaderTextAlign="Center"
TextAlign="Center"> TextAlign="Center">
@@ -214,7 +214,7 @@
<f:RenderField Width="360px" ColumnID="BarCode" DataField="BarCode" SortField="BarCode" <f:RenderField Width="360px" ColumnID="BarCode" DataField="BarCode" SortField="BarCode"
FieldType="String" HeaderText="条码内容" TextAlign="Left" HeaderTextAlign="Center"> FieldType="String" HeaderText="条码内容" TextAlign="Left" HeaderTextAlign="Center">
</f:RenderField> </f:RenderField>
<f:LinkButtonField Width="120px" ColumnID="btnBarCodePrint" TextAlign="Center" CommandName="btnBarCodePrint" Text="入库条码打印" /> <f:LinkButtonField Width="120px" ColumnID="btnBarCodePrint" TextAlign="Center" CommandName="btnBarCodePrint" Text="入库条码打印" Locked="true"/>
</Columns> </Columns>
</f:Grid> </f:Grid>
</Items> </Items>
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Report ScriptLanguage="CSharp" ReportInfo.Created="2026-05-18" ReportInfo.Modified="06/17/2026 17:42:00" ReportInfo.CreatorVersion="2017.1.16.0"> <Report ScriptLanguage="CSharp" ReportInfo.Created="2026-05-18" ReportInfo.Modified="06/24/2026 10:15:00" ReportInfo.CreatorVersion="2017.1.16.0">
<Dictionary> <Dictionary>
<TableDataSource Name="Table1" ReferenceName="Table1" DataType="System.Int32" Enabled="true"> <TableDataSource Name="Table1" ReferenceName="Table1" DataType="System.Int32" Enabled="true">
<Column Name="Id" DataType="System.String"/> <Column Name="Id" DataType="System.String"/>
@@ -7,14 +7,20 @@
<Column Name="InputMasterId" DataType="System.String"/> <Column Name="InputMasterId" DataType="System.String"/>
<Column Name="CusBillCode" DataType="System.String"/> <Column Name="CusBillCode" DataType="System.String"/>
<Column Name="MaterialCode" DataType="System.String"/> <Column Name="MaterialCode" DataType="System.String"/>
<Column Name="Code" DataType="System.String"/>
<Column Name="HeatNo" DataType="System.String"/>
<Column Name="BatchNo" DataType="System.String"/>
<Column Name="MaterialName" DataType="System.String"/> <Column Name="MaterialName" DataType="System.String"/>
<Column Name="MaterialDef" DataType="System.String"/> <Column Name="MaterialDef" DataType="System.String"/>
<Column Name="MaterialSpec" DataType="System.String"/>
<Column Name="BarCode" DataType="System.String"/> <Column Name="BarCode" DataType="System.String"/>
</TableDataSource> </TableDataSource>
</Dictionary> </Dictionary>
<ReportPage Name="Page1" PaperWidth="80" PaperHeight="30" LeftMargin="0" TopMargin="0" RightMargin="0" BottomMargin="0"> <ReportPage Name="Page1" PaperWidth="80" PaperHeight="30" LeftMargin="0" TopMargin="0" RightMargin="0" BottomMargin="0">
<DataBand Name="Data1" Width="302.4" Height="100" DataSource="Table1"> <DataBand Name="Data1" Width="302.4" Height="100" DataSource="Table1">
<BarcodeObject Name="Barcode1" Left="11.34" Top="7.56" Width="206" Height="88" AutoSize="false" Text="[Table1.BarCode]" ShowText="false" AllowExpressions="true" Barcode="PDF417" Barcode.AspectRatio="0.5" Barcode.Columns="0" Barcode.Rows="0" Barcode.CodePage="437" Barcode.CompactionMode="Auto" Barcode.ErrorCorrection="Auto" Barcode.PixelSize="2, 8"/> <TextObject Name="TextMaterialNameSpec" Left="5.67" Top="1.89" Width="291.06" Height="15.12" Text="[Table1.MaterialName] [Table1.MaterialSpec]" HorzAlign="Center" VertAlign="Center" Font="宋体, 7pt"/>
<BarcodeObject Name="Barcode1" Left="11.34" Top="20.79" Width="279.72" Height="52.92" AutoSize="false" Text="[Table1.BarCode]" ShowText="false" AllowExpressions="true" Barcode="PDF417" Barcode.AspectRatio="0.5" Barcode.Columns="0" Barcode.Rows="0" Barcode.CodePage="437" Barcode.CompactionMode="Auto" Barcode.ErrorCorrection="Auto" Barcode.PixelSize="2, 8"/>
<TextObject Name="TextCodeHeatBatch" Left="5.67" Top="77.49" Width="291.06" Height="17.01" Text="[Table1.Code] [Table1.HeatNo] [Table1.BatchNo]" HorzAlign="Center" VertAlign="Center" Font="宋体, 7pt"/>
</DataBand> </DataBand>
</ReportPage> </ReportPage>
</Report> </Report>
+1 -1
View File
@@ -17240,7 +17240,7 @@
</COMReference> </COMReference>
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v15.0\WebApplications\Microsoft.WebApplication.targets" /> <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v18.0\WebApplications\Microsoft.WebApplication.targets" />
<ProjectExtensions> <ProjectExtensions>
<VisualStudio> <VisualStudio>
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}"> <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
@@ -474,7 +474,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery
var weldJointData = weldJoints.Select((x, index) => new var weldJointData = weldJoints.Select((x, index) => new
{ {
No = index + 1, No = index + 1,
SingleNumber = SafeText(x.SingleNumber), SingleNumber = SafeText(x.PipelineCode),
WeldJointCode = SafeText(x.WeldJointCode), WeldJointCode = SafeText(x.WeldJointCode),
Dia = x.Dia, Dia = x.Dia,
Thickness = x.Thickness, Thickness = x.Thickness,
@@ -485,8 +485,8 @@ namespace FineUIPro.Web.HJGL.InfoQuery
WelderCode = JoinTexts(x.BackingWelderCode, x.CoverWelderCode), WelderCode = JoinTexts(x.BackingWelderCode, x.CoverWelderCode),
WelderExamDate = "/", WelderExamDate = "/",
TestJointDate = "/", TestJointDate = "/",
RootWeldingData = FormatWeldingData(x.WeldingMethodCode, x.WeldingRodCode, x.WeldingWireCode), RootWeldingData = FormatWeldingData(x.WeldingMethodCode),
RemainingWeldingData = FormatWeldingData(x.WeldingMethodCode, x.WeldingRodCode, x.WeldingWireCode), RemainingWeldingData = FormatWeldingData(x.WeldingMethodCode),
// P列和V列按“管线需要热处理”判断,不按单个焊口判断。 // P列和V列按“管线需要热处理”判断,不按单个焊口判断。
PWHT = hotPipelineIdSet.Contains(x.PipelineId) ? "PWHT" : "/", PWHT = hotPipelineIdSet.Contains(x.PipelineId) ? "PWHT" : "/",
HotProcessAccept = hotPipelineIdSet.Contains(x.PipelineId) ? "ACC." : "/", HotProcessAccept = hotPipelineIdSet.Contains(x.PipelineId) ? "ACC." : "/",
@@ -47,6 +47,13 @@
</f:TextArea> </f:TextArea>
</Items> </Items>
</f:FormRow> </f:FormRow>
<f:FormRow>
<Items>
<f:Button ID="btnAttachUrl" Text="附件" ToolTip="附件上传及查看" Icon="TableCell"
runat="server" OnClick="btnAttachUrl_Click">
</f:Button>
</Items>
</f:FormRow>
</Rows> </Rows>
<Toolbars> <Toolbars>
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server"> <f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
@@ -60,6 +67,10 @@
</f:Toolbar> </f:Toolbar>
</Toolbars> </Toolbars>
</f:Form> </f:Form>
<f:Window ID="WindowAtt" Title="附件上传" Hidden="true" EnableMaximize="true" EnableIFrame="true"
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="700px"
Height="420px">
</f:Window>
</form> </form>
</body> </body>
</html> </html>
@@ -88,5 +88,24 @@ namespace FineUIPro.Web.HJGL.PreWeld
ShowNotify("保存成功!", MessageBoxIcon.Success); ShowNotify("保存成功!", MessageBoxIcon.Success);
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference()); PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
} }
protected void btnAttachUrl_Click(object sender, EventArgs e)
{
string cuttingCheckId = CuttingCheckId;
if (string.IsNullOrEmpty(cuttingCheckId) && !string.IsNullOrEmpty(drpWeldJoint.SelectedValue))
{
var check = Funs.DB.HJGL_PreWeldCuttingCheck.FirstOrDefault(x => x.WeldJointId == drpWeldJoint.SelectedValue);
cuttingCheckId = check == null ? string.Empty : check.CuttingCheckId;
}
if (string.IsNullOrEmpty(cuttingCheckId))
{
Alert.ShowInTop("请先保存下料抽检记录后再上传附件!", MessageBoxIcon.Warning);
return;
}
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(
string.Format("../../AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/HJGL/PreWeld/CuttingCheck&menuId={1}&edit=1&type=-1",
cuttingCheckId, Const.HJGL_PreWeldCuttingCheckMenuId)));
}
} }
} }
@@ -86,6 +86,15 @@ namespace FineUIPro.Web.HJGL.PreWeld
/// </remarks> /// </remarks>
protected global::FineUIPro.TextArea txtRemark; protected global::FineUIPro.TextArea txtRemark;
/// <summary>
/// btnAttachUrl 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnAttachUrl;
/// <summary> /// <summary>
/// Toolbar1 控件。 /// Toolbar1 控件。
/// </summary> /// </summary>
@@ -112,5 +121,14 @@ namespace FineUIPro.Web.HJGL.PreWeld
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.Button btnClose; protected global::FineUIPro.Button btnClose;
/// <summary>
/// WindowAtt 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window WindowAtt;
} }
} }
@@ -64,6 +64,13 @@
</f:TextArea> </f:TextArea>
</Items> </Items>
</f:FormRow> </f:FormRow>
<f:FormRow>
<Items>
<f:Button ID="btnAttachUrl" Text="附件" ToolTip="附件上传及查看" Icon="TableCell"
runat="server" OnClick="btnAttachUrl_Click">
</f:Button>
</Items>
</f:FormRow>
</Rows> </Rows>
<Toolbars> <Toolbars>
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server"> <f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
@@ -77,6 +84,10 @@
</f:Toolbar> </f:Toolbar>
</Toolbars> </Toolbars>
</f:Form> </f:Form>
<f:Window ID="WindowAtt" Title="附件上传" Hidden="true" EnableMaximize="true" EnableIFrame="true"
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="700px"
Height="420px">
</f:Window>
</form> </form>
</body> </body>
</html> </html>
@@ -129,5 +129,22 @@ namespace FineUIPro.Web.HJGL.PreWeld
ShowNotify("保存成功!", MessageBoxIcon.Success); ShowNotify("保存成功!", MessageBoxIcon.Success);
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference()); PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
} }
protected void btnAttachUrl_Click(object sender, EventArgs e)
{
string weldJointId = drpWeldJoint.SelectedValue;
var check = string.IsNullOrEmpty(weldJointId)
? null
: Funs.DB.HJGL_PreWeldFitupCheck.FirstOrDefault(x => x.WeldJointId == weldJointId);
if (check == null)
{
Alert.ShowInTop("请先保存组对抽检记录后再上传附件!", MessageBoxIcon.Warning);
return;
}
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(
string.Format("../../AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/HJGL/PreWeld/FitupCheck&menuId={1}&edit=1&type=-1",
check.FitupCheckId, Const.HJGL_PreWeldFitupCheckMenuId)));
}
} }
} }
@@ -113,6 +113,15 @@ namespace FineUIPro.Web.HJGL.PreWeld
/// </remarks> /// </remarks>
protected global::FineUIPro.TextArea txtRemark; protected global::FineUIPro.TextArea txtRemark;
/// <summary>
/// btnAttachUrl 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnAttachUrl;
/// <summary> /// <summary>
/// Toolbar1 控件。 /// Toolbar1 控件。
/// </summary> /// </summary>
@@ -139,5 +148,14 @@ namespace FineUIPro.Web.HJGL.PreWeld
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.Button btnClose; protected global::FineUIPro.Button btnClose;
/// <summary>
/// WindowAtt 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window WindowAtt;
} }
} }
@@ -38,7 +38,7 @@
.f-grid-row.priority { .f-grid-row.priority {
/* background-color: #1e88e5;*/ /* background-color: #1e88e5;*/
color: #fff; color: blue;
font-weight: bold; font-weight: bold;
} }
@@ -135,11 +135,11 @@
<f:Panel ID="Panel2" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false" <f:Panel ID="Panel2" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
ShowHeader="false" Layout="Region" BoxConfigAlign="Stretch"> ShowHeader="false" Layout="Region" BoxConfigAlign="Stretch">
<Items> <Items>
<f:Panel runat="server" ID="panelTopRegion" RegionPosition="Top" ShowBorder="true" RegionPercent="30%" IsFluid="true" <f:Panel runat="server" ID="panelTopRegion" RegionPosition="Top" ShowBorder="true" RegionPercent="30%" IsFluid="true" Hidden="true"
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" Title="三维模型" Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" Title="三维模型"
TitleToolTip="三维模型显示" AutoScroll="true" IFrameUrl="../../CLGL/ArrivalStatistics.aspx" EnableIFrame="true"> TitleToolTip="三维模型显示" AutoScroll="true" IFrameUrl="../../CLGL/ArrivalStatistics.aspx" EnableIFrame="true">
</f:Panel> </f:Panel>
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Center" ShowBorder="true" RegionPercent="40%" <f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Center" ShowBorder="true" RegionPercent="30%"
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" Title="三维模型" Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" Title="三维模型"
TitleToolTip="三维模型显示" AutoScroll="true"> TitleToolTip="三维模型显示" AutoScroll="true">
<Toolbars> <Toolbars>
@@ -181,13 +181,13 @@
</Items> </Items>
</f:Panel> </f:Panel>
<f:Panel runat="server" ID="panelBottomRegion" RegionPosition="Bottom" RegionSplit="true" RegionSplitWidth="20px" EnableCollapse="true" RegionPercent="30%" <f:Panel runat="server" ID="panelBottomRegion" RegionPosition="Bottom" RegionSplit="true" RegionSplitWidth="20px" EnableCollapse="true" RegionPercent="70%"
Title="底部面板" ShowBorder="false" Height="320px" ShowHeader="false" BodyPadding="1px" Layout="Fit"> Title="底部面板" ShowBorder="false" Height="320px" ShowHeader="false" BodyPadding="1px" Layout="Fit">
<Items> <Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="材料匹配明细" EnableRowClickEvent="true" <f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="材料匹配明细" EnableRowClickEvent="true"
EnableCollapse="true" runat="server" BoxFlex="1" DataKeyNames="Id,PipelineId,PrefabricatedComponents,WeldJointId" ForceFit="true" EnableCollapse="true" runat="server" BoxFlex="1" DataKeyNames="Id,PipelineId,PrefabricatedComponents,WeldJointId" ForceFit="true"
EnableColumnLines="true" DataIDField="Id" AllowSorting="true" OnRowDataBound="Grid1_RowDataBound" EnableColumnLines="true" DataIDField="Id" AllowSorting="true" OnRowDataBound="Grid1_RowDataBound" FixedRowHeight="true" RowHeight="46"
SortField="Id" SortDirection="ASC" OnSort="Grid1_Sort" EnableCheckBoxSelect="true"> SortField="Id" SortDirection="ASC" OnSort="Grid1_Sort" EnableCheckBoxSelect="true">
<Columns> <Columns>
<f:RenderField Width="200px" ColumnID="PipelineCode" DataField="PipelineCode" SortField="PipelineCode" <f:RenderField Width="200px" ColumnID="PipelineCode" DataField="PipelineCode" SortField="PipelineCode"
@@ -7,6 +7,32 @@
<head runat="server"> <head runat="server">
<title>焊接日报</title> <title>焊接日报</title>
<meta name="sourcefiles" content="~/HJGL/WeldingManage/GetWdldingDailyItem.ashx"/> <meta name="sourcefiles" content="~/HJGL/WeldingManage/GetWdldingDailyItem.ashx"/>
<link href="../../res/css/viewer.min.css" rel="stylesheet" />
<script src="../../res/js/viewer.min.js" type="text/javascript"></script>
<style type="text/css">
.imgPreview {
display: none;
top: 0;
left: 0;
width: 100%; /*容器占满整个屏幕*/
height: 100%;
position: fixed;
background: rgba(0, 0, 0, 0.5);
}
.imgPreview img {
z-index: 100;
width: 60%;
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
}
/*添加鼠标移入图片效果*/
.img {
cursor: url("ico/放大镜.png"), auto;
}
</style>
</head> </head>
<body> <body>
<form id="form1" runat="server"> <form id="form1" runat="server">
@@ -177,6 +203,18 @@
DataField="WeldingLocationCode" SortField="WeldingLocationCode" FieldType="String" HeaderTextAlign="Center" DataField="WeldingLocationCode" SortField="WeldingLocationCode" FieldType="String" HeaderTextAlign="Center"
TextAlign="Left" Width="100px"> TextAlign="Left" Width="100px">
</f:RenderField> </f:RenderField>
<f:TemplateField ColumnID="tfReportBeforePhotoUrl" MinWidth="120px" HeaderText="焊前附件" HeaderTextAlign="Center"
TextAlign="Center">
<ItemTemplate>
<asp:Label ID="lbReportBeforePhotoUrl" runat="server" Text='<%# ConvertImageUrlByImage(Eval("BeforePhotoUrl")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:TemplateField ColumnID="tfReportAfterPhotoUrl" MinWidth="120px" HeaderText="焊后附件" HeaderTextAlign="Center"
TextAlign="Center">
<ItemTemplate>
<asp:Label ID="lbReportAfterPhotoUrl" runat="server" Text='<%# ConvertImageUrlByImage(Eval("AfterPhotoUrl")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
</Columns> </Columns>
<Listeners> <Listeners>
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" /> <f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
@@ -205,7 +243,7 @@
<f:Toolbar ID="ToolbarPending" Position="Top" runat="server" ToolbarAlign="Left"> <f:Toolbar ID="ToolbarPending" Position="Top" runat="server" ToolbarAlign="Left">
<Items> <Items>
<f:DatePicker ID="txtPendingWeldingDate" runat="server" Label="焊接日期" LabelAlign="Right" <f:DatePicker ID="txtPendingWeldingDate" runat="server" Label="焊接日期" LabelAlign="Right"
LabelWidth="90px" Width="220px" AutoPostBack="true" OnTextChanged="PendingFilter_TextChanged"> LabelWidth="90px" Width="220px" AutoPostBack="true" OnTextChanged="PendingFilter_TextChanged" AutoShowClearIcon="true">
</f:DatePicker> </f:DatePicker>
<f:TextBox ID="txtPendingPipelineCode" runat="server" Label="管线号" EmptyText="输入查询条件" <f:TextBox ID="txtPendingPipelineCode" runat="server" Label="管线号" EmptyText="输入查询条件"
LabelAlign="Right" AutoPostBack="true" OnTextChanged="PendingFilter_TextChanged"> LabelAlign="Right" AutoPostBack="true" OnTextChanged="PendingFilter_TextChanged">
@@ -265,6 +303,18 @@
<f:RenderField HeaderText="提交时间" ColumnID="SubmitDate" DataField="SubmitDate" FieldType="Date" <f:RenderField HeaderText="提交时间" ColumnID="SubmitDate" DataField="SubmitDate" FieldType="Date"
Renderer="Date" HeaderTextAlign="Center" TextAlign="Center" Width="140px"> Renderer="Date" HeaderTextAlign="Center" TextAlign="Center" Width="140px">
</f:RenderField> </f:RenderField>
<f:TemplateField ColumnID="tfPendingBeforePhotoUrl" MinWidth="120px" HeaderText="焊前附件" HeaderTextAlign="Center"
TextAlign="Center">
<ItemTemplate>
<asp:Label ID="lbPendingBeforePhotoUrl" runat="server" Text='<%# ConvertImageUrlByImage(Eval("BeforePhotoUrl")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:TemplateField ColumnID="tfPendingAfterPhotoUrl" MinWidth="120px" HeaderText="焊后附件" HeaderTextAlign="Center"
TextAlign="Center">
<ItemTemplate>
<asp:Label ID="lbPendingAfterPhotoUrl" runat="server" Text='<%# ConvertImageUrlByImage(Eval("AfterPhotoUrl")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
</Columns> </Columns>
<PageItems> <PageItems>
<f:ToolbarSeparator ID="ToolbarSeparatorPending" runat="server"> <f:ToolbarSeparator ID="ToolbarSeparatorPending" runat="server">
@@ -330,7 +380,37 @@
} }
function reloadGrid() { function reloadGrid() {
__doPostBack(null, 'reloadGrid'); __doPostBack(null, 'reloadGrid');
}
var imgIDs = ['<%=Grid1.ClientID %>', '<%=GridPending.ClientID %>'];
function showImg() {
$.each(imgIDs, function(_, imgID) {
var $wrap = $("#" + imgID);
$wrap.find('img').off('click.weldreport').on('click.weldreport', function() {
var src = $(this).attr('src');
if (!src || src.indexOf("/res/icon") != -1) {
return;
} }
var div = document.createElement('div');
div.style.display = 'none';
div.innerHTML = '<img src="' + src + '">'; // 创建一个包含图片的 div 元素
document.body.appendChild(div); // 将 div 元素添加到页面中
var viewer = new Viewer(div.firstChild); // 创建 Viewer 实例并传入图片元素
viewer.show(); // 显示图片预览
// 在 Viewer 关闭后移除添加的 div 元素
viewer.on('hidden', function() {
document.body.removeChild(div);
});
});
});
$('.imgPreview').on('click', function() {
// $('.imgPreview').hide()
});
}
F.ready(function() {
showImg();
})
</script> </script>
</body> </body>
</html> </html>
@@ -202,23 +202,36 @@ namespace FineUIPro.Web.HJGL.WeldingManage
Grid1.DataBind(); Grid1.DataBind();
return; return;
} }
string strSql = @"SELECT WeldingDailyId,WeldJointId,PipelineCode,WeldJointCode, string strSql = @"SELECT jot.WeldingDailyId,jot.WeldJointId,jot.PipelineCode,jot.WeldJointCode,
BackingWelderCode,CoverWelderCode,Material1Code,Material2Code, jot.BackingWelderCode,jot.CoverWelderCode,jot.Material1Code,jot.Material2Code,
Dia,DNDia,Thickness,WeldTypeCode,WeldingMethodCode,WeldingWireCode,WeldingMode, jot.Dia,jot.DNDia,jot.Thickness,jot.WeldTypeCode,jot.WeldingMethodCode,jot.WeldingWireCode,jot.WeldingMode,
WeldingRodCode,Size,JointAttribute,CoverWelderTeamGroupName,BackingWelderTeamGroupName,WeldingLocationCode jot.WeldingRodCode,jot.Size,jot.JointAttribute,jot.CoverWelderTeamGroupName,jot.BackingWelderTeamGroupName,jot.WeldingLocationCode,
beforeAtt.AttachUrl AS BeforePhotoUrl,
afterAtt.AttachUrl AS AfterPhotoUrl
FROM dbo.View_HJGL_WeldJoint FROM dbo.View_HJGL_WeldJoint AS jot
WHERE WeldingDailyId=@WeldingDailyId"; OUTER APPLY (
SELECT TOP 1 temp.TempDetailId
FROM dbo.HJGL_WeldingDailyTempDetail AS temp
WHERE temp.WeldJointId = jot.WeldJointId AND temp.AuditState = 1
ORDER BY temp.AuditDate DESC, temp.SubmitDate DESC
) AS reportTemp
LEFT JOIN dbo.AttachFile AS beforeAtt ON beforeAtt.MenuId = @WeldReportMenuId
AND beforeAtt.ToKeyId = reportTemp.TempDetailId + '#Before'
LEFT JOIN dbo.AttachFile AS afterAtt ON afterAtt.MenuId = @WeldReportMenuId
AND afterAtt.ToKeyId = reportTemp.TempDetailId + '#After'
WHERE jot.WeldingDailyId=@WeldingDailyId";
List<SqlParameter> listStr = new List<SqlParameter>(); List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@WeldingDailyId", tvControlItem.SelectedNodeID)); listStr.Add(new SqlParameter("@WeldingDailyId", tvControlItem.SelectedNodeID));
listStr.Add(new SqlParameter("@WeldReportMenuId", Const.HJGL_WeldReportMenuId));
if (!string.IsNullOrEmpty(txtPipelineCode.Text.Trim())) if (!string.IsNullOrEmpty(txtPipelineCode.Text.Trim()))
{ {
strSql += " AND PipelineCode LIKE @pipelineCode "; strSql += " AND jot.PipelineCode LIKE @pipelineCode ";
listStr.Add(new SqlParameter("@pipelineCode", "%" + this.txtPipelineCode.Text.Trim() + "%")); listStr.Add(new SqlParameter("@pipelineCode", "%" + this.txtPipelineCode.Text.Trim() + "%"));
} }
if (!string.IsNullOrEmpty(txtWelderCode.Text.Trim())) if (!string.IsNullOrEmpty(txtWelderCode.Text.Trim()))
{ {
strSql += " AND (BackingWelderCode LIKE @welderCode OR CoverWelderCode LIKE @welderCode)"; strSql += " AND (jot.BackingWelderCode LIKE @welderCode OR jot.CoverWelderCode LIKE @welderCode)";
listStr.Add(new SqlParameter("@welderCode", "%" + this.txtWelderCode.Text.Trim() + "%")); listStr.Add(new SqlParameter("@welderCode", "%" + this.txtWelderCode.Text.Trim() + "%"));
} }
SqlParameter[] parameter = listStr.ToArray(); SqlParameter[] parameter = listStr.ToArray();
@@ -263,16 +276,23 @@ namespace FineUIPro.Web.HJGL.WeldingManage
jot.Thickness, jot.Thickness,
jot.WeldingMethodCode, jot.WeldingMethodCode,
submitPerson.PersonName AS SubmitPersonName, submitPerson.PersonName AS SubmitPersonName,
temp.SubmitDate temp.SubmitDate,
beforeAtt.AttachUrl AS BeforePhotoUrl,
afterAtt.AttachUrl AS AfterPhotoUrl
FROM dbo.HJGL_WeldingDailyTempDetail AS temp FROM dbo.HJGL_WeldingDailyTempDetail AS temp
LEFT JOIN dbo.View_HJGL_WeldJoint AS jot ON jot.WeldJointId = temp.WeldJointId LEFT JOIN dbo.View_HJGL_WeldJoint AS jot ON jot.WeldJointId = temp.WeldJointId
LEFT JOIN dbo.SitePerson_Person AS coverWelder ON coverWelder.PersonId = temp.CoverWelderId LEFT JOIN dbo.SitePerson_Person AS coverWelder ON coverWelder.PersonId = temp.CoverWelderId
LEFT JOIN dbo.SitePerson_Person AS backingWelder ON backingWelder.PersonId = temp.BackingWelderId LEFT JOIN dbo.SitePerson_Person AS backingWelder ON backingWelder.PersonId = temp.BackingWelderId
LEFT JOIN dbo.Base_WeldingLocation AS location ON location.WeldingLocationId = temp.WeldingLocationId LEFT JOIN dbo.Base_WeldingLocation AS location ON location.WeldingLocationId = temp.WeldingLocationId
LEFT JOIN dbo.Person_Persons AS submitPerson ON submitPerson.PersonId = temp.SubmitPersonId LEFT JOIN dbo.Person_Persons AS submitPerson ON submitPerson.PersonId = temp.SubmitPersonId
LEFT JOIN dbo.AttachFile AS beforeAtt ON beforeAtt.MenuId = @WeldReportMenuId
AND beforeAtt.ToKeyId = temp.TempDetailId + '#Before'
LEFT JOIN dbo.AttachFile AS afterAtt ON afterAtt.MenuId = @WeldReportMenuId
AND afterAtt.ToKeyId = temp.TempDetailId + '#After'
WHERE temp.ProjectId = @ProjectId AND temp.AuditState = 0"; WHERE temp.ProjectId = @ProjectId AND temp.AuditState = 0";
List<SqlParameter> listStr = new List<SqlParameter>(); List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId)); listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
listStr.Add(new SqlParameter("@WeldReportMenuId", Const.HJGL_WeldReportMenuId));
var unitWork = BLL.UnitWorkService.getUnitWorkByUnitWorkId(tvControlItem.SelectedNodeID); var unitWork = BLL.UnitWorkService.getUnitWorkByUnitWorkId(tvControlItem.SelectedNodeID);
if (unitWork == null) if (unitWork == null)
@@ -380,7 +400,16 @@ namespace FineUIPro.Web.HJGL.WeldingManage
#endregion #endregion
#endregion #endregion
protected string ConvertImageUrlByImage(object photoUrl)
{
string url = string.Empty;
if (photoUrl != null)
{
url = BLL.UploadAttachmentService.ShowImage("../../", photoUrl.ToString());
}
return url;
}
#region #region
/// <summary> /// <summary>
@@ -7,10 +7,12 @@
// </自动生成> // </自动生成>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
namespace FineUIPro.Web.HJGL.WeldingManage { namespace FineUIPro.Web.HJGL.WeldingManage
{
public partial class WeldReport { public partial class WeldReport
{
/// <summary> /// <summary>
/// form1 控件。 /// form1 控件。
@@ -219,6 +221,24 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// </remarks> /// </remarks>
protected global::FineUIPro.HiddenField hdWeldingDailyCode; protected global::FineUIPro.HiddenField hdWeldingDailyCode;
/// <summary>
/// lbReportBeforePhotoUrl 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lbReportBeforePhotoUrl;
/// <summary>
/// lbReportAfterPhotoUrl 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lbReportAfterPhotoUrl;
/// <summary> /// <summary>
/// ToolbarSeparator1 控件。 /// ToolbarSeparator1 控件。
/// </summary> /// </summary>
@@ -318,6 +338,24 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// </remarks> /// </remarks>
protected global::FineUIPro.Button btnPendingDelete; protected global::FineUIPro.Button btnPendingDelete;
/// <summary>
/// lbPendingBeforePhotoUrl 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lbPendingBeforePhotoUrl;
/// <summary>
/// lbPendingAfterPhotoUrl 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lbPendingAfterPhotoUrl;
/// <summary> /// <summary>
/// ToolbarSeparatorPending 控件。 /// ToolbarSeparatorPending 控件。
/// </summary> /// </summary>
@@ -77,4 +77,45 @@
// get; set; // get; set;
// } // }
} }
/// <summary>
/// 小程序按焊口保存焊接日报及焊前、焊后附件参数
/// </summary>
public class WeldingDailyByWeldJointAttachItem
{
/// <summary>
/// 焊口ID
/// </summary>
public string WeldJointId { get; set; }
/// <summary>
/// 人员ID
/// </summary>
public string Personid { get; set; }
/// <summary>
/// 焊接日期
/// </summary>
public string time { get; set; }
/// <summary>
/// 焊接位置ID
/// </summary>
public string weldingLocation { get; set; }
/// <summary>
/// 焊工类型 0 全部 1 打底 2 盖面
/// </summary>
public int welderType { get; set; }
/// <summary>
/// 焊前附件路径
/// </summary>
public string PreWeldAttachUrl { get; set; }
/// <summary>
/// 焊后附件路径
/// </summary>
public string PostWeldAttachUrl { get; set; }
}
} }
@@ -32,6 +32,16 @@ namespace Model
public decimal? FitupGap { get; set; } public decimal? FitupGap { get; set; }
public decimal? Misalignment { get; set; } public decimal? Misalignment { get; set; }
/// <summary>
/// 下料抽检附件路径
/// </summary>
public string CuttingAttachUrl1 { get; set; }
/// <summary>
/// 组对抽检附件路径
/// </summary>
public string FitupAttachUrl1 { get; set; }
} }
/// <summary> /// <summary>
@@ -65,6 +75,8 @@ namespace Model
public DateTime? CreateTime { get; set; } public DateTime? CreateTime { get; set; }
public string AttachUrl1 { get; set; }
public string Remark { get; set; } public string Remark { get; set; }
} }
@@ -107,6 +119,8 @@ namespace Model
public DateTime? CreateTime { get; set; } public DateTime? CreateTime { get; set; }
public string AttachUrl1 { get; set; }
public string Remark { get; set; } public string Remark { get; set; }
} }
} }
@@ -0,0 +1,15 @@
namespace Model
{
public partial class View_HJGL_WeldJoint
{
/// <summary>
/// 焊前附件路径
/// </summary>
public string PreWeldAttachUrl { get; set; }
/// <summary>
/// 焊后附件路径
/// </summary>
public string PostWeldAttachUrl { get; set; }
}
}
+1
View File
@@ -127,6 +127,7 @@
<Compile Include="APIItem\HSSE\HazardRegisterItem.cs" /> <Compile Include="APIItem\HSSE\HazardRegisterItem.cs" />
<Compile Include="APIItem\HJGL\HJGL_PreWeldingDailyItem.cs" /> <Compile Include="APIItem\HJGL\HJGL_PreWeldingDailyItem.cs" />
<Compile Include="APIItem\HJGL\PreWeldInspectionItem.cs" /> <Compile Include="APIItem\HJGL\PreWeldInspectionItem.cs" />
<Compile Include="APIItem\HJGL\ViewHJGLWeldJointExtend.cs" />
<Compile Include="APIItem\HJGL\HotProcessHardItem.cs" /> <Compile Include="APIItem\HJGL\HotProcessHardItem.cs" />
<Compile Include="APIItem\HJGL\NDETrustItem.cs" /> <Compile Include="APIItem\HJGL\NDETrustItem.cs" />
<Compile Include="APIItem\HJGL\WeldJointItem.cs" /> <Compile Include="APIItem\HJGL\WeldJointItem.cs" />
@@ -233,6 +233,34 @@ namespace WebAPI.Controllers
return responeData; return responeData;
} }
/// <summary>
/// 根据焊口id保存到日报,并保存焊前、焊后附件
/// </summary>
/// <param name="newItem">焊口日报和附件参数</param>
/// <returns></returns>
[HttpPost]
public Model.ResponeData SaveWeldingDailyByWeldJointId([FromBody] Model.WeldingDailyByWeldJointAttachItem newItem)
{
var responeData = new Model.ResponeData();
try
{
string res = APIPreWeldingDailyService.SaveWeldingDailyByWeldJointIdWithAttach(newItem);
if (!string.IsNullOrEmpty(res))
{
responeData.code = 0;
responeData.message = res;
}
}
catch (Exception ex)
{
responeData.code = 0;
responeData.message = ex.Message;
}
return responeData;
}
#endregion #endregion
#region #region