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

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
@@ -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 = "焊口已关联此焊接位置";
}
@@ -54,7 +54,7 @@ namespace FineUIPro.Web.HJGL.DataImport
}
public string Save()
public string Save()
{
string result = "";
if (Session["AttachFile.webuploader"] == null)
@@ -85,9 +85,9 @@ namespace FineUIPro.Web.HJGL.DataImport
if (!BLL.HJGL_DataImportService.UploadFileToOa(Funs.RootPath + dataImport.FilePath, dataImport.UnitWorkId, "2"))
{
string str =" "+ dataImport.FileName+"推送失败|";
string str = " " + dataImport.FileName + "推送失败|";
result += str;
}
}
}
@@ -96,8 +96,8 @@ namespace FineUIPro.Web.HJGL.DataImport
}
protected void btnSave_Click(object sender, EventArgs e)
{
string result= Save();
if (result =="")
string result = Save();
if (result == "")
{
ShowNotify("保存成功!", MessageBoxIcon.Success);
}
@@ -1,7 +1,4 @@
using BLL;
using FastReport.Design;
using FineUIPro.Web.HJGL.WeldingManage;
using FineUIPro.Web.ProjectData;
using System;
using System.Collections.Generic;
using System.Data;
@@ -28,7 +25,7 @@ namespace FineUIPro.Web.HJGL.DataImport
//{
// this.GetShowColumn(c.Columns);
//}
}
}
@@ -84,8 +81,8 @@ namespace FineUIPro.Web.HJGL.DataImport
//}
//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();
//}
//var dbpipeLineMat = from x in Funs.DB.HJGL_PipeLineMat select x;
//var DBpipeline = from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId select x;
@@ -94,7 +91,7 @@ namespace FineUIPro.Web.HJGL.DataImport
foreach (var q in unitWork1)
{
string strSql = " SELECT DISTINCT [t0].[PipelineId] FROM [dbo].[HJGL_Pipeline] AS [t0]\r\nleft JOIN [dbo].[HJGL_PipeLineMat] AS [t1] ON [t0].[PipelineId] = [t1].[PipelineId]";
strSql += "where [t0].[UnitWorkId] =@UnitWorkId ";
strSql += "where [t0].[UnitWorkId] =@UnitWorkId ";
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@UnitWorkId", q.UnitWorkId));
@@ -162,7 +159,7 @@ namespace FineUIPro.Web.HJGL.DataImport
SqlParameter[] parameter = listStr.ToArray();
DataTable dt = SQLHelper.GetDataTableRunText(strSql, parameter);
var a =dt.Rows.Count;
var a = dt.Rows.Count;
//var b = (from x in Funs.DB.HJGL_Pipeline
// join y in Funs.DB.HJGL_PipeLineMat on x.PipelineId equals y.PipelineId
@@ -208,7 +205,7 @@ namespace FineUIPro.Web.HJGL.DataImport
#region
private void BindNodes(TreeNode node)
{
BLL.PipelineService.BindTreeNodes(node, this.tvPipeCode.Text.Trim(),txtMaterialCode.Text.Trim(), this.CurrUser.LoginProjectId, pageSize);
BLL.PipelineService.BindTreeNodes(node, this.tvPipeCode.Text.Trim(), txtMaterialCode.Text.Trim(), this.CurrUser.LoginProjectId, pageSize);
}
#endregion
@@ -220,7 +217,7 @@ namespace FineUIPro.Web.HJGL.DataImport
BindNodes(e.Node);
}
}
@@ -244,7 +241,7 @@ namespace FineUIPro.Web.HJGL.DataImport
{
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
{
Model.HJGL_Pipeline pipeline = BLL.PipelineService.GetPipelineByPipelineId(this.tvControlItem.SelectedNodeID);
this.hdUnitWorkId.Text = string.Empty;
if (pipeline != null)
@@ -264,7 +261,7 @@ namespace FineUIPro.Web.HJGL.DataImport
TabStrip1.ActiveTabIndex = 1;
}
}
}
}
@@ -278,7 +275,7 @@ namespace FineUIPro.Web.HJGL.DataImport
/// <summary>
/// 管线数据
/// </summary>
private void BindGrid1(string pipelineId,string unitworkid)
private void BindGrid1(string pipelineId, string unitworkid)
{
string strSql = @" SELECT pipe.PipeLineMatId, lib.MaterialCode,lib.MaterialName,lib.MaterialUnit,
lib.MaterialSpec,lib.MaterialMade,lib.MaterialDef,pipe.Number,pipe.PrefabricatedComponents
@@ -301,7 +298,7 @@ namespace FineUIPro.Web.HJGL.DataImport
if (!string.IsNullOrEmpty(txtMaterialCode2.Text.Trim()))
{
strSql += " and lib.MaterialCode like @MaterialCode ";
listStr.Add(new SqlParameter("@MaterialCode","%"+ txtMaterialCode2.Text.Trim()+"%"));
listStr.Add(new SqlParameter("@MaterialCode", "%" + txtMaterialCode2.Text.Trim() + "%"));
}
strSql += " order by PrefabricatedComponents ";
@@ -389,7 +386,7 @@ namespace FineUIPro.Web.HJGL.DataImport
protected void Grid2_Sort(object sender, GridSortEventArgs e)
{
BindGrid2(this.tvControlItem.SelectedNodeID,this.hdUnitWorkId.Text);
BindGrid2(this.tvControlItem.SelectedNodeID, this.hdUnitWorkId.Text);
}
/// <summary>
/// 排序
@@ -448,7 +445,7 @@ namespace FineUIPro.Web.HJGL.DataImport
ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
}
}
/// <summary>
/// 增加焊口信息
@@ -486,7 +483,7 @@ namespace FineUIPro.Web.HJGL.DataImport
#region
protected void btnDelMatGrid2_Click(object sender, EventArgs e)
{
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, Const.HJGL_WeldJointMenuId, Const.BtnDelete))
@@ -674,7 +671,7 @@ namespace FineUIPro.Web.HJGL.DataImport
protected void Window5_Close(object sender, WindowCloseEventArgs e)
{
// this.BindGrid1(this.tvControlItem.SelectedNodeID);
// this.BindGrid1(this.tvControlItem.SelectedNodeID);
}
/// <summary>
@@ -699,13 +696,13 @@ namespace FineUIPro.Web.HJGL.DataImport
protected void TabStrip1_TabIndexChanged(object sender, EventArgs e)
{
string pipelineid = "";
if (this.tvControlItem.SelectedNode != null&& this.tvControlItem.SelectedNode.CommandName != "单位工程")
if (this.tvControlItem.SelectedNode != null && this.tvControlItem.SelectedNode.CommandName != "单位工程")
{
pipelineid = this.tvControlItem.SelectedNodeID;
}
if (this.TabStrip1.ActiveTabIndex == 0)
{
BindGrid1(pipelineid, this.hdUnitWorkId.Text);
}
@@ -1,9 +1,6 @@
using BLL;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
namespace FineUIPro.Web.HJGL.DataImport
{
@@ -43,7 +40,7 @@ namespace FineUIPro.Web.HJGL.DataImport
var table = this.GetPagedDataTable(Grid1, tb);
Grid1.DataSource = table;
Grid1.DataBind();
}
/// <summary>
@@ -149,7 +149,7 @@ namespace FineUIPro.Web.HJGL.DataImport
strSql += " AND Import.FileName LIKE @FileName";
listStr.Add(new SqlParameter("@FileName", "%" + this.txtfilename.Text.Trim() + "%"));
}
if (DropImportType.SelectedValue !=Const._Null)
if (DropImportType.SelectedValue != Const._Null)
{
strSql += " AND Import.ImportType=@ImportType";
listStr.Add(new SqlParameter("@ImportType", DropImportType.SelectedValue));
@@ -104,7 +104,7 @@ namespace FineUIPro.Web.HJGL.DataImport
ShowNotify(result, MessageBoxIcon.Warning);
}
// PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
// PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
}
@@ -90,8 +90,8 @@ namespace FineUIPro.Web.HJGL.HotProcessHard
//}
//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();
//}
var TrustItemList = (from x in Funs.DB.HJGL_Hard_TrustItem
join y in Funs.DB.HJGL_Hard_Trust on x.HardTrustID equals y.HardTrustID
@@ -123,8 +123,8 @@ namespace FineUIPro.Web.HJGL.HotProcessHard
//}
//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();
//}
var ReportList = (from x in Funs.DB.HJGL_HotProess_Report
join y in Funs.DB.HJGL_HotProess_TrustItem on x.HotProessTrustItemId equals y.HotProessTrustItemId
@@ -92,8 +92,8 @@ namespace FineUIPro.Web.HJGL.HotProcessHard
//}
//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();
//}
var TrustItemList = (from x in Funs.DB.HJGL_HotProess_TrustItem
join y in Funs.DB.HJGL_HotProess_Trust on x.HotProessTrustId equals y.HotProessTrustId
@@ -125,8 +125,8 @@ namespace FineUIPro.Web.HJGL.HotProcessHard
//}
//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();
//}
var WeldJointList = (from x in Funs.DB.HJGL_WeldJoint
join y in Funs.DB.HJGL_Pipeline on x.PipelineId equals y.PipelineId
@@ -608,8 +608,8 @@ namespace FineUIPro.Web.HJGL.HotProcessHard
{
string varValue = string.Empty;
var projectName = BLL.ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId);
// var installation = BLL.Project_InstallationService.GetInstallationByInstallationId(hotProessTrust.InstallationId);
var PworkArea = Funs.DB.WBS_UnitWork .FirstOrDefault(x => x.UnitWorkId == hotProessTrust.UnitWorkId);
// var installation = BLL.Project_InstallationService.GetInstallationByInstallationId(hotProessTrust.InstallationId);
var PworkArea = Funs.DB.WBS_UnitWork.FirstOrDefault(x => x.UnitWorkId == hotProessTrust.UnitWorkId);
if (PworkArea != null)
{
//var cel = recordSheet.GetRow(3).CreateCell(1);
@@ -2,7 +2,6 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Drawing;
using System.Linq;
namespace FineUIPro.Web.HJGL.HotProcessHard
@@ -85,7 +84,7 @@ namespace FineUIPro.Web.HJGL.HotProcessHard
}
public int pageSize = 20;
public List<TreeNode> TreeNodes=new List<TreeNode>();
public List<TreeNode> TreeNodes = new List<TreeNode>();
#endregion
#region
@@ -139,8 +138,8 @@ namespace FineUIPro.Web.HJGL.HotProcessHard
x.PipelineCode,
jointcount = (from y in Funs.DB.HJGL_WeldJoint where y.PipelineId == x.PipelineId && y.IsHotProess == true select y).Count(),
Trustcount = (from z in Funs.DB.HJGL_HotProess_TrustItem join m in Funs.DB.HJGL_WeldJoint on z.WeldJointId equals m.WeldJointId where m.PipelineId == x.PipelineId select z).Count(),
}).ToList().Where(x=>x.jointcount>x.Trustcount).OrderBy(x=>x.PipelineCode);
if (q.Count()>0)
}).ToList().Where(x => x.jointcount > x.Trustcount).OrderBy(x => x.PipelineCode);
if (q.Count() > 0)
{
foreach (var item in q)
{
@@ -185,7 +184,7 @@ namespace FineUIPro.Web.HJGL.HotProcessHard
// newNode.Text = "加载管线...";
// newNode.NodeID = "加载管线...";
// rootNode.Nodes.Add(newNode);
// }
//}
}
@@ -1,17 +1,12 @@
using BLL;
using FineUIPro.Web.HJGL.WeldingManage;
using MiniExcelLibs;
using Model;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Web;
using AspNet = System.Web.UI.WebControls;
namespace FineUIPro.Web.HJGL.InfoQuery
@@ -295,7 +290,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery
model.UnitWorkId = this.tvControlItem.SelectedNodeID;
model.WeldJointCode = this.txtWeldJointCode.Text;
var list = BLL.WeldJointService.GetDataBymodel(model, Grid1.PageIndex, Grid1.PageSize);
Grid1.RecordCount = list.Total;
Grid1.RecordCount = list.Total;
Grid1.DataSource = list.Data;
Grid1.DataBind();
}
@@ -308,7 +303,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery
var table = list.Skip(Grid1.PageSize * (Grid1.PageIndex)).Take(Grid1.PageSize).ToList();
Grid1.DataSource = table;
Grid1.DataBind();
}
}
}
private void get3DParmeter_weldjoint(List<View_HJGL_WeldJoint> model)
@@ -492,7 +487,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery
else if (this.tvControlItem.SelectedNode.CommandName == "管线")
{
fileName = PipelineService.GetPipelineByPipelineId(this.tvControlItem.SelectedNodeID)?.PipelineCode;
}
}
string path = Funs.RootPath + @"File\Excel\Temp\JointQuery.xlsx";
path = path.Replace(".xlsx", string.Format("{0:yyyy-MM-dd-HH-mm}", DateTime.Now) + ".xlsx");
@@ -519,7 +514,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery
= x.JointAttribute,
= x.WeldingDate,
= x.BackingWelderCode,
=x.BackingWelderTeamGroupName,
= x.BackingWelderTeamGroupName,
= x.CoverWelderCode,
= x.CoverWelderTeamGroupName,
= x.HotProessReportNo,
@@ -528,13 +523,13 @@ namespace FineUIPro.Web.HJGL.InfoQuery
= x.HardResult,
= x.TrustBatchCode,
= x.NDECode,
=x.DetectionTypeCode,
=x.DetectionRateCode
= x.DetectionTypeCode,
= x.DetectionRateCode
}).ToList();
MiniExcel.SaveAs(path, q);
fileName = fileName+ "-焊口信息总览.xlsx";
fileName = fileName + "-焊口信息总览.xlsx";
FileInfo info = new FileInfo(path);
long fileSize = info.Length;
System.Web.HttpContext.Current.Response.Clear();
@@ -564,7 +559,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery
ProjectId = this.CurrUser.LoginProjectId,
UnitWorkId = unitWorkId
};
// 生成唯一文件路径(带GUID哈希值)
string path = $@"{Funs.RootPath}File\Excel\Temp\JointQuery_{Guid.NewGuid().GetHashCode():x}.xlsx";
var AllData = new List<object>();
@@ -613,15 +608,15 @@ namespace FineUIPro.Web.HJGL.InfoQuery
= x.DetectionRateCode
}).ToList();
AllData.AddRange(currentChunk);
// 内存清理 & 翻页操作
currentChunk = null;
pageIndex++;
pageIndex++;
GC.Collect(GC.MaxGeneration, GCCollectionMode.Optimized, blocking: true);
}
MiniExcel.SaveAs(path, AllData );
MiniExcel.SaveAs(path, AllData);
}
string fileName = "焊口信息总览.xlsx";
@@ -633,7 +628,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery
System.Web.HttpContext.Current.Response.AddHeader("Content-Length", fileSize.ToString());
System.Web.HttpContext.Current.Response.TransmitFile(path, 0, fileSize);
System.Web.HttpContext.Current.Response.Flush();
System.Web.HttpContext.Current.Response.Close();
System.Web.HttpContext.Current.Response.Close();
File.Delete(path); // 多保险清理机制
}
@@ -4,7 +4,6 @@ using Model;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.IO;
using System.Linq;
@@ -23,7 +22,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery
ViewState["Completed_pipeline"] = value;
}
}
public static List<Model.View_HJGL_Pipeline> View_HJGL_Pipeline=new List<Model.View_HJGL_Pipeline>();
public static List<Model.View_HJGL_Pipeline> View_HJGL_Pipeline = new List<Model.View_HJGL_Pipeline>();
//public string Incomplete_pipeline
//{
// get
@@ -93,8 +92,8 @@ namespace FineUIPro.Web.HJGL.InfoQuery
//}
//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)
@@ -137,7 +136,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery
protected void tvControlItem_NodeCommand(object sender, TreeCommandEventArgs e)
{
this.BindGrid();
}
#endregion
@@ -148,34 +147,34 @@ namespace FineUIPro.Web.HJGL.InfoQuery
/// </summary>
private void BindGrid()
{
// string strSql = @"SELECT ProjectId,UnitWorkId,PipelineId,PipelineCode,UnitName,MediumCode,MediumName,PipingClassCode,UnitWorkCode,SingleName,
// TestPressure,SingleNumber,DetectionRateCode,DetectionType,Remark,TestMediumCode,TotalDin,FinishSize,
// JointCount,PressurePipingClassCode,PipeLenth,DesignPress,DesignTemperature,LeakPressure,VacuumPressure,
// LeakMediumName,PCMediumName,MaterialCode,FinishedDate,
//(CASE WHEN IsFinished=1 THEN '已完成' ELSE '未完成' END) AS IsFinished
// FROM dbo.View_HJGL_Pipeline
// WHERE ProjectId= @ProjectId";
// List<SqlParameter> listStr = new List<SqlParameter>();
// listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
// string strSql = @"SELECT ProjectId,UnitWorkId,PipelineId,PipelineCode,UnitName,MediumCode,MediumName,PipingClassCode,UnitWorkCode,SingleName,
// TestPressure,SingleNumber,DetectionRateCode,DetectionType,Remark,TestMediumCode,TotalDin,FinishSize,
// JointCount,PressurePipingClassCode,PipeLenth,DesignPress,DesignTemperature,LeakPressure,VacuumPressure,
// LeakMediumName,PCMediumName,MaterialCode,FinishedDate,
//(CASE WHEN IsFinished=1 THEN '已完成' ELSE '未完成' END) AS IsFinished
// FROM dbo.View_HJGL_Pipeline
// WHERE ProjectId= @ProjectId";
// List<SqlParameter> listStr = new List<SqlParameter>();
// listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
// strSql += " AND UnitWorkId =@UnitWorkId";
// listStr.Add(new SqlParameter("@UnitWorkId", this.tvControlItem.SelectedNodeID));
// if (!string.IsNullOrEmpty(this.txtPipelineCode.Text.Trim()))
// {
// strSql += " AND PipelineCode LIKE @PipelineCode";
// listStr.Add(new SqlParameter("@PipelineCode", "%" + this.txtPipelineCode.Text.Trim() + "%"));
// }
// if (drpIsFinish.SelectedValue == "1")
// {
// strSql += " AND pipe.IsFinished = 1";
// }
// if (drpIsFinish.SelectedValue == "0")
// {
// strSql += " AND (pipe.IsFinished IS NULL OR pipe.IsFinished = 0)";
// }
// strSql += " AND UnitWorkId =@UnitWorkId";
// listStr.Add(new SqlParameter("@UnitWorkId", this.tvControlItem.SelectedNodeID));
// if (!string.IsNullOrEmpty(this.txtPipelineCode.Text.Trim()))
// {
// strSql += " AND PipelineCode LIKE @PipelineCode";
// listStr.Add(new SqlParameter("@PipelineCode", "%" + this.txtPipelineCode.Text.Trim() + "%"));
// }
// if (drpIsFinish.SelectedValue == "1")
// {
// strSql += " AND pipe.IsFinished = 1";
// }
// if (drpIsFinish.SelectedValue == "0")
// {
// strSql += " AND (pipe.IsFinished IS NULL OR pipe.IsFinished = 0)";
// }
// SqlParameter[] parameter = listStr.ToArray();
// DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
// SqlParameter[] parameter = listStr.ToArray();
// DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
Model.View_HJGL_Pipeline view_HJGL_Pipeline = new Model.View_HJGL_Pipeline();
view_HJGL_Pipeline.ProjectId = this.CurrUser.LoginProjectId;
view_HJGL_Pipeline.UnitWorkId = this.tvControlItem.SelectedNodeID;
@@ -184,7 +183,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery
if (drpIsFinish.SelectedValue == "1")
{
view_HJGL_Pipeline.IsFinished = true;
}
}
if (drpIsFinish.SelectedValue == "0")
{
view_HJGL_Pipeline.IsFinished = false;
@@ -202,7 +201,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery
}
#endregion
private void get3DParmeter_pipeline(List<View_HJGL_Pipeline> view_HJGL_Pipelines )
private void get3DParmeter_pipeline(List<View_HJGL_Pipeline> view_HJGL_Pipelines)
{
if (view_HJGL_Pipelines.Any())
{
@@ -228,7 +227,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery
// }
// Incomplete_pipeline = string.Join(",", Incomplete_pipelineList);
//}
}
}
@@ -311,32 +310,32 @@ namespace FineUIPro.Web.HJGL.InfoQuery
select new
{
线 = x.PipelineCode,
= x.IsFinished,
=x.FinishedDate,
=x.FinishSize,
=x.FinishJointCount,
=x.TotalDin,
=x.JointCount,
=x.ShopJointCount,
= x.IsFinished,
= x.FinishedDate,
= x.FinishSize,
= x.FinishJointCount,
= x.TotalDin,
= x.JointCount,
= x.ShopJointCount,
线 = x.PipeAreaStr,
=x.DetectionTypeCode,
=x.DetectionRateCode,
=x.MediumName,
=x.PipingClassCode,
=x.SingleName,
线=x.SingleNumber,
=x.DesignPress,
=x.DesignTemperature,
=x.TestMediumCode,
=x.TestPressure,
=x.PressurePipingClassCode,
线= x.PipeLenth,
= x.LeakMediumName,
=x.LeakPressure,
=x.PCMediumName,
=x.VacuumPressure,
=x.MaterialCode,
=x.Remark
= x.DetectionTypeCode,
= x.DetectionRateCode,
= x.MediumName,
= x.PipingClassCode,
= x.SingleName,
线 = x.SingleNumber,
= x.DesignPress,
= x.DesignTemperature,
= x.TestMediumCode,
= x.TestPressure,
= x.PressurePipingClassCode,
线 = x.PipeLenth,
= x.LeakMediumName,
= x.LeakPressure,
= x.PCMediumName,
= x.VacuumPressure,
= x.MaterialCode,
= x.Remark
}).ToList();
MiniExcel.SaveAs(path, q);
@@ -438,18 +437,18 @@ namespace FineUIPro.Web.HJGL.InfoQuery
string IsFinishedValue = "未完成";
if (IsFinished != null)
{
if (IsFinished.ToString()=="True")
if (IsFinished.ToString() == "True")
{
IsFinishedValue = "已完成";
}
}
return IsFinishedValue;
return IsFinishedValue;
}
protected void btnGetChart_Click(object sender, EventArgs e)
{
decimal PipelineComplete = 0;
decimal PipelineNoComplete=0;
decimal PipelineNoComplete = 0;
if (!string.IsNullOrEmpty(tvControlItem.SelectedNodeID))
{
var allline = (from x in Funs.DB.HJGL_Pipeline where x.UnitWorkId == tvControlItem.SelectedNodeID select x).ToList().Count();
@@ -473,8 +472,8 @@ namespace FineUIPro.Web.HJGL.InfoQuery
return;
}
var SingleName = (from x in Funs.DB.View_HJGL_Pipeline where x.PipelineId == id select (x.SingleName)).FirstOrDefault();
var filemodel= BLL.HJGL_DataImportService.GetLatestFileByFileName(SingleName,"0", this.CurrUser.LoginProjectId);
if (filemodel!=null)
var filemodel = BLL.HJGL_DataImportService.GetLatestFileByFileName(SingleName, "0", this.CurrUser.LoginProjectId);
if (filemodel != null)
{
string httpUrl = filemodel.FilePath;
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("~/AttachFile/Look.aspx?fileUrl={0}", httpUrl, "查看 -")));
@@ -485,14 +484,14 @@ namespace FineUIPro.Web.HJGL.InfoQuery
ShowNotify("请上传相关ISO轴测图", MessageBoxIcon.Warning);
return;
}
}
protected void Grid1_RowClick(object sender, GridRowClickEventArgs e)
{
var q = PipelineService.GetPipelineByPipelineId(Grid1.SelectedRowID);
var pipecode ="/"+ q.PipelineCode;
var pipecode = "/" + q.PipelineCode;
Model.Parameter3D parameter3D = new Model.Parameter3D();
Model.ColorModel colorModel = new Model.ColorModel();
colorModel = BLL.Project_SysSetService.GetColorModel(this.CurrUser.LoginProjectId);
@@ -109,9 +109,9 @@ namespace FineUIPro.Web.HJGL.LeakVacuum
//}
//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)
{
@@ -107,8 +107,8 @@ namespace FineUIPro.Web.HJGL.LeakVacuum
//}
//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)
@@ -107,9 +107,9 @@ namespace FineUIPro.Web.HJGL.LeakVacuum
//}
//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)
{
@@ -91,8 +91,8 @@ namespace FineUIPro.Web.HJGL.LeakVacuum
//}
//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,5 +1,4 @@
using Aspose.Words.Lists;
using BLL;
using BLL;
using MiniExcelLibs;
using Model;
using NPOI.SS.Util;
@@ -45,7 +44,7 @@ namespace FineUIPro.Web.HJGL.NDT
public static string DataClassification = "NDTBatch";
public static List<HJGL_Batch_NDE> ndes = new List<HJGL_Batch_NDE>();
public static List<HJGL_Batch_NDEItem> ndeItems= new List<HJGL_Batch_NDEItem>();
public static List<HJGL_Batch_NDEItem> ndeItems = new List<HJGL_Batch_NDEItem>();
public enum ButtonState { Check = 0, Import = 1, Save = 2 }
@@ -102,7 +101,7 @@ namespace FineUIPro.Web.HJGL.NDT
if (!string.IsNullOrEmpty(this.TrustBatchId))
{
var trustBatch = BLL.Batch_BatchTrustService.GetBatchTrustById(this.TrustBatchId);
if (trustBatch!=null)
if (trustBatch != null)
{
if (!string.IsNullOrEmpty(trustBatch.UnitWorkId))
{
@@ -153,7 +152,7 @@ namespace FineUIPro.Web.HJGL.NDT
var batchTrustItemLists = (from x in Funs.DB.View_Batch_BatchTrustItem
where x.TrustBatchId == TrustBatchId
select x);
select x);
if (batchTrustItemLists != null)
{
newUrl = uploadfilepath.Replace("管道焊口检测结果通知单导入模板", "管道焊口检测结果通知单(" + DateTime.Now.ToString("yyyyMMdd") + ")");
@@ -204,7 +203,7 @@ namespace FineUIPro.Web.HJGL.NDT
SetCellDropdownList(sheet, 6, 6, new List<string>() { "合格", "不合格" }.ToArray());//是否合格
SetCellDropdownList(sheet, 7, 7, new List<string>() { "", "Ⅱ", "Ⅲ", "Ⅳ", "" }.ToArray());//评定级别
var defects = from x in Funs.DB.Base_Defect select x.DefectName;//缺陷
SetCellDropdownList(sheet, 8, 8, new List<string>() { string.Join(",", defects.ToList())}.ToArray());
SetCellDropdownList(sheet, 8, 8, new List<string>() { string.Join(",", defects.ToList()) }.ToArray());
//添加数据
cell = row.CreateCell(7);
@@ -252,7 +251,7 @@ namespace FineUIPro.Web.HJGL.NDT
if (!string.IsNullOrEmpty(batchTrustItemLists.FirstOrDefault().GrooveTypeCode))
{
cell.SetCellValue(batchTrustItemLists.FirstOrDefault().GrooveTypeCode);//坡口形式
}
}
cell = row5.CreateCell(7);
cell.CellStyle = cellStyle;
@@ -615,7 +614,7 @@ namespace FineUIPro.Web.HJGL.NDT
Response.Flush();
Response.Close();
File.Delete(newUrl);
}
}
}
}
@@ -667,7 +666,7 @@ namespace FineUIPro.Web.HJGL.NDT
responeData.message = "导入Excel格式错误!Excel只有" + count.ToString().Trim() + "列";
return responeData;
}
if (pds.Count-2 > 0 && pds != null)
if (pds.Count - 2 > 0 && pds != null)
{
string NDEId = string.Empty;
//string unitworkId = string.Empty;
@@ -1049,25 +1048,25 @@ namespace FineUIPro.Web.HJGL.NDT
//}
//else //补充导入
//{
AddNDE(ndes);
AddNDEItem(ndeItems);
AddNDE(ndes);
AddNDEItem(ndeItems);
//Model.HJGL_DesignBasisDataImport hJGL_DesignBasisDataImport = new Model.HJGL_DesignBasisDataImport();
//hJGL_DesignBasisDataImport.DesignBasisDataImportId = SQLHelper.GetNewID();
//hJGL_DesignBasisDataImport.ProjectId = this.CurrUser.LoginProjectId;
//hJGL_DesignBasisDataImport.UnitWorkId = unitworkId;
//hJGL_DesignBasisDataImport.ImportType = "0";
//hJGL_DesignBasisDataImport.DataClassification = DataClassification;
//hJGL_DesignBasisDataImport.FileName = FileName;
//hJGL_DesignBasisDataImport.FilePath = filePath.Replace(rootPath, ""); ;
//hJGL_DesignBasisDataImport.FileType = BLL.HJGL_DesignBasisDataImportService.GetFileType(FileName);
//hJGL_DesignBasisDataImport.Version = BLL.HJGL_DesignBasisDataImportService.GetNowVersionByUnitWorkId(unitworkId, DataClassification);
//hJGL_DesignBasisDataImport.Remark = txtRemark.Text;
//hJGL_DesignBasisDataImport.CreateMan = this.CurrUser.PersonId;
//hJGL_DesignBasisDataImport.CreateDate = DateTime.Now.ToString("yyyy-MM-dd HH-mm-ss");
//BLL.HJGL_DesignBasisDataImportService.AddHJGL_DesignBasisDataImport(hJGL_DesignBasisDataImport);
//Model.HJGL_DesignBasisDataImport hJGL_DesignBasisDataImport = new Model.HJGL_DesignBasisDataImport();
//hJGL_DesignBasisDataImport.DesignBasisDataImportId = SQLHelper.GetNewID();
//hJGL_DesignBasisDataImport.ProjectId = this.CurrUser.LoginProjectId;
//hJGL_DesignBasisDataImport.UnitWorkId = unitworkId;
//hJGL_DesignBasisDataImport.ImportType = "0";
//hJGL_DesignBasisDataImport.DataClassification = DataClassification;
//hJGL_DesignBasisDataImport.FileName = FileName;
//hJGL_DesignBasisDataImport.FilePath = filePath.Replace(rootPath, ""); ;
//hJGL_DesignBasisDataImport.FileType = BLL.HJGL_DesignBasisDataImportService.GetFileType(FileName);
//hJGL_DesignBasisDataImport.Version = BLL.HJGL_DesignBasisDataImportService.GetNowVersionByUnitWorkId(unitworkId, DataClassification);
//hJGL_DesignBasisDataImport.Remark = txtRemark.Text;
//hJGL_DesignBasisDataImport.CreateMan = this.CurrUser.PersonId;
//hJGL_DesignBasisDataImport.CreateDate = DateTime.Now.ToString("yyyy-MM-dd HH-mm-ss");
//BLL.HJGL_DesignBasisDataImportService.AddHJGL_DesignBasisDataImport(hJGL_DesignBasisDataImport);
//BLL.HJGL_DesignBasisDataImportVerSionLogService.UpdateVersion(this.CurrUser.LoginProjectId, unitworkId, (decimal)hJGL_DesignBasisDataImport.Version, DataClassification);
//BLL.HJGL_DesignBasisDataImportVerSionLogService.UpdateVersion(this.CurrUser.LoginProjectId, unitworkId, (decimal)hJGL_DesignBasisDataImport.Version, DataClassification);
//}
ShowNotify("导入成功!", MessageBoxIcon.Success);
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
@@ -1091,7 +1090,7 @@ namespace FineUIPro.Web.HJGL.NDT
//更新委托中的检测状态
var trustBatch = BLL.Batch_BatchTrustService.GetBatchTrustById(item.TrustBatchId);
if (trustBatch!=null)
if (trustBatch != null)
{
trustBatch.IsCheck = true;
BLL.Batch_BatchTrustService.UpdatTrustBatchtState(item.TrustBatchId, trustBatch.IsCheck);
@@ -1112,8 +1111,8 @@ namespace FineUIPro.Web.HJGL.NDT
//var ndeItem = from x in Funs.DB.HJGL_Batch_NDEItem where x.TrustBatchItemId==item.TrustBatchItemId select x;
//if (ndeItem.Count() == 0 || ndeItem == null)
//{
//item.NDEItemID = SQLHelper.GetNewID(typeof(Model.HJGL_Batch_NDEItem));
BLL.Batch_NDEItemService.AddNDEItem(item);
//item.NDEItemID = SQLHelper.GetNewID(typeof(Model.HJGL_Batch_NDEItem));
BLL.Batch_NDEItemService.AddNDEItem(item);
//}
//else
//{
@@ -1130,7 +1129,7 @@ namespace FineUIPro.Web.HJGL.NDT
if (trustBatchItemId != null)
{
var trustBatchItem = (from x in Funs.DB.View_Batch_BatchTrustItem where x.TrustBatchItemId == trustBatchItemId.ToString() select x).FirstOrDefault();
if (trustBatchItem!=null)
if (trustBatchItem != null)
{
pipelineCode = trustBatchItem.PipelineCode;
}
@@ -1170,7 +1169,7 @@ namespace FineUIPro.Web.HJGL.NDT
string result = string.Empty;
if (CheckResult != null)
{
if (CheckResult.ToString()=="1")
if (CheckResult.ToString() == "1")
{
result = "合格";
}
@@ -110,7 +110,7 @@ namespace FineUIPro.Web.HJGL.PersonManage
rootNode.Text = item.UnitName;
rootNode.EnableClickEvent = true;
this.tvControlItem.Nodes.Add(rootNode);
var getCheckers = (from x in Funs.DB.SitePerson_Person where x.ProjectId == this.CurrUser.LoginProjectId && x.WorkPostId == Const.WorkPost_Checker && x.UnitId == item.UnitId && x.WelderCode.Contains(txtQueryWelderCode.Text.Trim()) select x).ToList();
var getCheckers = (from x in Funs.DB.SitePerson_Person where x.ProjectId == this.CurrUser.LoginProjectId && x.WorkPostId == Const.WorkPost_Checker && x.UnitId == item.UnitId && x.WelderCode.Contains(txtQueryWelderCode.Text.Trim()) select x).ToList();
foreach (var sitem in getCheckers)
{
TreeNode tn = new TreeNode();
@@ -1,5 +1,4 @@
using BLL;
using Model;
using System;
using System.Collections.Generic;
using System.Data;
@@ -36,7 +36,7 @@ namespace FineUIPro.Web.HJGL.PointTrust
needYZJointNum = needJointNum - needAZJointNum;
}
this.lbDef.Text = "预制口:" + pointJoints.Count(x => x.JointAttribute == "预制口").ToString() + "个,安装口:" + pointJoints.Count(x => x.JointAttribute == "安装口").ToString() + "个。";
this.lbNeedDef.Text = "预制口:" + (needYZJointNum - pointJoints.Count(x => x.JointAttribute == "预制口")).ToString() + "个,安装口:" + (needAZJointNum- pointJoints.Count(x => x.JointAttribute == "安装口")).ToString() + "个。";
this.lbNeedDef.Text = "预制口:" + (needYZJointNum - pointJoints.Count(x => x.JointAttribute == "预制口")).ToString() + "个,安装口:" + (needAZJointNum - pointJoints.Count(x => x.JointAttribute == "安装口")).ToString() + "个。";
BindGrid();
}
}
@@ -1,5 +1,4 @@
using BLL;
using FineUIPro.Web.HJGL.HotProcessHard;
using System;
using System.Collections.Generic;
using System.Data;
@@ -1036,7 +1035,7 @@ namespace FineUIPro.Web.HJGL.PointTrust
var lists = this.Grid1.SelectedRowIDArray;
if (lists.Count() > 0)
{
if (lbIsTrust.Text=="未委托")
if (lbIsTrust.Text == "未委托")
{
Alert.ShowInTop("未委托,无需退回!", MessageBoxIcon.Warning);
return;
@@ -1065,14 +1064,14 @@ namespace FineUIPro.Web.HJGL.PointTrust
db.SubmitChanges();
}
var pointBatch = BLL.PointBatchService.GetPointBatchById(pointBatchItem.PointBatchId);
if (pointBatch!=null)
if (pointBatch != null)
{
pointBatch.IsClosed = null;
db.SubmitChanges();
}
}
}
//var trustItemList = BLL.Batch_BatchTrustItemService.GetBatchTrustItemByTrustBatchId(trustBatchId);
//if (trustItemList.Count == 0)
//{
@@ -28,7 +28,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
if (!IsPostBack)
{
this.ProjectId = this.CurrUser.LoginProjectId;
BLL.UnitService.GetALLUnit(this.drpUnit, true);
BLL.UnitService.GetALLUnit(this.drpUnit, true);
BLL.MainItemService.InitMainItemDownList(drpMainItem, this.ProjectId, true);
btnNew.OnClientClick = Window1.GetShowReference("MaterialManageEdit.aspx") + "return false;";
GetButtonPower();
@@ -111,7 +111,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
}
else
{
var oldView = Funs.DB.HJGL_MaterialManage.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.UnitId== Material.UnitId && x.ArrivalDate == Material.ArrivalDate
var oldView = Funs.DB.HJGL_MaterialManage.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.UnitId == Material.UnitId && x.ArrivalDate == Material.ArrivalDate
&& x.MaterialName == Material.MaterialName && x.SpecificationAndModel == Material.SpecificationAndModel);
if (oldView == null)
{
@@ -5,8 +5,6 @@ using System.Data;
using System.Data.OleDb;
using System.IO;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace FineUIPro.Web.HJGL.PreDesign
@@ -161,13 +159,13 @@ namespace FineUIPro.Web.HJGL.PreDesign
var oldViewInfos = from x in Funs.DB.HJGL_MaterialManage
join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId
where x.ProjectId == this.CurrUser.LoginProjectId
select new { x.ProjectId,y.UnitName,x.MaterialName,x.SpecificationAndModel,x.ArrivalDate};
select new { x.ProjectId, y.UnitName, x.MaterialName, x.SpecificationAndModel, x.ArrivalDate };
var units = from x in Funs.DB.Base_Unit
select x;
var mainItems = from x in Funs.DB.ProjectData_MainItem where x.ProjectId == this.CurrUser.LoginProjectId select x;
for (int i = 0; i < ir; i++)
{
var oldViewInfo = oldViewInfos.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.UnitName== pds.Rows[i][1].ToString()
var oldViewInfo = oldViewInfos.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.UnitName == pds.Rows[i][1].ToString()
&& x.MaterialName == pds.Rows[i][3].ToString() && x.SpecificationAndModel == pds.Rows[i][4].ToString() && x.ArrivalDate == Funs.GetNewDateTime(pds.Rows[i][10].ToString()));
if (oldViewInfo == null)
{
@@ -1,5 +1,4 @@
using BLL;
using System;
using System;
namespace FineUIPro.Web.HJGL.PreDesign
{
@@ -2,7 +2,6 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.IO;
using System.Linq;
using System.Text;
@@ -32,7 +31,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
/// 绑定数据
/// </summary>
private void BindGrid()
{
{
var list = BLL.HJGLPackagingmanageService.GetPackagingManageList(this.CurrUser.LoginProjectId, this.txtPackagingCode.Text.Trim(), this.Grid1.PageIndex, this.Grid1.PageSize);
Grid1.RecordCount = list.Total;
Grid1.DataSource = list.Data;
@@ -326,6 +325,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
Dictionary<string, string> keyValuePairs = new Dictionary<string, string>();
keyValuePairs.Add("ProjectName", ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId));
keyValuePairs.Add("PackagingCode", model.PackagingCode);
keyValuePairs.Add("Remark", model.Remark);
keyValuePairs.Add("PlanStartDate", PlanStartDate);
keyValuePairs.Add("StackingPosition", model.StackingPosition);
keyValuePairs.Add("ContactName", model.ContactName + "| " + model.ContactPhone);
@@ -1,12 +1,7 @@
using BLL;
using Model;
using Newtonsoft.Json.Linq;
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.PreDesign
{
@@ -14,11 +9,11 @@ namespace FineUIPro.Web.HJGL.PreDesign
{
public string PackagingManageId
{
get
{
get
{
return (string)ViewState["PackagingManageId"];
}
set
set
{
ViewState["PackagingManageId"] = value;
}
@@ -34,7 +29,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
drpTypeInt.DataValueField = "Value";
drpTypeInt.DataSource = HJGLPackagingmanageService.TypeIntMap;
drpTypeInt.DataBind();
btnClose.OnClientClick = ActiveWindow.GetHideReference();
if (!string.IsNullOrEmpty(PackagingManageId))
@@ -43,16 +38,16 @@ namespace FineUIPro.Web.HJGL.PreDesign
drpTypeInt.Enabled = false;
txtPackagingCode.Text = model.PackagingCode;
dropPipelineComponentCode.Values = model.PipelineComponentId?.Split(',');
txtStackingPosition.Text = model.StackingPosition;
txtStackingPosition.Text = model.StackingPosition;
drpTrainNumber.SelectedValue = model.TrainNumberId;
drpTypeInt.SelectedValue = model.TypeInt.ToString();
if (model.State== HJGLPackagingmanageService.state_0)
if (model.State == HJGLPackagingmanageService.state_0)
{
btnSave.Hidden = false;
}
}
else
{
{
drpTypeInt.Enabled = true;
btnSave.Hidden = false;
txtPackagingCode.Text = HJGLPackagingmanageService.GetNewPackagingCode(this.CurrUser.LoginProjectId);
@@ -66,17 +61,17 @@ namespace FineUIPro.Web.HJGL.PreDesign
{
Grid1.DataSource = HJGL_PipelineComponentService.GetAcceptedPipelineComponent(CurrUser.LoginProjectId,
txtpipelineCode.Text.Trim(), txtpipelineComponentCode.Text.Trim(), txtflowingSection.Text.Trim());
Grid1 .DataBind();
Grid1.DataBind();
}
private void BindGrid2(string PackagingManageId)
{
{
Grid2.DataSource = HJGLPackagingmanagedetailService.GetPackagingData(PackagingManageId);
Grid2.DataBind();
}
}
protected void btnSave_Click(object sender, EventArgs e)
{
{
Save();
ShowNotify("保存成功!", MessageBoxIcon.Success);
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
@@ -105,7 +100,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
}
BLL.HJGLPackagingmanageService.AddHJGL_PackagingManage(table);
PackagingManageId= table.PackagingManageId;
PackagingManageId = table.PackagingManageId;
}
else
{
@@ -120,11 +115,11 @@ namespace FineUIPro.Web.HJGL.PreDesign
//table.ContactPhone =txtContactPhone.Text;
table.TrainNumberId = drpTrainNumber.SelectedValue;
table.TypeInt = int.Parse(drpTypeInt.SelectedValue);
if (drpTypeInt.SelectedValue ==((int)HJGLPackagingmanageService.TypeInt.).ToString())
if (drpTypeInt.SelectedValue == ((int)HJGLPackagingmanageService.TypeInt.).ToString())
{
table.PipelineComponentId = string.Join(",", dropPipelineComponentCode.Values);
var newDetailList= new List<Model.HJGL_PackagingManageDetail>();
var newDetailList = new List<Model.HJGL_PackagingManageDetail>();
foreach (var item in dropPipelineComponentCode.Values)
{
var ComponentModel = BLL.HJGL_PipelineComponentService.GetPipelineComponentById(item);
@@ -135,11 +130,11 @@ namespace FineUIPro.Web.HJGL.PreDesign
Id = SQLHelper.GetNewID(),
PackagingManageId = this.PackagingManageId,
PipelineId = ComponentModel.PipelineId,
PipelineComponentId = item,
PipelineComponentId = item,
CreateTime = DateTime.Now,
CreateUser = this.CurrUser.PersonId,
};
newDetailList.Add(model);
newDetailList.Add(model);
}
}
HJGLPackagingmanagedetailService.DeleteByPackagingManageId(this.PackagingManageId);
@@ -203,20 +198,20 @@ namespace FineUIPro.Web.HJGL.PreDesign
{
if (drpTypeInt.SelectedValue == ((int)HJGLPackagingmanageService.TypeInt.).ToString())
{
dropPipelineComponentCode.Hidden=false;
Grid2.Hidden=true;
dropPipelineComponentCode.Hidden = false;
Grid2.Hidden = true;
BindGrid();
}
else
else
{
dropPipelineComponentCode.Hidden = true;
Grid2.Hidden = false;
btnSelect.Hidden = false;
//btnSelectStock.Hidden = true;
BindGrid2(this.PackagingManageId);
BindGrid2(this.PackagingManageId);
}
}
protected void Grid2_RowCommand(object sender, GridCommandEventArgs e)
{
@@ -104,7 +104,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
List<Model.WBS_UnitWork> unitWork2 = null;
unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList();
if (unitWork2.Count() > 0)
{
@@ -164,8 +164,8 @@ namespace FineUIPro.Web.HJGL.PreDesign
else
{
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
{
{
this.BindGrid(this.tvControlItem.SelectedNodeID);
}
@@ -184,16 +184,16 @@ namespace FineUIPro.Web.HJGL.PreDesign
{
DataRowView row = e.DataItem as DataRowView;
string id = e.RowID;
if (Funs.DB.HJGL_PackagingManageDetail.Any(x=>x.TwOutputDetailId==id))
if (Funs.DB.HJGL_PackagingManageDetail.Any(x => x.TwOutputDetailId == id))
{
e.RowSelectable = false;
e.RowSelectable = false;
}
;
}
private void BindGrid(string outputMasterId)
{
////var Prelist = HJGL_PipelineComponentService.GetPipelinePrefabricatedComponent(unitworkid, pipelineId);
////var inoutplandetail = (from x in Funs.DB.HJGL_PackagingManageDetail
//// where x.PipelineId == pipelineId
//// && (x.PipelineComponentId == null || x.PipelineComponentId == "")
@@ -1,16 +1,11 @@
using BLL;
using Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using static System.Windows.Forms.VisualStyles.VisualStyleElement.StartPanel;
namespace FineUIPro.Web.HJGL.PreDesign
{
public partial class PackagingManageSelectStock : PageBase
public partial class PackagingManageSelectStock : PageBase
{
public string PackagingManageId
{
@@ -38,15 +33,15 @@ namespace FineUIPro.Web.HJGL.PreDesign
/// 绑定数据
/// </summary>
private void BindGrid()
{
{
Model.Tw_MaterialStockOutput table = new Model.Tw_MaterialStockOutput();
table.PipeLineMatCode = txtMatCode.Text.Trim();
table.WarehouseCode = "工厂预制";
table.ProjectId = this.CurrUser.LoginProjectId;
table.ProjectId = this.CurrUser.LoginProjectId;
var tb = BLL.TwMaterialstockService.GetTw_MaterialStockByModle(table);
var inoutplandetail = (from x in Funs.DB.HJGL_PackagingManageDetail
where x.PackagingManageId == PackagingManageId
where x.PackagingManageId == PackagingManageId
select x).ToList();
var queryList = tb;
// 优化 Linq 过滤条件,过滤已经进入包装的预制散件
@@ -55,7 +50,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
from y in yy.DefaultIfEmpty()
where y == null
select x).ToList();
Grid1.RecordCount = result.Count;
Grid1.RecordCount = result.Count;
Grid1.DataSource = result;
Grid1.DataBind();
}
@@ -84,11 +79,11 @@ namespace FineUIPro.Web.HJGL.PreDesign
{
foreach (var id in List_Id)
{
var StockModel = TwMaterialstockService.GetTw_MaterialStockById(id);
var StockModel = TwMaterialstockService.GetTw_MaterialStockById(id);
var model = new Model.HJGL_PackagingManageDetail()
{
Id = SQLHelper.GetNewID(),
PackagingManageId = this.PackagingManageId,
PackagingManageId = this.PackagingManageId,
MaterialCode = StockModel.PipeLineMatCode,
Number = 0,
CreateTime = DateTime.Now,
@@ -98,7 +93,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
}
}
}
#endregion
#region GV
@@ -1,13 +1,6 @@
using BLL;
using Model;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.IO;
using System.Linq;
using System.Text;
using AspNet = System.Web.UI.WebControls;
namespace FineUIPro.Web.HJGL.PreDesign
{
public partial class PackagingManageView : PageBase
@@ -47,39 +40,39 @@ namespace FineUIPro.Web.HJGL.PreDesign
{
var pack = HJGLPackagingmanageService.GetHJGL_PackagingManageById(PackagingManageId);
if (pack == null) return;
var detailList= HJGLPackagingmanageService.GetPackagingDetailById(PackagingManageId);
var detailList = HJGLPackagingmanageService.GetPackagingDetailById(PackagingManageId);
Grid1.RecordCount = detailList.Count();
Grid1.DataSource = detailList;
Grid1.DataBind();
/* if (pack.TypeInt == (int)HJGL_PackagingmanageService.TypeInt.)
{
DataTable tb = BLL.HJGL_PackagingmanageService.GetPackagingDetailById(PackagingManageId);
/* if (pack.TypeInt == (int)HJGL_PackagingmanageService.TypeInt.)
{
DataTable tb = BLL.HJGL_PackagingmanageService.GetPackagingDetailById(PackagingManageId);
Grid1.RecordCount = tb.Rows.Count;
tb = GetFilteredTable(Grid1.FilteredData, tb);
var table = this.GetPagedDataTable(Grid1, tb);
Grid1.DataSource = table;
Grid1.DataBind();
}
else
{
var result = HJGLPackagingmanagedetailService.GetPackagingData(PackagingManageId).ToList();
var detailList = from x in result
select new
{
PipelineComponentId = x.Id,
PipelineComponentCode = x.MaterialCode,
num = x.Number,
CU = x.MaterialUnit,
UnitWorkName = x.UnitWorkId == null ? "" : UnitWorkService.GetNameById(x.UnitWorkId),
x.FlowingSection,
};
Grid1.RecordCount = detailList.Count();
Grid1.DataSource = detailList;
Grid1.DataBind();
}*/
Grid1.RecordCount = tb.Rows.Count;
tb = GetFilteredTable(Grid1.FilteredData, tb);
var table = this.GetPagedDataTable(Grid1, tb);
Grid1.DataSource = table;
Grid1.DataBind();
}
else
{
var result = HJGLPackagingmanagedetailService.GetPackagingData(PackagingManageId).ToList();
var detailList = from x in result
select new
{
PipelineComponentId = x.Id,
PipelineComponentCode = x.MaterialCode,
num = x.Number,
CU = x.MaterialUnit,
UnitWorkName = x.UnitWorkId == null ? "" : UnitWorkService.GetNameById(x.UnitWorkId),
x.FlowingSection,
};
Grid1.RecordCount = detailList.Count();
Grid1.DataSource = detailList;
Grid1.DataBind();
}*/
}
#endregion
@@ -1,18 +1,15 @@
using BLL;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Web.UI.DataVisualization.Charting;
namespace FineUIPro.Web.HJGL.PreDesign
{
public partial class PipelingDivide : PageBase
{
public static List<Model.HJGL_Pipeline> view_HJGL_Pipelines =new List<Model.HJGL_Pipeline>();
public static List<Model.HJGL_Pipeline> view_HJGL_Pipelines = new List<Model.HJGL_Pipeline>();
public decimal PipelineComplete
{
get
@@ -35,11 +32,11 @@ namespace FineUIPro.Web.HJGL.PreDesign
ViewState["PipelineNOComplete"] = value;
}
}
public string Line_No
public string Line_No
{
get
{
return (string)ViewState["Line_No"];
return (string)ViewState["Line_No"];
}
set
{
@@ -48,11 +45,11 @@ namespace FineUIPro.Web.HJGL.PreDesign
}
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)
{
// this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
// this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
this.InitTreeMenu();//加载树
PipelineComplete = 0;
PipelineNOComplete = 0;
@@ -110,8 +107,8 @@ namespace FineUIPro.Web.HJGL.PreDesign
//}
//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)
@@ -154,27 +151,27 @@ namespace FineUIPro.Web.HJGL.PreDesign
protected void tvControlItem_NodeCommand(object sender, TreeCommandEventArgs e)
{
this.BindGrid();
// var q = view_HJGL_Pipelines.Where(x => x.PipeArea == PipelineService.PipeArea_SHOP);
// if (q.Any())
// {
// List<string> listpipecode = new List<string>();
// foreach (var item in q)
// {
// listpipecode.Add("/" + item.PipelineCode);
// }
// Line_No = string.Join(",", listpipecode);
// }
// Model.Parameter3D parameter3D = new Model.Parameter3D();
// Model.ColorModel colorModel = new Model.ColorModel();
// colorModel = BLL.Project_SysSetService.GetColorModel(this.CurrUser.LoginProjectId);
// parameter3D.ColorModel = colorModel;
// parameter3D.TagNum = Line_No;
// parameter3D.ButtonType = "1";
// parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(tvControlItem.SelectedNodeID);
//// parameter3D.Line_No = Line_No;
// ctlAuditFlow.Url_item = BLL.Project_SysSetService.GetAvevaNetUrl_Item(this.CurrUser.LoginProjectId) + parameter3D.ModelName;
// ctlAuditFlow.data = parameter3D;
// ctlAuditFlow.BindData();
// var q = view_HJGL_Pipelines.Where(x => x.PipeArea == PipelineService.PipeArea_SHOP);
// if (q.Any())
// {
// List<string> listpipecode = new List<string>();
// foreach (var item in q)
// {
// listpipecode.Add("/" + item.PipelineCode);
// }
// Line_No = string.Join(",", listpipecode);
// }
// Model.Parameter3D parameter3D = new Model.Parameter3D();
// Model.ColorModel colorModel = new Model.ColorModel();
// colorModel = BLL.Project_SysSetService.GetColorModel(this.CurrUser.LoginProjectId);
// parameter3D.ColorModel = colorModel;
// parameter3D.TagNum = Line_No;
// parameter3D.ButtonType = "1";
// parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(tvControlItem.SelectedNodeID);
//// parameter3D.Line_No = Line_No;
// ctlAuditFlow.Url_item = BLL.Project_SysSetService.GetAvevaNetUrl_Item(this.CurrUser.LoginProjectId) + parameter3D.ModelName;
// ctlAuditFlow.data = parameter3D;
// ctlAuditFlow.BindData();
}
#endregion
@@ -193,23 +190,23 @@ namespace FineUIPro.Web.HJGL.PreDesign
view_HJGL_Pipeline.SingleName = this.txtSingleName.Text.Trim();
// view_HJGL_Pipeline.MaterialCode=this.txtMaterialCode.Text.Trim();
var list = BLL.PipelineService.GetHJGL_PipelineList(view_HJGL_Pipeline);
if (!string .IsNullOrEmpty(this.txtMaterialCode.Text.Trim()))
if (!string.IsNullOrEmpty(this.txtMaterialCode.Text.Trim()))
{
list = (from x in list
join y in Funs.DB.HJGL_PipeLineMat on x.PipelineId equals y.PipelineId
where y.MaterialCode.Contains(txtMaterialCode.Text.Trim())
select x).Distinct().ToList();
}
view_HJGL_Pipelines = list;
view_HJGL_Pipelines = list;
// 2.获取当前分页数据
Grid1.RecordCount = list.Count();
// 2.获取当前分页数据
// 3.绑定到Grid
var table = this.GetPagedDataTable(Grid1, list);
var table = this.GetPagedDataTable(Grid1, list);
Grid1.DataSource = table;
Grid1.DataBind();
//lbSinglePreRate.Text= GetSinglePreRateByUnitWork(this.tvControlItem.SelectedNodeID);
@@ -252,7 +249,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
/// <param name="e"></param>
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
{
// Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
// Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
BindGrid();
}
#endregion
@@ -277,8 +274,8 @@ namespace FineUIPro.Web.HJGL.PreDesign
}
protected void Grid1_RowClick(object sender, GridRowClickEventArgs e)
{
var Id =Grid1.SelectedRowIDArray;
List<string > listpipecode=new List<string> () ;
var Id = Grid1.SelectedRowIDArray;
List<string> listpipecode = new List<string>();
foreach (var item in Id)
{
var q = PipelineService.GetPipelineByPipelineId(item);
@@ -292,7 +289,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
parameter3D.TagNum = pipecode;
parameter3D.ButtonType = "1";
parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(tvControlItem.SelectedNodeID);
// parameter3D.Line_No = Line_No;
// parameter3D.Line_No = Line_No;
ctlAuditFlow.Url_item = BLL.Project_SysSetService.GetAvevaNetUrl_Item(this.CurrUser.LoginProjectId) + parameter3D.ModelName;
ctlAuditFlow.data = parameter3D;
@@ -371,7 +368,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
{
txtPipelineCode.Text = String.Empty;
txtSingleName.Text = String.Empty;
txtMaterialCode.Text = String.Empty;
txtMaterialCode.Text = String.Empty;
BindGrid();
}
@@ -382,13 +379,13 @@ namespace FineUIPro.Web.HJGL.PreDesign
if (PipeArea != null)
{
var q = PipelineService.GetPipeArea().Where(x => x.Value == PipeArea.ToString());
if (q!=null&&q.Count()>0)
if (q != null && q.Count() > 0)
{
PipeAreaValue = q.First().Text;
}
}
else
{
return "";
@@ -403,11 +400,11 @@ namespace FineUIPro.Web.HJGL.PreDesign
private string GetSinglePreRateByUnitWork(string unitworkid)
{
var db = Funs.DB;
var pipeline=from x in db.View_HJGL_Pipeline where x.UnitWorkId == unitworkid && x.PipeArea=="1" select x;
var pipeline = from x in db.View_HJGL_Pipeline where x.UnitWorkId == unitworkid && x.PipeArea == "1" select x;
var q = from x in db.View_HJGL_WeldJoint where x.UnitWorkId == unitworkid select x;
string rate = "";
if (q != null && q.Count() > 0&&pipeline.Count()>0)
if (q != null && q.Count() > 0 && pipeline.Count() > 0)
{
var proSum = (from x in q
join y in pipeline on x.PipelineId equals y.PipelineId into temp
@@ -419,12 +416,12 @@ namespace FineUIPro.Web.HJGL.PreDesign
SizeSum = g.Sum(x => x.Size)
}).FirstOrDefault().SizeSum;
var AllSum = (from x in pipeline
group x by x.UnitWorkId into g
select new
{
SizeSum = g.Sum(x => x.TotalDin)
}).FirstOrDefault().SizeSum;
group x by x.UnitWorkId into g
select new
{
SizeSum = g.Sum(x => x.TotalDin)
}).FirstOrDefault().SizeSum;
proSum = (proSum != null) ? proSum : 0;
if (AllSum > 0)
{
@@ -1,14 +1,11 @@
using BLL;
using MiniExcelLibs;
using Model;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Web;
namespace FineUIPro.Web.HJGL.PreDesign
@@ -16,7 +13,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
public partial class PrePipeline : PageBase
{
public int pageSize = 20;
public static DataTable GridDataTable=new DataTable ();
public static DataTable GridDataTable = new DataTable();
protected void Page_Load(object sender, EventArgs e)
{
@@ -24,11 +21,11 @@ namespace FineUIPro.Web.HJGL.PreDesign
{
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
this.InitTreeMenu();//加载树
HJGL_PipelineComponentService.InitMainItemDownList(drpState,true);
HJGL_PipelineComponentService.InitMainItemDownProductionStateList(drpProductionState,true);
HJGL_PipelineComponentService.InitMainItemDownList(drpState, true);
HJGL_PipelineComponentService.InitMainItemDownProductionStateList(drpProductionState, true);
var pipeline = (from x in Funs.DB.HJGL_Pipeline
where x.ProjectId == this.CurrUser.LoginProjectId
where x.ProjectId == this.CurrUser.LoginProjectId
select x.FlowingSection).Distinct().ToList();
this.drpFlowingSection.DataTextField = "Value";
this.drpFlowingSection.DataValueField = "Value";
@@ -84,8 +81,8 @@ namespace FineUIPro.Web.HJGL.PreDesign
//}
//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)
@@ -98,7 +95,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
tn1.NodeID = q.UnitWorkId;
tn1.Text = q.UnitWorkName + "【" + a.ToString() + "】" + "管线";
tn1.ToolTip = "施工单位:" + unitNamesUnitIds;
tn1.CommandName = 1+"|"+Funs.GetEndPageNumber(a, pageSize);
tn1.CommandName = 1 + "|" + Funs.GetEndPageNumber(a, pageSize);
tn1.EnableClickEvent = true;
tn1.EnableExpandEvent = true;
rootNode1.Nodes.Add(tn1);
@@ -149,18 +146,18 @@ namespace FineUIPro.Web.HJGL.PreDesign
}
}
}
private void BindNodes(TreeNode node)
{
{
List<Model.HJGL_Pipeline> pipeline = new List<Model.HJGL_Pipeline>();
var pipelines = from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.PipeArea == "1" select x;
var pipelines = from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.PipeArea == "1" select x;
pipeline = (from x in pipelines
where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == node.NodeID
&& x.PipelineCode.Contains(this.txtPipelineCode.Text.Trim())
orderby x.PipelineCode
select x).ToList();
int pageindex =int.Parse(node.CommandName.Split('|')[0]);
int pageCount= int.Parse(node.CommandName.Split('|')[1]);
int pageindex = int.Parse(node.CommandName.Split('|')[0]);
int pageCount = int.Parse(node.CommandName.Split('|')[1]);
if (pageindex <= pageCount)
{
pipeline = pipeline.Skip(pageSize * (pageindex - 1)).Take(pageSize).ToList();
@@ -174,9 +171,9 @@ namespace FineUIPro.Web.HJGL.PreDesign
newNode.NodeID = item.PipelineId;
newNode.EnableClickEvent = true;
node.Nodes.Add(newNode);
}
if (pageindex <pageCount)
if (pageindex < pageCount)
{
TreeNode newNode = new TreeNode();
newNode.Text = "加载";
@@ -187,8 +184,8 @@ namespace FineUIPro.Web.HJGL.PreDesign
node.Nodes.Add(newNode);
}
}
}
#endregion
protected void tvControlItem_TreeNodeExpanded(object sender, TreeNodeEventArgs e)
@@ -222,7 +219,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
if (pipeline != null)
{
this.hdUnitWorkId.Text = this.tvControlItem.SelectedNode.ParentNode.NodeID;
}
}
}
else if (e.CommandName == "加载")
{
@@ -241,9 +238,9 @@ namespace FineUIPro.Web.HJGL.PreDesign
/// 数据绑定
/// </summary>
private void BindGrid()
{
if (tvControlItem.SelectedNode==null) return;
if (tvControlItem.SelectedNode == null) return;
string strSql = @" SELECT distinct com.PipelineComponentId,com.PipelineComponentCode,com.BoxNumber,com.Remark,
com.PipelineId, punit.UnitName AS PreUnit,aunit.UnitName AS AssembleUnit,com.IsPrint,
com.QRCode,com.State,com.ProductionState,pipe.PlanStartDate,pipe.FlowingSection,com.DrawingName,com.ReceiveDate,
@@ -264,14 +261,14 @@ namespace FineUIPro.Web.HJGL.PreDesign
listStr.Add(new SqlParameter("@UnitWorkId", this.tvControlItem.SelectedNodeID));
}
else if (tvControlItem.SelectedNode.CommandName=="管线")
else if (tvControlItem.SelectedNode.CommandName == "管线")
{
strSql += " and com.PipelineId = @PipelineId ";
listStr.Add(new SqlParameter("@PipelineId", this.tvControlItem.SelectedNodeID));
}
if (drpWeldingDailyCode.SelectedValue!=Const._Null &&!string.IsNullOrEmpty(drpWeldingDailyCode.SelectedValue))
if (drpWeldingDailyCode.SelectedValue != Const._Null && !string.IsNullOrEmpty(drpWeldingDailyCode.SelectedValue))
{
strSql += " and joint.WeldingDailyId = @WeldingDailyId ";
listStr.Add(new SqlParameter("@WeldingDailyId", drpWeldingDailyCode.SelectedValue));
@@ -283,7 +280,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
listStr.Add(new SqlParameter("@PipelineComponentCode", "%" + this.txtPipelineComponentCode.Text.Trim() + "%"));
}
if (drpState.SelectedValue!=Const._Null)
if (drpState.SelectedValue != Const._Null)
{
strSql += " AND com.State =@State";
listStr.Add(new SqlParameter("@State", drpState.SelectedValue));
@@ -374,10 +371,10 @@ namespace FineUIPro.Web.HJGL.PreDesign
{
HJGL_PipelineComponentService.UpdateIsPrint(Grid1.SelectedRowIDArray); //打印后修改打印状态
}
}
}
private bool Print(string[] PipelineComponentId)
{
{
BLL.FastReportService.ResetData();
var result = HJGL_PipelineComponentService.GetPrintModelByPipelineComponentIds(PipelineComponentId, null, false);
@@ -388,7 +385,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
}
else
{
ShowNotify("请查看组件是否上传二维码!", MessageBoxIcon.Question);
ShowNotify("请查看组件是否上传二维码!", MessageBoxIcon.Question);
return false;
}
BLL.FastReportService.AddFastreportTable(tb);
@@ -587,7 +584,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
return txt;
}
}
return StateName;
}
protected void btnImportQRCode_Click(object sender, EventArgs e)
@@ -606,7 +603,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
return;
}
var SingleName = (from x in Funs.DB.HJGL_Pipeline_Component where x.PipelineComponentId == id select (x.DrawingName)).FirstOrDefault();
var filemodel = BLL.HJGL_DataImportService.GetLatestFileByFileName(SingleName,"3", this.CurrUser.LoginProjectId);
var filemodel = BLL.HJGL_DataImportService.GetLatestFileByFileName(SingleName, "3", this.CurrUser.LoginProjectId);
if (filemodel != null)
{
string httpUrl = filemodel.FilePath;
@@ -624,19 +621,19 @@ namespace FineUIPro.Web.HJGL.PreDesign
protected void btnAccept_Click(object sender, EventArgs e)
{
if (Grid1.SelectedRowIDArray.Length>0)
if (Grid1.SelectedRowIDArray.Length > 0)
{
foreach (var item in Grid1.SelectedRowIDArray)
{
var model = HJGL_PipelineComponentService.GetPipelineComponentById(item);
if (model.ProductionState==2)
if (model.ProductionState == 2)
{
BLL.APIPipelineComponentService.GetComponentConfirmArrival(PipelineComponentId: item, this.CurrUser.PersonId,""); ;
BLL.APIPipelineComponentService.GetComponentConfirmArrival(PipelineComponentId: item, this.CurrUser.PersonId, ""); ;
}
}
ShowNotify("操作成功",MessageBoxIcon.Success);
ShowNotify("操作成功", MessageBoxIcon.Success);
BindGrid();
}
else
@@ -672,20 +669,20 @@ namespace FineUIPro.Web.HJGL.PreDesign
protected void btnOut_Click(object sender, EventArgs e)
{
if (GridDataTable!=null)
if (GridDataTable != null)
{
var q = (from x in GridDataTable.AsEnumerable()
select new
{
= x.Field<string>("PipelineComponentCode"),
= x.Field<string>("BoxNumber"),
= ConvertState(x.Field<object>("State")),
= ConvertProductionState(x.Field<object>("ProductionState")),
线 = x.Field<DateTime?>("PlanStartDate"),
= x.Field<string>("DrawingName"),
= x.Field<string>("PersonName"),
= x.Field<DateTime?>("ReceiveDate"),
});
{
= x.Field<string>("PipelineComponentCode"),
= x.Field<string>("BoxNumber"),
= ConvertState(x.Field<object>("State")),
= ConvertProductionState(x.Field<object>("ProductionState")),
线 = x.Field<DateTime?>("PlanStartDate"),
= x.Field<string>("DrawingName"),
= x.Field<string>("PersonName"),
= x.Field<DateTime?>("ReceiveDate"),
});
string path = Funs.RootPath + @"File\Excel\Temp\PrePipeline.xlsx";
path = path.Replace(".xlsx", string.Format("{0:yyyy-MM-dd-HH-mm}", DateTime.Now) + ".xlsx");
@@ -704,7 +701,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
File.Delete(path);
}
}
}
@@ -73,7 +73,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
pipeline.AssembleUnit = this.drpAssembleUnit.SelectedValue;
}
pipeline.BoxNumber = this.txtBoxNumber.Text.Trim();
pipeline.PipelineId = hdPipelineId.Text;
pipeline.PipelineId = hdPipelineId.Text;
BLL.HJGL_PipelineComponentService.AddPipelineComponent(pipeline);
}
}
@@ -1,11 +1,8 @@
using BLL;
using MiniExcelLibs;
using Model;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.OleDb;
using System.IO;
using System.Linq;
@@ -65,7 +62,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
Pipeline_ComponentList.Clear();
}
errorInfos = string.Empty;
}
}
#endregion
@@ -130,11 +127,11 @@ namespace FineUIPro.Web.HJGL.PreDesign
/// <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();
responeData = AddDatasetToSQL(rows, 3);
if (responeData.code==1)
if (responeData.code == 1)
{
ShowNotify("审核完成,请点击导入!", MessageBoxIcon.Success);
}
@@ -164,7 +161,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
Model.ResponeData responeData = new Model.ResponeData();
//string result = string.Empty;
List<string> result = new List<string> () ;
List<string> result = new List<string>();
int ic, ir;
ic = pds.Columns.Count;
ir = pds.Rows.Count;
@@ -198,7 +195,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
if (pipeline == null)
{
//result += "第" + (i + 2).ToString() + "行," + "不存在此管线号" + "|";
result.Add("不存在此管线号-"+ pipelinecode);
result.Add("不存在此管线号-" + pipelinecode);
continue;
}
}
@@ -217,13 +214,13 @@ namespace FineUIPro.Web.HJGL.PreDesign
continue;
}
}
}
if (result.Count>0)
}
if (result.Count > 0)
{
PipelineList.Clear();
// result = result.Substring(0, result.LastIndexOf("|"));
errorInfos = string .Join("|", result.Distinct()) ;
// result = result.Substring(0, result.LastIndexOf("|"));
errorInfos = string.Join("|", result.Distinct());
//Alert alert = new Alert();
//alert.Message = result;
//alert.Target = Target.Self;
@@ -235,23 +232,24 @@ namespace FineUIPro.Web.HJGL.PreDesign
{
var dt = pds.AsEnumerable()
.GroupBy(x => new {
.GroupBy(x => new
{
pipelinecode = x.Field<string>("管线号"),
PipelineComponentCode = x.Field<string>("预制组件"),
// DrawingName = x.Field<string>("预制图纸名称"),
// DrawingName = x.Field<string>("预制图纸名称"),
})
.Select(x => new
{
pipelinecode = x.Key.pipelinecode,
PipelineComponentCode = x.Key.PipelineComponentCode,
// DrawingName = x.Key.DrawingName,
// DrawingName = x.Key.DrawingName,
QRCode = String.Join(";", x.Select(z => z.Field<string>("二维码信息")))
});
foreach (var item in dt)
{
var pipeline = PipelineService.GetPipelineByPipelineCode(this.CurrUser.LoginProjectId,item.pipelinecode.Replace("\n", "").Replace(" ", "").Replace("\t", "").Replace("\r", ""));
var hJGL_Pipeline_Component = HJGL_PipelineComponentService.GetPipelineComponentByCodeandpipelineId(item.PipelineComponentCode.Replace("\n", "").Replace(" ", "").Replace("\t", "").Replace("\r", ""), pipeline.PipelineId);
if (hJGL_Pipeline_Component!=null)
var pipeline = PipelineService.GetPipelineByPipelineCode(this.CurrUser.LoginProjectId, item.pipelinecode.Replace("\n", "").Replace(" ", "").Replace("\t", "").Replace("\r", ""));
var hJGL_Pipeline_Component = HJGL_PipelineComponentService.GetPipelineComponentByCodeandpipelineId(item.PipelineComponentCode.Replace("\n", "").Replace(" ", "").Replace("\t", "").Replace("\r", ""), pipeline.PipelineId);
if (hJGL_Pipeline_Component != null)
{
//model.Pipeline_ComponentQRCodeRootName rootName = new model.Pipeline_ComponentQRCodeRootName();
//rootName.QRCode = new List<model.Pipeline_ComponentQRCodeQRCodeItem>();
@@ -267,9 +265,9 @@ namespace FineUIPro.Web.HJGL.PreDesign
hJGL_Pipeline_Component.QRCode = item.QRCode;
Pipeline_ComponentList.Add(hJGL_Pipeline_Component);
}
}
errorInfos = string.Empty;
@@ -345,10 +343,10 @@ namespace FineUIPro.Web.HJGL.PreDesign
var joint = BLL.WeldJointService.GetWeldJointsByWeldJointCode(item.PipelineId, QRCodeitem.Substring(1));
if (joint != null)
{
var ComponetJoint = BLL.HJGL_PipelineComponentjointService.GetHJGL_Pipeline_ComponentJointByWeldJointId(joint.WeldJointId);
if (ComponetJoint!=null)
var ComponetJoint = BLL.HJGL_PipelineComponentjointService.GetHJGL_Pipeline_ComponentJointByWeldJointId(joint.WeldJointId);
if (ComponetJoint != null)
{
ComponetJoint.PipelineComponentCode= item.PipelineComponentCode;
ComponetJoint.PipelineComponentCode = item.PipelineComponentCode;
ComponetJoint.PipelineComponentId = item.PipelineComponentId;
HJGL_PipelineComponentjointService.UpdateHJGL_Pipeline_ComponentJoint(ComponetJoint);
}
@@ -359,12 +357,12 @@ namespace FineUIPro.Web.HJGL.PreDesign
hJGL_Pipeline_ComponentJoint.PipelineComponentCode = item.PipelineComponentCode;
hJGL_Pipeline_ComponentJoint.PipelineComponentId = item.PipelineComponentId;
hJGL_Pipeline_ComponentJoint.WeldJointCode = joint.WeldJointCode;
hJGL_Pipeline_ComponentJoint.WeldJointId=joint.WeldJointId;
hJGL_Pipeline_ComponentJoint.WeldJointId = joint.WeldJointId;
hJGL_Pipeline_ComponentJoint.State = 0;
HJGL_PipelineComponentjointService.AddHJGL_Pipeline_ComponentJoint(hJGL_Pipeline_ComponentJoint);
}
}
}
}
@@ -1,22 +1,12 @@
using BLL;
using FineUIPro.Web.ProjectData;
using MiniExcelLibs;
using Model;
using Newtonsoft.Json.Linq;
using NPOI.SS.Formula.Functions;
using Org.BouncyCastle.Bcpg.OpenPgp;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Data.SqlTypes;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Security.Cryptography;
using System.Web;
using System.Web.WebSockets;
namespace FineUIPro.Web.HJGL.PreDesign
{
@@ -1,11 +1,6 @@
using BLL;
using Org.BouncyCastle.Asn1.Ocsp;
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.PreDesign
{
@@ -43,7 +38,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
Model.HJGL_TrainNumberManage model = BLL.TrainNumberManageService.GetModelById(this.Id);
if (model != null)
{
this.txtTrainNumber.Text = model.TrainNumber;
this.txtTrainNumber.Text = model.TrainNumber;
this.txtDriverName.Text = model.DriverName;
this.txtDriverPhone.Text = model.DriverPhone;
this.txtLicensePlateNumber.Text = model.LicensePlateNumber;
@@ -76,7 +76,7 @@
FieldType="String" HeaderText="联系人电话" TextAlign="Left" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="110px" ColumnID="ReceiveDate" DataField="ReceiveDate" FieldType="String"
HeaderText="收时间" HeaderTextAlign="Center" TextAlign="Center">
HeaderText="收时间" HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
<f:RenderField Width="150px" ColumnID="Remark" DataField="Remark" SortField="Remark"
FieldType="String" HeaderText="备注" TextAlign="Left" HeaderTextAlign="Center">
@@ -6,15 +6,12 @@ using System.Data;
using System.IO;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace FineUIPro.Web.HJGL.PreDesign
{
public partial class TrainNumberManager : PageBase
{
public static List<Model.HJGL_TrainNumberManage> hJGL_TrainNumberManages=new List<Model.HJGL_TrainNumberManage>();
public partial class TrainNumberManager : PageBase
{
public static List<Model.HJGL_TrainNumberManage> hJGL_TrainNumberManages = new List<Model.HJGL_TrainNumberManage>();
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
@@ -34,11 +31,11 @@ namespace FineUIPro.Web.HJGL.PreDesign
{
Model.HJGL_TrainNumberManage table = new Model.HJGL_TrainNumberManage();
table.ProjectId = this.CurrUser.LoginProjectId;
var tb = BLL.TrainNumberManageService.GetListByQueryModle(table, Grid1.PageIndex,Grid1.PageSize);
Grid1.RecordCount = tb.Total;
var tb = BLL.TrainNumberManageService.GetListByQueryModle(table, Grid1.PageIndex, Grid1.PageSize);
Grid1.RecordCount = tb.Total;
Grid1.DataSource = tb.Data;
Grid1.DataBind();
hJGL_TrainNumberManages= tb.Data;
hJGL_TrainNumberManages = tb.Data;
}
#endregion
@@ -220,7 +217,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
MiniExcel.SaveAs(path, q);
string fileName = $"车次管理-"+ string.Format("{0:yyyy-MM-dd}", DateTime.Now) + ".xlsx";
string fileName = $"车次管理-" + string.Format("{0:yyyy-MM-dd}", DateTime.Now) + ".xlsx";
FileInfo info = new FileInfo(path);
long fileSize = info.Length;
System.Web.HttpContext.Current.Response.Clear();
@@ -299,12 +296,12 @@ namespace FineUIPro.Web.HJGL.PreDesign
DataTable tb = LINQToDataTable(HJGLPackagingmanageService.GetPackagingManage(Id));
if (tb.Rows.Count > 0)
{
var model = TrainNumberManageService.GetModelById(Id);
var model = TrainNumberManageService.GetModelById(Id);
Dictionary<string, string> keyValuePairs = new Dictionary<string, string>();
keyValuePairs.Add("ProjectName", ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId));
keyValuePairs.Add("TrainNumber", model.TrainNumber);
keyValuePairs.Add("Remark", model.Remark);
keyValuePairs.Add("ContactName", model.ContactName );
keyValuePairs.Add("ContactName", model.ContactName);
keyValuePairs.Add("ContactPhone", model.ContactPhone);
keyValuePairs.Add("ID", "TrainNumberManager$" + model.Id);
DataRow dataRow = tb.NewRow();
@@ -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.PreDesign
{
@@ -1,10 +1,6 @@
using BLL;
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.PreDesign
{
@@ -44,7 +40,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
private void BindGrid()
{
var result = HJGLPackagingmanageService.GetPackagingManage(TrainNumberId);
var result = HJGLPackagingmanageService.GetPackagingManage(TrainNumberId);
Grid1.RecordCount = result.Count();
Grid1.DataSource = result;
Grid1.DataBind();
@@ -3,9 +3,7 @@ using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Web.UI.DataVisualization.Charting;
namespace FineUIPro.Web.HJGL.PreDesign
{
@@ -51,19 +49,19 @@ namespace FineUIPro.Web.HJGL.PreDesign
}
private void Bind()
{
if (!string.IsNullOrEmpty(tvControlItem.SelectedNodeID))
{
var unit = HJGL_YardPlanningService.GetHJGL_YardPlanningById( tvControlItem.SelectedNodeID);
this.imgPhoto.ImageUrl = null;
if (unit != null)
{
this.imgPhoto.ImageUrl = "~/" + unit.FlowChartPic;
}
if (!string.IsNullOrEmpty(tvControlItem.SelectedNodeID))
{
var unit = HJGL_YardPlanningService.GetHJGL_YardPlanningById(tvControlItem.SelectedNodeID);
this.imgPhoto.ImageUrl = null;
if (unit != null)
{
this.imgPhoto.ImageUrl = "~/" + unit.FlowChartPic;
}
}
}
#region --
/// <summary>
@@ -111,8 +109,8 @@ namespace FineUIPro.Web.HJGL.PreDesign
//}
//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)
@@ -138,17 +136,17 @@ namespace FineUIPro.Web.HJGL.PreDesign
{
foreach (var q in unitWork2)
{
int a = (from x in Funs.DB.HJGL_YardPlanning where x.SurperId==q.UnitWorkId select x).Count();
int a = (from x in Funs.DB.HJGL_YardPlanning where x.SurperId == q.UnitWorkId select x).Count();
var unitNamesUnitIds = BLL.UnitService.getUnitNamesUnitIds(q.UnitId);
TreeNode tn2 = new TreeNode();
tn2.NodeID = q.UnitWorkId;
// tn2.Text = q.UnitWorkName + "【" + a.ToString() + "】" + "管线";
tn2.Text = q.UnitWorkName ;
// tn2.Text = q.UnitWorkName + "【" + a.ToString() + "】" + "管线";
tn2.Text = q.UnitWorkName;
tn2.CommandName = "主项";
tn2.ToolTip = "施工单位:" + unitNamesUnitIds;
tn2.EnableClickEvent = true;
rootNode2.Nodes.Add(tn2);
if (a>0)
if (a > 0)
{
BoundTree(tn2.Nodes, tn2.NodeID);
}
@@ -159,7 +157,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
private void BoundTree(TreeNodeCollection nodes, string superId)
{
var mdoel = BLL.HJGL_YardPlanningService.GetHJGL_YardPlanningBySurperId(superId);
foreach (var m in mdoel)
foreach (var m in mdoel)
{
TreeNode chidNode = new TreeNode
{
@@ -167,12 +165,12 @@ namespace FineUIPro.Web.HJGL.PreDesign
NodeID = m.YardPlanningId,
Expanded = true,
Selectable = true,
EnableClickEvent= true,
};
EnableClickEvent = true,
};
nodes.Add(chidNode);
this.BoundTree(chidNode.Nodes, m.YardPlanningId);
}
}
#endregion
@@ -226,11 +224,11 @@ namespace FineUIPro.Web.HJGL.PreDesign
if (!string.IsNullOrEmpty(tvControlItem.SelectedNodeID))
{
var model = HJGL_YardPlanningService.GetHJGL_YardPlanningByProjectId(this.CurrUser.LoginProjectId, tvControlItem.SelectedNodeID);
if (model != null)
{
HJGL_YardPlanningService.DeleteHJGL_YardPlanningById(model.YardPlanningId);
}
this.imgPhoto.ImageUrl = null;
if (model != null)
{
HJGL_YardPlanningService.DeleteHJGL_YardPlanningById(model.YardPlanningId);
}
this.imgPhoto.ImageUrl = null;
}
else
{
@@ -245,37 +243,37 @@ namespace FineUIPro.Web.HJGL.PreDesign
{
if (filePhoto.HasFile)
{
string rootUrl = ConfigurationManager.AppSettings["localRoot"];
if (string.IsNullOrEmpty(rootUrl))
{
rootUrl = Funs.RootPath;
}
string rootUrl = ConfigurationManager.AppSettings["localRoot"];
if (string.IsNullOrEmpty(rootUrl))
{
rootUrl = Funs.RootPath;
}
string fileName = filePhoto.ShortFileName;
string fileName = filePhoto.ShortFileName;
if (!ValidateFileType(fileName))
{
// 清空文件上传控件
if (!ValidateFileType(fileName))
{
// 清空文件上传控件
filePhoto.Reset();
ShowNotify("无效的文件类型!");
return;
}
fileName = fileName.Replace(":", "_").Replace(" ", "_").Replace("\\", "_").Replace("/", "_");
fileName = DateTime.Now.Ticks.ToString() + "_" + fileName;
filePhoto.SaveAs(rootUrl + "/FileUpload/HJGL_YardPlanning/" + fileName);
imgPhoto.ImageUrl = "~/FileUpload/HJGL_YardPlanning/" + fileName;
HJGL_YardPlanningService.SavePic(tvControlItem.SelectedNodeID, "FileUpload/HJGL_YardPlanning/" + fileName);
// 清空文件上传组件(上传后要记着清空,否则点击提交表单时会再次上传!!)
filePhoto.Reset();
ShowNotify("无效的文件类型!");
return;
}
fileName = fileName.Replace(":", "_").Replace(" ", "_").Replace("\\", "_").Replace("/", "_");
fileName = DateTime.Now.Ticks.ToString() + "_" + fileName;
filePhoto.SaveAs(rootUrl + "/FileUpload/HJGL_YardPlanning/" + fileName);
imgPhoto.ImageUrl = "~/FileUpload/HJGL_YardPlanning/" + fileName;
HJGL_YardPlanningService.SavePic( tvControlItem.SelectedNodeID, "FileUpload/HJGL_YardPlanning/" + fileName);
// 清空文件上传组件(上传后要记着清空,否则点击提交表单时会再次上传!!)
filePhoto.Reset();
}
}
else
{
@@ -323,7 +321,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
{
if (!string.IsNullOrEmpty(tvControlItem.SelectedNodeID))
{
var unit = HJGL_YardPlanningService.GetHJGL_YardPlanningById( tvControlItem.SelectedNodeID);
var unit = HJGL_YardPlanningService.GetHJGL_YardPlanningById(tvControlItem.SelectedNodeID);
this.imgPhoto.ImageUrl = null;
if (unit != null)
{
@@ -339,13 +337,13 @@ namespace FineUIPro.Web.HJGL.PreDesign
#endregion
protected void btnAttachUrl_Click(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(tvControlItem.SelectedNodeID)&& tvControlItem.SelectedNode.CommandName!="主项")
if (!string.IsNullOrEmpty(tvControlItem.SelectedNodeID) && tvControlItem.SelectedNode.CommandName != "主项")
{
var model = HJGL_YardPlanningService.GetHJGL_YardPlanningById( tvControlItem.SelectedNodeID);
var model = HJGL_YardPlanningService.GetHJGL_YardPlanningById(tvControlItem.SelectedNodeID);
if (model == null)
{
HJGL_YardPlanningService.SavePic( tvControlItem.SelectedNodeID, "");
// model = HJGL_YardPlanningService.GetHJGL_YardPlanningByProjectId(this.CurrUser.LoginProjectId, tvControlItem.SelectedNodeID);
HJGL_YardPlanningService.SavePic(tvControlItem.SelectedNodeID, "");
// model = HJGL_YardPlanningService.GetHJGL_YardPlanningByProjectId(this.CurrUser.LoginProjectId, tvControlItem.SelectedNodeID);
}
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/HJGL_YardPlanning&menuId={1}", model.YardPlanningId, BLL.Const.HJGL_YardPlanningMenuId)));
}
@@ -1,10 +1,5 @@
using BLL;
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.PreDesign
{
@@ -23,14 +18,14 @@ namespace FineUIPro.Web.HJGL.PreDesign
}
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
if (!IsPostBack)
{
YardPlanningId=Request.Params["YardPlanningId"];
string Type= Request.Params["Type"];
YardPlanningId = Request.Params["YardPlanningId"];
string Type = Request.Params["Type"];
if (!string.IsNullOrEmpty(Type))
{
if (Type=="Edit")
if (Type == "Edit")
{
var q = BLL.HJGL_YardPlanningService.GetHJGL_YardPlanningById(YardPlanningId);
txtYardPlanName.Text = q.YardPlanName;
@@ -64,7 +59,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
else if (Type == "Edit")
{
var q = BLL.HJGL_YardPlanningService.GetHJGL_YardPlanningById(YardPlanningId);
q.YardPlanName=txtYardPlanName.Text ;
q.YardPlanName = txtYardPlanName.Text;
HJGL_YardPlanningService.UpdateHJGL_YardPlanning(q);
}
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
@@ -109,8 +109,8 @@ namespace FineUIPro.Web.HJGL.PurgingCleaning
//}
//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)
@@ -107,8 +107,8 @@ namespace FineUIPro.Web.HJGL.PurgingCleaning
//}
//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)
@@ -107,8 +107,8 @@ namespace FineUIPro.Web.HJGL.PurgingCleaning
//}
//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)
@@ -92,8 +92,8 @@ namespace FineUIPro.Web.HJGL.PurgingCleaning
//}
//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)
@@ -193,8 +193,8 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand
//}
//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)
@@ -5,7 +5,6 @@ using System.Data;
using System.Data.SqlClient;
using System.IO;
using System.Linq;
using System.Web;
namespace FineUIPro.Web.HJGL.RepairAndExpand
{
@@ -69,8 +68,8 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand
//}
//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)
@@ -478,7 +477,7 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand
// Model.View_Batch_BatchTrust trust = BLL.Batch_BatchTrustService.GetBatchTrustViewByPointBatchId(this.tvControlItem.SelectedNodeID);
// Model.HJGL_Batch_PointBatch batch = BLL.PointBatchService.GetPointBatchById(this.tvControlItem.SelectedNodeID);
// var trust = BLL.Batch_BatchTrustService.GetBatchTrustViewByPointBatchId(reportId);
// var trust = BLL.Batch_BatchTrustService.GetBatchTrustViewByPointBatchId(reportId);
var trust = BLL.Batch_BatchTrustService.GetBatchTrustViewById(this.tvControlItem.SelectedNodeID);
if (trust != null)
{
@@ -110,8 +110,8 @@ namespace FineUIPro.Web.HJGL.TestPackage
//}
//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)
@@ -122,8 +122,8 @@ namespace FineUIPro.Web.HJGL.TestPackage
//}
//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,5 +1,4 @@
using BLL;
using FineUIPro.Web.DataShow;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
@@ -215,7 +214,7 @@ namespace FineUIPro.Web.HJGL.TestPackage
bool flag_B = true;
Model.Project_Sys_Set PressMustCheckBItem = BLL.Project_SysSetService.GetSysSetBySetId("10", this.CurrUser.LoginProjectId);
bool isMustCheckBItem = false;
isMustCheckBItem= (bool)PressMustCheckBItem?.IsAuto;//是否必须检查B项
isMustCheckBItem = (bool)PressMustCheckBItem?.IsAuto;//是否必须检查B项
///保存明细
if (saveType == Const.BtnSubmit)
{
@@ -230,7 +229,7 @@ namespace FineUIPro.Web.HJGL.TestPackage
{
flag_A = false;
}
if (isMustCheckBItem && item.ItemType == "B" && item.Result != "合格")
{
flag_B = false;
@@ -115,8 +115,8 @@ namespace FineUIPro.Web.HJGL.TestPackage
//}
//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)
@@ -360,7 +360,7 @@ namespace FineUIPro.Web.HJGL.TestPackage
int totalWeldingJointNum = totalJoint.Count(x => x.WeldingDailyId != null); //已焊总焊口
int notCloseBatch = (from x in db.HJGL_Batch_PointBatch
join y in db.PTP_PipelineList on x.PipelineId equals y.PipelineId
where y.PTP_ID==this.PTP_ID //x.UnitWorkId == pipeline.UnitWorkId
where y.PTP_ID == this.PTP_ID //x.UnitWorkId == pipeline.UnitWorkId
&& x.DetectionRateId == pipeline.DetectionRateId
&& x.DetectionTypeId == pipeline.DetectionType && x.EndDate == null
select x).Count(); //未关闭批
@@ -562,24 +562,24 @@ namespace FineUIPro.Web.HJGL.TestPackage
//string inspectionIsoRate = BLL.TestPackageEditService.InspectionIsoRate(this.PTP_ID);
//if (string.IsNullOrEmpty(inspectionIsoRate))
//{
updateTestPackage.Check1 = drpInstallationSpecification.SelectedValue;
updateTestPackage.Check2 = drpPressureTest.SelectedValue;
updateTestPackage.Check3 = drpWorkRecord.SelectedValue;
updateTestPackage.Check4 = drpNDTConform.SelectedValue;
updateTestPackage.Check5 = drpHotConform.SelectedValue;
updateTestPackage.Check6 = drpInstallationCorrectness.SelectedValue;
updateTestPackage.Check7 = drpMarkClearly.SelectedValue;
updateTestPackage.Check8 = drpIsolationOpening.SelectedValue;
updateTestPackage.Check9 = drpConstructionPlanAsk.SelectedValue;
updateTestPackage.Check10 = drpCover.SelectedValue;
updateTestPackage.Check11 = drpMeetRequirements.SelectedValue;
updateTestPackage.Check12 = drpStainlessTestWater.SelectedValue;
updateTestPackage.AduditDate = DateTime.Now;
updateTestPackage.Auditer = this.CurrUser.PersonId;
BLL.TestPackageEditService.UpdateTestPackage(updateTestPackage);
this.InitTreeMenu();
this.BindGrid();
ShowNotify("保存成功!", MessageBoxIcon.Success);
updateTestPackage.Check1 = drpInstallationSpecification.SelectedValue;
updateTestPackage.Check2 = drpPressureTest.SelectedValue;
updateTestPackage.Check3 = drpWorkRecord.SelectedValue;
updateTestPackage.Check4 = drpNDTConform.SelectedValue;
updateTestPackage.Check5 = drpHotConform.SelectedValue;
updateTestPackage.Check6 = drpInstallationCorrectness.SelectedValue;
updateTestPackage.Check7 = drpMarkClearly.SelectedValue;
updateTestPackage.Check8 = drpIsolationOpening.SelectedValue;
updateTestPackage.Check9 = drpConstructionPlanAsk.SelectedValue;
updateTestPackage.Check10 = drpCover.SelectedValue;
updateTestPackage.Check11 = drpMeetRequirements.SelectedValue;
updateTestPackage.Check12 = drpStainlessTestWater.SelectedValue;
updateTestPackage.AduditDate = DateTime.Now;
updateTestPackage.Auditer = this.CurrUser.PersonId;
BLL.TestPackageEditService.UpdateTestPackage(updateTestPackage);
this.InitTreeMenu();
this.BindGrid();
ShowNotify("保存成功!", MessageBoxIcon.Success);
//}
//else
//{
@@ -21,6 +21,10 @@
background-color: Purple;
}
.f-grid-row.Red {
background-color: red;
}
.f-grid-row.Cyan {
background-color: Cyan;
}
@@ -71,6 +75,27 @@
<f:Panel ID="panelTopRegion" runat="server" RegionPosition="Top" ShowBorder="true" RegionPercent="40%"
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" Title="试压看板"
TitleToolTip="试压看板" AutoScroll="true">
<Toolbars>
<f:Toolbar runat="server" ToolbarAlign="Right">
<Items>
<f:TextBox ID="txtGrid2code" runat="server" Label="试压包号" EmptyText="输入查询条件" LabelWidth="80px" LabelAlign="Right"></f:TextBox>
<f:DropDownList runat="server" ID="drpCanPressureTest" Label="是否具备试压条件" AutoSelectFirstItem="false" EmptyText="--请选择--"
EnableCheckBoxSelect="true" LabelWidth="150px" LabelAlign="Right" EnableMultiSelect="true"
AutoShowClearIcon="true">
<f:ListItem Text="已具备" Value="已具备" />
<f:ListItem Text="易具备" Value="易具备" />
<f:ListItem Text="未具备" Value="未具备" />
</f:DropDownList>
<f:DropDownList runat="server" ID="drpStateStr" Label="状态" AutoSelectFirstItem="false" EmptyText="--请选择--"
EnableCheckBoxSelect="true" LabelWidth="150px" LabelAlign="Right" EnableMultiSelect="true"
AutoShowClearIcon="true">
</f:DropDownList>
<f:ToolbarFill runat="server"></f:ToolbarFill>
<f:Button ID="btnQuery" OnClick="btnSearch_Click" ToolTip="查询" Text="查询" Icon="SystemSearch" EnablePostBack="true" runat="server">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Items>
<f:Grid ID="Grid2" ShowBorder="true" ShowHeader="true" Title="试压包明细" EnableCollapse="true" Collapsed="false"
runat="server" BoxFlex="1" DataKeyNames="PTP_ID" AllowCellEditing="true"
@@ -85,20 +110,20 @@
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="90px">
</f:RenderField>
<f:RenderField HeaderText="检测完成百分比" ColumnID="DetectionCompletionPercent" DataField="DetectionCompletionPercent" SortField="DetectionCompletionPercent"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="120px">
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="120px" HeaderToolTip="检测完成百分比=当前试压包下已检测的焊口数/当前试压包下的焊口总数">
</f:RenderField>
<f:RenderField HeaderText="焊口完成百分比" ColumnID="WeldCompletionPercent" DataField="WeldCompletionPercent" SortField="WeldCompletionPercent"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="120px">
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="120px" HeaderToolTip="焊口完成百分比=当前试压包下已焊接的焊口数/当前试压包下的焊口总数">
</f:RenderField>
<f:RenderField HeaderText="具备程度比值" ColumnID="PipelinePassPercent" DataField="PipelinePassPercent" SortField="PipelinePassPercent"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="90px" HeaderToolTip="当前试压包下具备试压条件管线数/当前试压包管线总数">
</f:RenderField>
<f:RenderField HeaderText="是否具备试压条件" ColumnID="CanPressureTest" DataField="CanPressureTest" SortField="CanPressureTest"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="120px" HeaderToolTip="具备程度比值>=100% -> 已具备;>=80% and <100% -> 易具备;<80% -> 未具备">
</f:RenderField>
<f:RenderField HeaderText="状态" ColumnID="StateStr" DataField="StateStr" SortField="StateStr"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="90px">
</f:RenderField>
<f:RenderField HeaderText="是否具备试压条件" ColumnID="CanPressureTest" DataField="CanPressureTest" SortField="CanPressureTest"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="120px">
</f:RenderField>
<f:RenderField HeaderText="具备程度比值" ColumnID="PipelinePassPercent" DataField="PipelinePassPercent" SortField="PipelinePassPercent"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="90px">
</f:RenderField>
</f:RenderField>
</Columns>
</f:Grid>
@@ -11,6 +11,7 @@ namespace FineUIPro.Web.HJGL.TestPackage
public partial class TestPackageComplete : PageBase
{
#region
/// <summary>
/// 试压包主键
/// </summary>
@@ -25,93 +26,10 @@ namespace FineUIPro.Web.HJGL.TestPackage
ViewState["PTP_ID"] = value;
}
}
#endregion
#endregion
#region
/// <summary>
/// 加载页面
/// </summary>
@@ -122,6 +40,11 @@ namespace FineUIPro.Web.HJGL.TestPackage
if (!IsPostBack)
{
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
drpStateStr.DataTextField = "Value";
drpStateStr.DataValueField = "Value";
drpStateStr.DataSource= BLL.TestPackageEditService.StateMap;
drpStateStr.DataBind();
this.PTP_ID = string.Empty;
Model.Project_Sys_Set pressUnit = BLL.Project_SysSetService.GetSysSetBySetId("8", this.CurrUser.LoginProjectId);
if (pressUnit != null && pressUnit.SetValue == "2")
@@ -133,9 +56,11 @@ namespace FineUIPro.Web.HJGL.TestPackage
BindGrid2();
}
}
#endregion
#endregion
#region --
/// <summary>
/// 加载树
/// </summary>
@@ -177,7 +102,7 @@ namespace FineUIPro.Web.HJGL.TestPackage
testPackageLists = (from x in Funs.DB.PTP_TestPackage
where x.ProjectId == this.CurrUser.LoginProjectId
select x).ToList();
}
}
List<Model.WBS_UnitWork> unitWork1 = null;
List<Model.WBS_UnitWork> unitWork2 = null;
@@ -193,20 +118,20 @@ namespace FineUIPro.Web.HJGL.TestPackage
//}
//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();
//}
var dicUnitWorkTestPackagePassPercent= BLL.TestPackageEditService.GetTestPackagePassPercentByProjectId(this.CurrUser.LoginProjectId);
var dicUnitWorkTestPackagePassPercent = BLL.TestPackageEditService.GetTestPackagePassPercentByProjectId(this.CurrUser.LoginProjectId);
if (unitWork1.Count() > 0)
{
foreach (var q in unitWork1)
{
var unitNamesUnitIds = BLL.UnitService.getUnitNamesUnitIds(q.UnitId);
var unitWorkTestPackagePassPercent = dicUnitWorkTestPackagePassPercent.TryGetValue(q.UnitWorkId, out var value) ? value : 0;
TreeNode tn1 = new TreeNode();
TreeNode tn1 = new TreeNode();
tn1.NodeID = q.UnitWorkId;
tn1.Text = q.UnitWorkName+"(已完成"+ unitWorkTestPackagePassPercent+"%)";
tn1.Text = q.UnitWorkName + "(已完成" + unitWorkTestPackagePassPercent + "%)";
tn1.ToolTip = "施工单位:" + unitNamesUnitIds;
tn1.CommandName = "单位工程";
rootNode1.Nodes.Add(tn1);
@@ -232,9 +157,11 @@ namespace FineUIPro.Web.HJGL.TestPackage
}
}
}
#endregion
#endregion --
#region
/// <summary>
/// 绑定树节点
/// </summary>
@@ -280,9 +207,10 @@ namespace FineUIPro.Web.HJGL.TestPackage
}
}
#endregion
#endregion
#region TreeView
/// <summary>
/// 点击TreeView
/// </summary>
@@ -294,7 +222,7 @@ namespace FineUIPro.Web.HJGL.TestPackage
this.BindGrid();
}
#endregion
#endregion TreeView
#region
/// <summary>
@@ -304,10 +232,10 @@ namespace FineUIPro.Web.HJGL.TestPackage
{
this.SetTextTemp();
this.PageInfoLoad(); ///页面输入保存信息
string strSql = @" SELECT ptpPipe.PT_PipeId, ptpPipe.PTP_ID, ptpPipe.PipelineId, ptpPipe.DesignPress,
ptpPipe.DesignTemperature, ptpPipe.AmbientTemperature, ptpPipe.TestMedium,
string strSql = @" SELECT ptpPipe.PT_PipeId, ptpPipe.PTP_ID, ptpPipe.PipelineId, ptpPipe.DesignPress,
ptpPipe.DesignTemperature, ptpPipe.AmbientTemperature, ptpPipe.TestMedium,
ptpPipe.TestMediumTemperature, ptpPipe.TestPressure, ptpPipe.HoldingTime,IsoInfo.PipelineCode,testMedium.MediumName
FROM dbo.PTP_PipelineList AS ptpPipe
FROM dbo.PTP_PipelineList AS ptpPipe
LEFT JOIN dbo.HJGL_Pipeline AS IsoInfo ON ptpPipe.PipelineId = IsoInfo.PipelineId
LEFT JOIN dbo.Base_TestMedium AS testMedium ON testMedium.TestMediumId = IsoInfo.TestMedium
WHERE ptpPipe.PTP_ID=@PTP_ID";
@@ -336,22 +264,58 @@ namespace FineUIPro.Web.HJGL.TestPackage
Grid2.DataSource = null;
Grid2.DataBind();
return;
}
}
if (!string.IsNullOrEmpty(this.txtGrid2code.Text.Trim()))
{
projectTestPackages = projectTestPackages.Where(x => x.TestPackageNo.Contains(this.txtGrid2code.Text.Trim())).ToList();
}
// 分析每个试压包
var analyzeList = new List<Model.TestPackageAnalyzeOutput>();
foreach (var pkg in projectTestPackages)
{
var analyze = BLL.TestPackageEditService.getTestPackageAnalyze(pkg.PTP_ID, pkg.ProjectId);
var analyze = BLL.TestPackageEditService.getTestPackageAnalyze(pkg.PTP_ID, pkg.ProjectId);
analyzeList.Add(analyze);
}
analyzeList = analyzeList.OrderBy(x => x.UnitWorkName).ThenBy(x => x.TestPackageNo).ToList();
if (drpCanPressureTest.SelectedValueArray.Length>0)
{
analyzeList = analyzeList.Where(x => drpCanPressureTest.SelectedValueArray.ToList().Contains(x.CanPressureTest)).ToList();
}
if (drpStateStr.SelectedValueArray.Length > 0)
{
analyzeList = analyzeList.Where(x => drpStateStr.SelectedValueArray.ToList().Contains(x.StateStr)).ToList();
}
// 绑定到Grid1
Grid2.RecordCount = analyzeList.Count;
Grid2.DataSource = analyzeList;
Grid2.DataBind();
// 设置行样式(保留原逻辑)
for (int i = 0; i < Grid2.Rows.Count; i++)
{
string ptpId = Grid2.Rows[i].DataKeys[0].ToString();
var ptpModel = analyzeList.FirstOrDefault(x=>x.PTP_ID== ptpId);
if (ptpModel != null)
{
if (ptpModel.CanPressureTest== "未具备")
{
Grid2.Rows[i].RowCssClass = "Red";
}
else if (ptpModel.CanPressureTest == "易具备")
{
Grid2.Rows[i].RowCssClass = "Yellow";
}
}
}
}
#region
/// <summary>
/// 加载页面输入保存信息
/// </summary>
@@ -370,9 +334,11 @@ namespace FineUIPro.Web.HJGL.TestPackage
this.txtTestMediumTemperature.Text = testPackageManage.TestMediumTemperature.ToString();
}
}
#endregion
#endregion
#region
/// <summary>
/// 清空页面输入信息
/// </summary>
@@ -386,416 +352,65 @@ namespace FineUIPro.Web.HJGL.TestPackage
this.txtTestMediumTemperature.Text = string.Empty;
}
#endregion
#endregion
#endregion
#endregion
#region
#region
/// <summary>
/// 页索引改变事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
/// 页索引改变事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
{
BindGrid();
}
#endregion
#endregion
#region
/// <summary>
/// 排序
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_Sort(object sender, GridSortEventArgs e)
/// 排序
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_Sort(object sender, GridSortEventArgs e)
{
BindGrid();
}
#endregion
#endregion
#region
/// <summary>
/// 分页选择下拉改变事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
/// 分页选择下拉改变事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
{
Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
BindGrid();
}
#endregion
#endregion
#endregion
#endregion
#region
/// <summary>
/// 关闭弹出窗口
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Window1_Close(object sender, WindowCloseEventArgs e)
/// 关闭弹出窗口
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Window1_Close(object sender, WindowCloseEventArgs e)
{
this.PTP_ID = this.hdPTP_ID.Text;
this.BindGrid();
@@ -803,79 +418,18 @@ namespace FineUIPro.Web.HJGL.TestPackage
this.hdPTP_ID.Text = string.Empty;
}
/// <summary>
/// 查询
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Tree_TextChanged(object sender, EventArgs e)
protected void Tree_TextChanged(object sender, EventArgs e)
{
this.InitTreeMenu();
this.BindGrid();
}
#endregion
#endregion
protected void btnMenuModify_Click(object sender, EventArgs e)
{
@@ -925,6 +479,7 @@ namespace FineUIPro.Web.HJGL.TestPackage
}
#region
/// <summary>
/// 查询
/// </summary>
@@ -934,6 +489,12 @@ namespace FineUIPro.Web.HJGL.TestPackage
{
InitTreeMenu();
}
#endregion
protected void btnSearch_Click(object sender, EventArgs e)
{
BindGrid2();
}
#endregion
}
}
@@ -104,6 +104,42 @@ namespace FineUIPro.Web.HJGL.TestPackage
/// </remarks>
protected global::FineUIPro.Panel panelTopRegion;
/// <summary>
/// txtGrid2code 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtGrid2code;
/// <summary>
/// drpCanPressureTest 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpCanPressureTest;
/// <summary>
/// drpStateStr 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpStateStr;
/// <summary>
/// btnQuery 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnQuery;
/// <summary>
/// Grid2 控件。
/// </summary>
@@ -1,16 +1,11 @@
using BLL;
using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.IO;
using Model;
using Microsoft.SqlServer.Server;
using NPOI.SS.Formula.Functions;
using System.Linq;
using System.Web.UI.WebControls;
namespace FineUIPro.Web.HJGL.TestPackage
{
@@ -247,7 +242,7 @@ namespace FineUIPro.Web.HJGL.TestPackage
protected void btnPrint_Click(object sender, EventArgs e)
{
var selectedRows = this.Grid1.SelectedRowIDArray;
if (selectedRows.Length==0)
if (selectedRows.Length == 0)
{
Alert.ShowInTop("请选择一条试压包", MessageBoxIcon.Warning);
return;
@@ -257,11 +252,11 @@ namespace FineUIPro.Web.HJGL.TestPackage
{
var item = exportWord(ptp_id);
TestPackagePrintService.AddPrintCountByPTP_ID(ptp_id);//增加明细打印次数
printFiles.Add(item.FirstOrDefault().Key, item.FirstOrDefault().Value);
printFiles.Add(item.FirstOrDefault().Key, item.FirstOrDefault().Value);
}
if (printFiles.Count>1)
if (printFiles.Count > 1)
{
string zipName = "";
string zipName = "";
string rootPath = Funs.RootPath;
string startPath = rootPath + "FileUpload\\试压包资料" + DateTime.Now.GetHashCode();
if (!Directory.Exists(startPath))
@@ -273,20 +268,20 @@ namespace FineUIPro.Web.HJGL.TestPackage
{
var sourceFile = item.Key;
var destFile = startPath + "\\" + item.Value;
zipName+= item.Value.Replace(".pdf","")+"," ;
zipName += item.Value.Replace(".pdf", "") + ",";
if (File.Exists(sourceFile))
{
File.Copy(sourceFile, destFile, true);
File.Delete(sourceFile);
}
}
zipName= zipName.TrimEnd(',');
zipName = zipName.TrimEnd(',');
System.IO.Compression.ZipFile.CreateFromDirectory(startPath, zipPath);
FileInfo info = new FileInfo(zipPath);
long fileSize = info.Length;
System.Web.HttpContext.Current.Response.Clear();
System.Web.HttpContext.Current.Response.ContentType = "application/x-zip-compressed";
System.Web.HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(zipName+".zip", System.Text.Encoding.UTF8));
System.Web.HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(zipName + ".zip", System.Text.Encoding.UTF8));
System.Web.HttpContext.Current.Response.AddHeader("Content-Length", fileSize.ToString());
System.Web.HttpContext.Current.Response.TransmitFile(zipPath, 0, fileSize);
System.Web.HttpContext.Current.Response.Flush();
@@ -305,8 +300,8 @@ namespace FineUIPro.Web.HJGL.TestPackage
System.Web.HttpContext.Current.Response.TransmitFile(printFiles.FirstOrDefault().Key, 0, fileSize);
System.Web.HttpContext.Current.Response.Flush();
System.Web.HttpContext.Current.Response.Close();
}
}
}
protected void Grid1_RowCommand(object sender, GridCommandEventArgs e)
{
@@ -316,8 +311,8 @@ namespace FineUIPro.Web.HJGL.TestPackage
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("TestPackageDatePrint.aspx?PTP_ID={0}", keys[0], "编辑 - ")));
}
}
protected Dictionary<string,string> exportWord(string ptp_id)
}
protected Dictionary<string, string> exportWord(string ptp_id)
{
var keyValuePairs = new Dictionary<string, string>();
if (string.IsNullOrEmpty(ptp_id))
@@ -345,7 +340,7 @@ namespace FineUIPro.Web.HJGL.TestPackage
if (this.drpPrintType.SelectedValue == "1")//pdf格式
{
exportName+=".pdf";
exportName += ".pdf";
ListItem[] list = new ListItem[10];
list[0] = new ListItem("0", "File\\Fastreport\\JGZL\\管道试压包文件资料.frx");
list[1] = new ListItem("1", "File\\Fastreport\\JGZL\\管道压力试验技术要求.frx");
@@ -368,21 +363,21 @@ namespace FineUIPro.Web.HJGL.TestPackage
BLL.FastReportService.ExportMergeReport(FastReportItemList, Path, this.drpPrintType.SelectedValue);
keyValuePairs.Add(Path, exportName);
/* FileInfo info = new FileInfo(Path);
long fileSize = info.Length;
System.Web.HttpContext.Current.Response.Clear();
System.Web.HttpContext.Current.Response.ClearHeaders();
System.Web.HttpContext.Current.Response.ContentType = "application/x-zip-compressed";
System.Web.HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(exportName + ".pdf", System.Text.Encoding.UTF8));
System.Web.HttpContext.Current.Response.AddHeader("Content-Length", fileSize.ToString());
System.Web.HttpContext.Current.Response.TransmitFile(Path, 0, fileSize);
System.Web.HttpContext.Current.Response.Flush();
System.Web.HttpContext.Current.Response.Close();
File.Delete(Path);*/
/* FileInfo info = new FileInfo(Path);
long fileSize = info.Length;
System.Web.HttpContext.Current.Response.Clear();
System.Web.HttpContext.Current.Response.ClearHeaders();
System.Web.HttpContext.Current.Response.ContentType = "application/x-zip-compressed";
System.Web.HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(exportName + ".pdf", System.Text.Encoding.UTF8));
System.Web.HttpContext.Current.Response.AddHeader("Content-Length", fileSize.ToString());
System.Web.HttpContext.Current.Response.TransmitFile(Path, 0, fileSize);
System.Web.HttpContext.Current.Response.Flush();
System.Web.HttpContext.Current.Response.Close();
File.Delete(Path);*/
}
else if (this.drpPrintType.SelectedValue == "2")//word格式
{
exportName += ".docx";
exportName += ".docx";
ListItem[] list = new ListItem[3];
list[0] = new ListItem("0", "File\\Fastreport\\JGZL\\管道试压包文件资料.frx");
list[1] = new ListItem("1", "File\\Fastreport\\JGZL\\管道压力试验技术要求.frx");
@@ -455,21 +450,21 @@ namespace FineUIPro.Web.HJGL.TestPackage
doc1.AppendDocument(doc5, Aspose.Words.ImportFormatMode.KeepSourceFormatting);
//将合并的文档保存为 DOCX 文件
var Path = Funs.RootPath + "FileUpload/"+ ptp_id + "Result.docx";
var Path = Funs.RootPath + "FileUpload/" + ptp_id + "Result.docx";
doc1.Save(Path);
keyValuePairs.Add(Path, exportName);
keyValuePairs.Add(Path, exportName);
/* FileInfo info = new FileInfo(Path);
long fileSize = info.Length;
/* FileInfo info = new FileInfo(Path);
long fileSize = info.Length;
System.Web.HttpContext.Current.Response.Clear();
System.Web.HttpContext.Current.Response.ContentType = "application/x-zip-compressed";
System.Web.HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(exportName + ".docx", System.Text.Encoding.UTF8));
System.Web.HttpContext.Current.Response.AddHeader("Content-Length", fileSize.ToString());
System.Web.HttpContext.Current.Response.TransmitFile(Path, 0, fileSize);
System.Web.HttpContext.Current.Response.Flush();
System.Web.HttpContext.Current.Response.Close();*/
System.Web.HttpContext.Current.Response.Clear();
System.Web.HttpContext.Current.Response.ContentType = "application/x-zip-compressed";
System.Web.HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(exportName + ".docx", System.Text.Encoding.UTF8));
System.Web.HttpContext.Current.Response.AddHeader("Content-Length", fileSize.ToString());
System.Web.HttpContext.Current.Response.TransmitFile(Path, 0, fileSize);
System.Web.HttpContext.Current.Response.Flush();
System.Web.HttpContext.Current.Response.Close();*/
//File.Delete(Path);
File.Delete(PathA);
File.Delete(PathB);
@@ -481,7 +476,7 @@ namespace FineUIPro.Web.HJGL.TestPackage
}
return keyValuePairs;
}
}
#endregion
@@ -498,7 +493,7 @@ namespace FineUIPro.Web.HJGL.TestPackage
select new { MaterialCode1 = y.MaterialCode, MaterialCode2 = z.MaterialCode }).FirstOrDefault();
if (weldjoint != null)
{
if (!string.IsNullOrEmpty(weldjoint.MaterialCode1)&&!string.IsNullOrEmpty(weldjoint.MaterialCode2))
if (!string.IsNullOrEmpty(weldjoint.MaterialCode1) && !string.IsNullOrEmpty(weldjoint.MaterialCode2))
{
materialCode = weldjoint.MaterialCode1 + "/" + weldjoint.MaterialCode2;
}
@@ -513,7 +508,7 @@ namespace FineUIPro.Web.HJGL.TestPackage
materialCode = weldjoint.MaterialCode2;
}
}
}
}
return materialCode;
@@ -1,17 +1,13 @@
using BLL;
using NPOI.POIFS.Crypt.Dsig;
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.TestPackage
{
public partial class TestPackageDatePrint : PageBase
{
{
/// <summary>
/// 试压包主键
/// </summary>
@@ -40,7 +36,7 @@ namespace FineUIPro.Web.HJGL.TestPackage
}
private void BindGrid()
{
var list = BLL.TestPackagePrintService.GetListByPTP_ID(PTP_ID);
var list = BLL.TestPackagePrintService.GetListByPTP_ID(PTP_ID);
//根据 BLL.TestPackagePrintService.TypeIntMap 和 list 进行左连接,确保所有类型都显示,获取对应的 PrintCount,没有的类型 PrintCount 为 0
var result = from type in BLL.TestPackagePrintService.TypeIntMap
join item in list on type.Key equals item.TypeInt into gj
@@ -69,7 +65,7 @@ namespace FineUIPro.Web.HJGL.TestPackage
// 在文件名中加入时间戳,例如:PTP_ID_2025-09-17-14-30-00.pdf
string timeStamp = DateTime.Now.ToString("yyyy-MM-dd-HH-mm-ss");
string fileName = $"{PTP_ID}_{timeStamp}.pdf";
string filePath = System.IO.Path.Combine(Funs.RootPath, "FileUpload", fileName);
string filePath = System.IO.Path.Combine(Funs.RootPath, "FileUpload", fileName);
BLL.FastReportService.ExportMergeReport(FastReportItemList, filePath, "1");
FileInfo info = new FileInfo(filePath);
long fileSize = info.Length;
@@ -80,6 +76,6 @@ namespace FineUIPro.Web.HJGL.TestPackage
System.Web.HttpContext.Current.Response.TransmitFile(filePath, 0, fileSize);
System.Web.HttpContext.Current.Response.Flush();
System.Web.HttpContext.Current.Response.Close();
}
}
}
}
@@ -256,11 +256,11 @@ namespace FineUIPro.Web.HJGL.TestPackage
else if (this.tvControlItem.SelectedNode.CommandName == "TestPackage")
{
var testPackageManage = BLL.TestPackageEditService.GetTestPackageByID(this.PTP_ID);
if (testPackageManage != null && !string.IsNullOrEmpty(testPackageManage.UnitWorkId))
{
parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(testPackageManage.UnitWorkId);
}
}
}
ctlAuditFlow.Url_item = BLL.Project_SysSetService.GetAvevaNetUrl_Item(this.CurrUser.LoginProjectId) + parameter3D.ModelName;
@@ -577,8 +577,8 @@ namespace FineUIPro.Web.HJGL.TestPackage
protected void Grid1_RowClick(object sender, GridRowClickEventArgs e)
{
var pTP_Pipeline = (from x in Funs.DB.PTP_PipelineList
where x.PT_PipeId == Grid1.SelectedRowID
select x).FirstOrDefault();
where x.PT_PipeId == Grid1.SelectedRowID
select x).FirstOrDefault();
var pipe = PipelineService.GetPipelineByPipelineId(pTP_Pipeline.PipelineId);
var pipecode = "/" + pipe.PipelineCode;
Model.Parameter3D parameter3D = new Model.Parameter3D();
@@ -587,7 +587,7 @@ namespace FineUIPro.Web.HJGL.TestPackage
parameter3D.ColorModel = colorModel;
parameter3D.TagNum = pipecode;
parameter3D.ButtonType = "4";
// parameter3D.Line_No = Line_No;
// parameter3D.Line_No = Line_No;
if (this.tvControlItem.SelectedNode.CommandName == "单位工程")
{
parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(tvControlItem.SelectedNodeID);
@@ -1,15 +1,10 @@
using BLL;
using FineUIPro.Web.ProjectData;
using MiniExcelLibs;
using NPOI.POIFS.Crypt.Dsig;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.IO;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace FineUIPro.Web.HJGL.TestPackage
@@ -191,7 +186,7 @@ namespace FineUIPro.Web.HJGL.TestPackage
if (unitWork != null)
{
pipeline.UnitWorkId = Request.Params["UnitWorkId"];
pipeline.UnitId = unitWork.UnitId;
pipeline.UnitId = unitWork.UnitId;
}
if (pds[i].B != null)
@@ -255,7 +250,7 @@ namespace FineUIPro.Web.HJGL.TestPackage
{
result.Add("第" + (i + 1).ToString() + "行," + "管线号" + "," + "此项为必填项!" + "|");
}
pipeline.Tabler = this.CurrUser.PersonId;
pipeline.TableDate = DateTime.Now;
@@ -392,12 +387,12 @@ namespace FineUIPro.Web.HJGL.TestPackage
ProjectId = this.CurrUser.LoginProjectId,
UnitId = x.UnitId,
UnitWorkId = x.UnitWorkId,
TestPackageNo=x.TestPackageNo,
TestPackageName=x.TestPackageName,
Tabler =x.Tabler,
TableDate=x.TableDate,
TestPackageNo = x.TestPackageNo,
TestPackageName = x.TestPackageName,
Tabler = x.Tabler,
TableDate = x.TableDate,
Remark = x.Remark,
AdjustTestPressure=x.AdjustTestPressure
AdjustTestPressure = x.AdjustTestPressure
}).DistinctBy(temp => new
{
temp.PTP_ID,
@@ -441,16 +436,16 @@ namespace FineUIPro.Web.HJGL.TestPackage
Model.SGGLDB db = Funs.DB;
var getTestPackage = from y in db.PTP_TestPackage where y.UnitWorkId == UnitWorkId select y;
var allPipelineLists = from x in db.PTP_PipelineList
join y in db.PTP_TestPackage on x.PTP_ID equals y.PTP_ID
where y.UnitWorkId == UnitWorkId
select x;
join y in db.PTP_TestPackage on x.PTP_ID equals y.PTP_ID
where y.UnitWorkId == UnitWorkId
select x;
List<Model.PTP_PipelineList> pipelineList_add = new List<Model.PTP_PipelineList>();
var weldJoints = (from x in PipelineList
select new Model.PTP_PipelineList
{
{
PTP_ID = x.PTP_ID,
TestPackageNo=x.TestPackageNo,
TestPackageNo = x.TestPackageNo,
PipelineId = x.PipelineId,
//TestPressure = x.TestPressure,
}).DistinctBy(temp => new
@@ -517,20 +512,20 @@ namespace FineUIPro.Web.HJGL.TestPackage
{
string UnitWorkId = Request.Params["UnitWorkId"];
var queryList = from x in Funs.DB.View_HJGL_Pipeline
join y in Funs.DB.PTP_PipelineList on x.PipelineId equals y.PipelineId into yGroup
from y in yGroup.DefaultIfEmpty()
where x.UnitWorkId == UnitWorkId && y==null
select new
{
x.PipelineId,
x.PipelineCode,
x.PipingClassCode,
x.MediumName,
x.DesignPress,
x.DesignTemperature,
x.TestMediumCode,
x.TestPressure
};
join y in Funs.DB.PTP_PipelineList on x.PipelineId equals y.PipelineId into yGroup
from y in yGroup.DefaultIfEmpty()
where x.UnitWorkId == UnitWorkId && y == null
select new
{
x.PipelineId,
x.PipelineCode,
x.PipingClassCode,
x.MediumName,
x.DesignPress,
x.DesignTemperature,
x.TestMediumCode,
x.TestPressure
};
// materialize and add sequence number
var list = queryList.ToList();
@@ -557,9 +552,9 @@ namespace FineUIPro.Web.HJGL.TestPackage
{
var value = new
{
model = ""
model = new List<object>()
};
MiniExcel.SaveAsByTemplate(path, uploadfilepath, value);
MiniExcel.SaveAsByTemplate(path, uploadfilepath, value);
}
FileInfo info = new FileInfo(path);
long fileSize = info.Length;
@@ -569,7 +564,7 @@ namespace FineUIPro.Web.HJGL.TestPackage
System.Web.HttpContext.Current.Response.ContentEncoding = System.Text.Encoding.UTF8;
System.Web.HttpContext.Current.Response.AddHeader("Content-Length", fileSize.ToString().Trim());
System.Web.HttpContext.Current.Response.TransmitFile(path, 0, fileSize);
System.Web.HttpContext.Current.Response.Flush();
System.Web.HttpContext.Current.Response.Flush();
File.Delete(path);
System.Web.HttpContext.Current.Response.End();
@@ -148,7 +148,7 @@ namespace FineUIPro.Web.HJGL.TestPackage
LEFT JOIN dbo.PTP_PipelineList AS IsoList ON IsoList.PipelineId = IsoInfo.PipelineId
WHERE IsoInfo.ProjectId= @ProjectId";
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
if (!string.IsNullOrEmpty(this.PTP_ID))
{
strSql += " AND (IsoList.PTP_ID IS NULL OR IsoList.PTP_ID = @PTP_ID)";
@@ -270,7 +270,7 @@ namespace FineUIPro.Web.HJGL.TestPackage
ShowNotify("此施压包已审核不能修改!", MessageBoxIcon.Warning);
return;
}
Model.PTP_TestPackage testPackage = new Model.PTP_TestPackage();
testPackage.ProjectId = this.CurrUser.LoginProjectId;
if (this.drpUnitWork.SelectedValue != BLL.Const._Null)
@@ -1,6 +1,5 @@
using BLL;
using System;
using System.Linq;
namespace FineUIPro.Web.HJGL.WPQ
{
+1 -1
View File
@@ -41,7 +41,7 @@ namespace FineUIPro.Web.HJGL.WPQ
listStr.Add(new SqlParameter("@WPQCode", "%" + this.txtWeldingProcedureCode.Text.Trim() + "%"));
}
if (drpUnit.SelectedValue!=Const._Null)
if (drpUnit.SelectedValue != Const._Null)
{
strSql += " AND UnitId =@UnitId";
listStr.Add(new SqlParameter("@UnitId", drpUnit.SelectedValue));
@@ -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)
@@ -31,7 +31,7 @@ namespace FineUIPro.Web.HJGL.WeldingReport
listStr.Add(new SqlParameter("@projectId", this.CurrUser.LoginProjectId));
if (this.drpUnitId.SelectedValue != BLL.Const._Null)
{
{
listStr.Add(new SqlParameter("@unitId", this.drpUnitId.SelectedValue));
}
else
@@ -54,7 +54,7 @@ namespace FineUIPro.Web.HJGL.WeldingReport
listStr.Add(new SqlParameter("@JointAttribute", null));
}
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunProc("sp_rpt_WelderEfficacy", parameter);