| | |
| | | public class TestController { |
| | | //@Autowired |
| | | //private FboDataInf fboDataInf; |
| | | public String fileUrl = ""; |
| | | public FboDataInf fboDataInf; |
| | | |
| | | @GetMapping("/hello") |
| | | public Response hello(){ |
| | |
| | | |
| | | @PostMapping("/readFboFile") |
| | | public Response readFboFile(@RequestParam String filePath){ |
| | | log.info("readFboFile开始"); |
| | | fboDataInf = new FboDataInf(); |
| | | log.info("接口readFboFile开始"); |
| | | FboDataInf fboDataInf = new FboDataInf(); |
| | | 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("读取结束"); |
| | | fileUrl = filePath; |
| | | // fileUrl = filePath; |
| | | return new Response().set(1,fboDataInf,filePath); |
| | | } |
| | | |
| | |
| | | String vol_echart = req.getParameter("vol_echart"); //单体电压折线图 |
| | | |
| | | String filePath = req.getParameter("filePath"); |
| | | if (fboDataInf==null){ |
| | | fboDataInf = new FboDataInf(); |
| | | if (filePath==null || "".equals(filePath)){ |
| | | filePath = fileUrl; |
| | | } |
| | | fboDataInf.readFboFile(filePath); |
| | | } |
| | | FboDataInf fboDataInf = new FboDataInf(); |
| | | fboDataInf.readFboFile(filePath); |
| | | // if (fboDataInf==null){ |
| | | // fboDataInf = new FboDataInf(); |
| | | // if (filePath==null || "".equals(filePath)){ |
| | | // filePath = fileUrl; |
| | | // } |
| | | // fboDataInf.readFboFile(filePath); |
| | | // } |
| | | //从文件中获取数据 |
| | | List<FboData> list = fboDataInf.fboData; |
| | | //图片base64后的数据 |