|  |  | @ -16,6 +16,7 @@ import com.glxp.api.res.sync.SpsSyncBusOrderResponse; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.res.sync.SpsSyncOrderResponse; |  |  |  | import com.glxp.api.res.sync.SpsSyncOrderResponse; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.service.sync.SyncDataSetService; |  |  |  | import com.glxp.api.service.sync.SyncDataSetService; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.util.OkHttpCli; |  |  |  | import com.glxp.api.util.OkHttpCli; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import org.springframework.beans.factory.annotation.Value; | 
			
		
	
		
		
			
				
					
					|  |  |  | import org.springframework.stereotype.Service; |  |  |  | import org.springframework.stereotype.Service; | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | import javax.annotation.Resource; |  |  |  | import javax.annotation.Resource; | 
			
		
	
	
		
		
			
				
					|  |  | @ -32,15 +33,25 @@ public class SpGetHttpClient { | 
			
		
	
		
		
			
				
					
					|  |  |  |     @Resource |  |  |  |     @Resource | 
			
		
	
		
		
			
				
					
					|  |  |  |     SyncDataSetService syncDataSetService; |  |  |  |     SyncDataSetService syncDataSetService; | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     @Value("${API_KEY}") | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     private String apiKey; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     @Value("${API_SECRET}") | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     private String apiSecret; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     public String getIpUrl() { |  |  |  |     public String getIpUrl() { | 
			
		
	
		
		
			
				
					
					|  |  |  |         SyncDataSetEntity syncDataSetEntity = syncDataSetService.findSet(); |  |  |  |         SyncDataSetEntity syncDataSetEntity = syncDataSetService.findSet(); | 
			
		
	
		
		
			
				
					
					|  |  |  |         return syncDataSetEntity.getSyncIp(); |  |  |  |         return syncDataSetEntity.getSyncIp(); | 
			
		
	
		
		
			
				
					
					|  |  |  |     } |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     public String[] buildHeader() { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         String[] headers = {"apiKey", apiKey, "apiSecret", apiSecret}; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         return headers; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     public BaseResponse<String> postAllOrder(SpsSyncOrderResponse spsSyncOrderResponse) { |  |  |  |     public BaseResponse<String> postAllOrder(SpsSyncOrderResponse spsSyncOrderResponse) { | 
			
		
	
		
		
			
				
					
					|  |  |  |         String json = JSONUtil.toJsonStr(spsSyncOrderResponse); |  |  |  |         String json = JSONUtil.toJsonStr(spsSyncOrderResponse); | 
			
		
	
		
		
			
				
					
					|  |  |  |         String result = okHttpCli.doPostJson(getIpUrl() + "/orderApi/sps/sync/order/upload", json); |  |  |  |         String result = okHttpCli.doPostJson(getIpUrl() + "/orderApi/sps/sync/order/upload", json, buildHeader()); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         BaseResponse<String> response = |  |  |  |         BaseResponse<String> response = | 
			
		
	
		
		
			
				
					
					|  |  |  |                 JSONObject.parseObject(result, new TypeReference<BaseResponse<String>>() { |  |  |  |                 JSONObject.parseObject(result, new TypeReference<BaseResponse<String>>() { | 
			
		
	
		
		
			
				
					
					|  |  |  |                 }); |  |  |  |                 }); | 
			
		
	
	
		
		
			
				
					|  |  | @ -49,7 +60,7 @@ public class SpGetHttpClient { | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     public BaseResponse<String> postAllBusOrder(SpsSyncBusOrderResponse spsSyncOrderResponse) { |  |  |  |     public BaseResponse<String> postAllBusOrder(SpsSyncBusOrderResponse spsSyncOrderResponse) { | 
			
		
	
		
		
			
				
					
					|  |  |  |         String json = JSONUtil.toJsonStr(spsSyncOrderResponse); |  |  |  |         String json = JSONUtil.toJsonStr(spsSyncOrderResponse); | 
			
		
	
		
		
			
				
					
					|  |  |  |         String result = okHttpCli.doPostJson(getIpUrl() + "/busOrderApi/sps/sync/busOrder/upload", json); |  |  |  |         String result = okHttpCli.doPostJson(getIpUrl() + "/busOrderApi/sps/sync/busOrder/upload", json, buildHeader()); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         BaseResponse<String> response = |  |  |  |         BaseResponse<String> response = | 
			
		
	
		
		
			
				
					
					|  |  |  |                 JSONObject.parseObject(result, new TypeReference<BaseResponse<String>>() { |  |  |  |                 JSONObject.parseObject(result, new TypeReference<BaseResponse<String>>() { | 
			
		
	
		
		
			
				
					
					|  |  |  |                 }); |  |  |  |                 }); | 
			
		
	
	
		
		
			
				
					|  |  | @ -60,7 +71,7 @@ public class SpGetHttpClient { | 
			
		
	
		
		
			
				
					
					|  |  |  |     public BaseResponse<PageSimpleResponse<IOOrderStatusEntity>> getOrderStatus() { |  |  |  |     public BaseResponse<PageSimpleResponse<IOOrderStatusEntity>> getOrderStatus() { | 
			
		
	
		
		
			
				
					
					|  |  |  |         Map<String, String> paramMap = new HashMap<>(16); |  |  |  |         Map<String, String> paramMap = new HashMap<>(16); | 
			
		
	
		
		
			
				
					
					|  |  |  |         paramMap.put("status", 1 + ""); |  |  |  |         paramMap.put("status", 1 + ""); | 
			
		
	
		
		
			
				
					
					|  |  |  |         String response = okHttpCli.doGet(getIpUrl() + "/spms/inout/order/status", paramMap); |  |  |  |         String response = okHttpCli.doGet(getIpUrl() + "/spms/inout/order/status", paramMap, buildHeader()); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         try { |  |  |  |         try { | 
			
		
	
		
		
			
				
					
					|  |  |  |             BaseResponse<PageSimpleResponse<IOOrderStatusEntity>> data = |  |  |  |             BaseResponse<PageSimpleResponse<IOOrderStatusEntity>> data = | 
			
		
	
		
		
			
				
					
					|  |  |  |                     JSONObject.parseObject(response, new TypeReference<BaseResponse<PageSimpleResponse<IOOrderStatusEntity>>>() { |  |  |  |                     JSONObject.parseObject(response, new TypeReference<BaseResponse<PageSimpleResponse<IOOrderStatusEntity>>>() { | 
			
		
	
	
		
		
			
				
					|  |  | @ -77,7 +88,7 @@ public class SpGetHttpClient { | 
			
		
	
		
		
			
				
					
					|  |  |  |     public BaseResponse<List<DlOrderResponse>> getOrders(String orderId) { |  |  |  |     public BaseResponse<List<DlOrderResponse>> getOrders(String orderId) { | 
			
		
	
		
		
			
				
					
					|  |  |  |         Map<String, String> paramMap = new HashMap<>(16); |  |  |  |         Map<String, String> paramMap = new HashMap<>(16); | 
			
		
	
		
		
			
				
					
					|  |  |  |         paramMap.put("orderId", orderId); |  |  |  |         paramMap.put("orderId", orderId); | 
			
		
	
		
		
			
				
					
					|  |  |  |         String response = okHttpCli.doGet(getIpUrl() + "/spms/inout/order/dlByStatus", paramMap); |  |  |  |         String response = okHttpCli.doGet(getIpUrl() + "/spms/inout/order/dlByStatus", paramMap, buildHeader()); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         try { |  |  |  |         try { | 
			
		
	
		
		
			
				
					
					|  |  |  |             BaseResponse<List<DlOrderResponse>> data = |  |  |  |             BaseResponse<List<DlOrderResponse>> data = | 
			
		
	
		
		
			
				
					
					|  |  |  |                     JSONObject.parseObject(response, new TypeReference<BaseResponse<List<DlOrderResponse>>>() { |  |  |  |                     JSONObject.parseObject(response, new TypeReference<BaseResponse<List<DlOrderResponse>>>() { | 
			
		
	
	
		
		
			
				
					|  |  | @ -95,7 +106,7 @@ public class SpGetHttpClient { | 
			
		
	
		
		
			
				
					
					|  |  |  |         orderStatusFilterRequest.setOrderId(orderId); |  |  |  |         orderStatusFilterRequest.setOrderId(orderId); | 
			
		
	
		
		
			
				
					
					|  |  |  |         orderStatusFilterRequest.setStatus(2); |  |  |  |         orderStatusFilterRequest.setStatus(2); | 
			
		
	
		
		
			
				
					
					|  |  |  |         String json = JSONUtil.toJsonStr(orderStatusFilterRequest); |  |  |  |         String json = JSONUtil.toJsonStr(orderStatusFilterRequest); | 
			
		
	
		
		
			
				
					
					|  |  |  |         String result = okHttpCli.doPostJson(getIpUrl() + "/spms/inout/order/updateStatus", json); |  |  |  |         String result = okHttpCli.doPostJson(getIpUrl() + "/spms/inout/order/updateStatus", json, buildHeader()); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         BaseResponse<String> response = |  |  |  |         BaseResponse<String> response = | 
			
		
	
		
		
			
				
					
					|  |  |  |                 JSONObject.parseObject(result, new TypeReference<BaseResponse<String>>() { |  |  |  |                 JSONObject.parseObject(result, new TypeReference<BaseResponse<String>>() { | 
			
		
	
		
		
			
				
					
					|  |  |  |                 }); |  |  |  |                 }); | 
			
		
	
	
		
		
			
				
					|  |  | @ -107,7 +118,7 @@ public class SpGetHttpClient { | 
			
		
	
		
		
			
				
					
					|  |  |  |         Map<String, String> paramMap = new HashMap<>(16); |  |  |  |         Map<String, String> paramMap = new HashMap<>(16); | 
			
		
	
		
		
			
				
					
					|  |  |  |         paramMap.put("type", type); |  |  |  |         paramMap.put("type", type); | 
			
		
	
		
		
			
				
					
					|  |  |  |         paramMap.put("status", "3"); |  |  |  |         paramMap.put("status", "3"); | 
			
		
	
		
		
			
				
					
					|  |  |  |         String response = okHttpCli.doGet(getIpUrl() + "/spssync/basic/udiinfo/getStatus", paramMap); |  |  |  |         String response = okHttpCli.doGet(getIpUrl() + "/spssync/basic/udiinfo/getStatus", paramMap, buildHeader()); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         try { |  |  |  |         try { | 
			
		
	
		
		
			
				
					
					|  |  |  |             BaseResponse<List<BasicExportStatusEntity>> data = |  |  |  |             BaseResponse<List<BasicExportStatusEntity>> data = | 
			
		
	
		
		
			
				
					
					|  |  |  |                     JSONObject.parseObject(response, new TypeReference<BaseResponse<List<BasicExportStatusEntity>>>() { |  |  |  |                     JSONObject.parseObject(response, new TypeReference<BaseResponse<List<BasicExportStatusEntity>>>() { | 
			
		
	
	
		
		
			
				
					|  |  | @ -144,7 +155,7 @@ public class SpGetHttpClient { | 
			
		
	
		
		
			
				
					
					|  |  |  |             paramMap.put("id", basicExportStatusRequest.getId()); |  |  |  |             paramMap.put("id", basicExportStatusRequest.getId()); | 
			
		
	
		
		
			
				
					
					|  |  |  |         if (basicExportStatusRequest.getScheduleType() != null) |  |  |  |         if (basicExportStatusRequest.getScheduleType() != null) | 
			
		
	
		
		
			
				
					
					|  |  |  |             paramMap.put("scheduleType", basicExportStatusRequest.getScheduleType() + ""); |  |  |  |             paramMap.put("scheduleType", basicExportStatusRequest.getScheduleType() + ""); | 
			
		
	
		
		
			
				
					
					|  |  |  |         String response = okHttpCli.doGet(getIpUrl() + "/spssync/basic/udiinfo/getStatus", paramMap); |  |  |  |         String response = okHttpCli.doGet(getIpUrl() + "/spssync/basic/udiinfo/getStatus", paramMap, buildHeader()); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         try { |  |  |  |         try { | 
			
		
	
		
		
			
				
					
					|  |  |  |             BaseResponse<List<BasicExportStatusEntity>> data = |  |  |  |             BaseResponse<List<BasicExportStatusEntity>> data = | 
			
		
	
		
		
			
				
					
					|  |  |  |                     JSONObject.parseObject(response, new TypeReference<BaseResponse<List<BasicExportStatusEntity>>>() { |  |  |  |                     JSONObject.parseObject(response, new TypeReference<BaseResponse<List<BasicExportStatusEntity>>>() { | 
			
		
	
	
		
		
			
				
					|  |  | @ -163,7 +174,7 @@ public class SpGetHttpClient { | 
			
		
	
		
		
			
				
					
					|  |  |  |         basicExportStatusRequest.setId(id); |  |  |  |         basicExportStatusRequest.setId(id); | 
			
		
	
		
		
			
				
					
					|  |  |  |         basicExportStatusRequest.setType(type); |  |  |  |         basicExportStatusRequest.setType(type); | 
			
		
	
		
		
			
				
					
					|  |  |  |         String json = JSONUtil.toJsonStr(basicExportStatusRequest); |  |  |  |         String json = JSONUtil.toJsonStr(basicExportStatusRequest); | 
			
		
	
		
		
			
				
					
					|  |  |  |         String result = okHttpCli.doPostJson(getIpUrl() + "/spssync/basic/udiinfo/downloadByStatus", json); |  |  |  |         String result = okHttpCli.doPostJson(getIpUrl() + "/spssync/basic/udiinfo/downloadByStatus", json, buildHeader()); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         return result; |  |  |  |         return result; | 
			
		
	
		
		
			
				
					
					|  |  |  |     } |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
	
		
		
			
				
					|  |  | @ -172,7 +183,7 @@ public class SpGetHttpClient { | 
			
		
	
		
		
			
				
					
					|  |  |  |         BasicExportStatusRequest basicStatusFilterRequest = new BasicExportStatusRequest(); |  |  |  |         BasicExportStatusRequest basicStatusFilterRequest = new BasicExportStatusRequest(); | 
			
		
	
		
		
			
				
					
					|  |  |  |         basicStatusFilterRequest.setId(id); |  |  |  |         basicStatusFilterRequest.setId(id); | 
			
		
	
		
		
			
				
					
					|  |  |  |         String json = JSONUtil.toJsonStr(basicStatusFilterRequest); |  |  |  |         String json = JSONUtil.toJsonStr(basicStatusFilterRequest); | 
			
		
	
		
		
			
				
					
					|  |  |  |         String result = okHttpCli.doPostJson(getIpUrl() + "/spssync/basic/udiinfo/deleteByStatus", json); |  |  |  |         String result = okHttpCli.doPostJson(getIpUrl() + "/spssync/basic/udiinfo/deleteByStatus", json, buildHeader()); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         BaseResponse<String> response = |  |  |  |         BaseResponse<String> response = | 
			
		
	
		
		
			
				
					
					|  |  |  |                 JSONObject.parseObject(result, new TypeReference<BaseResponse<String>>() { |  |  |  |                 JSONObject.parseObject(result, new TypeReference<BaseResponse<String>>() { | 
			
		
	
		
		
			
				
					
					|  |  |  |                 }); |  |  |  |                 }); | 
			
		
	
	
		
		
			
				
					|  |  | 
 |