| | |
| | | import org.springframework.http.HttpMethod; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.MultiValueMap; |
| | | import org.springframework.web.client.RestTemplate; |
| | | |
| | |
| | | * @param xsfsQktj |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void saveOrUpdateData(XsfsQktjVO xsfsQktj) { |
| | | // 参数拼接 |
| | | StringBuilder builder = new StringBuilder("?"); |
| | |
| | | XsfsQktj xsfsQktjBy = baseMapper.selectXsfsQktjBy(adCode,xsfsQktj.getQueryTime()); |
| | | if (null!=xsfsQktjBy){ |
| | | // 跳出本次循环 |
| | | //更新 |
| | | setXsfsQktjInfo(xsfsQktjBy,jsonArray,i,xsfsQktj.getQueryTime()); |
| | | updateById(xsfsQktjBy); |
| | | continue; |
| | | } |
| | | XsfsQktj qkTj = new XsfsQktj(); |
| | |
| | | skxs.setUpdateTime(new Date()); |
| | | skxs.setSysResource("zt"); |
| | | // 总 |
| | | skxs.setZxsTotal(jsonArray.getJSONObject(i).getDouble("tot_cap")); |
| | | // skxs.setZxsTotal(jsonArray.getJSONObject(i).getDouble("tot_cap")); |
| | | skxs.setZxsTotal(jsonArray.getJSONObject(i).getDouble("now_cap")); |
| | | skxs.setZxsSc(jsonArray.getJSONObject(i).getDouble("diff_last_day")); |
| | | skxs.setZxsLastYearTq(jsonArray.getJSONObject(i).getDouble("rate_last_year_cap")); |
| | | skxs.setZxsLastYearTqzj(jsonArray.getJSONObject(i).getDouble("diff_last_year")); |
| | | skxs.setZxsHisTq(jsonArray.getJSONObject(i).getDouble("diff_his_cap")); |
| | | skxs.setZxsHisTqzj(jsonArray.getJSONObject(i).getDouble("rate_avg_cap")); |
| | | // 大型 |
| | | skxs.setDxskXsTotal(jsonArray.getJSONObject(i).getDouble("big_tot_cap")); |
| | | skxs.setDxskXsTotal(jsonArray.getJSONObject(i).getDouble("big_now_cap")); |
| | | skxs.setDxskXsHis(jsonArray.getJSONObject(i).getDouble("big_diff_his")); |
| | | skxs.setDxskXsLastYear(jsonArray.getJSONObject(i).getDouble("big_diff_last_year")); |
| | | // 中型 |
| | | skxs.setZxskXsTotal(jsonArray.getJSONObject(i).getDouble("mid_tot_cap")); |
| | | skxs.setZxskXsTotal(jsonArray.getJSONObject(i).getDouble("mid_now_cap")); |
| | | skxs.setZxskXsHis(jsonArray.getJSONObject(i).getDouble("mid_diff_his")); |
| | | skxs.setZxskXsLastYear(jsonArray.getJSONObject(i).getDouble("mid_diff_last_year")); |
| | | // 小型 |
| | | skxs.setXxskXsTotal(jsonArray.getJSONObject(i).getDouble("small_tot_cap")); |
| | | skxs.setXxskXsTotal(jsonArray.getJSONObject(i).getDouble("small_now_cap")); |
| | | } |
| | | |
| | | /** |