Merge branch 'open_bohai' into 'master'
Open bohai See merge request !295
This commit is contained in:
@@ -63,6 +63,7 @@ public class DistrictFacilitys implements MongoEntity {
|
||||
private String imgUrl3D;
|
||||
|
||||
private List<String> school;
|
||||
private List<String> keySchool;
|
||||
|
||||
@Id
|
||||
@GeneratedValue
|
||||
@@ -380,4 +381,12 @@ public class DistrictFacilitys implements MongoEntity {
|
||||
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;
|
||||
}
|
||||
|
||||
@Column(name = "district_id")
|
||||
public String getDistrictId() {
|
||||
return districtId;
|
||||
}
|
||||
|
||||
+37
-16
@@ -7,11 +7,11 @@ import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import com.fangjia.core.RegionData;
|
||||
import com.fangjia.core.util.DateUtil;
|
||||
import com.fangjia.dal.mongo.model.RegionStat;
|
||||
import com.fangjia.dal.mongo.model.RegionStatRent;
|
||||
import com.fangjia.dal.mongo.model.*;
|
||||
import com.fangjia.open.model.AvgPriceQueryModel;
|
||||
import com.fangjia.open.model.BasicModel;
|
||||
import com.fangjia.service.datastore.RegionStatService;
|
||||
import com.fangjia.service.district.DistrictFacilitysService;
|
||||
import com.fangjia.service.district.DistrictStatRentService;
|
||||
import com.fangjia.service.district.RegionStatRentService;
|
||||
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.ServerAreaData;
|
||||
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.seaweed.model.District;
|
||||
import com.fangjia.dal.sql.model.ApiUser;
|
||||
@@ -93,6 +91,7 @@ public class DistrictController {
|
||||
private RegionBlockService regionBlockService;
|
||||
private RegionStatService regionStatService;
|
||||
private RegionStatRentService regionStatRentService;
|
||||
private DistrictFacilitysService districtFacilitysService;
|
||||
|
||||
|
||||
public static final String[] COLUMNS = { "id", "name", "estateType", "buildType", "licence", "buildArea", "allArea",
|
||||
@@ -444,19 +443,19 @@ public class DistrictController {
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Object showAction(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 {
|
||||
DistrictBo districtBo = districtService.findByFullMode(new DistrictKey(city, region, name));
|
||||
if (null == districtBo) {
|
||||
mav.setModel(new HttpCode(OpenHttpCodeEnum.TARGET_DATA_NOT_EXIST, "小区数据不存在,请检查查询条件"));
|
||||
public Object showAction(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 {
|
||||
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()));
|
||||
// 去除小区描述中的html标签
|
||||
districtBo.setDescription(DataUtil.removeSpecialString(districtBo.getDescription()));
|
||||
@@ -1146,6 +1145,25 @@ public class DistrictController {
|
||||
ret.put("RESULT", 200);
|
||||
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;
|
||||
}
|
||||
|
||||
public void setDistrictFacilitysService(DistrictFacilitysService districtFacilitysService) {
|
||||
this.districtFacilitysService = districtFacilitysService;
|
||||
}
|
||||
}
|
||||
|
||||
+33
-2
@@ -728,7 +728,7 @@ public class PropertyController {
|
||||
} else {
|
||||
districtInfoDto.setBuildingType("");
|
||||
}
|
||||
districtInfoDto.setAlias(district.getAlias());
|
||||
districtInfoDto.setAlias(district.getMappingAlias());
|
||||
districtInfoDto.setAddressAlias(district.getAddrAlias());
|
||||
districtInfoDto.setCommunity(district.getStreetCommunity());
|
||||
districtInfoDto.setCommercialArea(district.getBusinessQuarter());
|
||||
@@ -780,6 +780,7 @@ public class PropertyController {
|
||||
districtInfoDto.setDescription(district.getDescription());
|
||||
districtInfoDto.setSalesOfficeAdd(district.getSellAddress());
|
||||
districtInfoDto.setSalesPhoneNumber(district.getMobile());
|
||||
districtInfoDto.setTownship(district.getTownship());
|
||||
if (district.getLoudongCount() != null && district.getLoudongCount() > 0) {
|
||||
districtInfoDto.setBuildingCount(district.getLoudongCount());
|
||||
}
|
||||
@@ -1110,7 +1111,7 @@ public class PropertyController {
|
||||
model.setCalDate(calDate);
|
||||
}
|
||||
/* 先到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){
|
||||
//防止地址模糊,名称详细的情况
|
||||
district = matchDistrict(model.getCity(), model.getName(), model.getDistrict(), model.getAddress());
|
||||
@@ -5406,6 +5407,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) {
|
||||
this.houseLoudongService = houseLoudongService;
|
||||
|
||||
@@ -99,6 +99,7 @@ public class DistrictInfoDto {
|
||||
private String salesPhoneNumber;
|
||||
private Integer buildingCount;
|
||||
private Integer finishYear;
|
||||
private String township;
|
||||
|
||||
|
||||
public String getDistrict() {
|
||||
@@ -818,4 +819,12 @@ public class DistrictInfoDto {
|
||||
public void setFinishYear(Integer 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 houseNumber;
|
||||
|
||||
private String id;
|
||||
/**
|
||||
* ÊÒºÅ
|
||||
*/
|
||||
@@ -905,4 +910,20 @@ public class PropertyEvaluationModel extends FangjiaApiModel {
|
||||
public void setAvgPrice(Integer 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);
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@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
|
||||
public List<HouseLoudong> queryHouseLoudongList(String city, String districtName, String roomNum, Pager pager) {
|
||||
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 id, String houseNumber, String unitNumber);
|
||||
|
||||
Map<String, XSSFWorkbook> findAll(List<QueryParam> query, String city);
|
||||
|
||||
Loudong findById(String id);
|
||||
|
||||
+17
@@ -148,6 +148,23 @@ public class LoudongServiceImpl implements LoudongService {
|
||||
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
|
||||
public Loudong findById(String id) {
|
||||
return loudongDao.findById(id);
|
||||
|
||||
Reference in New Issue
Block a user