diff --git a/CCFlow/Components/BP.En30/Pub/Engine.cs b/CCFlow/Components/BP.En30/Pub/Engine.cs index 2ae0b032..44fc530e 100644 --- a/CCFlow/Components/BP.En30/Pub/Engine.cs +++ b/CCFlow/Components/BP.En30/Pub/Engine.cs @@ -2630,9 +2630,18 @@ trgaph108\trleft5\trbrdrl\brdrs\brdrw10 \trbrdrt\brdrs\brdrw10 \trbrdrr\brdrs\br { string D4SS = D4date.Split(',')[ford4]; + string d4sssql; //拿到当前牌号有多少条数据然后合并行 //通过牌号和坯型去查数据条数 - string d4sssql = sqls + " and " + D4 + "='" + D4SS + "'"; + if (sqls != "") + { + d4sssql = sqls + " and " + D4 + "='" + D4SS + "'"; + } + else + { + d4sssql = sqls + D4 + "='" + D4SS + "'"; + } + //data.Select(d4sssql).Count(); numD4 = numD4 + data.Select(d4sssql).Count(); //合并单元格 @@ -2649,9 +2658,17 @@ trgaph108\trleft5\trbrdrl\brdrs\brdrw10 \trbrdrt\brdrs\brdrw10 \trbrdrr\brdrs\br else if (W == numD4) { string D4SS = D4date.Split(',')[ford4]; + string d4sssql; //拿到当前牌号有多少条数据然后合并行 //通过牌号和坯型去查数据条数 - string d4sssql = sqls + " and " + D4 + "='" + D4SS + "'"; + if (sqls != "") + { + d4sssql = sqls + " and " + D4 + "='" + D4SS + "'"; + } + else + { + d4sssql = sqls + D4 + "='" + D4SS + "'"; + } //data.Select(d4sssql).Count(); numD4 = numD4 + data.Select(d4sssql).Count(); //合并单元格 @@ -2696,9 +2713,17 @@ trgaph108\trleft5\trbrdrl\brdrs\brdrw10 \trbrdrt\brdrs\brdrw10 \trbrdrr\brdrs\br { arrange = arrange - 1; string D4SS = D4date.Split(',')[ford4]; + string d4sssql; //拿到当前牌号有多少条数据然后合并行 //通过牌号和坯型去查数据条数 - string d4sssql = sqls + " and " + D4 + "='" + D4SS + "'"; + if (sqls != "") + { + d4sssql = sqls + " and " + D4 + "='" + D4SS + "'"; + } + else + { + d4sssql = sqls + D4 + "='" + D4SS + "'"; + } //data.Select(d4sssql).Count(); numD4 = numD4 + data.Select(d4sssql).Count(); //合并单元格 @@ -2717,9 +2742,17 @@ trgaph108\trleft5\trbrdrl\brdrs\brdrw10 \trbrdrt\brdrs\brdrw10 \trbrdrr\brdrs\br { arrange = arrange - 1; string D4SS = D4date.Split(',')[ford4]; + string d4sssql; //拿到当前牌号有多少条数据然后合并行 //通过牌号和坯型去查数据条数 - string d4sssql = sqls + " and " + D4 + "='" + D4SS + "'"; + if (sqls != "") + { + d4sssql = sqls + " and " + D4 + "='" + D4SS + "'"; + } + else + { + d4sssql = sqls + D4 + "='" + D4SS + "'"; + } //data.Select(d4sssql).Count(); numD4 = numD4 + data.Select(d4sssql).Count(); //合并单元格