1
This commit is contained in:
@@ -472,7 +472,9 @@ namespace BLL
|
|||||||
join n in db.Base_Project on x.ProjectId equals n.ProjectId
|
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
|
join m in db.Person_Persons on x.ReceiveMan equals m.PersonId into tt
|
||||||
from t in tt.DefaultIfEmpty()
|
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)
|
if (filter != null)
|
||||||
{
|
{
|
||||||
@@ -510,7 +512,7 @@ namespace BLL
|
|||||||
}
|
}
|
||||||
if (!string.IsNullOrEmpty(filter.ReceiveMan))
|
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))
|
if (!string.IsNullOrEmpty(filter.ReceiveDate))
|
||||||
{
|
{
|
||||||
@@ -524,7 +526,7 @@ namespace BLL
|
|||||||
}
|
}
|
||||||
if (!string.IsNullOrEmpty(filter.TrainNumberId))
|
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,
|
ContactPhone = z.x.ContactPhone,
|
||||||
StackingPosition = z.x.StackingPosition,
|
StackingPosition = z.x.StackingPosition,
|
||||||
State = z.x.State,
|
State = z.x.State,
|
||||||
ReceiveMan = z.t.PersonName,
|
ReceiveMan = z.train.ContactName,
|
||||||
ReceiveDate = string.Format("{0:g}", z.x.ReceiveDate),
|
ReceiveDate = string.Format("{0:g}", z.x.ReceiveDate),
|
||||||
TrainNumber = z.x.TrainNumber,
|
TrainNumber = z.train.TrainNumber,
|
||||||
}).Distinct();
|
}).Distinct();
|
||||||
|
|
||||||
totalCount = q.Count();
|
totalCount = q.Count();
|
||||||
|
|||||||
@@ -593,16 +593,17 @@ namespace BLL
|
|||||||
var q = iosList[0];
|
var q = iosList[0];
|
||||||
var isoNos = string.Join(",", iosList.Select(x => x.PipelineCode).ToArray());
|
var isoNos = string.Join(",", iosList.Select(x => x.PipelineCode).ToArray());
|
||||||
var isoIds = string.Join("','", iosList.Select(x => x.PipelineId).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
|
var CoverWelderUnitName = (from x in Funs.DB.HJGL_WeldJoint
|
||||||
join y in Funs.DB.SitePerson_Person on x.CoverWelderId equals y.PersonId
|
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
|
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();
|
select z.UnitName ).Distinct().ToList();
|
||||||
var BackingWelderUnitName = (from x in Funs.DB.HJGL_WeldJoint
|
var BackingWelderUnitName = (from x in Funs.DB.HJGL_WeldJoint
|
||||||
join y in Funs.DB.SitePerson_Person on x.BackingWelderId equals y.PersonId
|
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
|
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();
|
select z.UnitName).Distinct().ToList();
|
||||||
CoverWelderUnitName.AddRange(BackingWelderUnitName);
|
CoverWelderUnitName.AddRange(BackingWelderUnitName);
|
||||||
Dictionary<string, string> keyValuePairs = new Dictionary<string, string>();
|
Dictionary<string, string> keyValuePairs = new Dictionary<string, string>();
|
||||||
|
|||||||
Reference in New Issue
Block a user