| | |
| | | import java.util.Set; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import com.alibaba.fastjson2.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.core.redis.RedisCache; |
| | |
| | | ResponseEntity<String> response = restTemplate.exchange(apiUrl, HttpMethod.POST, entity, String.class); |
| | | logger.info("推送数据到外部系统成功,响应: {}", response.getBody()); |
| | | |
| | | // 解析响应,获取sourceSystemId |
| | | try { |
| | | JSONObject result = JSONObject.parseObject(response.getBody()); |
| | | String sourceSystemId = result.getString("sourceSystemId"); |
| | | if (sourceSystemId != null) { |
| | | tmsArBill.setSourceSystemId(Integer.parseInt(sourceSystemId)); |
| | | } |
| | | } catch (Exception e) { |
| | | logger.error("解析外部系统响应失败: {}", e.getMessage()); |
| | | } |
| | | |
| | | |
| | | // 更新推送状态为成功 |
| | | tmsArBill.setPushStatus(2); |
| | | tmsArBill.setPushTime(DateUtils.getNowDate()); |