2023-06-29
This commit is contained in:
Binary file not shown.
@@ -7,6 +7,7 @@ namespace BLL
|
|||||||
public static class APIPipeJointService
|
public static class APIPipeJointService
|
||||||
{
|
{
|
||||||
#region 获取管线信息
|
#region 获取管线信息
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 根据单位工程ID获取管线列表
|
/// 根据单位工程ID获取管线列表
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -23,16 +24,31 @@ namespace BLL
|
|||||||
{
|
{
|
||||||
BaseInfoId = x.PipelineId,
|
BaseInfoId = x.PipelineId,
|
||||||
BaseInfoCode = x.PipelineCode
|
BaseInfoCode = x.PipelineCode
|
||||||
|
|
||||||
}
|
}
|
||||||
).ToList();
|
).ToList();
|
||||||
return getDataLists;
|
return getDataLists;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
public static List<Model.HJGL_Pipeline> GetPipelineidListByCode(string pipelineCode, string projectid)
|
||||||
|
{
|
||||||
|
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||||
|
{
|
||||||
|
// 从数据库中获取符合条件的管线数据
|
||||||
|
var pipelines = db.HJGL_Pipeline
|
||||||
|
.Where(p =>p.ProjectId==projectid&& p.PipelineCode.Contains(pipelineCode))
|
||||||
|
.OrderBy(p => p.PipelineCode)
|
||||||
|
.ToList();
|
||||||
|
return pipelines;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion 获取管线信息
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#region 获取未焊接的焊口信息
|
#region 获取未焊接的焊口信息
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 根据管线ID获取未焊接的焊口信息
|
/// 根据管线ID获取未焊接的焊口信息
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -53,13 +69,14 @@ namespace BLL
|
|||||||
}
|
}
|
||||||
).ToList();
|
).ToList();
|
||||||
|
|
||||||
|
|
||||||
return getData;
|
return getData;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
|
||||||
|
#endregion 获取未焊接的焊口信息
|
||||||
|
|
||||||
#region 根据管线ID获取所有焊口信息
|
#region 根据管线ID获取所有焊口信息
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 根据管线ID获取所有焊口信息
|
/// 根据管线ID获取所有焊口信息
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -81,9 +98,11 @@ namespace BLL
|
|||||||
return getDataLists;
|
return getDataLists;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
|
||||||
|
#endregion 根据管线ID获取所有焊口信息
|
||||||
|
|
||||||
#region 获取焊工列表
|
#region 获取焊工列表
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 根据管线ID获取焊口列表
|
/// 根据管线ID获取焊口列表
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -162,6 +181,7 @@ namespace BLL
|
|||||||
}
|
}
|
||||||
|
|
||||||
#region 焊工资质判断
|
#region 焊工资质判断
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 一种焊接方法资质判断
|
/// 一种焊接方法资质判断
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -216,6 +236,7 @@ namespace BLL
|
|||||||
|
|
||||||
return isok;
|
return isok;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 两种焊接方法资质判断
|
/// 两种焊接方法资质判断
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -273,7 +294,6 @@ namespace BLL
|
|||||||
{
|
{
|
||||||
isok = true;
|
isok = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fThicknessMax = floorQ.Max(x => x.ThicknessMax);
|
fThicknessMax = floorQ.Max(x => x.ThicknessMax);
|
||||||
@@ -295,12 +315,13 @@ namespace BLL
|
|||||||
|
|
||||||
return isok;
|
return isok;
|
||||||
}
|
}
|
||||||
#endregion
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
|
#endregion 焊工资质判断
|
||||||
|
|
||||||
|
#endregion 获取焊工列表
|
||||||
|
|
||||||
#region 根据焊口ID获取焊口信息
|
#region 根据焊口ID获取焊口信息
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 根据焊口ID获取焊口信息
|
/// 根据焊口ID获取焊口信息
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -329,12 +350,12 @@ namespace BLL
|
|||||||
DetectionRate = GetDetectionRate(x.PipelineId),
|
DetectionRate = GetDetectionRate(x.PipelineId),
|
||||||
IsHotProess = x.IsHotProess == true ? "是" : "否",
|
IsHotProess = x.IsHotProess == true ? "是" : "否",
|
||||||
AttachUrl = x.AttachUrl
|
AttachUrl = x.AttachUrl
|
||||||
|
|
||||||
};
|
};
|
||||||
return getDateInfo.FirstOrDefault();
|
return getDateInfo.FirstOrDefault();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
|
||||||
|
#endregion 根据焊口ID获取焊口信息
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 根据管线ID获取探伤比例
|
/// 根据管线ID获取探伤比例
|
||||||
@@ -354,6 +375,7 @@ namespace BLL
|
|||||||
}
|
}
|
||||||
|
|
||||||
#region 根据焊口标识获取焊口详细信息
|
#region 根据焊口标识获取焊口详细信息
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 根据焊口标识获取焊口详细信息
|
/// 根据焊口标识获取焊口详细信息
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -387,14 +409,15 @@ namespace BLL
|
|||||||
CoverWelderCode = db.SitePerson_Person.First(z => z.PersonId == x.CoverWelderId).WelderCode,
|
CoverWelderCode = db.SitePerson_Person.First(z => z.PersonId == x.CoverWelderId).WelderCode,
|
||||||
IsHotProess = x.IsHotProess == true ? "是" : "否",
|
IsHotProess = x.IsHotProess == true ? "是" : "否",
|
||||||
AttachUrl = x.AttachUrl
|
AttachUrl = x.AttachUrl
|
||||||
|
|
||||||
};
|
};
|
||||||
return getDateInfo.FirstOrDefault();
|
return getDateInfo.FirstOrDefault();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
|
||||||
|
#endregion 根据焊口标识获取焊口详细信息
|
||||||
|
|
||||||
#region 保存管线焊口信息
|
#region 保存管线焊口信息
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 保存管线焊口信息
|
/// 保存管线焊口信息
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -461,7 +484,6 @@ namespace BLL
|
|||||||
|
|
||||||
db.HJGL_Pipeline.InsertOnSubmit(newPipe);
|
db.HJGL_Pipeline.InsertOnSubmit(newPipe);
|
||||||
db.SubmitChanges();
|
db.SubmitChanges();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var jot = db.HJGL_WeldJoint.Where(x => x.PipelineId == pipelineId && (x.WeldJointCode == addItem.WeldJointCode || x.WeldJointIdentify == addItem.WeldJointIdentify)).FirstOrDefault();
|
var jot = db.HJGL_WeldJoint.Where(x => x.PipelineId == pipelineId && (x.WeldJointCode == addItem.WeldJointCode || x.WeldJointIdentify == addItem.WeldJointIdentify)).FirstOrDefault();
|
||||||
@@ -532,9 +554,11 @@ namespace BLL
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
|
||||||
|
#endregion 保存管线焊口信息
|
||||||
|
|
||||||
#region 批量保存管线焊口信息
|
#region 批量保存管线焊口信息
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 批量保存管线焊口信息
|
/// 批量保存管线焊口信息
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -550,7 +574,7 @@ namespace BLL
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion 批量保存管线焊口信息
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 保存预提交日报
|
/// 保存预提交日报
|
||||||
@@ -583,13 +607,10 @@ namespace BLL
|
|||||||
JointAttribute = addItem.JointAttribute,
|
JointAttribute = addItem.JointAttribute,
|
||||||
WeldingMode = addItem.WeldingMode,
|
WeldingMode = addItem.WeldingMode,
|
||||||
AttachUrl = addItem.AttachUrl
|
AttachUrl = addItem.AttachUrl
|
||||||
|
|
||||||
};
|
};
|
||||||
db.HJGL_PreWeldingDaily.InsertOnSubmit(newP);
|
db.HJGL_PreWeldingDaily.InsertOnSubmit(newP);
|
||||||
db.SubmitChanges();
|
db.SubmitChanges();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
using BLL;
|
using BLL;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
using System.Web.Http;
|
using System.Web.Http;
|
||||||
|
|
||||||
namespace WebAPI.Controllers
|
namespace WebAPI.Controllers
|
||||||
@@ -30,7 +31,36 @@ namespace WebAPI.Controllers
|
|||||||
|
|
||||||
return responeData;
|
return responeData;
|
||||||
}
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 根据管线号查找pipelinid
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pipelineCode"></param>
|
||||||
|
/// <param name="projectid"></param>
|
||||||
|
/// <param name="pageindex"></param>
|
||||||
|
/// <param name="pageSize"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public Model.ResponeData GetPipelineidListByCode(string pipelineCode, string projectid,int pageindex, int pageSize)
|
||||||
|
{
|
||||||
|
var responeData = new Model.ResponeData();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var pipelineidList = APIPipeJointService.GetPipelineidListByCode(pipelineCode,projectid);
|
||||||
|
|
||||||
|
int pageCount = pipelineidList.Count;
|
||||||
|
if (pageCount > 0 && pageindex > 0 && pageSize > 0)
|
||||||
|
{
|
||||||
|
pipelineidList = pipelineidList.Skip(pageSize * (pageindex - 1)).Take(pageSize).ToList();
|
||||||
|
}
|
||||||
|
responeData.data = new { pageCount, pipelineidList };
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
responeData.code = 0;
|
||||||
|
responeData.message = ex.Message;
|
||||||
|
}
|
||||||
|
|
||||||
|
return responeData;
|
||||||
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 根据管线ID获取未焊接的焊口信息
|
/// 根据管线ID获取未焊接的焊口信息
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user