//父级

string F_Sql = "select id,code,name from ftable where deleted=0 order by convert(int,code)";

//父级数据条数
int count = F_dt.Rows.Count;

//查询子数据

string Ac_Sql = "select * from c";

DataTable Ac_dt = SqlHlper.ExecuteDt(Ac_Sql);
for (int j = 0; j < Ac_dt.Rows.Count; j++)
{
//获取状态
string zt = "失败";
string key = Ac_dt.Rows[j]["a"].ToString() + "-" + Ac_dt.Rows[j]["b"].ToString();
//判断是否有检测过,有则不继续检测直接获取值,无则需检测
if (!GetIPZT.ContainsKey(key))
{
//根据键查询对应的值
zt = GetIPZT[key];
}

AcInfo += "{\"sn\":\"" + Ac_dt.Rows[j]["sn"].ToString() + "\",\"ip\":\"" + Ac_dt.Rows[j]["ip"].ToString() + "\",\"wh\":\"" + Ac_dt.Rows[j]["wh"].ToString() + "\"},";
}
J_AcInfo += AcInfo.Substring(0, AcInfo.Length - 1) + "]},";
}

});
}

//等待所有进程执行完成
Task.WaitAll(task);
J_AcInfo = J_AcInfo.Substring(0, J_AcInfo.Length - 1) + "]";
return J_AcInfo;

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-08-02
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-06-02
  • 2021-11-05
  • 2021-11-02
  • 2021-09-13
  • 2021-09-23
相关资源
相似解决方案