提交代码

This commit is contained in:
高飞 2025-05-26 17:03:43 +08:00
parent d5df13592b
commit b60a408dd5
2 changed files with 23 additions and 21 deletions

View File

@ -73,7 +73,7 @@ namespace FineUIPro.Web.WeldMat.Stock
LEFT JOIN dbo.Sys_User AS Users ON Users.UserId=StockIn.Materialman LEFT JOIN dbo.Sys_User AS Users ON Users.UserId=StockIn.Materialman
LEFT JOIN dbo.Weld_UnitStore store ON store.UnitStoreId = StockIn.UnitStoreId LEFT JOIN dbo.Weld_UnitStore store ON store.UnitStoreId = StockIn.UnitStoreId
LEFT JOIN dbo.Base_Unit unit ON unit.UnitId = store.UnitId LEFT JOIN dbo.Base_Unit unit ON unit.UnitId = store.UnitId
WHERE (StockIn.Amount-ISNULL(StockIn.UsingAmount,0))>=0 "; WHERE (StockIn.Amount-ISNULL(StockIn.UsingAmount,0))>0 ";
List<SqlParameter> listStr = new List<SqlParameter>(); List<SqlParameter> listStr = new List<SqlParameter>();
if (!cbShowAll.Checked) if (!cbShowAll.Checked)
{ {

View File

@ -188,27 +188,29 @@ namespace FineUIPro.Web.WeldMat.UsingPlan
} }
string unitId = string.Empty; string unitId = string.Empty;
if (ds.Tables[0].Rows[i]["使用单位"] != null && !string.IsNullOrEmpty(ds.Tables[0].Rows[i]["使用单位"].ToString())) //if (ds.Tables[0].Rows[i]["使用单位"] != null && !string.IsNullOrEmpty(ds.Tables[0].Rows[i]["使用单位"].ToString()))
{ //{
var unit = from x in Funs.DB.Project_Unit // var unit = from x in Funs.DB.Project_Unit
join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId // join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId
where x.ProjectId == projectId && y.UnitName == ds.Tables[0].Rows[i]["使用单位"].ToString() // where x.ProjectId == projectId && y.UnitName == ds.Tables[0].Rows[i]["使用单位"].ToString()
select x; // select x;
if (unit.Count() > 0) // if (unit.Count() > 0)
{ // {
usingPlan.UsingUnit = unit.First().UnitId; // usingPlan.UsingUnit = this.CurrUser.UnitId;
unitId = unit.First().UnitId; // unitId = this.CurrUser.UnitId;
} // }
else // else
{ // {
errorInfos += (i + 2) + "行, [使用单位] 不存在</br>"; // errorInfos += (i + 2) + "行, [使用单位] 不存在</br>";
} // }
} //}
else //else
{ //{
errorInfos += (i + 2) + "行, [使用单位] 不能为空</br>"; // errorInfos += (i + 2) + "行, [使用单位] 不能为空</br>";
} //}
usingPlan.UsingUnit = this.CurrUser.UnitId;
unitId = this.CurrUser.UnitId;
if (ds.Tables[0].Rows[i]["使用位置"] != null && !string.IsNullOrEmpty(ds.Tables[0].Rows[i]["使用位置"].ToString())) if (ds.Tables[0].Rows[i]["使用位置"] != null && !string.IsNullOrEmpty(ds.Tables[0].Rows[i]["使用位置"].ToString()))
{ {