| | |
| | | import com.lf.server.entity.data.FmeLogEntity; |
| | | import com.lf.server.entity.data.MetaFileEntity; |
| | | import com.lf.server.entity.sys.UserEntity; |
| | | import com.lf.server.helper.ClassHelper; |
| | | import com.lf.server.helper.GdbHelper; |
| | | import com.lf.server.helper.ShpHelper; |
| | | import com.lf.server.helper.StringHelper; |
| | | import com.lf.server.helper.*; |
| | | import com.lf.server.mapper.all.BasicMapper; |
| | | import com.lf.server.mapper.data.UploadMapper; |
| | | import com.lf.server.service.all.BaseQueryService; |
| | |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.io.File; |
| | | import java.sql.Timestamp; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | |
| | | checkMetaFiles(ue, list); |
| | | dataLoader(list); |
| | | excelLoader(list, req); |
| | | } |
| | | |
| | | /** |
| | | * 检查元数据文件 |
| | | */ |
| | | private void checkMetaFiles(UserEntity ue, List<MetaFileEntity> list) { |
| | | Timestamp createTime = WebHelper.getCurrentTimestamp(); |
| | | String tempPath = pathHelper.getConfig().getTempPath(); |
| | | |
| | | for (MetaFileEntity mf : list) { |
| | | mf.setCreateUser(ue.getId()); |
| | | mf.setCreatetime(createTime); |
| | | mf.setDepid(ue.getDepid()); |
| | | mf.setPath(tempPath + File.separator + mf.getPath()); |
| | | |
| | | File f = new File(mf.getPath()); |
| | | if (!f.exists()) { |
| | | mf.setRows(-1); |
| | | mf.setMsg("文件不存在"); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | |
| | | BaseEntity be = (BaseEntity) t; |
| | | be.setEventid(StringHelper.getGuid()); |
| | | be.setParentid(mf.getEventid()); |
| | | be.setCreateuser(mf.getCreateUser()); |
| | | be.setCreatetime(mf.getCreatetime()); |
| | | be.setDirid(mf.getDirid()); |
| | | be.setDepid(mf.getDepid()); |
| | | be.setVerid(mf.getVerid()); |
| | | be.setCreateuser(mf.getCreateUser()); |
| | | be.setCreatetime(mf.getCreatetime()); |
| | | } |
| | | } catch (Exception ex) { |
| | | log.error(ex.getMessage(), ex); |
| | |
| | | */ |
| | | private void copyFiles(List<MetaFileEntity> list) { |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 检查元数据文件 |
| | | */ |
| | | private void checkMetaFiles(UserEntity ue, List<MetaFileEntity> list) { |
| | | String tempPath = pathHelper.getConfig().getTempPath(); |
| | | for (MetaFileEntity mf : list) { |
| | | mf.setCreateUser(ue.getId()); |
| | | mf.setDepid(ue.getDepid()); |
| | | mf.setPath(tempPath + File.separator + mf.getPath()); |
| | | |
| | | File f = new File(mf.getPath()); |
| | | if (!f.exists()) { |
| | | mf.setRows(-1); |
| | | mf.setMsg("文件不存在"); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |