|
@@ -3,6 +3,7 @@ package com.huimv.cattle.controller;
|
|
|
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
+import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.huimv.cattle.pojo.DataSource;
|
|
@@ -119,7 +120,9 @@ public class SalesCattleController {
|
|
|
Map map = new HashMap();
|
|
|
map.put("adcode",adcode);
|
|
|
ResponseEntity<String> stringResponseEntity = restTemplate.postForEntity(remoteUrl, map, String.class);
|
|
|
- return stringResponseEntity.getBody();
|
|
|
+ String body = stringResponseEntity.getBody();
|
|
|
+ System.out.println(body);
|
|
|
+ return body;
|
|
|
}
|
|
|
|
|
|
private Result getSalesByDivision(String farmCodes) {
|
|
@@ -136,7 +139,7 @@ public class SalesCattleController {
|
|
|
if(entity.getStatusCode().toString().contains("200")){
|
|
|
String body = entity.getBody();
|
|
|
System.out.println(body);
|
|
|
- JSONObject dataJo = JSON.parseObject(body).getJSONObject("data");
|
|
|
+ JSONArray dataJo = JSON.parseObject(body).getJSONArray("data");
|
|
|
System.out.println("dataJo="+dataJo);
|
|
|
//, )
|
|
|
return new Result(ResultCode.SUCCESS,dataJo);
|