diff --git a/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/PropertyController.java b/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/PropertyController.java index 4cd803a38..f31580327 100644 --- a/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/PropertyController.java +++ b/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/PropertyController.java @@ -5055,6 +5055,7 @@ public class PropertyController { districtPriceMap.put("floor", model.getFloor()); districtPriceMap.put("height", model.getHeight()); districtPriceMap.put("fitment", evaluation.getFitment()); + districtPriceMap.put("buildYear",district.getFinishBuildingDate()); Integer startPrice = (int)(evaluation.getTotalPrice() - evaluation.getTotalPrice()*0.2); Integer endPrice = (int)(evaluation.getTotalPrice() + evaluation.getTotalPrice()*0.2); @@ -5149,6 +5150,16 @@ public class PropertyController { //近一年户型租金走势 Map trendsMap = districtRoomSqmetreRentService.getRentTrends(district.getCity(), district.getRegion(), district.getName(), room, -12); // Map trendsMap = districtStatRentService.getRentTrend(district.getCity(), district.getRegion(), district.getDistrictName(), -12); + if (MapUtils.isNotEmpty(trendsMap)) { + Map distMap = (Map) trendsMap.get("distMap"); + Map trendMap = (Map) distMap.get(String.valueOf(trendsMap.get("room"))); + if (MapUtils.isNotEmpty(trendMap)) { + for (String key : trendMap.keySet()) { + Double totalPrice = (trendMap.get(key) * evaluation.getArea()); + trendMap.put(key, totalPrice.intValue()); + } + } + } districtPriceMap.put("trends", trendsMap); diff --git a/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/weixin/CcbRentController.java b/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/weixin/CcbRentController.java index 4932b1adf..6f3646ad6 100644 --- a/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/weixin/CcbRentController.java +++ b/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/weixin/CcbRentController.java @@ -32,6 +32,7 @@ import org.apache.batik.transcoder.TranscoderException; import org.apache.batik.transcoder.TranscoderInput; import org.apache.batik.transcoder.TranscoderOutput; import org.apache.batik.transcoder.image.PNGTranscoder; +import org.apache.commons.collections.MapUtils; import org.apache.commons.lang.StringUtils; import org.apache.lucene.index.Term; import org.apache.lucene.search.BooleanClause; @@ -110,7 +111,7 @@ public class CcbRentController { public Object downloadPageAction(PropertyEvaluationModel result, HttpServletRequest request, @Param(name = "city") String city, @Param(name = "district") String districtStr, @Param(name = "name") String name, @Param(name = "address") String address, @Param(name = "size") Double size, @Param(name = "floor") Integer floor, @Param(name = "height") Integer height, @Param(name = "room") Integer room, - @Param(name = "hall") Integer hall, @Param(name = "toilet") Integer toilet, @Param(name = "direction") String direction, @Param(name = "fitment") String fitment, @Param(name = "chartImgUrl") String chartImgUrl) { + @Param(name = "hall") Integer hall, @Param(name = "toilet") Integer toilet, @Param(name = "direction") String direction, @Param(name = "fitment") String fitment, @Param(name = "hasLift") String hasLift, @Param(name = "chartImgUrl") String chartImgUrl) { com.fangjia.open.model.PropertyEvaluationModel model = new com.fangjia.open.model.PropertyEvaluationModel(); model.setCity(city); model.setDistrict(districtStr); @@ -186,6 +187,8 @@ public class CcbRentController { districtPriceMap.put("floor", model.getFloor()); districtPriceMap.put("height", model.getHeight()); districtPriceMap.put("fitment", evaluation.getFitment()); + districtPriceMap.put("buildYear",district.getFinishBuildingDate()); + districtPriceMap.put("hasLift",hasLift); Integer startPrice = (int)(evaluation.getTotalPrice() - evaluation.getTotalPrice()*0.2); Integer endPrice = (int)(evaluation.getTotalPrice() + evaluation.getTotalPrice()*0.2); @@ -284,6 +287,16 @@ public class CcbRentController { //近一年户型租金走势 Map trendsMap = districtRoomSqmetreRentService.getRentTrends(district.getCity(), district.getRegion(), district.getName(), room, -12); + if (MapUtils.isNotEmpty(trendsMap)) { + Map distMap = (Map) trendsMap.get("distMap"); + Map trendMap = (Map) distMap.get(String.valueOf(trendsMap.get("room"))); + if (MapUtils.isNotEmpty(trendMap)) { + for (String key : trendMap.keySet()) { + Double totalPrice = (trendMap.get(key) * evaluation.getArea()); + trendMap.put(key, totalPrice.intValue()); + } + } + } districtPriceMap.put("trends", trendsMap); // 生成走势图图片,一遍转pdf @@ -488,7 +501,7 @@ public class CcbRentController { public void downloadAction(HttpServletResponse response, HttpServletRequest request, @Param(name = "city") String city, @Param(name = "district") String district, @Param(name = "name") String name, @Param(name = "address") String address, @Param(name = "size") Double size, @Param(name = "floor") Integer floor, @Param(name = "height") Integer height, @Param(name = "room") Integer room, - @Param(name = "hall") Integer hall, @Param(name = "toilet") Integer toilet, @Param(name = "direction") String direction, @Param(name = "fitment") String fitment, @Param(name = "chartImgUrl") String chartImgUrl) throws IOException { + @Param(name = "hall") Integer hall, @Param(name = "toilet") Integer toilet, @Param(name = "direction") String direction, @Param(name = "fitment") String fitment, @Param(name = "hasLift") String hasLift, @Param(name = "chartImgUrl") String chartImgUrl) throws IOException { response.setHeader("Content-disposition", "attachment; filename=" + URLEncoder.encode("租金估值报告", "UTF-8") + ".pdf"); response.setContentType("application/pdf;charset=UTF-8"); response.setCharacterEncoding("UTF-8"); @@ -501,7 +514,7 @@ public class CcbRentController { fontResolver.addFont(fontUrl, BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED); final String path = "http://" + request.getServerName() + ":" + request.getServerPort() + request.getContextPath(); String url = path + "/ccbRent/downloadPage?city=" + DataUtil.urlEncode(city) + "&district="+DataUtil.urlEncode(district)+"&name="+DataUtil.urlEncode(name); - url += "&address=" + DataUtil.urlEncode(address) +"&size="+size+"&floor="+floor+"&height="+height+"&room="+room+"&hall="+hall+"&toilet="+toilet+"&direction="+direction+"&fitment="+fitment+"&chartImgUrl="+chartImgUrl; + url += "&address=" + DataUtil.urlEncode(address) +"&size="+size+"&floor="+floor+"&height="+height+"&room="+room+"&hall="+hall+"&toilet="+toilet+"&direction="+direction+"&fitment="+fitment+"&chartImgUrl="+chartImgUrl + "&hasLift=" + DataUtil.urlEncode(hasLift); renderer.setDocument(url); renderer.layout(); renderer.createPDF(os, true); diff --git a/projects/fangjia-open/src/main/webapp/ccbRent/detail.ftl b/projects/fangjia-open/src/main/webapp/ccbRent/detail.ftl index 6f72eb5cf..29bff8e79 100644 --- a/projects/fangjia-open/src/main/webapp/ccbRent/detail.ftl +++ b/projects/fangjia-open/src/main/webapp/ccbRent/detail.ftl @@ -204,7 +204,7 @@ $("#download").css('color', 'blue') let chartImgUrl = $('#chartImgUrl').val(); window.location.href = "download?city="+params.city+"&district="+params.district+"&name="+params.name+"&address="+params.address+"&size="+params.size+"&floor="+params.floor - +"&height="+params.height+"&room="+params.room+"&hall="+params.hall+"&toilet="+params.toilet+"&direction="+params.direction+"&fitment="+params.fitment+"&chartImgUrl=" + chartImgUrl; + +"&height="+params.height+"&room="+params.room+"&hall="+params.hall+"&toilet="+params.toilet+"&direction="+params.direction+"&fitment="+params.fitment+"&chartImgUrl=" + chartImgUrl + "&hasLift=" + (params.hasLift == 'true' ? '鏈�' : '鏃�'); }); // 鍚庡彴浼犲弬杩囨潵鐢� diff --git a/projects/fangjia-open/src/main/webapp/ccbRent/downloadPage.ftl b/projects/fangjia-open/src/main/webapp/ccbRent/downloadPage.ftl index 3f97da60c..9bf596886 100644 --- a/projects/fangjia-open/src/main/webapp/ccbRent/downloadPage.ftl +++ b/projects/fangjia-open/src/main/webapp/ccbRent/downloadPage.ftl @@ -22,6 +22,9 @@
+
+ 浼板�兼姤鍛� +
1浼颁环缁撴灉
diff --git a/projects/fangjia-open/src/main/webapp/static/images/bh1.png b/projects/fangjia-open/src/main/webapp/static/images/bh1.png new file mode 100644 index 000000000..5535f11df Binary files /dev/null and b/projects/fangjia-open/src/main/webapp/static/images/bh1.png differ diff --git a/projects/fangjia-open/src/main/webapp/static/js/autoCompletion.js b/projects/fangjia-open/src/main/webapp/static/js/autoCompletion.js index 53627a5fc..fb00849df 100644 --- a/projects/fangjia-open/src/main/webapp/static/js/autoCompletion.js +++ b/projects/fangjia-open/src/main/webapp/static/js/autoCompletion.js @@ -27,9 +27,14 @@ $(function () { dataType: "json", success: function (data) { if(data && data.length == 0){ - var content = '
  • 鏈悳绱㈠埌灏忓尯
  • ' - $("#searchSpan ul").empty().append(content) - return + if ($("#t").val() == "c") { + $("#searchSpan ul").empty() + return ; + } else { + var content = '
  • 鏈悳绱㈠埌灏忓尯
  • ' + $("#searchSpan ul").empty().append(content) + return + } } var template = '
  • {1}
    {2}
  • ' var content = ""