1、分析原因

This is actually a known issue which is logged as the following bug:

[ NIM086349 - Alternate Query (Get) requests fail in Version 10.1 SP1 ] 

2、解决办法

  加入时间随机数:var random = (new Date()).getTime(),并将该随机数加入到查询中即可。代码如下:

//实例化查询任务类            var queryTask = new QueryTask(djConfig.xjExtentLayers + "/" + id);//建立查询过滤器var query = new Query();var random = (new Date()).getTime()query.where = "OBJECTID = " + item.objectid + " And " + random + "=" + random;            query.outSpatialReference = { "wkid": 4326 };query.returnGeometry = true;query.outFields = ["OBJECTID", "NAME"];