修改焊接接口,

This commit is contained in:
李鹏飞 2025-12-23 16:01:22 +08:00
parent 808beba1fd
commit 8815b755bd
2 changed files with 10 additions and 7 deletions

View File

@ -472,7 +472,9 @@ namespace BLL
join n in db.Base_Project on x.ProjectId equals n.ProjectId
join m in db.Person_Persons on x.ReceiveMan equals m.PersonId into tt
from t in tt.DefaultIfEmpty()
select new { x, n, t };
join train in db.HJGL_TrainNumberManage on x.TrainNumberId equals train.Id into trains
from train in trains.DefaultIfEmpty()
select new { x, n, t , train };
if (filter != null)
{
@ -510,7 +512,7 @@ namespace BLL
}
if (!string.IsNullOrEmpty(filter.ReceiveMan))
{
baseQuery = baseQuery.Where(z => z.x.ReceiveMan == filter.ReceiveMan || (z.t != null && z.t.PersonName.Contains(filter.ReceiveMan)));
baseQuery = baseQuery.Where(z => z.train.ContactName == filter.ReceiveMan || (z.train != null && z.train.ContactName.Contains(filter.ReceiveMan)));
}
if (!string.IsNullOrEmpty(filter.ReceiveDate))
{
@ -524,7 +526,7 @@ namespace BLL
}
if (!string.IsNullOrEmpty(filter.TrainNumberId))
{
baseQuery = baseQuery.Where(z => z.x.TrainNumber != null && z.x.TrainNumber.Contains(filter.TrainNumberId));
baseQuery = baseQuery.Where(z => z.train.Id != null && z.train.Id.Contains(filter.TrainNumberId));
}
}
@ -540,9 +542,9 @@ namespace BLL
ContactPhone = z.x.ContactPhone,
StackingPosition = z.x.StackingPosition,
State = z.x.State,
ReceiveMan = z.t.PersonName,
ReceiveMan = z.train.ContactName,
ReceiveDate = string.Format("{0:g}", z.x.ReceiveDate),
TrainNumber = z.x.TrainNumber,
TrainNumber = z.train.TrainNumber,
}).Distinct();
totalCount = q.Count();

View File

@ -593,16 +593,17 @@ namespace BLL
var q = iosList[0];
var isoNos = string.Join(",", iosList.Select(x => x.PipelineCode).ToArray());
var isoIds = string.Join("','", iosList.Select(x => x.PipelineId).ToArray());
var pipelineIdList = iosList.Select(x => x.PipelineId).ToList(); // 修复创建实际的ID列表
//获取打底和盖面的焊工单位名称
var CoverWelderUnitName = (from x in Funs.DB.HJGL_WeldJoint
join y in Funs.DB.SitePerson_Person on x.CoverWelderId equals y.PersonId
join z in Funs.DB.Base_Unit on y.UnitId equals z.UnitId
where isoIds.Contains(x.PipelineId)
where pipelineIdList.Contains(x.PipelineId) // 修复:使用实际的列表
select z.UnitName ).Distinct().ToList();
var BackingWelderUnitName = (from x in Funs.DB.HJGL_WeldJoint
join y in Funs.DB.SitePerson_Person on x.BackingWelderId equals y.PersonId
join z in Funs.DB.Base_Unit on y.UnitId equals z.UnitId
where isoIds.Contains(x.PipelineId)
where pipelineIdList.Contains(x.PipelineId) // 修复:使用实际的列表
select z.UnitName).Distinct().ToList();
CoverWelderUnitName.AddRange(BackingWelderUnitName);
Dictionary<string, string> keyValuePairs = new Dictionary<string, string>();