feat: 完善材料管理与焊接业务功能
This commit is contained in:
@@ -0,0 +1,62 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 焊接日报待审核接口服务适配层。
|
||||
/// </summary>
|
||||
public static class APIWeldReportService
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取焊接日报待审核列表。
|
||||
/// </summary>
|
||||
public static List<Model.WeldingDailyTempDetailItem> GetPendingWeldingDailyTempDetailList(
|
||||
string projectId, string unitWorkId, string weldingDate, string pipelineCode, string welderCode)
|
||||
{
|
||||
return WeldingDailyService.GetWeldingDailyTempDetailList(projectId, unitWorkId,
|
||||
ParseWeldingDate(weldingDate), pipelineCode, welderCode);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查看单条焊接日报待审核明细。
|
||||
/// </summary>
|
||||
public static Model.WeldingDailyTempDetailItem GetPendingWeldingDailyTempDetail(string tempDetailId)
|
||||
{
|
||||
return WeldingDailyService.GetWeldingDailyTempDetailById(tempDetailId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量审核通过焊接日报待审核明细。
|
||||
/// </summary>
|
||||
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);
|
||||
}
|
||||
|
||||
private static DateTime? ParseWeldingDate(string weldingDate)
|
||||
{
|
||||
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