提交代码
This commit is contained in:
parent
7108e96152
commit
2e1c911889
|
@ -357,22 +357,42 @@ namespace BLL
|
||||||
/// <param name="supTypeId"></param>
|
/// <param name="supTypeId"></param>
|
||||||
/// <param name="checkType">1-checkType;2-专项检查;3-综合检查</param>
|
/// <param name="checkType">1-checkType;2-专项检查;3-综合检查</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static List<Model.ResourcesItem> getCheckItemSetListBySupCheckItemId(string supTypeId, string checkType)
|
public static List<Model.ResourcesItem> getCheckItemSetListBySupCheckItemId(string supTypeId, string checkType,string supName="")
|
||||||
{
|
{
|
||||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||||
{
|
{
|
||||||
var getDataLists = from x in db.Technique_CheckItemSet
|
if (!string.IsNullOrEmpty(supName))
|
||||||
where x.CheckType == checkType && (x.SupCheckItem == supTypeId || (supTypeId == null && x.SupCheckItem == "0"))
|
{
|
||||||
orderby x.SortIndex
|
var getDataLists = from x in db.Technique_CheckItemSet
|
||||||
select new Model.ResourcesItem
|
where x.CheckType == checkType && (x.SupCheckItem == supTypeId || (supTypeId == null && x.SupCheckItem == "0"))
|
||||||
{
|
&& x.CheckItemName.Contains(supName)
|
||||||
ResourcesId = x.CheckItemSetId,
|
orderby x.SortIndex
|
||||||
ResourcesCode = x.MapCode,
|
select new Model.ResourcesItem
|
||||||
ResourcesName = x.CheckItemName,
|
{
|
||||||
SupResourcesId = x.SupCheckItem,
|
ResourcesId = x.CheckItemSetId,
|
||||||
IsEndLever = x.IsEndLever,
|
ResourcesCode = x.MapCode,
|
||||||
};
|
ResourcesName = x.CheckItemName,
|
||||||
return getDataLists.ToList();
|
SupResourcesId = x.SupCheckItem,
|
||||||
|
IsEndLever = x.IsEndLever,
|
||||||
|
};
|
||||||
|
return getDataLists.ToList();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
var getDataLists = from x in db.Technique_CheckItemSet
|
||||||
|
where x.CheckType == checkType && (x.SupCheckItem == supTypeId || (supTypeId == null && x.SupCheckItem == "0"))
|
||||||
|
orderby x.SortIndex
|
||||||
|
select new Model.ResourcesItem
|
||||||
|
{
|
||||||
|
ResourcesId = x.CheckItemSetId,
|
||||||
|
ResourcesCode = x.MapCode,
|
||||||
|
ResourcesName = x.CheckItemName,
|
||||||
|
SupResourcesId = x.SupCheckItem,
|
||||||
|
IsEndLever = x.IsEndLever,
|
||||||
|
};
|
||||||
|
return getDataLists.ToList();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue