| | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("test") |
| | |
| | | |
| | | @PostMapping("/readFboFile") |
| | | public Response readFboFile(@RequestParam String filePath){ |
| | | log.info("接口readFboFile开始"); |
| | | //log.info("接口readFboFile开始"); |
| | | FboDataInf fboDataInf = new FboDataInf(); |
| | | log.info("fboDataInf:"+fboDataInf); |
| | | log.info("filePath:"+filePath); |
| | | //log.info("fboDataInf:"+fboDataInf); |
| | | // log.info("filePath:"+filePath); |
| | | //String filePath1 = java.net.URLDecoder.decode(filePath,"utf-8"); |
| | | fboDataInf.readFboFile(filePath); |
| | | log.info(fboDataInf.fboData.toString()); |
| | | log.info("读取结束"); |
| | | // log.info(fboDataInf.fboData.toString()); |
| | | // log.info("读取结束"); |
| | | // fileUrl = filePath; |
| | | return new Response().set(1,fboDataInf,filePath); |
| | | } |
| | |
| | | String actualCap_echart = req.getParameter("actualCap_echart"); //实际容量折线图 |
| | | String vol_echart = req.getParameter("vol_echart"); //单体电压折线图 |
| | | String tempEnvi_echart = req.getParameter("tempEnvi_echart");//环境温度折线图 |
| | | String HumiEnvi_echart = req.getParameter("tempEnvi_echart");//环境湿度折线图 |
| | | String humiEnvi_echart = req.getParameter("humiEnvi_echart");//环境湿度折线图 |
| | | |
| | | |
| | | String filePath = req.getParameter("filePath"); |
| | |
| | | String[] url = tempEnvi_echart.split(","); |
| | | bytes.add(new BASE64Decoder().decodeBuffer(url[1])); |
| | | } |
| | | if (ServletUtils.isNotNull(HumiEnvi_echart)) { |
| | | String[] url = HumiEnvi_echart.split(","); |
| | | if (ServletUtils.isNotNull(humiEnvi_echart)) { |
| | | String[] url = humiEnvi_echart.split(","); |
| | | bytes.add(new BASE64Decoder().decodeBuffer(url[1])); |
| | | } |
| | | }catch (Exception e){ |
| | |
| | | public String[] getPicName(int dateType){ |
| | | if (dateType==0xFB){ |
| | | String[] picName1 = new String[]{ |
| | | "电池电流折线图","组端电压折线图","测试容量折线图","实际容量折线图","单体电压折线图","环境温度折线图","环境湿度折线图" |
| | | "电池电流折线图","组端电压折线图","单体电压折线图","环境温度折线图","环境湿度折线图" |
| | | }; |
| | | return picName1; |
| | | }else{ |
| | | String[] picName = new String[]{ |
| | | "电池电流折线图","组端电压折线图","测试容量折线图","实际容量折线图","单体电压折线图" |
| | | "电池电流折线图","组端电压折线图","测试容量折线图","单体电压折线图","环境温度折线图","环境湿度折线图" |
| | | }; |
| | | return picName; |
| | | } |