5:基于Echarts的数据展示,毕业设计选题的目的和意义

try {

getById(request, response);

} catch (SQLException|IOException e) {

e.printStackTrace();

}

break;

default:

break;

}

}

private void getById(HttpServletRequest request, HttpServletResponse response) throws SQLException, IOException {

final String idStr = request.getParameter(“id”);

if(idStr==null){

throw new RuntimeException(“待查询的商品的id不能为空”);

}

Integer id = Integer.parseInt(idStr);

final Goods goods = goodsService.getGoodsById(id);

final JSONObject jsonObject = new JSONObject();

jsonObject.put(“goods”, goods);

response.getWriter().write(jsonObject.toString());

}

private void findAll(HttpServletRequest request, HttpServletResponse response) throws IOException {

List goodsList = null;

try {

goodsList = goodsService.listAllGoods();

} catch (SQLException e) {

e.printStackTrace();

}

final ArrayList ids = new ArrayList<>();

List nameList = new ArrayList<>();

List price1List = new ArrayList<>();

List price2List = new ArrayList<>();

List amountList = new ArrayList<>();

for (Goods goods : goodsList) {

final Integer id = goods.getId();

ids.add(id);

final String name = goods.getName();

nameList.add(name);

final double price1 = goods.getPrice1();

price1List.add(price1);

final double price2 = goods.getPrice2();

price2List.add(price2);

final Integer amount = goods.getAmount();

amountList.add(amount);

}

final JSONObject jsonObject = new JSONObject();

jsonObject.put(“ids”, ids);

jsonObject.put(“nameList”, nameList);

jsonObject.put(“price1List”, price1List);

jsonObject.put(“price2List”, price2List);

jsonObject.put(“amountList”, amountList);

response.getWriter().write(jsonObject.toString());

}

}

前端代码


  • 下载并导入jquery.min.js文件

  • 下载并导入 echarts.min.js 文件

  • bar.jsp页面

<%@ page contentType=“text/html;charset=UTF-8” language=“java” %>

商品信息
  • pie.jsp页面

自我介绍一下,小编13年上海交大毕业,曾经在小公司待过,也去过华为、OPPO等大厂,18年进入阿里一直到现在。

深知大多数同学面临毕业设计项目选题时,很多人都会感到无从下手,尤其是对于计算机专业的学生来说,选择一个合适的题目尤为重要。因为毕业设计不仅是我们在大学四年学习的一个总结,更是展示自己能力的重要机会。

因此收集整理了一份《2024年计算机毕业设计项目大全》,初衷也很简单,就是希望能够帮助提高效率,同时减轻大家的负担。
img
img
img

既有Java、Web、PHP、也有C、小程序、Python等项目供你选择,真正体系化!

由于项目比较多,这里只是将部分目录截图出来,每个节点里面都包含素材文档、项目源码、讲解视频

如果你觉得这些内容对你有帮助,可以添加VX:vip1024c (备注项目大全获取)
img

4eCTxHvg-1712510207714)]
[外链图片转存中…(img-ikfbHFOh-1712510207714)]
[外链图片转存中…(img-BW7N7eaC-1712510207715)]

既有Java、Web、PHP、也有C、小程序、Python等项目供你选择,真正体系化!

由于项目比较多,这里只是将部分目录截图出来,每个节点里面都包含素材文档、项目源码、讲解视频

如果你觉得这些内容对你有帮助,可以添加VX:vip1024c (备注项目大全获取)
[外链图片转存中…(img-v4xlV48b-1712510207715)]

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值