|
|
@ -10,22 +10,16 @@ import com.kms.yg.df.service.BsSgcDfSpPlayService; |
|
|
|
import com.kms.yxgh.base.Response; |
|
|
|
import com.kms.yxgh.df.dto.DfSpPlayDto; |
|
|
|
import com.kms.yxgh.df.dto.DfSpPlayQueDto; |
|
|
|
import com.kms.yxgh.df.dto.DfYhCharInfoDto; |
|
|
|
import com.kms.yxgh.df.dto.DfYhStatisticsQueDto; |
|
|
|
import com.shuili.common.core.controller.BaseController; |
|
|
|
import io.swagger.annotations.Api; |
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.http.HttpEntity; |
|
|
|
import org.springframework.http.HttpHeaders; |
|
|
|
import org.springframework.http.HttpMethod; |
|
|
|
import org.springframework.http.MediaType; |
|
|
|
import org.springframework.http.ResponseEntity; |
|
|
|
import org.springframework.web.bind.annotation.PostMapping; |
|
|
|
import org.springframework.web.bind.annotation.RequestBody; |
|
|
|
import org.springframework.web.bind.annotation.RequestMapping; |
|
|
|
import org.springframework.web.bind.annotation.RestController; |
|
|
|
import org.springframework.web.client.RestTemplate; |
|
|
|
|
|
|
|
/** |
|
|
|
* @author lyd |
|
|
@ -50,17 +44,6 @@ public class BsSgcDfSpPlayController extends BaseController { |
|
|
|
return Response.ok(bsSgcDfSpPlayService.getMockData()); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 共享接口
|
|
|
|
static final String GX_URL ="http://19.15.67.125:80/resourceSharing/oauth/token"; |
|
|
|
|
|
|
@ -93,36 +76,6 @@ public class BsSgcDfSpPlayController extends BaseController { |
|
|
|
// System.out.println("请求接口:{},返回异常");
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DfSpPlayQueDto monitorQueDto=new DfSpPlayQueDto(); |
|
|
|
monitorQueDto.setMobile("17324499214"); |
|
|
|
RestTemplate restTemplate=new RestTemplate(); |
|
|
|
String requestStr = JSONObject.toJSONString(monitorQueDto); |
|
|
|
HttpHeaders headers = getHttpHeaders(); |
|
|
|
HttpEntity<String> httpEntity = new HttpEntity<>(requestStr, headers); |
|
|
|
String seqResult = ""; |
|
|
|
try { |
|
|
|
ResponseEntity<String> responseEntity = restTemplate.exchange(GX_URL, HttpMethod.POST, httpEntity, String.class); |
|
|
|
seqResult = responseEntity.getBody(); |
|
|
|
System.out.println(seqResult); |
|
|
|
} catch (Exception e) { |
|
|
|
System.out.println("请求接口:{},返回异常"); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|