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