diff --git a/src/main/java/com/cm/population/controller/api/residential/ResidentialController.java b/src/main/java/com/cm/population/controller/api/residential/ResidentialController.java index 778fea4..9205d40 100644 --- a/src/main/java/com/cm/population/controller/api/residential/ResidentialController.java +++ b/src/main/java/com/cm/population/controller/api/residential/ResidentialController.java @@ -160,7 +160,7 @@ public class ResidentialController extends AbstractController { ClientTokenBO token = ClientTokenManager.getInstance().getClientToken(); String url = projectProperties.getAreaUrl(); - url += "resource/dict/listcommunity?areaId=" + params.get("areaId"); + url += "/resource/dict/listcommunity?areaId=" + params.get("areaId"); UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(url) .queryParam("access_token", token.getAccessToken()); diff --git a/src/main/java/com/cm/population/controller/route/house/HouseRouteController.java b/src/main/java/com/cm/population/controller/route/house/HouseRouteController.java index 8e6fc39..1f73556 100644 --- a/src/main/java/com/cm/population/controller/route/house/HouseRouteController.java +++ b/src/main/java/com/cm/population/controller/route/house/HouseRouteController.java @@ -40,9 +40,9 @@ public class HouseRouteController extends AbstractController { return new ModelAndView("house/list-popu"); } - @GetMapping("find-house") - public ModelAndView findHouse() { - return new ModelAndView("house/find-house"); + @GetMapping("list-check") + public ModelAndView listCheck() { + return new ModelAndView("house/list-check"); } } \ No newline at end of file diff --git a/src/main/java/com/cm/population/controller/route/population/PopulationRouteController.java b/src/main/java/com/cm/population/controller/route/population/PopulationRouteController.java index 3250d22..63d018c 100644 --- a/src/main/java/com/cm/population/controller/route/population/PopulationRouteController.java +++ b/src/main/java/com/cm/population/controller/route/population/PopulationRouteController.java @@ -35,4 +35,13 @@ public class PopulationRouteController extends AbstractController { return new ModelAndView("population/list"); } + @GetMapping("find-house") + public ModelAndView findHouse() { + return new ModelAndView("population/find-house"); + } + + @GetMapping("find-popu") + public ModelAndView findPopu() { + return new ModelAndView("population/find-popu"); + } } \ No newline at end of file diff --git a/src/main/resources/mybatis/mapper/residential/residential-mapper.xml b/src/main/resources/mybatis/mapper/residential/residential-mapper.xml index e2e374f..da78f6c 100644 --- a/src/main/resources/mybatis/mapper/residential/residential-mapper.xml +++ b/src/main/resources/mybatis/mapper/residential/residential-mapper.xml @@ -286,10 +286,24 @@ t1.is_delete = 0 AND ( - - t1.id LIKE CONCAT('%', #{keywords}, '%') + t1.name LIKE CONCAT('%', #{keywords}, '%') ) + + AND t1.name LIKE CONCAT('%', #{name}, '%') + + + AND t1.street = #{street} + + + AND t1.street_name LIKE CONCAT('%', #{streetName}, '%') + + + AND t1.community = #{community} + + + AND t1.community_name LIKE CONCAT('%', #{communityName}, '%') + AND LEFT(t1.gmt_create, 10) = ]]> #{startTime} diff --git a/src/main/resources/templates/building/save.html b/src/main/resources/templates/building/save.html index 4694c92..a02fa27 100644 --- a/src/main/resources/templates/building/save.html +++ b/src/main/resources/templates/building/save.html @@ -163,19 +163,29 @@ var laydate = layui.laydate; var viewerObj = {}; - // 小区名称change事件 form.on('select(street)', function(data){ if(data.value) { initCommunityNameSelect(data.value); + initResidentialNameSelect(data.value, ''); }else { initCommunityNameSelect('9999'); + initResidentialNameSelect('', ''); + } + }); + + // 社区change事件 + form.on('select(community)', function(data){ + var streetValue = $("#street").val(); + if(data.value) { + initResidentialNameSelect(streetValue, data.value); + }else { + initResidentialNameSelect(streetValue, ''); } }); // 初始化社区下拉选择 function initCommunityNameSelect(areaId) { top.restAjax.get(top.restAjax.path('api/residential/getCommunityList?areaId=' + areaId, []), {}, null, function(code, data, args) { - console.log(data) laytpl(document.getElementById('communityNameSelectTemplate').innerHTML).render(data, function(html) { document.getElementById('communityNameSelectTemplateBox').innerHTML = html; }); @@ -218,11 +228,11 @@ }) // 初始化小区名称下拉选择 - initResidentialNameSelect(); + initResidentialNameSelect('9999', '9999'); - function initResidentialNameSelect() { - top.restAjax.get(top.restAjax.path('api/residential/list', []), {}, null, function(code, data, args) { - console.log(data) + function initResidentialNameSelect(street, community) { + top.restAjax.get(top.restAjax.path('api/residential/list?street={street}&community={community}', + [street, community]), {}, null, function(code, data, args) { laytpl(document.getElementById('residentialNameSelectTemplate').innerHTML).render(data, function(html) { document.getElementById('residentialNameSelectTemplateBox').innerHTML = html; }); diff --git a/src/main/resources/templates/building/update.html b/src/main/resources/templates/building/update.html index ca661b6..d558e49 100644 --- a/src/main/resources/templates/building/update.html +++ b/src/main/resources/templates/building/update.html @@ -165,12 +165,23 @@ var viewerObj = {}; - // 小区名称change事件 form.on('select(street)', function(data){ if(data.value) { initCommunityNameSelect(data.value); + initResidentialNameSelect(data.value, ''); }else { initCommunityNameSelect('9999'); + initResidentialNameSelect('', ''); + } + }); + + // 社区change事件 + form.on('select(community)', function(data){ + var streetValue = $("#street").val(); + if(data.value) { + initResidentialNameSelect(streetValue, data.value); + }else { + initResidentialNameSelect(streetValue, ''); } }); @@ -225,8 +236,9 @@ }) // 初始化小区名称下拉选择 - function initResidentialNameSelect(selectValue) { - top.restAjax.get(top.restAjax.path('api/residential/list', []), {}, null, function(code, data, args) { + function initResidentialNameSelect(street, community, selectValue) { + top.restAjax.get(top.restAjax.path('api/residential/list?street={street}&community={community}', + [street, community]), {}, null, function(code, data, args) { laytpl(document.getElementById('residentialNameSelectTemplate').innerHTML).render(data, function(html) { document.getElementById('residentialNameSelectTemplateBox').innerHTML = html; }); @@ -344,7 +356,7 @@ form.val('dataForm', dataFormData); form.render(null, 'dataForm'); initImageUploadFile(); - initResidentialNameSelect(data['residentialId']); + initResidentialNameSelect(data['street'], data['community'], data['residentialId']); initStreetNameSelect(data['street']); initCommunityNameSelect(data['street'], data['community']); }, function(code, data) { diff --git a/src/main/resources/templates/house/list-check.html b/src/main/resources/templates/house/list-check.html new file mode 100644 index 0000000..be41606 --- /dev/null +++ b/src/main/resources/templates/house/list-check.html @@ -0,0 +1,527 @@ + + + + + + + + + + + + + +
+
+
+
+
+
+
+ +
+ 新增时间 +
+ +
+
+ +
+ +
+
+ + +
+
+
+
+
+ + + + + \ No newline at end of file diff --git a/src/main/resources/templates/house/save.html b/src/main/resources/templates/house/save.html index aadb284..b3b0999 100644 --- a/src/main/resources/templates/house/save.html +++ b/src/main/resources/templates/house/save.html @@ -392,12 +392,23 @@ var laytpl = layui.laytpl; var laydate = layui.laydate; - // 小区名称change事件 form.on('select(street)', function(data){ if(data.value) { initCommunityNameSelect(data.value); + initResidentialNameSelect(data.value, ''); }else { initCommunityNameSelect('9999'); + initResidentialNameSelect('', ''); + } + }); + + // 社区change事件 + form.on('select(community)', function(data){ + var streetValue = $("#street").val(); + if(data.value) { + initResidentialNameSelect(streetValue, data.value); + }else { + initResidentialNameSelect(streetValue, ''); } }); @@ -491,9 +502,10 @@ } // 初始化所在小区下拉选择 - initResidentialNameSelect(); - function initResidentialNameSelect() { - top.restAjax.get(top.restAjax.path('api/residential/list', []), {}, null, function(code, data, args) { + initResidentialNameSelect('9999', '9999'); + function initResidentialNameSelect(street, community) { + top.restAjax.get(top.restAjax.path('api/residential/list?street={street}&community={community}', + [street, community]), {}, null, function(code, data, args) { laytpl(document.getElementById('residentialNameSelectTemplate').innerHTML).render(data, function(html) { document.getElementById('residentialNameSelectTemplateBox').innerHTML = html; }); diff --git a/src/main/resources/templates/house/update.html b/src/main/resources/templates/house/update.html index 96f89ec..384a9e9 100644 --- a/src/main/resources/templates/house/update.html +++ b/src/main/resources/templates/house/update.html @@ -393,12 +393,23 @@ var laydate = layui.laydate; var houseId = top.restAjax.params(window.location.href).houseId; - // 小区名称change事件 form.on('select(street)', function(data){ if(data.value) { initCommunityNameSelect(data.value); + initResidentialNameSelect(data.value, ''); }else { initCommunityNameSelect('9999'); + initResidentialNameSelect('', ''); + } + }); + + // 社区change事件 + form.on('select(community)', function(data){ + var streetValue = $("#street").val(); + if(data.value) { + initResidentialNameSelect(streetValue, data.value); + }else { + initResidentialNameSelect(streetValue, ''); } }); @@ -507,8 +518,9 @@ } // 初始化所在小区下拉选择 - function initResidentialNameSelect(selectValue) { - top.restAjax.get(top.restAjax.path('api/residential/list', []), {}, null, function(code, data, args) { + function initResidentialNameSelect(street, community, selectValue) { + top.restAjax.get(top.restAjax.path('api/residential/list?street={street}&community={community}', + [street, community]), {}, null, function(code, data, args) { laytpl(document.getElementById('residentialNameSelectTemplate').innerHTML).render(data, function(html) { document.getElementById('residentialNameSelectTemplateBox').innerHTML = html; }); @@ -737,7 +749,7 @@ form.render(null, 'dataForm'); // 初始化下拉框数据 - initResidentialNameSelect(data['residentialId']); + initResidentialNameSelect(data['street'], data['community'], data['residentialId']); var buildingValue = data['buildingId'] + '_' + data['unitNum'] + '_' + data['floorsNum']; initBuildingNameSelect(data['residentialId'], buildingValue); initCategoryNameSelect(data['categoryId']); diff --git a/src/main/resources/templates/house/find-house.html b/src/main/resources/templates/population/find-house.html similarity index 100% rename from src/main/resources/templates/house/find-house.html rename to src/main/resources/templates/population/find-house.html diff --git a/src/main/resources/templates/population/find-popu.html b/src/main/resources/templates/population/find-popu.html new file mode 100644 index 0000000..cee85b9 --- /dev/null +++ b/src/main/resources/templates/population/find-popu.html @@ -0,0 +1,292 @@ + + + + + + + + + + + + + +
+
+
+
+ +
+
以房找人
+
+
+ + +
+ +
+
+ + +
+ +
+
+ + +
+ +
+
+
+
+ + +
+ +
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+ +
+ + +
+
+
+ +
+ + +
+
+
+
+ +
+
+ +
+
+
+
+
+
+ + + + \ No newline at end of file