| | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.validation.Valid; |
| | | import java.io.*; |
| | | import java.sql.Timestamp; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Map.Entry; |
| | | |
| | |
| | | String s = regionWeightService.selectCode(); |
| | | String[] split = s.split(","); |
| | | String strArrays = ""; |
| | | System.out.println("数量:"+split.length); |
| | | for (int i = 0; i < split.length; i++) { |
| | | strArrays += "'" + split[i] + "',"; |
| | | } |
| | |
| | | e.printStackTrace(); |
| | | } |
| | | Process proc; |
| | | Timestamp timestamp = new Timestamp(System.currentTimeMillis()); |
| | | long url=timestamp.getTime(); |
| | | Map m= new HashMap(); |
| | | m.put("url",url+".png"); |
| | | String[] args1=new String[]{"python","D:\\fz\\fz.py", String.valueOf(url)}; |
| | | try { |
| | | proc = Runtime.getRuntime().exec("python D:\\fz\\fz.py"); |
| | | proc = Runtime.getRuntime().exec(args1); |
| | | BufferedReader in = new BufferedReader(new InputStreamReader(proc.getInputStream())); |
| | | String line = null; |
| | | while ((line = in.readLine()) != null) { |
| | |
| | | } catch (InterruptedException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | lists.add(m); |
| | | return R.data(lists); |
| | | } |
| | | |