Lin Qilong 5 napja
szülő
commit
2975463bca

+ 16 - 4
gw-admin/src/main/java/com/goldenwater/web/controller/hzz/EventClearController.java

@@ -1,15 +1,27 @@
 package com.goldenwater.web.controller.hzz;
+
 import com.goldenwater.common.core.controller.BaseController;
 import com.goldenwater.common.core.page.TableDataInfo;
+import com.goldenwater.hzz.domain.EventDTO;
 import com.goldenwater.hzz.service.EventClearService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
-import java.util.*;
+
+import java.util.Map;
 
 @RestController
 @RequestMapping("/hzz/eventclear")
 public class EventClearController extends BaseController {
-    @Autowired private EventClearService service;
-    @GetMapping("/list") public TableDataInfo list(@RequestParam(required=false) String adCode, @RequestParam(required=false) String evType, @RequestParam(required=false) String keyWord, @RequestParam(required=false) String objectType, @RequestParam(defaultValue="1") int pageNum, @RequestParam(defaultValue="10") int pageSize) { return getDataTable(service.findListByAdCode(adCode,evType,keyWord,objectType,pageNum,pageSize)); }
-    @PostMapping("/search") public TableDataInfo search(@RequestBody Map<String,Object> params, @RequestParam(defaultValue="1") int pageNum, @RequestParam(defaultValue="10") int pageSize) { return getDataTable(service.findList(params,pageNum,pageSize)); }
+    @Autowired
+    private EventClearService service;
+
+    @GetMapping("/list")
+    public TableDataInfo list(@RequestParam(required = false) String adCode, @RequestParam(required = false) String evType, @RequestParam(required = false) String keyWord, @RequestParam(required = false) String objectType, @RequestParam(defaultValue = "1") int pageNum, @RequestParam(defaultValue = "10") int pageSize) {
+        return getDataTable(service.findListByAdCode(adCode, evType, keyWord, objectType, pageNum, pageSize));
+    }
+
+    @PostMapping("/search")
+    public TableDataInfo search(@RequestBody EventDTO params, @RequestParam(defaultValue = "1") int pageNum, @RequestParam(defaultValue = "10") int pageSize) {
+        return getDataTable(service.findList(params, pageNum, pageSize));
+    }
 }

+ 26 - 6
gw-admin/src/main/java/com/goldenwater/web/controller/hzz/HzzWpsController.java

@@ -1,18 +1,38 @@
 package com.goldenwater.web.controller.hzz;
+
 import com.goldenwater.common.core.controller.BaseController;
 import com.goldenwater.common.core.domain.AjaxResult;
 import com.goldenwater.common.core.page.TableDataInfo;
+import com.goldenwater.hzz.domain.WpsDTO;
 import com.goldenwater.hzz.service.HzzWpsService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
-import java.util.*;
+
+import java.util.Map;
 
 @RestController
 @RequestMapping("/hzz/wps")
 public class HzzWpsController extends BaseController {
-    @Autowired private HzzWpsService service;
-    @GetMapping("/list") public TableDataInfo list(@RequestParam(required=false) String projectName, @RequestParam(required=false) String startDate, @RequestParam(required=false) String endDate, @RequestParam(defaultValue="1") int pageNum, @RequestParam(defaultValue="10") int pageSize) { return getDataTable(service.querySupervision(projectName,startDate,endDate,pageNum,pageSize)); }
-    @PostMapping public AjaxResult add(@RequestBody Map<String,Object> p) { return toAjax(service.insertShxmDc(p)); }
-    @PutMapping public AjaxResult edit(@RequestBody Map<String,Object> p) { return toAjax(service.updateShxmDc(p)); }
-    @DeleteMapping("/{guid}") public AjaxResult del(@PathVariable String guid) { return toAjax(service.deleteShxmDc(guid)); }
+    @Autowired
+    private HzzWpsService service;
+
+    @GetMapping("/list")
+    public TableDataInfo list(@RequestParam(required = false) String projectName, @RequestParam(required = false) String startDate, @RequestParam(required = false) String endDate, @RequestParam(defaultValue = "1") int pageNum, @RequestParam(defaultValue = "10") int pageSize) {
+        return getDataTable(service.querySupervision(projectName, startDate, endDate, pageNum, pageSize));
+    }
+
+    @PostMapping
+    public AjaxResult add(@RequestBody WpsDTO p) {
+        return toAjax(service.insertShxmDc(p));
+    }
+
+    @PutMapping
+    public AjaxResult edit(@RequestBody WpsDTO p) {
+        return toAjax(service.updateShxmDc(p));
+    }
+
+    @DeleteMapping("/{guid}")
+    public AjaxResult del(@PathVariable String guid) {
+        return toAjax(service.deleteShxmDc(guid));
+    }
 }

+ 3 - 2
gw-admin/src/main/java/com/goldenwater/web/controller/hzz/RiverProjectController.java

@@ -2,6 +2,7 @@ package com.goldenwater.web.controller.hzz;
 import com.goldenwater.common.core.controller.BaseController;
 import com.goldenwater.common.core.domain.AjaxResult;
 import com.goldenwater.common.core.page.TableDataInfo;
+import com.goldenwater.hzz.domain.RiverProjectDTO;
 import com.goldenwater.hzz.service.RiverProjectService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
@@ -15,7 +16,7 @@ public class RiverProjectController extends BaseController {
     @GetMapping("/all") public AjaxResult all(@RequestParam(required=false) String searchName) { return success(service.getShxmAll(searchName)); }
     @GetMapping("/detail/{guid}") public AjaxResult detail(@PathVariable String guid) { return success(service.getShxmById(guid)); }
     @GetMapping("/files/{guid}") public AjaxResult files(@PathVariable String guid) { return success(service.getFilesById(guid)); }
-    @PostMapping public AjaxResult add(@RequestBody Map<String,Object> p) { return toAjax(service.saveShxm(p)); }
-    @PutMapping public AjaxResult edit(@RequestBody Map<String,Object> p) { return toAjax(service.editShxm(p)); }
+    @PostMapping public AjaxResult add(@RequestBody RiverProjectDTO p) { return toAjax(service.saveShxm(p)); }
+    @PutMapping public AjaxResult edit(@RequestBody RiverProjectDTO p) { return toAjax(service.editShxm(p)); }
     @DeleteMapping("/{guid}") public AjaxResult del(@PathVariable String guid) { return toAjax(service.deleteShxm(guid)); }
 }

+ 6 - 4
gw-admin/src/main/java/com/goldenwater/web/controller/hzz/RuleController.java

@@ -2,6 +2,8 @@ package com.goldenwater.web.controller.hzz;
 import com.goldenwater.common.core.controller.BaseController;
 import com.goldenwater.common.core.domain.AjaxResult;
 import com.goldenwater.common.core.page.TableDataInfo;
+import com.goldenwater.hzz.domain.ArticleDTO;
+import com.goldenwater.hzz.domain.FileWsnDTO;
 import com.goldenwater.hzz.service.RuleService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
@@ -13,12 +15,12 @@ public class RuleController extends BaseController {
     @Autowired private RuleService service;
     @GetMapping("/list") public AjaxResult list(@RequestParam(defaultValue="") String adCode, @RequestParam(required=false) String ruleType) { return success(service.getRuleMessage(adCode,ruleType)); }
     @GetMapping("/file/list") public TableDataInfo fileList(@RequestParam(defaultValue="") String types, @RequestParam(required=false) String fileName, @RequestParam(required=false) String fileType, @RequestParam(required=false) String startTime, @RequestParam(required=false) String endTime, @RequestParam(defaultValue="1") int pageNum, @RequestParam(defaultValue="10") int pageSize) { return getDataTable(service.getWsnList(types,fileName,fileType,startTime,endTime,pageNum,pageSize)); }
-    @PostMapping("/file") public AjaxResult addFile(@RequestBody Map<String,Object> p) { return toAjax(service.insertWsn(p)); }
-    @PutMapping("/file") public AjaxResult editFile(@RequestBody Map<String,Object> p) { return toAjax(service.updateWsn(p)); }
+    @PostMapping("/file") public AjaxResult addFile(@RequestBody FileWsnDTO p) { return toAjax(service.insertWsn(p)); }
+    @PutMapping("/file") public AjaxResult editFile(@RequestBody FileWsnDTO p) { return toAjax(service.updateWsn(p)); }
     @DeleteMapping("/file/{guid}") public AjaxResult delFile(@PathVariable String guid) { return toAjax(service.deleteWsn(guid)); }
     @GetMapping("/article/list") public TableDataInfo articleList(@RequestParam(required=false) String title, @RequestParam(required=false) String type, @RequestParam(required=false) String startTime, @RequestParam(required=false) String endTime, @RequestParam(defaultValue="1") int pageNum, @RequestParam(defaultValue="10") int pageSize) { return getDataTable(service.getArticleList(title,type,startTime,endTime,pageNum,pageSize)); }
     @GetMapping("/article/top5") public AjaxResult articleTop5(@RequestParam(defaultValue="0") String type) { return success(service.getArticleTop5(type)); }
-    @PostMapping("/article") public AjaxResult addArticle(@RequestBody Map<String,Object> p) { return toAjax(service.addArticle(p)); }
-    @PutMapping("/article") public AjaxResult editArticle(@RequestBody Map<String,Object> p) { return toAjax(service.updateArticle(p)); }
+    @PostMapping("/article") public AjaxResult addArticle(@RequestBody ArticleDTO p) { return toAjax(service.addArticle(p)); }
+    @PutMapping("/article") public AjaxResult editArticle(@RequestBody ArticleDTO p) { return toAjax(service.updateArticle(p)); }
     @DeleteMapping("/article/{guid}") public AjaxResult delArticle(@PathVariable String guid) { return toAjax(service.deleteArticle(guid)); }
 }

+ 5 - 0
gw-hzz/pom.xml

@@ -22,6 +22,11 @@
             <groupId>com.goldenwater</groupId>
             <artifactId>gw-framework</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+            <scope>provided</scope>
+        </dependency>
 
     </dependencies>
 

+ 9 - 7
gw-hzz/src/main/java/com/goldenwater/hzz/domain/AdInfoDTO.java

@@ -1,16 +1,18 @@
 package com.goldenwater.hzz.domain;
 
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
 import java.io.Serializable;
 
-/** ATT_AD_BASE 行政区划 */
+/**
+ * ATT_AD_BASE 行政区划
+ */
+@NoArgsConstructor
+@Data
 public class AdInfoDTO implements Serializable {
     private String adCode;
     private String adName;
     private String adGrad;
-    private String parentAdCode;
-
-    public String getAdCode() { return adCode; } public void setAdCode(String v) { adCode = v; }
-    public String getAdName() { return adName; } public void setAdName(String v) { adName = v; }
-    public String getAdGrad() { return adGrad; } public void setAdGrad(String v) { adGrad = v; }
-    public String getParentAdCode() { return parentAdCode; } public void setParentAdCode(String v) { parentAdCode = v; }
+    private String upAdCode;
 }

+ 1 - 4
gw-ui/src/api/hzz/rule.js

@@ -18,10 +18,7 @@ function convertToCamelCase(data) {
 
 // ==================== 制度规则 ====================
 export function listRule(adCode, ruleType) {
-  return request({ url: '/hzz/rule/list', method: 'get', params: { adCode, ruleType } }).then(res => {
-    res.data = convertToCamelCase(res.data)
-    return res
-  })
+  return request({ url: '/hzz/rule/list', method: 'get', params: { adCode, ruleType } })
 }
 
 // ==================== 制度文件 ====================

+ 5 - 5
gw-ui/src/views/hlgl/gzfa/index.vue

@@ -75,7 +75,7 @@
     </div>
 
     <!-- 文件详情弹窗 -->
-    <el-dialog v-model="detailVisible" :title="detailItem?.wpName" width="700px">
+    <el-dialog v-model="detailVisible" :title="detailItem?.fileName || detailItem?.wpName || detailItem?.sysName" width="700px">
       <iframe-view :url="detailItem?.url" style="height: 79vh;"></iframe-view>
     </el-dialog>
   </div>
@@ -145,7 +145,7 @@ const loadTree = async () => {
   const res = await getChildren('000000000000')
   treeData.value = (res.data || []).map(item => ({
     ...item,
-    adName: item.AD_NAME, adCode: item.AD_CODE
+    adName: item.adName, adCode: item.adCode
   }))
 }
 
@@ -159,9 +159,9 @@ const loadTreeNode = async (node, resolve) => {
     const res = await getChildren(node.data.adCode)
     const children = (res.data || []).map(item => ({
       ...item,
-      adName: item.AD_NAME,
-      adCode: item.AD_CODE,
-      leaf: item.AD_GRAD >= '5' // 村级为叶子节点
+      adName: item.adName,
+      adCode: item.adCode,
+      leaf: item.adGrad >= '5' // 村级为叶子节点
     }))
     resolve(children)
   } catch {

+ 2 - 2
gw-ui/src/views/hlgl/riverproject/index.vue

@@ -22,8 +22,8 @@
 
     <el-table v-loading="loading" :data="projectList" border>
       <el-table-column label="序号" type="index" width="55" align="center" />
-      <el-table-column label="项目名称" prop="S_PROJECT_NAME" :show-overflow-tooltip="true" min-width="180" />
-      <el-table-column label="建设单位" prop="S_DEPT" :show-overflow-tooltip="true" width="160" />
+      <el-table-column label="项目名称" prop="sProjectName" :show-overflow-tooltip="true" min-width="180" />
+      <el-table-column label="建设单位" prop="sDept" :show-overflow-tooltip="true" width="160" />
       <el-table-column label="法人代表" prop="projectLegalPerson" width="120" />
       <el-table-column label="联系人" prop="S_LINKMAN" width="100" />
       <el-table-column label="联系电话" prop="S_PHONE" width="130" />