代码无效引用清理,试压包资料界面看板修改

This commit is contained in:
2025-10-10 14:33:21 +08:00
parent 87fb529521
commit 55b798135c
933 changed files with 5897 additions and 7541 deletions
@@ -1,12 +1,10 @@
using BLL;
using NPOI.SS.Util;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.IO;
using System.Linq;
using System.Text;
using System.Web;
namespace FineUIPro.Web.HJGL.WeldingManage
@@ -79,7 +79,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
if (!IsPostBack)
{
this.PipelineId = Request.Params["PipelineId"];
Base_MediumService.InitMediumDropDownList(this.drpMedium, this.CurrUser.LoginProjectId, true);
Base_TestMediumService.InitMediumDropDownList(this.drpTestMedium, "1", true);
@@ -90,7 +90,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
Base_TestMediumService.InitMediumDropDownList(this.drpLeakMedium, "2", true);
Base_PurgeMethodService.InitPurgeMethodDropDownList(this.drpPCMedium, true, "-请选择-");
BLL.Base_MaterialService.InitMaterialDropDownList(this.drpMaterial, true, "请选择");//材质1
Model.Project_Sys_Set pressUnit = BLL.Project_SysSetService.GetSysSetBySetId("8", this.CurrUser.LoginProjectId);
if (pressUnit != null && pressUnit.SetValue == "2")
{
@@ -101,7 +101,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
}
if (!string.IsNullOrEmpty(this.PipelineId))
{
Model.View_HJGL_Pipeline pipeline = BLL.PipelineService.GetViewPipelineByPipelineId(this.PipelineId);
BLL.UnitService.InitUnitDropDownListByUnitIds(this.drpUnit, UnitWorkService.getUnitWorkByUnitWorkId(pipeline.UnitWorkId).UnitId, true);//单位
@@ -110,7 +110,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
this.UnitWorkId = pipeline.UnitWorkId;
this.txtPipelineCode.Text = pipeline.PipelineCode;
//this.txtUnitName.Text = pipeline.UnitName;
drpUnit.SelectedValue=pipeline.UnitId;
drpUnit.SelectedValue = pipeline.UnitId;
this.txtSingleName.Text = pipeline.SingleName;
if (!string.IsNullOrEmpty(pipeline.MediumId))
@@ -190,9 +190,9 @@ namespace FineUIPro.Web.HJGL.WeldingManage
BLL.UnitService.InitUnitDropDownListByUnitIds(this.drpUnit, workArea.UnitId, false);//单位
if (workArea != null)
{
this.ProjectId = workArea.ProjectId;
this.ProjectId = workArea.ProjectId;
//this.InstallationId = workArea.InstallationId;
}
}
}
@@ -77,9 +77,9 @@ namespace FineUIPro.Web.HJGL.WeldingManage
//}
//else
//{
unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList();
unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList();
// }
unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList();
unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList();
// }
if (unitWork1.Count() > 0)
{
@@ -114,9 +114,9 @@ namespace FineUIPro.Web.HJGL.WeldingManage
/// <param name="filename">Excel文件路径名</param>
private void ImportXlsToData(string fileName)
{
try
try
{
string oleDBConnString = String.Empty;
string oleDBConnString = String.Empty;
oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;";
oleDBConnString += "Data Source=";
oleDBConnString += fileName;
@@ -1,11 +1,8 @@
using BLL;
using FineUIPro.Web.ProjectData;
using MiniExcelLibs;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.OleDb;
using System.Data.SqlClient;
using System.IO;
using System.Linq;
@@ -29,18 +29,18 @@ namespace FineUIPro.Web.HJGL.WeldingManage
public static List<HJGL_PipeLineMat> matList = new List<HJGL_PipeLineMat>();
public enum ButtonState { Check=0,Import=1,Save=2}
public enum ButtonState { Check = 0, Import = 1, Save = 2 }
public static int State;
#endregion
#region
/// <summary>
/// 加载页面
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
/// <summary>
/// 加载页面
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
@@ -93,7 +93,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
var table = this.GetPagedDataTable(Grid2, tb);
Grid2.DataSource = table;
Grid2.DataBind();
}
#region
@@ -153,7 +153,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
responeData.message = "导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "列";
return responeData;
}
// DataRow[] dv = pds.Select("主项编号 <>'' and 管线号 <>'' and 材料编码 <>'' and 数量 <>''and 管线划分<>'' ");
// DataRow[] dv = pds.Select("主项编号 <>'' and 管线号 <>'' and 材料编码 <>'' and 数量 <>''and 管线划分<>'' ");
DataRow[] dv = pds.Select(" 管线号 <>'' and 材料编码 <>'' and 数量 <>'' ");
//导入数据库
@@ -168,7 +168,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
string unitworkId = string.Empty;
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()))
{
@@ -176,7 +176,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
if (pipeline.Count() > 0)
{
item.PipelineId = pipeline.First().PipelineId;
PipeArea=pipeline.First().PipeArea;
PipeArea = pipeline.First().PipeArea;
}
else
{
@@ -261,7 +261,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
result.Add((i + 2) + "Line, [数量] 不能为空</br>");
}
if (PipeArea=="1")
if (PipeArea == "1")
{
if (dv[i]["预制组件"] != null && !string.IsNullOrEmpty(dv[i]["预制组件"].ToString()))
{
@@ -315,7 +315,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
}
if (result.Count > 0)
{
{
// result = result.Substring(0, result.LastIndexOf("|"));
errorInfos = string.Join("|", result.Distinct());
//Alert alert = new Alert();
@@ -325,14 +325,14 @@ namespace FineUIPro.Web.HJGL.WeldingManage
responeData.code = 0;
responeData.message = errorInfos;
}
return responeData;
}
private Model.ResponeData AddDatasetToSQL(List<dynamic> pds, int count)
{
Model.ResponeData responeData = new Model.ResponeData();
List<string> result = new List<string>();
if (count < 4)
{
responeData.code = 0;
@@ -373,7 +373,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
{
result.Add((i + 2) + "Line, [管线号] 不能为空</br>");
}
if (pds[i].C != null && !string.IsNullOrEmpty(pds[i].C.ToString()))
{
@@ -421,7 +421,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
if (!item.PrefabricatedComponents.Contains("-")) //预制组件关联的有图纸,图纸名称又是根据组件名称截取的
{
result.Add((i + 2) + "Line, [预制组件] 不合规</br>");
}
}
}
else
{
@@ -434,7 +434,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
matList.Add(item);
}
#endregion
}
@@ -533,7 +533,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
/// <param name="e"></param>
protected void btnImport_Click(object sender, EventArgs e)
{
if (State== (int)ButtonState.Check)
if (State == (int)ButtonState.Check)
{
ShowNotify("请先审核");
return;
@@ -655,12 +655,12 @@ namespace FineUIPro.Web.HJGL.WeldingManage
ShowNotify("请先将错误数据修正,再重新导入提交!", MessageBoxIcon.Warning);
}
}
public void AddHJGL_PipeLineMat(List<HJGL_PipeLineMat> matList)
public void AddHJGL_PipeLineMat(List<HJGL_PipeLineMat> matList)
{
foreach (var item in matList)
{
var pipeLineMat = from x in Funs.DB.HJGL_PipeLineMat where x.MaterialCode == item.MaterialCode && x.PipelineId == item.PipelineId &&x.PrefabricatedComponents==item.PrefabricatedComponents select x;
if (pipeLineMat.Count() == 0|| pipeLineMat==null)
var pipeLineMat = from x in Funs.DB.HJGL_PipeLineMat where x.MaterialCode == item.MaterialCode && x.PipelineId == item.PipelineId && x.PrefabricatedComponents == item.PrefabricatedComponents select x;
if (pipeLineMat.Count() == 0 || pipeLineMat == null)
{
item.PipeLineMatId = SQLHelper.GetNewID(typeof(Model.HJGL_PipeLineMat));
BLL.PipelineMatService.AddPipeLineMat(item);
@@ -673,5 +673,5 @@ namespace FineUIPro.Web.HJGL.WeldingManage
BLL.HJGL_PipelineComponentService.SyncPipelineComponentByMatId(item.PipeLineMatId);
}
}
}
}
}
@@ -70,8 +70,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage
//}
//else
//{
unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList();
unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList();
unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList();
unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList();
//}
if (unitWork1.Count() > 0)
@@ -1,13 +1,10 @@
using Aspose.Words;
using BLL;
using BLL;
using Model;
using NPOI.SS.Formula.Functions;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web.UI.WebControls;
using System.Windows.Forms;
namespace FineUIPro.Web.HJGL.WeldingManage
{
@@ -152,7 +149,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
txtTaskDate.Enabled = false;
var task = (from x in Funs.DB.HJGL_WeldTask
where x.UnitWorkId == UnitWorkId && x.UnitId == unitId
&& x.TaskDate.Value.Date.ToString() == Convert.ToDateTime(txtTaskDate.Text.Trim()).ToString("yyyy-MM-dd") && x.SerialNumber==SerialNumber
&& x.TaskDate.Value.Date.ToString() == Convert.ToDateTime(txtTaskDate.Text.Trim()).ToString("yyyy-MM-dd") && x.SerialNumber == SerialNumber
select x).FirstOrDefault();
if (task != null)
{
@@ -179,7 +176,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
Model.WBS_UnitWork UnitWork = BLL.UnitWorkService.getUnitWorkByUnitWorkId(this.UnitWorkId);
BLL.UnitService.InitUnitDropDownListByUnitIds(this.drpUnit, UnitWork.UnitId, false);//单位
this.txtTaskCode.Text = BLL.WeldTaskService.GetTaskCodeByDate(this.CurrUser.LoginProjectId, this.txtTaskDate.Text, list[0], drpUnit.SelectedValue);
SerialNumber= BLL.WeldTaskService.GetSerialNumberByDate(this.CurrUser.LoginProjectId, this.txtTaskDate.Text, list[0], drpUnit.SelectedValue);
SerialNumber = BLL.WeldTaskService.GetSerialNumberByDate(this.CurrUser.LoginProjectId, this.txtTaskDate.Text, list[0], drpUnit.SelectedValue);
if (!string.IsNullOrEmpty(TaskDate))
{
txtTaskDate.Text = TaskDate;
@@ -701,7 +698,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage
{
e.RowSelectable = false;
};
}
;
}
protected void Grid1_RowCommand(object sender, GridCommandEventArgs e)
@@ -370,11 +370,11 @@ namespace FineUIPro.Web.HJGL.WeldingManage
for (int i = startInt; i <= endInt; i++)
{
if (this.txtWeldJointCode.Text.Trim().Contains(txtPipelineCode.Text+"/Z-"))
if (this.txtWeldJointCode.Text.Trim().Contains(txtPipelineCode.Text + "/Z-"))
{
string number = Convert.ToString(i);
if (number.Length<5)
if (number.Length < 5)
{
int j = 5 - number.Length;
for (int m = 0; m < j; m++)
@@ -1,5 +1,4 @@
using BLL;
using FineUIPro.Web.HSSE.Meeting;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -1,15 +1,10 @@
using Apache.NMS.ActiveMQ.Threads;
using BLL;
using FineUIPro.Web.ProjectData;
using BLL;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Web;
namespace FineUIPro.Web.HJGL.WeldingManage
@@ -245,20 +240,20 @@ namespace FineUIPro.Web.HJGL.WeldingManage
TbPipeline.Hidden = true;
TbUnitWork.Hidden = false;
TbUnitWork2.Hidden = false;
lbUWTotalDin.Text= GetSumDinByUnitWorkId(this.tvControlItem.SelectedNodeID).ToString();
lbUWTotalDin.Text = GetSumDinByUnitWorkId(this.tvControlItem.SelectedNodeID).ToString();
lbUWPreRate.Text = GetRateByUnitWork(this.tvControlItem.SelectedNodeID);
lbUWShopSize.Text = GetShopSumDinByUnitWork(this.tvControlItem.SelectedNodeID).ToString();
lbUWFiledSize.Text = GetFieldSumDinByUnitWork2(this.tvControlItem.SelectedNodeID).ToString();
lbUWSinglePreRateByDin.Text = GetShopRateByUnitWork(this.tvControlItem.SelectedNodeID).ToString();
lbUWShopSizeByLineShop.Text= GetShopSumDinByUnitWork(this.tvControlItem.SelectedNodeID).ToString();
lbUWFiledSizeByLineShop.Text= GetFieldSumDinByUnitWork(this.tvControlItem.SelectedNodeID).ToString();
lbUWShopSizeByLineShop.Text = GetShopSumDinByUnitWork(this.tvControlItem.SelectedNodeID).ToString();
lbUWFiledSizeByLineShop.Text = GetFieldSumDinByUnitWork(this.tvControlItem.SelectedNodeID).ToString();
lbUWSinglePreRateByWeldJoint.Text = GetWeldJointRateByUnitWork(this.tvControlItem.SelectedNodeID).ToString();
lbUWShopSum.Text = GetShopSumByUnitWork(this.tvControlItem.SelectedNodeID).ToString();
lbUWFiledSum.Text = GetFieldSumByUnitWork(this.tvControlItem.SelectedNodeID).ToString();
}
}
}
@@ -413,8 +408,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage
/// <returns></returns>
private string GetRateByPipelineid(string pipelineid)
{
string rate = "";
string rate = "";
var db = Funs.DB;
var q = from x in db.View_HJGL_WeldJoint where x.PipelineId == pipelineid && x.IsTwoJoint == null select x;
if (q != null && q.Count() > 0)
@@ -427,7 +422,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
SizeSum = g.Sum(x => x.Size)
}).FirstOrDefault();
var proSum = (proSumModel != null) ? proSumModel.SizeSum : 0;
var AllSumModel = (from x in q
group x by x.PipelineId into g
select new
@@ -522,7 +517,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
where x.JointAttribute == "安装口"
select x
).Count();
AllNum = shopNum + fieldNum;
if (AllNum > 0)
@@ -549,8 +544,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage
if (q != null && q.Count() > 0)
{
sum = (from x in q
where x.JointAttribute == "预制口"
select x
where x.JointAttribute == "预制口"
select x
).Count();
return sum;
}
@@ -570,14 +565,14 @@ namespace FineUIPro.Web.HJGL.WeldingManage
if (q != null && q.Count() > 0)
{
sum = (from x in q
where x.JointAttribute == "安装口"
select x
where x.JointAttribute == "安装口"
select x
).Count();
return sum;
}
return 0;
}
/// <summary>
///管线总达因(根据管线id获取达因之和)
/// </summary>
@@ -591,7 +586,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
if (q != null && q.Count() > 0)
{
sum = (from x in q
select x.Size
select x.Size
).Sum() ?? 0;
return sum;
}
@@ -615,18 +610,18 @@ namespace FineUIPro.Web.HJGL.WeldingManage
if (q != null && q.Count() > 0)
{
var proSumModel = (from x in q
where x.JointAttribute == "预制口" && x.PipeArea == PipelineService.PipeArea_SHOP
where x.JointAttribute == "预制口" && x.PipeArea == PipelineService.PipeArea_SHOP
group x by x.UnitWorkId into g
select new
{
select new
{
SizeSum = g.Sum(x => x.Size)
}).FirstOrDefault();
var proSum = (proSumModel != null) ? proSumModel.SizeSum : 0;
var AllSumModel = (from x in q
group x by x.UnitWorkId into g
select new
{
group x by x.UnitWorkId into g
select new
{
SizeSum = g.Sum(x => x.Size)
}).FirstOrDefault();
var AllSum = (AllSumModel != null) ? AllSumModel.SizeSum : 0;
@@ -641,7 +636,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
return rate;
}
return "0%";
}
/// <summary>
@@ -657,12 +652,12 @@ namespace FineUIPro.Web.HJGL.WeldingManage
if (q != null && q.Count() > 0)
{
var ShopSum = (from x in q
where x.JointAttribute == "预制口"
group x by x.UnitWorkId into g
select new
{
SizeSum = g.Sum(x => x.Size)
}).FirstOrDefault()?.SizeSum;
where x.JointAttribute == "预制口"
group x by x.UnitWorkId into g
select new
{
SizeSum = g.Sum(x => x.Size)
}).FirstOrDefault()?.SizeSum;
ShopSum = (ShopSum != null) ? ShopSum : 0;
sum = (decimal)ShopSum;
return sum;
@@ -683,12 +678,12 @@ namespace FineUIPro.Web.HJGL.WeldingManage
if (q != null && q.Count() > 0)
{
var FieldSum = (from x in q
where x.JointAttribute == "安装口"
group x by x.UnitWorkId into g
select new
{
SizeSum = g.Sum(x => x.Size)
}).FirstOrDefault()?.SizeSum;
where x.JointAttribute == "安装口"
group x by x.UnitWorkId into g
select new
{
SizeSum = g.Sum(x => x.Size)
}).FirstOrDefault()?.SizeSum;
FieldSum = (FieldSum != null) ? FieldSum : 0;
sum = (decimal)FieldSum;
@@ -697,11 +692,11 @@ namespace FineUIPro.Web.HJGL.WeldingManage
if (q2 != null && q2.Count() > 0)
{
var FieldSum2 = (from x in q2
group x by x.UnitWorkId into g
select new
{
SizeSum = g.Sum(x => x.Size)
}).FirstOrDefault()?.SizeSum;
group x by x.UnitWorkId into g
select new
{
SizeSum = g.Sum(x => x.Size)
}).FirstOrDefault()?.SizeSum;
FieldSum2 = (FieldSum2 != null) ? FieldSum2 : 0;
sum = sum + (decimal)FieldSum2;
}
@@ -721,7 +716,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
int fieldNum = 0;
int AllNum = 0;
var db = Funs.DB;
var q = from x in db.View_HJGL_WeldJoint where x.UnitWorkId == unitworkid && x.IsTwoJoint == null select x;
var q = from x in db.View_HJGL_WeldJoint where x.UnitWorkId == unitworkid && x.IsTwoJoint == null select x;
if (q != null && q.Count() > 0)
{
shopNum = (from x in q
@@ -759,8 +754,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage
if (q != null && q.Count() > 0)
{
sum = (from x in q
where x.JointAttribute == "预制口"
select x
where x.JointAttribute == "预制口"
select x
).Count();
return sum;
}
@@ -779,8 +774,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage
if (q != null && q.Count() > 0)
{
sum = (from x in q
where x.JointAttribute == "安装口"
select x
where x.JointAttribute == "安装口"
select x
).Count();
return sum;
}
@@ -803,12 +798,12 @@ namespace FineUIPro.Web.HJGL.WeldingManage
if (q != null && q.Count() > 0)
{
shopNum = (from x in q
where x.JointAttribute == "预制口"
select x
where x.JointAttribute == "预制口"
select x
).Count();
fieldNum = (from x in q
where x.JointAttribute == "安装口"
select x
where x.JointAttribute == "安装口"
select x
).Count();
AllNum = shopNum + fieldNum;
@@ -838,10 +833,10 @@ namespace FineUIPro.Web.HJGL.WeldingManage
if (q != null && q.Count() > 0)
{
var FieldSum = (from x in q
where x.JointAttribute == "安装口"
group x by x.UnitWorkId into g
select new
{
where x.JointAttribute == "安装口"
group x by x.UnitWorkId into g
select new
{
SizeSum = g.Sum(x => x.Size)
}).FirstOrDefault()?.SizeSum;
FieldSum = (FieldSum != null) ? FieldSum : 0;
@@ -863,11 +858,11 @@ namespace FineUIPro.Web.HJGL.WeldingManage
{
decimal sum = 0;
var db = Funs.DB;
var q = from x in db.View_HJGL_WeldJoint where x.UnitWorkId == unitworkid && x.IsTwoJoint==null select x;
var q = from x in db.View_HJGL_WeldJoint where x.UnitWorkId == unitworkid && x.IsTwoJoint == null select x;
if (q != null && q.Count() > 0)
{
sum = (from x in q
select x.Size
select x.Size
).Sum() ?? 0;
return sum;
}
@@ -14,7 +14,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
public int pageSize = PipelineService.pageSize;
//public Dictionary<string, string> dicSeclectPipeLine = new Dictionary<string, string>();
//public static List<Model.Tw_PipeMatMatchOutput> tw_PipeMatMatchOutputs ;
public static decimal Rate = 0;
public static decimal Rate = 0;
public string WarehouseCode
{
get
@@ -77,7 +77,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
//ctlAuditFlow.Url = BLL.Project_SysSetService.GetAvevaNetUrl(this.CurrUser.LoginProjectId);
if (!IsPostBack)
{
tw_PipeMatMatchOutputs=new List<Model.Tw_PipeMatMatchOutput>();
tw_PipeMatMatchOutputs = new List<Model.Tw_PipeMatMatchOutput>();
PipeArea = Request.Params["PipeArea"];
if (PipeArea == "2")
{
@@ -89,10 +89,10 @@ namespace FineUIPro.Web.HJGL.WeldingManage
}
HJGL_MaterialService.materialStockItems_FIELD = new List<Model.MaterialStockItem>();
HJGL_MaterialService.materialStockItems_SHOP = new List<Model.MaterialStockItem>();
dicSeclectPipeLine=new Dictionary<string, string>();
dicSeclectPipeLine = new Dictionary<string, string>();
var pipeline = (from x in Funs.DB.HJGL_Pipeline
where x.ProjectId == this.CurrUser.LoginProjectId
select x.FlowingSection).Distinct().ToList();
where x.ProjectId == this.CurrUser.LoginProjectId
select x.FlowingSection).Distinct().ToList();
this.drpFlowingSection.DataTextField = "Value";
this.drpFlowingSection.DataValueField = "Value";
this.drpFlowingSection.DataSource = pipeline;
@@ -150,15 +150,15 @@ namespace FineUIPro.Web.HJGL.WeldingManage
//}
//else
//{
unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList();
unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList();
unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList();
unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList();
//}
if (unitWork1.Count() > 0)
{
foreach (var q in unitWork1)
{
int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId && x.PipeArea == PipeArea select x).Count();
var unitNamesUnitIds = BLL.UnitService.getUnitNamesUnitIds(q.UnitId);
TreeNode tn1 = new TreeNode();
@@ -183,7 +183,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
foreach (var q in unitWork2)
{
int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId && x.PipeArea == PipeArea select x).Count();
// var NowComPipelineCode = PipelineService.GetNoComPipelinesByUnitWordId(q.UnitWorkId);
// var NowComPipelineCode = PipelineService.GetNoComPipelinesByUnitWordId(q.UnitWorkId);
//int a = NowComPipelineCode.Count();
var unitNamesUnitIds = BLL.UnitService.getUnitNamesUnitIds(q.UnitId);
TreeNode tn2 = new TreeNode();
@@ -196,9 +196,9 @@ namespace FineUIPro.Web.HJGL.WeldingManage
tn2.ToolTip = "施工单位:" + unitNamesUnitIds;
tn2.CommandName = 1 + "|" + Funs.GetEndPageNumber(a, pageSize);
tn2.EnableExpandEvent = true;
tn2.EnableClickEvent= true;
tn2.EnableClickEvent = true;
tn2.EnableCheckBox = false;
rootNode2.Nodes.Add(tn2);
if (a > 0)
{
@@ -220,15 +220,15 @@ namespace FineUIPro.Web.HJGL.WeldingManage
//}
var CompleteInOutPlanDetail_RelationList = from x in Funs.DB.Tw_InOutPlanDetail_Relation
join y in Funs.DB.Tw_InOutPlanMaster on x.InOutPlanMasterId equals y.Id
where y.State==(int)TwConst.State. && y.WarehouseCode == WarehouseCode
select x;
join y in Funs.DB.Tw_InOutPlanMaster on x.InOutPlanMasterId equals y.Id
where y.State == (int)TwConst.State. && y.WarehouseCode == WarehouseCode
select x;
var pipeline = (from x in Funs.DB.HJGL_Pipeline
join y in CompleteInOutPlanDetail_RelationList on x.PipelineId equals y.PipelineId into temp
from y in temp.DefaultIfEmpty()
where y == null && x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == node.NodeID
&& x.PipelineCode.Contains(this.txtPipelineCode.Text.Trim())
from y in temp.DefaultIfEmpty()
where y == null && x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == node.NodeID
&& x.PipelineCode.Contains(this.txtPipelineCode.Text.Trim())
orderby x.PipelineCode
select x).ToList();
if (!string.IsNullOrEmpty(drpFlowingSection.SelectedValue) && drpFlowingSection.SelectedValue != Const._Null)
@@ -253,10 +253,10 @@ namespace FineUIPro.Web.HJGL.WeldingManage
continue;
}*/
TreeNode newNode = new TreeNode();
newNode.Text = item.PipelineCode ;
newNode.Text = item.PipelineCode;
newNode.NodeID = item.PipelineId;
newNode.CommandName = "管线";
newNode.EnableClickEvent = true;
newNode.EnableClickEvent = true;
node.Nodes.Add(newNode);
}
if (pageindex < pageCount)
@@ -306,7 +306,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
}
else
{
// this.BindGrid();
// this.BindGrid();
}
}
@@ -331,7 +331,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
// 2.获取当前分页数据
Grid1.DataSource = dt;
Grid1.DataBind();
}
}
void BindGrid2()
{
//var result = tw_PipeMatMatchOutputs
@@ -362,16 +362,16 @@ namespace FineUIPro.Web.HJGL.WeldingManage
Rate = Math.Round((decimal)output.Average(item => item.MatchRate) * 100, 2);
lbRate.Text = "匹配率:" + Rate.ToString() + "%";
}*/
var selectList = new List<string>() ;
var selectList = new List<string>();
for (int i = 0; i < Grid2.Rows.Count; i++)
{
var model = Grid2.Rows[i].DataItem as Tw_PipeMatchOutput;
if (model.MatchRate >=1)
if (model.MatchRate >= 1)
{
Grid2.Rows[i].RowCssClass = "green";
selectList.Add(model.PipelineId);
}
else
{
@@ -381,7 +381,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
}
if (cbSelectCom.Checked)
{
Grid2.SelectedRowIDArray= selectList.ToArray();
Grid2.SelectedRowIDArray = selectList.ToArray();
}
}
@@ -430,11 +430,11 @@ namespace FineUIPro.Web.HJGL.WeldingManage
{
var model = Grid1.Rows[i].DataItem as Tw_PipeMatMatchOutput;
if (model?.MatchRate < 1 || model?.MatchRate==null)
if (model?.MatchRate < 1 || model?.MatchRate == null)
{
Grid1.Rows[i].RowCssClass = "red";
}
}
}
@@ -562,10 +562,10 @@ namespace FineUIPro.Web.HJGL.WeldingManage
protected void btnAddPipelineMatchMat_Click(object sender, EventArgs e)
{
var selectNodes= tvControlItem.GetCheckedNodes();
var selectNodes = tvControlItem.GetCheckedNodes();
foreach (var node in selectNodes)
{
if (dicSeclectPipeLine.Where(x => x.Key == node.NodeID).Count() == 0 && node.CommandName== "管线")
{
if (dicSeclectPipeLine.Where(x => x.Key == node.NodeID).Count() == 0 && node.CommandName == "管线")
{
dicSeclectPipeLine.Add(node.NodeID, node.Text);
}
@@ -573,7 +573,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
tw_PipeMatMatchOutputs = TwArrivalStatisticsService.GetPipeMatMatch(this.CurrUser.LoginProjectId, dicSeclectPipeLine.Keys.ToList(), WarehouseCode);
BindGrid3();
BindGrid2();
BindGrid2();
}
protected void btnDeletePipelineMatchMat_Click(object sender, EventArgs e)
@@ -594,31 +594,32 @@ namespace FineUIPro.Web.HJGL.WeldingManage
}
}
protected void btnGenTask_Click(object sender, EventArgs e)
{ if (Grid2.SelectedRowIDArray.Count() > 0)
{
if (Grid2.SelectedRowIDArray.Count() > 0)
{
SaveTask();
ShowNotify("生成任务单成功!", MessageBoxIcon.Warning);
// Alert.Show("生成任务单成功!", MessageBoxIcon.Warning);
Grid1.DataSource = null;
Grid1.DataBind();
Grid2.DataSource = null;
Grid2.DataBind();
Grid3.DataSource = null;
Grid3.DataBind();
// Alert.Show("生成任务单成功!", MessageBoxIcon.Warning);
Grid1.DataSource = null;
Grid1.DataBind();
Grid2.DataSource = null;
Grid2.DataBind();
Grid3.DataSource = null;
Grid3.DataBind();
}
else
{
ShowNotify("请先选择需要发起任单的管线!", MessageBoxIcon.Warning);
}
}
private void SaveTask()
{
var weldingRods = from x in Funs.DB.Base_Consumables where x.ConsumablesType == "2" select x;
var weldingWires = from x in Funs.DB.Base_Consumables where x.ConsumablesType == "1" select x;
var selectRowId = (from x in Funs.DB.View_HJGL_NoWeldJointFind
where Grid2.SelectedRowIDArray.ToList().Contains(x.PipelineId) && x.WeldingDailyId == null &&
x.WeldTaskId == null && x.WeldingMethodCode != null
where Grid2.SelectedRowIDArray.ToList().Contains(x.PipelineId) && x.WeldingDailyId == null &&
x.WeldTaskId == null && x.WeldingMethodCode != null
select x).ToList();
Dictionary<string, string> unitworkTaskCode = new Dictionary<string, string>();
@@ -626,9 +627,9 @@ namespace FineUIPro.Web.HJGL.WeldingManage
Dictionary<int, string> matchPipeline = new Dictionary<int, string>();
foreach (var rowIndex in Grid2.SelectedRowIndexArray)
{
matchPipeline.Add(rowIndex+1, Grid2.Rows[rowIndex].RowID);
matchPipeline.Add(rowIndex + 1, Grid2.Rows[rowIndex].RowID);
}
if (PipeArea=="1") //工厂预制的管线,则只选择预制口
if (PipeArea == "1") //工厂预制的管线,则只选择预制口
{
selectRowId = selectRowId.Where(x => x.JointAttribute == "预制口").ToList();
}
@@ -640,14 +641,14 @@ namespace FineUIPro.Web.HJGL.WeldingManage
NewTask.ProjectId = this.CurrUser.LoginProjectId;
NewTask.UnitWorkId = PipelineService.GetPipelineByPipelineId(weldjoint.PipelineId)?.UnitWorkId;
NewTask.UnitId = this.CurrUser.UnitId;
if (unitworkTaskCode.FirstOrDefault(x=>x.Key== NewTask.UnitWorkId).Value!=null)
if (unitworkTaskCode.FirstOrDefault(x => x.Key == NewTask.UnitWorkId).Value != null)
{
NewTask.TaskCode = unitworkTaskCode.FirstOrDefault(x => x.Key == NewTask.UnitWorkId).Value;
}
else
{
NewTask.TaskCode = BLL.WeldTaskService.GetTaskCodeByDate(this.CurrUser.LoginProjectId, DateTime.Now.Date.ToString("yyyy-MM-dd"), NewTask.UnitWorkId, this.CurrUser.UnitId);
unitworkTaskCode.Add(NewTask.UnitWorkId, NewTask.TaskCode);
unitworkTaskCode.Add(NewTask.UnitWorkId, NewTask.TaskCode);
}
if (unitworkSerialNumber.FirstOrDefault(x => x.Key == NewTask.UnitWorkId).Value != null)
@@ -661,7 +662,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
}
NewTask.WeldTaskId = SQLHelper.GetNewID();
NewTask.WeldJointId = weldjoint.WeldJointId;
NewTask.WeldJointId = weldjoint.WeldJointId;
var oldWeldTask = BLL.WeldTaskService.GetWeldTaskByWeldJointId(NewTask.WeldJointId);
if (oldWeldTask != null)
{
@@ -671,7 +672,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
Model.HJGL_WeldJoint weldJoint = BLL.WeldJointService.GetWeldJointByWeldJointId(NewTask.WeldJointId);
if (weldJoint != null)
{
NewTask.PipeLineSortIndex = matchPipeline.FirstOrDefault(x => x.Value == weldJoint.PipelineId).Key;
NewTask.PipeLineSortIndex = matchPipeline.FirstOrDefault(x => x.Value == weldJoint.PipelineId).Key;
NewTask.WeldingRod = weldJoint.WeldingRod;
NewTask.WeldingWire = weldJoint.WeldingWire;
//获取可替代焊丝焊条
@@ -738,7 +739,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
BLL.WeldJointService.UpdateWeldJoint(weldJoint);
BLL.WeldTaskService.AddWeldTask(NewTask);
}
}
private bool IsCoverClass(string wpsClass, string matClass)
{
@@ -1,13 +1,9 @@
using BLL;
using FastReport.Editor;
using MiniExcelLibs;
using Model;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace FineUIPro.Web.HJGL.WeldingManage
@@ -15,7 +11,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
public partial class WeldMatMatchGet : PageBase
{
public static List <string> pipelinecode=new List<string>();
public static List<string> pipelinecode = new List<string>();
protected void Page_Load(object sender, EventArgs e)
{
@@ -23,11 +19,11 @@ namespace FineUIPro.Web.HJGL.WeldingManage
{
var UnitWorkId = Request.Params["UnitWorkId"];
var PipeArea = Request.Params["PipeArea"];
// txtProgressBar.Text = "20";
// txtProgressBar.Text = "20";
GetStockNum(UnitWorkId, PipeArea);
}
}
public void GetStockNum(string UnitWorkId,string PipeArea)
public void GetStockNum(string UnitWorkId, string PipeArea)
{
var pipeline = (from x in Funs.DB.HJGL_Pipeline
where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == UnitWorkId && x.PipeArea == PipeArea
@@ -52,8 +48,9 @@ namespace FineUIPro.Web.HJGL.WeldingManage
string path = Funs.RootPath + @"File\Excel\Temp\weldMatchGet.xlsx";
path = path.Replace(".xlsx", string.Format("{0:yyyy-MM-dd-HH-mm}", DateTime.Now) + ".xlsx");
var a = (from x in pipelinecode select new { PipelineCode = x }).ToList();
var b=(from x in Funs.DB .HJGL_Pipeline where pipelinecode.Contains(x.PipelineCode)
select new {线=x.PipelineCode ,=x.FlowingSection,="100%",=x.PlanStartDate }).ToList();
var b = (from x in Funs.DB.HJGL_Pipeline
where pipelinecode.Contains(x.PipelineCode)
select new { 线 = x.PipelineCode, = x.FlowingSection, = "100%", = x.PlanStartDate }).ToList();
MiniExcel.SaveAs(path, b);
string fileName = "材料匹配100%管线.xlsx";
@@ -1,6 +1,5 @@
using BLL;
using MiniExcelLibs;
using NPOI.SS.Formula.Functions;
using System;
using System.Collections.Generic;
using System.Data;
@@ -14,7 +13,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
{
protected void Page_Load(object sender, EventArgs e)
{
// ctlAuditFlow.Url = BLL.Project_SysSetService.GetAvevaNetUrl(this.CurrUser.LoginProjectId);
// ctlAuditFlow.Url = BLL.Project_SysSetService.GetAvevaNetUrl(this.CurrUser.LoginProjectId);
if (!IsPostBack)
{
@@ -72,8 +71,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage
//}
//else
//{
unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList();
unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList();
unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList();
unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList();
//}
if (unitWork1.Count() > 0)
{
@@ -124,7 +123,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
foreach (var item in p)
{
TreeNode newNode = new TreeNode();
newNode.Text = item.WeldingDailyCode+"("+BLL.UnitService.getUnitNamesUnitIds(item.UnitId)+")";
newNode.Text = item.WeldingDailyCode + "(" + BLL.UnitService.getUnitNamesUnitIds(item.UnitId) + ")";
newNode.NodeID = item.WeldingDailyId;
newNode.EnableClickEvent = true;
newNode.CommandName = "WeldingDaily";
@@ -212,7 +211,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
var SumDia = tb.AsEnumerable().Sum(x => x.Field<decimal>("Size"));
var WelderCount = tb.AsEnumerable().Select(x => x.Field<string>("CoverWelderCode")).ToList().Distinct().Count();
txtSumSize.Text= SumDia.ToString();
txtSumSize.Text = SumDia.ToString();
txtTeam.Text = WelderCount.ToString();
// 2.获取当前分页数据
//var table = this.GetPagedDataTable(Grid1, tb1);
@@ -534,7 +533,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
case "UnitWork":
value = BLL.WeldingDailyService.GetFileOutValueByUnitWorkId(this.tvControlItem.SelectedNodeID, this.txtMonth.Text.Trim());
var unitWork = BLL.UnitWorkService.getUnitWorkByUnitWorkId(tvControlItem.SelectedNodeID);
filename = "焊接日报-" + unitWork.UnitWorkName+ this.txtMonth.Text.Trim()+ ".xlsx";
filename = "焊接日报-" + unitWork.UnitWorkName + this.txtMonth.Text.Trim() + ".xlsx";
break;
case "WeldingDaily":
value = WeldingDailyService.GetFileOutValueById(this.tvControlItem.SelectedNodeID);
@@ -545,10 +544,10 @@ namespace FineUIPro.Web.HJGL.WeldingManage
}
string path = Funs.RootPath + @"File\Excel\Temp\焊接日报.xlsx";
path = path.Replace(".xlsx", string.Format("{0:yyyy-MM-dd-HH-mm}", DateTime.Now) + ".xlsx");
if (value.Count>0)
if (value.Count > 0)
{
MiniExcel.SaveAs(path, value);
FileInfo info = new FileInfo(path);
long fileSize = info.Length;
System.Web.HttpContext.Current.Response.Clear();
@@ -569,13 +568,13 @@ namespace FineUIPro.Web.HJGL.WeldingManage
protected void btnMenuDeleteDetail_Click(object sender, EventArgs e)
{
if (!string .IsNullOrEmpty(Grid1.SelectedRowID))
if (!string.IsNullOrEmpty(Grid1.SelectedRowID))
{
string errlog= BLL.WeldingDailyService.DeleteWeldingDailyItemByweldJointId(Grid1.SelectedRowID);
if (string.IsNullOrEmpty(errlog) )
string errlog = BLL.WeldingDailyService.DeleteWeldingDailyItemByweldJointId(Grid1.SelectedRowID);
if (string.IsNullOrEmpty(errlog))
{
BindGrid();
ShowNotify("删除明细成功",MessageBoxIcon.Success);
ShowNotify("删除明细成功", MessageBoxIcon.Success);
}
else
{
@@ -583,7 +582,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
}
}
}
}
}
@@ -140,7 +140,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
{
BLL.UnitService.InitUnitByProjectIdUnitTypeDropDownList(this.drpUnit, this.CurrUser.LoginProjectId, BLL.Const.ProjectUnitType_2, true);
BLL.UnitWorkService.InitUnitWorkDropDownList(this.drpUnitWork, this.CurrUser.LoginProjectId, true);
Base_WeldingLocationServie.InitWeldingLocationDropDownList(this.drpWeldingLocationId,true);
Base_WeldingLocationServie.InitWeldingLocationDropDownList(this.drpWeldingLocationId, true);
var report = BLL.WeldingDailyService.GetPipeline_WeldingDailyByWeldingDailyId(this.WeldingDailyId);
if (report != null)
@@ -179,7 +179,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
//txtWeldingDate.MaxDate = DateTime.Now;
this.txtWeldingDate.Text = string.Format("{0:yyyy-MM-dd}", System.DateTime.Now);
this.txtTableDate.Text = string.Format("{0:yyyy-MM-dd}", System.DateTime.Now);
this.txtTableDate.Text = string.Format("{0:yyyy-MM-dd}", System.DateTime.Now);
string perfix = string.Format("{0:yyyyMMdd}", System.DateTime.Now) + "-" + this.CurrUser.PersonName + "-";
this.txtWeldingDailyCode.Text = BLL.SQLHelper.RunProcNewId("SpGetThreeNumber", "dbo.HJGL_WeldingDaily", "WeldingDailyCode", this.CurrUser.LoginProjectId, perfix);
}
@@ -227,7 +227,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
{
var weldJointIds = (from x in list
where x.UnitWorkId == this.UnitWorkId && x.TaskDate.Value.Date <= Convert.ToDateTime(txtWeldingDate.Text)
&& x.WeldingDailyId == null
&& x.WeldingDailyId == null
select x).ToList();
weldJointIds = weldJointIds.GroupBy(x => x.WeldJointId, (key, group) => group.OrderByDescending(x => x.TaskDate).First()).ToList();
task = weldJointIds;
@@ -307,14 +307,14 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
string stateName = string.Empty;
if (PipeArea != null && !string.IsNullOrEmpty(PipeArea.ToString()))
{
string txt = PipelineService.GetPipeArea().FirstOrDefault(x => x.Value == PipeArea.ToString())?.Text;
return txt;
string txt = PipelineService.GetPipeArea().FirstOrDefault(x => x.Value == PipeArea.ToString())?.Text;
return txt;
}
return stateName;
}
#region
@@ -461,7 +461,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
return;
}
if (this.drpUnit.SelectedValue==BLL.Const._Null)
if (this.drpUnit.SelectedValue == BLL.Const._Null)
{
ShowNotify("请选择单位名称!", MessageBoxIcon.Warning);
return;
@@ -867,7 +867,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
newWeldJoint.WeldingDailyCode = this.txtWeldingDailyCode.Text.Trim();
newWeldJoint.CoverWelderId = coverWelderId;
newWeldJoint.BackingWelderId = backingWelderId;
newWeldJoint.CoverWelderTeamGroupId = SitePerson_PersonService.GetSitePersonByProjectIdPersonId(this.CurrUser.LoginProjectId,coverWelderId).TeamGroupId;
newWeldJoint.CoverWelderTeamGroupId = SitePerson_PersonService.GetSitePersonByProjectIdPersonId(this.CurrUser.LoginProjectId, coverWelderId).TeamGroupId;
newWeldJoint.BackingWelderTeamGroupId = SitePerson_PersonService.GetSitePersonByProjectIdPersonId(this.CurrUser.LoginProjectId, backingWelderId).TeamGroupId;
//if (item.WeldingLocationId != Const._Null)
//{
@@ -1002,7 +1002,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
updateWeldJoint.WeldingDailyCode = null;
updateWeldJoint.CoverWelderId = null;
updateWeldJoint.BackingWelderId = null;
updateWeldJoint.CoverWelderTeamGroupId= null;
updateWeldJoint.CoverWelderTeamGroupId = null;
updateWeldJoint.BackingWelderTeamGroupId = null;
BLL.WeldJointService.UpdateWeldJoint(updateWeldJoint);
}
@@ -1,5 +1,4 @@
using BLL;
using FineUIPro.Web.HJGL.HotProcessHard;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
@@ -235,14 +234,14 @@ namespace FineUIPro.Web.HJGL.WeldingManage
where x.UnitWorkId == node.NodeID
&& x.TaskDate < Convert.ToDateTime(this.txtTaskDateMonth.Text.Trim() + "-01").AddMonths(1)
&& x.TaskDate >= Convert.ToDateTime(this.txtTaskDateMonth.Text.Trim() + "-01")
select new { x.TaskDate.Value.Date, x.UnitId,x.SerialNumber }).Distinct().ToList().OrderBy(x => x.SerialNumber);
select new { x.TaskDate.Value.Date, x.UnitId, x.SerialNumber }).Distinct().ToList().OrderBy(x => x.SerialNumber);
if (p.Count() > 0)
{
foreach (var item in p)
{
TreeNode newNode = new TreeNode();
newNode.CommandName = "Date";
newNode.Text = string.Format("{0:yyyy-MM-dd}", item.Date)+"-"+ item.SerialNumber + "(" + BLL.UnitService.getUnitNamesUnitIds(item.UnitId) + ")";
newNode.Text = string.Format("{0:yyyy-MM-dd}", item.Date) + "-" + item.SerialNumber + "(" + BLL.UnitService.getUnitNamesUnitIds(item.UnitId) + ")";
newNode.NodeID = node.NodeID + "|" + item.UnitId + "|" + string.Format("{0:yyyy-MM-dd}", item.Date) + "|" + item.SerialNumber;
newNode.EnableClickEvent = true;
node.Nodes.Add(newNode);
@@ -264,7 +263,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
newNode.CommandName = "Date";
// newNode.Text = string.Format("{0:yyyy-MM-dd}", item.Date) + "(" + BLL.UnitService.getUnitNamesUnitIds(item.UnitId) + ")";
newNode.Text = string.Format("{0:yyyy-MM-dd}", item.Date) + "-" + item.SerialNumber + "(" + BLL.UnitService.getUnitNamesUnitIds(item.UnitId) + ")";
newNode.NodeID = node.NodeID + "|" + item.UnitId + "|" + string.Format("{0:yyyy-MM-dd}", item.Date)+"|"+item.SerialNumber;
newNode.NodeID = node.NodeID + "|" + item.UnitId + "|" + string.Format("{0:yyyy-MM-dd}", item.Date) + "|" + item.SerialNumber;
newNode.EnableClickEvent = true;
node.Nodes.Add(newNode);
}
@@ -282,7 +281,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
{
if (!string.IsNullOrEmpty(this.txtPipelineCode.Text.Trim()))
{
weldingTask = weldingTask.Where(e => e.PipelineCode.Contains(this.txtPipelineCode.Text.Trim())).OrderBy(x=>x.PipeLineSortIndex).ToList();
weldingTask = weldingTask.Where(e => e.PipelineCode.Contains(this.txtPipelineCode.Text.Trim())).OrderBy(x => x.PipeLineSortIndex).ToList();
}
DataTable tb = this.LINQToDataTable(weldingTask);
@@ -619,13 +618,13 @@ namespace FineUIPro.Web.HJGL.WeldingManage
//GetCanWelderDropDownList(GetWeldingTaskList);
}
string unitWorkId = string.Empty, unitId2 = string.Empty; string taskdate = string.Empty;string serialNumber=string.Empty;
string unitWorkId = string.Empty, unitId2 = string.Empty; string taskdate = string.Empty; string serialNumber = string.Empty;
if (tvControlItem.SelectedNodeID.Contains("|"))
{
unitWorkId = tvControlItem.SelectedNodeID.Split('|')[0];
unitId2 = tvControlItem.SelectedNodeID.Split('|')[1];
taskdate = tvControlItem.SelectedNodeID.Split('|')[2];
serialNumber= tvControlItem.SelectedNodeID.Split('|')[3];
serialNumber = tvControlItem.SelectedNodeID.Split('|')[3];
}
else
{
@@ -1223,7 +1222,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
DateTime? taskTime = Funs.GetNewDateTime(tvControlItem.SelectedNodeID.Split('|')[2]);
if (taskTime != null)
{
var pipelines = BLL.WeldTaskService.GetWeldingTaskList(this.CurrUser.LoginProjectId, tvControlItem.SelectedNodeID.Split('|')[0], tvControlItem.SelectedNodeID.Split('|')[1], Convert.ToDateTime(taskTime), this.rbIsAudit.SelectedValue, tvControlItem.SelectedNodeID.Split('|')[3]).OrderBy(z=>z.PipeLineSortIndex).Select(x => x.PipelineId).Distinct().ToList();
var pipelines = BLL.WeldTaskService.GetWeldingTaskList(this.CurrUser.LoginProjectId, tvControlItem.SelectedNodeID.Split('|')[0], tvControlItem.SelectedNodeID.Split('|')[1], Convert.ToDateTime(taskTime), this.rbIsAudit.SelectedValue, tvControlItem.SelectedNodeID.Split('|')[3]).OrderBy(z => z.PipeLineSortIndex).Select(x => x.PipelineId).Distinct().ToList();
if (pipelines.Any())
{
@@ -1304,7 +1303,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
}
}
protected void btnPrintJoint_Click(object sender, EventArgs e)
{
@@ -1326,7 +1325,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
WeldJointId = x.WeldJointId,
Spec = x.Specification,
SortIndex = x.WeldJointCode.Replace(x.PipelineCode + "/", ""),
}).OrderBy(x=> x.pipelineCode).ThenBy(x=> x.SortIndex).ToList();
}).OrderBy(x => x.pipelineCode).ThenBy(x => x.SortIndex).ToList();
var tb = LINQToDataTable(result);
if (tb != null && tb.Rows.Count > 0)
{
@@ -1358,7 +1357,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
if (taskTime != null)
{
var weldTaskList = BLL.WeldTaskService.GetWeldingTaskList(this.CurrUser.LoginProjectId, tvControlItem.SelectedNodeID.Split('|')[0], tvControlItem.SelectedNodeID.Split('|')[1], Convert.ToDateTime(taskTime), this.rbIsAudit.SelectedValue, tvControlItem.SelectedNodeID.Split('|')[3]);
var pipelines = weldTaskList.OrderBy(x=>x.PipeLineSortIndex).Select(x => x.PipelineId).Distinct().ToList();
var pipelines = weldTaskList.OrderBy(x => x.PipeLineSortIndex).Select(x => x.PipelineId).Distinct().ToList();
if (pipelines.Any())
{
@@ -1376,14 +1375,14 @@ namespace FineUIPro.Web.HJGL.WeldingManage
where x.ProjectId == this.CurrUser.LoginProjectId &&
x.UnitWorkId == tvControlItem.SelectedNodeID.Split('|')[0] &&
x.UnitId == tvControlItem.SelectedNodeID.Split('|')[1]
&& x.TaskDate.Value.Date == time.Date && x.AuditMan != null &&
&& x.TaskDate.Value.Date == time.Date && x.AuditMan != null &&
x.Tabler != null
select x).FirstOrDefault();
Model.Tw_PrintMaster printMaster = new Model.Tw_PrintMaster
{
CreateManName = !string.IsNullOrEmpty(weldTask_CreateName?.Tabler) ? BLL.Person_PersonsService.getSignatureUrl(weldTask_CreateName.Tabler) : "",
AuditManName = !string.IsNullOrEmpty(weldTask?.AuditMan) ? BLL.Person_PersonsService.getSignatureUrl(weldTask.AuditMan) : "",
AuditManName = !string.IsNullOrEmpty(weldTask?.AuditMan) ? BLL.Person_PersonsService.getSignatureUrl(weldTask.AuditMan) : "",
};
tw_PrintMasters.Add(printMaster);
DataTable Table1 = LINQToDataTable(tw_PrintMasters);
@@ -1451,7 +1450,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
{
ShowNotify("请选择任务单", MessageBoxIcon.Question);
}
}
}
}
protected void btnPassMaster_OnClick(object sender, EventArgs e)
@@ -1465,9 +1464,9 @@ namespace FineUIPro.Web.HJGL.WeldingManage
{
var time = Convert.ToDateTime(taskTime);
var weldTaskList = (from x in Funs.DB.HJGL_WeldTask
where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == tvControlItem.SelectedNodeID.Split('|')[0] && x.UnitId == tvControlItem.SelectedNodeID.Split('|')[1]
&& x.TaskDate.Value.Date == time.Date
select x).ToList();
where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == tvControlItem.SelectedNodeID.Split('|')[0] && x.UnitId == tvControlItem.SelectedNodeID.Split('|')[1]
&& x.TaskDate.Value.Date == time.Date
select x).ToList();
foreach (var weldTask in weldTaskList)
{
@@ -1482,7 +1481,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
{
ShowNotify("请选择任务单", MessageBoxIcon.Question);
}
}
}
}
protected void btnPassMaster2_OnClick(object sender, EventArgs e)
@@ -1496,9 +1495,9 @@ namespace FineUIPro.Web.HJGL.WeldingManage
{
var time = Convert.ToDateTime(taskTime);
var weldTaskList = (from x in Funs.DB.HJGL_WeldTask
where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == tvControlItem.SelectedNodeID.Split('|')[0] && x.UnitId == tvControlItem.SelectedNodeID.Split('|')[1]
&& x.TaskDate.Value.Date == time.Date
select x).ToList();
where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == tvControlItem.SelectedNodeID.Split('|')[0] && x.UnitId == tvControlItem.SelectedNodeID.Split('|')[1]
&& x.TaskDate.Value.Date == time.Date
select x).ToList();
foreach (var weldTask in weldTaskList)
{
@@ -1513,7 +1512,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
{
ShowNotify("请选择任务单", MessageBoxIcon.Question);
}
}
}
}
}
}
@@ -4,7 +4,6 @@ using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
namespace FineUIPro.Web.HJGL.WeldingManage
{
@@ -530,7 +529,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
}
}
// BindGrid();
// BindGrid();
ShowNotify("该管线焊口已完成自动录入!", MessageBoxIcon.Success);
}
else
@@ -12,7 +12,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
{
public partial class WeldingPlan : PageBase
{
protected void Page_Load(object sender, EventArgs e)
{
ctlAuditFlow.Url = BLL.Project_SysSetService.GetAvevaNetUrl(this.CurrUser.LoginProjectId);
@@ -75,8 +75,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage
//}
//else
//{
unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList();
unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList();
unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList();
unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList();
//}
if (unitWork1.Count() > 0)
@@ -119,7 +119,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
protected void tvControlItem_NodeCommand(object sender, TreeCommandEventArgs e)
{
this.BindGrid();
ctlAuditFlow.BindData();
}
#endregion
@@ -218,7 +218,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
strSql += " AND line.FlowingSection LIKE @FlowingSection";
listStr.Add(new SqlParameter("@FlowingSection", "%" + this.txtFlowingSection.Text.Trim() + "%"));
}
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
@@ -480,7 +480,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
protected void btnUpDateState_Click(object sender, EventArgs e)
{
string unitworkid = this.tvControlItem.SelectedNodeID;
var pipeline=PipelineService.GetPipelinesByUnitWordId(unitworkid);
var pipeline = PipelineService.GetPipelinesByUnitWordId(unitworkid);
foreach (var item in pipeline)
{
BLL.PipelineService.GetStateByPipelineId(item.PipelineId);
@@ -488,6 +488,6 @@ namespace FineUIPro.Web.HJGL.WeldingManage
}
BindGrid();
}
}
}
@@ -3,10 +3,8 @@ using MiniExcelLibs;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.OleDb;
using System.IO;
using System.Linq;
using System.Net.Mail;
namespace FineUIPro.Web.HJGL.WeldingManage
{
@@ -32,10 +30,12 @@ namespace FineUIPro.Web.HJGL.WeldingManage
/// <summary>
/// 1 预制口,2安装口
/// </summary>
public string Type {
get
{
return (string)ViewState["Type"]; }
public string Type
{
get
{
return (string)ViewState["Type"];
}
set
{
ViewState["Type"] = value;
@@ -78,7 +78,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
Pipeline_ComponentList.Clear();
}
errorInfos = string.Empty;
}
}
#endregion
@@ -143,7 +143,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
/// <param name="filename">Excel文件路径名</param>
private void ImportXlsToData(string fileName)
{
// var rows =Funs.LINQToDataTable(MiniExcel.Query(fileName).ToList()) ;
// var rows =Funs.LINQToDataTable(MiniExcel.Query(fileName).ToList()) ;
var rows = MiniExcel.QueryAsDataTable(fileName, useHeaderRow: true);
Model.ResponeData responeData = new Model.ResponeData();
switch (Type)
@@ -155,7 +155,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
responeData = AddDatasetToSQL_FIELD(rows, 12);
break;
}
if (responeData.code==1)
if (responeData.code == 1)
{
ShowNotify("审核完成,请点击导入!", MessageBoxIcon.Success);
}
@@ -167,7 +167,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
Target = Target.Self
};
alert.Show();
// ShowNotify(responeData.message, MessageBoxIcon.Success);
// ShowNotify(responeData.message, MessageBoxIcon.Success);
}
}
@@ -229,9 +229,9 @@ namespace FineUIPro.Web.HJGL.WeldingManage
{
result += "第" + (i + 2).ToString() + "行," + "无效的时间格式" + "|";
}
PipelineList.Add(pipeline);
PipelineList.Add(pipeline);
}
if (!string.IsNullOrEmpty(result))
{
@@ -248,7 +248,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
else
{
errorInfos = string.Empty;
// ShowNotify("审核完成,请点击导入!", MessageBoxIcon.Success);
// ShowNotify("审核完成,请点击导入!", MessageBoxIcon.Success);
}
}
else
@@ -396,7 +396,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
}
break;
}
}
else
{
@@ -430,7 +430,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
{
BLL.HJGL_PipelineComponentService.UpdatePipelineComponent(item);
}
}
}
break;
case BLL.PipelineService.PipeArea_FIELD:
if (PipelineList.Count > 0)