2de696fad2
补齐焊前专项审核和焊缝外观检测流程,统一质检查询、附件处理与材料明细导出,提升业务数据追溯和组件匹配使用效率。
82 lines
2.7 KiB
C#
82 lines
2.7 KiB
C#
using BLL;
|
|
using System;
|
|
using System.Web.Http;
|
|
|
|
namespace WebAPI.Controllers.HJGL.WeldingManage
|
|
{
|
|
/// <summary>
|
|
/// 焊缝外观检测接口。
|
|
/// </summary>
|
|
public class WeldAppearanceCheckController : ApiController
|
|
{
|
|
/// <summary>
|
|
/// 分页查询当前项目中已焊接的焊口。
|
|
/// </summary>
|
|
/// <param name="projectId">项目ID。</param>
|
|
/// <param name="pipelineCode">管线号查询条件。</param>
|
|
/// <param name="weldJointCode">焊口号查询条件。</param>
|
|
/// <param name="pageIndex">页码,从0开始。</param>
|
|
/// <param name="pageSize">每页记录数。</param>
|
|
/// <returns>已焊接焊口列表。</returns>
|
|
public Model.ResponeData GetWeldedJoints(string projectId, string pipelineCode = "", string weldJointCode = "", int pageIndex = 0, int pageSize = 20)
|
|
{
|
|
var responeData = new Model.ResponeData();
|
|
try
|
|
{
|
|
responeData.data = WeldAppearanceCheckService.GetWeldedJoints(
|
|
projectId, pipelineCode, weldJointCode, pageIndex, pageSize);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
responeData.code = 0;
|
|
responeData.message = ex.Message;
|
|
}
|
|
|
|
return responeData;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 查询焊口基础信息及历史外观检测记录。
|
|
/// </summary>
|
|
/// <param name="weldJointId">焊口ID。</param>
|
|
/// <returns>焊口详情及外观检测历史。</returns>
|
|
public Model.ResponeData GetJointDetail(string weldJointId)
|
|
{
|
|
var responeData = new Model.ResponeData();
|
|
try
|
|
{
|
|
responeData.data = WeldAppearanceCheckService.GetJointDetail(weldJointId);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
responeData.code = 0;
|
|
responeData.message = ex.Message;
|
|
}
|
|
|
|
return responeData;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 保存焊缝外观检测记录。
|
|
/// </summary>
|
|
/// <param name="item">外观检测结果、检测人、检测时间及照片信息。</param>
|
|
/// <returns>外观检测记录ID。</returns>
|
|
[HttpPost]
|
|
public Model.ResponeData SaveRecord([FromBody] Model.WeldAppearanceCheckInput item)
|
|
{
|
|
var responeData = new Model.ResponeData();
|
|
try
|
|
{
|
|
responeData.data = WeldAppearanceCheckService.Save(item);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
responeData.code = 0;
|
|
responeData.message = ex.Message;
|
|
}
|
|
|
|
return responeData;
|
|
}
|
|
}
|
|
}
|