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
+41 -1
View File
@@ -54,10 +54,50 @@ namespace BLL
var weldjoint = db.View_HJGL_WeldJoint
.Where(p => p.WeldJointId == WeldJointId)
.FirstOrDefault();
if (weldjoint != null)
{
SetWeldingDailyAttachUrl(db, 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
@@ -626,4 +666,4 @@ namespace BLL
}
}
}
}
}
@@ -41,10 +41,58 @@ namespace BLL
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;
db.SubmitChanges();
SaveInspectionAttachUrl(item.AttachUrl1, Const.HJGL_PreWeldCuttingCheckMenuId, check.CuttingCheckId);
}
}
@@ -158,6 +208,32 @@ namespace BLL
weldJoint.Misalignment = item.Misalignment;
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);
}
/// <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
/// <summary>
/// 保存焊接日报明细
+2 -2
View File
@@ -176,7 +176,7 @@
<f:Grid ID="Grid3" ShowBorder="false" ShowHeader="false" Title="入库明细条码表" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="Id" DataIDField="Id" AllowSorting="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>
<f:TemplateField ColumnID="tfNumber" Width="50px" HeaderText="序号" HeaderTextAlign="Center"
TextAlign="Center">
@@ -214,7 +214,7 @@
<f:RenderField Width="360px" ColumnID="BarCode" DataField="BarCode" SortField="BarCode"
FieldType="String" HeaderText="条码内容" TextAlign="Left" HeaderTextAlign="Center">
</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>
</f:Grid>
</Items>
@@ -1,5 +1,5 @@
<?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>
<TableDataSource Name="Table1" ReferenceName="Table1" DataType="System.Int32" Enabled="true">
<Column Name="Id" DataType="System.String"/>
@@ -7,14 +7,20 @@
<Column Name="InputMasterId" DataType="System.String"/>
<Column Name="CusBillCode" 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="MaterialDef" DataType="System.String"/>
<Column Name="MaterialSpec" DataType="System.String"/>
<Column Name="BarCode" DataType="System.String"/>
</TableDataSource>
</Dictionary>
<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">
<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>
</ReportPage>
</Report>
+1 -1
View File
@@ -17240,7 +17240,7 @@
</COMReference>
</ItemGroup>
<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>
<VisualStudio>
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
@@ -474,7 +474,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery
var weldJointData = weldJoints.Select((x, index) => new
{
No = index + 1,
SingleNumber = SafeText(x.SingleNumber),
SingleNumber = SafeText(x.PipelineCode),
WeldJointCode = SafeText(x.WeldJointCode),
Dia = x.Dia,
Thickness = x.Thickness,
@@ -485,8 +485,8 @@ namespace FineUIPro.Web.HJGL.InfoQuery
WelderCode = JoinTexts(x.BackingWelderCode, x.CoverWelderCode),
WelderExamDate = "/",
TestJointDate = "/",
RootWeldingData = FormatWeldingData(x.WeldingMethodCode, x.WeldingRodCode, x.WeldingWireCode),
RemainingWeldingData = FormatWeldingData(x.WeldingMethodCode, x.WeldingRodCode, x.WeldingWireCode),
RootWeldingData = FormatWeldingData(x.WeldingMethodCode),
RemainingWeldingData = FormatWeldingData(x.WeldingMethodCode),
// P列和V列按“管线需要热处理”判断,不按单个焊口判断。
PWHT = hotPipelineIdSet.Contains(x.PipelineId) ? "PWHT" : "/",
HotProcessAccept = hotPipelineIdSet.Contains(x.PipelineId) ? "ACC." : "/",
@@ -47,6 +47,13 @@
</f:TextArea>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:Button ID="btnAttachUrl" Text="附件" ToolTip="附件上传及查看" Icon="TableCell"
runat="server" OnClick="btnAttachUrl_Click">
</f:Button>
</Items>
</f:FormRow>
</Rows>
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
@@ -60,6 +67,10 @@
</f:Toolbar>
</Toolbars>
</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>
</body>
</html>
@@ -88,5 +88,24 @@ namespace FineUIPro.Web.HJGL.PreWeld
ShowNotify("保存成功!", MessageBoxIcon.Success);
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>
protected global::FineUIPro.TextArea txtRemark;
/// <summary>
/// btnAttachUrl 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnAttachUrl;
/// <summary>
/// Toolbar1 控件。
/// </summary>
@@ -112,5 +121,14 @@ namespace FineUIPro.Web.HJGL.PreWeld
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnClose;
/// <summary>
/// WindowAtt 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window WindowAtt;
}
}
@@ -64,6 +64,13 @@
</f:TextArea>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:Button ID="btnAttachUrl" Text="附件" ToolTip="附件上传及查看" Icon="TableCell"
runat="server" OnClick="btnAttachUrl_Click">
</f:Button>
</Items>
</f:FormRow>
</Rows>
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
@@ -77,6 +84,10 @@
</f:Toolbar>
</Toolbars>
</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>
</body>
</html>
@@ -129,5 +129,22 @@ namespace FineUIPro.Web.HJGL.PreWeld
ShowNotify("保存成功!", MessageBoxIcon.Success);
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>
protected global::FineUIPro.TextArea txtRemark;
/// <summary>
/// btnAttachUrl 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnAttachUrl;
/// <summary>
/// Toolbar1 控件。
/// </summary>
@@ -139,5 +148,14 @@ namespace FineUIPro.Web.HJGL.PreWeld
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnClose;
/// <summary>
/// WindowAtt 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window WindowAtt;
}
}
@@ -38,7 +38,7 @@
.f-grid-row.priority {
/* background-color: #1e88e5;*/
color: #fff;
color: blue;
font-weight: bold;
}
@@ -135,11 +135,11 @@
<f:Panel ID="Panel2" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
ShowHeader="false" Layout="Region" BoxConfigAlign="Stretch">
<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="三维模型"
TitleToolTip="三维模型显示" AutoScroll="true" IFrameUrl="../../CLGL/ArrivalStatistics.aspx" EnableIFrame="true">
</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="三维模型"
TitleToolTip="三维模型显示" AutoScroll="true">
<Toolbars>
@@ -181,13 +181,13 @@
</Items>
</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">
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="材料匹配明细" EnableRowClickEvent="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">
<Columns>
<f:RenderField Width="200px" ColumnID="PipelineCode" DataField="PipelineCode" SortField="PipelineCode"
@@ -215,7 +215,7 @@
TextAlign="Left">
</f:RenderField>
<f:RenderField Width="200px" ColumnID="MaterialDef" DataField="MaterialDef" SortField="MaterialDef"
FieldType="String" HeaderText="材料描述" HeaderTextAlign="Center"
FieldType="String" HeaderText="材料描述" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
<f:RenderField Width="80px" ColumnID="MaterialUnit" DataField="MaterialUnit" SortField="MaterialUnit"
@@ -7,6 +7,32 @@
<head runat="server">
<title>焊接日报</title>
<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>
<body>
<form id="form1" runat="server">
@@ -177,6 +203,18 @@
DataField="WeldingLocationCode" SortField="WeldingLocationCode" FieldType="String" HeaderTextAlign="Center"
TextAlign="Left" Width="100px">
</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>
<Listeners>
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
@@ -205,7 +243,7 @@
<f:Toolbar ID="ToolbarPending" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<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:TextBox ID="txtPendingPipelineCode" runat="server" Label="管线号" EmptyText="输入查询条件"
LabelAlign="Right" AutoPostBack="true" OnTextChanged="PendingFilter_TextChanged">
@@ -265,6 +303,18 @@
<f:RenderField HeaderText="提交时间" ColumnID="SubmitDate" DataField="SubmitDate" FieldType="Date"
Renderer="Date" HeaderTextAlign="Center" TextAlign="Center" Width="140px">
</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>
<PageItems>
<f:ToolbarSeparator ID="ToolbarSeparatorPending" runat="server">
@@ -329,8 +379,38 @@
return false;
}
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>
</body>
</html>
@@ -202,23 +202,36 @@ namespace FineUIPro.Web.HJGL.WeldingManage
Grid1.DataBind();
return;
}
string strSql = @"SELECT WeldingDailyId,WeldJointId,PipelineCode,WeldJointCode,
BackingWelderCode,CoverWelderCode,Material1Code,Material2Code,
Dia,DNDia,Thickness,WeldTypeCode,WeldingMethodCode,WeldingWireCode,WeldingMode,
WeldingRodCode,Size,JointAttribute,CoverWelderTeamGroupName,BackingWelderTeamGroupName,WeldingLocationCode
string strSql = @"SELECT jot.WeldingDailyId,jot.WeldJointId,jot.PipelineCode,jot.WeldJointCode,
jot.BackingWelderCode,jot.CoverWelderCode,jot.Material1Code,jot.Material2Code,
jot.Dia,jot.DNDia,jot.Thickness,jot.WeldTypeCode,jot.WeldingMethodCode,jot.WeldingWireCode,jot.WeldingMode,
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
WHERE WeldingDailyId=@WeldingDailyId";
FROM dbo.View_HJGL_WeldJoint AS jot
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>();
listStr.Add(new SqlParameter("@WeldingDailyId", tvControlItem.SelectedNodeID));
listStr.Add(new SqlParameter("@WeldReportMenuId", Const.HJGL_WeldReportMenuId));
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() + "%"));
}
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() + "%"));
}
SqlParameter[] parameter = listStr.ToArray();
@@ -263,16 +276,23 @@ namespace FineUIPro.Web.HJGL.WeldingManage
jot.Thickness,
jot.WeldingMethodCode,
submitPerson.PersonName AS SubmitPersonName,
temp.SubmitDate
temp.SubmitDate,
beforeAtt.AttachUrl AS BeforePhotoUrl,
afterAtt.AttachUrl AS AfterPhotoUrl
FROM dbo.HJGL_WeldingDailyTempDetail AS temp
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 backingWelder ON backingWelder.PersonId = temp.BackingWelderId
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.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";
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
listStr.Add(new SqlParameter("@WeldReportMenuId", Const.HJGL_WeldReportMenuId));
var unitWork = BLL.UnitWorkService.getUnitWorkByUnitWorkId(tvControlItem.SelectedNodeID);
if (unitWork == null)
@@ -380,7 +400,16 @@ namespace FineUIPro.Web.HJGL.WeldingManage
#endregion
#endregion
protected string ConvertImageUrlByImage(object photoUrl)
{
string url = string.Empty;
if (photoUrl != null)
{
url = BLL.UploadAttachmentService.ShowImage("../../", photoUrl.ToString());
}
return url;
}
#region
/// <summary>
@@ -7,11 +7,13 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.HJGL.WeldingManage {
public partial class WeldReport {
namespace FineUIPro.Web.HJGL.WeldingManage
{
public partial class WeldReport
{
/// <summary>
/// form1 控件。
/// </summary>
@@ -20,7 +22,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
@@ -29,7 +31,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// Panel1 控件。
/// </summary>
@@ -38,7 +40,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel Panel1;
/// <summary>
/// panelLeftRegion 控件。
/// </summary>
@@ -47,7 +49,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelLeftRegion;
/// <summary>
/// Toolbar1 控件。
/// </summary>
@@ -56,7 +58,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// txtMonth 控件。
/// </summary>
@@ -65,7 +67,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtMonth;
/// <summary>
/// tvControlItem 控件。
/// </summary>
@@ -74,7 +76,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Tree tvControlItem;
/// <summary>
/// Panel2 控件。
/// </summary>
@@ -83,7 +85,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel Panel2;
/// <summary>
/// panelCenterRegion 控件。
/// </summary>
@@ -101,7 +103,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// Toolbar2 控件。
/// </summary>
@@ -110,7 +112,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar2;
/// <summary>
/// txtUnitName 控件。
/// </summary>
@@ -119,7 +121,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label txtUnitName;
/// <summary>
/// txtTabler 控件。
/// </summary>
@@ -128,7 +130,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label txtTabler;
/// <summary>
/// txtTableDate 控件。
/// </summary>
@@ -137,7 +139,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label txtTableDate;
/// <summary>
/// txtWeldingDate 控件。
/// </summary>
@@ -146,7 +148,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label txtWeldingDate;
/// <summary>
/// txtSumSize 控件。
/// </summary>
@@ -155,7 +157,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label txtSumSize;
/// <summary>
/// txtTeam 控件。
/// </summary>
@@ -164,7 +166,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label txtTeam;
/// <summary>
/// txtRemark 控件。
/// </summary>
@@ -173,7 +175,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label txtRemark;
/// <summary>
/// Toolbar3 控件。
/// </summary>
@@ -182,7 +184,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar3;
/// <summary>
/// txtPipelineCode 控件。
/// </summary>
@@ -191,7 +193,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtPipelineCode;
/// <summary>
/// txtWelderCode 控件。
/// </summary>
@@ -200,7 +202,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtWelderCode;
/// <summary>
/// ToolbarFill1 控件。
/// </summary>
@@ -209,7 +211,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarFill ToolbarFill1;
/// <summary>
/// hdWeldingDailyCode 控件。
/// </summary>
@@ -218,7 +220,25 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
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>
/// ToolbarSeparator1 控件。
/// </summary>
@@ -227,7 +247,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
/// <summary>
/// ToolbarText1 控件。
/// </summary>
@@ -236,7 +256,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarText ToolbarText1;
/// <summary>
/// ddlPageSize 控件。
/// </summary>
@@ -318,6 +338,24 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// </remarks>
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>
/// ToolbarSeparatorPending 控件。
/// </summary>
@@ -344,7 +382,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList ddlPendingPageSize;
/// <summary>
/// Window1 控件。
/// </summary>
@@ -353,7 +391,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window1;
/// <summary>
/// Menu1 控件。
/// </summary>
@@ -362,7 +400,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Menu Menu1;
/// <summary>
/// btnMenuAdd 控件。
/// </summary>
@@ -371,7 +409,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnMenuAdd;
/// <summary>
/// btnMenuEdit 控件。
/// </summary>
@@ -389,7 +427,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnMenuImport;
/// <summary>
/// btnMenuOut 控件。
/// </summary>
@@ -398,7 +436,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnMenuOut;
/// <summary>
/// btnMenuDelete 控件。
/// </summary>
@@ -407,7 +445,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnMenuDelete;
/// <summary>
/// Menu2 控件。
/// </summary>
@@ -416,7 +454,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Menu Menu2;
/// <summary>
/// btnMenuDeleteDetail 控件。
/// </summary>
@@ -77,4 +77,45 @@
// 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? Misalignment { get; set; }
/// <summary>
/// 下料抽检附件路径
/// </summary>
public string CuttingAttachUrl1 { get; set; }
/// <summary>
/// 组对抽检附件路径
/// </summary>
public string FitupAttachUrl1 { get; set; }
}
/// <summary>
@@ -65,6 +75,8 @@ namespace Model
public DateTime? CreateTime { get; set; }
public string AttachUrl1 { get; set; }
public string Remark { get; set; }
}
@@ -107,6 +119,8 @@ namespace Model
public DateTime? CreateTime { get; set; }
public string AttachUrl1 { 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\HJGL\HJGL_PreWeldingDailyItem.cs" />
<Compile Include="APIItem\HJGL\PreWeldInspectionItem.cs" />
<Compile Include="APIItem\HJGL\ViewHJGLWeldJointExtend.cs" />
<Compile Include="APIItem\HJGL\HotProcessHardItem.cs" />
<Compile Include="APIItem\HJGL\NDETrustItem.cs" />
<Compile Include="APIItem\HJGL\WeldJointItem.cs" />
@@ -233,6 +233,34 @@ namespace WebAPI.Controllers
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
#region