代码无效引用清理,试压包资料界面看板修改
This commit is contained in:
@@ -87,7 +87,7 @@ namespace FineUIPro.Web.HJGL.BaseInfo
|
||||
errorInfos = string.Empty;
|
||||
List<HJGL_MaterialCodeLib> codeLib = new List<HJGL_MaterialCodeLib>();
|
||||
List<HJGL_MaterialCodeLib> codeLib_update = new List<HJGL_MaterialCodeLib>();
|
||||
var materialcodelist =MaterialCodeLibService.GetMaterialCodeLibList();
|
||||
var materialcodelist = MaterialCodeLibService.GetMaterialCodeLibList();
|
||||
if (this.fuAttachUrl.HasFile == false)
|
||||
{
|
||||
ShowNotify("请选择Excel文件!", MessageBoxIcon.Warning);
|
||||
@@ -131,49 +131,49 @@ namespace FineUIPro.Web.HJGL.BaseInfo
|
||||
//}
|
||||
var rows = MiniExcel.Query<MaterialCodeLibDtoIn>(fileName).ToList();
|
||||
rows = rows.Where(x => x.MaterialCode != "" && x.MaterialName != "").ToList();
|
||||
if (rows.Count==0)
|
||||
if (rows.Count == 0)
|
||||
{
|
||||
ShowNotify("没有数据!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
return;
|
||||
}
|
||||
for (int i = 0; i < rows.Count; i++)
|
||||
{
|
||||
HJGL_MaterialCodeLib item = new HJGL_MaterialCodeLib();
|
||||
#region 数据验证和赋值
|
||||
if (rows[i].MaterialCode != null && !string.IsNullOrEmpty(rows[i].MaterialCode))
|
||||
#region 数据验证和赋值
|
||||
if (rows[i].MaterialCode != null && !string.IsNullOrEmpty(rows[i].MaterialCode))
|
||||
{
|
||||
item.MaterialCode = rows[i].MaterialCode;
|
||||
}
|
||||
else
|
||||
{
|
||||
errorInfos += (i + 2) + "Line, [元件编码] 不能为空</br>";
|
||||
}
|
||||
item.MaterialDef = rows[i].MaterialDef;
|
||||
item.MaterialSpec = rows[i].MaterialSpec;
|
||||
// item.MaterialMade = dv[i]["材质"].ToString();
|
||||
item.MaterialUnit = rows[i].MaterialUnit;
|
||||
item.MaterialName = rows[i].MaterialName;
|
||||
//item.PipeGrade = dv[i]["管道等级"].ToString();
|
||||
//item.ProjectId = CurrUser.LoginProjectId;
|
||||
//= SQLHelper.GetNewID(typeof(Model.Editor_CostReport));
|
||||
if (!codeLib.Select(x => x.MaterialCode).Contains(item.MaterialCode))
|
||||
{
|
||||
|
||||
if (materialcodelist.Select(x => x.MaterialCode).Contains(item.MaterialCode))
|
||||
{
|
||||
item.MaterialCode = rows[i].MaterialCode;
|
||||
codeLib_update.Add(item);
|
||||
}
|
||||
else
|
||||
{
|
||||
errorInfos += (i + 2) + "Line, [元件编码] 不能为空</br>";
|
||||
}
|
||||
item.MaterialDef = rows[i].MaterialDef;
|
||||
item.MaterialSpec = rows[i].MaterialSpec;
|
||||
// item.MaterialMade = dv[i]["材质"].ToString();
|
||||
item.MaterialUnit = rows[i].MaterialUnit;
|
||||
item.MaterialName = rows[i].MaterialName;
|
||||
//item.PipeGrade = dv[i]["管道等级"].ToString();
|
||||
//item.ProjectId = CurrUser.LoginProjectId;
|
||||
//= SQLHelper.GetNewID(typeof(Model.Editor_CostReport));
|
||||
if (!codeLib.Select(x => x.MaterialCode).Contains(item.MaterialCode))
|
||||
{
|
||||
|
||||
if (materialcodelist.Select(x => x.MaterialCode).Contains(item.MaterialCode))
|
||||
{
|
||||
codeLib_update.Add(item);
|
||||
}
|
||||
else
|
||||
{
|
||||
codeLib.Add(item);
|
||||
|
||||
}
|
||||
codeLib.Add(item);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
// DataRow[] dv = ds.Tables[0].Select("元件编码 <>'' and 类型 <>''");
|
||||
// DataRow[] dv = ds.Tables[0].Select("元件编码 <>'' and 类型 <>''");
|
||||
//导入数据库
|
||||
//if (dv.Length > 0)
|
||||
//{
|
||||
@@ -200,7 +200,7 @@ namespace FineUIPro.Web.HJGL.BaseInfo
|
||||
// //= SQLHelper.GetNewID(typeof(Model.Editor_CostReport));
|
||||
// if (!codeLib.Select(x => x.MaterialCode).Contains(item.MaterialCode))
|
||||
// {
|
||||
|
||||
|
||||
// if (materialcodelist.Select(x => x.MaterialCode).Contains(item.MaterialCode))
|
||||
// {
|
||||
// codeLib_update.Add(item);
|
||||
@@ -228,25 +228,8 @@ namespace FineUIPro.Web.HJGL.BaseInfo
|
||||
Alert.ShowInTop(errorInfos, MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
codeLib = (from x in codeLib
|
||||
select new HJGL_MaterialCodeLib
|
||||
{
|
||||
MaterialCode=x.MaterialCode,
|
||||
MaterialDef=x.MaterialDef,
|
||||
MaterialSpec=x.MaterialSpec,
|
||||
MaterialUnit=x.MaterialUnit,
|
||||
MaterialName=x.MaterialName,
|
||||
|
||||
}).DistinctBy(temp=> new
|
||||
{
|
||||
temp.MaterialCode,
|
||||
temp.MaterialDef,
|
||||
temp.MaterialSpec,
|
||||
temp.MaterialUnit,
|
||||
temp.MaterialName
|
||||
}).ToList();
|
||||
codeLib_update = (from x in codeLib_update
|
||||
select new HJGL_MaterialCodeLib
|
||||
codeLib = (from x in codeLib
|
||||
select new HJGL_MaterialCodeLib
|
||||
{
|
||||
MaterialCode = x.MaterialCode,
|
||||
MaterialDef = x.MaterialDef,
|
||||
@@ -262,6 +245,23 @@ namespace FineUIPro.Web.HJGL.BaseInfo
|
||||
temp.MaterialUnit,
|
||||
temp.MaterialName
|
||||
}).ToList();
|
||||
codeLib_update = (from x in codeLib_update
|
||||
select new HJGL_MaterialCodeLib
|
||||
{
|
||||
MaterialCode = x.MaterialCode,
|
||||
MaterialDef = x.MaterialDef,
|
||||
MaterialSpec = x.MaterialSpec,
|
||||
MaterialUnit = x.MaterialUnit,
|
||||
MaterialName = x.MaterialName,
|
||||
|
||||
}).DistinctBy(temp => new
|
||||
{
|
||||
temp.MaterialCode,
|
||||
temp.MaterialDef,
|
||||
temp.MaterialSpec,
|
||||
temp.MaterialUnit,
|
||||
temp.MaterialName
|
||||
}).ToList();
|
||||
foreach (var item in codeLib_update)
|
||||
{
|
||||
var mewCostReport = BLL.MaterialCodeLibService.GetMaterialCodeLib(item.MaterialCode);
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
using BLL;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace FineUIPro.Web.HJGL.BaseInfo
|
||||
{
|
||||
@@ -30,7 +25,7 @@ namespace FineUIPro.Web.HJGL.BaseInfo
|
||||
private void BindGrid()
|
||||
{
|
||||
Model.BaseMaterialcolorOutput table = new Model.BaseMaterialcolorOutput();
|
||||
table.ProjectId=this.CurrUser.LoginProjectId;
|
||||
table.ProjectId = this.CurrUser.LoginProjectId;
|
||||
var tb = BLL.BaseMaterialcolorService.GetListByQueryModle(table, Grid1.PageIndex, Grid1.PageSize);
|
||||
Grid1.RecordCount = tb.Total;
|
||||
Grid1.DataSource = tb.Data;
|
||||
|
||||
@@ -4,9 +4,6 @@ using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace FineUIPro.Web.HJGL.BaseInfo
|
||||
{
|
||||
@@ -54,7 +51,7 @@ namespace FineUIPro.Web.HJGL.BaseInfo
|
||||
this.drpSteType.DataSource = BLL.DropListService.HJGL_GetSteTypeList();
|
||||
this.drpSteType.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.drpSteType);
|
||||
BindGrid();
|
||||
BindGrid();
|
||||
this.MaterialColorId = Request.Params["MaterialColorId"];
|
||||
if (!string.IsNullOrEmpty(this.MaterialColorId))
|
||||
{
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace FineUIPro.Web.HJGL.BaseInfo
|
||||
{
|
||||
|
||||
@@ -216,7 +216,7 @@ namespace FineUIPro.Web.HJGL.BaseInfo
|
||||
}
|
||||
else
|
||||
{
|
||||
var code = q.FirstOrDefault(x =>x.MediumCode== col0&& x.MediumName == col1);
|
||||
var code = q.FirstOrDefault(x => x.MediumCode == col0 && x.MediumName == col1);
|
||||
if (code != null)
|
||||
{
|
||||
result += "第" + (i + 2).ToString() + "行," + "此介质代号、名称已经存在" + "|";
|
||||
@@ -418,7 +418,7 @@ namespace FineUIPro.Web.HJGL.BaseInfo
|
||||
for (int i = 0; i < a; i++)
|
||||
{
|
||||
var isExistMediumCode = Funs.DB.Base_Medium.FirstOrDefault(x => (x.MediumId != MediumList[i].MediumId || (MediumList[i].MediumId == null && x.MediumId != null)) && x.MediumCode == MediumList[i].MediumCode && x.ProjectId == this.CurrUser.LoginProjectId);
|
||||
// var isExistMediumName = Funs.DB.Base_Medium.FirstOrDefault(x => (x.MediumId != MediumList[i].MediumId || (MediumList[i].MediumId == null && x.MediumId != null)) && x.MediumName == MediumList[i].MediumName && x.ProjectId == this.CurrUser.LoginProjectId);
|
||||
// var isExistMediumName = Funs.DB.Base_Medium.FirstOrDefault(x => (x.MediumId != MediumList[i].MediumId || (MediumList[i].MediumId == null && x.MediumId != null)) && x.MediumName == MediumList[i].MediumName && x.ProjectId == this.CurrUser.LoginProjectId);
|
||||
if (isExistMediumCode != null)
|
||||
{
|
||||
ShowNotify("存在相同批次的介质代号,请修正后重新提交!", MessageBoxIcon.Warning);
|
||||
|
||||
@@ -226,7 +226,7 @@ namespace FineUIPro.Web.HJGL.BaseInfo
|
||||
private string judgementDelete(string id)
|
||||
{
|
||||
string content = string.Empty;
|
||||
if (Funs.DB.HJGL_WeldJoint.Any(x=>x.WeldingLocationId==id))
|
||||
if (Funs.DB.HJGL_WeldJoint.Any(x => x.WeldingLocationId == id))
|
||||
{
|
||||
content = "焊口已关联此焊接位置";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user