|
|
|
|
@ -782,21 +782,9 @@ namespace FactorySystemBll
|
|
|
|
|
{
|
|
|
|
|
SqlSugarClient db = AppSettingsHelper.GetSqlSugar();
|
|
|
|
|
List<TFS_Material> materialList = null;
|
|
|
|
|
List<int> factoryList = new List<int>();
|
|
|
|
|
if (factory != null)
|
|
|
|
|
{
|
|
|
|
|
if (factory.FType != (int)Constant.FactoryType.单工厂)
|
|
|
|
|
{
|
|
|
|
|
factoryList.Add(factory.FID);
|
|
|
|
|
factoryList.Add(factory.FFactoryID);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
factoryList.Add(factory.FID);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
materialList = db.Queryable<TFS_Material>().Where(m => m.FTestCode == testCode&&string.Join(",", factoryList).Contains(m.FFactoryID.ToString())).ToList();
|
|
|
|
|
materialList = db.Queryable<TFS_Material>().Where(m => m.FTestCode == testCode).ToList();
|
|
|
|
|
List<int> ids = materialList.Select(m => m.FID).ToList();
|
|
|
|
|
//更新配方
|
|
|
|
|
string sql = "";
|
|
|
|
|
@ -815,7 +803,24 @@ namespace FactorySystemBll
|
|
|
|
|
db.Ado.ExecuteCommand(sql);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//List<int> factoryList = new List<int>();
|
|
|
|
|
//if (factory != null)
|
|
|
|
|
//{
|
|
|
|
|
// if (factory.FType != (int)Constant.FactoryType.单工厂)
|
|
|
|
|
// {
|
|
|
|
|
// factoryList.Add(factory.FID);
|
|
|
|
|
// factoryList.Add(factory.FFactoryID);
|
|
|
|
|
// }
|
|
|
|
|
// else
|
|
|
|
|
// {
|
|
|
|
|
// factoryList.Add(factory.FID);
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|