This commit is contained in:
jackchenyang 2024-05-23 20:10:26 +08:00
parent 9db2db1ad1
commit 1dcadf1a61
4 changed files with 47 additions and 5 deletions

View File

@ -162,7 +162,7 @@
</site> </site>
<site name="WebApi" id="2"> <site name="WebApi" id="2">
<application path="/" applicationPool="Clr4IntegratedAppPool"> <application path="/" applicationPool="Clr4IntegratedAppPool">
<virtualDirectory path="/" physicalPath="E:\MyProject\ZJ_BSF\Basf_TCC7\HJGL\WebApi" /> <virtualDirectory path="/" physicalPath="E:\湛江巴斯夫\Basf_TCC7\HJGL\WebApi" />
</application> </application>
<bindings> <bindings>
<binding protocol="http" bindingInformation="*:3862:localhost" /> <binding protocol="http" bindingInformation="*:3862:localhost" />
@ -250,7 +250,7 @@
</site> </site>
<site name="FineUIPro.Web(10)" id="13"> <site name="FineUIPro.Web(10)" id="13">
<application path="/" applicationPool="Clr4IntegratedAppPool"> <application path="/" applicationPool="Clr4IntegratedAppPool">
<virtualDirectory path="/" physicalPath="E:\MyProject\ZJ_BSF\Basf_TCC7\HJGL\FineUIPro.Web" /> <virtualDirectory path="/" physicalPath="E:\湛江巴斯夫\Basf_TCC7\HJGL\FineUIPro.Web" />
</application> </application>
<bindings> <bindings>
<binding protocol="http" bindingInformation="*:13960:localhost" /> <binding protocol="http" bindingInformation="*:13960:localhost" />

Binary file not shown.

View File

@ -971,7 +971,7 @@ namespace BLL
return maxId; return maxId;
} }
public static int getIntValue(string sql) public static int getIntValue(string sql, SqlParameter[] param=null)
{ {
int i = 0; int i = 0;
using (SqlConnection Connection = new SqlConnection(connectionString)) using (SqlConnection Connection = new SqlConnection(connectionString))
@ -981,7 +981,10 @@ namespace BLL
Connection.Open(); Connection.Open();
SqlCommand command = new SqlCommand(sql, Connection); SqlCommand command = new SqlCommand(sql, Connection);
command.CommandType = CommandType.Text; command.CommandType = CommandType.Text;
if (param != null)
{
AddParameterToCommand(command, param);
}
i = Convert.ToInt32(command.ExecuteScalar()); i = Convert.ToInt32(command.ExecuteScalar());
} }
finally finally

View File

@ -318,6 +318,20 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
//} //}
SqlParameter[] parameter = listStr.ToArray(); SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
if (string.IsNullOrEmpty(this.PTP_ID))
{
foreach (DataRow dr in tb.Rows)
{
string pipelineId = dr["PipelineId"].ToString();
string joinCodeList = dr["WeldJointCode"].ToString();
int count = countWeldJointCode(pipelineId);
int baseCount = countBaseWeldJointCode(pipelineId);
if (count == baseCount)
{
dr.Delete();
}
}
}
// 2.获取当前分页数据 // 2.获取当前分页数据
//var table = this.GetPagedDataTable(Grid1, tb1); //var table = this.GetPagedDataTable(Grid1, tb1);
Grid1.RecordCount = tb.Rows.Count; Grid1.RecordCount = tb.Rows.Count;
@ -327,7 +341,32 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
Grid1.DataBind(); Grid1.DataBind();
} }
private int countBaseWeldJointCode(string pipelineId)
{
string sql = "select count(1) from Pipeline_WeldJoint where PipelineId=@PipelineId";
SqlParameter[] parameters = new SqlParameter[] {
new SqlParameter("@PipelineId",pipelineId)
};
int count = SQLHelper.getIntValue(sql, parameters);
return count;
}
private int countWeldJointCode(string pipelineId)
{
string sql = @"select WeldJointCode=(stuff((select ','+ WeldJonintCode from PTP_PipelineList where PipelineId=@PipelineId and isALL=0 for xml path('')),1,1,''))";
SqlParameter[] parameters = new SqlParameter[] {
new SqlParameter("@PipelineId",pipelineId)
};
string strCode = SQLHelper.GetStr(sql, parameters);
if(!string.IsNullOrEmpty(strCode) )
{
string[] arr=strCode.Split(',');
return arr==null?0:arr.Length;
}
else
{
return 0;
}
}
/// <summary> /// <summary>
/// 对GV 赋值 /// 对GV 赋值
/// </summary> /// </summary>