|
@@ -10,6 +10,7 @@ import com.uas.eis.entity.PNSSendResp;
|
|
|
import com.uas.eis.utils.FlexJsonUtil;
|
|
import com.uas.eis.utils.FlexJsonUtil;
|
|
|
import com.uas.eis.utils.HttpUtil;
|
|
import com.uas.eis.utils.HttpUtil;
|
|
|
import com.uas.eis.utils.StringUtil;
|
|
import com.uas.eis.utils.StringUtil;
|
|
|
|
|
+import net.sf.json.JSONObject;
|
|
|
import org.slf4j.Logger;
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -47,7 +48,7 @@ public class PnsDataSyncTask {
|
|
|
int pages = a + (b>0?1:0);
|
|
int pages = a + (b>0?1:0);
|
|
|
HashMap<String, String> reqHeader = new HashMap<>();
|
|
HashMap<String, String> reqHeader = new HashMap<>();
|
|
|
reqHeader.put("fromsys","ISP");
|
|
reqHeader.put("fromsys","ISP");
|
|
|
- Map<String, String> pageReq = new HashMap<>();
|
|
|
|
|
|
|
+ JSONObject pageReq = new JSONObject();
|
|
|
pageReq.put("if_name","ISPP-PSI-UPLOAD");
|
|
pageReq.put("if_name","ISPP-PSI-UPLOAD");
|
|
|
pageReq.put("if_key" , pnsConfig.getIf_key());
|
|
pageReq.put("if_key" , pnsConfig.getIf_key());
|
|
|
pageReq.put("total_page", String.valueOf(pages));
|
|
pageReq.put("total_page", String.valueOf(pages));
|
|
@@ -62,9 +63,9 @@ public class PnsDataSyncTask {
|
|
|
pageReq.put("current_data_count", String.valueOf(pageSize));
|
|
pageReq.put("current_data_count", String.valueOf(pageSize));
|
|
|
pageReq.put("detail", JSONArray.toJSONString(saleUploads.subList(i*pageSize, (i+1)*pageSize),SerializerFeature.WriteMapNullValue));
|
|
pageReq.put("detail", JSONArray.toJSONString(saleUploads.subList(i*pageSize, (i+1)*pageSize),SerializerFeature.WriteMapNullValue));
|
|
|
}
|
|
}
|
|
|
- logger.info("{}",pageReq);
|
|
|
|
|
|
|
+ logger.info("{}",pageReq.toString());
|
|
|
try {
|
|
try {
|
|
|
- HttpUtil.Response response = HttpUtil.sendPostRequest(pnsConfig.getRoute(), reqHeader, pageReq, false);
|
|
|
|
|
|
|
+ HttpUtil.Response response = HttpUtil.sendPostRequest(pnsConfig.getRoute(), reqHeader, pageReq.toString());
|
|
|
logger.info("{}",response.getResponseText());
|
|
logger.info("{}",response.getResponseText());
|
|
|
if (response.getStatusCode() == HttpStatus.OK.value()) {
|
|
if (response.getStatusCode() == HttpStatus.OK.value()) {
|
|
|
String data = response.getResponseText();
|
|
String data = response.getResponseText();
|