Răsfoiți Sursa

添加申请撤回原因和代理地址

DESKTOP-2K9OVK9\siwei 5 luni în urmă
părinte
comite
ae4dde08ab

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

@@ -70,6 +70,7 @@ public class MyExamineController extends BaseController {
         newRecord.setDeadline(tZymlApplicationRecord.getDeadline());
         newRecord.setSpReason(tZymlApplicationRecord.getSpReason());
         newRecord.setZymlUrl(myExamineService.getProxyServerUrl(fwKey, record.getZymlId()));
+        newRecord.setFwKey(fwKey);
         return toAjax(zymlApplicationRecordService.updateTZymlApplicationRecord(newRecord));
     }
 

+ 9 - 4
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/controller/zymlapplication/ShareResourcesController.java

@@ -2,12 +2,12 @@ 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.annotation.RequiresPermissions;
 import com.onemap.common.security.utils.SecurityUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
@@ -16,7 +16,7 @@ import java.util.Date;
 import java.util.List;
 
 /**
- * 资源共享页面需要接口
+ * 资源共享页面
  */
 @RestController
 @RequestMapping("/share/resources")
@@ -37,8 +37,13 @@ public class ShareResourcesController extends BaseController {
         tZymlApplicationRecord.setSpTime(null);
         tZymlApplicationRecord.setSpUserBy(null);
         tZymlApplicationRecord.setSpUserId(null);
-        tZymlApplicationRecord.setSqUserBy(SecurityUtils.getUsername());
-        tZymlApplicationRecord.setSqUserId(SecurityUtils.getUserId());
+        if (StringUtils.isNotEmpty(SecurityUtils.getUsername())) {
+            tZymlApplicationRecord.setSqUserBy(SecurityUtils.getUsername());
+            tZymlApplicationRecord.setSqUserId(SecurityUtils.getUserId());
+        } else {
+            tZymlApplicationRecord.setSqUserBy("admin");
+            tZymlApplicationRecord.setSqUserId(1L);
+        }
         tZymlApplicationRecord.setSqTime(new Date());
         tZymlApplicationRecord.setState(1);
         return toAjax(tZymlApplicationRecordService.insertTZymlApplicationRecord(tZymlApplicationRecord));

+ 12 - 25
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/domain/zymlapplication/TZymlApplicationRecord.java

@@ -172,6 +172,9 @@ public class TZymlApplicationRecord extends BaseEntity {
     @Excel(name = "状态", readConverterExp = "$column.readConverterExp()")
     private Integer state;
 
+    @Excel(name = "服务KEY")
+    private String fwKey;
+
     public void setId(String id) {
         this.id = id;
     }
@@ -372,32 +375,16 @@ public class TZymlApplicationRecord extends BaseEntity {
         this.sqRevokeReason = sqRevokeReason;
     }
 
+    public String getFwKey() {
+        return fwKey;
+    }
+
+    public void setFwKey(String fwKey) {
+        this.fwKey = fwKey;
+    }
+
     @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();
+        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();
     }
 }

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

@@ -31,7 +31,7 @@ public class MyExamineServiceImpl implements IMyExamineService {
         //判断geoserver
         if (StringUtils.isNotEmpty(server_type) && "geoserver".equals(server_type.toLowerCase())) {
             int len = url.indexOf("geoserver");
-            url = url.substring(len + 9);
+            url = url.substring(len + 10);
             String fwmc = (String) mapfwData.get("fwmc");
             String fwgzkj = (String) mapfwData.get("fwgzkj");
             String qpfa = (String) mapfwData.get("qpfa");
@@ -54,14 +54,14 @@ public class MyExamineServiceImpl implements IMyExamineService {
             //判断3DTiles
             if (StringUtils.isNotEmpty(type) && "3DTiles".toLowerCase().equals(type.toLowerCase())) {
                 int len = url.indexOf("3Dtiles");
-                url = url.substring(len + 7);
+                url = url.substring(len + 8);
                 String params = "";
                 params = params + serverParoxyUrl.replace("{token}", fwKey) + url;
                 return params;
             } else {
                 //超图的
                 int len = url.indexOf("iserver");
-                url = url.substring(len + 7);
+                url = url.substring(len + 8);
                 String sde = (String) mapfwData.get("sde");
                 String params = "";
                 params = params + serverParoxyUrl.replace("{token}", fwKey) + url + "?";

+ 7 - 1
onemap-modules/onemap-apply/src/main/resources/mapper/postgresql/zymlapplication/TZymlApplicationRecordMapper.xml

@@ -30,10 +30,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="state"    column="state"    />
         <result property="sqRevokeTime"    column="sq_revoke_time"    />
         <result property="sqRevokeReason"    column="sq_revoke_reason"    />
+        <result property="fwKey"    column="fw_key"    />
     </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
+        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,fw_key,sq_revoke_reason,sq_revoke_time
+        from t_zyml_application_record
     </sql>
 
     <select id="selectTZymlApplicationRecordList" parameterType="TZymlApplicationRecord" resultMap="TZymlApplicationRecordResult">
@@ -60,6 +64,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <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>
+            <if test="fwKey != null "> and fw_key = #{fwKey}</if>
         </where>
     </select>
 
@@ -147,6 +152,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="sqRevokeTime != null">sq_revoke_time = #{sqRevokeTime},</if>
             <if test="sqRevokeReason != null  and sqRevokeReason != '' ">sq_revoke_reason = #{sqRevokeReason},</if>
             <if test="zymlUrl != null  and zymlUrl != '' ">zyml_url = #{zymlUrl},</if>
+            <if test="fwKey != null ">fw_key = #{fwKey,}</if>
         </trim>
         where id = #{id}
     </update>