From 362307dc2e3a1da09012df0e57b9db9b6b2176b2 Mon Sep 17 00:00:00 2001 From: Renpc-kilig <308442850@qq.com> Date: Tue, 21 Nov 2023 09:19:33 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E6=88=BF=E5=B1=8B?= =?UTF-8?q?=E7=BC=96=E5=8F=B7=E4=B8=BA=E6=95=B0=E5=AD=97=E6=A3=80=E6=9F=A5?= =?UTF-8?q?=20=20--renpc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/cm/population/pojo/vos/house/HouseVO.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/com/cm/population/pojo/vos/house/HouseVO.java b/src/main/java/com/cm/population/pojo/vos/house/HouseVO.java index 6a7631d..aeda2f4 100644 --- a/src/main/java/com/cm/population/pojo/vos/house/HouseVO.java +++ b/src/main/java/com/cm/population/pojo/vos/house/HouseVO.java @@ -37,7 +37,6 @@ public class HouseVO { @CheckNumberAnnotation(name = "所在层/院") private String affiliationFloors; @ApiModelProperty(name = "houseNum", value = "门牌号") - @CheckNumberAnnotation(name = "门牌号") private String houseNum; @ApiModelProperty(name = "categoryId", value = "房屋类别") private String categoryId; From b1351e91a003c2165f18a858806da55db8e4e8cc Mon Sep 17 00:00:00 2001 From: Renpc-kilig <308442850@qq.com> Date: Tue, 21 Nov 2023 12:01:54 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E6=88=BF=E5=B1=8B?= =?UTF-8?q?=E7=BC=96=E5=8F=B7=E4=B8=BA=E6=95=B0=E5=AD=97=E6=A3=80=E6=9F=A5?= =?UTF-8?q?=20=20--renpc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../population/PopulationAppController.java | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/src/main/java/com/cm/population/controller/app/api/population/PopulationAppController.java b/src/main/java/com/cm/population/controller/app/api/population/PopulationAppController.java index 018f296..53fb774 100644 --- a/src/main/java/com/cm/population/controller/app/api/population/PopulationAppController.java +++ b/src/main/java/com/cm/population/controller/app/api/population/PopulationAppController.java @@ -15,6 +15,7 @@ import io.swagger.annotations.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; +import javax.mail.search.SearchException; import java.util.Arrays; import java.util.List; import java.util.Map; @@ -118,4 +119,47 @@ public class PopulationAppController extends AbstractController { return new SuccessResultData<>(populationService.count(params)); } + @ApiOperation(value = "以人找房", notes = "以人找房接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "token", value = "token", paramType = "header"), + @ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "int", defaultValue = "1"), + @ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "int", defaultValue = "20"), + @ApiImplicitParam(name = "keywords", value = "身份证号/手机号/姓名", paramType = "query", dataType = "String") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("findHouse") + public SuccessResultList> findHouse(@RequestHeader("token") String token, ListPage page) { + Map params = requestParams(); + if(null == params.get("keywords")) { + try { + throw new SearchException("身份证号/手机号/姓名不能为空"); + } catch (SearchException e) { + e.printStackTrace(); + } + } + page.setParams(params); + return populationService.findHouse(page); + } + + @ApiOperation(value = "以房找人", notes = "以房找人接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "token", value = "token", paramType = "header"), + @ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "int", defaultValue = "1"), + @ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "int", defaultValue = "20"), + @ApiImplicitParam(name = "street", value = "街道ID", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "community", value = "社区ID", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "residentialId", value = "小区ID", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "buildingId", value = "楼宇ID", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "affiliationUnit", value = "所在单元", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "affiliationFloors", value = "所在楼层", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "houseNum", value = "房屋编号", paramType = "query", dataType = "String") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("findPopulation") + public SuccessResultList> findPopulation(@RequestHeader("token") String token, ListPage page) { + Map params = requestParams(); + page.setParams(params); + return populationService.findPopulation(page); + } + } \ No newline at end of file From 3406e224ad1d0c94a4aa7c494c314cf747cbf1af Mon Sep 17 00:00:00 2001 From: TS-QD1 Date: Tue, 21 Nov 2023 12:01:58 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E9=97=A8=E7=89=8C=E5=8F=B7=E7=A9=BA?= =?UTF-8?q?=E6=A0=A1=E9=AA=8C=EF=BC=8C=E4=BF=AE=E6=94=B9=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cm/population/pojo/vos/house/HouseVO.java | 2 + .../templates/house/list-summary.html | 59 ++++++++++++------- 2 files changed, 40 insertions(+), 21 deletions(-) diff --git a/src/main/java/com/cm/population/pojo/vos/house/HouseVO.java b/src/main/java/com/cm/population/pojo/vos/house/HouseVO.java index aeda2f4..6a28045 100644 --- a/src/main/java/com/cm/population/pojo/vos/house/HouseVO.java +++ b/src/main/java/com/cm/population/pojo/vos/house/HouseVO.java @@ -1,5 +1,6 @@ package com.cm.population.pojo.vos.house; +import com.cm.common.annotation.CheckEmptyAnnotation; import com.cm.common.annotation.CheckNumberAnnotation; import com.cm.population.pojo.vos.population.PopulationVO; import io.swagger.annotations.ApiModel; @@ -37,6 +38,7 @@ public class HouseVO { @CheckNumberAnnotation(name = "所在层/院") private String affiliationFloors; @ApiModelProperty(name = "houseNum", value = "门牌号") + @CheckEmptyAnnotation(name = "门牌号") private String houseNum; @ApiModelProperty(name = "categoryId", value = "房屋类别") private String categoryId; diff --git a/src/main/resources/templates/house/list-summary.html b/src/main/resources/templates/house/list-summary.html index 21bf784..3d6f13a 100644 --- a/src/main/resources/templates/house/list-summary.html +++ b/src/main/resources/templates/house/list-summary.html @@ -32,11 +32,14 @@ #contentBody .center .main {} #contentBody .center .main .floor {height: 100px; box-sizing: border-box; white-space: nowrap;} #contentBody .center .main .floor .unit {display: inline-block; box-sizing: border-box;} - #contentBody .center .main .floor .unit .house {width: 200px; height: 100px; border: 1px solid #e6e6e6; box-sizing: border-box; display: inline-block; font-size: 14px; cursor: pointer; text-align: center; line-height: 100px; user-select:none; transition: background-color .3s, font-weight .3s;} + #contentBody .center .main .floor .unit .house {width: 200px; height: 100px; border: 1px solid #e6e6e6; box-sizing: border-box; display: inline-block; font-size: 14px; cursor: pointer; text-align: center; user-select:none; transition: background-color .3s, font-weight .3s;} #contentBody .center .main .floor .unit .house:hover {font-weight: bold; background-color: #f2f2f2;} - #contentBody .center .main .floor .unit .house .info {display: flex; justify-content: center; align-items: center;} - #contentBody .center .main .floor .unit .house .info .name {} - #contentBody .center .main .floor .unit .house .info .option {display: none;} + #contentBody .center .main .floor .unit .house .info {display: flex; flex-direction: column; justify-content: space-between; align-items: center; height: 100%;} + #contentBody .center .main .floor .unit .house .info .name .num {margin-top: 15px} + #contentBody .center .main .floor .unit .house .info .name .time {scale: 0.8} + #contentBody .center .main .floor .unit .house .info .option {width: 100%;display: flex;justify-content: space-between;} + #contentBody .center .main .floor .unit .house .info .option .tips {padding: 0 5px; scale: 0.8;} + #contentBody .center .main .floor .unit .house .info .option .btns {padding: 0 5px;} @@ -249,6 +252,7 @@ var initBuilding = function() { selectedRelation.buildingId = ''; + var loadLayerIndex; top.restAjax.get(top.restAjax.path('api/building/listpage', []), { page: buildingPager.currentPage, rows: buildingPager.rows, @@ -263,7 +267,11 @@ renderBuilding(); }, function(code, data) { top.dialog.msg(data.msg); - }) + }, function() { + loadLayerIndex = top.dialog.msg('正在加载...', {icon: 16, time: 0, shade: 0.3}); + }, function() { + top.dialog.close(loadLayerIndex); + }); } var initHouse = function() { @@ -406,15 +414,24 @@ data.units[jndex].maxHouseCount = jtem.houses.length; } $.each(jtem.houses, function(kndex, ktem) { + var option = ktem.isCreator === 1 ? ` +
+
+ ${ktem.populationCount} +
+
+ + +
+
`: ''; houses += `
-
${ktem.name}
-
- 编辑 - | - 删除 +
+
${ktem.name}
+
${ktem.gmtCreate}
+ ${option}
`; @@ -444,7 +461,7 @@ }, function(code, data) { top.dialog.msg(data.msg); }, function() { - loadLayerIndex = top.dialog.msg(top.dataMessage.committing, {icon: 16, time: 0, shade: 0.3}); + loadLayerIndex = top.dialog.msg('正在加载...', {icon: 16, time: 0, shade: 0.3}); }, function() { top.dialog.close(loadLayerIndex); }); @@ -537,16 +554,16 @@ $left.css('top', `${50 - scroll.top}px`); $top.css('left', `${100 - scroll.left}px`); }); - $(document).on('mouseover', '#contentBody .center .main .floor .unit .house', function() { - var $this = $(this); - $this.find('.option').show(); - $this.find('.name').hide(); - }); - $(document).on('mouseout', '#contentBody .center .main .floor .unit .house', function() { - var $this = $(this); - $this.find('.option').hide(); - $this.find('.name').show(); - }); + // $(document).on('mouseover', '#contentBody .center .main .floor .unit .house', function() { + // var $this = $(this); + // $this.find('.option').show(); + // $this.find('.name').hide(); + // }); + // $(document).on('mouseout', '#contentBody .center .main .floor .unit .house', function() { + // var $this = $(this); + // $this.find('.option').hide(); + // $this.find('.name').show(); + // }); $(document).on('click', '#contentBody .center .main .floor .unit .house .info .option .house-edit', function() { var houseId = this.dataset.id; layer.open({