a9dbf83c6aee016b5741e40a1324c10ca048eaf1.svn-base 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. package cn.com.goldenwater.dcproj.controller.system;
  2. import cn.com.goldenwater.core.web.BaseController;
  3. import cn.com.goldenwater.core.web.BaseResponse;
  4. import cn.com.goldenwater.webService.onemap.WSWebServiceImplService;
  5. import io.swagger.annotations.Api;
  6. import net.sf.json.JSONObject;
  7. import org.springframework.stereotype.Controller;
  8. import org.springframework.web.bind.annotation.RequestMapping;
  9. import org.springframework.web.bind.annotation.RequestMethod;
  10. import org.springframework.web.bind.annotation.RequestParam;
  11. import org.springframework.web.bind.annotation.ResponseBody;
  12. /**
  13. * Created by jinshui on 2019/6/28.
  14. */
  15. @Api(value = "webService接口", tags = "webService接口")
  16. @Controller
  17. @RequestMapping("/webService")
  18. public class WebServiceController extends BaseController {
  19. //空间点查询
  20. @ResponseBody
  21. @RequestMapping(value = "/spaceDot", method = {RequestMethod.GET, RequestMethod.POST})
  22. public BaseResponse<JSONObject> oneMap(@RequestParam(required = false) String keyWords,
  23. @RequestParam(required = false) Integer pageIndex,
  24. @RequestParam(required = false) String spatialQueryType,
  25. @RequestParam(required = false) String sumConditions,
  26. @RequestParam(required = false) String pointsArray,
  27. @RequestParam(required = false) String keyId,
  28. @RequestParam(required = false) String mapBoundsList,
  29. @RequestParam(required = false) String fetchStatistic,
  30. @RequestParam(required = false) String lucenelevel,
  31. @RequestParam(required = false) String timeStamp,
  32. @RequestParam(required = false) String fitchResultType,
  33. @RequestParam(required = false) String scale,
  34. @RequestParam(required = false) String objectCodeList,
  35. @RequestParam(required = false) String mapBounds,
  36. @RequestParam(required = false) String userId,
  37. @RequestParam(required = false) String spatialId,
  38. @RequestParam(required = false) String middleTypeList,
  39. @RequestParam(required = false) String objectCode,
  40. @RequestParam(required = false) String sortField,
  41. @RequestParam(required = false) String queryStatisticData,
  42. @RequestParam(required = false) String isAsc,
  43. @RequestParam(required = false) Integer pageSize,
  44. @RequestParam(required = false) String conditonList,
  45. @RequestParam(required = false) String sessionId,
  46. @RequestParam(required = false) String queryAreaData) {
  47. WSWebServiceImplService ws = new WSWebServiceImplService();
  48. StringBuffer sb = new StringBuffer();
  49. sb.append("{'keyWords':").append(keyWords).append(",'pageIndex':").append(pageIndex).append(",'sumConditions':").append(sumConditions).append(",'spatialQueryType':'").append(spatialQueryType).append("','pointsArray':").append(pointsArray).append(",'keyId':'").append("demoMapPanMapClearMapAreaMapDistanceMapQueryresourceLayerControlDocumentQuerySystemhelpDocumentBaseDataQueryMapAssistControlMapSearchServiceCatalogMapLegendMapFullExtentMapFullScreenguideHelpDocumetnThemeAnalysisDissertation");
  50. sb.append("','mapBoundsList':").append(mapBoundsList).append(",'fetchStatistic':").append(fetchStatistic).append(",'targetId':").append("'lucene.Lucene0010SearchLogic'").append(",'lucenelevel':").append(lucenelevel).append(",'queryType':").append("'2'").append(",'queryShowItemsOnly':").append("'1'");
  51. sb.append(",'timeStamp':'").append(timeStamp).append("','fitchResultType':'").append(fitchResultType).append("','scale':'").append(scale).append("','objectCodeList':").append(objectCodeList).append(",'mapBounds':'").append(mapBounds).append("','userId':''").append(",'spatialId':").append(spatialId).append(",'middleTypeList':").append(middleTypeList).append(",'objectCode':").append(objectCode).append(",'sortField':").append(sortField).append(",'queryStatisticData':").append(queryStatisticData).append(",'isAsc':").append(isAsc).append(",'pageSize':").append(pageSize).append(",'conditonList':").append(conditonList).append(",'sessionId':'").append("53b18b66-c2a6-4bff-b03b-b2aed9134d8f").append("','queryAreaData':").append(queryAreaData).append("}");
  52. String result = ws.getWSWebServiceImplPort().execute(sb.toString());
  53. return buildSuccessResponse(JSONObject.fromObject(result));
  54. }
  55. //获取统计数字对象信息
  56. @ResponseBody
  57. @RequestMapping(value = "/statistics", method = {RequestMethod.GET, RequestMethod.POST})
  58. public BaseResponse<JSONObject> statistics(@RequestParam(required = false) String timeStamp,
  59. @RequestParam(required = false) Integer pageIndex,
  60. @RequestParam(required = false) String mapBounds,
  61. @RequestParam(required = false) String queryStatisticData,
  62. @RequestParam(required = false) String spatialQueryType,
  63. @RequestParam(required = false) String pointsArray,
  64. @RequestParam(required = false) Integer pageSize,
  65. @RequestParam(required = false) String queryShowItemsOnly,
  66. @RequestParam(required = false) String scale,
  67. @RequestParam(required = false) String queryType) {
  68. WSWebServiceImplService ws = new WSWebServiceImplService();
  69. StringBuffer sb = new StringBuffer();
  70. sb.append("{'timeStamp':'").append(timeStamp).append("','pageIndex':").append(pageIndex).append(",'mapBounds':'").append(mapBounds).append("','queryStatisticData':").append(queryStatisticData);
  71. sb.append(",'spatialQueryType':'").append(spatialQueryType).append("','pointsArray':").append(pointsArray).append(",'pageSize':").append(pageSize);
  72. sb.append(",'targetId':'lucene.Lucene0010SearchLogic','queryShowItemsOnly':'").append(queryShowItemsOnly).append("','scale':'").append(scale).append("','queryType':'").append(queryType).append("'}");
  73. String result = ws.getWSWebServiceImplPort().execute(sb.toString());
  74. return buildSuccessResponse(JSONObject.fromObject(result));
  75. }
  76. //获取对象详细信息
  77. @ResponseBody
  78. @RequestMapping(value = "/detailedInfo", method = {RequestMethod.GET, RequestMethod.POST})
  79. public BaseResponse<JSONObject> detailedInfo(@RequestParam(required = false) String middleTypeList,
  80. @RequestParam(required = false) String objectCode,
  81. @RequestParam(required = false) String timeStamp,
  82. @RequestParam(required = false) Integer pageIndex,
  83. @RequestParam(required = false) Integer pageSize,
  84. @RequestParam(required = false) String targetId) {
  85. WSWebServiceImplService ws = new WSWebServiceImplService();
  86. StringBuffer sb = new StringBuffer();
  87. sb.append("{'middleTypeList':").append(middleTypeList).append(",'objectCode':'").append(objectCode).append("','timeStamp':'").append(timeStamp).append("','pageIndex':").append(pageIndex).append(",'pageSize':").append(pageSize).append(",'targetId': 'lucene.Lucene0010SurveySearchLogic'}");
  88. String result = ws.getWSWebServiceImplPort().execute(sb.toString());
  89. return buildSuccessResponse(JSONObject.fromObject(result));
  90. }
  91. //查询实时信息
  92. @ResponseBody
  93. @RequestMapping(value = "/actualData", method = {RequestMethod.GET, RequestMethod.POST})
  94. public BaseResponse<JSONObject> spaceDot(@RequestParam(required = false) Integer pageSize,
  95. @RequestParam(required = false) String userId,
  96. @RequestParam(required = false) Integer pageIndex,
  97. @RequestParam(required = false) String keyId,
  98. @RequestParam(required = false) String timeStamp,
  99. @RequestParam(required = false) String stnm,
  100. @RequestParam(required = false) String sessionId,
  101. @RequestParam(required = false) String tms,
  102. @RequestParam(required = false) String sttp,
  103. @RequestParam(required = false) String stcd,
  104. @RequestParam(required = false) String targetId,
  105. @RequestParam(required = false) String tme) {
  106. String s = "{'pageSize':30,'userId':'','pageIndex':0,'keyId':'demoMapPanMapClearMapAreaMapDistanceMapQueryresourceLayerControlDocumentQuerySystemhelpDocumentBaseDataQueryMapAssistControlMapSearchServiceCatalogMapLegendMapFullExtentMapFullScreenguideHelpDocumetnThemeAnalysisDissertation','timeStamp':'2018-08-06 11:39:22','stnm':null,'sessionId':'5957d0a0-6725-4ed2-ad2c-589b532ad466','tms':'','sttp':'DD','stcd':'30302801','targetId':'realtime.RealTimeInfoLogic','tme':''}";
  107. WSWebServiceImplService ws = new WSWebServiceImplService();
  108. StringBuffer sb = new StringBuffer();
  109. sb.append("{'pageSize':").append(pageIndex).append(",'userId':'','pageIndex':").append(pageIndex).append(",'keyId':'").append("demoMapPanMapClearMapAreaMapDistanceMapQueryresourceLayerControlDocumentQuerySystemhelpDocumentBaseDataQueryMapAssistControlMapSearchServiceCatalogMapLegendMapFullExtentMapFullScreenguideHelpDocumetnThemeAnalysisDissertation").append("','timeStamp':'").append(timeStamp);
  110. sb.append("','stnm':'").append(stnm).append("','sessionId':'").append("5957d0a0-6725-4ed2-ad2c-589b532ad466").append("','tms':'").append(tms).append("','sttp':'").append(sttp).append("','stcd':'").append(stcd).append("','targetId':'").append("realtime.RealTimeInfoLogic").append("','tme':'").append(tme).append("'}");
  111. String result = ws.getWSWebServiceImplPort().execute(sb.toString());
  112. return buildSuccessResponse(JSONObject.fromObject(result));
  113. }
  114. }