2023-07-07
This commit is contained in:
Binary file not shown.
@@ -1,5 +1,6 @@
|
|||||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ActionPlanListEdit.aspx.cs" Inherits="FineUIPro.Mobile.ZHGL.Plan.ActionPlanListEdit" %>
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ActionPlanListEdit.aspx.cs" Inherits="FineUIPro.Mobile.ZHGL.Plan.ActionPlanListEdit" %>
|
||||||
|
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
@@ -159,7 +160,7 @@
|
|||||||
BodyPadding="10px" EnableCollapse="true" ShowHeader="true" AutoScroll="true"
|
BodyPadding="10px" EnableCollapse="true" ShowHeader="true" AutoScroll="true"
|
||||||
runat="server">
|
runat="server">
|
||||||
<f:Grid ID="gvApprove" IsFluid="true" CssClass="blockpanel" ShowBorder="true" ShowHeader="false" runat="server" EnableCollapse="false"
|
<f:Grid ID="gvApprove" IsFluid="true" CssClass="blockpanel" ShowBorder="true" ShowHeader="false" runat="server" EnableCollapse="false"
|
||||||
DataKeyNames="ActionPlanListApproveId" EnableColumnLines="true" OnRowCommand="gvApprove_RowCommand" ForceFit="true">
|
DataKeyNames="ActionPlanListApproveId" EnableColumnLines="true" OnRowCommand="gvApprove_RowCommand">
|
||||||
<Columns>
|
<Columns>
|
||||||
<f:RowNumberField Width="40px" HeaderText="序号" HeaderTextAlign="Center" TextAlign="Center" />
|
<f:RowNumberField Width="40px" HeaderText="序号" HeaderTextAlign="Center" TextAlign="Center" />
|
||||||
<f:TemplateField ColumnID="ApproveType" Width="150px" HeaderText="办理类型" HeaderTextAlign="Center" TextAlign="Center"
|
<f:TemplateField ColumnID="ApproveType" Width="150px" HeaderText="办理类型" HeaderTextAlign="Center" TextAlign="Center"
|
||||||
@@ -246,4 +247,3 @@
|
|||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ using System.Web.UI.WebControls;
|
|||||||
|
|
||||||
namespace FineUIPro.Mobile.ZHGL.Plan
|
namespace FineUIPro.Mobile.ZHGL.Plan
|
||||||
{
|
{
|
||||||
public partial class ActionPlanListEdit : PageBase
|
public partial class ActionPlanListEdit : PageBaseMobile
|
||||||
{
|
{
|
||||||
#region 定义项
|
#region 定义项
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
Binary file not shown.
@@ -152,7 +152,6 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
Target = Target.Self
|
Target = Target.Self
|
||||||
};
|
};
|
||||||
alert.Show();
|
alert.Show();
|
||||||
//ShowNotify("'" + ex.Message + "'", MessageBoxIcon.Warning);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#region 读Excel提取数据
|
#region 读Excel提取数据
|
||||||
@@ -162,34 +161,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
/// <param name="filename">Excel文件路径名</param>
|
/// <param name="filename">Excel文件路径名</param>
|
||||||
private void ImportXlsToData(string fileName)
|
private void ImportXlsToData(string fileName)
|
||||||
{
|
{
|
||||||
//支持.xls和.xlsx,即包括office2010等版本的 HDR=Yes代表第一行是标题,不是数据;
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
//string oleDBConnString = String.Empty;
|
|
||||||
//oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;";
|
|
||||||
//oleDBConnString += "Data Source=";
|
|
||||||
//oleDBConnString += fileName;
|
|
||||||
//oleDBConnString += ";Extended Properties=Excel 8.0;";
|
|
||||||
//OleDbConnection oleDBConn = null;
|
|
||||||
//OleDbDataAdapter oleAdMaster = null;
|
|
||||||
//DataTable m_tableName = new DataTable();
|
|
||||||
//DataSet ds = new DataSet();
|
|
||||||
|
|
||||||
//oleDBConn = new OleDbConnection(oleDBConnString);
|
|
||||||
//oleDBConn.Open();
|
|
||||||
//m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);
|
|
||||||
|
|
||||||
//if (m_tableName != null && m_tableName.Rows.Count > 0)
|
|
||||||
//{
|
|
||||||
// m_tableName.TableName = m_tableName.Rows[0]["TABLE_NAME"].ToString().Trim();
|
|
||||||
//}
|
|
||||||
//string sqlMaster;
|
|
||||||
//sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]";
|
|
||||||
//oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn);
|
|
||||||
//oleAdMaster.Fill(ds, "m_tableName");
|
|
||||||
//oleAdMaster.Dispose();
|
|
||||||
//oleDBConn.Close();
|
|
||||||
//oleDBConn.Dispose();
|
|
||||||
var ds = MiniExcel.Query(fileName).ToList();
|
var ds = MiniExcel.Query(fileName).ToList();
|
||||||
var columns = MiniExcel.GetColumns(fileName);
|
var columns = MiniExcel.GetColumns(fileName);
|
||||||
var cnt = columns.Count;
|
var cnt = columns.Count;
|
||||||
@@ -214,14 +187,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
{
|
{
|
||||||
|
|
||||||
ErrLogInfo.WriteLog("焊接基础数据上传失败!", exc);
|
ErrLogInfo.WriteLog("焊接基础数据上传失败!", exc);
|
||||||
//return null;
|
|
||||||
// return dt;
|
|
||||||
}
|
}
|
||||||
//finally
|
|
||||||
//{
|
|
||||||
// conn.Close();
|
|
||||||
// conn.Dispose();
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@@ -234,524 +201,6 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
/// <param name="pds">数据集</param>
|
/// <param name="pds">数据集</param>
|
||||||
/// <param name="Cols">数据集行数</param>
|
/// <param name="Cols">数据集行数</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
private Model.ResponeData AddDatasetToSQL(DataTable pds, int Cols)
|
|
||||||
{
|
|
||||||
Model.ResponeData responeData = new Model.ResponeData();
|
|
||||||
string result = string.Empty;
|
|
||||||
int ic, ir;
|
|
||||||
//pds = BLL.Funs.FilterBlankLines(pds);
|
|
||||||
ic = pds.Columns.Count;
|
|
||||||
ir = pds.Rows.Count;
|
|
||||||
if (ic < Cols)
|
|
||||||
{
|
|
||||||
responeData.code = 0;
|
|
||||||
responeData.message = "导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "列";
|
|
||||||
return responeData;
|
|
||||||
|
|
||||||
//ShowNotify("导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "列", MessageBoxIcon.Warning);
|
|
||||||
//return false;
|
|
||||||
}
|
|
||||||
if (pds != null && ir > 0)
|
|
||||||
{
|
|
||||||
var getPipeline = from x in Funs.DB.View_HJGL_WeldJoint where x.ProjectId == this.CurrUser.LoginProjectId select x;
|
|
||||||
var getMedium = from x in Funs.DB.Base_Medium where x.ProjectId == this.CurrUser.LoginProjectId select x;//介质
|
|
||||||
var getPipeLineClass = from x in Funs.DB.Base_PipingClass where x.ProjectId == this.CurrUser.LoginProjectId select x;//管道等级
|
|
||||||
var getDetectionRate = from x in Funs.DB.Base_DetectionRate select x;//探伤比例
|
|
||||||
var getDetectionType = from x in Funs.DB.Base_DetectionType select x;//探伤类型
|
|
||||||
var getPressurePipingClass = from x in Funs.DB.Base_PressurePipingClass select x;//压力管道级别
|
|
||||||
var getTestMedium = from x in Funs.DB.Base_TestMedium where x.TestType == "1" select x;//压力试验介质
|
|
||||||
var getLeakMedium = from x in Funs.DB.Base_TestMedium where x.TestType == "2" select x;//泄露性试验介质
|
|
||||||
var getPurgeMethod = from x in Funs.DB.Base_PurgeMethod select x;
|
|
||||||
var getMaterial = from x in Funs.DB.Base_Material select x;
|
|
||||||
var getWeldType = from x in Funs.DB.Base_WeldType select x;
|
|
||||||
//var getComponents = from x in Funs.DB.Base_Components where x.ProjeceId == this.CurrUser.LoginProjectId select x;
|
|
||||||
|
|
||||||
|
|
||||||
for (int i = 0; i < ir; i++)
|
|
||||||
{
|
|
||||||
Model.View_HJGL_WeldJoint pipeline = new Model.View_HJGL_WeldJoint();
|
|
||||||
//pipeline.PipelineId = SQLHelper.GetNewID();
|
|
||||||
Model.WBS_UnitWork unitWork = BLL.UnitWorkService.GetUnitWorkByUnitWorkId(Request.Params["UnitWorkId"]);
|
|
||||||
if (unitWork != null)
|
|
||||||
{
|
|
||||||
pipeline.UnitWorkId = Request.Params["UnitWorkId"];
|
|
||||||
pipeline.UnitId = unitWork.UnitId;
|
|
||||||
}
|
|
||||||
|
|
||||||
string col0 = pds.Rows[i][0].ToString();
|
|
||||||
string pipeLineId = string.Empty;
|
|
||||||
if (string.IsNullOrEmpty(col0))
|
|
||||||
{
|
|
||||||
result += "第" + (i + 2).ToString() + "行," + "管线号" + "," + "此项为必填项!" + "|";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
pipeline.PipelineCode = col0;
|
|
||||||
}
|
|
||||||
|
|
||||||
pipeline.SingleNumber = pds.Rows[i][1].ToString();
|
|
||||||
pipeline.SingleName = pds.Rows[i][2].ToString();
|
|
||||||
|
|
||||||
string col3 = pds.Rows[i][3].ToString();
|
|
||||||
if (string.IsNullOrEmpty(col3))
|
|
||||||
{
|
|
||||||
result += "第" + (i + 2).ToString() + "行," + "介质名称" + "," + "此项为必填项!" + "|";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var Medium = getMedium.FirstOrDefault(x => x.MediumName == col3);
|
|
||||||
if (Medium == null)
|
|
||||||
{
|
|
||||||
result += "第" + (i + 2).ToString() + "行," + "该介质不存在!" + "|";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
pipeline.MediumId = Medium.MediumId;
|
|
||||||
pipeline.MediumName = col3;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
string col4 = pds.Rows[i][4].ToString();
|
|
||||||
if (string.IsNullOrEmpty(col4))
|
|
||||||
{
|
|
||||||
result += "第" + (i + 2).ToString() + "行," + "管道等级" + "," + "此项为必填项!" + "|";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var PipeLineClass = getPipeLineClass.FirstOrDefault(x => x.PipingClassCode == col4);
|
|
||||||
if (PipeLineClass == null)
|
|
||||||
{
|
|
||||||
result += "第" + (i + 2).ToString() + "行," + "该管道等级不存在!" + "|";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
pipeline.PipingClassId = PipeLineClass.PipingClassId;
|
|
||||||
pipeline.PipingClassCode = col4;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
string col5 = pds.Rows[i][5].ToString();
|
|
||||||
if (!string.IsNullOrEmpty(col5))
|
|
||||||
{
|
|
||||||
var DetectionRate = getDetectionRate.FirstOrDefault(x => x.DetectionRateValue.ToString() == col5.Replace("%", "") || x.DetectionRateCode == col5);
|
|
||||||
if (DetectionRate == null)
|
|
||||||
{
|
|
||||||
result += "第" + (i + 2).ToString() + "行," + "该探伤比例不存在!" + "|";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
pipeline.DetectionRateId = DetectionRate.DetectionRateId;
|
|
||||||
pipeline.DetectionRateCode = col5;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
result += "第" + (i + 2).ToString() + "行," + "探伤比例" + "," + "此项为必填项!" + "|";
|
|
||||||
}
|
|
||||||
|
|
||||||
string col6 = pds.Rows[i][6].ToString();
|
|
||||||
if (!string.IsNullOrEmpty(col6))
|
|
||||||
{
|
|
||||||
string[] types = col6.ToString().Split(',');
|
|
||||||
foreach (string t in types)
|
|
||||||
{
|
|
||||||
var type = getDetectionType.FirstOrDefault(x => x.DetectionTypeCode == t);
|
|
||||||
if (type == null)
|
|
||||||
{
|
|
||||||
result += "第" + (i + 2).ToString() + "行," + "探伤类型【" + t + "】不存在!" + "|";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
pipeline.DetectionType += type.DetectionTypeId + "|";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!string.IsNullOrEmpty(pipeline.DetectionType))
|
|
||||||
{
|
|
||||||
pipeline.DetectionType = pipeline.DetectionType.Substring(0, pipeline.DetectionType.Length - 1);
|
|
||||||
pipeline.DetectionTypeStr = col6;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
result += "第" + (i + 2).ToString() + "行," + "探伤类型" + "," + "此项为必填项!" + "|";
|
|
||||||
}
|
|
||||||
|
|
||||||
string col7 = pds.Rows[i][7].ToString();
|
|
||||||
if (!string.IsNullOrEmpty(col7))
|
|
||||||
{
|
|
||||||
pipeline.DesignTemperature = col7;
|
|
||||||
}
|
|
||||||
string col8 = pds.Rows[i][8].ToString();
|
|
||||||
if (!string.IsNullOrEmpty(col8))
|
|
||||||
{
|
|
||||||
pipeline.DesignPress = col8;
|
|
||||||
}
|
|
||||||
string col9 = pds.Rows[i][9].ToString();
|
|
||||||
if (!string.IsNullOrEmpty(col9))
|
|
||||||
{
|
|
||||||
var TestMedium = getTestMedium.FirstOrDefault(x => x.MediumName == col9);
|
|
||||||
if (TestMedium == null)
|
|
||||||
{
|
|
||||||
result += "第" + (i + 2).ToString() + "行," + "该压力试验介质不存在!" + "|";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
pipeline.TestMedium = TestMedium.TestMediumId;
|
|
||||||
pipeline.TestMediumName = col9;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
string col10 = pds.Rows[i][10].ToString();
|
|
||||||
if (!string.IsNullOrEmpty(col10))
|
|
||||||
{
|
|
||||||
pipeline.TestPressure = col10;
|
|
||||||
}
|
|
||||||
string col11 = pds.Rows[i][11].ToString();
|
|
||||||
if (!string.IsNullOrEmpty(col11))
|
|
||||||
{
|
|
||||||
var PressurePipingClass = getPressurePipingClass.FirstOrDefault(x => x.PressurePipingClassCode == col11);
|
|
||||||
if (PressurePipingClass == null)
|
|
||||||
{
|
|
||||||
result += "第" + (i + 2).ToString() + "行," + "该压力管道级别不存在!" + "|";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
pipeline.PressurePipingClassId = PressurePipingClass.PressurePipingClassId;
|
|
||||||
pipeline.PressurePipingClassCode = col11;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
string col12 = pds.Rows[i][12].ToString();
|
|
||||||
if (!string.IsNullOrEmpty(col12))
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var PipeLenth = Funs.GetNewDecimal(col12);
|
|
||||||
pipeline.PipeLenth = PipeLenth;
|
|
||||||
}
|
|
||||||
catch (Exception)
|
|
||||||
{
|
|
||||||
result += "第" + (i + 2).ToString() + "行," + "管线长度(m)格式输入有误" + "|";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
string col13 = pds.Rows[i][13].ToString();
|
|
||||||
if (!string.IsNullOrEmpty(col13))
|
|
||||||
{
|
|
||||||
var LeakMedium = getLeakMedium.FirstOrDefault(x => x.MediumName == col13);
|
|
||||||
if (LeakMedium == null)
|
|
||||||
{
|
|
||||||
result += "第" + (i + 2).ToString() + "行," + "该泄露试验介质不存在!" + "|";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
pipeline.LeakMedium = LeakMedium.TestMediumId;
|
|
||||||
pipeline.LeakMediumName = col13;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
string col14 = pds.Rows[i][14].ToString();
|
|
||||||
if (!string.IsNullOrEmpty(col14))
|
|
||||||
{
|
|
||||||
pipeline.LeakPressure = col14;
|
|
||||||
}
|
|
||||||
string col15 = pds.Rows[i][15].ToString();
|
|
||||||
if (!string.IsNullOrEmpty(col15))
|
|
||||||
{
|
|
||||||
var PurgeMethod = getPurgeMethod.FirstOrDefault(x => x.PurgeMethodCode == col15);
|
|
||||||
if (PurgeMethod == null)
|
|
||||||
{
|
|
||||||
result += "第" + (i + 2).ToString() + "行," + "该吹洗要求不存在!" + "|";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
pipeline.PCMedium = PurgeMethod.PurgeMethodId;
|
|
||||||
pipeline.PurgeMethodCode = col15;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
string col16 = pds.Rows[i][16].ToString();
|
|
||||||
if (!string.IsNullOrEmpty(col16))
|
|
||||||
{
|
|
||||||
pipeline.VacuumPressure = col16;
|
|
||||||
}
|
|
||||||
string col17 = pds.Rows[i][17].ToString();
|
|
||||||
if (!string.IsNullOrEmpty(col17))
|
|
||||||
{
|
|
||||||
var material = getMaterial.FirstOrDefault(x => x.MaterialCode == col17);
|
|
||||||
if (material == null)
|
|
||||||
{
|
|
||||||
result += "第" + (i + 2).ToString() + "行," + "该材质不存在!" + "|";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
pipeline.MaterialId = material.MaterialId;
|
|
||||||
pipeline.PipeMaterialCode = col17;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
pipeline.Remark = pds.Rows[i][18].ToString();
|
|
||||||
|
|
||||||
// 以下是焊口信息
|
|
||||||
string col19 = pds.Rows[i][19].ToString();
|
|
||||||
if (string.IsNullOrEmpty(col19))
|
|
||||||
{
|
|
||||||
result += "第" + (i + 2).ToString() + "行," + "焊口号" + "," + "此项为必填项!" + "|";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
//var oldWeldJoint = getPipeline.FirstOrDefault(x => x.PipelineId == pipeLineId && x.WeldJointCode == col19);
|
|
||||||
//if (oldWeldJoint != null)
|
|
||||||
//{
|
|
||||||
// pipeline.WeldJointId = oldWeldJoint.WeldJointId;
|
|
||||||
//}
|
|
||||||
//else
|
|
||||||
//{
|
|
||||||
// pipeline.WeldJointId = SQLHelper.GetNewID();
|
|
||||||
//}
|
|
||||||
pipeline.WeldJointCode = col19;
|
|
||||||
}
|
|
||||||
|
|
||||||
string col20 = pds.Rows[i][20].ToString();
|
|
||||||
if (!string.IsNullOrEmpty(col20))
|
|
||||||
{
|
|
||||||
var material = getMaterial.FirstOrDefault(x => x.MaterialCode == col20);
|
|
||||||
if (material == null)
|
|
||||||
{
|
|
||||||
result += "第" + (i + 2).ToString() + "行," + "该材质1不存在!" + "|";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
pipeline.Material1Id = material.MaterialId;
|
|
||||||
pipeline.Material1Code = col20;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
result += "第" + (i + 2).ToString() + "行," + "材质1" + "," + "此项为必填项!" + "|";
|
|
||||||
}
|
|
||||||
|
|
||||||
string col21 = pds.Rows[i][21].ToString();
|
|
||||||
if (!string.IsNullOrEmpty(col21))
|
|
||||||
{
|
|
||||||
var material = getMaterial.FirstOrDefault(x => x.MaterialCode == col21);
|
|
||||||
if (material == null)
|
|
||||||
{
|
|
||||||
result += "第" + (i + 2).ToString() + "行," + "该材质2不存在!" + "|";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
pipeline.Material2Id = material.MaterialId;
|
|
||||||
pipeline.Material2Code = col21;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
result += "第" + (i + 2).ToString() + "行," + "材质2" + "," + "此项为必填项!" + "|";
|
|
||||||
}
|
|
||||||
|
|
||||||
string col22 = pds.Rows[i][22].ToString().Replace("Φ", "");
|
|
||||||
string col27 = pds.Rows[i][22].ToString();
|
|
||||||
if (rbDiaType.SelectedValue=="1")
|
|
||||||
{
|
|
||||||
if (!string.IsNullOrEmpty(col27))
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
decimal Dia = Convert.ToDecimal(col27);
|
|
||||||
pipeline.Dia = Dia;
|
|
||||||
|
|
||||||
//var inch = BLL.Base_DNCompareService.GetSizeByDia(Dia);
|
|
||||||
//if (inch != null)
|
|
||||||
//{
|
|
||||||
// pipeline.Size = inch;
|
|
||||||
//}
|
|
||||||
}
|
|
||||||
catch (Exception)
|
|
||||||
{
|
|
||||||
result += "第" + (i + 2).ToString() + "行," + "外径格式输入有误" + "|";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
result += "第" + (i + 2).ToString() + "行," + "外径" + "," + "此项为必填项!" + "|";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (!string.IsNullOrEmpty(col22))
|
|
||||||
{
|
|
||||||
pipeline.DNDia = col22;
|
|
||||||
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
result += "第" + (i + 2).ToString() + "行," + "DN公称直径" + "," + "此项为必填项!" + "|";
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
string col23 = pds.Rows[i][23].ToString();
|
|
||||||
if (!string.IsNullOrEmpty(col23))
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
decimal Size = Convert.ToDecimal(col23);
|
|
||||||
pipeline.Size = Size;
|
|
||||||
}
|
|
||||||
catch (Exception)
|
|
||||||
{
|
|
||||||
result += "第" + (i + 2).ToString() + "行," + "达因格式输入有误" + "|";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
result += "第" + (i + 2).ToString() + "行," + "达因" + "," + "此项为必填项!" + "|";
|
|
||||||
}
|
|
||||||
|
|
||||||
string col24 = pds.Rows[i][24].ToString();
|
|
||||||
if (!string.IsNullOrEmpty(col24))
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var Thickness = Convert.ToDecimal(col24);
|
|
||||||
pipeline.Thickness = Thickness;
|
|
||||||
//是否根据壁厚计算达因
|
|
||||||
//Model.Project_Sys_Set thicknessSet = BLL.Project_SysSetService.GetSysSetBySetId("7", this.CurrUser.LoginProjectId);
|
|
||||||
//if (thicknessSet != null && thicknessSet.IsAuto == true)
|
|
||||||
//{
|
|
||||||
// if (pipeline.Size != null)
|
|
||||||
// {
|
|
||||||
// pipeline.Size = Convert.ToDecimal(BLL.WeldJointService.GetSizeByThickness(pipeline.Size, Thickness));
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
}
|
|
||||||
catch (Exception)
|
|
||||||
{
|
|
||||||
result += "第" + (i + 2).ToString() + "行," + "壁厚格式输入有误" + "|";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
result += "第" + (i + 2).ToString() + "行," + "壁厚" + "," + "此项为必填项!" + "|";
|
|
||||||
}
|
|
||||||
if (rbDiaType.SelectedValue=="1")
|
|
||||||
{
|
|
||||||
pipeline.Specification = "Φ" + (pipeline.Dia ?? 0).ToString() + "*" + (pipeline.Thickness ?? 0).ToString();
|
|
||||||
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
pipeline.Specification = pipeline.DNDia + "*" + (pipeline.Thickness ?? 0).ToString();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
string col25 = pds.Rows[i][25].ToString();
|
|
||||||
if (!string.IsNullOrEmpty(col25))
|
|
||||||
{
|
|
||||||
var weldType = getWeldType.FirstOrDefault(x => x.WeldTypeCode == col25);
|
|
||||||
if (weldType == null)
|
|
||||||
{
|
|
||||||
result += "第" + (i + 2).ToString() + "行," + "该焊缝类型不存在!" + "|";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
pipeline.WeldTypeId = weldType.WeldTypeId;
|
|
||||||
pipeline.WeldTypeCode = col25;
|
|
||||||
|
|
||||||
if (col25.Contains("B"))
|
|
||||||
{
|
|
||||||
if (col6.Contains("RT"))
|
|
||||||
{
|
|
||||||
Model.Base_DetectionType rt = BLL.Base_DetectionTypeService.GetDetectionTypeIdByDetectionTypeCode("RT");
|
|
||||||
if (rt != null)
|
|
||||||
{
|
|
||||||
pipeline.DetectionTypeId = rt.DetectionTypeId;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Model.Base_DetectionType ut = BLL.Base_DetectionTypeService.GetDetectionTypeIdByDetectionTypeCode("UT");
|
|
||||||
if (ut != null)
|
|
||||||
{
|
|
||||||
pipeline.DetectionTypeId = ut.DetectionTypeId;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (col6.Contains("MT"))
|
|
||||||
{
|
|
||||||
Model.Base_DetectionType mt = BLL.Base_DetectionTypeService.GetDetectionTypeIdByDetectionTypeCode("MT");
|
|
||||||
if (mt != null)
|
|
||||||
{
|
|
||||||
pipeline.DetectionTypeId = mt.DetectionTypeId;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Model.Base_DetectionType pt = BLL.Base_DetectionTypeService.GetDetectionTypeIdByDetectionTypeCode("PT");
|
|
||||||
if (pt != null)
|
|
||||||
{
|
|
||||||
pipeline.DetectionTypeId = pt.DetectionTypeId;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
result += "第" + (i + 2).ToString() + "行," + "焊缝类型" + "," + "此项为必填项!" + "|";
|
|
||||||
}
|
|
||||||
string col26 = pds.Rows[i][26].ToString();
|
|
||||||
if (!string.IsNullOrEmpty(col26))
|
|
||||||
{
|
|
||||||
var JointAttribute = BLL.DropListService.HJGL_JointAttribute();
|
|
||||||
|
|
||||||
var q = JointAttribute.Where(x => x.Value == col26);
|
|
||||||
if (q==null )
|
|
||||||
{
|
|
||||||
result += "第" + (i + 2).ToString() + "行," + "该焊口属性不存在!" + "|";
|
|
||||||
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
pipeline.JointAttribute = col26;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
result += "第" + (i + 2).ToString() + "行," + "焊口属性" + "," + "此项为必填项!" + "|";
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(pipeline.PipelineCode) && !string.IsNullOrEmpty(pipeline.WeldJointCode))
|
|
||||||
{
|
|
||||||
pipeline.ProjectId = this.CurrUser.LoginProjectId;
|
|
||||||
PipelineList.Add(pipeline);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
if (!string.IsNullOrEmpty(result))
|
|
||||||
{
|
|
||||||
PipelineList.Clear();
|
|
||||||
result = result.Substring(0, result.LastIndexOf("|"));
|
|
||||||
errorInfos = result;
|
|
||||||
responeData.code = 0;
|
|
||||||
responeData.message = errorInfos;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
errorInfos = string.Empty;
|
|
||||||
|
|
||||||
//ShowNotify("审核完成,请点击导入!", MessageBoxIcon.Success);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
responeData.code = 0;
|
|
||||||
responeData.message = "导入数据为空!";
|
|
||||||
//ShowNotify("导入数据为空!", MessageBoxIcon.Warning);
|
|
||||||
}
|
|
||||||
return responeData;
|
|
||||||
}
|
|
||||||
private Model.ResponeData AddDatasetToSQL(List<dynamic> pds, int count)
|
private Model.ResponeData AddDatasetToSQL(List<dynamic> pds, int count)
|
||||||
{
|
{
|
||||||
Model.ResponeData responeData = new Model.ResponeData();
|
Model.ResponeData responeData = new Model.ResponeData();
|
||||||
@@ -1261,6 +710,14 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
result.Add("第" + (i + 1).ToString() + "行," + "焊口属性" + "," + "此项为必填项!" + "|");
|
result.Add("第" + (i + 1).ToString() + "行," + "焊口属性" + "," + "此项为必填项!" + "|");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
string col28 = Convert.ToString(pds[i].AD);
|
||||||
|
if (!string.IsNullOrEmpty(col28))
|
||||||
|
{
|
||||||
|
if (col28.Trim() == "是")
|
||||||
|
{
|
||||||
|
pipeline.IsHotProess = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(pipeline.PipelineCode) && !string.IsNullOrEmpty(pipeline.WeldJointCode))
|
if (!string.IsNullOrEmpty(pipeline.PipelineCode) && !string.IsNullOrEmpty(pipeline.WeldJointCode))
|
||||||
{
|
{
|
||||||
@@ -1268,6 +725,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
PipelineList.Add(pipeline);
|
PipelineList.Add(pipeline);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
if (result.Count > 0)
|
if (result.Count > 0)
|
||||||
{
|
{
|
||||||
@@ -1443,93 +901,6 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
addHJGL_WeldJoints(PipelineList, unitworkId);
|
addHJGL_WeldJoints(PipelineList, unitworkId);
|
||||||
|
|
||||||
}
|
}
|
||||||
//public void AddView_HJGL_WeldJoint(List<Model.View_HJGL_WeldJoint> PipelineList)
|
|
||||||
//{
|
|
||||||
// string unitworkId = Request.Params["UnitWorkId"];
|
|
||||||
|
|
||||||
// var getPipeline = from x in Funs.DB.View_HJGL_WeldJoint where x.UnitWorkId== unitworkId select x;
|
|
||||||
// List<Model.HJGL_WeldJoint> weldJoints_add = new List<Model.HJGL_WeldJoint>();
|
|
||||||
|
|
||||||
// for (int i = 0; i < PipelineList.Count(); i++)
|
|
||||||
// {
|
|
||||||
// var pipeLineId = string.Empty;
|
|
||||||
// var WeldJointId = string.Empty;
|
|
||||||
|
|
||||||
// Model.HJGL_Pipeline pipeline = new Model.HJGL_Pipeline();
|
|
||||||
// pipeline.PipelineId = PipelineList[i].PipelineId;
|
|
||||||
// pipeline.ProjectId = this.CurrUser.LoginProjectId;
|
|
||||||
// pipeline.UnitId = PipelineList[i].UnitId;
|
|
||||||
// pipeline.UnitWorkId = PipelineList[i].UnitWorkId;
|
|
||||||
// pipeline.PipelineCode = PipelineList[i].PipelineCode;
|
|
||||||
// pipeline.SingleName = PipelineList[i].SingleName;
|
|
||||||
// pipeline.SingleNumber = PipelineList[i].SingleNumber;
|
|
||||||
// pipeline.MediumId = PipelineList[i].MediumId;
|
|
||||||
// pipeline.PipingClassId = PipelineList[i].PipingClassId;
|
|
||||||
// pipeline.DetectionRateId = PipelineList[i].DetectionRateId;
|
|
||||||
// pipeline.DetectionType = PipelineList[i].DetectionType;
|
|
||||||
// pipeline.DesignPress = PipelineList[i].DesignPress;
|
|
||||||
// pipeline.DesignTemperature = PipelineList[i].DesignTemperature;
|
|
||||||
// pipeline.TestMedium = PipelineList[i].TestMedium;
|
|
||||||
// pipeline.TestPressure = PipelineList[i].TestPressure;
|
|
||||||
// pipeline.PressurePipingClassId = PipelineList[i].PressurePipingClassId;
|
|
||||||
// pipeline.PipeLenth = PipelineList[i].PipeLenth;
|
|
||||||
// pipeline.LeakMedium = PipelineList[i].LeakMedium;
|
|
||||||
// pipeline.LeakPressure = PipelineList[i].LeakPressure;
|
|
||||||
// pipeline.VacuumPressure = PipelineList[i].VacuumPressure;
|
|
||||||
// pipeline.PCMedium = PipelineList[i].PCMedium;
|
|
||||||
// pipeline.MaterialId = PipelineList[i].MaterialId;
|
|
||||||
// pipeline.Remark = PipelineList[i].Remark;
|
|
||||||
|
|
||||||
// var isExistPipelineCode = getPipeline.FirstOrDefault(x => x.PipelineCode == pipeline.PipelineCode && x.UnitWorkId == Request.Params["UnitWorkId"]);
|
|
||||||
// if (isExistPipelineCode != null) // 更新管线
|
|
||||||
// {
|
|
||||||
// pipeLineId = isExistPipelineCode.PipelineId;
|
|
||||||
// pipeline.PipelineId = isExistPipelineCode.PipelineId;
|
|
||||||
// BLL.PipelineService.UpdatePipeline(pipeline);
|
|
||||||
// }
|
|
||||||
// else // 增加管线
|
|
||||||
// {
|
|
||||||
// pipeLineId = SQLHelper.GetNewID();
|
|
||||||
// pipeline.PipelineId = pipeLineId;
|
|
||||||
// BLL.PipelineService.AddPipeline(pipeline);
|
|
||||||
|
|
||||||
// }
|
|
||||||
|
|
||||||
// Model.HJGL_WeldJoint weldJoint = new Model.HJGL_WeldJoint();
|
|
||||||
// weldJoint.PipelineId = pipeLineId;
|
|
||||||
// weldJoint.WeldJointCode = PipelineList[i].WeldJointCode;
|
|
||||||
// weldJoint.PipelineCode = PipelineList[i].PipelineCode;
|
|
||||||
// weldJoint.Material1Id = PipelineList[i].Material1Id;
|
|
||||||
// weldJoint.Material2Id = PipelineList[i].Material2Id;
|
|
||||||
// weldJoint.Dia = PipelineList[i].Dia;
|
|
||||||
// weldJoint.Size = PipelineList[i].Size;
|
|
||||||
// weldJoint.Thickness = PipelineList[i].Thickness;
|
|
||||||
// weldJoint.Specification = PipelineList[i].Specification;
|
|
||||||
// weldJoint.WeldTypeId = PipelineList[i].WeldTypeId;
|
|
||||||
// weldJoint.DetectionTypeId = PipelineList[i].DetectionTypeId;
|
|
||||||
// weldJoint.JointAttribute = PipelineList[i].JointAttribute;
|
|
||||||
// weldJoint.ProjectId= PipelineList[i].ProjectId;
|
|
||||||
// var isExistJot = getPipeline.FirstOrDefault(x => x.PipelineId == pipeLineId && x.WeldJointCode == PipelineList[i].WeldJointCode);
|
|
||||||
// if (isExistJot != null) // 更新焊口
|
|
||||||
// {
|
|
||||||
// weldJoint.WeldJointId = isExistJot.WeldJointId;
|
|
||||||
// BLL.WeldJointService.UpdateWeldJoint(weldJoint);
|
|
||||||
// }
|
|
||||||
// else // 增加焊口
|
|
||||||
// {
|
|
||||||
// weldJoint.WeldJointId=SQLHelper.GetNewID();
|
|
||||||
// weldJoints_add.Add(weldJoint);
|
|
||||||
// //BLL.WeldJointService.AddWeldJoint(weldJoint);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// if (weldJoints_add.Count>0)
|
|
||||||
// {
|
|
||||||
// BLL.WeldJointService.AddBulkWeldJoint(weldJoints_add);
|
|
||||||
|
|
||||||
// }
|
|
||||||
|
|
||||||
//}
|
|
||||||
#endregion
|
|
||||||
void addPipelines(List<Model.View_HJGL_WeldJoint> PipelineList, string UnitWorkId)
|
void addPipelines(List<Model.View_HJGL_WeldJoint> PipelineList, string UnitWorkId)
|
||||||
{
|
{
|
||||||
// var getPipeline = from x in Funs.DB.View_HJGL_WeldJoint where x.UnitWorkId == UnitWorkId select x;
|
// var getPipeline = from x in Funs.DB.View_HJGL_WeldJoint where x.UnitWorkId == UnitWorkId select x;
|
||||||
@@ -1650,7 +1021,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
WeldTypeId = x.WeldTypeId,
|
WeldTypeId = x.WeldTypeId,
|
||||||
DetectionTypeId = x.DetectionTypeId,
|
DetectionTypeId = x.DetectionTypeId,
|
||||||
JointAttribute = x.JointAttribute,
|
JointAttribute = x.JointAttribute,
|
||||||
ProjectId = this.CurrUser.LoginProjectId
|
ProjectId = this.CurrUser.LoginProjectId,
|
||||||
|
IsHotProess = x.IsHotProess,
|
||||||
}).DistinctBy(temp => new
|
}).DistinctBy(temp => new
|
||||||
{
|
{
|
||||||
temp.WeldJointCode,
|
temp.WeldJointCode,
|
||||||
@@ -1665,7 +1037,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
temp.WeldTypeId,
|
temp.WeldTypeId,
|
||||||
temp.DetectionTypeId,
|
temp.DetectionTypeId,
|
||||||
temp.JointAttribute,
|
temp.JointAttribute,
|
||||||
temp.ProjectId
|
temp.ProjectId,
|
||||||
|
temp.IsHotProess
|
||||||
}).ToList();
|
}).ToList();
|
||||||
|
|
||||||
for (int i = 0; i < weldJoints.Count(); i++)
|
for (int i = 0; i < weldJoints.Count(); i++)
|
||||||
@@ -1685,6 +1058,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
weldJoint.DetectionTypeId = weldJoints[i].DetectionTypeId;
|
weldJoint.DetectionTypeId = weldJoints[i].DetectionTypeId;
|
||||||
weldJoint.JointAttribute = weldJoints[i].JointAttribute;
|
weldJoint.JointAttribute = weldJoints[i].JointAttribute;
|
||||||
weldJoint.ProjectId = weldJoints[i].ProjectId;
|
weldJoint.ProjectId = weldJoints[i].ProjectId;
|
||||||
|
weldJoint.IsHotProess = weldJoints[i].IsHotProess;
|
||||||
|
|
||||||
var isExistJot = WeldJointService.GetWeldJointsByWeldJointCode(weldJoint.PipelineId, weldJoint.WeldJointCode);
|
var isExistJot = WeldJointService.GetWeldJointsByWeldJointCode(weldJoint.PipelineId, weldJoint.WeldJointCode);
|
||||||
if (isExistJot != null) // 更新焊口
|
if (isExistJot != null) // 更新焊口
|
||||||
@@ -1707,6 +1081,94 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//public void AddView_HJGL_WeldJoint(List<Model.View_HJGL_WeldJoint> PipelineList)
|
||||||
|
//{
|
||||||
|
// string unitworkId = Request.Params["UnitWorkId"];
|
||||||
|
|
||||||
|
// var getPipeline = from x in Funs.DB.View_HJGL_WeldJoint where x.UnitWorkId== unitworkId select x;
|
||||||
|
// List<Model.HJGL_WeldJoint> weldJoints_add = new List<Model.HJGL_WeldJoint>();
|
||||||
|
|
||||||
|
// for (int i = 0; i < PipelineList.Count(); i++)
|
||||||
|
// {
|
||||||
|
// var pipeLineId = string.Empty;
|
||||||
|
// var WeldJointId = string.Empty;
|
||||||
|
|
||||||
|
// Model.HJGL_Pipeline pipeline = new Model.HJGL_Pipeline();
|
||||||
|
// pipeline.PipelineId = PipelineList[i].PipelineId;
|
||||||
|
// pipeline.ProjectId = this.CurrUser.LoginProjectId;
|
||||||
|
// pipeline.UnitId = PipelineList[i].UnitId;
|
||||||
|
// pipeline.UnitWorkId = PipelineList[i].UnitWorkId;
|
||||||
|
// pipeline.PipelineCode = PipelineList[i].PipelineCode;
|
||||||
|
// pipeline.SingleName = PipelineList[i].SingleName;
|
||||||
|
// pipeline.SingleNumber = PipelineList[i].SingleNumber;
|
||||||
|
// pipeline.MediumId = PipelineList[i].MediumId;
|
||||||
|
// pipeline.PipingClassId = PipelineList[i].PipingClassId;
|
||||||
|
// pipeline.DetectionRateId = PipelineList[i].DetectionRateId;
|
||||||
|
// pipeline.DetectionType = PipelineList[i].DetectionType;
|
||||||
|
// pipeline.DesignPress = PipelineList[i].DesignPress;
|
||||||
|
// pipeline.DesignTemperature = PipelineList[i].DesignTemperature;
|
||||||
|
// pipeline.TestMedium = PipelineList[i].TestMedium;
|
||||||
|
// pipeline.TestPressure = PipelineList[i].TestPressure;
|
||||||
|
// pipeline.PressurePipingClassId = PipelineList[i].PressurePipingClassId;
|
||||||
|
// pipeline.PipeLenth = PipelineList[i].PipeLenth;
|
||||||
|
// pipeline.LeakMedium = PipelineList[i].LeakMedium;
|
||||||
|
// pipeline.LeakPressure = PipelineList[i].LeakPressure;
|
||||||
|
// pipeline.VacuumPressure = PipelineList[i].VacuumPressure;
|
||||||
|
// pipeline.PCMedium = PipelineList[i].PCMedium;
|
||||||
|
// pipeline.MaterialId = PipelineList[i].MaterialId;
|
||||||
|
// pipeline.Remark = PipelineList[i].Remark;
|
||||||
|
|
||||||
|
// var isExistPipelineCode = getPipeline.FirstOrDefault(x => x.PipelineCode == pipeline.PipelineCode && x.UnitWorkId == Request.Params["UnitWorkId"]);
|
||||||
|
// if (isExistPipelineCode != null) // 更新管线
|
||||||
|
// {
|
||||||
|
// pipeLineId = isExistPipelineCode.PipelineId;
|
||||||
|
// pipeline.PipelineId = isExistPipelineCode.PipelineId;
|
||||||
|
// BLL.PipelineService.UpdatePipeline(pipeline);
|
||||||
|
// }
|
||||||
|
// else // 增加管线
|
||||||
|
// {
|
||||||
|
// pipeLineId = SQLHelper.GetNewID();
|
||||||
|
// pipeline.PipelineId = pipeLineId;
|
||||||
|
// BLL.PipelineService.AddPipeline(pipeline);
|
||||||
|
|
||||||
|
// }
|
||||||
|
|
||||||
|
// Model.HJGL_WeldJoint weldJoint = new Model.HJGL_WeldJoint();
|
||||||
|
// weldJoint.PipelineId = pipeLineId;
|
||||||
|
// weldJoint.WeldJointCode = PipelineList[i].WeldJointCode;
|
||||||
|
// weldJoint.PipelineCode = PipelineList[i].PipelineCode;
|
||||||
|
// weldJoint.Material1Id = PipelineList[i].Material1Id;
|
||||||
|
// weldJoint.Material2Id = PipelineList[i].Material2Id;
|
||||||
|
// weldJoint.Dia = PipelineList[i].Dia;
|
||||||
|
// weldJoint.Size = PipelineList[i].Size;
|
||||||
|
// weldJoint.Thickness = PipelineList[i].Thickness;
|
||||||
|
// weldJoint.Specification = PipelineList[i].Specification;
|
||||||
|
// weldJoint.WeldTypeId = PipelineList[i].WeldTypeId;
|
||||||
|
// weldJoint.DetectionTypeId = PipelineList[i].DetectionTypeId;
|
||||||
|
// weldJoint.JointAttribute = PipelineList[i].JointAttribute;
|
||||||
|
// weldJoint.ProjectId= PipelineList[i].ProjectId;
|
||||||
|
// var isExistJot = getPipeline.FirstOrDefault(x => x.PipelineId == pipeLineId && x.WeldJointCode == PipelineList[i].WeldJointCode);
|
||||||
|
// if (isExistJot != null) // 更新焊口
|
||||||
|
// {
|
||||||
|
// weldJoint.WeldJointId = isExistJot.WeldJointId;
|
||||||
|
// BLL.WeldJointService.UpdateWeldJoint(weldJoint);
|
||||||
|
// }
|
||||||
|
// else // 增加焊口
|
||||||
|
// {
|
||||||
|
// weldJoint.WeldJointId=SQLHelper.GetNewID();
|
||||||
|
// weldJoints_add.Add(weldJoint);
|
||||||
|
// //BLL.WeldJointService.AddWeldJoint(weldJoint);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// if (weldJoints_add.Count>0)
|
||||||
|
// {
|
||||||
|
// BLL.WeldJointService.AddBulkWeldJoint(weldJoints_add);
|
||||||
|
|
||||||
|
// }
|
||||||
|
|
||||||
|
//}
|
||||||
|
#endregion
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 恢复版本
|
/// 恢复版本
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -66,7 +66,7 @@
|
|||||||
runat="server" ShowRedStar="true" Required="true" EnableEdit="true" LabelWidth="100px" LabelAlign="Right">
|
runat="server" ShowRedStar="true" Required="true" EnableEdit="true" LabelWidth="100px" LabelAlign="Right">
|
||||||
</f:DropDownList>
|
</f:DropDownList>
|
||||||
<f:NumberBox ID="txtDia" Label="外径" runat="server"
|
<f:NumberBox ID="txtDia" Label="外径" runat="server"
|
||||||
LabelWidth="100px" DecimalPrecision="4" NoNegative="true" ShowRedStar="true" Required="true"
|
LabelWidth="100px" DecimalPrecision="4" NoNegative="true"
|
||||||
EnableBlurEvent="true" OnBlur="txtText_TextChanged" LabelAlign="Right">
|
EnableBlurEvent="true" OnBlur="txtText_TextChanged" LabelAlign="Right">
|
||||||
</f:NumberBox>
|
</f:NumberBox>
|
||||||
<f:TextBox ID="txtDNDia" Label="公称直径" runat="server" LabelWidth="100px" LabelAlign="Right">
|
<f:TextBox ID="txtDNDia" Label="公称直径" runat="server" LabelWidth="100px" LabelAlign="Right">
|
||||||
@@ -111,7 +111,11 @@
|
|||||||
</f:FormRow>
|
</f:FormRow>
|
||||||
<f:FormRow>
|
<f:FormRow>
|
||||||
<Items>
|
<Items>
|
||||||
|
<f:DropDownList ID="drpIsHotProess" runat="server" Label="是否热处理" LabelAlign="Right"
|
||||||
|
LabelWidth="100px" >
|
||||||
|
<f:ListItem Value="False" Text="否" Selected="true" />
|
||||||
|
<f:ListItem Value="True" Text="是" />
|
||||||
|
</f:DropDownList>
|
||||||
<f:Label runat="server"></f:Label>
|
<f:Label runat="server"></f:Label>
|
||||||
<f:Label runat="server"></f:Label>
|
<f:Label runat="server"></f:Label>
|
||||||
<f:Label runat="server"></f:Label>
|
<f:Label runat="server"></f:Label>
|
||||||
@@ -155,11 +159,8 @@
|
|||||||
<f:TextBox ID="txtPreTemperature" runat="server" Label="预热温度" MaxLength="50" LabelAlign="Right" Enabled="false"
|
<f:TextBox ID="txtPreTemperature" runat="server" Label="预热温度" MaxLength="50" LabelAlign="Right" Enabled="false"
|
||||||
LabelWidth="100px">
|
LabelWidth="100px">
|
||||||
</f:TextBox>
|
</f:TextBox>
|
||||||
<f:DropDownList ID="drpIsHotProess" runat="server" Label="是否热处理" LabelAlign="Right" Enabled="false"
|
|
||||||
LabelWidth="100px" >
|
<f:Label runat="server"></f:Label>
|
||||||
<f:ListItem Value="False" Text="否" Selected="true" />
|
|
||||||
<f:ListItem Value="True" Text="是" />
|
|
||||||
</f:DropDownList>
|
|
||||||
<f:Label runat="server"></f:Label>
|
<f:Label runat="server"></f:Label>
|
||||||
</Items>
|
</Items>
|
||||||
</f:FormRow>
|
</f:FormRow>
|
||||||
|
|||||||
@@ -414,7 +414,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
//{
|
//{
|
||||||
// joint.IsHotProess = false;
|
// joint.IsHotProess = false;
|
||||||
//}
|
//}
|
||||||
//joint.IsHotProess = Convert.ToBoolean(drpIsHotProess.SelectedValue);
|
joint.IsHotProess = Convert.ToBoolean(drpIsHotProess.SelectedValue);
|
||||||
//joint.DesignIsHotProess = Convert.ToBoolean(drpDesignIsHotProess.SelectedValue);
|
//joint.DesignIsHotProess = Convert.ToBoolean(drpDesignIsHotProess.SelectedValue);
|
||||||
joint.Remark = txtRemark.Text.Trim();
|
joint.Remark = txtRemark.Text.Trim();
|
||||||
joint.SubmitMan = CurrUser.PersonId;
|
joint.SubmitMan = CurrUser.PersonId;
|
||||||
|
|||||||
@@ -248,6 +248,15 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.DropDownList DropTwoJointType;
|
protected global::FineUIPro.DropDownList DropTwoJointType;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// drpIsHotProess 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.DropDownList drpIsHotProess;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// GroupPanel2 控件。
|
/// GroupPanel2 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -329,15 +338,6 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.TextBox txtPreTemperature;
|
protected global::FineUIPro.TextBox txtPreTemperature;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// drpIsHotProess 控件。
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// 自动生成的字段。
|
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||||
/// </remarks>
|
|
||||||
protected global::FineUIPro.DropDownList drpIsHotProess;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// txtWpqId 控件。
|
/// txtWpqId 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -458,28 +458,28 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
private string GetWeldJointRateByUnitWork(string unitworkid)
|
private string GetWeldJointRateByUnitWork(string unitworkid)
|
||||||
{
|
{
|
||||||
string rate = "";
|
string rate = "";
|
||||||
int ShopNum = 0;
|
int shopNum = 0;
|
||||||
int FieldNum = 0;
|
int fieldNum = 0;
|
||||||
int AllNum = 0;
|
int AllNum = 0;
|
||||||
var db = Funs.DB;
|
var db = Funs.DB;
|
||||||
var q = from x in db.View_HJGL_WeldJoint where x.UnitWorkId == unitworkid select x;
|
var q = from x in db.View_HJGL_WeldJoint where x.UnitWorkId == unitworkid select x;
|
||||||
if (q != null && q.Count() > 0)
|
if (q != null && q.Count() > 0)
|
||||||
{
|
{
|
||||||
ShopNum = (from x in q
|
shopNum = (from x in q
|
||||||
where x.JointAttribute == "预制口"
|
where x.JointAttribute == "预制口"
|
||||||
select x
|
select x
|
||||||
).Count();
|
).Count();
|
||||||
FieldNum = (from x in q
|
fieldNum = (from x in q
|
||||||
where x.JointAttribute == "安装口"
|
where x.JointAttribute == "安装口"
|
||||||
select x
|
select x
|
||||||
).Count();
|
).Count();
|
||||||
ShopSum = ShopNum.ToString();
|
ShopSum = shopNum.ToString();
|
||||||
FieldSum = FieldSum.ToString();
|
FieldSum = fieldNum.ToString();
|
||||||
AllNum = ShopNum + FieldNum;
|
AllNum = shopNum + fieldNum;
|
||||||
|
|
||||||
if (AllNum > 0)
|
if (AllNum > 0)
|
||||||
{
|
{
|
||||||
var a = (decimal)100 * ShopNum / AllNum;
|
var a = (decimal)100 * shopNum / AllNum;
|
||||||
rate = Math.Round((decimal)a, 1).ToString() + "%";
|
rate = Math.Round((decimal)a, 1).ToString() + "%";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -542,27 +542,27 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
private string GetWeldJointRateByPipelineid(string pipelineid)
|
private string GetWeldJointRateByPipelineid(string pipelineid)
|
||||||
{
|
{
|
||||||
string rate = "";
|
string rate = "";
|
||||||
int ShopNum = 0;
|
int shopNum = 0;
|
||||||
int FieldNum = 0;
|
int fieldNum = 0;
|
||||||
int AllNum = 0;
|
int AllNum = 0;
|
||||||
var db = Funs.DB;
|
var db = Funs.DB;
|
||||||
var q = from x in db.View_HJGL_WeldJoint where x.PipelineId == pipelineid select x;
|
var q = from x in db.View_HJGL_WeldJoint where x.PipelineId == pipelineid select x;
|
||||||
if (q != null && q.Count() > 0)
|
if (q != null && q.Count() > 0)
|
||||||
{
|
{
|
||||||
ShopNum = (from x in q
|
shopNum = (from x in q
|
||||||
where x.JointAttribute == "预制口" select x
|
where x.JointAttribute == "预制口" select x
|
||||||
).Count();
|
).Count();
|
||||||
FieldNum = (from x in q
|
fieldNum = (from x in q
|
||||||
where x.JointAttribute == "安装口"
|
where x.JointAttribute == "安装口"
|
||||||
select x
|
select x
|
||||||
).Count();
|
).Count();
|
||||||
ShopSum = ShopNum.ToString();
|
ShopSum = shopNum.ToString();
|
||||||
FieldSum = FieldSum.ToString();
|
FieldSum = fieldNum.ToString();
|
||||||
AllNum = ShopNum + FieldNum;
|
AllNum = shopNum + fieldNum;
|
||||||
|
|
||||||
if (AllNum > 0)
|
if (AllNum > 0)
|
||||||
{
|
{
|
||||||
var a = (decimal)100 * ShopNum / AllNum;
|
var a = (decimal)100 * shopNum / AllNum;
|
||||||
rate = Math.Round((decimal)a, 1).ToString() + "%";
|
rate = Math.Round((decimal)a, 1).ToString() + "%";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user