|
|
@@ -54,14 +54,14 @@ public class MonthlySettlementBillTask extends AbstractTask {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private Date parseStringToDateWithSdfMonth(String dateStr) {
|
|
|
+ private String parseStringToDateWithSdfMonth(String dateStr) {
|
|
|
if (ObjectUtils.isEmpty(dateStr)) {
|
|
|
return null;
|
|
|
}
|
|
|
// 每次新建SimpleDateFormat,避免线程安全问题
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM");
|
|
|
try {
|
|
|
- return sdf.parse(dateStr);
|
|
|
+ return sdf.format(sdf.parse(dateStr));
|
|
|
} catch (ParseException e) {
|
|
|
return null;
|
|
|
}
|
|
|
@@ -413,11 +413,16 @@ public class MonthlySettlementBillTask extends AbstractTask {
|
|
|
throw new KDBizException(resp.get("message").toString());
|
|
|
}
|
|
|
Map<String, Object> result = (Map<String, Object>) resp.get("result");
|
|
|
- List<Map<String, Object>> resultDataList = (List<Map<String, Object>>) result.getOrDefault("invoices", Collections.emptyList());
|
|
|
- dataList.addAll(resultDataList);
|
|
|
+ List<Map<String, Object>> datas = (List<Map<String, Object>>) result.getOrDefault("datas", Collections.emptyList());
|
|
|
+ for (Map<String, Object> map : datas) {
|
|
|
+ if (map.containsKey("invoices")){
|
|
|
+ List<Map<String, Object>> invoices = (List<Map<String, Object>>) map.get("invoices");
|
|
|
+ dataList.addAll(invoices);
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
//当前查询数量小于分页数量时结束循环
|
|
|
- if (resultDataList.size() < size) {
|
|
|
+ if (datas.size() < size) {
|
|
|
break;
|
|
|
}
|
|
|
}
|