|
@@ -2003,7 +2003,7 @@ public class WxCorpInfoServiceImpl extends ServiceImpl<WxCorpInfoMapper, WxCorpI
|
|
* Integer sp_status 1-审批中;2-已通过;3-已驳回;4-已撤销;6-通过后撤销;7-已删除;10-已支付
|
|
* Integer sp_status 1-审批中;2-已通过;3-已驳回;4-已撤销;6-通过后撤销;7-已删除;10-已支付
|
|
* */
|
|
* */
|
|
@Override
|
|
@Override
|
|
- public JSONArray getApprovalInfo(Integer companyId, String startDate, String endDate, String newCursor, JSONArray filterArray) throws Exception {
|
|
|
|
|
|
+ public List<String> getApprovalInfo(Integer companyId, String startDate, String endDate, String newCursor, JSONArray filterArray) throws Exception {
|
|
DateTimeFormatter df=DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
|
DateTimeFormatter df=DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
|
LocalDateTime startDateTime = LocalDate.parse(startDate, df).atTime(LocalTime.MIN);
|
|
LocalDateTime startDateTime = LocalDate.parse(startDate, df).atTime(LocalTime.MIN);
|
|
LocalDateTime endDateTime = LocalDate.parse(endDate, df).atTime(LocalTime.MAX);
|
|
LocalDateTime endDateTime = LocalDate.parse(endDate, df).atTime(LocalTime.MAX);
|
|
@@ -2025,19 +2025,19 @@ public class WxCorpInfoServiceImpl extends ServiceImpl<WxCorpInfoMapper, WxCorpI
|
|
HttpEntity<JSONObject> entity = new HttpEntity<>(requestMap, headers);
|
|
HttpEntity<JSONObject> entity = new HttpEntity<>(requestMap, headers);
|
|
ResponseEntity<String> ResponseEntity = restTemplate.postForEntity(url, entity, String.class);
|
|
ResponseEntity<String> ResponseEntity = restTemplate.postForEntity(url, entity, String.class);
|
|
if (ResponseEntity.getStatusCode() == HttpStatus.OK) {
|
|
if (ResponseEntity.getStatusCode() == HttpStatus.OK) {
|
|
- JSONArray jsonArray=new JSONArray();
|
|
|
|
|
|
+ List<String> list=new ArrayList<>();
|
|
String resp = ResponseEntity.getBody();
|
|
String resp = ResponseEntity.getBody();
|
|
JSONObject jsonObject = JSONObject.parseObject(resp);
|
|
JSONObject jsonObject = JSONObject.parseObject(resp);
|
|
if(jsonObject.getString("errmsg").equals("ok")){
|
|
if(jsonObject.getString("errmsg").equals("ok")){
|
|
- JSONArray sp_no_list = jsonObject.getJSONArray("sp_no_list");
|
|
|
|
- jsonArray.addAll(sp_no_list);
|
|
|
|
|
|
+ List<String> sp_no_list = (List<String>) jsonObject.get("sp_no_list");
|
|
|
|
+ list.addAll(sp_no_list);
|
|
if(jsonObject.containsKey("new_next_cursor")){
|
|
if(jsonObject.containsKey("new_next_cursor")){
|
|
String new_next_cursor = jsonObject.getString("new_next_cursor");
|
|
String new_next_cursor = jsonObject.getString("new_next_cursor");
|
|
- JSONArray approvalInfo = getApprovalInfo(companyId, startDate, endDate, new_next_cursor, filterArray);
|
|
|
|
- jsonArray.addAll(approvalInfo);
|
|
|
|
|
|
+ List<String> approvalInfo = getApprovalInfo(companyId, startDate, endDate, new_next_cursor, filterArray);
|
|
|
|
+ list.addAll(approvalInfo);
|
|
}
|
|
}
|
|
- System.out.println(jsonArray);
|
|
|
|
- return jsonArray;
|
|
|
|
|
|
+ System.out.println(list);
|
|
|
|
+ return list;
|
|
}
|
|
}
|
|
System.out.println(jsonObject.getString("errmsg"));
|
|
System.out.println(jsonObject.getString("errmsg"));
|
|
}
|
|
}
|