楼宇管理,房屋管理,人房关系
bug修改。
This commit is contained in:
parent
440af5f1a5
commit
ae1e8be14d
@ -85,4 +85,11 @@ public interface IBuildingHouseDao {
|
|||||||
* @throws RemoveException
|
* @throws RemoveException
|
||||||
*/
|
*/
|
||||||
void deleteNoData(Map<String, Object> params) throws RemoveException;
|
void deleteNoData(Map<String, Object> params) throws RemoveException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除楼宇时,删除楼宇下的房屋信息
|
||||||
|
* @param params
|
||||||
|
* @throws RemoveException
|
||||||
|
*/
|
||||||
|
void removeData(Map<String, Object> params) throws RemoveException;
|
||||||
}
|
}
|
@ -141,4 +141,10 @@ public interface IBuildingHouseService {
|
|||||||
*/
|
*/
|
||||||
void deleteNoData(Map<String, Object> params);
|
void deleteNoData(Map<String, Object> params);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除楼宇时,删除楼宇下的房屋信息
|
||||||
|
* @param token
|
||||||
|
* @param cityBuildingId
|
||||||
|
*/
|
||||||
|
void removeData(String token, String cityBuildingId);
|
||||||
}
|
}
|
@ -135,4 +135,16 @@ public class BuildingHouseServiceImpl extends AbstractService implements IBuildi
|
|||||||
buildingHouseDao.deleteNoData(params);
|
buildingHouseDao.deleteNoData(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void removeData(String token, String cityBuildingIds) {
|
||||||
|
Map<String, Object> params = new HashMap<>();
|
||||||
|
params.put("cityBuildingIds", Arrays.asList(cityBuildingIds.split("_")));
|
||||||
|
if (token != null) {
|
||||||
|
setUpdateInfo(token, params);
|
||||||
|
} else {
|
||||||
|
setUpdateInfo(params);
|
||||||
|
}
|
||||||
|
buildingHouseDao.removeData(params);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -178,6 +178,7 @@ public class CityBuildingServiceImpl extends AbstractService implements ICityBui
|
|||||||
setUpdateInfo(params);
|
setUpdateInfo(params);
|
||||||
}
|
}
|
||||||
cityBuildingDao.removeCityBuilding(params);
|
cityBuildingDao.removeCityBuilding(params);
|
||||||
|
buildingHouseService.removeData(token, ids);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -214,7 +215,7 @@ public class CityBuildingServiceImpl extends AbstractService implements ICityBui
|
|||||||
} else {
|
} else {
|
||||||
setUpdateInfo(params);
|
setUpdateInfo(params);
|
||||||
}
|
}
|
||||||
updateHouse(cityBuildingId, cityBuildingVO);
|
updateHouse(token, cityBuildingId, cityBuildingVO);
|
||||||
cityBuildingDao.updateCityBuilding(params);
|
cityBuildingDao.updateCityBuilding(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -223,9 +224,13 @@ public class CityBuildingServiceImpl extends AbstractService implements ICityBui
|
|||||||
* @param cityBuildingId
|
* @param cityBuildingId
|
||||||
* @param cityBuildingVO
|
* @param cityBuildingVO
|
||||||
*/
|
*/
|
||||||
private void updateHouse(String cityBuildingId, CityBuildingVO cityBuildingVO) throws Exception {
|
private void updateHouse(String token, String cityBuildingId, CityBuildingVO cityBuildingVO) throws Exception {
|
||||||
Map<String, Object> params = new HashMap<>(2);
|
Map<String, Object> params = new HashMap<>(2);
|
||||||
setUpdateInfo(params);
|
if (token != null) {
|
||||||
|
setUpdateInfo(token, params);
|
||||||
|
} else {
|
||||||
|
setUpdateInfo(params);
|
||||||
|
}
|
||||||
params.put("cityBuildingId", cityBuildingId);
|
params.put("cityBuildingId", cityBuildingId);
|
||||||
// 先获取到修改之前的楼宇信息,判断哪些数据发生了改变,根据改变的数据,进行相关的房屋信息修改
|
// 先获取到修改之前的楼宇信息,判断哪些数据发生了改变,根据改变的数据,进行相关的房屋信息修改
|
||||||
CityBuildingDTO cityBuildingDTO = cityBuildingDao.getCityBuilding(params);
|
CityBuildingDTO cityBuildingDTO = cityBuildingDao.getCityBuilding(params);
|
||||||
@ -238,22 +243,22 @@ public class CityBuildingServiceImpl extends AbstractService implements ICityBui
|
|||||||
buildingHouseVO.setCityBuildingId(cityBuildingId);
|
buildingHouseVO.setCityBuildingId(cityBuildingId);
|
||||||
buildingHouseVO.setDistrictName(cityBuildingVO.getDistrictName());
|
buildingHouseVO.setDistrictName(cityBuildingVO.getDistrictName());
|
||||||
buildingHouseVO.setDistrictId(cityBuildingVO.getDistrictId());
|
buildingHouseVO.setDistrictId(cityBuildingVO.getDistrictId());
|
||||||
buildingHouseService.update(null, buildingHouseVO);
|
buildingHouseService.update(token,null, buildingHouseVO);
|
||||||
}
|
}
|
||||||
// 楼宇名称
|
// 楼宇名称
|
||||||
if(!cityBuildingDTO.getBuildingName().equals(cityBuildingVO.getBuildingName())) {
|
if(!cityBuildingDTO.getBuildingName().equals(cityBuildingVO.getBuildingName())) {
|
||||||
BuildingHouseVO buildingHouseVO = new BuildingHouseVO();
|
BuildingHouseVO buildingHouseVO = new BuildingHouseVO();
|
||||||
buildingHouseVO.setCityBuildingId(cityBuildingId);
|
buildingHouseVO.setCityBuildingId(cityBuildingId);
|
||||||
buildingHouseVO.setCityBuildingName(cityBuildingVO.getBuildingName());
|
buildingHouseVO.setCityBuildingName(cityBuildingVO.getBuildingName());
|
||||||
buildingHouseService.update(null, buildingHouseVO);
|
buildingHouseService.update(token,null, buildingHouseVO);
|
||||||
}
|
}
|
||||||
// 楼宇编号
|
// 楼宇编号
|
||||||
if(!cityBuildingDTO.getBuildingNum().equals(cityBuildingVO.getBuildingNum())) {
|
if(!cityBuildingDTO.getBuildingNum().equals(cityBuildingVO.getBuildingNum())) {
|
||||||
BuildingHouseVO buildingHouseVO = new BuildingHouseVO();
|
BuildingHouseVO buildingHouseVO = new BuildingHouseVO();
|
||||||
buildingHouseVO.setCityBuildingId(cityBuildingId);
|
buildingHouseVO.setCityBuildingId(cityBuildingId);
|
||||||
buildingHouseVO.setNewHouseNumber(cityBuildingVO.getBuildingNum());
|
buildingHouseVO.setNewHouseNumber(cityBuildingVO.getBuildingNum() + "栋");
|
||||||
buildingHouseVO.setOldHouseNumber(cityBuildingDTO.getBuildingNum());
|
buildingHouseVO.setOldHouseNumber(cityBuildingDTO.getBuildingNum() + "栋");
|
||||||
buildingHouseService.update(null, buildingHouseVO);
|
buildingHouseService.update(token,null, buildingHouseVO);
|
||||||
}
|
}
|
||||||
// 楼宇层数
|
// 楼宇层数
|
||||||
if(!cityBuildingDTO.getBuildingFloor().equals(cityBuildingVO.getBuildingFloor())) {
|
if(!cityBuildingDTO.getBuildingFloor().equals(cityBuildingVO.getBuildingFloor())) {
|
||||||
|
@ -202,8 +202,13 @@
|
|||||||
t1.is_delete = 0
|
t1.is_delete = 0
|
||||||
<if test="keywords != null and keywords != ''">
|
<if test="keywords != null and keywords != ''">
|
||||||
AND (
|
AND (
|
||||||
<!-- 这里添加其他条件 -->
|
t1.city_building_name LIKE CONCAT('%', #{keywords}, '%')
|
||||||
t1.id LIKE CONCAT('%', #{keywords}, '%')
|
OR
|
||||||
|
t1.district_name LIKE CONCAT('%', #{keywords}, '%')
|
||||||
|
OR
|
||||||
|
t1.owner_name LIKE CONCAT('%', #{keywords}, '%')
|
||||||
|
OR
|
||||||
|
t1.owner_card LIKE CONCAT('%', #{keywords}, '%')
|
||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
<if test="cityBuildingId != null and cityBuildingId != ''">
|
<if test="cityBuildingId != null and cityBuildingId != ''">
|
||||||
@ -263,4 +268,22 @@
|
|||||||
)
|
)
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
<update id="removeData" parameterType="map">
|
||||||
|
UPDATE
|
||||||
|
city_building_house
|
||||||
|
SET
|
||||||
|
gmt_modified = #{gmtModified},
|
||||||
|
modifier = #{modifier},
|
||||||
|
is_delete = 1
|
||||||
|
WHERE
|
||||||
|
1 = 1
|
||||||
|
<if test="cityBuildingIds != null and cityBuildingIds.size > 0">
|
||||||
|
AND
|
||||||
|
city_building_id IN
|
||||||
|
<foreach collection="cityBuildingIds" index="index" open="(" separator="," close=")">
|
||||||
|
#{cityBuildingIds[${index}]}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
</update>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
@ -41,6 +41,12 @@
|
|||||||
<input type="text" id="buildingNum" name="buildingNum" class="layui-input" value="" placeholder="请输入楼宇编号" >
|
<input type="text" id="buildingNum" name="buildingNum" class="layui-input" value="" placeholder="请输入楼宇编号" >
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<label class="layui-form-label">楼宇单元数</label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<input type="text" id="buildingUnitNum" name="buildingUnitNum" class="layui-input" value="" placeholder="请输入楼宇单元数" >
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<label class="layui-form-label">楼宇层数</label>
|
<label class="layui-form-label">楼宇层数</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
@ -53,12 +59,6 @@
|
|||||||
<input type="number" id="countOfFloor" name="countOfFloor" class="layui-input" value="" placeholder="请输入每层户数(大于等于0)" >
|
<input type="number" id="countOfFloor" name="countOfFloor" class="layui-input" value="" placeholder="请输入每层户数(大于等于0)" >
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-form-item">
|
|
||||||
<label class="layui-form-label">楼宇单元数</label>
|
|
||||||
<div class="layui-input-block">
|
|
||||||
<input type="text" id="buildingUnitNum" name="buildingUnitNum" class="layui-input" value="" placeholder="请输入楼宇单元数" >
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="layui-form-item layui-row">
|
<div class="layui-form-item layui-row">
|
||||||
<div class="layui-col-lg6">
|
<div class="layui-col-lg6">
|
||||||
<label class="layui-form-label">经度</label>
|
<label class="layui-form-label">经度</label>
|
||||||
|
Loading…
Reference in New Issue
Block a user