From b500fcb5f25d0f1f0e31304fd1fa340e84360f3a Mon Sep 17 00:00:00 2001
From: huanghongfa <huanghongfa123456>
Date: 星期六, 22 五月 2021 10:56:41 +0800
Subject: [PATCH] 实有人口优化
---
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComMngVillageApi.java | 41 ++++++++++++++++++++++++++++++-----------
1 files changed, 30 insertions(+), 11 deletions(-)
diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComMngVillageApi.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComMngVillageApi.java
index 1800518..4721989 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComMngVillageApi.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComMngVillageApi.java
@@ -1,18 +1,13 @@
package com.panzhihua.service_community.api;
import com.panzhihua.common.model.dtos.community.PageComMngVillageDTO;
-import com.panzhihua.common.model.dtos.community.PageComStreetDTO;
import com.panzhihua.common.model.vos.R;
+import com.panzhihua.common.model.vos.community.ComMngVillageServeExcelVO;
import com.panzhihua.common.model.vos.community.ComMngVillageVO;
-import com.panzhihua.common.model.vos.community.ComStreetVO;
import com.panzhihua.service_community.service.ComMngVillageService;
-import com.panzhihua.service_community.service.ComStreetService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.transaction.annotation.Transactional;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.validation.Valid;
@@ -37,7 +32,7 @@
@PostMapping("addvillage")
@Transactional(rollbackFor = Exception.class)
public R addVillage(@Valid @RequestBody ComMngVillageVO comMngVillageVO) {
- R r = comMngVillageService.addComMngVillage(comMngVillageVO);
+ R r = comMngVillageService.addComActVillage(comMngVillageVO);
return R.ok(r);
}
@@ -48,7 +43,7 @@
*/
@PostMapping("pagevillage")
public R pageVillage(@RequestBody PageComMngVillageDTO pageComMngVillageDTO) {
- R r = comMngVillageService.pageComMngVillage(pageComMngVillageDTO);
+ R r = comMngVillageService.pageComActVillage(pageComMngVillageDTO);
return R.ok(r);
}
@@ -59,7 +54,7 @@
*/
@PostMapping("listvillage")
public R listVillage(@RequestBody ComMngVillageVO comMngVillageVO) {
- R r = comMngVillageService.listComMngVillage(comMngVillageVO);
+ R r = comMngVillageService.listComActVillage(comMngVillageVO);
return R.ok(r);
}
@@ -71,8 +66,32 @@
@PostMapping("deletevillage")
@Transactional(rollbackFor = Exception.class)
public R delectVillage(@RequestBody List<Long> Ids) {
- R r = comMngVillageService.delecComMngVillage(Ids);
+ R r = comMngVillageService.delecComActVillage(Ids);
return R.ok(r);
}
+
+ /**
+ * 社区后台导入实有房屋
+ * @param list 数据
+ * @param communityId 社区编号
+ * @return
+ */
+ @PostMapping("/village/import")
+ @Transactional(rollbackFor = Exception.class)
+ public R listSaveMngCarExcelVO(@RequestBody List<ComMngVillageServeExcelVO> list, @RequestParam(value = "communityId") Long communityId){
+ return comMngVillageService.listSaveVillage(list,communityId);
+ }
+
+
+ /**
+ * 编辑实有房屋
+ * @param villageId 动态id
+ * @return 删除结果
+ */
+ @PostMapping("editvillage/{villageId}")
+ @Transactional(rollbackFor = Exception.class)
+ public R editvillage(@PathVariable("villageId")Long villageId,@Valid @RequestBody ComMngVillageVO comMngVillageVO) {
+ return comMngVillageService.editVillage(villageId,comMngVillageVO);
+ }
}
--
Gitblit v1.7.1