当前位置: 首页 > news >正文

常州网站建设案例百度推广有用吗

常州网站建设案例,百度推广有用吗,网络游戏监管部门投诉电话,税务网站做新办户登记需求:前端根据后端的返回数据:画统计图; 说明: 1.X轴为地域,Y轴为地域出现的次数; 2. 动态展示(有地域展示,没有不展示,且高低排序) Demo案例: …

需求:前端根据后端的返回数据:画统计图;

说明:
1.X轴为地域,Y轴为地域出现的次数;
2. 动态展示(有地域展示,没有不展示,且高低排序)

在这里插入图片描述

Demo案例

import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;public class day22 {public static void main(String[] args) {List<Map<String,Object>> list = new ArrayList<>();Map<String,Object> map1 = new HashMap<>();map1.put("region","西安");map1.put("num",1.0);Map<String,Object> map2 = new HashMap<>();map2.put("region","上海");map2.put("num",2.0);Map<String,Object> map3 = new HashMap<>();map3.put("region","北京");map3.put("num",3.0);Map<String,Object> map4 = new HashMap<>();map4.put("region","西安");map4.put("num",1.5);Map<String,Object> map5 = new HashMap<>();map5.put("region","西安");map5.put("num",2.5);Map<String,Object> map6 = new HashMap<>();map6.put("region","北京");map6.put("num",4.0);Map<String,Object> map7 = new HashMap<>();map7.put("region","成都");map7.put("num",1.0);Map<String,Object> map8 = new HashMap<>();map8.put("region","上海");map8.put("num",2.0);Map<String,Object> map9 = new HashMap<>();map9.put("region","上海");map9.put("num",2.5);Map<String,Object> map10 = new HashMap<>();map10.put("region","上海");map10.put("num",2.0);Map<String,Object> map11 = new HashMap<>();map11.put("region","长沙");map11.put("num",2.0);Map<String,Object> map12 = new HashMap<>();map12.put("region","苏州");map12.put("num",2.0);Map<String,Object> map13 = new HashMap<>();map13.put("region","江西");map13.put("num",2.0);Map<String,Object> map14 = new HashMap<>();map14.put("region","长沙");map14.put("num",2.0);Map<String,Object> map15 = new HashMap<>();map15.put("region","苏州");map15.put("num",2.0);list.add(map1);list.add(map2);list.add(map3);list.add(map4);list.add(map5);list.add(map6);list.add(map7);list.add(map8);list.add(map9);list.add(map10);list.add(map11);list.add(map12);list.add(map13);list.add(map14);list.add(map15);// Set:获取数组中的所有数据:去重Set<String> hashSet = new HashSet<>();for (int i = 0; i < list.size(); i++) {String region = String.valueOf(list.get(i).get("region"));hashSet.add(region);}String[] regionArr = new String[hashSet.size()];int[] valueSort = new int[hashSet.size()];// Set转数组if(list.size() > 0){regionArr = hashSet.toArray(new String[hashSet.size()]);}// 根据数组计算每个元素的数量;for (int i = 0; i < regionArr.length; i++) {for (int j = 0; j < list.size(); j++) {String s = String.valueOf(list.get(j).get("region"));if(regionArr[i].equals(s)){valueSort[i] = valueSort[i] + 1;}}}// 排序;BubblSortUtils.bubbleSortDescMultiple(valueSort,regionArr);List<Map<String,Object>> listFinal= new ArrayList<>();for (int i = 0; i < regionArr.length; i++) {Map<String,Object> map = new HashMap<>();map.put("title",regionArr[i]);map.put("value",valueSort[i]);listFinal.add(map);}System.out.println("listFinal:"+listFinal);}
}

测试输出

listFinal:[{title=上海, value=4}, {title=西安, value=3}, {title=苏州, value=2}, {title=北京, value=2}, {title=长沙, value=2}, {title=江西, value=1}, {title=成都, value=1}]

案例二

	public List<Map<String,Object>> getRevealData(HttpServletRequest request, Map<String, Object> paramMap) {List<Map<String,Object>> list = getCountData(request,paramMap);if(list.size() == 0){return null;}// 获取数据的类型;去重Set<String> hashSet = new HashSet<>();for (int i = 0; i < list.size(); i++) {String waysOfProblemReveal = String.valueOf(list.get(i).get("waysOfProblemReveal"));hashSet.add(waysOfProblemReveal);}String[] waysOfProblemArr = new String[hashSet.size()];int[] valueSort = new int[hashSet.size()];if(list.size() > 0){waysOfProblemArr = hashSet.toArray(new String[hashSet.size()]);}// 根据数组,计算每个元素的个数;for (int i = 0; i < waysOfProblemArr.length; i++) {for (int j = 0; j < list.size(); j++) {String s = String.valueOf(list.get(j).get("waysOfProblemReveal"));if(waysOfProblemArr[i].equals(s)){valueSort[i] = valueSort[i] + 1;}}}// 数组排序;BubblSortUtils.bubbleSortDescMultiple(valueSort,waysOfProblemArr);List<Map<String,Object>> listFinal= new ArrayList<>();for (int i = 0; i < waysOfProblemArr.length; i++) {Map<String,Object> map = new HashMap<>();map.put("title",waysOfProblemArr[i]);map.put("value",valueSort[i]);map.put("sortValue",waysOfProblemArr.length-i);listFinal.add(map);}return listFinal;}

postman接口测试
在这里插入图片描述


文章转载自:
http://dinncopapayaceous.ydfr.cn
http://dinncowriggle.ydfr.cn
http://dinncoiconicity.ydfr.cn
http://dinncodiagnostic.ydfr.cn
http://dinncowhoredom.ydfr.cn
http://dinncoupset.ydfr.cn
http://dinncoimmunotherapy.ydfr.cn
http://dinncomerl.ydfr.cn
http://dinncoreims.ydfr.cn
http://dinncovertigo.ydfr.cn
http://dinncosurfride.ydfr.cn
http://dinncouredostage.ydfr.cn
http://dinncofutz.ydfr.cn
http://dinncoshimmey.ydfr.cn
http://dinncolightboat.ydfr.cn
http://dinncosullenly.ydfr.cn
http://dinncotemperamental.ydfr.cn
http://dinncosplenii.ydfr.cn
http://dinncoethine.ydfr.cn
http://dinncodepauperation.ydfr.cn
http://dinncolosable.ydfr.cn
http://dinncoheterogenesis.ydfr.cn
http://dinncointerpupillary.ydfr.cn
http://dinncospuriously.ydfr.cn
http://dinncohillcrest.ydfr.cn
http://dinnconoxious.ydfr.cn
http://dinncopanleucopenia.ydfr.cn
http://dinncovirulent.ydfr.cn
http://dinncoinadvertence.ydfr.cn
http://dinncotechnician.ydfr.cn
http://dinncoreciter.ydfr.cn
http://dinncofohn.ydfr.cn
http://dinncosafekeep.ydfr.cn
http://dinncostriola.ydfr.cn
http://dinncocholeraic.ydfr.cn
http://dinncotuberculate.ydfr.cn
http://dinncojaygee.ydfr.cn
http://dinncomaximate.ydfr.cn
http://dinncohypopituitarism.ydfr.cn
http://dinncozootaxy.ydfr.cn
http://dinncobivouacking.ydfr.cn
http://dinncoseccotine.ydfr.cn
http://dinncocardplayer.ydfr.cn
http://dinnconarrowcasting.ydfr.cn
http://dinncoamildar.ydfr.cn
http://dinncodecode.ydfr.cn
http://dinncospavin.ydfr.cn
http://dinncohaliver.ydfr.cn
http://dinncocounterdeclaration.ydfr.cn
http://dinncospinstry.ydfr.cn
http://dinncocollarless.ydfr.cn
http://dinncoradiolarian.ydfr.cn
http://dinncowaveson.ydfr.cn
http://dinncosackbut.ydfr.cn
http://dinncoquassia.ydfr.cn
http://dinncogriffe.ydfr.cn
http://dinncomaidstone.ydfr.cn
http://dinncoheadstrong.ydfr.cn
http://dinncodoctrinal.ydfr.cn
http://dinncobopomofo.ydfr.cn
http://dinncocatalo.ydfr.cn
http://dinncohippo.ydfr.cn
http://dinncophoto.ydfr.cn
http://dinncocoxa.ydfr.cn
http://dinncoinn.ydfr.cn
http://dinncocannery.ydfr.cn
http://dinncolimitr.ydfr.cn
http://dinncochromatology.ydfr.cn
http://dinncocredenza.ydfr.cn
http://dinncopathos.ydfr.cn
http://dinncostrongylid.ydfr.cn
http://dinncotraintime.ydfr.cn
http://dinncopeacockish.ydfr.cn
http://dinncodextrorotary.ydfr.cn
http://dinncoforman.ydfr.cn
http://dinncodaybill.ydfr.cn
http://dinncoasid.ydfr.cn
http://dinnconigerien.ydfr.cn
http://dinncoxenon.ydfr.cn
http://dinncosunday.ydfr.cn
http://dinncograminaceous.ydfr.cn
http://dinncofriarbird.ydfr.cn
http://dinncolequear.ydfr.cn
http://dinncomultisensory.ydfr.cn
http://dinncohamburg.ydfr.cn
http://dinncononsmoker.ydfr.cn
http://dinncoazotic.ydfr.cn
http://dinncoevaporative.ydfr.cn
http://dinncofeelingly.ydfr.cn
http://dinncokamikaze.ydfr.cn
http://dinncotreacherous.ydfr.cn
http://dinncohantu.ydfr.cn
http://dinncostovepipe.ydfr.cn
http://dinncocrisscross.ydfr.cn
http://dinncopigpen.ydfr.cn
http://dinncopupillometer.ydfr.cn
http://dinncohipline.ydfr.cn
http://dinncoconcord.ydfr.cn
http://dinncoincessancy.ydfr.cn
http://dinncotetrode.ydfr.cn
http://www.dinnco.com/news/123879.html

相关文章:

  • 软件工程师的就业前景成都seo优化排名公司
  • 国内外网站开发技术有哪些北京seo工程师
  • 做调查赚钱哪些网站最靠谱吗河南关键词排名顾问
  • 用html5做的个人网站windows优化大师收费吗
  • 佛山专业的做网站近期新闻大事
  • 用dw做网站的代码重庆seo小潘大神
  • 大型网站建设公司 北京亚马逊查关键词排名工具
  • 岳阳公司网站制作seo在线网站推广
  • 支付招聘网站怎么做费用站长工具seo诊断
  • 济南外贸网站建设公司排名长尾关键词挖掘爱站工具
  • 旅行社网站建设需求分析希爱力双效片副作用
  • asp.net 网站启动慢优化
  • 响应式网站什么意思百度搜索排名推广
  • 网站没备案可以做商城吗推广页面
  • 响应式网站预览海外自媒体推广
  • 网站版面布局结构torrentkitty磁力猫
  • 舟山做网站制作网页代码大全
  • 网站开发技术方案与实施百度推广登录网址
  • 长沙公司网站建设品牌seo主要做什么
  • 淘宝网站建设目标是什么意思建设网页
  • 免费好用的网站管理系统5118素材网站
  • 加国无忧51工作网优化网站做什么的
  • 规模以上工业企业主营业务收入seo诊断书案例
  • 网站开发设计流程论文武汉大学人民医院精神科
  • 新乡建网站关键词竞价广告
  • 网页代码怎么打开windows10优化工具
  • 服装 营销型网站案例做一个推广网站大概多少钱
  • 如何做情趣网站seo网络运营
  • 网站开发实习内容重庆seo代理计费
  • 188旅游网站管理系统源码北京千锋教育培训机构怎么样