Browse Source

building修改

dev
zxc 3 years ago
parent
commit
6de1e21fb9
  1. 10
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcBuildingDTO.java
  2. 5
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcHouseDTO.java
  3. 10
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcBulidingAddFormDTO.java
  4. 10
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/IcBuildingListResultDTO.java
  5. 1
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/BuildingController.java
  6. 10
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcBuildingEntity.java
  7. 5
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcHouseEntity.java
  8. 3
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/BuildingServiceImpl.java
  9. 4
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcBuildingDao.xml

10
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcBuildingDTO.java

@ -85,6 +85,16 @@ public class IcBuildingDTO implements Serializable {
*/ */
private Integer totalHouseNum; private Integer totalHouseNum;
/**
* 楼长姓名
*/
private String buildingLeaderName;
/**
* 楼长电话
*/
private String buildingLeaderMobile;
/** /**
* 中心点位经度 * 中心点位经度
*/ */

5
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcHouseDTO.java

@ -73,6 +73,11 @@ public class IcHouseDTO implements Serializable {
*/ */
private String doorName; private String doorName;
/**
* 排序
*/
private Integer sort;
/** /**
* 房屋类型这里存储字典value就可以 * 房屋类型这里存储字典value就可以
*/ */

10
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcBulidingAddFormDTO.java

@ -123,6 +123,16 @@ public class IcBulidingAddFormDTO implements Serializable {
private String latitude; private String latitude;
/**
* 楼长姓名
*/
private String buildingLeaderName;
/**
* 楼长电话
*/
private String buildingLeaderMobile;

10
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/IcBuildingListResultDTO.java

@ -41,4 +41,14 @@ public class IcBuildingListResultDTO extends PageFormDTO {
private Integer totalUnitNum; private Integer totalUnitNum;
private String longitude; private String longitude;
private String buildingType; private String buildingType;
/**
* 楼长姓名
*/
private String buildingLeaderName;
/**
* 楼长电话
*/
private String buildingLeaderMobile;
} }

1
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/BuildingController.java

@ -96,7 +96,6 @@ public class BuildingController {
//效验数据 //效验数据
ValidatorUtils.validateEntity(formDTO, IcBulidingAddFormDTO.UpdateShowGroup.class); ValidatorUtils.validateEntity(formDTO, IcBulidingAddFormDTO.UpdateShowGroup.class);
String customerId = tokenDTO.getCustomerId(); String customerId = tokenDTO.getCustomerId();
// String customerId = "123123";
buildingService.updateBuilding(customerId,formDTO); buildingService.updateBuilding(customerId,formDTO);
return new Result().ok("修改成功"); return new Result().ok("修改成功");
} }

10
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcBuildingEntity.java

@ -80,6 +80,16 @@ public class IcBuildingEntity extends BaseEpmetEntity {
*/ */
private Integer totalHouseNum; private Integer totalHouseNum;
/**
* 楼长姓名
*/
private String buildingLeaderName;
/**
* 楼长电话
*/
private String buildingLeaderMobile;
/** /**
* 中心点位经度 * 中心点位经度
*/ */

5
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/IcHouseEntity.java

@ -73,6 +73,11 @@ public class IcHouseEntity extends BaseEpmetEntity {
*/ */
private String doorName; private String doorName;
/**
* 排序
*/
private Integer sort;
/** /**
* 房屋类型这里存储字典value就可以 * 房屋类型这里存储字典value就可以
*/ */

3
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/BuildingServiceImpl.java

@ -426,14 +426,11 @@ public class BuildingServiceImpl implements BuildingService {
if (null != count && count > 0) { if (null != count && count > 0) {
throw new RenException(EpmetErrorCode.BUILDING_NAME_EXITED.getCode(), EpmetErrorCode.BUILDING_NAME_EXITED.getMsg()); throw new RenException(EpmetErrorCode.BUILDING_NAME_EXITED.getCode(), EpmetErrorCode.BUILDING_NAME_EXITED.getMsg());
} }
IcBuildingDTO icBuilding = icBuildingService.get(formDTO.getBuildingId()); IcBuildingDTO icBuilding = icBuildingService.get(formDTO.getBuildingId());
if (!icBuilding.getNeighborHoodId().equals(formDTO.getNeighborHoodId())) { if (!icBuilding.getNeighborHoodId().equals(formDTO.getNeighborHoodId())) {
//更新对应房屋小区id //更新对应房屋小区id
List<IcHouseEntity> icHouseEntities = icHouseDao.selectList(new QueryWrapper<IcHouseEntity>().lambda().eq(IcHouseEntity::getBuildingId, formDTO.getBuildingId())); List<IcHouseEntity> icHouseEntities = icHouseDao.selectList(new QueryWrapper<IcHouseEntity>().lambda().eq(IcHouseEntity::getBuildingId, formDTO.getBuildingId()));
if (!CollectionUtils.isEmpty(icHouseEntities)) { if (!CollectionUtils.isEmpty(icHouseEntities)) {
//
throw new RenException(EpmetErrorCode.ORG_EDIT_FAILED.getCode(), "楼栋单元下存在房屋,无法更新"); throw new RenException(EpmetErrorCode.ORG_EDIT_FAILED.getCode(), "楼栋单元下存在房屋,无法更新");
} }
} }

4
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcBuildingDao.xml

@ -82,7 +82,9 @@
a.LONGITUDE as longitude, a.LONGITUDE as longitude,
a.LATITUDE as latitude, a.LATITUDE as latitude,
a.TYPE as buildingTypeKey, a.TYPE as buildingTypeKey,
(SELECT COUNT(1) FROM ic_house WHERE DEL_FLAG = '0' AND BUILDING_ID = a.ID) AS realTotalHouseNum (SELECT COUNT(1) FROM ic_house WHERE DEL_FLAG = '0' AND BUILDING_ID = a.ID) AS realTotalHouseNum,
a.BUILDING_LEADER_NAME,
a.BUILDING_LEADER_MOBILE
from ic_building a from ic_building a
LEFT JOIN ic_neighbor_hood b on a.NEIGHBOR_HOOD_ID = b.ID and b.DEL_FLAG='0' LEFT JOIN ic_neighbor_hood b on a.NEIGHBOR_HOOD_ID = b.ID and b.DEL_FLAG='0'
left join customer_agency c on b.AGENCY_ID = c.ID and c.DEL_FLAG='0' left join customer_agency c on b.AGENCY_ID = c.ID and c.DEL_FLAG='0'

Loading…
Cancel
Save