| | |
| | | |
| | | import com.lf.server.entity.ctrl.MarkJsonEntity; |
| | | import com.lf.server.entity.data.DownloadEntity; |
| | | import com.lf.server.entity.data.MetaFileEntity; |
| | | import com.lf.server.entity.data.MetaEntity; |
| | | import com.lf.server.entity.show.MarkEntity; |
| | | import com.lf.server.entity.sys.UserEntity; |
| | | import com.lf.server.helper.*; |
| | |
| | | * @throws Exception 异常 |
| | | */ |
| | | public String downloadShp(UserEntity ue, List<MarkJsonEntity> list, HttpServletRequest req, HttpServletResponse res) throws Exception { |
| | | String parent = pathHelper.getTempPath(ue.getId()); |
| | | String parent = pathHelper.getTempPath(); |
| | | |
| | | String path = createShapeFiles(ue, list, parent); |
| | | File[] files = new File(path).listFiles(); |
| | |
| | | DownloadEntity de = new DownloadEntity(); |
| | | de.setName(FileHelper.getFileName(file)); |
| | | de.setType(1); |
| | | de.setSizes(FileHelper.sizeToMb(new File(file).length())); |
| | | de.setDepid(ue.getDepid()); |
| | | de.setDcount(0); |
| | | // de.setPwd(null) |
| | |
| | | * @param list ShapeFile文件列表 |
| | | * @return Mark实体类集合 |
| | | */ |
| | | public List<MarkJsonEntity> readShpForMarks(List<MetaFileEntity> list) { |
| | | public List<MarkJsonEntity> readShpForMarks(List<MetaEntity> list) { |
| | | String fileName = null; |
| | | for (MetaFileEntity mf : list) { |
| | | for (MetaEntity mf : list) { |
| | | if (mf.getName().toLowerCase().indexOf(".shp") > -1) { |
| | | fileName = mf.getPath(); |
| | | break; |