|
@@ -130,7 +130,13 @@ public class AnalysisDiyCustomerComponent {
|
|
|
JSONObject fjson = JSONObject.parseObject(financeJson);
|
|
|
Integer fcount = fjson.getInteger("count");
|
|
|
if(fcount>100){
|
|
|
- for (int i = 1; i < Math.floor(fcount/100); i++) {
|
|
|
+ int co = 0;
|
|
|
+ if (fcount%100 != 0){
|
|
|
+ co = (fcount/100) +2;
|
|
|
+ }else{
|
|
|
+ co = (fcount/100) +1;
|
|
|
+ }
|
|
|
+ for (int i = 1; i < co; i++) {
|
|
|
try {
|
|
|
fjson = JSONObject.parseObject(HttpUtils.sendSSLGet(customerAccessTokenUtil.getUrl(UrlType.FINANCE,i+"")));
|
|
|
} catch (Exception e) {
|
|
@@ -163,9 +169,16 @@ public class AnalysisDiyCustomerComponent {
|
|
|
}
|
|
|
|
|
|
JSONObject wjson = JSONObject.parseObject(warehouseJson);
|
|
|
- Integer wcount = fjson.getInteger("count");
|
|
|
+ Integer wcount = wjson.getInteger("count");
|
|
|
if(wcount>100){
|
|
|
- for (int i = 1; i < Math.floor(wcount/100); i++) {
|
|
|
+ int co = 0;
|
|
|
+ if (wcount%100 != 0){
|
|
|
+ co = (wcount/100) +2;
|
|
|
+ }else{
|
|
|
+ co = (wcount/100) +1;
|
|
|
+ }
|
|
|
+
|
|
|
+ for (int i = 1; i < co; i++) {
|
|
|
try {
|
|
|
wjson = JSONObject.parseObject(HttpUtils.sendSSLGet(customerAccessTokenUtil.getUrl(UrlType.WAREHOUSE,i+"")));
|
|
|
} catch (Exception e) {
|