feat: 完善焊接质量检查和材料管理

补齐焊前专项审核和焊缝外观检测流程,统一质检查询、附件处理与材料明细导出,提升业务数据追溯和组件匹配使用效率。
This commit is contained in:
2026-08-10 17:58:55 +08:00
parent bd73295ff8
commit 2de696fad2
48 changed files with 2252 additions and 131 deletions
+28 -2
View File
@@ -133,11 +133,19 @@ namespace BLL
join mat in Funs.DB.HJGL_MaterialCodeLib on x.MaterialCode equals mat.MaterialCode into mm
from mat in mm.DefaultIfEmpty()
join y in Funs.DB.Tw_InputMaster on x.InputMasterId equals y.Id
join warehouse in Funs.DB.Base_Warehouse on y.WarehouseId equals warehouse.WarehouseId into warehouses
from warehouse in warehouses.DefaultIfEmpty()
join person in Funs.DB.Person_Persons on y.CreateMan equals person.PersonId into persons
from person in persons.DefaultIfEmpty()
where inputMasterIds.Contains(x.InputMasterId)
orderby y.CusBillCode, x.SortIndex
select new
{
入库单编号 = y.CusBillCode,
y.CusBillCode,
WarehouseName = warehouse == null ? y.WarehouseCode : warehouse.WarehouseName,
y.TypeInt,
CreateManName = person == null ? y.CreateMan : person.PersonName,
y.CreateDate,
材料主编码 = x.MaterialCode,
材料编码 = mat.Code,
炉号 = mat.HeatNo,
@@ -146,8 +154,26 @@ namespace BLL
材料描述 = mat.MaterialDef,
计划数量 = x.PlanNum,
实际数量 = x.ActNum,
y.Remark
};
return q;
// 类型字典无法转换为 SQL,先完成数据库查询,再生成固定顺序的 Excel 列。
return q.ToList().Select(x => new
{
编号 = x.CusBillCode,
仓库 = x.WarehouseName,
类型 = TwConst.TypeIntMap.FirstOrDefault(y => y.Value == x.TypeInt).Key,
发起人 = x.CreateManName,
发起时间 = x.CreateDate,
x.材料主编码,
x.材料编码,
x.炉号,
x.批号,
x.材料名称,
x.材料描述,
x.计划数量,
x.实际数量,
备注 = x.Remark
}).ToList();
}
}
}