From 11f80c4e6d843bc7595592f33bbc93fec37944d6 Mon Sep 17 00:00:00 2001 From: Renpc-kilig <308442850@qq.com> Date: Thu, 16 Nov 2023 18:21:55 +0800 Subject: [PATCH 1/3] =?UTF-8?q?excel=E6=89=B9=E9=87=8F=E5=AF=BC=E5=85=A5?= =?UTF-8?q?=E3=80=81bug=E4=BF=AE=E6=94=B9=20=20--renpc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/residential/ResidentialController.java | 8 ++++++++ .../cm/population/dao/residential/IResidentialDao.java | 3 +++ .../cm/population/pojo/dtos/house/BatchHouseDTO.java | 10 ++++++++++ .../service/house/impl/HouseServiceImpl.java | 1 + .../service/population/impl/PopulationServiceImpl.java | 1 + .../service/residential/IResidentialService.java | 3 +++ .../residential/impl/ResidentialServiceImpl.java | 10 ++++++++++ .../mybatis/mapper/population/population-mapper.xml | 3 ++- .../mybatis/mapper/residential/residential-mapper.xml | 8 ++++++++ 9 files changed, 46 insertions(+), 1 deletion(-) 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 60f395b..eff8ace 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 @@ -203,11 +203,17 @@ public class ResidentialController extends AbstractController { params.put("streetName", data.getStreet()); params.put("communityName", data.getCommunity()); params.put("name", data.getResidential()); + + // 获取社区ID + String communityId = residentialService.getCommunityId(data.getCommunity()); + String streetId = residentialService.getStreetId(data.getStreet()); List residentialDTOList = residentialService.list(params); if(CollectionUtils.isEmpty(residentialDTOList)) { ResidentialVO residentialVO = new ResidentialVO(); residentialVO.setStreetName(data.getStreet()); residentialVO.setCommunityName(data.getCommunity()); + residentialVO.setCommunity(communityId); + residentialVO.setStreet(streetId); residentialVO.setName(data.getResidential()); residentialService.save(residentialVO); } @@ -220,6 +226,8 @@ public class ResidentialController extends AbstractController { buildingVO.setCommunityName(data.getCommunity()); buildingVO.setResidentialId(residentialDTOList1.get(0).getResidentialId()); buildingVO.setResidentialName(residentialDTOList1.get(0).getName()); + buildingVO.setCommunity(communityId); + buildingVO.setStreet(streetId); buildingVO.setName(data.getName()); buildingVO.setBuildNum(data.getBuildingNum()); buildingVO.setUnitNum(data.getUnit()); diff --git a/src/main/java/com/cm/population/dao/residential/IResidentialDao.java b/src/main/java/com/cm/population/dao/residential/IResidentialDao.java index 752916c..5d30eee 100644 --- a/src/main/java/com/cm/population/dao/residential/IResidentialDao.java +++ b/src/main/java/com/cm/population/dao/residential/IResidentialDao.java @@ -117,4 +117,7 @@ public interface IResidentialDao { */ Integer count(Map params) throws SearchException; + String getCommunityId(String community); + + String getStreetId(String street); } \ No newline at end of file diff --git a/src/main/java/com/cm/population/pojo/dtos/house/BatchHouseDTO.java b/src/main/java/com/cm/population/pojo/dtos/house/BatchHouseDTO.java index fa3ce94..f4671d2 100644 --- a/src/main/java/com/cm/population/pojo/dtos/house/BatchHouseDTO.java +++ b/src/main/java/com/cm/population/pojo/dtos/house/BatchHouseDTO.java @@ -100,6 +100,8 @@ public class BatchHouseDTO { private String houseId; @ApiModelProperty(name = "name", value = "房屋编号") private String name; + @ApiModelProperty(name = "gmtCreate", value = "创建时间") + private String gmtCreate; public String getHouseId() { return houseId; @@ -116,6 +118,14 @@ public class BatchHouseDTO { public void setName(String name) { this.name = name; } + + public String getGmtCreate() { + return gmtCreate; + } + + public void setGmtCreate(String gmtCreate) { + this.gmtCreate = gmtCreate; + } } } diff --git a/src/main/java/com/cm/population/service/house/impl/HouseServiceImpl.java b/src/main/java/com/cm/population/service/house/impl/HouseServiceImpl.java index 1433401..60d6793 100644 --- a/src/main/java/com/cm/population/service/house/impl/HouseServiceImpl.java +++ b/src/main/java/com/cm/population/service/house/impl/HouseServiceImpl.java @@ -293,6 +293,7 @@ public class HouseServiceImpl extends AbstractService implements IHouseService { if (j == houseDTO.getAffiliationUnit()) { house.setHouseId(houseDTO.getHouseId()); house.setName(houseDTO.getHouseNum().toString()); + house.setGmtCreate(houseDTO.getGmtCreate()); houseList.add(house); } } diff --git a/src/main/java/com/cm/population/service/population/impl/PopulationServiceImpl.java b/src/main/java/com/cm/population/service/population/impl/PopulationServiceImpl.java index aab10d6..008e53a 100644 --- a/src/main/java/com/cm/population/service/population/impl/PopulationServiceImpl.java +++ b/src/main/java/com/cm/population/service/population/impl/PopulationServiceImpl.java @@ -79,6 +79,7 @@ public class PopulationServiceImpl extends AbstractService implements IPopulatio setSaveInfo(token, params); } params.put("bindTime", params.get("gmtCreate")); + params.put("outHouse", 0); populationDao.save(params); return populationId; } diff --git a/src/main/java/com/cm/population/service/residential/IResidentialService.java b/src/main/java/com/cm/population/service/residential/IResidentialService.java index ab6f3d7..804f723 100644 --- a/src/main/java/com/cm/population/service/residential/IResidentialService.java +++ b/src/main/java/com/cm/population/service/residential/IResidentialService.java @@ -185,4 +185,7 @@ public interface IResidentialService { */ Integer count(Map params); + String getCommunityId(String community); + + String getStreetId(String street); } \ No newline at end of file diff --git a/src/main/java/com/cm/population/service/residential/impl/ResidentialServiceImpl.java b/src/main/java/com/cm/population/service/residential/impl/ResidentialServiceImpl.java index 5a6dc45..931d0a1 100644 --- a/src/main/java/com/cm/population/service/residential/impl/ResidentialServiceImpl.java +++ b/src/main/java/com/cm/population/service/residential/impl/ResidentialServiceImpl.java @@ -184,4 +184,14 @@ public class ResidentialServiceImpl extends AbstractService implements IResident return count == null ? 0 : count; } + @Override + public String getCommunityId(String community) { + return residentialDao.getCommunityId(community); + } + + @Override + public String getStreetId(String street) { + return residentialDao.getStreetId(street); + } + } \ No newline at end of file diff --git a/src/main/resources/mybatis/mapper/population/population-mapper.xml b/src/main/resources/mybatis/mapper/population/population-mapper.xml index 862f774..cd05caf 100644 --- a/src/main/resources/mybatis/mapper/population/population-mapper.xml +++ b/src/main/resources/mybatis/mapper/population/population-mapper.xml @@ -248,7 +248,8 @@ t1.house_id = hh.house_id WHERE t1.is_delete = 0 - AND t1.out_house = 0 OR t1.out_house IS NULL + AND (t1.out_house = 0 + OR t1.out_house IS NULL) AND hh.is_delete = 0 diff --git a/src/main/resources/mybatis/mapper/residential/residential-mapper.xml b/src/main/resources/mybatis/mapper/residential/residential-mapper.xml index 00e7dce..e4f11d3 100644 --- a/src/main/resources/mybatis/mapper/residential/residential-mapper.xml +++ b/src/main/resources/mybatis/mapper/residential/residential-mapper.xml @@ -429,4 +429,12 @@ t1.is_delete = 0 + + + + \ No newline at end of file From 1d50f9c4cd48bc41e0d36612f56a2609326fff38 Mon Sep 17 00:00:00 2001 From: Renpc-kilig <308442850@qq.com> Date: Thu, 16 Nov 2023 18:30:47 +0800 Subject: [PATCH 2/3] =?UTF-8?q?excel=E6=89=B9=E9=87=8F=E5=AF=BC=E5=85=A5?= =?UTF-8?q?=E3=80=81bug=E4=BF=AE=E6=94=B9=20=20--renpc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/api/residential/ResidentialController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 eff8ace..e8134d6 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 @@ -220,7 +220,7 @@ public class ResidentialController extends AbstractController { // 插入楼栋信息,获取小区信息 List residentialDTOList1 = residentialService.list(params); - if(!CollectionUtils.isEmpty(residentialDTOList)) { + if(!CollectionUtils.isEmpty(residentialDTOList1)) { BuildingVO buildingVO = new BuildingVO(); buildingVO.setStreetName(data.getStreet()); buildingVO.setCommunityName(data.getCommunity()); From fc285b1f0c42f75b56bdfba48500105f503f303f Mon Sep 17 00:00:00 2001 From: TS-QD1 Date: Thu, 16 Nov 2023 18:45:34 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/templates/house/list-summary.html | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/resources/templates/house/list-summary.html b/src/main/resources/templates/house/list-summary.html index 8066cdb..21bf784 100644 --- a/src/main/resources/templates/house/list-summary.html +++ b/src/main/resources/templates/house/list-summary.html @@ -35,6 +35,7 @@ #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: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;}