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 获取焊工列表
|
||||
|
||||
@@ -91,8 +91,6 @@ namespace BLL
|
||||
{
|
||||
var data = (from f in db.HJGL_PreWeldFitupCheck
|
||||
join w in db.HJGL_WeldJoint on f.WeldJointId equals w.WeldJointId
|
||||
join g in db.Base_GrooveType on f.GrooveTypeId equals g.GrooveTypeId into grooveTypes
|
||||
from g in grooveTypes.DefaultIfEmpty()
|
||||
join p in db.Person_Persons on f.CheckPerson equals p.PersonId into persons
|
||||
from p in persons.DefaultIfEmpty()
|
||||
where f.WeldJointId == weldJointId
|
||||
@@ -104,17 +102,8 @@ namespace BLL
|
||||
WeldJointId = f.WeldJointId,
|
||||
PipelineCode = w.PipelineCode,
|
||||
WeldJointCode = w.WeldJointCode,
|
||||
GrooveTypeId = f.GrooveTypeId,
|
||||
GrooveTypeCode = g == null ? string.Empty : g.GrooveTypeCode,
|
||||
GrooveTypeName = g == null ? string.Empty : g.GrooveTypeName,
|
||||
GrooveProcessType = f.GrooveProcessType,
|
||||
GrooveAngle = f.GrooveAngle,
|
||||
FitupGap = f.FitupGap,
|
||||
Misalignment = f.Misalignment,
|
||||
WeldReinforcement = f.WeldReinforcement,
|
||||
WeldHeight = f.WeldHeight,
|
||||
WeldWidth = f.WeldWidth,
|
||||
SurfaceDefect = f.SurfaceDefect,
|
||||
CheckPerson = f.CheckPerson,
|
||||
CheckPersonName = p == null ? string.Empty : p.PersonName,
|
||||
CheckTime = f.CheckTime,
|
||||
@@ -135,7 +124,7 @@ namespace BLL
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 按材料编码获取防腐检查记录
|
||||
/// 按入库条码获取材料信息及防腐检查记录
|
||||
/// </summary>
|
||||
public static List<Model.AntiCorrosionCheckRecordItem> GetAntiCorrosionChecksByMaterialCode(string barCode, string projectId)
|
||||
{
|
||||
|
||||
@@ -296,7 +296,9 @@ namespace BLL
|
||||
newItem.weldingLocation,
|
||||
newItem.welderType,
|
||||
newItem.WeldingMethodId,
|
||||
newItem.WeldTypeId);
|
||||
newItem.WeldTypeId,
|
||||
newItem.WeldingWire,
|
||||
newItem.WeldingRod);
|
||||
if (!string.IsNullOrEmpty(res))
|
||||
{
|
||||
return res;
|
||||
|
||||
@@ -8,9 +8,6 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static class APIWeldReportService
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取焊接日报待审核列表。
|
||||
/// </summary>
|
||||
public static List<Model.WeldingDailyTempDetailItem> GetPendingWeldingDailyTempDetailList(
|
||||
string projectId, string unitWorkId, string weldingDate, string pipelineCode, string welderCode)
|
||||
{
|
||||
@@ -18,26 +15,21 @@ namespace BLL
|
||||
ParseWeldingDate(weldingDate), pipelineCode, welderCode);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查看单条焊接日报待审核明细。
|
||||
/// </summary>
|
||||
public static Model.WeldingDailyTempDetailItem GetPendingWeldingDailyTempDetail(string tempDetailId)
|
||||
{
|
||||
return WeldingDailyService.GetWeldingDailyTempDetailById(tempDetailId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量审核通过焊接日报待审核明细。
|
||||
/// </summary>
|
||||
public static string TeamAuditPendingWeldingDailyTempDetails(string[] tempDetailIds, string auditMan)
|
||||
{
|
||||
return WeldingDailyService.TeamAuditWeldingDailyTempDetails(tempDetailIds, auditMan);
|
||||
}
|
||||
|
||||
public static string AuditPendingWeldingDailyTempDetails(string[] tempDetailIds, string auditMan)
|
||||
{
|
||||
// 审核规则、建日报、组批及状态回写统一由PC端已经使用的公共服务处理。
|
||||
return WeldingDailyService.AuditWeldingDailyTempDetails(tempDetailIds, auditMan);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量删除焊接日报待审核明细。
|
||||
/// </summary>
|
||||
public static string DeletePendingWeldingDailyTempDetails(string[] tempDetailIds)
|
||||
{
|
||||
return WeldingDailyService.DeleteWeldingDailyTempDetails(tempDetailIds);
|
||||
@@ -45,17 +37,13 @@ namespace BLL
|
||||
|
||||
private static DateTime? ParseWeldingDate(string weldingDate)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(weldingDate))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
if (string.IsNullOrWhiteSpace(weldingDate)) return null;
|
||||
|
||||
DateTime parsedDate;
|
||||
if (!DateTime.TryParse(weldingDate, out parsedDate))
|
||||
{
|
||||
throw new ArgumentException("焊接日期格式不正确");
|
||||
}
|
||||
|
||||
return parsedDate.Date;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user