feat: 完善焊接质量检查和材料管理
补齐焊前专项审核和焊缝外观检测流程,统一质检查询、附件处理与材料明细导出,提升业务数据追溯和组件匹配使用效率。
This commit is contained in:
@@ -47,7 +47,9 @@ namespace BLL
|
||||
where m.WeldJointId == weldJointId
|
||||
select new Model.PreWeldMaterialItem
|
||||
{
|
||||
MaterialCode = lib.MaterialCode,
|
||||
PipeLineMatId = m.PipeLineMatId,
|
||||
MainCode = m.MaterialCode,
|
||||
MaterialCode = m.MaterialCode,
|
||||
MaterialName = lib.MaterialName,
|
||||
MaterialSpec = lib.MaterialSpec,
|
||||
MaterialMade = lib.MaterialMade,
|
||||
@@ -55,12 +57,16 @@ namespace BLL
|
||||
MaterialUnit = lib.MaterialUnit,
|
||||
HeatNo = lib.HeatNo,
|
||||
BatchNo = lib.BatchNo,
|
||||
}).ToList()
|
||||
}).ToList()
|
||||
};
|
||||
|
||||
var item = query.FirstOrDefault();
|
||||
if (item != null)
|
||||
{
|
||||
for (int index = 0; index < item.preWeldMaterialItems.Count; index++)
|
||||
{
|
||||
item.preWeldMaterialItems[index].MaterialSide = index + 1;
|
||||
}
|
||||
SetInspectionAttachUrl(db, item);
|
||||
}
|
||||
|
||||
@@ -73,44 +79,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static List<Model.PreWeldCuttingCheckItem> GetCuttingChecksByWeldJointId(string weldJointId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var data = (from c in db.HJGL_PreWeldCuttingCheck
|
||||
join w in db.HJGL_WeldJoint on c.WeldJointId equals w.WeldJointId
|
||||
join p in db.Person_Persons on c.CheckPerson equals p.PersonId into persons
|
||||
from p in persons.DefaultIfEmpty()
|
||||
where c.WeldJointId == weldJointId
|
||||
orderby c.CheckTime descending
|
||||
select new Model.PreWeldCuttingCheckItem
|
||||
{
|
||||
CuttingCheckId = c.CuttingCheckId,
|
||||
ProjectId = c.ProjectId,
|
||||
WeldJointId = c.WeldJointId,
|
||||
PipelineCode = w.PipelineCode,
|
||||
WeldJointCode = w.WeldJointCode,
|
||||
CuttingLength = c.CuttingLength,
|
||||
GrooveForm = c.GrooveForm,
|
||||
GrooveAngle = c.GrooveAngle,
|
||||
IsMaterialCodeBatchNoAccurate = c.IsMaterialCodeBatchNoAccurate,
|
||||
IsMaterialQuantityAccurate = c.IsMaterialQuantityAccurate,
|
||||
IsQualified = c.IsQualified,
|
||||
CheckPerson = c.CheckPerson,
|
||||
CheckPersonName = p == null ? string.Empty : p.PersonName,
|
||||
CheckTime = c.CheckTime,
|
||||
CreateUser = c.CreateUser,
|
||||
CreateTime = c.CreateTime,
|
||||
AttachUrl1 = null,
|
||||
CheckResult = c.CheckResult,
|
||||
UnqualifiedReason = c.UnqualifiedReason,
|
||||
RectifyRequirement = c.RectifyRequirement,
|
||||
Remark = c.Remark
|
||||
}).ToList();
|
||||
foreach (var item in data)
|
||||
{
|
||||
item.AttachUrl1 = GetAttachUrl(db, Const.HJGL_PreWeldCuttingCheckMenuId, item.CuttingCheckId);
|
||||
}
|
||||
return data;
|
||||
}
|
||||
return PreWeldInspectionService.GetCuttingCheckItemsByWeldJointId(weldJointId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -189,6 +158,26 @@ namespace BLL
|
||||
return PreWeldInspectionService.SaveCuttingCheck(item);
|
||||
}
|
||||
|
||||
public static string ReviewCuttingCheck(Model.PreWeldCuttingCheckReviewInput item)
|
||||
{
|
||||
return PreWeldInspectionService.ReviewCuttingCheck(item);
|
||||
}
|
||||
|
||||
public static List<Model.BaseInfoItem> GetSpecialReviewers(string projectId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
return (from x in db.SitePerson_Person
|
||||
where x.ProjectId == projectId && x.States == Const.ProjectPersonStates_1
|
||||
orderby x.PersonName
|
||||
select new Model.BaseInfoItem
|
||||
{
|
||||
BaseInfoId = x.PersonId,
|
||||
BaseInfoName = x.PersonName
|
||||
}).Distinct().ToList();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 保存组对检查
|
||||
/// </summary>
|
||||
|
||||
@@ -289,7 +289,14 @@ namespace BLL
|
||||
return "参数不能为空";
|
||||
}
|
||||
|
||||
string res = BLL.WeldingDailyService.SaveWeldingDailyTempDetailByMobile(newItem.WeldJointId, newItem.Personid, newItem.time, newItem.weldingLocation, newItem.welderType);
|
||||
string res = BLL.WeldingDailyService.SaveWeldingDailyTempDetailByMobile(
|
||||
newItem.WeldJointId,
|
||||
newItem.Personid,
|
||||
newItem.time,
|
||||
newItem.weldingLocation,
|
||||
newItem.welderType,
|
||||
newItem.WeldingMethodId,
|
||||
newItem.WeldTypeId);
|
||||
if (!string.IsNullOrEmpty(res))
|
||||
{
|
||||
return res;
|
||||
|
||||
Reference in New Issue
Block a user