wangjinsheng пре 3 година
родитељ
комит
4319dce94c

+ 24 - 2
mybusiness/src/main/java/com/sooka/system/controller/TGuijiNaturalresourcesQlrjbxxController.java

@@ -1,7 +1,6 @@
 package com.sooka.system.controller;
 
 import java.util.List;
-
 import com.sooka.common.annotation.Log;
 import com.sooka.common.core.controller.BaseController;
 import com.sooka.common.core.domain.AjaxResult;
@@ -34,9 +33,19 @@ public class TGuijiNaturalresourcesQlrjbxxController extends BaseController {
     @Autowired
     private ITGuijiNaturalresourcesQlrjbxxService tGuijiNaturalresourcesQlrjbxxService;
 
+     //个人
     @RequiresPermissions("system:grjbxx:view")
     @GetMapping()
-    public String grjbxx() {
+    public String grjbxx(ModelMap map) {
+        map.put("flag","gr");
+        return prefix + "/grjbxx";
+    }
+
+    //企业
+    @RequiresPermissions("system:grjbxx:view")
+    @GetMapping("/qyjbxx")
+    public String qyjbxx(ModelMap map) {
+        map.put("flag","qy");
         return prefix + "/grjbxx";
     }
 
@@ -54,6 +63,19 @@ public class TGuijiNaturalresourcesQlrjbxxController extends BaseController {
     }
 
     /**
+     * 查询企业基本信息列表
+     */
+    @RequiresPermissions("system:grjbxx:list")
+    @PostMapping("/qyList")
+    @ResponseBody
+    public TableDataInfo qyList(TGuijiNaturalresourcesQlrjbxx tGuijiNaturalresourcesQlrjbxx) {
+        startPage();
+        tGuijiNaturalresourcesQlrjbxx.setQlrxz("企业");
+        List<TGuijiNaturalresourcesQlrjbxx> list = tGuijiNaturalresourcesQlrjbxxService.selectTGuijiNaturalresourcesQlrjbxxList(tGuijiNaturalresourcesQlrjbxx);
+        return getDataTable(list);
+    }
+
+    /**
      * 导出个人基本信息列表
      */
     @RequiresPermissions("system:grjbxx:export")

+ 10 - 2
mybusiness/src/main/resources/templates/system/grjbxx/grjbxx.html

@@ -8,6 +8,7 @@
         <div class="row">
             <div class="col-sm-12 search-collapse">
                 <form id="formId">
+                    <input type="hidden" th:value="${flag}"/>
                     <div class="select-list">
                         <ul>
                             <li>
@@ -46,10 +47,17 @@
         var editFlag = [[${@permission.hasPermi('system:grjbxx:edit')}]];
         var removeFlag = [[${@permission.hasPermi('system:grjbxx:remove')}]];
         var prefix = ctx + "system/grjbxx";
-
+        var flag = [[${flag}]];
+        var urlV;
+        if(flag=="gr"){
+            urlV = prefix + "/list";
+        }
+        if(flag=="qy"){
+            urlV = prefix + "/qyList";
+        }
         $(function() {
             var options = {
-                url: prefix + "/list",
+                url: urlV,
                 createUrl: prefix + "/add",
                 updateUrl: prefix + "/edit/{id}",
                 removeUrl: prefix + "/remove",