|  |  | 
 |  |  |      */ | 
 |  |  |     @Override | 
 |  |  |     @Transactional(rollbackFor = Exception.class) | 
 |  |  |     public R pubTasks(RcsPubTaskParams params)  { | 
 |  |  |     public CommonResponse pubTasks(RcsPubTaskParams params)  { | 
 |  |  |         /**RCS基础配置链接*/ | 
 |  |  |         String rcsUrl =  rcsApi.getHost() + ":" + rcsApi.getPort() + RcsConstant.pubTask; | 
 |  |  |         log.info("任务下发,请求地址: {}, 请求参数: {}", rcsUrl , JSONObject.toJSONString(params)); | 
 |  |  | 
 |  |  |             try { | 
 |  |  |                 CommonResponse result = objectMapper.readValue(exchange.getBody(), CommonResponse.class); | 
 |  |  |                 if (result.getCode() == 200) { | 
 |  |  |                     return R.ok(); | 
 |  |  |                     return result; | 
 |  |  |                 } else { | 
 |  |  |                     throw new CoolException("任务下发失败!!"); | 
 |  |  |                     return result; | 
 |  |  |                 } | 
 |  |  |             } catch (JsonProcessingException e) { | 
 |  |  |                 throw new CoolException(e.getMessage()); | 
 |  |  | 
 |  |  |      * @version 1.0 | 
 |  |  |      */ | 
 |  |  |     @Override | 
 |  |  |     public R cancelTasks(Map<String, Object> params) { | 
 |  |  |         return  R.ok(); | 
 |  |  |     public CommonResponse cancelTasks(Map<String, Object> params) { | 
 |  |  |         return  new CommonResponse(); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  | 
 |  |  |      * @version 1.0 | 
 |  |  |      */ | 
 |  |  |     @Override | 
 |  |  |     public R callBackEvent(ExMsgCallbackParams params) { | 
 |  |  |     public CommonResponse callBackEvent(ExMsgCallbackParams params) { | 
 |  |  |         String callUrl =  wmsApi.getHost() + ":" + wmsApi.getPort() + WmsConstant.callBack; | 
 |  |  |         /**WMS基础配置链接*/ | 
 |  |  |         log.info("任务执行状态上报,请求地址: {}, 请求参数: {}", callUrl , JSONObject.toJSONString(params)); | 
 |  |  | 
 |  |  |         ResponseEntity<String> exchange = restTemplate.exchange(callUrl, HttpMethod.POST, httpEntity, String.class); | 
 |  |  |         log.info("任务执行状态上报,响应结果: {}", exchange); | 
 |  |  |         if (Objects.isNull(exchange.getBody())) { | 
 |  |  |             return R.error(); | 
 |  |  |             return new CommonResponse(); | 
 |  |  |         } else { | 
 |  |  |             ObjectMapper objectMapper = new ObjectMapper(); | 
 |  |  |             objectMapper.coercionConfigDefaults() | 
 |  |  | 
 |  |  |             try { | 
 |  |  |                 CommonResponse result = objectMapper.readValue(exchange.getBody(), CommonResponse.class); | 
 |  |  |                 if (result.getCode() == 200) { | 
 |  |  |                     return R.ok(); | 
 |  |  |                     return result; | 
 |  |  |                 } else { | 
 |  |  |                     return R.error(result.getMsg()); | 
 |  |  |                     return result; | 
 |  |  | //                    throw new CoolException("任务执行状态上报失败!!"); | 
 |  |  |                 } | 
 |  |  |             } catch (JsonProcessingException e) { |