|
@@ -53,15 +53,21 @@ public class OrderSalesDetailController extends BaseController
|
|
|
@ResponseBody
|
|
|
public Object list(HttpServletRequest request)
|
|
|
{
|
|
|
- //设置为form方式
|
|
|
- HttpHeaders headers = new HttpHeaders();
|
|
|
- headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED);
|
|
|
- MultiValueMap<String, Object> map = MapDataUtil.convertMultiValueMap(request);
|
|
|
-
|
|
|
- HttpEntity<Object> requestEntity
|
|
|
- = new HttpEntity<>(map, headers);
|
|
|
String url = cloudPath+"order"+request.getRequestURI();
|
|
|
- String str = restTemplate.postForObject(url ,requestEntity,String.class);
|
|
|
+ String str = "";
|
|
|
+ try{
|
|
|
+ //设置为form方式
|
|
|
+ HttpHeaders headers = new HttpHeaders();
|
|
|
+ headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED);
|
|
|
+ MultiValueMap<String, Object> map = MapDataUtil.convertMultiValueMap(request);
|
|
|
+
|
|
|
+ HttpEntity<Object> requestEntity
|
|
|
+ = new HttpEntity<>(map, headers);
|
|
|
+ str = restTemplate.postForObject(url ,requestEntity,String.class);
|
|
|
+ }catch (Exception e){
|
|
|
+ logger.error("查询销售目标达成列表"+url,e);
|
|
|
+ throw e;
|
|
|
+ }
|
|
|
return str;
|
|
|
}
|
|
|
|
|
@@ -71,9 +77,16 @@ public class OrderSalesDetailController extends BaseController
|
|
|
@GetMapping("/info/{id}")
|
|
|
public String info(@PathVariable("id") Long id, ModelMap mmap)
|
|
|
{
|
|
|
- String str = restTemplate.getForObject(cloudPath+"order/order/orderSalesDetail/info/"+id,String.class);
|
|
|
- OrderSalesDetail orderSalesDetail = JSONObject.toJavaObject(JSON.parseObject(str),OrderSalesDetail.class);
|
|
|
- mmap.put("orderSalesDetail", orderSalesDetail);
|
|
|
+ String url = cloudPath+"order/order/orderSalesDetail/info/"+id;
|
|
|
+ String str = "";
|
|
|
+ try{
|
|
|
+ str = restTemplate.getForObject(url,String.class);
|
|
|
+ OrderSalesDetail orderSalesDetail = JSONObject.toJavaObject(JSON.parseObject(str),OrderSalesDetail.class);
|
|
|
+ mmap.put("orderSalesDetail", orderSalesDetail);
|
|
|
+ }catch(Exception e){
|
|
|
+ logger.error("查询销售销售目标达成详情"+url,e);
|
|
|
+ throw e;
|
|
|
+ }
|
|
|
return prefix + "/edit";
|
|
|
}
|
|
|
|