注塑看板
This commit is contained in:
@@ -423,42 +423,42 @@ namespace Tnb.QcMgr
|
||||
GetQuery(Query, entity);
|
||||
List<QcCheckPlanH> list = await Query.ToListAsync();
|
||||
List<string> removes = new();
|
||||
foreach (QcCheckPlanH data in list)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(entity.materialid))
|
||||
{
|
||||
if (_repository.AsSugarClient().Queryable<QcCheckPlanMaterial>().Where(p => p.planid == data.id).Any())
|
||||
{
|
||||
if (!_repository.AsSugarClient().Queryable<QcCheckPlanMaterial>().Where(p => p.planid == data.id && p.materialid == entity.materialid).Any())
|
||||
{
|
||||
removes.Add(data.id);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(entity.processid))
|
||||
{
|
||||
if (_repository.AsSugarClient().Queryable<QcCheckPlanProcess>().Where(p => p.planid == data.id).Any())
|
||||
{
|
||||
if (!_repository.AsSugarClient().Queryable<QcCheckPlanProcess>().Where(p => p.planid == data.id && p.processid == entity.processid).Any())
|
||||
{
|
||||
removes.Add(data.id);
|
||||
}
|
||||
// foreach (QcCheckPlanH data in list)
|
||||
// {
|
||||
// if (!string.IsNullOrEmpty(entity.materialid))
|
||||
// {
|
||||
// if (_repository.AsSugarClient().Queryable<QcCheckPlanMaterial>().Where(p => p.planid == data.id).Any())
|
||||
// {
|
||||
// if (!_repository.AsSugarClient().Queryable<QcCheckPlanMaterial>().Where(p => p.planid == data.id && p.materialid == entity.materialid).Any())
|
||||
// {
|
||||
// removes.Add(data.id);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// if (!string.IsNullOrEmpty(entity.processid))
|
||||
// {
|
||||
// if (_repository.AsSugarClient().Queryable<QcCheckPlanProcess>().Where(p => p.planid == data.id).Any())
|
||||
// {
|
||||
// if (!_repository.AsSugarClient().Queryable<QcCheckPlanProcess>().Where(p => p.planid == data.id && p.processid == entity.processid).Any())
|
||||
// {
|
||||
// removes.Add(data.id);
|
||||
// }
|
||||
//
|
||||
// }
|
||||
// }
|
||||
// if (!string.IsNullOrEmpty(entity.workid))
|
||||
// {
|
||||
// if (_repository.AsSugarClient().Queryable<QcCheckPlanWork>().Where(p => p.planid == data.id).Any())
|
||||
// {
|
||||
// if (!_repository.AsSugarClient().Queryable<QcCheckPlanWork>().Where(p => p.planid == data.id && p.workid == entity.workid).Any())
|
||||
// {
|
||||
// removes.Add(data.id);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(entity.workid))
|
||||
{
|
||||
if (_repository.AsSugarClient().Queryable<QcCheckPlanWork>().Where(p => p.planid == data.id).Any())
|
||||
{
|
||||
if (!_repository.AsSugarClient().Queryable<QcCheckPlanWork>().Where(p => p.planid == data.id && p.workid == entity.workid).Any())
|
||||
{
|
||||
removes.Add(data.id);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
list = list.Where(p => !removes.Contains(p.id)).ToList();
|
||||
// list = list.Where(p => !removes.Contains(p.id)).ToList();
|
||||
// .WhereIF(!string.IsNullOrEmpty(entity.materialid), (a, b, c, d, e) => c.materialid == entity.materialid)
|
||||
// .WhereIF(!string.IsNullOrEmpty(entity.processid), (a, b, c, d, e) => d.processid == entity.processid)
|
||||
// .WhereIF(!string.IsNullOrEmpty(entity.workid), (a, b, c, d, e) => e.workid == entity.workid).ToListAsync();
|
||||
@@ -478,7 +478,7 @@ namespace Tnb.QcMgr
|
||||
RemarkAttribute remark = RemarkAttribute.GetRemark(enumTriggerEvent);
|
||||
string type = DictionaryData.Where(p => p.FullName == remark.CheckType).First().Id;
|
||||
TriggerEvent = _repository.AsSugarClient().Queryable<QcTriggerEvent>().Where(p => p.type == type && p.name == remark.CheckContent).First();
|
||||
Query = Query.Where((a, b, c, d, e) => b.triggertype == "3" && b.content!.Contains(TriggerEvent.id));
|
||||
Query = Query.Where((a, b, c, d, e) => b.triggertype == "3" && b.content!.Contains(TriggerEvent.id) && c.materialid==entity.materialid);
|
||||
}
|
||||
private void Filter(List<QcCheckPlanH> QcCheckPlanHs, TriggerPlanEntity entity)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user