管道基础大数据平台系统开发-【后端】-Server
1
13693261870
2023-02-15 50fb24982f4da36d03dbb92db6f97248be9f831f
src/main/java/com/lf/server/service/show/MarkService.java
@@ -1,5 +1,6 @@
package com.lf.server.service.show;
import com.lf.server.entity.all.StaticData;
import com.lf.server.entity.ctrl.MarkJsonEntity;
import com.lf.server.entity.data.DownloadEntity;
import com.lf.server.entity.data.MetaEntity;
@@ -89,12 +90,10 @@
     *
     * @param ue   用户实体
     * @param list 标绘JSON实体类集合
     * @param req  请求
     * @param res  响应
     * @return GUID
     * @throws Exception 异常
     */
    public String downloadShp(UserEntity ue, List<MarkJsonEntity> list, HttpServletRequest req, HttpServletResponse res) throws Exception {
    public String downloadShp(UserEntity ue, List<MarkJsonEntity> list) throws Exception {
        String parent = pathHelper.getTempPath();
        String path = createShapeFiles(ue, list, parent);
@@ -145,7 +144,7 @@
     * 获取shp目录
     */
    private String getShpDir(UserEntity ue, String parent) {
        String path = parent + File.separator + WebHelper.getRandomInt(100000, 1000000);
        String path = parent + File.separator + StringHelper.YMDHMS2_FORMAT.format(new Date());
        File file = new File(path);
        if (!file.exists() && !file.isDirectory()) {
@@ -164,7 +163,7 @@
            if (StringHelper.isEmpty(mark.getWkt())) {
                continue;
            }
            if (mark.getWkt().indexOf(type) > -1) {
            if (mark.getWkt().contains(type)) {
                rs.add(mark);
            }
        }
@@ -219,7 +218,7 @@
    public List<MarkJsonEntity> readShpForMarks(List<MetaFileEntity> list) {
        String fileName = null;
        for (MetaFileEntity mf : list) {
            if (mf.getName().toLowerCase().contains(".shp")) {
            if (mf.getName().toLowerCase().contains(StaticData.SHP)) {
                fileName = mf.getPath();
                break;
            }