2022-11-25 焊接材料导入审核结果增加过滤
This commit is contained in:
Binary file not shown.
@@ -172,33 +172,38 @@ namespace FineUIPro.Web.HJGL.DataImport
|
|||||||
|
|
||||||
protected void tvControlItem_TreeNodeExpanded(object sender, TreeNodeEventArgs e)
|
protected void tvControlItem_TreeNodeExpanded(object sender, TreeNodeEventArgs e)
|
||||||
{
|
{
|
||||||
e.Node.Nodes.Clear();
|
if (e.Node.Nodes[0].NodeID == "加载管线...")
|
||||||
if (e.Node.CommandName == "单位工程")
|
|
||||||
{
|
{
|
||||||
var pipeline = (from x in PipelineService.hJGL_Pipelines
|
e.Node.Nodes.Clear();
|
||||||
where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == e.Node.NodeID
|
if (e.Node.CommandName == "单位工程")
|
||||||
&& x.PipelineCode.Contains(this.tvPipeCode.Text.Trim())
|
|
||||||
orderby x.PipelineCode
|
|
||||||
select x).ToList();
|
|
||||||
foreach (var item in pipeline)
|
|
||||||
{
|
{
|
||||||
var jotCount = (from x in WeldJointService.hJGL_WeldJoints where x.PipelineId == item.PipelineId && x.IsTwoJoint == null select x).Count();
|
var pipeline = (from x in PipelineService.hJGL_Pipelines
|
||||||
//var weldJotCount = (from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == item.PipelineId && x.IsTwoJoint == null && x.WeldingDailyId != null select x).Count();
|
where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == e.Node.NodeID
|
||||||
TreeNode newNode = new TreeNode();
|
&& x.PipelineCode.Contains(this.tvPipeCode.Text.Trim())
|
||||||
//if (jotCount > weldJotCount)
|
orderby x.PipelineCode
|
||||||
//{
|
select x).ToList();
|
||||||
// newNode.Text = "<font color='#EE0000'>" + item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】" + "</font>";
|
foreach (var item in pipeline)
|
||||||
//}
|
{
|
||||||
//else
|
var jotCount = (from x in WeldJointService.hJGL_WeldJoints where x.PipelineId == item.PipelineId && x.IsTwoJoint == null select x).Count();
|
||||||
//{
|
//var weldJotCount = (from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == item.PipelineId && x.IsTwoJoint == null && x.WeldingDailyId != null select x).Count();
|
||||||
// newNode.Text = item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】";
|
TreeNode newNode = new TreeNode();
|
||||||
//}
|
//if (jotCount > weldJotCount)
|
||||||
newNode.Text = item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】";
|
//{
|
||||||
newNode.NodeID = item.PipelineId;
|
// newNode.Text = "<font color='#EE0000'>" + item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】" + "</font>";
|
||||||
newNode.EnableClickEvent = true;
|
//}
|
||||||
e.Node.Nodes.Add(newNode);
|
//else
|
||||||
|
//{
|
||||||
|
// newNode.Text = item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】";
|
||||||
|
//}
|
||||||
|
newNode.Text = item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】";
|
||||||
|
newNode.NodeID = item.PipelineId;
|
||||||
|
newNode.EnableClickEvent = true;
|
||||||
|
e.Node.Nodes.Add(newNode);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -215,8 +220,8 @@ namespace FineUIPro.Web.HJGL.DataImport
|
|||||||
if (tvControlItem.SelectedNode.CommandName== "单位工程")
|
if (tvControlItem.SelectedNode.CommandName== "单位工程")
|
||||||
{
|
{
|
||||||
this.hdUnitWorkId.Text=tvControlItem.SelectedNode.NodeID.ToString();
|
this.hdUnitWorkId.Text=tvControlItem.SelectedNode.NodeID.ToString();
|
||||||
this.BindGrid1("", this.hdUnitWorkId.Text);
|
//this.BindGrid1("", this.hdUnitWorkId.Text);
|
||||||
this.BindGrid2("", this.hdUnitWorkId.Text);
|
//this.BindGrid2("", this.hdUnitWorkId.Text);
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -55,7 +55,7 @@
|
|||||||
EnableCollapse="false" runat="server" BoxFlex="1" DataKeyNames="DesignBasisDataImportId"
|
EnableCollapse="false" runat="server" BoxFlex="1" DataKeyNames="DesignBasisDataImportId"
|
||||||
AllowColumnLocking="true" EnableColumnLines="true" DataIDField="DesignBasisDataImportId"
|
AllowColumnLocking="true" EnableColumnLines="true" DataIDField="DesignBasisDataImportId"
|
||||||
AllowSorting="true" SortField="CreateDate" SortDirection="ASC" EnableMultiSelect="false"
|
AllowSorting="true" SortField="CreateDate" SortDirection="ASC" EnableMultiSelect="false"
|
||||||
IsDatabasePaging="false" PageSize="15" >
|
IsDatabasePaging="false" AllowPaging="true" PageSize="300" EnableBigDataRowTip="false" EnableBigData="true">
|
||||||
<Columns>
|
<Columns>
|
||||||
<f:RowNumberField EnablePagingNumber="true" HeaderText="编号"
|
<f:RowNumberField EnablePagingNumber="true" HeaderText="编号"
|
||||||
Width="60px" HeaderTextAlign="Center" TextAlign="Center" />
|
Width="60px" HeaderTextAlign="Center" TextAlign="Center" />
|
||||||
|
|||||||
@@ -141,6 +141,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
private Model.ResponeData AddDatasetToSQL(DataTable pds, int Cols)
|
private Model.ResponeData AddDatasetToSQL(DataTable pds, int Cols)
|
||||||
{
|
{
|
||||||
Model.ResponeData responeData = new Model.ResponeData();
|
Model.ResponeData responeData = new Model.ResponeData();
|
||||||
|
List<string> result = new List<string>();
|
||||||
|
|
||||||
int ic, ir;
|
int ic, ir;
|
||||||
ic = pds.Columns.Count;
|
ic = pds.Columns.Count;
|
||||||
@@ -167,27 +168,10 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
string unitworkId = string.Empty;
|
string unitworkId = string.Empty;
|
||||||
unitworkId = Request.Params["UnitWorkId"];
|
unitworkId = Request.Params["UnitWorkId"];
|
||||||
string PipeArea=string.Empty;//管线划分 1工厂预制 2现场施工
|
string PipeArea=string.Empty;//管线划分 1工厂预制 2现场施工
|
||||||
//if (dv[i]["主项编号"] != null && !string.IsNullOrEmpty(dv[i]["主项编号"].ToString()))
|
|
||||||
//{
|
|
||||||
// var unitWork = from x in Funs.DB.WBS_UnitWork where x.ProjectId == CurrUser.LoginProjectId && x.UnitWorkCode == dv[i]["主项编号"].ToString() && x.ProjectType == "2" select x;
|
|
||||||
// if (unitWork.Count() > 0)
|
|
||||||
// {
|
|
||||||
// unitworkId = unitWork.First().UnitWorkId;
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// errorInfos += (i + 2) + "Line, [主项编号] 不存在</br>";
|
|
||||||
// }
|
|
||||||
|
|
||||||
//}
|
|
||||||
//else
|
|
||||||
//{
|
|
||||||
// errorInfos += (i + 2) + "Line, [主项编号] 不能为空</br>";
|
|
||||||
//}
|
|
||||||
|
|
||||||
if (dv[i]["管线号"] != null && !string.IsNullOrEmpty(dv[i]["管线号"].ToString()))
|
if (dv[i]["管线号"] != null && !string.IsNullOrEmpty(dv[i]["管线号"].ToString()))
|
||||||
{
|
{
|
||||||
var pipeline = from x in Funs.DB.HJGL_Pipeline where x.UnitWorkId == unitworkId && x.PipelineCode == dv[i]["管线号"].ToString() select x;
|
var pipeline = from x in PipelineService.hJGL_Pipelines where x.UnitWorkId == unitworkId && x.PipelineCode == dv[i]["管线号"].ToString().Trim() select x;
|
||||||
if (pipeline.Count() > 0)
|
if (pipeline.Count() > 0)
|
||||||
{
|
{
|
||||||
item.PipelineId = pipeline.First().PipelineId;
|
item.PipelineId = pipeline.First().PipelineId;
|
||||||
@@ -195,13 +179,17 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
errorInfos += (i + 2) + "Line,"+ dv[i]["管线号"].ToString() + " [管线号] 不存在</br>";
|
// errorInfos += (i + 2) + "Line,"+ dv[i]["管线号"].ToString() + " [管线号] 不存在</br>";
|
||||||
|
result.Add("不存在此管线号-" + dv[i]["管线号"].ToString());
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
errorInfos += (i + 2) + "Line, [管线号] 不能为空</br>";
|
//errorInfos += (i + 2) + "Line, [管线号] 不能为空</br>";
|
||||||
|
result.Add((i + 2) + "Line, [管线号] 不能为空</br>");
|
||||||
}
|
}
|
||||||
//if (dv[i]["管线划分"] != null && !string.IsNullOrEmpty(dv[i]["管线划分"].ToString()))
|
//if (dv[i]["管线划分"] != null && !string.IsNullOrEmpty(dv[i]["管线划分"].ToString()))
|
||||||
//{
|
//{
|
||||||
@@ -240,13 +228,16 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
errorInfos += (i + 2) + "Line," + dv[i]["材料编码"].ToString() + " [材料编码] 不存在</br>";
|
//errorInfos += (i + 2) + "Line," + dv[i]["材料编码"].ToString() + " [材料编码] 不存在</br>";
|
||||||
|
result.Add("不存在此材料编码-" + dv[i]["材料编码"].ToString());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
errorInfos += (i + 2) + "Line, [材料编码] 不能为空</br>";
|
//errorInfos += (i + 2) + "Line, [材料编码] 不能为空</br>";
|
||||||
|
result.Add((i + 2) + "Line, [材料编码] 不能为空</br>");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dv[i]["数量"] != null && !string.IsNullOrEmpty(dv[i]["数量"].ToString()))
|
if (dv[i]["数量"] != null && !string.IsNullOrEmpty(dv[i]["数量"].ToString()))
|
||||||
@@ -258,13 +249,15 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
errorInfos += "第" + (i + 2).ToString() + "行," + "数量格式输入有误</br>";
|
//errorInfos += "第" + (i + 2).ToString() + "行," + "数量格式输入有误</br>";
|
||||||
|
result.Add("第" + (i + 2).ToString() + "行," + "数量格式输入有误</br>");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
errorInfos += (i + 2) + "Line, [数量] 不能为空</br>";
|
//errorInfos += (i + 2) + "Line, [数量] 不能为空</br>";
|
||||||
|
result.Add((i + 2) + "Line, [数量] 不能为空</br>");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (PipeArea=="1")
|
if (PipeArea=="1")
|
||||||
@@ -276,7 +269,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
errorInfos += (i + 2) + "Line, [预制组件] 不能为空</br>";
|
result.Add((i + 2) + "Line, [预制组件] 不能为空</br>");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var model = matList.Where(x => x.PipelineId == item.PipelineId && x.MaterialCode == item.MaterialCode && x.PrefabricatedComponents == item.PrefabricatedComponents);
|
var model = matList.Where(x => x.PipelineId == item.PipelineId && x.MaterialCode == item.MaterialCode && x.PrefabricatedComponents == item.PrefabricatedComponents);
|
||||||
@@ -320,12 +313,18 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
responeData.message = "没有数据";
|
responeData.message = "没有数据";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
if (result.Count > 0)
|
||||||
if (!string.IsNullOrEmpty(errorInfos))
|
{
|
||||||
{
|
// result = result.Substring(0, result.LastIndexOf("|"));
|
||||||
|
errorInfos = string.Join("|", result.Distinct());
|
||||||
|
//Alert alert = new Alert();
|
||||||
|
//alert.Message = result;
|
||||||
|
//alert.Target = Target.Self;
|
||||||
|
//alert.Show();
|
||||||
responeData.code = 0;
|
responeData.code = 0;
|
||||||
responeData.message = errorInfos;
|
responeData.message = errorInfos;
|
||||||
}
|
}
|
||||||
|
|
||||||
return responeData;
|
return responeData;
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
Reference in New Issue
Block a user