Bläddra i källkod

上报对接省平台

mengy 3 år sedan
förälder
incheckning
192f88637d

+ 4 - 2
src/main/java/com/chinaitop/depot/business/controller/ReportMonthlyController.java

@@ -1,5 +1,6 @@
1 1
 package com.chinaitop.depot.business.controller;
2 2
 
3
+import com.alibaba.fastjson.JSONObject;
3 4
 import com.chinaitop.depot.business.model.ReportMonthly;
4 5
 import com.chinaitop.depot.business.model.ReportMonthlyExample;
5 6
 import com.chinaitop.depot.business.service.ReportMonthlyService;
@@ -133,10 +134,11 @@ public class ReportMonthlyController {
133 134
 		StringBuffer req = new StringBuffer();
134 135
 		try {
135 136
 			String mon = URLEncoder.encode(reportMonthly, "UTF-8");
137
+			JSONObject jsonObject = JSONObject.parseObject(reportMonthly);
136 138
 			String url = reportPath+"/rotation/report/monthly/save";//省平台月报表接口地址
137
-			String count= HTTPUtils.doPost(url,"?monthlyReport="+mon);
139
+			String count= HTTPUtils.doPost(url,"?monthlyReport="+jsonObject);
138 140
 			System.out.println("返回值:"+count+"---"+"请求地址:"+url);
139
-			System.out.println("请求地址以及参数:--"+url+"?monthlyReport="+mon);
141
+			System.out.println("请求地址以及参数:--"+url+"?monthlyReport="+jsonObject);
140 142
 			if(count.contains("Success") || count.contains("200")){
141 143
 				modelMap.put("status", "success");
142 144
 				modelMap.put("msg", "成功!");

+ 4 - 2
src/main/java/com/chinaitop/depot/business/controller/ReportWeeklyController.java

@@ -1,5 +1,6 @@
1 1
 package com.chinaitop.depot.business.controller;
2 2
 
3
+import com.alibaba.fastjson.JSONObject;
3 4
 import com.chinaitop.depot.business.model.ReportWeekly;
4 5
 import com.chinaitop.depot.business.model.ReportWeeklyExample;
5 6
 import com.chinaitop.depot.business.service.ReportWeeklyService;
@@ -133,10 +134,11 @@ public class ReportWeeklyController {
133 134
 		StringBuffer req = new StringBuffer();
134 135
 		try {
135 136
 			String weekly = URLEncoder.encode(reportWeekly, "UTF-8");
137
+			JSONObject jsonObject = JSONObject.parseObject(reportWeekly);
136 138
 			String url = reportPath+"/rotation/report/weekly/save";//省平台周报表接口地址
137
-			String count= HTTPUtils.doPost(url,"?weeklyReport="+weekly);
139
+			String count= HTTPUtils.doPost(url,"?weeklyReport="+jsonObject);
138 140
 			System.out.println("返回值:"+count+"---"+"请求地址:"+url);
139
-			System.out.println("请求地址以及参数:--"+url+"?weeklyReport="+weekly);
141
+			System.out.println("请求地址以及参数:--"+url+"?weeklyReport="+jsonObject);
140 142
 			if(count.contains("Success") || count.contains("200")){
141 143
 				modelMap.put("status", "success");
142 144
 				modelMap.put("msg", "成功!");