新增修改接口
This commit is contained in:
@@ -63,6 +63,7 @@ public class DistrictFacilitys implements MongoEntity {
|
|||||||
private String imgUrl3D;
|
private String imgUrl3D;
|
||||||
|
|
||||||
private List<String> school;
|
private List<String> school;
|
||||||
|
private List<String> keySchool;
|
||||||
|
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue
|
@GeneratedValue
|
||||||
@@ -380,4 +381,12 @@ public class DistrictFacilitys implements MongoEntity {
|
|||||||
this.school = school;
|
this.school = school;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Column(name = "key_school")
|
||||||
|
public List<String> getKeySchool() {
|
||||||
|
return keySchool;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setKeySchool(List<String> keySchool) {
|
||||||
|
this.keySchool = keySchool;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -448,6 +448,7 @@ public class HouseLoudong extends com.fangjia.dal.mongo.model.HouseLoudong{
|
|||||||
this.openTotalPrice = openTotalPrice;
|
this.openTotalPrice = openTotalPrice;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Column(name = "district_id")
|
||||||
public String getDistrictId() {
|
public String getDistrictId() {
|
||||||
return districtId;
|
return districtId;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -101,6 +101,10 @@ public class Loudong implements MongoEntity {
|
|||||||
* seaweed中的小区名
|
* seaweed中的小区名
|
||||||
*/
|
*/
|
||||||
private String nameInSeaweed;
|
private String nameInSeaweed;
|
||||||
|
/**
|
||||||
|
* 小区编号
|
||||||
|
*/
|
||||||
|
private String idInSeaweed;
|
||||||
|
|
||||||
@Column(name = "remark")
|
@Column(name = "remark")
|
||||||
public String getRemark() {
|
public String getRemark() {
|
||||||
@@ -402,4 +406,13 @@ public class Loudong implements MongoEntity {
|
|||||||
public void setNameInSeaweed(String nameInSeaweed) {
|
public void setNameInSeaweed(String nameInSeaweed) {
|
||||||
this.nameInSeaweed = nameInSeaweed;
|
this.nameInSeaweed = nameInSeaweed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Column(name = "id_in_seaweed")
|
||||||
|
public String getIdInSeaweed() {
|
||||||
|
return idInSeaweed;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIdInSeaweed(String idInSeaweed) {
|
||||||
|
this.idInSeaweed = idInSeaweed;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+37
-16
@@ -7,11 +7,11 @@ import javax.servlet.http.HttpServletRequest;
|
|||||||
|
|
||||||
import com.fangjia.core.RegionData;
|
import com.fangjia.core.RegionData;
|
||||||
import com.fangjia.core.util.DateUtil;
|
import com.fangjia.core.util.DateUtil;
|
||||||
import com.fangjia.dal.mongo.model.RegionStat;
|
import com.fangjia.dal.mongo.model.*;
|
||||||
import com.fangjia.dal.mongo.model.RegionStatRent;
|
|
||||||
import com.fangjia.open.model.AvgPriceQueryModel;
|
import com.fangjia.open.model.AvgPriceQueryModel;
|
||||||
import com.fangjia.open.model.BasicModel;
|
import com.fangjia.open.model.BasicModel;
|
||||||
import com.fangjia.service.datastore.RegionStatService;
|
import com.fangjia.service.datastore.RegionStatService;
|
||||||
|
import com.fangjia.service.district.DistrictFacilitysService;
|
||||||
import com.fangjia.service.district.DistrictStatRentService;
|
import com.fangjia.service.district.DistrictStatRentService;
|
||||||
import com.fangjia.service.district.RegionStatRentService;
|
import com.fangjia.service.district.RegionStatRentService;
|
||||||
import com.fangjia.service.mongo.fangjia.AverageAnalyService;
|
import com.fangjia.service.mongo.fangjia.AverageAnalyService;
|
||||||
@@ -38,8 +38,6 @@ import com.fangjia.dal.common.DistrictKey;
|
|||||||
import com.fangjia.dal.common.FangjiaServerAreaContextHolder;
|
import com.fangjia.dal.common.FangjiaServerAreaContextHolder;
|
||||||
import com.fangjia.dal.common.ServerAreaData;
|
import com.fangjia.dal.common.ServerAreaData;
|
||||||
import com.fangjia.dal.mongo.fangjia.model.ServerArea;
|
import com.fangjia.dal.mongo.fangjia.model.ServerArea;
|
||||||
import com.fangjia.dal.mongo.model.DistrictHouse;
|
|
||||||
import com.fangjia.dal.mongo.model.DistrictStat;
|
|
||||||
import com.fangjia.dal.mongo.model.bkoff.ExtractDistrict;
|
import com.fangjia.dal.mongo.model.bkoff.ExtractDistrict;
|
||||||
import com.fangjia.dal.seaweed.model.District;
|
import com.fangjia.dal.seaweed.model.District;
|
||||||
import com.fangjia.dal.sql.model.ApiUser;
|
import com.fangjia.dal.sql.model.ApiUser;
|
||||||
@@ -93,6 +91,7 @@ public class DistrictController {
|
|||||||
private RegionBlockService regionBlockService;
|
private RegionBlockService regionBlockService;
|
||||||
private RegionStatService regionStatService;
|
private RegionStatService regionStatService;
|
||||||
private RegionStatRentService regionStatRentService;
|
private RegionStatRentService regionStatRentService;
|
||||||
|
private DistrictFacilitysService districtFacilitysService;
|
||||||
|
|
||||||
|
|
||||||
public static final String[] COLUMNS = { "id", "name", "estateType", "buildType", "licence", "buildArea", "allArea",
|
public static final String[] COLUMNS = { "id", "name", "estateType", "buildType", "licence", "buildArea", "allArea",
|
||||||
@@ -444,19 +443,19 @@ public class DistrictController {
|
|||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public Object showAction(DistrictSearchModel model, @Param(name = "city") String city, @Param(name = "region") String region,
|
public Object showAction(DistrictSearchModel model, @Param(name = "city") String city, @Param(name = "region") String region,
|
||||||
@Param(name = "name") String name, HttpServletRequest request) {
|
@Param(name = "name") String name, HttpServletRequest request) {
|
||||||
RestfulModelAndView mav = new RestfulModelAndView();
|
RestfulModelAndView mav = new RestfulModelAndView();
|
||||||
mav.setViewType("rest");
|
mav.setViewType("rest");
|
||||||
if (StringUtils.isBlank(name) || StringUtils.isBlank(city) || StringUtils.isBlank(region)) {
|
if (StringUtils.isBlank(name) || StringUtils.isBlank(city) || StringUtils.isBlank(region)) {
|
||||||
mav.setModel(new HttpCode(OpenHttpCodeEnum.ARGUMENT_LOSE, "小区所在城市,小区名,所在区域必必须输入"));
|
mav.setModel(new HttpCode(OpenHttpCodeEnum.ARGUMENT_LOSE, "小区所在城市,小区名,所在区域必必须输入"));
|
||||||
return mav;
|
|
||||||
} else {
|
|
||||||
DistrictBo districtBo = districtService.findByFullMode(new DistrictKey(city, region, name));
|
|
||||||
if (null == districtBo) {
|
|
||||||
mav.setModel(new HttpCode(OpenHttpCodeEnum.TARGET_DATA_NOT_EXIST, "小区数据不存在,请检查查询条件"));
|
|
||||||
return mav;
|
return mav;
|
||||||
}
|
} else {
|
||||||
|
DistrictBo districtBo = districtService.findByFullMode(new DistrictKey(city, region, name));
|
||||||
|
if (null == districtBo) {
|
||||||
|
mav.setModel(new HttpCode(OpenHttpCodeEnum.TARGET_DATA_NOT_EXIST, "小区数据不存在,请检查查询条件"));
|
||||||
|
return mav;
|
||||||
|
}
|
||||||
districtBo.setStat(this.districtStatService.findDistrictStat(districtBo.getDistrictKey()));
|
districtBo.setStat(this.districtStatService.findDistrictStat(districtBo.getDistrictKey()));
|
||||||
// 去除小区描述中的html标签
|
// 去除小区描述中的html标签
|
||||||
districtBo.setDescription(DataUtil.removeSpecialString(districtBo.getDescription()));
|
districtBo.setDescription(DataUtil.removeSpecialString(districtBo.getDescription()));
|
||||||
@@ -1146,6 +1145,25 @@ public class DistrictController {
|
|||||||
ret.put("RESULT", 200);
|
ret.put("RESULT", 200);
|
||||||
return mav;
|
return mav;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Object facilitysAction(DistrictSearchModel model, @Param(name = "city") String city, @Param(name = "region") String region,
|
||||||
|
@Param(name = "name") String name, HttpServletRequest request) {
|
||||||
|
RestfulModelAndView mav = new RestfulModelAndView();
|
||||||
|
mav.setViewType("rest");
|
||||||
|
if (StringUtils.isBlank(name) || StringUtils.isBlank(city) || StringUtils.isBlank(region)) {
|
||||||
|
mav.setModel(new HttpCode(OpenHttpCodeEnum.ARGUMENT_LOSE, "小区所在城市,小区名,所在区域必必须输入"));
|
||||||
|
return mav;
|
||||||
|
} else {
|
||||||
|
District districtBo = districtService.findDistrict(new DistrictKey(city, region, name), "district");
|
||||||
|
if (null == districtBo) {
|
||||||
|
mav.setModel(new HttpCode(OpenHttpCodeEnum.TARGET_DATA_NOT_EXIST, "小区数据不存在"));
|
||||||
|
return mav;
|
||||||
|
}
|
||||||
|
DistrictFacilitys facilitys = districtFacilitysService.findByDistrict(districtBo);
|
||||||
|
mav.setModel(BasicModel.buildOKModel().setResult(facilitys));
|
||||||
|
}
|
||||||
|
return mav;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1230,4 +1248,7 @@ public class DistrictController {
|
|||||||
this.regionStatRentService = regionStatRentService;
|
this.regionStatRentService = regionStatRentService;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setDistrictFacilitysService(DistrictFacilitysService districtFacilitysService) {
|
||||||
|
this.districtFacilitysService = districtFacilitysService;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+33
-2
@@ -740,7 +740,7 @@ public class PropertyController {
|
|||||||
} else {
|
} else {
|
||||||
districtInfoDto.setBuildingType("");
|
districtInfoDto.setBuildingType("");
|
||||||
}
|
}
|
||||||
districtInfoDto.setAlias(district.getAlias());
|
districtInfoDto.setAlias(district.getMappingAlias());
|
||||||
districtInfoDto.setAddressAlias(district.getAddrAlias());
|
districtInfoDto.setAddressAlias(district.getAddrAlias());
|
||||||
districtInfoDto.setCommunity(district.getStreetCommunity());
|
districtInfoDto.setCommunity(district.getStreetCommunity());
|
||||||
districtInfoDto.setCommercialArea(district.getBusinessQuarter());
|
districtInfoDto.setCommercialArea(district.getBusinessQuarter());
|
||||||
@@ -792,6 +792,7 @@ public class PropertyController {
|
|||||||
districtInfoDto.setDescription(district.getDescription());
|
districtInfoDto.setDescription(district.getDescription());
|
||||||
districtInfoDto.setSalesOfficeAdd(district.getSellAddress());
|
districtInfoDto.setSalesOfficeAdd(district.getSellAddress());
|
||||||
districtInfoDto.setSalesPhoneNumber(district.getMobile());
|
districtInfoDto.setSalesPhoneNumber(district.getMobile());
|
||||||
|
districtInfoDto.setTownship(district.getTownship());
|
||||||
if (district.getLoudongCount() != null && district.getLoudongCount() > 0) {
|
if (district.getLoudongCount() != null && district.getLoudongCount() > 0) {
|
||||||
districtInfoDto.setBuildingCount(district.getLoudongCount());
|
districtInfoDto.setBuildingCount(district.getLoudongCount());
|
||||||
}
|
}
|
||||||
@@ -1116,7 +1117,7 @@ public class PropertyController {
|
|||||||
model.setCalDate(calDate);
|
model.setCalDate(calDate);
|
||||||
}
|
}
|
||||||
/* 先到CPDB库中查找小区 */
|
/* 先到CPDB库中查找小区 */
|
||||||
District district = matchDistrict(model.getCity(), model.getAddress(), model.getDistrict(), model.getName());
|
District district = districtService.findDistrict(new DistrictKey(model.getCity(), model.getDistrict(), model.getName()), "district");//matchDistrict(model.getCity(), model.getAddress(), model.getDistrict(), model.getName());
|
||||||
if(district == null){
|
if(district == null){
|
||||||
//防止地址模糊,名称详细的情况
|
//防止地址模糊,名称详细的情况
|
||||||
district = matchDistrict(model.getCity(), model.getName(), model.getDistrict(), model.getAddress());
|
district = matchDistrict(model.getCity(), model.getName(), model.getDistrict(), model.getAddress());
|
||||||
@@ -5412,6 +5413,36 @@ public class PropertyController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Object searchHouseLoudongAction(PropertyEvaluationModel model, HttpServletRequest request)throws NumberFormatException, IllegalAccessException {
|
||||||
|
RestfulModelAndView mav = new RestfulModelAndView();
|
||||||
|
mav.setViewType("rest");
|
||||||
|
|
||||||
|
if (StringUtils.isBlank(model.getId()) || StringUtils.isBlank(model.getHouseNumber()) || StringUtils.isBlank(model.getRoomNumber())){
|
||||||
|
mav.setModel(BasicModel.buildBadRequestModel("参数非法:楼盘编号,楼栋号,室为必填项"));
|
||||||
|
return mav;
|
||||||
|
}
|
||||||
|
|
||||||
|
List<HouseLoudong> houseLoudongs = houseLoudongService.findAll(model.getId(), model.getHouseNumber(), model.getUnitNumber(), model.getRoomNumber());
|
||||||
|
mav.setModel(BasicModel.buildOKModel().setResult(houseLoudongs));
|
||||||
|
return mav;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public Object searchLoudongAction(PropertyEvaluationModel model, HttpServletRequest request)throws NumberFormatException, IllegalAccessException {
|
||||||
|
RestfulModelAndView mav = new RestfulModelAndView();
|
||||||
|
mav.setViewType("rest");
|
||||||
|
|
||||||
|
if (StringUtils.isBlank(model.getId()) || StringUtils.isBlank(model.getHouseNumber())){
|
||||||
|
mav.setModel(BasicModel.buildBadRequestModel("参数非法:楼盘编号,楼栋号为必填项"));
|
||||||
|
return mav;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
List<Loudong> loudongs = loudongService.findAll(model.getId(), model.getHouseNumber(), model.getUnitNumber());
|
||||||
|
mav.setModel(BasicModel.buildOKModel().setResult(loudongs));
|
||||||
|
return mav;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public void setHouseLoudongService(HouseLoudongService houseLoudongService) {
|
public void setHouseLoudongService(HouseLoudongService houseLoudongService) {
|
||||||
this.houseLoudongService = houseLoudongService;
|
this.houseLoudongService = houseLoudongService;
|
||||||
|
|||||||
@@ -99,6 +99,7 @@ public class DistrictInfoDto {
|
|||||||
private String salesPhoneNumber;
|
private String salesPhoneNumber;
|
||||||
private Integer buildingCount;
|
private Integer buildingCount;
|
||||||
private Integer finishYear;
|
private Integer finishYear;
|
||||||
|
private String township;
|
||||||
|
|
||||||
|
|
||||||
public String getDistrict() {
|
public String getDistrict() {
|
||||||
@@ -818,4 +819,12 @@ public class DistrictInfoDto {
|
|||||||
public void setFinishYear(Integer finishYear) {
|
public void setFinishYear(Integer finishYear) {
|
||||||
this.finishYear = finishYear;
|
this.finishYear = finishYear;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getTownship() {
|
||||||
|
return township;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTownship(String township) {
|
||||||
|
this.township = township;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+21
@@ -46,7 +46,12 @@ public class PropertyEvaluationModel extends FangjiaApiModel {
|
|||||||
* Â¥ºÅ
|
* Â¥ºÅ
|
||||||
*/
|
*/
|
||||||
private String unitNumber;
|
private String unitNumber;
|
||||||
|
/**
|
||||||
|
* ÐÂÂ¥ºÅ
|
||||||
|
*/
|
||||||
|
private String houseNumber;
|
||||||
|
|
||||||
|
private String id;
|
||||||
/**
|
/**
|
||||||
* ÊÒºÅ
|
* ÊÒºÅ
|
||||||
*/
|
*/
|
||||||
@@ -905,4 +910,20 @@ public class PropertyEvaluationModel extends FangjiaApiModel {
|
|||||||
public void setAvgPrice(Integer avgPrice) {
|
public void setAvgPrice(Integer avgPrice) {
|
||||||
this.avgPrice = avgPrice;
|
this.avgPrice = avgPrice;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getHouseNumber() {
|
||||||
|
return houseNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHouseNumber(String houseNumber) {
|
||||||
|
this.houseNumber = houseNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
@@ -94,4 +94,6 @@ public interface HouseLoudongService {
|
|||||||
public List<HouseLoudong> findAll(List<QueryParam> queryParams, Pager pager);
|
public List<HouseLoudong> findAll(List<QueryParam> queryParams, Pager pager);
|
||||||
|
|
||||||
List<String> findAllSources();
|
List<String> findAllSources();
|
||||||
|
|
||||||
|
public List<HouseLoudong> findAll(String id, String houseNum, String unitNum, String roomNum);
|
||||||
}
|
}
|
||||||
|
|||||||
+16
@@ -297,6 +297,22 @@ public class HouseLoudongServiceImpl implements HouseLoudongService {
|
|||||||
return froms;
|
return froms;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<HouseLoudong> findAll(String id, String houseNum, String unitNum, String roomNum) {
|
||||||
|
List<QueryParam> params = new ArrayList<QueryParam>();
|
||||||
|
params.add(new QueryParam("districtId", id));
|
||||||
|
if (StringUtils.isNotBlank(houseNum)) {
|
||||||
|
params.add(new QueryParam("houseNum", houseNum));
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(unitNum)) {
|
||||||
|
params.add(new QueryParam("houseNumUnit", unitNum));
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(roomNum)) {
|
||||||
|
params.add(new QueryParam("roomNum", roomNum));
|
||||||
|
}
|
||||||
|
return houseLoudongBkoffDao.findAllByParams(params);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<HouseLoudong> queryHouseLoudongList(String city, String districtName, String roomNum, Pager pager) {
|
public List<HouseLoudong> queryHouseLoudongList(String city, String districtName, String roomNum, Pager pager) {
|
||||||
List<QueryParam> params = new ArrayList<QueryParam>();
|
List<QueryParam> params = new ArrayList<QueryParam>();
|
||||||
|
|||||||
+2
@@ -23,6 +23,8 @@ public interface LoudongService {
|
|||||||
|
|
||||||
List<Loudong> findAll(String city, String region, String name, String houseNumber, String unitNumber, int limit);
|
List<Loudong> findAll(String city, String region, String name, String houseNumber, String unitNumber, int limit);
|
||||||
|
|
||||||
|
List<Loudong> findAll(String id, String houseNumber, String unitNumber);
|
||||||
|
|
||||||
Map<String, XSSFWorkbook> findAll(List<QueryParam> query, String city);
|
Map<String, XSSFWorkbook> findAll(List<QueryParam> query, String city);
|
||||||
|
|
||||||
Loudong findById(String id);
|
Loudong findById(String id);
|
||||||
|
|||||||
+17
@@ -148,6 +148,23 @@ public class LoudongServiceImpl implements LoudongService {
|
|||||||
return loudongDao.findAllByParams(params,null, 0 , limit, ADDRESS_VERIFY_FIELDS);
|
return loudongDao.findAllByParams(params,null, 0 , limit, ADDRESS_VERIFY_FIELDS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Loudong> findAll(String id, String houseNumber, String unitNumber) {
|
||||||
|
List<QueryParam> params = new ArrayList<QueryParam>();
|
||||||
|
if(StringUtils.isNotBlank(id)) {
|
||||||
|
params.add(new QueryParam("idInSeaweed", id));
|
||||||
|
}
|
||||||
|
|
||||||
|
if(StringUtils.isNotBlank(houseNumber)) {
|
||||||
|
params.add(new QueryParam("houseNumber", houseNumber));
|
||||||
|
}
|
||||||
|
if(StringUtils.isNotBlank(unitNumber)) {
|
||||||
|
params.add(new QueryParam("unitNumber", unitNumber));
|
||||||
|
}
|
||||||
|
|
||||||
|
return loudongDao.findAllByParams(params);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Loudong findById(String id) {
|
public Loudong findById(String id) {
|
||||||
return loudongDao.findById(id);
|
return loudongDao.findById(id);
|
||||||
|
|||||||
Reference in New Issue
Block a user