|
@@ -299,39 +299,36 @@ public class BaseDownServiceImpl implements BaseDownService {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
- Map<String, String> paramMap = new HashMap<String, String>();
|
|
|
+ try{
|
|
|
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
+ Map<String, String> paramMap = new HashMap<String, String>();
|
|
|
|
|
|
- log.info("开始下载格力品牌安装销售类型信息: \uF0B7{}",sdf.format(new Date()));
|
|
|
-
|
|
|
- Token token = tokenCenter.getCurrentToken();
|
|
|
- String url = baseurl + InterFaceTypeEnum.GLPP_XSLX.getCode() + "/querylist";
|
|
|
- String paramJson= JSON.toJSONString(paramMap);
|
|
|
-
|
|
|
- JSONResult jsonResult = HttpUtil.httpRequestWithToken(url, "POST", paramJson, token);
|
|
|
- if (jsonResult.getStatus() == null || !jsonResult.getStatus().toString().equals("200")) {
|
|
|
- log.info("下载格力品牌安装销售类型信息失败!: {}",jsonResult.getMessage());
|
|
|
- return;
|
|
|
- }
|
|
|
- JSONArray jsonArray = (JSONArray) jsonResult.getData();
|
|
|
+ log.info("开始下载格力品牌安装销售类型信息: \uF0B7{}",sdf.format(new Date()));
|
|
|
|
|
|
- if (jsonArray != null) {
|
|
|
- log.info("格力品牌安装销售类型下载了{}条数据",jsonArray.size());
|
|
|
+ Token token = tokenCenter.getCurrentToken();
|
|
|
+ String url = baseurl + InterFaceTypeEnum.GLPP_XSLX.getCode() + "/querylist";
|
|
|
+ String paramJson= JSON.toJSONString(paramMap);
|
|
|
|
|
|
- // log.info("格力品牌安装销售类型下载了{}", JSONObject.toJSONString(jsonArray));
|
|
|
+ JSONResult jsonResult = HttpUtil.httpRequestWithToken(url, "POST", paramJson, token);
|
|
|
+ if (jsonResult.getStatus() == null || !jsonResult.getStatus().toString().equals("200")) {
|
|
|
+ log.info("下载格力品牌安装销售类型信息失败!: {}",jsonResult.getMessage());
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ JSONArray jsonArray = (JSONArray) jsonResult.getData();
|
|
|
|
|
|
- try{
|
|
|
+ if (jsonArray != null) {
|
|
|
+ log.info("格力品牌安装销售类型下载了{}条数据",jsonArray.size());
|
|
|
glppxslxDownloadService.extractedXSLX(jsonArray);
|
|
|
jsonArray.clear();
|
|
|
log.info("格力品牌安装销售类型信息处理完成: \uF0B7{}",sdf.format(new Date()));
|
|
|
- } catch (Exception ex) {
|
|
|
- jsonArray.clear();
|
|
|
- ex.printStackTrace();
|
|
|
- log.info("格力品牌安装销售类型处理失败");
|
|
|
+ }else {
|
|
|
+ log.info("["+url+"]无数据");
|
|
|
}
|
|
|
- }else {
|
|
|
- log.info("["+url+"]无数据");
|
|
|
+ } catch (Exception ex) {
|
|
|
+ ex.printStackTrace();
|
|
|
+ log.info("格力品牌安装销售类型处理失败");
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
|
|
|
public void processGLPPLeiBie() throws Exception {
|