From ed8c7a5effd0d423ce1118b680ecdca6fe732609 Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期三, 02 七月 2025 16:43:13 +0800 Subject: [PATCH] Merge branch 'master' of http://192.168.11.205:9000/r/P2022036_Service --- src/main/java/com/lf/server/service/show/OneMapService.java | 37 +++++++++++++++++++++---------------- 1 files changed, 21 insertions(+), 16 deletions(-) diff --git a/src/main/java/com/lf/server/service/show/OneMapService.java b/src/main/java/com/lf/server/service/show/OneMapService.java index f1e7a6e..e086c0f 100644 --- a/src/main/java/com/lf/server/service/show/OneMapService.java +++ b/src/main/java/com/lf/server/service/show/OneMapService.java @@ -4,15 +4,15 @@ import com.lf.server.entity.ctrl.CountEntity; import com.lf.server.entity.show.OneMapEntity; import com.lf.server.helper.PathHelper; -import com.lf.server.helper.WebHelper; +import com.lf.server.helper.StringHelper; import com.lf.server.mapper.show.OneMapMapper; import com.lf.server.service.data.FmeService; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.stereotype.Service; +import org.springframework.util.StringUtils; import javax.annotation.Resource; -import javax.servlet.http.HttpServletRequest; import java.io.File; import java.util.ArrayList; import java.util.List; @@ -418,27 +418,32 @@ */ public String calcData() { Integer rows = selectLineBuffer(); - + List<String> ids = new ArrayList<>(); List<Map<String, Object>> list = selectMetaByType(); + if (null != list && list.size() > 0) { - HttpServletRequest req = WebHelper.getRequest(); - String rootPath = pathHelper.getUploadFullPath(); + String rootPath = pathHelper.getConfig().getUploadPath(); for (Map<String, Object> map : list) { - String sjfl = map.get("type").toString(); - String id = map.get("id").toString(); - String wjlj = rootPath + File.separator + map.get("path").toString(); + try { + String sjfl = map.get("type").toString(); + String id = map.get("id").toString(); + String wjlj = rootPath + File.separator + map.get("path").toString(); - File file = new File(wjlj); - if (!file.exists() || file.isDirectory()) { - continue; - } + File file = new File(wjlj); + if (!file.exists()) { + continue; + } - String str = fmeService.calcArea(sjfl, id, wjlj, req); - if (null != str) { - System.out.println(str); + String guid = fmeService.calcArea(sjfl, id, wjlj); + if (!StringUtils.isEmpty(guid)) { + ids.add(map.get("id").toString()); + rows++; + } + } catch (Exception ex) { + log.error(ex.getMessage(), ex); } - rows++; } + log.info(StringHelper.join(ids, ",")); } return String.format("鍏卞鐞嗕簡 %d 鏉¤褰�", rows); -- Gitblit v1.9.3