feat(hjgl): 完善焊接任务与质量管理流程
This commit is contained in:
@@ -151,6 +151,46 @@ namespace BLL
|
||||
}
|
||||
}
|
||||
|
||||
/// <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 static List<Model.WeldAppearanceJointItem> GetAllWeldJoints(string projectId,
|
||||
string pipelineCode, string weldJointCode, int pageIndex, int pageSize)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
// 管线焊口选择需要包含未焊接焊口,因此不按 WeldingDailyId 过滤。
|
||||
var query = db.View_HJGL_WeldJoint.Where(x => x.ProjectId == projectId);
|
||||
if (!string.IsNullOrWhiteSpace(pipelineCode))
|
||||
{
|
||||
query = query.Where(x => x.PipelineCode.Contains(pipelineCode));
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(weldJointCode))
|
||||
{
|
||||
query = query.Where(x => x.WeldJointCode.Contains(weldJointCode));
|
||||
}
|
||||
|
||||
return query.OrderBy(x => x.PipelineCode).ThenBy(x => x.WeldJointCode)
|
||||
.Skip(pageIndex * pageSize).Take(pageSize)
|
||||
.Select(x => new Model.WeldAppearanceJointItem
|
||||
{
|
||||
WeldJointId = x.WeldJointId,
|
||||
ProjectId = x.ProjectId,
|
||||
PipelineCode = x.PipelineCode,
|
||||
WeldJointCode = x.WeldJointCode,
|
||||
WeldTypeCode = x.WeldTypeCode,
|
||||
WeldingMethodCode = x.WeldingMethodCode,
|
||||
WeldingDate = x.WeldingDateD
|
||||
}).ToList();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion 根据管线ID获取所有焊口信息
|
||||
|
||||
#region 获取焊工列表
|
||||
|
||||
Reference in New Issue
Block a user