代码无效引用清理,试压包资料界面看板修改
This commit is contained in:
@@ -3,7 +3,6 @@ using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Linq;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
@@ -106,7 +105,7 @@ namespace BLL
|
||||
/// <param name="projectid"></param>
|
||||
/// <param name="PipeArea"></param>
|
||||
/// <returns></returns>
|
||||
public static DataTable GetSHOPStockDt( string projectid)
|
||||
public static DataTable GetSHOPStockDt(string projectid)
|
||||
{
|
||||
string strSql = @" SELECT mat.MaterialCode,
|
||||
lib.MaterialName,
|
||||
@@ -167,7 +166,7 @@ namespace BLL
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
return tb;
|
||||
}
|
||||
}
|
||||
public static DataTable GetFIELDStockDt(string projectid)
|
||||
{
|
||||
string strSql = @"
|
||||
@@ -240,7 +239,7 @@ namespace BLL
|
||||
/// <param name="PipeArea">管线划分</param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.MaterialStockItem> GetMaterialStockItems(string projectid, string PipeArea)
|
||||
{
|
||||
{
|
||||
List<Model.MaterialStockItem> list = new List<Model.MaterialStockItem>();
|
||||
DataTable dataTable = new DataTable();
|
||||
switch (PipeArea)
|
||||
@@ -252,9 +251,9 @@ namespace BLL
|
||||
dataTable = GetFIELDStockDt(projectid);
|
||||
break;
|
||||
}
|
||||
if (dataTable!=null)
|
||||
if (dataTable != null)
|
||||
{
|
||||
list =Funs.TableToEntity<Model.MaterialStockItem>(dataTable);
|
||||
list = Funs.TableToEntity<Model.MaterialStockItem>(dataTable);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
@@ -262,8 +261,8 @@ namespace BLL
|
||||
{
|
||||
decimal num = 0;
|
||||
|
||||
var list = GetMaterialStockItems(projectid, PipeArea);
|
||||
if (list!=null && list.Count>0)
|
||||
var list = GetMaterialStockItems(projectid, PipeArea);
|
||||
if (list != null && list.Count > 0)
|
||||
{
|
||||
var item = list.Where(x => x.MaterialCode == materialcode).FirstOrDefault();
|
||||
if (item != null)
|
||||
@@ -280,17 +279,17 @@ namespace BLL
|
||||
/// <param name="num"></param>
|
||||
/// <param name="projectid"></param>
|
||||
/// <returns></returns>
|
||||
public static bool isInStockByMaterialCode(string MaterialCode, decimal num,string PipeArea,string projectid)
|
||||
public static bool isInStockByMaterialCode(string MaterialCode, decimal num, string PipeArea, string projectid)
|
||||
{
|
||||
bool state=false;
|
||||
bool state = false;
|
||||
List<Model.MaterialStockItem> list = GetMaterialStockItems(projectid, PipeArea);
|
||||
if (list != null && list.Count > 0)
|
||||
{
|
||||
var Material = list.Where(x => x.MaterialCode == MaterialCode).FirstOrDefault();
|
||||
if (Material!=null)
|
||||
if (Material != null)
|
||||
{
|
||||
var StockNum = Material.MaterialNum;
|
||||
if (num<= StockNum)
|
||||
if (num <= StockNum)
|
||||
{
|
||||
state = true;
|
||||
}
|
||||
@@ -299,7 +298,7 @@ namespace BLL
|
||||
|
||||
}
|
||||
return state;
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// 判断库存是否满足此管线
|
||||
@@ -307,9 +306,9 @@ namespace BLL
|
||||
/// <param name="pipelineid"></param>
|
||||
/// <param name="projectid"></param>
|
||||
/// <returns></returns>
|
||||
public static bool isInStockByPipeline(string pipelineid,string projectid)
|
||||
public static bool isInStockByPipeline(string pipelineid, string projectid)
|
||||
{
|
||||
bool state = true ;
|
||||
bool state = true;
|
||||
try
|
||||
{
|
||||
var q = from x in Funs.DB.HJGL_PipeLineMat
|
||||
@@ -324,7 +323,7 @@ namespace BLL
|
||||
{
|
||||
var pipemodel = BLL.PipelineService.GetPipelineByPipelineId(pipelineid);
|
||||
List<Model.MaterialStockItem> materialStockItems = new List<Model.MaterialStockItem>();
|
||||
if (pipemodel.PipeArea==PipelineService.PipeArea_SHOP)
|
||||
if (pipemodel.PipeArea == PipelineService.PipeArea_SHOP)
|
||||
{
|
||||
if (HJGL_MaterialService.materialStockItems_SHOP.Count == 0)
|
||||
{
|
||||
@@ -334,13 +333,13 @@ namespace BLL
|
||||
}
|
||||
else if (pipemodel.PipeArea == PipelineService.PipeArea_FIELD)
|
||||
{
|
||||
if(HJGL_MaterialService.materialStockItems_FIELD.Count == 0)
|
||||
if (HJGL_MaterialService.materialStockItems_FIELD.Count == 0)
|
||||
{
|
||||
HJGL_MaterialService.materialStockItems_FIELD = GetMaterialStockItems(projectid, pipemodel.PipeArea);
|
||||
}
|
||||
materialStockItems = materialStockItems_FIELD;
|
||||
}
|
||||
|
||||
|
||||
//List<Model.MaterialStockItem> materialStockItems = GetMaterialStockItems(projectid, pipemodel.PipeArea);
|
||||
if (materialStockItems != null && materialStockItems.Count > 0) //判断是否有库存信息
|
||||
{
|
||||
@@ -382,10 +381,10 @@ namespace BLL
|
||||
{
|
||||
|
||||
state = false;
|
||||
ErrLogInfo.WriteLog(ex.ToString ());
|
||||
ErrLogInfo.WriteLog(ex.ToString());
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
return state;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user