Bläddra i källkod

添加代理和缓存功能

DESKTOP-2K9OVK9\siwei 6 månader sedan
förälder
incheckning
1824467367
26 ändrade filer med 2877 tillägg och 0 borttagningar
  1. 10 0
      onemap-common/onemap-common-core/src/main/java/com/onemap/common/core/utils/DateUtils.java
  2. 71 0
      onemap-modules/onemap-apply/src/main/java/com/onemap/apply/controller/zymlapplication/MyApplicationController.java
  3. 77 0
      onemap-modules/onemap-apply/src/main/java/com/onemap/apply/controller/zymlapplication/MyExamineController.java
  4. 59 0
      onemap-modules/onemap-apply/src/main/java/com/onemap/apply/controller/zymlapplication/ShareResourcesController.java
  5. 105 0
      onemap-modules/onemap-apply/src/main/java/com/onemap/apply/controller/zymlapplication/TZymlApplicationRecordController.java
  6. 401 0
      onemap-modules/onemap-apply/src/main/java/com/onemap/apply/domain/zymlapplication/TZymlApplicationRecord.java
  7. 14 0
      onemap-modules/onemap-apply/src/main/java/com/onemap/apply/mapper/zymlapplication/TMyExamineMapper.java
  8. 63 0
      onemap-modules/onemap-apply/src/main/java/com/onemap/apply/mapper/zymlapplication/TZymlApplicationRecordMapper.java
  9. 69 0
      onemap-modules/onemap-apply/src/main/java/com/onemap/apply/service/impl/zymlapplication/MyExamineServiceImpl.java
  10. 96 0
      onemap-modules/onemap-apply/src/main/java/com/onemap/apply/service/impl/zymlapplication/TZymlApplicationRecordServiceImpl.java
  11. 7 0
      onemap-modules/onemap-apply/src/main/java/com/onemap/apply/service/zymlapplication/IMyExamineService.java
  12. 61 0
      onemap-modules/onemap-apply/src/main/java/com/onemap/apply/service/zymlapplication/ITZymlApplicationRecordService.java
  13. 9 0
      onemap-modules/onemap-apply/src/main/resources/mapper/postgresql/zymlapplication/TMyExamineMapper.xml
  14. 163 0
      onemap-modules/onemap-apply/src/main/resources/mapper/postgresql/zymlapplication/TZymlApplicationRecordMapper.xml
  15. 76 0
      onemap-modules/onemap-spatial/src/main/java/com/onemap/spatial/controller/ProxyHandleControllect.java
  16. 200 0
      onemap-modules/onemap-spatial/src/main/java/com/onemap/spatial/controller/ProxyHandleControllectBak.java
  17. 358 0
      onemap-modules/onemap-spatial/src/main/java/com/onemap/spatial/domain/TYztZyml.java
  18. 84 0
      onemap-modules/onemap-spatial/src/main/java/com/onemap/spatial/domain/TZymlApplicationRecordVo.java
  19. 4 0
      onemap-modules/onemap-spatial/src/main/java/com/onemap/spatial/mapper/ProxyHandleMapper.java
  20. 70 0
      onemap-modules/onemap-spatial/src/main/java/com/onemap/spatial/mapper/TYztZymlMapper.java
  21. 11 0
      onemap-modules/onemap-spatial/src/main/java/com/onemap/spatial/mapper/TZymlApplicationRecordMapper.java
  22. 19 0
      onemap-modules/onemap-spatial/src/main/java/com/onemap/spatial/service/IProxyHandleService.java
  23. 57 0
      onemap-modules/onemap-spatial/src/main/java/com/onemap/spatial/service/cache/CacheEntity.java
  24. 237 0
      onemap-modules/onemap-spatial/src/main/java/com/onemap/spatial/service/cache/LocalCache.java
  25. 367 0
      onemap-modules/onemap-spatial/src/main/java/com/onemap/spatial/service/impl/ProxyHandleServiceImpl.java
  26. 189 0
      onemap-modules/onemap-spatial/src/main/resources/mapper/postgresql/TYztZymlMapper.xml

+ 10 - 0
onemap-common/onemap-common-core/src/main/java/com/onemap/common/core/utils/DateUtils.java

@@ -158,6 +158,16 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils
         return day + "天" + hour + "小时" + min + "分钟";
     }
 
+    public static long getDateDiff(Date endDate, Date nowDate)
+    {
+        long nd = 1000 * 24 * 60 * 60;
+        long nh = 1000 * 60 * 60;
+        long nm = 1000 * 60;
+        // long ns = 1000;
+        // 获得两个时间的毫秒时间差异
+        return endDate.getTime() - nowDate.getTime();
+    }
+
     /**
      * 增加 LocalDateTime ==> Date
      */

+ 71 - 0
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/controller/zymlapplication/MyApplicationController.java

@@ -0,0 +1,71 @@
+package com.onemap.apply.controller.zymlapplication;
+
+import com.onemap.apply.domain.zymlapplication.TZymlApplicationRecord;
+import com.onemap.apply.service.zymlapplication.ITZymlApplicationRecordService;
+import com.onemap.common.core.utils.StringUtils;
+import com.onemap.common.core.web.controller.BaseController;
+import com.onemap.common.core.web.domain.AjaxResult;
+import com.onemap.common.core.web.page.TableDataInfo;
+import com.onemap.common.log.annotation.Log;
+import com.onemap.common.log.enums.BusinessType;
+import com.onemap.common.security.utils.SecurityUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 我的申请页面需要接口
+ */
+@RestController
+@RequestMapping("/my/application")
+public class MyApplicationController extends BaseController {
+
+    @Autowired
+    private ITZymlApplicationRecordService tZymlApplicationRecordService;
+
+    /**
+     * 查询我的申请列表
+     */
+//    @RequiresPermissions("@ss.hasPermi('my:application:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(TZymlApplicationRecord tZymlApplicationRecord) {
+        startPage();
+        tZymlApplicationRecord.setSqUserId(SecurityUtils.getUserId());
+        List<TZymlApplicationRecord> list = tZymlApplicationRecordService.selectTZymlApplicationRecordList(tZymlApplicationRecord);
+        return getDataTable(list);
+    }
+
+    //TODO 权限未开
+    @Log(title = "我的申请状态修改", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult revoke(@RequestBody TZymlApplicationRecord tZymlApplicationRecord) {
+        if (StringUtils.isNull(tZymlApplicationRecord)) {
+            return AjaxResult.error("参数缺失");
+        }
+        if (StringUtils.isEmpty(tZymlApplicationRecord.getId())) {
+            return AjaxResult.error("参数缺失");
+        }
+        TZymlApplicationRecord record = tZymlApplicationRecordService.selectTZymlApplicationRecordById(tZymlApplicationRecord.getId());
+        if (record == null) {
+            return AjaxResult.error("查无此记录");
+        }
+        if (record.getSqUserId() != SecurityUtils.getUserId()) {
+            return AjaxResult.error("查无此记录");
+        }
+        if (record.getState() != 0 && record.getState() != 1) {
+            return AjaxResult.error("无法撤销");
+        }
+        TZymlApplicationRecord newRecord = new TZymlApplicationRecord();
+        newRecord.setId(tZymlApplicationRecord.getId());
+        newRecord.setSqUserBy(SecurityUtils.getUsername());
+        newRecord.setSqUserId(SecurityUtils.getUserId());
+        newRecord.setState(2);
+        newRecord.setSqRevokeTime(new Date());
+        newRecord.setSqRevokeReason(tZymlApplicationRecord.getSqRevokeReason());
+        return toAjax(tZymlApplicationRecordService.updateTZymlApplicationRecord(newRecord));
+    }
+
+
+}

+ 77 - 0
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/controller/zymlapplication/MyExamineController.java

@@ -0,0 +1,77 @@
+package com.onemap.apply.controller.zymlapplication;
+
+import com.onemap.apply.domain.zymlapplication.TZymlApplicationRecord;
+import com.onemap.apply.service.zymlapplication.IMyExamineService;
+import com.onemap.apply.service.zymlapplication.ITZymlApplicationRecordService;
+import com.onemap.common.core.utils.StringUtils;
+import com.onemap.common.core.web.controller.BaseController;
+import com.onemap.common.core.web.domain.AjaxResult;
+import com.onemap.common.core.web.page.TableDataInfo;
+import com.onemap.common.log.annotation.Log;
+import com.onemap.common.log.enums.BusinessType;
+import com.onemap.common.security.utils.SecurityUtils;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 我的审核页面需要接口
+ */
+@RestController
+@RequestMapping("/my/examine")
+public class MyExamineController extends BaseController {
+
+    @Resource
+    private ITZymlApplicationRecordService zymlApplicationRecordService;
+    @Resource
+    private IMyExamineService myExamineService;
+
+    /**
+     * 查询我的审核列表
+     */
+    @GetMapping("/list")
+    public TableDataInfo list(TZymlApplicationRecord tZymlApplicationRecord) {
+        startPage();
+        List<TZymlApplicationRecord> list = zymlApplicationRecordService.selectTZymlApplicationRecordList(tZymlApplicationRecord);
+        return getDataTable(list);
+    }
+
+    @Log(title = "审批记录", businessType = BusinessType.INSERT)
+    @PutMapping
+    public AjaxResult edit(@RequestBody TZymlApplicationRecord tZymlApplicationRecord) {
+        if (StringUtils.isNull(tZymlApplicationRecord)) {
+            return AjaxResult.error("参数缺失");
+        }
+        if (StringUtils.isEmpty(tZymlApplicationRecord.getId())) {
+            return AjaxResult.error("参数缺失");
+        }
+        if (tZymlApplicationRecord.getState() == null) {
+            return AjaxResult.error("参数缺失");
+        }
+        if (tZymlApplicationRecord.getState() != 3 && tZymlApplicationRecord.getState() != 4) {
+            return AjaxResult.error("参数缺失");
+        }
+        TZymlApplicationRecord record = zymlApplicationRecordService.selectTZymlApplicationRecordById(tZymlApplicationRecord.getId());
+        if (record == null) {
+            return AjaxResult.error("查无此记录");
+        }
+
+        if (record.getState() == 3 || record.getState() == 4 || record.getState() == 2) {
+            return AjaxResult.error("无法审核");
+        }
+        String fwKey = StringUtils.getUUID();
+        TZymlApplicationRecord newRecord = new TZymlApplicationRecord();
+        newRecord.setId(tZymlApplicationRecord.getId());
+        newRecord.setSpUserBy(SecurityUtils.getUsername());
+        newRecord.setSpUserId(SecurityUtils.getUserId());
+        newRecord.setState(tZymlApplicationRecord.getState());
+        newRecord.setSpTime(new Date());
+        newRecord.setDeadline(tZymlApplicationRecord.getDeadline());
+        newRecord.setSpReason(tZymlApplicationRecord.getSpReason());
+        newRecord.setZymlUrl(myExamineService.getProxyServerUrl(fwKey, record.getSqFw()));
+        return toAjax(zymlApplicationRecordService.updateTZymlApplicationRecord(newRecord));
+    }
+
+}

+ 59 - 0
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/controller/zymlapplication/ShareResourcesController.java

@@ -0,0 +1,59 @@
+package com.onemap.apply.controller.zymlapplication;
+
+import com.onemap.apply.domain.zymlapplication.TZymlApplicationRecord;
+import com.onemap.apply.service.zymlapplication.ITZymlApplicationRecordService;
+import com.onemap.common.core.web.controller.BaseController;
+import com.onemap.common.core.web.domain.AjaxResult;
+import com.onemap.common.core.web.page.TableDataInfo;
+import com.onemap.common.log.annotation.Log;
+import com.onemap.common.log.enums.BusinessType;
+import com.onemap.common.security.annotation.RequiresPermissions;
+import com.onemap.common.security.utils.SecurityUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 资源共享页面需要接口
+ */
+@RestController
+@RequestMapping("/share/resources")
+public class ShareResourcesController extends BaseController {
+
+    @Autowired
+    private ITZymlApplicationRecordService tZymlApplicationRecordService;
+
+    /**
+     * 新增我的申请
+     */
+//TODO 权限未开
+//    @RequiresPermissions("@ss.hasPermi('share:resources:application:add')")
+    @Log(title = "共享资源申请", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody TZymlApplicationRecord tZymlApplicationRecord) {
+        tZymlApplicationRecord.setSpReason(null);
+        tZymlApplicationRecord.setSpTime(null);
+        tZymlApplicationRecord.setSpUserBy(null);
+        tZymlApplicationRecord.setSpUserId(null);
+        tZymlApplicationRecord.setSqUserBy(SecurityUtils.getUsername());
+        tZymlApplicationRecord.setSqUserId(SecurityUtils.getUserId());
+        tZymlApplicationRecord.setSqTime(new Date());
+        tZymlApplicationRecord.setState(1);
+        return toAjax(tZymlApplicationRecordService.insertTZymlApplicationRecord(tZymlApplicationRecord));
+    }
+
+    /**
+     * 查询我的申请列表
+     */
+//    @RequiresPermissions("@ss.hasPermi('share:resources:application:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(TZymlApplicationRecord tZymlApplicationRecord) {
+        startPage();
+        tZymlApplicationRecord.setSqUserId(SecurityUtils.getUserId());
+        List<TZymlApplicationRecord> list = tZymlApplicationRecordService.selectTZymlApplicationRecordList(tZymlApplicationRecord);
+        return getDataTable(list);
+    }
+
+}

+ 105 - 0
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/controller/zymlapplication/TZymlApplicationRecordController.java

@@ -0,0 +1,105 @@
+package com.onemap.apply.controller.zymlapplication;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+
+import com.onemap.common.core.utils.poi.ExcelUtil;
+import com.onemap.common.core.web.controller.BaseController;
+import com.onemap.common.core.web.domain.AjaxResult;
+import com.onemap.common.core.web.page.TableDataInfo;
+import com.onemap.common.log.annotation.Log;
+import com.onemap.common.log.enums.BusinessType;
+import com.onemap.common.security.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.onemap.apply.domain.zymlapplication.TZymlApplicationRecord;
+import com.onemap.apply.service.zymlapplication.ITZymlApplicationRecordService;
+
+/**
+ * 资源申请Controller
+ * 
+ * @author ruoyi
+ * @date 2024-09-20
+ */
+@RestController
+@RequestMapping("/zyml/application")
+public class TZymlApplicationRecordController extends BaseController
+{
+    @Autowired
+    private ITZymlApplicationRecordService tZymlApplicationRecordService;
+
+    /**
+     * 查询我的申请列表
+     */
+    @RequiresPermissions("@ss.hasPermi('zyml:application:add')")
+    @GetMapping("/list")
+    public TableDataInfo list(TZymlApplicationRecord tZymlApplicationRecord)
+    {
+        startPage();
+        List<TZymlApplicationRecord> list = tZymlApplicationRecordService.selectTZymlApplicationRecordList(tZymlApplicationRecord);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出我的申请列表
+     */
+    @RequiresPermissions("@ss.hasPermi('system:record:export')")
+    @Log(title = "我的申请", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, TZymlApplicationRecord tZymlApplicationRecord)
+    {
+        List<TZymlApplicationRecord> list = tZymlApplicationRecordService.selectTZymlApplicationRecordList(tZymlApplicationRecord);
+        ExcelUtil<TZymlApplicationRecord> util = new ExcelUtil<TZymlApplicationRecord>(TZymlApplicationRecord.class);
+        util.exportExcel(response, list, "我的申请数据");
+    }
+
+    /**
+     * 获取我的申请详细信息
+     */
+    @RequiresPermissions("@ss.hasPermi('system:record:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") String id)
+    {
+        return success(tZymlApplicationRecordService.selectTZymlApplicationRecordById(id));
+    }
+
+    /**
+     * 新增我的申请
+     */
+    @RequiresPermissions("@ss.hasPermi('zyml:application:add')")
+    @Log(title = "我的申请", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody TZymlApplicationRecord tZymlApplicationRecord)
+    {
+        return toAjax(tZymlApplicationRecordService.insertTZymlApplicationRecord(tZymlApplicationRecord));
+    }
+
+    /**
+     * 修改我的申请
+     */
+    @RequiresPermissions("@ss.hasPermi('system:record:edit')")
+    @Log(title = "我的申请", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody TZymlApplicationRecord tZymlApplicationRecord)
+    {
+        return toAjax(tZymlApplicationRecordService.updateTZymlApplicationRecord(tZymlApplicationRecord));
+    }
+
+    /**
+     * 删除我的申请
+     */
+    @RequiresPermissions("@ss.hasPermi('system:record:remove')")
+    @Log(title = "我的申请", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable String[] ids)
+    {
+        return toAjax(tZymlApplicationRecordService.deleteTZymlApplicationRecordByIds(ids));
+    }
+}

+ 401 - 0
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/domain/zymlapplication/TZymlApplicationRecord.java

@@ -0,0 +1,401 @@
+package com.onemap.apply.domain.zymlapplication;
+
+import java.util.Date;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.onemap.common.core.annotation.Excel;
+import com.onemap.common.core.web.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import org.springframework.format.annotation.DateTimeFormat;
+
+/**
+ * 我的申请对象 t_zyml_application_record
+ *
+ * @author ruoyi
+ * @date 2024-09-20
+ */
+public class TZymlApplicationRecord extends BaseEntity {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * $column.columnComment
+     */
+    private String id;
+
+    /**
+     * $column.columnComment
+     */
+//    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private Long sqUserId;
+
+    /**
+     * $column.columnComment
+     */
+    @Excel(name = "申请人")
+    private String sqUserBy;
+
+    /**
+     * $column.columnComment
+     */
+    @Excel(name = "申请时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date sqTime;
+
+    /**
+     * $column.columnComment
+     */
+    private Long sqDepartmentId;
+
+    /**
+     * $column.columnComment
+     */
+    @Excel(name = "申请部门")
+    private String sqDepartmentBy;
+
+    /**
+     * $column.columnComment
+     */
+    private String zymlId;
+
+    /**
+     * $column.columnComment
+     */
+    @Excel(name = "申请资源服务名称")
+    private String zymlBy;
+
+    /**
+     * $column.columnComment
+     */
+    private String zymlTypeCode;
+
+    /**
+     * $column.columnComment
+     */
+    @Excel(name = "资源服务类型名称")
+    private String zymlTypeName;
+
+    /**
+     * $column.columnComment
+     */
+    @Excel(name = "申请范围")
+    private String sqFw;
+
+    /**
+     * $column.columnComment
+     */
+    @Excel(name = "申请原因")
+    private String sqReason;
+
+    /**
+     * $column.columnComment
+     */
+    @Excel(name = "申请撤回时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date sqRevokeTime;
+
+    /**
+     * $column.columnComment
+     */
+    @Excel(name = "申请撤回原因")
+    private String sqRevokeReason;
+
+
+    /**
+     * $column.columnComment
+     */
+    @Excel(name = "系统名称")
+    private String systemName;
+
+    /**
+     * $column.columnComment
+     */
+    @Excel(name = "调用IP")
+    private String callIp;
+
+    /**
+     * $column.columnComment
+     */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    private Date deadline;
+
+    /**
+     * 附件
+     */
+//    @Excel(name = "附件")
+    private String attachment;
+
+    /**
+     * $column.columnComment
+     */
+    @Excel(name = "预计使用截至时间")
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    private Date sqDeadline;
+
+    /**
+     * $column.columnComment
+     */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private Long spUserId;
+
+    /**
+     * $column.columnComment
+     */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private String spUserBy;
+
+    /**
+     * $column.columnComment
+     */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private Date spTime;
+
+    /**
+     * $column.columnComment
+     */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private String spReason;
+
+    @Excel(name = "服务地址")
+    private String zymlUrl;
+
+    /**
+     * $column.columnComment
+     */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private Integer state;
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getId() {
+        return id;
+    }
+
+    public void setSqUserId(Long sqUserId) {
+        this.sqUserId = sqUserId;
+    }
+
+    public Long getSqUserId() {
+        return sqUserId;
+    }
+
+    public void setSqUserBy(String sqUserBy) {
+        this.sqUserBy = sqUserBy;
+    }
+
+    public String getSqUserBy() {
+        return sqUserBy;
+    }
+
+    public void setSqTime(Date sqTime) {
+        this.sqTime = sqTime;
+    }
+
+    public Date getSqTime() {
+        return sqTime;
+    }
+
+    public void setSqDepartmentId(Long sqDepartmentId) {
+        this.sqDepartmentId = sqDepartmentId;
+    }
+
+    public Long getSqDepartmentId() {
+        return sqDepartmentId;
+    }
+
+    public void setSqDepartmentBy(String sqDepartmentBy) {
+        this.sqDepartmentBy = sqDepartmentBy;
+    }
+
+    public String getSqDepartmentBy() {
+        return sqDepartmentBy;
+    }
+
+    public void setZymlId(String zymlId) {
+        this.zymlId = zymlId;
+    }
+
+    public String getZymlId() {
+        return zymlId;
+    }
+
+    public void setZymlBy(String zymlBy) {
+        this.zymlBy = zymlBy;
+    }
+
+    public String getZymlBy() {
+        return zymlBy;
+    }
+
+    public void setZymlTypeCode(String zymlTypeCode) {
+        this.zymlTypeCode = zymlTypeCode;
+    }
+
+    public String getZymlTypeCode() {
+        return zymlTypeCode;
+    }
+
+    public void setZymlTypeName(String zymlTypeName) {
+        this.zymlTypeName = zymlTypeName;
+    }
+
+    public String getZymlTypeName() {
+        return zymlTypeName;
+    }
+
+    public void setSqFw(String sqFw) {
+        this.sqFw = sqFw;
+    }
+
+    public String getSqFw() {
+        return sqFw;
+    }
+
+    public void setSqReason(String sqReason) {
+        this.sqReason = sqReason;
+    }
+
+    public String getSqReason() {
+        return sqReason;
+    }
+
+    public void setSystemName(String systemName) {
+        this.systemName = systemName;
+    }
+
+    public String getSystemName() {
+        return systemName;
+    }
+
+    public void setCallIp(String callIp) {
+        this.callIp = callIp;
+    }
+
+    public String getCallIp() {
+        return callIp;
+    }
+
+    public void setDeadline(Date deadline) {
+        this.deadline = deadline;
+    }
+
+    public Date getDeadline() {
+        return deadline;
+    }
+
+    public void setAttachment(String attachment) {
+        this.attachment = attachment;
+    }
+
+    public String getAttachment() {
+        return attachment;
+    }
+
+    public void setSqDeadline(Date sqDeadline) {
+        this.sqDeadline = sqDeadline;
+    }
+
+    public Date getSqDeadline() {
+        return sqDeadline;
+    }
+
+    public void setSpUserId(Long spUserId) {
+        this.spUserId = spUserId;
+    }
+
+    public Long getSpUserId() {
+        return spUserId;
+    }
+
+    public void setSpUserBy(String spUserBy) {
+        this.spUserBy = spUserBy;
+    }
+
+    public String getSpUserBy() {
+        return spUserBy;
+    }
+
+    public void setSpTime(Date spTime) {
+        this.spTime = spTime;
+    }
+
+    public Date getSpTime() {
+        return spTime;
+    }
+
+    public void setSpReason(String spReason) {
+        this.spReason = spReason;
+    }
+
+    public String getSpReason() {
+        return spReason;
+    }
+
+    public void setState(Integer state) {
+        this.state = state;
+    }
+
+    public Integer getState() {
+        return state;
+    }
+
+    public String getZymlUrl() {
+        return zymlUrl;
+    }
+
+    public void setZymlUrl(String zymlUrl) {
+        this.zymlUrl = zymlUrl;
+    }
+
+    public Date getSqRevokeTime() {
+        return sqRevokeTime;
+    }
+
+    public void setSqRevokeTime(Date sqRevokeTime) {
+        this.sqRevokeTime = sqRevokeTime;
+    }
+
+    public String getSqRevokeReason() {
+        return sqRevokeReason;
+    }
+
+    public void setSqRevokeReason(String sqRevokeReason) {
+        this.sqRevokeReason = sqRevokeReason;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
+                .append("id", getId())
+                .append("sqUserId", getSqUserId())
+                .append("sqUserBy", getSqUserBy())
+                .append("sqTime", getSqTime())
+                .append("sqDepartmentId", getSqDepartmentId())
+                .append("sqDepartmentBy", getSqDepartmentBy())
+                .append("zymlId", getZymlId())
+                .append("zymlBy", getZymlBy())
+                .append("zymlTypeCode", getZymlTypeCode())
+                .append("zymlTypeName", getZymlTypeName())
+                .append("sqFw", getSqFw())
+                .append("sqReason", getSqReason())
+                .append("systemName", getSystemName())
+                .append("callIp", getCallIp())
+                .append("deadline", getDeadline())
+                .append("attachment", getAttachment())
+                .append("sqDeadline", getSqDeadline())
+                .append("spUserId", getSpUserId())
+                .append("spUserBy", getSpUserBy())
+                .append("spTime", getSpTime())
+                .append("spReason", getSpReason())
+                .append("state", getState())
+                .append("zymlUrl", getZymlUrl())
+                .toString();
+    }
+}

+ 14 - 0
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/mapper/zymlapplication/TMyExamineMapper.java

@@ -0,0 +1,14 @@
+package com.onemap.apply.mapper.zymlapplication;
+
+import org.apache.ibatis.annotations.MapKey;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.Map;
+
+@Mapper
+public interface TMyExamineMapper {
+
+    @MapKey("bsm")
+    Map<String, Object> queryFwInfoByBsm(String bsm);
+
+}

+ 63 - 0
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/mapper/zymlapplication/TZymlApplicationRecordMapper.java

@@ -0,0 +1,63 @@
+package com.onemap.apply.mapper.zymlapplication;
+
+import java.util.List;
+
+import com.onemap.apply.domain.zymlapplication.TZymlApplicationRecord;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 我的申请Mapper接口
+ *
+ * @author ruoyi
+ * @date 2024-09-20
+ */
+@Mapper
+public interface TZymlApplicationRecordMapper {
+    /**
+     * 查询我的申请
+     *
+     * @param id 我的申请主键
+     * @return 我的申请
+     */
+    public TZymlApplicationRecord selectTZymlApplicationRecordById(String id);
+
+    /**
+     * 查询我的申请列表
+     *
+     * @param tZymlApplicationRecord 我的申请
+     * @return 我的申请集合
+     */
+    public List<TZymlApplicationRecord> selectTZymlApplicationRecordList(TZymlApplicationRecord tZymlApplicationRecord);
+
+    /**
+     * 新增我的申请
+     *
+     * @param tZymlApplicationRecord 我的申请
+     * @return 结果
+     */
+    public int insertTZymlApplicationRecord(TZymlApplicationRecord tZymlApplicationRecord);
+
+    /**
+     * 修改我的申请
+     *
+     * @param tZymlApplicationRecord 我的申请
+     * @return 结果
+     */
+    public int updateTZymlApplicationRecord(TZymlApplicationRecord tZymlApplicationRecord);
+
+    /**
+     * 删除我的申请
+     *
+     * @param id 我的申请主键
+     * @return 结果
+     */
+    public int deleteTZymlApplicationRecordById(String id);
+
+    /**
+     * 批量删除我的申请
+     *
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteTZymlApplicationRecordByIds(String[] ids);
+}

+ 69 - 0
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/service/impl/zymlapplication/MyExamineServiceImpl.java

@@ -0,0 +1,69 @@
+package com.onemap.apply.service.impl.zymlapplication;
+
+import com.onemap.apply.mapper.zymlapplication.TMyExamineMapper;
+import com.onemap.apply.service.zymlapplication.IMyExamineService;
+import com.onemap.common.core.utils.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.Map;
+
+@Service
+public class MyExamineServiceImpl implements IMyExamineService {
+
+    @Autowired
+    private TMyExamineMapper myExamineMapper;
+    private String paroxy_url = "http://192.168.60.2:8080/proxy/handle/{token}/";
+
+    @Override
+    public String getProxyServerUrl(String fwKey, String fwid) {
+        Map<String, Object> mapfwData = myExamineMapper.queryFwInfoByBsm(fwid);
+        if (mapfwData == null) {
+            return null;
+        }
+        String server_type = (String) mapfwData.get("server_type");
+        String type = (String) mapfwData.get("type");
+//        String url = (String) mapfwData.get("url");
+        //判断geoserver
+        if (StringUtils.isNotEmpty(server_type) && "geoserver".equals(server_type.toLowerCase())) {
+            String fwmc = (String) mapfwData.get("fwmc");
+            String fwgzkj = (String) mapfwData.get("fwgzkj");
+            String qpfa = (String) mapfwData.get("qpfa");
+            String layergroup = (String) mapfwData.get("layergroup");
+            String format = (String) mapfwData.get("format");
+            String maximumlevel = (String) mapfwData.get("maximumlevel");
+            String minimumlevel = (String) mapfwData.get("minimumlevel");
+            String params = "";
+            params = params + paroxy_url.replace("{token}", fwKey) + "siweigeoserver" + "?";
+            params = params + paramsTogether("server_type", type, true);
+            params = params + paramsTogether("fwmc", fwmc, true);
+            params = params + paramsTogether("fwgzkj", fwgzkj, true);
+            params = params + paramsTogether("qpfa", qpfa, true);
+            params = params + paramsTogether("layergroup", layergroup, true);
+            params = params + paramsTogether("format", format, true);
+            params = params + paramsTogether("maximumlevel", maximumlevel, true);
+            params = params + paramsTogether("minimumlevel", minimumlevel, false);
+            return params;
+        } else {
+            //判断3DTiles
+            if (StringUtils.isNotEmpty(type) && "3DTiles".toLowerCase().equals(type.toLowerCase())) {
+                String params = "";
+                params = params + paroxy_url.replace("{token}", fwKey) + "siwei3dtiles";
+                return params;
+            } else {
+                //超图的
+                String sde = (String) mapfwData.get("sde");
+                String params = "";
+                params = params + paroxy_url.replace("{token}", fwKey) + "siweisupermap" + "?";
+                params = params + paramsTogether("server_type", type, true);
+                params = params + paramsTogether("sde", sde, false);
+                return params;
+            }
+        }
+    }
+
+    private String paramsTogether(String key, String value, boolean isSign) {
+        return key + "=" + value + (isSign ? "&" : "");
+    }
+
+}

+ 96 - 0
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/service/impl/zymlapplication/TZymlApplicationRecordServiceImpl.java

@@ -0,0 +1,96 @@
+package com.onemap.apply.service.impl.zymlapplication;
+
+import java.util.List;
+
+import com.onemap.common.core.utils.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.onemap.apply.mapper.zymlapplication.TZymlApplicationRecordMapper;
+import com.onemap.apply.domain.zymlapplication.TZymlApplicationRecord;
+import com.onemap.apply.service.zymlapplication.ITZymlApplicationRecordService;
+
+/**
+ * 我的申请Service业务层处理
+ * 
+ * @author ruoyi
+ * @date 2024-09-20
+ */
+@Service
+public class TZymlApplicationRecordServiceImpl implements ITZymlApplicationRecordService 
+{
+    @Autowired
+    private TZymlApplicationRecordMapper tZymlApplicationRecordMapper;
+
+    /**
+     * 查询我的申请
+     * 
+     * @param id 我的申请主键
+     * @return 我的申请
+     */
+    @Override
+    public TZymlApplicationRecord selectTZymlApplicationRecordById(String id)
+    {
+        return tZymlApplicationRecordMapper.selectTZymlApplicationRecordById(id);
+    }
+
+    /**
+     * 查询我的申请列表
+     * 
+     * @param tZymlApplicationRecord 我的申请
+     * @return 我的申请
+     */
+    @Override
+    public List<TZymlApplicationRecord> selectTZymlApplicationRecordList(TZymlApplicationRecord tZymlApplicationRecord)
+    {
+        return tZymlApplicationRecordMapper.selectTZymlApplicationRecordList(tZymlApplicationRecord);
+    }
+
+    /**
+     * 新增我的申请
+     * 
+     * @param tZymlApplicationRecord 我的申请
+     * @return 结果
+     */
+    @Override
+    public int insertTZymlApplicationRecord(TZymlApplicationRecord tZymlApplicationRecord)
+    {
+        tZymlApplicationRecord.setId(StringUtils.getUUID());
+        return tZymlApplicationRecordMapper.insertTZymlApplicationRecord(tZymlApplicationRecord);
+    }
+
+    /**
+     * 修改我的申请
+     * 
+     * @param tZymlApplicationRecord 我的申请
+     * @return 结果
+     */
+    @Override
+    public int updateTZymlApplicationRecord(TZymlApplicationRecord tZymlApplicationRecord)
+    {
+        return tZymlApplicationRecordMapper.updateTZymlApplicationRecord(tZymlApplicationRecord);
+    }
+
+    /**
+     * 批量删除我的申请
+     * 
+     * @param ids 需要删除的我的申请主键
+     * @return 结果
+     */
+    @Override
+    public int deleteTZymlApplicationRecordByIds(String[] ids)
+    {
+        return tZymlApplicationRecordMapper.deleteTZymlApplicationRecordByIds(ids);
+    }
+
+    /**
+     * 删除我的申请信息
+     * 
+     * @param id 我的申请主键
+     * @return 结果
+     */
+    @Override
+    public int deleteTZymlApplicationRecordById(String id)
+    {
+        return tZymlApplicationRecordMapper.deleteTZymlApplicationRecordById(id);
+    }
+}

+ 7 - 0
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/service/zymlapplication/IMyExamineService.java

@@ -0,0 +1,7 @@
+package com.onemap.apply.service.zymlapplication;
+
+public interface IMyExamineService {
+
+    String getProxyServerUrl(String fwKey, String fwid);
+
+}

+ 61 - 0
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/service/zymlapplication/ITZymlApplicationRecordService.java

@@ -0,0 +1,61 @@
+package com.onemap.apply.service.zymlapplication;
+
+import java.util.List;
+import com.onemap.apply.domain.zymlapplication.TZymlApplicationRecord;
+
+/**
+ * 我的申请Service接口
+ * 
+ * @author ruoyi
+ * @date 2024-09-20
+ */
+public interface ITZymlApplicationRecordService 
+{
+    /**
+     * 查询我的申请
+     * 
+     * @param id 我的申请主键
+     * @return 我的申请
+     */
+    public TZymlApplicationRecord selectTZymlApplicationRecordById(String id);
+
+    /**
+     * 查询我的申请列表
+     * 
+     * @param tZymlApplicationRecord 我的申请
+     * @return 我的申请集合
+     */
+    public List<TZymlApplicationRecord> selectTZymlApplicationRecordList(TZymlApplicationRecord tZymlApplicationRecord);
+
+    /**
+     * 新增我的申请
+     * 
+     * @param tZymlApplicationRecord 我的申请
+     * @return 结果
+     */
+    public int insertTZymlApplicationRecord(TZymlApplicationRecord tZymlApplicationRecord);
+
+    /**
+     * 修改我的申请
+     * 
+     * @param tZymlApplicationRecord 我的申请
+     * @return 结果
+     */
+    public int updateTZymlApplicationRecord(TZymlApplicationRecord tZymlApplicationRecord);
+
+    /**
+     * 批量删除我的申请
+     * 
+     * @param ids 需要删除的我的申请主键集合
+     * @return 结果
+     */
+    public int deleteTZymlApplicationRecordByIds(String[] ids);
+
+    /**
+     * 删除我的申请信息
+     * 
+     * @param id 我的申请主键
+     * @return 结果
+     */
+    public int deleteTZymlApplicationRecordById(String id);
+}

+ 9 - 0
onemap-modules/onemap-apply/src/main/resources/mapper/postgresql/zymlapplication/TMyExamineMapper.xml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.onemap.apply.mapper.zymlapplication.TMyExamineMapper">
+    <select id="queryFwInfoByBsm" parameterType="String" resultType="java.util.Map">
+        select * from t_yzt_zyml where bsm = #{basm}
+    </select>
+</mapper>

+ 163 - 0
onemap-modules/onemap-apply/src/main/resources/mapper/postgresql/zymlapplication/TZymlApplicationRecordMapper.xml

@@ -0,0 +1,163 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.onemap.apply.mapper.zymlapplication.TZymlApplicationRecordMapper">
+
+    <resultMap type="TZymlApplicationRecord" id="TZymlApplicationRecordResult">
+        <result property="id"    column="id"    />
+        <result property="sqUserId"    column="sq_user_id"    />
+        <result property="sqUserBy"    column="sq_user_by"    />
+        <result property="sqTime"    column="sq_time"    />
+        <result property="sqDepartmentId"    column="sq_department_id"    />
+        <result property="sqDepartmentBy"    column="sq_department_by"    />
+        <result property="zymlId"    column="zyml_id"    />
+        <result property="zymlBy"    column="zyml_by"    />
+        <result property="zymlTypeCode"    column="zyml_type_code"    />
+        <result property="zymlTypeName"    column="zyml_type_name"    />
+        <result property="sqFw"    column="sq_fw"    />
+        <result property="sqReason"    column="sq_reason"    />
+        <result property="systemName"    column="system_name"    />
+        <result property="callIp"    column="call_ip"    />
+        <result property="deadline"    column="deadline"    />
+        <result property="attachment"    column="attachment"    />
+        <result property="sqDeadline"    column="sq_deadline"    />
+        <result property="spUserId"    column="sp_user_id"    />
+        <result property="spUserBy"    column="sp_user_by"    />
+        <result property="spTime"    column="sp_time"    />
+        <result property="zymlUrl"    column="zyml_url"    />
+        <result property="spReason"    column="sp_reason"    />
+        <result property="state"    column="state"    />
+        <result property="sqRevokeTime"    column="sq_revoke_time"    />
+        <result property="sqRevokeReason"    column="sq_revoke_reason"    />
+    </resultMap>
+
+    <sql id="selectTZymlApplicationRecordVo">
+        select id, sq_user_id, sq_user_by, sq_time, sq_department_id, sq_department_by, zyml_id, zyml_by, zyml_type_code, zyml_type_name, sq_fw, sq_reason, system_name, call_ip, deadline, attachment, sq_deadline, sp_user_id, sp_user_by, sp_time, sp_reason,zyml_url,  state from t_zyml_application_record
+    </sql>
+
+    <select id="selectTZymlApplicationRecordList" parameterType="TZymlApplicationRecord" resultMap="TZymlApplicationRecordResult">
+        <include refid="selectTZymlApplicationRecordVo"/>
+        <where>
+            <if test="sqUserId != null  and sqUserId != ''"> and sq_user_id = #{sqUserId}</if>
+            <if test="sqUserBy != null  and sqUserBy != ''"> and sq_user_by = #{sqUserBy}</if>
+            <if test="sqTime != null "> and sq_time = #{sqTime}</if>
+            <if test="sqDepartmentId != null  and sqDepartmentId != ''"> and sq_department_id = #{sqDepartmentId}</if>
+            <if test="sqDepartmentBy != null  and sqDepartmentBy != ''"> and sq_department_by = #{sqDepartmentBy}</if>
+            <if test="zymlId != null  and zymlId != ''"> and zyml_id = #{zymlId}</if>
+            <if test="zymlBy != null  and zymlBy != ''"> and zyml_by = #{zymlBy}</if>
+            <if test="zymlTypeCode != null  and zymlTypeCode != ''"> and zyml_type_code = #{zymlTypeCode}</if>
+            <if test="zymlTypeName != null  and zymlTypeName != ''"> and zyml_type_name like concat('%', #{zymlTypeName}, '%')</if>
+            <if test="sqFw != null  and sqFw != ''"> and sq_fw = #{sqFw}</if>
+            <if test="sqReason != null  and sqReason != ''"> and sq_reason = #{sqReason}</if>
+            <if test="systemName != null  and systemName != ''"> and system_name like concat('%', #{systemName}, '%')</if>
+            <if test="callIp != null  and callIp != ''"> and call_ip = #{callIp}</if>
+            <if test="deadline != null "> and deadline = #{deadline}</if>
+            <if test="attachment != null  and attachment != ''"> and attachment = #{attachment}</if>
+            <if test="sqDeadline != null "> and sq_deadline = #{sqDeadline}</if>
+            <if test="spUserId != null  and spUserId != ''"> and sp_user_id = #{spUserId}</if>
+            <if test="spUserBy != null  and spUserBy != ''"> and sp_user_by = #{spUserBy}</if>
+            <if test="spTime != null "> and sp_time = #{spTime}</if>
+            <if test="spReason != null  and spReason != ''"> and sp_reason = #{spReason}</if>
+            <if test="state != null "> and state = #{state}</if>
+        </where>
+    </select>
+
+    <select id="selectTZymlApplicationRecordById" parameterType="String" resultMap="TZymlApplicationRecordResult">
+        <include refid="selectTZymlApplicationRecordVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertTZymlApplicationRecord" parameterType="TZymlApplicationRecord">
+        insert into t_zyml_application_record
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="sqUserId != null and sqUserId != ''">sq_user_id,</if>
+            <if test="sqUserBy != null">sq_user_by,</if>
+            <if test="sqTime != null">sq_time,</if>
+            <if test="sqDepartmentId != null and sqDepartmentId != ''">sq_department_id,</if>
+            <if test="sqDepartmentBy != null">sq_department_by,</if>
+            <if test="zymlId != null and zymlId != ''">zyml_id,</if>
+            <if test="zymlBy != null">zyml_by,</if>
+            <if test="zymlTypeCode != null">zyml_type_code,</if>
+            <if test="zymlTypeName != null">zyml_type_name,</if>
+            <if test="sqFw != null and sqFw != ''">sq_fw,</if>
+            <if test="sqReason != null and sqReason != ''">sq_reason,</if>
+            <if test="systemName != null and systemName != ''">system_name,</if>
+            <if test="callIp != null and callIp != ''">call_ip,</if>
+            <if test="deadline != null">deadline,</if>
+            <if test="attachment != null">attachment,</if>
+            <if test="sqDeadline != null">sq_deadline,</if>
+            <if test="spUserId != null">sp_user_id,</if>
+            <if test="spUserBy != null">sp_user_by,</if>
+            <if test="spTime != null">sp_time,</if>
+            <if test="spReason != null">sp_reason,</if>
+            <if test="state != null">state,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="sqUserId != null and sqUserId != ''">#{sqUserId},</if>
+            <if test="sqUserBy != null">#{sqUserBy},</if>
+            <if test="sqTime != null">#{sqTime},</if>
+            <if test="sqDepartmentId != null and sqDepartmentId != ''">#{sqDepartmentId},</if>
+            <if test="sqDepartmentBy != null">#{sqDepartmentBy},</if>
+            <if test="zymlId != null and zymlId != ''">#{zymlId},</if>
+            <if test="zymlBy != null">#{zymlBy},</if>
+            <if test="zymlTypeCode != null">#{zymlTypeCode},</if>
+            <if test="zymlTypeName != null">#{zymlTypeName},</if>
+            <if test="sqFw != null and sqFw != ''">#{sqFw},</if>
+            <if test="sqReason != null and sqReason != ''">#{sqReason},</if>
+            <if test="systemName != null and systemName != ''">#{systemName},</if>
+            <if test="callIp != null and callIp != ''">#{callIp},</if>
+            <if test="deadline != null">#{deadline},</if>
+            <if test="attachment != null">#{attachment},</if>
+            <if test="sqDeadline != null">#{sqDeadline},</if>
+            <if test="spUserId != null">#{spUserId},</if>
+            <if test="spUserBy != null">#{spUserBy},</if>
+            <if test="spTime != null">#{spTime},</if>
+            <if test="spReason != null">#{spReason},</if>
+            <if test="state != null">#{state},</if>
+         </trim>
+    </insert>
+
+    <update id="updateTZymlApplicationRecord" parameterType="TZymlApplicationRecord">
+        update t_zyml_application_record
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="sqUserId != null and sqUserId != ''">sq_user_id = #{sqUserId},</if>
+            <if test="sqUserBy != null">sq_user_by = #{sqUserBy},</if>
+            <if test="sqTime != null">sq_time = #{sqTime},</if>
+            <if test="sqDepartmentId != null and sqDepartmentId != ''">sq_department_id = #{sqDepartmentId},</if>
+            <if test="sqDepartmentBy != null">sq_department_by = #{sqDepartmentBy},</if>
+            <if test="zymlId != null and zymlId != ''">zyml_id = #{zymlId},</if>
+            <if test="zymlBy != null">zyml_by = #{zymlBy},</if>
+            <if test="zymlTypeCode != null">zyml_type_code = #{zymlTypeCode},</if>
+            <if test="zymlTypeName != null">zyml_type_name = #{zymlTypeName},</if>
+            <if test="sqFw != null and sqFw != ''">sq_fw = #{sqFw},</if>
+            <if test="sqReason != null and sqReason != ''">sq_reason = #{sqReason},</if>
+            <if test="systemName != null and systemName != ''">system_name = #{systemName},</if>
+            <if test="callIp != null and callIp != ''">call_ip = #{callIp},</if>
+            <if test="deadline != null">deadline = #{deadline},</if>
+            <if test="attachment != null">attachment = #{attachment},</if>
+            <if test="sqDeadline != null">sq_deadline = #{sqDeadline},</if>
+            <if test="spUserId != null">sp_user_id = #{spUserId},</if>
+            <if test="spUserBy != null">sp_user_by = #{spUserBy},</if>
+            <if test="spTime != null">sp_time = #{spTime},</if>
+            <if test="spReason != null">sp_reason = #{spReason},</if>
+            <if test="state != null">state = #{state},</if>
+            <if test="sqRevokeTime != null">sq_revoke_time = #{sqRevokeTime},</if>
+            <if test="sqRevokeReason != null  and sqRevokeReason != '' ">sq_revoke_reason = #{sqRevokeReason},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteTZymlApplicationRecordById" parameterType="String">
+        delete from t_zyml_application_record where id = #{id}
+    </delete>
+
+    <delete id="deleteTZymlApplicationRecordByIds" parameterType="String">
+        delete from t_zyml_application_record where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 76 - 0
onemap-modules/onemap-spatial/src/main/java/com/onemap/spatial/controller/ProxyHandleControllect.java

@@ -0,0 +1,76 @@
+package com.onemap.spatial.controller;
+
+import com.onemap.common.core.utils.StringUtils;
+import com.onemap.common.core.utils.ip.IpUtils;
+import com.onemap.spatial.domain.TYztZyml;
+import com.onemap.spatial.service.IProxyHandleService;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import javax.servlet.ServletOutputStream;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.PrintWriter;
+import java.net.URL;
+import java.net.URLConnection;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Map;
+
+//代理测试
+@RestController
+@RequestMapping("/proxy/handle")
+public class ProxyHandleControllect {
+
+    @Resource
+    private IProxyHandleService proxyHandleService;
+
+    @GetMapping("/{token}/siweigeoserver/**")
+    public void geoserverHandle(@PathVariable("token") String token, HttpServletRequest request, HttpServletResponse response) throws IOException {
+        String fwId = proxyHandleService.proxyServerCheck(token, request, response);
+        if (StringUtils.isEmpty(fwId)) {
+            isCheckFull(response);
+            return;
+        }
+        TYztZyml serverUrlData = proxyHandleService.proxyServerData(fwId);
+        if (serverUrlData == null) {
+            isCheckFull(response);
+            return;
+        }
+        proxyHandleService.proxyGeoServer(serverUrlData, request, response);
+    }
+
+    //    @GetMapping("/{token}/siweisupermap/**", "/{token}/siweisupermap/**")
+    @RequestMapping(value = {"/{token}/siweisupermap*", "/{token}/siweisupermap/**"}, method = {RequestMethod.GET})
+    public void supermapserverHandle(@PathVariable("token") String token, HttpServletRequest request, HttpServletResponse response) throws IOException {
+        String fwId = proxyHandleService.proxyServerCheck(token, request, response);
+        if (StringUtils.isEmpty(fwId)) {
+            isCheckFull(response);
+            return;
+        }
+        TYztZyml serverUrlData = proxyHandleService.proxyServerData(fwId);
+        if (serverUrlData == null) {
+            isCheckFull(response);
+            return;
+        }
+        proxyHandleService.proxySuperMapServer(serverUrlData, request, response);
+    }
+
+    private void isCheckFull(HttpServletResponse response) throws IOException {
+        /*
+         * 在调用getWriter之前未设置编码(既调用setContentType或者setCharacterEncoding方法设置编码),
+         * HttpServletResponse则会返回一个用默认的编码(既ISO-8859-1)编码的PrintWriter实例。这样就会
+         * 造成中文乱码。而且设置编码时必须在调用getWriter之前设置,不然是无效的。
+         * */
+        response.setContentType("text/html;charset=utf-8");
+        //response.setCharacterEncoding("UTF-8");
+        PrintWriter out = response.getWriter();
+        //JSON在传递过程中是普通字符串形式传递的,这里简单拼接一个做测试
+        String jsonString = "{\"code\":401,\"msg\":\"权限校验失败!!!\"}";
+        out.println(jsonString);
+        out.flush();
+        out.close();
+    }
+}

+ 200 - 0
onemap-modules/onemap-spatial/src/main/java/com/onemap/spatial/controller/ProxyHandleControllectBak.java

@@ -0,0 +1,200 @@
+package com.onemap.spatial.controller;
+
+import com.onemap.common.core.utils.StringUtils;
+import com.onemap.spatial.domain.TYztZyml;
+import com.onemap.spatial.service.IProxyHandleService;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+import javax.servlet.ServletOutputStream;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.PrintWriter;
+import java.net.URL;
+import java.net.URLConnection;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Map;
+
+//代理测试
+public class ProxyHandleControllectBak {
+
+    @Resource
+    private IProxyHandleService proxyHandleService;
+
+    public void geoserverHandle(@PathVariable("token") String token, HttpServletRequest request, HttpServletResponse response) throws IOException {
+        String fwId = proxyHandleService.proxyServerCheck(token, request, response);
+        if (StringUtils.isEmpty(fwId)) {
+            isCheckFull(response);
+            return;
+        }
+        TYztZyml serverUrlData = proxyHandleService.proxyServerData(fwId);
+        if (serverUrlData == null) {
+            isCheckFull(response);
+            return;
+        }
+        proxyHandleService.proxyGeoServer(serverUrlData, request, response);
+        //a484b75e2ac24016a62ccbef76c8b138
+        //http://192.168.60.4:9201/proxy/handle/2/siweigeoserver?service=wms&format=image%2Fpng&transparent=true&version=1.1.1&request=GetMap&styles=&layers=sanya_workspace%3ATB_CZKFBJ&bbox=111.09374999999999%2C21.093750000000004%2C112.50000000000003%2C22.5&width=256&height=256&srs=EPSG%3A4326
+
+//        String url = getCompleteURL(request);
+//        int len = url.indexOf("siweigeoserver");
+//        String paramsurl = url.substring(len+14);
+//        String serverUrl = serverUrlData.getUrl();
+//        String qqurl = serverUrl + paramsurl;
+//
+//        System.out.println("wz:" + url);
+//        System.out.println("len:" + len);
+//        System.out.println("paramsurl:" + paramsurl);
+//        System.out.println("serverUrl:" + serverUrl);
+//        System.out.println("qqurl:" + qqurl);
+
+//        System.out.println("token:" + token);
+
+//        String ipAddr = IpUtils.getIpAddr(request);
+//        System.out.println("ipAddr:" + ipAddr);
+
+
+//        //请求地址
+//        String url = request.getRequestURI();
+//        System.out.println("url:" + url);
+//
+//        int len = url.indexOf("siweigeoserver");
+//        String paramsurl = url.substring(len + 14);
+//        String serverUrl = serverUrlData.getUrl();
+//        String qqurl = serverUrl + paramsurl;
+//
+//        System.out.println("wz:" + url);
+//        System.out.println("len:" + len);
+//        System.out.println("paramsurl:" + paramsurl);
+//        System.out.println("serverUrl:" + serverUrl);
+//        System.out.println("qqurl:" + qqurl);
+//
+//
+//        Map params = new HashMap();
+//        Enumeration<String> parameters = request.getParameterNames();
+//        while (parameters.hasMoreElements()) {
+//            String paramName = parameters.nextElement();
+//            String paramValue = request.getParameter(paramName);
+//            // 处理参数
+////            System.out.println("paramName:"+paramName);
+////            System.out.println("paramValue:"+paramValue);
+//            params.put(paramName, paramValue);
+//        }
+//        String url_new = qqurl;
+//        formatFileResponse(url_new, params, response);
+    }
+
+    public void test(HttpServletRequest request, HttpServletResponse response) throws IOException {
+        String url = getCompleteURL(request);
+        System.out.println("wz:" + url);
+        //请求地址
+        String uri = request.getRequestURI();
+        System.out.println("url:" + uri);
+
+        Map params = new HashMap();
+        Enumeration<String> parameters = request.getParameterNames();
+        while (parameters.hasMoreElements()) {
+            String paramName = parameters.nextElement();
+            String paramValue = request.getParameter(paramName);
+            // 处理参数
+            System.out.println("paramName:" + paramName);
+            System.out.println("paramValue:" + paramValue);
+            params.put(paramName, paramValue);
+        }
+        String url_new = "http://192.168.60.2:8089/geoserver/sanya_workspace/wms";
+        formatFileResponse(url_new, params, response);
+    }
+
+    private void isCheckFull(HttpServletResponse response) throws IOException {
+        /*
+         * 在调用getWriter之前未设置编码(既调用setContentType或者setCharacterEncoding方法设置编码),
+         * HttpServletResponse则会返回一个用默认的编码(既ISO-8859-1)编码的PrintWriter实例。这样就会
+         * 造成中文乱码。而且设置编码时必须在调用getWriter之前设置,不然是无效的。
+         * */
+        response.setContentType("text/html;charset=utf-8");
+        //response.setCharacterEncoding("UTF-8");
+        PrintWriter out = response.getWriter();
+        //JSON在传递过程中是普通字符串形式传递的,这里简单拼接一个做测试
+        String jsonString = "{\"code\":401,\"msg\":\"权限校验失败!!!\"}";
+        out.println(jsonString);
+        out.flush();
+        out.close();
+    }
+
+    private String getCompleteURL(HttpServletRequest request) {
+        StringBuilder sb = new StringBuilder();
+        // 获取协议
+        String protocol = request.isSecure() ? "https://" : "http://";
+        sb.append(protocol);
+        // 获取请求的主机名
+        sb.append(request.getServerName());
+        // 获取端口号(如果为默认端口则不添加)
+        int port = request.getServerPort();
+        if ((port != 80 && !request.isSecure()) || (port != 443 && request.isSecure())) {
+            sb.append(":").append(port);
+        }
+        // 获取上下文路径
+        sb.append(request.getContextPath());
+        // 获取请求URI
+        sb.append(request.getRequestURI());
+        // 获取查询字符串(如果存在)
+        if (request.getQueryString() != null) {
+            sb.append("?").append(request.getQueryString());
+        }
+        return sb.toString();
+    }
+
+    private void formatFileResponse(String uri, Map params, HttpServletResponse response) throws IOException {
+        try {
+            uri = uriJoinParam(uri, params);
+            URL url = new URL(uri);
+            URLConnection con = url.openConnection();
+            System.out.println(con.getContentType());
+            InputStream headimgIs = con.getInputStream();
+//            response.setContentType("application/json;charset=UTF-8");
+            response.setContentType(con.getContentType());
+//            response.setHeader("Content-Disposition","inline; filename=sanya_workspace-TB_CZKFBJ.png");
+            response.setHeader("Access-Control-Allow-Origin", "*");
+//            response.setHeader("Access-Control-Allow-Credentials","true");
+//            response.setHeader("X-Frame-Options","SAMEORIGIN");
+//            response.setHeader("X-Content-Type-Options","nosniff");
+            ServletOutputStream outputStream = response.getOutputStream();
+            int len = 0;
+            byte[] bytes = new byte[1024];
+            while ((len = headimgIs.read(bytes)) > 0) {
+                outputStream.write(bytes, 0, len);
+            }
+            headimgIs.close();
+            outputStream.close();
+        } catch (Exception e) {
+            System.err.println("获取文件流出错");
+        }
+    }
+
+    /**
+     * get请求方式针对uri的参数封装
+     *
+     * @param uri
+     * @param params
+     * @return
+     */
+    private String uriJoinParam(String uri, Map params) {
+        StringBuilder sbf = new StringBuilder(uri);
+        if (uri.indexOf("?") > 0) {
+            sbf.append("&");
+        } else {
+            sbf.append("?");
+        }
+        for (Object key : params.keySet()) {
+            sbf.append(key).append("=").append(params.get(key)).append("&");
+        }
+        return sbf.toString();
+    }
+
+}

+ 358 - 0
onemap-modules/onemap-spatial/src/main/java/com/onemap/spatial/domain/TYztZyml.java

@@ -0,0 +1,358 @@
+package com.onemap.spatial.domain;
+
+import com.onemap.common.core.annotation.Excel;
+import com.onemap.common.core.web.domain.TreeEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+/**
+ * 数据资源目录对象 t_yzt_zyml
+ * 
+ * @author onemap
+ * @date 2022-12-01
+ */
+public class TYztZyml extends TreeEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 标识码 */
+    @Excel(name = "标识码")
+    private String bsm;
+
+    /** 名称 */
+    @Excel(name = "名称")
+    private String name;
+
+    /** 类型(Point、Line、Polygon、WMTS) */
+    @Excel(name = "类型(Point、Line、Polygon、WMTS)")
+    private String type;
+
+    /** 父标识码 */
+    @Excel(name = "父标识码")
+    private String pbsm;
+
+    /** 图标 */
+    @Excel(name = "图标")
+    private String icon;
+
+    /** URL */
+    @Excel(name = "URL")
+    private String url;
+
+    /** 级别 */
+    @Excel(name = "级别")
+    private Long lev;
+
+    /** 排序 */
+    @Excel(name = "排序")
+    private Long sort;
+
+    /** 状态 */
+    @Excel(name = "状态")
+    private Long state;
+
+    /** 是否父节点(0否 1是) */
+    @Excel(name = "是否父节点(0否 1是)")
+    private Long parent;
+
+    /** 服务器类型(arcgis geoserver) */
+    @Excel(name = "服务器类型(arcgis geoserver)")
+    private String serverType;
+
+    /** 是否历史数据(0否 1是) */
+    @Excel(name = "是否历史数据(0否 1是)")
+    private Long sflssj;
+
+    /** 是否对比分析(0否 1是) */
+    @Excel(name = "是否对比分析(0否 1是)")
+    private Long sfdbfx;
+
+    /** 是否卷帘(0否 1是) */
+    @Excel(name = "是否卷帘(0否 1是)")
+    private Long sfjl;
+
+    /** 是否查询(0否 1是) */
+    @Excel(name = "是否查询(0否 1是)")
+    private Long sfcx;
+
+    /** 是否统计(0否 1是) */
+    @Excel(name = "是否统计(0否 1是)")
+    private Long sftj;
+
+    /** 数据坐标系 */
+    @Excel(name = "数据坐标系")
+    private String epsg;
+
+    /** 数据年份 */
+    @Excel(name = "数据年份")
+    private String year;
+
+    /** 数据类型(point、line、polyon、img、pdf) */
+    @Excel(name = "数据类型(point、line、polyon、img、pdf)")
+    private String sjlx;
+
+    /** SDE表 */
+    @Excel(name = "SDE表")
+    private String sde;
+
+    /** 过滤条件 */
+    @Excel(name = "过滤条件")
+    private String gltj;
+
+    /** 数据来源 */
+    @Excel(name = "数据来源")
+    private String sjly;
+
+    /** 图例 */
+    @Excel(name = "图例")
+    private String legend;
+
+    /** 业务类型 */
+    @Excel(name = "业务类型")
+    private String ywlx;
+
+    public String getYwlx() {
+        return ywlx;
+    }
+
+    public void setYwlx(String ywlx) {
+        this.ywlx = ywlx;
+    }
+
+    public void setBsm(String bsm)
+    {
+        this.bsm = bsm;
+    }
+
+    public String getBsm() 
+    {
+        return bsm;
+    }
+    public void setName(String name) 
+    {
+        this.name = name;
+    }
+
+    public String getName() 
+    {
+        return name;
+    }
+    public void setType(String type) 
+    {
+        this.type = type;
+    }
+
+    public String getType() 
+    {
+        return type;
+    }
+    public void setPbsm(String pbsm) 
+    {
+        this.pbsm = pbsm;
+    }
+
+    public String getPbsm() 
+    {
+        return pbsm;
+    }
+    public void setIcon(String icon) 
+    {
+        this.icon = icon;
+    }
+
+    public String getIcon() 
+    {
+        return icon;
+    }
+    public void setUrl(String url) 
+    {
+        this.url = url;
+    }
+
+    public String getUrl() 
+    {
+        return url;
+    }
+    public void setLev(Long lev) 
+    {
+        this.lev = lev;
+    }
+
+    public Long getLev() 
+    {
+        return lev;
+    }
+    public void setSort(Long sort) 
+    {
+        this.sort = sort;
+    }
+
+    public Long getSort() 
+    {
+        return sort;
+    }
+    public void setState(Long state) 
+    {
+        this.state = state;
+    }
+
+    public Long getState() 
+    {
+        return state;
+    }
+    public void setParent(Long parent) 
+    {
+        this.parent = parent;
+    }
+
+    public Long getParent() 
+    {
+        return parent;
+    }
+    public void setServerType(String serverType) 
+    {
+        this.serverType = serverType;
+    }
+
+    public String getServerType() 
+    {
+        return serverType;
+    }
+    public void setSflssj(Long sflssj) 
+    {
+        this.sflssj = sflssj;
+    }
+
+    public Long getSflssj() 
+    {
+        return sflssj;
+    }
+    public void setSfdbfx(Long sfdbfx) 
+    {
+        this.sfdbfx = sfdbfx;
+    }
+
+    public Long getSfdbfx() 
+    {
+        return sfdbfx;
+    }
+    public void setSfjl(Long sfjl) 
+    {
+        this.sfjl = sfjl;
+    }
+
+    public Long getSfjl() 
+    {
+        return sfjl;
+    }
+    public void setSfcx(Long sfcx) 
+    {
+        this.sfcx = sfcx;
+    }
+
+    public Long getSfcx() 
+    {
+        return sfcx;
+    }
+    public void setSftj(Long sftj) 
+    {
+        this.sftj = sftj;
+    }
+
+    public Long getSftj() 
+    {
+        return sftj;
+    }
+    public void setEpsg(String epsg) 
+    {
+        this.epsg = epsg;
+    }
+
+    public String getEpsg() 
+    {
+        return epsg;
+    }
+    public void setYear(String year) 
+    {
+        this.year = year;
+    }
+
+    public String getYear() 
+    {
+        return year;
+    }
+    public void setSjlx(String sjlx) 
+    {
+        this.sjlx = sjlx;
+    }
+
+    public String getSjlx() 
+    {
+        return sjlx;
+    }
+    public void setSde(String sde) 
+    {
+        this.sde = sde;
+    }
+
+    public String getSde() 
+    {
+        return sde;
+    }
+    public void setGltj(String gltj) 
+    {
+        this.gltj = gltj;
+    }
+
+    public String getGltj() 
+    {
+        return gltj;
+    }
+    public void setSjly(String sjly) 
+    {
+        this.sjly = sjly;
+    }
+
+    public String getSjly() 
+    {
+        return sjly;
+    }
+    public void setLegend(String legend) 
+    {
+        this.legend = legend;
+    }
+
+    public String getLegend() 
+    {
+        return legend;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("bsm", getBsm())
+            .append("name", getName())
+            .append("type", getType())
+            .append("pbsm", getPbsm())
+            .append("icon", getIcon())
+            .append("url", getUrl())
+            .append("lev", getLev())
+            .append("sort", getSort())
+            .append("state", getState())
+            .append("parent", getParent())
+            .append("serverType", getServerType())
+            .append("sflssj", getSflssj())
+            .append("sfdbfx", getSfdbfx())
+            .append("sfjl", getSfjl())
+            .append("sfcx", getSfcx())
+            .append("sftj", getSftj())
+            .append("epsg", getEpsg())
+            .append("year", getYear())
+            .append("sjlx", getSjlx())
+            .append("sde", getSde())
+            .append("gltj", getGltj())
+            .append("sjly", getSjly())
+            .append("legend", getLegend())
+            .toString();
+    }
+}

+ 84 - 0
onemap-modules/onemap-spatial/src/main/java/com/onemap/spatial/domain/TZymlApplicationRecordVo.java

@@ -0,0 +1,84 @@
+package com.onemap.spatial.domain;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+
+/**
+ * 我的申请对象 t_zyml_application_record
+ */
+@TableName("t_zyml_application_record")
+public class TZymlApplicationRecordVo {
+    private String id;
+    @TableField(value = "zyml_id")
+    private String zymlId;
+    @TableField(value = "sq_fw")
+    private String sqFw;
+    @TableField(value = "call_ip")
+    private String callIp;
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    private Date deadline;
+    private Integer state;
+    @TableField(value = "fw_key")
+    private Integer fwKey;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getZymlId() {
+        return zymlId;
+    }
+
+    public void setZymlId(String zymlId) {
+        this.zymlId = zymlId;
+    }
+
+    public String getSqFw() {
+        return sqFw;
+    }
+
+    public void setSqFw(String sqFw) {
+        this.sqFw = sqFw;
+    }
+
+    public String getCallIp() {
+        return callIp;
+    }
+
+    public void setCallIp(String callIp) {
+        this.callIp = callIp;
+    }
+
+    public Date getDeadline() {
+        return deadline;
+    }
+
+    public void setDeadline(Date deadline) {
+        this.deadline = deadline;
+    }
+
+    public Integer getState() {
+        return state;
+    }
+
+    public void setState(Integer state) {
+        this.state = state;
+    }
+
+    public Integer getFwKey() {
+        return fwKey;
+    }
+
+    public void setFwKey(Integer fwKey) {
+        this.fwKey = fwKey;
+    }
+}

+ 4 - 0
onemap-modules/onemap-spatial/src/main/java/com/onemap/spatial/mapper/ProxyHandleMapper.java

@@ -0,0 +1,4 @@
+package com.onemap.spatial.mapper;
+
+public interface ProxyHandleMapper {
+}

+ 70 - 0
onemap-modules/onemap-spatial/src/main/java/com/onemap/spatial/mapper/TYztZymlMapper.java

@@ -0,0 +1,70 @@
+package com.onemap.spatial.mapper;
+
+import com.onemap.common.datasource.annotation.Slave;
+import com.onemap.spatial.domain.TYztZyml;
+import com.onemap.system.api.domain.SysDictData;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+
+/**
+ * 数据资源目录Mapper接口
+ * 
+ * @author onemap
+ */
+@Mapper
+@Slave
+public interface TYztZymlMapper 
+{
+    /**
+     * 查询数据资源目录
+     * 
+     * @param bsm 数据资源目录主键
+     * @return 数据资源目录
+     */
+    TYztZyml selectTYztZymlByBsm(String bsm);
+
+    /**
+     * 查询数据资源目录列表
+     * 
+     * @param tYztZyml 数据资源目录
+     * @return 数据资源目录集合
+     */
+    List<TYztZyml> selectTYztZymlList(TYztZyml tYztZyml);
+
+    /**
+     * 新增数据资源目录
+     * 
+     * @param tYztZyml 数据资源目录
+     * @return 结果
+     */
+    int insertTYztZyml(TYztZyml tYztZyml);
+
+    /**
+     * 修改数据资源目录
+     * 
+     * @param tYztZyml 数据资源目录
+     * @return 结果
+     */
+    int updateTYztZyml(TYztZyml tYztZyml);
+
+    /**
+     * 删除数据资源目录
+     * 
+     * @param bsm 数据资源目录主键
+     * @return 结果
+     */
+    int deleteTYztZymlByBsm(String bsm);
+
+    /**
+     * 批量删除数据资源目录
+     * 
+     * @param bsms 需要删除的数据主键集合
+     * @return 结果
+     */
+    int deleteTYztZymlByBsms(String[] bsms);
+
+    List<SysDictData> getDbLayers();
+
+    String getDbLayerName(String dblayer);
+}

+ 11 - 0
onemap-modules/onemap-spatial/src/main/java/com/onemap/spatial/mapper/TZymlApplicationRecordMapper.java

@@ -0,0 +1,11 @@
+package com.onemap.spatial.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.onemap.common.datasource.annotation.Slave;
+import com.onemap.spatial.domain.TZymlApplicationRecordVo;
+import org.apache.ibatis.annotations.Mapper;
+
+@Mapper
+@Slave
+public interface TZymlApplicationRecordMapper  extends BaseMapper<TZymlApplicationRecordVo>  {
+}

+ 19 - 0
onemap-modules/onemap-spatial/src/main/java/com/onemap/spatial/service/IProxyHandleService.java

@@ -0,0 +1,19 @@
+package com.onemap.spatial.service;
+
+import com.onemap.spatial.domain.TYztZyml;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+
+public interface IProxyHandleService {
+
+    String proxyServerCheck(String token,HttpServletRequest request, HttpServletResponse response) throws IOException;
+
+    TYztZyml proxyServerData(String fwid) throws IOException;
+
+    void proxyGeoServer(TYztZyml serverData,HttpServletRequest request, HttpServletResponse response);
+
+    void proxySuperMapServer(TYztZyml serverData,HttpServletRequest request, HttpServletResponse response);
+
+}

+ 57 - 0
onemap-modules/onemap-spatial/src/main/java/com/onemap/spatial/service/cache/CacheEntity.java

@@ -0,0 +1,57 @@
+package com.onemap.spatial.service.cache;
+
+import lombok.Getter;
+import lombok.Setter;
+import java.io.Serializable;
+/**
+ * @ClassName: CacheEntity
+ * @Description: 保存本地缓存的实体
+ **/
+//@Setter
+//@Getter
+public class CacheEntity implements Serializable {
+    /** */
+    private static final long serialVersionUID = 7172649826282703560L;
+    /**
+     * 值
+     */
+    private Object value;
+    /**
+     * 保存的时间戳
+     */
+    private long gmtModify;
+    /**
+     * 过期时间(分钟)
+     */
+    private int expire;
+    public CacheEntity(Object value, long gmtModify, int expire) {
+        super();
+        this.value = value;
+        this.gmtModify = gmtModify;
+        this.expire = expire;
+    }
+
+    public Object getValue() {
+        return value;
+    }
+
+    public void setValue(Object value) {
+        this.value = value;
+    }
+
+    public long getGmtModify() {
+        return gmtModify;
+    }
+
+    public void setGmtModify(long gmtModify) {
+        this.gmtModify = gmtModify;
+    }
+
+    public int getExpire() {
+        return expire;
+    }
+
+    public void setExpire(int expire) {
+        this.expire = expire;
+    }
+}

+ 237 - 0
onemap-modules/onemap-spatial/src/main/java/com/onemap/spatial/service/cache/LocalCache.java

@@ -0,0 +1,237 @@
+package com.onemap.spatial.service.cache;
+
+//import jodd.madvoc.meta.In;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.*;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * @ClassName: LocalCache
+ * @Description: 本地缓存
+ **/
+public class LocalCache {
+    // 启动监控线程
+    static {
+        new Thread(new TimeoutTimerThread()).start();
+    }
+
+    /**
+     * logger
+     */
+    private static final Logger LOGGER = LoggerFactory.getLogger(LocalCache.class);
+    /**
+     * 默认的缓存容量
+     */
+    private static int DEFAULT_CAPACITY = 512;
+    /**
+     * 最大容量
+     */
+    private static int MAX_CAPACITY = 100000;
+    /**
+     * 缓存永不过期
+     */
+    public static final Integer UN_EXPIRED_TIME = -1;
+    /**
+     * 保证线程安全,使用concurrentHashMap
+     */
+    private static final ConcurrentHashMap<String, CacheEntity> cache = new ConcurrentHashMap<String, CacheEntity>();
+    /**
+     * 定时清空缓存(分钟),默认10分钟
+     */
+    private static volatile int clearAllInterval = 1;
+    private static LocalCache instance;
+
+    // 构造方法私有化,防止实例化
+    private LocalCache() {
+    }
+
+    // 单例模式构建对象
+    public static LocalCache getInstance() {
+        if (instance == null) {
+            instance = new LocalCache();
+        }
+        return instance;
+    }
+
+    /**
+     * 1、将key-value 保存到本地缓存并制定该缓存的过期时间
+     *
+     * @param key
+     * @param value
+     * @param expireTime 过期时间,如果是-1 则表示永不过期
+     * @return boolean
+     */
+    public boolean putValue(String key, Object value, int expireTime) {
+        if (key == null || "".equals(key) || value == null) {
+            //LoggerUtil.warn(LOGGER, "[LocalCache-putValue]-blank-key-or-empty-value: " + key);
+        }
+        //LoggerUtil.info(LOGGER, "[LocalCache-putValue]-key: " + key);
+        return putCloneValue(key, value, expireTime);
+    }
+
+    /**
+     * 2、从本地缓存中获取key对应的值,如果该值不存则则返回null
+     *
+     * @param key
+     * @param interval 定时清理缓存的时长
+     * @return Object
+     */
+    public Object getValue(String key, Integer interval) {
+        if (interval != null) {
+            clearAllInterval = interval;
+        }
+        boolean unCachedFlag = key == null || "".equals(key) || cache.get(key) == null;
+        if (unCachedFlag) {
+//            //LoggerUtil.warn(LOGGER, "[LocalCache-getValue]-warn-blank-key-or-empty-value");
+            return null;
+        }
+//        //LoggerUtil.info(LOGGER, "[LocalCache-getValue]-getValueFromCache-Key: " + key);
+        return cache.get(key).getValue();
+    }
+
+    /**
+     * 2、从本地缓存中获取key对应的值,如果该值不存则则返回null
+     *
+     * @param key
+     * @return Object
+     */
+    public Object getValue(String key) {
+        boolean unCachedFlag = key == null || "".equals(key) || cache.get(key) == null;
+        if (unCachedFlag) {
+//            //LoggerUtil.warn(LOGGER, "[LocalCache-getValue]-warn-blank-key-or-empty-value");
+            return null;
+        }
+//        //LoggerUtil.info(LOGGER, "[LocalCache-getValue]-getValueFromCache-Key: " + key);
+        return cache.get(key).getValue();
+    }
+
+    /**
+     * 3、从本地缓存中获取key对应的值,如果该值不存则则返回null
+     *
+     * @param key
+     * @param interval    定时清理缓存的时长
+     * @param doCacheFlag 缓存开关
+     * @return Object
+     */
+    public Object getValue(String key, Integer interval, Boolean doCacheFlag) {
+        if (interval != null) {
+            clearAllInterval = interval;
+        }
+        boolean unCachedFlag = key == null || "".equals(key) || cache.get(key) == null || (doCacheFlag != null && !doCacheFlag);
+        if (unCachedFlag) {
+            //LoggerUtil.warn(LOGGER, "[LocalCache-getValue]-warn-blank-key-or-empty-value");
+            return null;
+        }
+        //LoggerUtil.info(LOGGER, "[LocalCache-getValue]-getValueFromCache-Key: " + key);
+        return cache.get(key).getValue();
+    }
+
+    /**
+     * 4、清除指定缓存
+     */
+    public void clearByKey(String key) {
+        if (key == null || "".equals(key)) {
+            //LoggerUtil.warn(LOGGER, "[LocalCache-clearByKey]-warn-blank-key");
+            return;
+        }
+        cache.remove(key);
+    }
+
+    /**
+     * 5、清空所有
+     */
+    public void clearAll() {
+        cache.clear();
+    }
+
+    /**
+     * 将值通过序列化clone 处理后保存到缓存中,可以解决值引用的问题
+     *
+     * @param key
+     * @param value
+     * @param expireTime 缓存过期时间
+     * @return boolean
+     */
+    private boolean putCloneValue(String key, Object value, int expireTime) {
+        try {
+            if (cache.size() >= MAX_CAPACITY) {
+                //LoggerUtil.warn(LOGGER, "[LocalCache-putCloneValue]-warn-缓存容量达到阈值,不再新增缓存");
+                return false;
+            }
+            // 序列化赋值
+//            CacheEntity entityClone = clone(new CacheEntity(value, System.nanoTime(), expireTime));
+            CacheEntity entityClone = new CacheEntity(value, System.nanoTime(), expireTime);
+            cache.put(key, entityClone);
+            return true;
+        } catch (Exception e) {
+            //LoggerUtil.error(LOGGER, e, "[LocalCache-putCloneValue]-error " + StackPrint.getTrace(e));
+        }
+        return false;
+    }
+
+    /**
+     * 序列化 克隆处理
+     *
+     * @param object
+     * @return
+     */
+    private <T extends Serializable> T clone(T object) {
+        T cloneObject = null;
+        try {
+            ByteArrayOutputStream baos = new ByteArrayOutputStream();
+            ObjectOutputStream oos = new ObjectOutputStream(baos);
+            oos.writeObject(object);
+            oos.close();
+            ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
+            ObjectInputStream ois = new ObjectInputStream(bais);
+            cloneObject = (T) ois.readObject();
+            ois.close();
+        } catch (Exception e) {
+            //LoggerUtil.error(LOGGER, e, "[LocalCache-clone]-error " + StackPrint.getTrace(e));
+        }
+        return cloneObject;
+    }
+
+    /**
+     * 过期处理线程
+     */
+    private static class TimeoutTimerThread implements Runnable {
+        public void run() {
+            while (true) {
+                try {
+                    //LoggerUtil.info(LOGGER, "[LocalCache-TimeoutTimerThread]-start-Cache-monitor");
+                    TimeUnit.MINUTES.sleep(clearAllInterval);
+                    checkTime();
+//                    instance.clearAll();
+                } catch (Exception e) {
+                    //LoggerUtil.error(LOGGER, e, "[LocalCache-TimeoutTimerThread]-error " + StackPrint.getTrace(e));
+                }
+            }
+        }
+
+        /**
+         * 过期缓存的具体处理方法
+         */
+        private void checkTime() {
+            // 开始处理过期缓存
+            for (String key : cache.keySet()) {
+                CacheEntity tce = cache.get(key);
+                long gmtModify = tce.getGmtModify();
+                // 分钟转换为纳秒
+                gmtModify = gmtModify * 60000000000L;
+                long timoutTime = TimeUnit.NANOSECONDS.toSeconds(System.nanoTime() - gmtModify);
+                // 过期时间 > timoutTime;
+                if (tce.getExpire() > timoutTime) {
+                    continue;
+                }
+                //LoggerUtil.info(LOGGER, "[LocalCache-checkTime]-清除过期缓存: " + key);
+                // 清除过期缓存和删除对应的缓存队列
+                cache.remove(key);
+            }
+        }
+    }
+}

+ 367 - 0
onemap-modules/onemap-spatial/src/main/java/com/onemap/spatial/service/impl/ProxyHandleServiceImpl.java

@@ -0,0 +1,367 @@
+package com.onemap.spatial.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.onemap.common.core.utils.DateUtils;
+import com.onemap.common.core.utils.StringUtils;
+import com.onemap.common.core.utils.ip.IpUtils;
+import com.onemap.spatial.domain.TYztZyml;
+import com.onemap.spatial.domain.TZymlApplicationRecordVo;
+import com.onemap.spatial.mapper.TZymlApplicationRecordMapper;
+import com.onemap.spatial.mapper.TYztZymlMapper;
+import com.onemap.spatial.service.IProxyHandleService;
+import com.onemap.spatial.service.cache.LocalCache;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import javax.servlet.ServletOutputStream;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.*;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.net.URLConnection;
+import java.net.URLEncoder;
+import java.util.*;
+
+@Service
+public class ProxyHandleServiceImpl implements IProxyHandleService {
+
+    @Resource
+    private TZymlApplicationRecordMapper tZymlApplicationRecordMapper;
+    @Resource
+    private TYztZymlMapper TYztZymlMapper;
+
+    @Override
+    public String proxyServerCheck(String token, HttpServletRequest request, HttpServletResponse response) throws IOException {
+        String fu_id = null;
+        boolean isCheck = false;
+        String token_cache = "PROXYKEY" + "_" + token;
+        Object objectData = LocalCache.getInstance().getValue(token_cache);
+        TZymlApplicationRecordVo dto = null;
+        if (objectData == null) {
+            QueryWrapper<TZymlApplicationRecordVo> wrapper = new QueryWrapper<TZymlApplicationRecordVo>();
+            wrapper.eq("fw_key", token);
+            wrapper.eq("state", 3);
+            dto = tZymlApplicationRecordMapper.selectOne(wrapper);
+            if (null == dto || StringUtils.isNull(dto)) {
+                return fu_id;
+            }
+            LocalCache.getInstance().putValue(token_cache, dto, 1);
+        } else {
+            if (objectData instanceof TZymlApplicationRecordVo) {
+                dto = (TZymlApplicationRecordVo) objectData;
+            } else {
+                return fu_id;
+            }
+        }
+        long difftime = DateUtils.getDateDiff(dto.getDeadline(), new Date());
+        if (difftime < 0) {
+            return fu_id;
+        }
+
+        String callIp = dto.getCallIp();
+        String[] callIps = callIp.split(",");
+        String ipAddr = IpUtils.getIpAddr(request);
+        for (String ip : callIps) {
+            if (ipAddr.equals(ip) && !"unknown".equals(ipAddr) && !"127.0.0.1".equals(ipAddr) && !"localhost".equals(ipAddr)) {
+                isCheck = true;
+                fu_id = dto.getZymlId();
+                continue;
+            }
+        }
+        if (!isCheck) {
+            return fu_id;
+        }
+        return fu_id;
+    }
+
+    @Override
+    public TYztZyml proxyServerData(String fwid) throws IOException {
+        Object objectData = LocalCache.getInstance().getValue(fwid);
+        if (null == objectData) {
+            cacheServerData(fwid);
+            objectData = LocalCache.getInstance().getValue(fwid);
+        }
+        if (objectData instanceof TYztZyml) {
+            return (TYztZyml) objectData;
+        } else {
+            return null;
+        }
+    }
+
+    public synchronized void cacheServerData(String fwid) throws IOException {
+        Object objectData = LocalCache.getInstance().getValue(fwid);
+        if (null == objectData) {
+            TYztZyml bsmData = TYztZymlMapper.selectTYztZymlByBsm(fwid);
+            if (null == bsmData) {
+                LocalCache.getInstance().putValue(fwid, "-1", 6);
+            } else {
+                LocalCache.getInstance().putValue(fwid, bsmData, 1);
+            }
+        }
+    }
+
+    @Override
+    public void proxyGeoServer(TYztZyml serverData, HttpServletRequest request, HttpServletResponse response) {
+        //请求地址
+        String url = geURL(request);
+        ////System.out.println("url:" + url);
+
+        int len = url.indexOf("siweigeoserver");
+        String paramsurl = url.substring(len + 14);
+        String serverUrl = serverData.getUrl();
+
+        //判断ows
+        int owsLen = paramsurl.indexOf("/ows");
+        String qqurl = "";
+        if (owsLen == 0) {
+            int wmslen = serverUrl.indexOf("geoserver");
+            qqurl = serverUrl.substring(0, wmslen + 9) + paramsurl;
+        } else {
+            qqurl = serverUrl + paramsurl;
+        }
+        ////System.out.println("wz:" + url);
+        ////System.out.println("len:" + len);
+        ////System.out.println("paramsurl:" + paramsurl);
+        ////System.out.println("serverUrl:" + serverUrl);
+        ////System.out.println("qqurl:" + qqurl);
+
+        Map params = new HashMap();
+        Enumeration<String> parameters = request.getParameterNames();
+        while (parameters.hasMoreElements()) {
+            String paramName = parameters.nextElement();
+            String paramValue = request.getParameter(paramName);
+//            处理参数
+//            ////System.out.println("paramName:"+paramName);
+//            ////System.out.println("paramValue:"+paramValue);
+            params.put(paramName, paramValue);
+        }
+        String url_new = qqurl;
+        formaServerResponse(url_new, params, response);
+    }
+
+
+    @Override
+    public void proxySuperMapServer(TYztZyml serverData, HttpServletRequest request, HttpServletResponse response) {
+        //请求地址
+        String url = geURL(request);
+        System.out.println("url:" + url);
+
+        int len = url.indexOf("siweisupermap");
+        String siweiUrl = url.substring(0, len + 13);
+        String paramsurl = url.substring(len + 13);
+        String serverUrl = serverData.getUrl();
+        //判断output ,修改查询信息
+        int outputLen = paramsurl.indexOf("/output");
+        String qqurl = "";
+        if (outputLen == 0) {
+            int wmslen = serverUrl.indexOf("iserver");
+            qqurl = serverUrl.substring(0, wmslen + 7) + paramsurl;
+        } else {
+            qqurl = serverUrl + paramsurl;
+        }
+        Map params = new HashMap();
+        Enumeration<String> parameters = request.getParameterNames();
+        while (parameters.hasMoreElements()) {
+            String paramName = parameters.nextElement();
+            String paramValue = request.getParameter(paramName);
+            params.put(paramName, paramValue);
+        }
+        String url_new = qqurl;
+//        判断legend.json,替换查询参数
+        int owsLen = paramsurl.indexOf("/legend.json");
+        if (owsLen == 0) {
+            int olen = serverUrl.lastIndexOf("iserver");
+            String oldData = serverUrl.substring(0, olen + 7);
+            String newData = siweiUrl;
+            formaServerJsonReplace(url_new, params, response, oldData, newData);
+        } else {
+            formaServerResponse(url_new, params, response);
+        }
+
+    }
+
+    /**
+     * 获取URL信息,?之前的
+     *
+     * @param request
+     * @return
+     */
+    private String geURL(HttpServletRequest request) {
+        StringBuilder sb = new StringBuilder();
+        // 获取协议
+        String protocol = request.isSecure() ? "https://" : "http://";
+        sb.append(protocol);
+        // 获取请求的主机名
+        sb.append(request.getServerName());
+        // 获取端口号(如果为默认端口则不添加)
+        int port = request.getServerPort();
+        if ((port != 80 && !request.isSecure()) || (port != 443 && request.isSecure())) {
+            sb.append(":").append(port);
+        }
+        // 获取上下文路径
+        sb.append(request.getContextPath());
+        // 获取请求URI
+        sb.append(request.getRequestURI());
+        return sb.toString();
+    }
+
+
+    /**
+     * 获取URL信息
+     *
+     * @param request
+     * @return
+     */
+    private String getCompleteURL(HttpServletRequest request) {
+        StringBuilder sb = new StringBuilder();
+        // 获取协议
+        String protocol = request.isSecure() ? "https://" : "http://";
+        sb.append(protocol);
+        // 获取请求的主机名
+        sb.append(request.getServerName());
+        // 获取端口号(如果为默认端口则不添加)
+        int port = request.getServerPort();
+        if ((port != 80 && !request.isSecure()) || (port != 443 && request.isSecure())) {
+            sb.append(":").append(port);
+        }
+        // 获取上下文路径
+        sb.append(request.getContextPath());
+        // 获取请求URI
+        sb.append(request.getRequestURI());
+        // 获取查询字符串(如果存在)
+        if (request.getQueryString() != null) {
+            sb.append("?").append(request.getQueryString());
+        }
+        return sb.toString();
+    }
+
+
+    /**
+     * 发送server请求,并将数据返回
+     *
+     * @param uri
+     * @param params
+     * @param response
+     * @throws IOException
+     */
+    private void formaServerResponse(String uri, Map params, HttpServletResponse response) {
+        try {
+            uri = uriJoinParam(uri, params);
+            System.out.println("uri:" + uri);
+            URL url = new URL(uri);
+            HttpURLConnection con = (HttpURLConnection) url.openConnection();
+            if (con.getResponseCode() == 400) {
+                response.setStatus(400);
+            } else if (con.getResponseCode() == 404) {
+                response.setStatus(404);
+            } else {
+                InputStream headimgIs = con.getInputStream();
+
+                // 获取所有响应头字段
+                Map<String, List<String>> headers = con.getHeaderFields();
+                for (Map.Entry<String, List<String>> entry : headers.entrySet()) {
+                    List<String> d_values = entry.getValue();
+                    String d_key = entry.getKey();
+                    if (StringUtils.isNotEmpty(d_key) && d_values != null && d_values.size() >= 1) {
+                        response.setHeader(entry.getKey(), d_values.get(0));
+                    }
+                }
+                response.setHeader("Access-Control-Allow-Origin", "*");
+                ServletOutputStream outputStream = response.getOutputStream();
+                int len = 0;
+                byte[] bytes = new byte[1024];
+                while ((len = headimgIs.read(bytes)) > 0) {
+                    outputStream.write(bytes, 0, len);
+                }
+                headimgIs.close();
+                outputStream.close();
+            }
+        } catch (Exception e) {
+            System.err.println("获取文件流出错," + e);
+            response.setStatus(500);
+        }
+    }
+
+
+    /**
+     * 发送server请求,并将数据返回,处理JSON会将参数进行替换
+     *
+     * @param uri
+     * @param params
+     * @param response
+     * @throws IOException
+     */
+    private void formaServerJsonReplace(String uri, Map params, HttpServletResponse response, String oldData, String newData) {
+        try {
+            uri = uriJoinParam(uri, params);
+            URL url = new URL(uri);
+            HttpURLConnection con = (HttpURLConnection) url.openConnection();
+            if (con.getResponseCode() == 400) {
+                response.setStatus(400);
+            } else if (con.getResponseCode() == 404) {
+                response.setStatus(404);
+            } else {
+                String result = "";
+                InputStream headimgIs = con.getInputStream();
+                // 获取所有响应头字段
+                Map<String, List<String>> headers = con.getHeaderFields();
+                for (Map.Entry<String, List<String>> entry : headers.entrySet()) {
+                    List<String> d_values = entry.getValue();
+                    String d_key = entry.getKey();
+                    if (StringUtils.isNotEmpty(d_key) && d_values != null && d_values.size() >= 1) {
+                        response.setHeader(entry.getKey(), d_values.get(0));
+                    }
+                }
+
+                InputStreamReader is = new InputStreamReader(headimgIs, "utf-8");
+                BufferedReader bufferedReader = new BufferedReader(is);
+                StringBuffer strBuffer = new StringBuffer();
+                String line = null;
+                while (null != (line = bufferedReader.readLine())) {
+                    strBuffer.append(line);
+                }
+                is.close();
+                con.disconnect();
+                result = strBuffer.toString();
+//                System.out.println("result:" + result);
+                response.setHeader("Access-Control-Allow-Origin", "*");
+                ServletOutputStream outputStream = response.getOutputStream();
+                String newStringData = result.replaceAll(oldData, newData);
+                outputStream.write(newStringData.getBytes("UTF-8"));
+                outputStream.close();
+            }
+        } catch (Exception e) {
+            System.err.println("获取文件流出错," + e);
+            response.setStatus(500);
+        }
+    }
+
+
+    /**
+     * get请求方式针对uri的参数封装
+     *
+     * @param uri
+     * @param params
+     * @return
+     */
+    private String uriJoinParam(String uri, Map params) {
+        StringBuilder sbf = new StringBuilder(uri);
+        if (uri.indexOf("?") > 0) {
+            sbf.append("&");
+        } else {
+            sbf.append("?");
+        }
+        for (Object key : params.keySet()) {
+            Object value = params.get(key);
+            if (value instanceof String) {
+                String valueStr = (String) value;
+                sbf.append(key).append("=").append(URLEncoder.encode(valueStr)).append("&");
+            } else {
+                sbf.append(key).append("=").append(value).append("&");
+            }
+//            sbf.append(key).append("=").append(params.get(key)).append("&");
+        }
+        return sbf.toString();
+    }
+}

+ 189 - 0
onemap-modules/onemap-spatial/src/main/resources/mapper/postgresql/TYztZymlMapper.xml

@@ -0,0 +1,189 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.onemap.spatial.mapper.TYztZymlMapper">
+
+    <resultMap type="TYztZyml" id="TYztZymlResult">
+        <result property="bsm" column="bsm"/>
+        <result property="name" column="name"/>
+        <result property="type" column="type"/>
+        <result property="pbsm" column="pbsm"/>
+        <result property="icon" column="icon"/>
+        <result property="url" column="url"/>
+        <result property="lev" column="lev"/>
+        <result property="sort" column="sort"/>
+        <result property="state" column="state"/>
+        <result property="parent" column="parent"/>
+        <result property="serverType" column="server_type"/>
+        <result property="sflssj" column="sflssj"/>
+        <result property="sfdbfx" column="sfdbfx"/>
+        <result property="sfjl" column="sfjl"/>
+        <result property="sfcx" column="sfcx"/>
+        <result property="sftj" column="sftj"/>
+        <result property="epsg" column="epsg"/>
+        <result property="year" column="year"/>
+        <result property="sjlx" column="sjlx"/>
+        <result property="sde" column="sde"/>
+        <result property="gltj" column="gltj"/>
+        <result property="sjly" column="sjly"/>
+        <result property="legend" column="legend"/>
+        <result property="ywlx" column="ywlx"/>
+    </resultMap>
+
+    <sql id="selectTYztZymlVo">
+        select bsm, name, type, pbsm, icon, url, lev, sort, state, parent, server_type, sflssj, sfdbfx, sfjl, sfcx, sftj, epsg, year, sjlx, sde, gltj, sjly, legend, ywlx from t_yzt_zyml
+    </sql>
+
+    <select id="getDbLayersMSN" parameterType="java.lang.String" resultType="com.onemap.system.api.domain.SysDictData">
+SELECT t.id as "dict_value", t.layeralias as "dict_label",'dblayers' as "dict_type"
+  from T_YZT_DB_LAYER t
+  left join t_yzt_zyml ml
+    on ml.sde = t.id
+ where ml.sde is null
+    </select>
+
+    <select id="getDbLayers" parameterType="java.lang.String" resultType="com.onemap.system.api.domain.SysDictData">
+SELECT t.id as "dict_value", t.layeralias as "dict_label",'dblayers' as "dict_type", t.source as "remark"
+  from T_YZT_DB_LAYER t
+    </select>
+
+
+    <select id="getDbLayerName" parameterType="java.lang.String" resultType="java.lang.String">
+SELECT t.layeralias
+  from T_YZT_DB_LAYER t where id = #{dblayer}
+    </select>
+
+    <select id="selectTYztZymlList" parameterType="TYztZyml" resultMap="TYztZymlResult">
+        <include refid="selectTYztZymlVo"/>
+        <where>
+            <if test="bsm != null  and bsm != ''">and bsm = #{bsm}</if>
+            <if test="name != null  and name != ''">and name like concat('%', #{name}, '%')</if>
+            <if test="type != null  and type != ''">and type = #{type}</if>
+            <if test="pbsm != null  and pbsm != ''">and pbsm = #{pbsm}</if>
+            <if test="icon != null  and icon != ''">and icon = #{icon}</if>
+            <if test="url != null  and url != ''">and url = #{url}</if>
+            <if test="lev != null ">and lev = #{lev}</if>
+            <if test="sort != null ">and sort = #{sort}</if>
+            <if test="state != null ">and state = #{state}</if>
+            <if test="parent != null ">and parent = #{parent}</if>
+            <if test="serverType != null  and serverType != ''">and server_type = #{serverType}</if>
+            <if test="sflssj != null ">and sflssj = #{sflssj}</if>
+            <if test="sfdbfx != null ">and sfdbfx = #{sfdbfx}</if>
+            <if test="sfjl != null ">and sfjl = #{sfjl}</if>
+            <if test="sfcx != null ">and sfcx = #{sfcx}</if>
+            <if test="sftj != null ">and sftj = #{sftj}</if>
+            <if test="epsg != null  and epsg != ''">and epsg = #{epsg}</if>
+            <if test="year != null  and year != ''">and year = #{year}</if>
+            <if test="sjlx != null  and sjlx != ''">and sjlx = #{sjlx}</if>
+            <if test="sde != null  and sde != ''">and sde = #{sde}</if>
+            <if test="gltj != null  and gltj != ''">and gltj = #{gltj}</if>
+            <if test="sjly != null  and sjly != ''">and sjly = #{sjly}</if>
+            <if test="legend != null  and legend != ''">and legend = #{legend}</if>
+            <if test="ywlx != null  and ywlx != ''">and ywlx = #{ywlx}</if>
+        </where>
+        order by sort
+    </select>
+
+    <select id="selectTYztZymlByBsm" parameterType="String" resultMap="TYztZymlResult">
+        <include refid="selectTYztZymlVo"/>
+        where bsm = #{bsm}
+    </select>
+
+    <insert id="insertTYztZyml" parameterType="TYztZyml">
+        insert into t_yzt_zyml
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="bsm != null and bsm != ''">bsm,</if>
+            <if test="name != null">name,</if>
+            <if test="type != null">type,</if>
+            <if test="pbsm != null">pbsm,</if>
+            <if test="icon != null">icon,</if>
+            <if test="url != null">url,</if>
+            <if test="lev != null">lev,</if>
+            <if test="sort != null">sort,</if>
+            <if test="state != null">state,</if>
+            <if test="parent != null">parent,</if>
+            <if test="serverType != null">server_type,</if>
+            <if test="sflssj != null">sflssj,</if>
+            <if test="sfdbfx != null">sfdbfx,</if>
+            <if test="sfjl != null">sfjl,</if>
+            <if test="sfcx != null">sfcx,</if>
+            <if test="sftj != null">sftj,</if>
+            <if test="epsg != null">epsg,</if>
+            <if test="year != null">year,</if>
+            <if test="sjlx != null">sjlx,</if>
+            <if test="sde != null">sde,</if>
+            <if test="gltj != null">gltj,</if>
+            <if test="sjly != null">sjly,</if>
+            <if test="legend != null">legend,</if>
+            <if test="ywlx != null">ywlx,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="bsm != null and bsm != ''">#{bsm},</if>
+            <if test="name != null">#{name},</if>
+            <if test="type != null">#{type},</if>
+            <if test="pbsm != null">#{pbsm},</if>
+            <if test="icon != null">#{icon},</if>
+            <if test="url != null">#{url},</if>
+            <if test="lev != null">#{lev},</if>
+            <if test="sort != null">#{sort},</if>
+            <if test="state != null">#{state},</if>
+            <if test="parent != null">#{parent},</if>
+            <if test="serverType != null">#{serverType},</if>
+            <if test="sflssj != null">#{sflssj},</if>
+            <if test="sfdbfx != null">#{sfdbfx},</if>
+            <if test="sfjl != null">#{sfjl},</if>
+            <if test="sfcx != null">#{sfcx},</if>
+            <if test="sftj != null">#{sftj},</if>
+            <if test="epsg != null">#{epsg},</if>
+            <if test="year != null">#{year},</if>
+            <if test="sjlx != null">#{sjlx},</if>
+            <if test="sde != null">#{sde},</if>
+            <if test="gltj != null">#{gltj},</if>
+            <if test="sjly != null">#{sjly},</if>
+            <if test="legend != null">#{legend},</if>
+            <if test="ywlx != null">#{ywlx},</if>
+        </trim>
+    </insert>
+
+    <update id="updateTYztZyml" parameterType="TYztZyml">
+        update t_yzt_zyml
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="name != null">name = #{name},</if>
+            <if test="type != null">type = #{type},</if>
+            <if test="pbsm != null">pbsm = #{pbsm},</if>
+            <if test="icon != null">icon = #{icon},</if>
+            <if test="url != null">url = #{url},</if>
+            <if test="lev != null">lev = #{lev},</if>
+            <if test="sort != null">sort = #{sort},</if>
+            <if test="state != null">state = #{state},</if>
+            <if test="parent != null">parent = #{parent},</if>
+            <if test="serverType != null">server_type = #{serverType},</if>
+            <if test="sflssj != null">sflssj = #{sflssj},</if>
+            <if test="sfdbfx != null">sfdbfx = #{sfdbfx},</if>
+            <if test="sfjl != null">sfjl = #{sfjl},</if>
+            <if test="sfcx != null">sfcx = #{sfcx},</if>
+            <if test="sftj != null">sftj = #{sftj},</if>
+            <if test="epsg != null">epsg = #{epsg},</if>
+            <if test="year != null">year = #{year},</if>
+            <if test="sjlx != null">sjlx = #{sjlx},</if>
+            <if test="sde != null">sde = #{sde},</if>
+            <if test="gltj != null">gltj = #{gltj},</if>
+            <if test="sjly != null">sjly = #{sjly},</if>
+            <if test="legend != null">legend = #{legend},</if>
+            <if test="ywlx != null">ywlx = #{ywlx},</if>
+        </trim>
+        where bsm = #{bsm}
+    </update>
+
+    <delete id="deleteTYztZymlByBsm" parameterType="String">
+        delete from t_yzt_zyml where bsm = #{bsm}
+    </delete>
+
+    <delete id="deleteTYztZymlByBsms" parameterType="String">
+        delete from t_yzt_zyml where bsm in
+        <foreach item="bsm" collection="array" open="(" separator="," close=")">
+            #{bsm}
+        </foreach>
+    </delete>
+</mapper>