浏览代码

修改处理流程先后顺序

DESKTOP-2K9OVK9\siwei 4 月之前
父节点
当前提交
17bf37b1c6

+ 4 - 4
onemap-modules/onemap-file/src/main/java/com/onemap/file/controller/SysFileController.java

@@ -230,20 +230,20 @@ public class SysFileController {
     @PostMapping("/upload/geom/v1")
     public RequestResult uploadGeomV1(MultipartFile file, Integer fromType, String geom, String fromRoute, String storeStats, Integer followup) {
         try {
-            String id = null;
+            String id;
             if (fromType == 1) {
                 id = spaceFileRecordService.uploadAddShpDrawV1(geom, fromRoute, fromType, storeStats);
             } else {
                 id = spaceFileRecordService.uploadAddShpFileV1(file, fromRoute, fromType, storeStats);
             }
             TUploadGeomDTO dto = spaceFileRecordService.selectTUploadGeomById(id, 0);
+            if (null != followup) {
+                spaceFileRecordService.handleUploadGeomFollowUp(id, followup);
+            }
             if (!"0".equals(storeStats)) {
                 dto.setId(null);
                 spaceFileRecordService.deleteTUploadGeomById(id);
             }
-            if (null != followup) {
-                spaceFileRecordService.handleUploadGeomFollowUp(id, followup);
-            }
             return RequestResult.success(dto);
         } catch (Exception e) {
             return RequestResult.error("上传失败!", null);