package com.realty.base.servlet;
import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import java.math.BigDecimal;
import java.util.Date;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.swing.JOptionPane;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import net.sf.json.JsonConfig;
import com.realty.base.model.*;
import com.realty.base.utils.JsonDateValueProcessor;
import com.realty.base.utils.QueryUtils;
import com.realty.base.action.BuildingAction;
import com.realty.base.action.BuildingUsageAction;
import com.realty.base.dao.BuildingDao;
import com.realty.base.dao.impl.BuildingDaoImpl;
import com.oreilly.servlet.MultipartRequest;
/**
* Servlet implementation class BuildingServlet
*/
@WebServlet("/BuildingServlet")
public class BuildingServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
/**
* @see HttpServlet#HttpServlet()
*/
public BuildingServlet() {
super();
// TODO Auto-generated constructor stub
}
/**
* @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
*/
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
doPost(request,response);
}
/**
* @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
*/
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
request.setCharacterEncoding("utf-8");
response.setHeader("Cache-Control", "no-store");
response.setHeader("Pragma", "no-cache");
response.setDateHeader("Expires", 0);
response.setContentType("text/html;charset=UTF-8");//解决乱码问题,没有这句,回调函数的内容可能乱码
String buildingName=null;String buildingAlias=null;int regionId=0;String propertyAdress=null;
String propertyName=null;int usageId=0;int buildtimeId=0;String developers=null;Double floorArea=0.0;
Double buildingArea=0.0;int structureId=0;String formId=null;String plotRatio=null;Date landuseTime=null;
String buildingDensity=null;String greeningRate=null;BigDecimal parkingRatio=null;int decorateId=0;Date openTime=null;
String propertyService=null;Double initialPrice=0.0;Double averagePrice=0.0;Double perPrice=0.0;
Double totalPrice=0.0;String locationphoto=null;int landId=0;int buildintroId=0;Double longitude=0.0;
Double latitude=0.0;int entryId=1;String entryName=null;Date entryTime=null;String auditName=null;
Date auditTime=null;int status=0;String remarks=null;
String buildtimeOne=null;String buildtimeTwo=null;String buildtimeThree=null;String buildtimeOther=null;
String buildingtimeFinish=null;String buildRegion=null;String projectFeature=null;
int zipCode=0;String buildingStruc=null;String buildingType=null;Double propertyFee=0.0;
String proWorkaddress=null;String proPhone=null;String proOtherinfor=null;String propertyRight=null;
String buildingintro=null;String editer=null;
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
try {
landuseTime = sdf.parse("0001-01-01");
} catch (ParseException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
try {
openTime = sdf.parse("0001-01-01");
} catch (ParseException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
int floorId=0; int buildingId=0; String address=null;
String buildingEast=null; String buildingWest=null;
String buildingSouth=null; String buildingNorth=null;
String landLevel=null; String neighborhood=null;
String buildingInfor=null; String nearRoad=null;
String publicTransport=null; String commercialFacility=null;
String financingNstitution=null; String school=null;
String hospital=null; String other=null;
String internalFacility=null; String electricityFacility=null;
String parkFacility=null; String propertyManagement=null;
String environment=null; Date collectTime=null; int buildNum=0; String floors=null; int cells=0; String networks=null;
int onehouses=0;
String waterSupply=null;
String electricitySupply=null;
String heatSupply=null;
String gas=null;
String communications=null;
String elevato=null;
String security=null;
String hygienism=null;
String parking=null;
String communityEnter=null;
int unitNum=0;int houseNum=0;
Double houseArea=null; String present=null;int floorTotle=0;
int floorSaid=0;int floorActual=0;String houseType=null;
String orientation=null;Double exchangePrice=null;Double exchangeTotle=null;Date exchangeTime=null;
PrintWriter out = response.getWriter();
String flag=request.getParameter("flag");
if(flag.equals("1")){
buildingName=request.getParameter("buildingName");
buildingAlias=request.getParameter("buildingAlias");
String regionId1=request.getParameter("regionId");
regionId = Integer.parseInt(regionId1);
propertyAdress=request.getParameter("propertyAdress");
propertyName=request.getParameter("propertyName");
String usageId1=request.getParameter("usageId");
usageId = Integer.parseInt(usageId1);
developers=request.getParameter("developers");
String floorArea1=request.getParameter("floorArea");
if(floorArea1.equals(""))
floorArea=0.0;
else
floorArea = Double.parseDouble(floorArea1);
String buildingArea1=request.getParameter("buildingArea");
if(buildingArea1.equals(""))
buildingArea=0.0;
else
buildingArea = Double.parseDouble(buildingArea1);
String structureId1=request.getParameter("structureId");
structureId = Integer.parseInt(structureId1);
formId=request.getParameter("formId");
String decorateId1=request.getParameter("decorateId");
decorateId = Integer.parseInt(decorateId1);
entryName=request.getParameter("entryName");
String entryTime1=request.getParameter("entryTime");
SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try {
entryTime = sdf1.parse(entryTime1);
} catch (ParseException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
remarks=request.getParameter("remarks");
BuildingAction buildingaction=new BuildingAction();
boolean outcome=buildingaction.buildingAdd(buildingName, buildingAlias, regionId, propertyAdress, propertyName, usageId, buildtimeId, developers, floorArea, buildingArea, structureId, formId, plotRatio, landuseTime, buildingDensity, greeningRate, parkingRatio, decorateId, openTime, propertyService, initialPrice, averagePrice, perPrice, totalPrice, locationphoto, landId, buildintroId, longitude, latitude, entryId, entryName, entryTime, auditName, auditTime, status, remarks);
if(outcome){
int i=buildingaction.buildingList().size()-1;
int BuildingId=buildingaction.buildingList().get(i).getBuildingId();
buildingaction.buildingintroAdd(BuildingId, buildingName, address, buildingEast, buildingWest, buildingSouth, buildingNorth, landLevel, neighborhood, buildingInfor, nearRoad, publicTransport, commercialFacility, financingNstitution, school, hospital, other, internalFacility, electricityFacility, parkFacility, propertyManagement, environment, collectTime, e
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
Eclipse+Tomcat+SQLServer2008开发基于MVC框架的房地产信息管理系统+运用gis技术实现地产和地图结合,适合毕业设计、课程设计、项目开发。项目源码已经过严格测试,可以放心参考并在此基础上延申使用~ Eclipse+Tomcat+SQLServer2008开发基于MVC框架的房地产信息管理系统+运用gis技术实现地产和地图结合,适合毕业设计、课程设计、项目开发。项目源码已经过严格测试,可以放心参考并在此基础上延申使用~ Eclipse+Tomcat+SQLServer2008开发基于MVC框架的房地产信息管理系统+运用gis技术实现地产和地图结合,适合毕业设计、课程设计、项目开发。项目源码已经过严格测试,可以放心参考并在此基础上延申使用~ 项目简介: java+Eclipse+Tomcat+SQLServer2008的环境下搭建的一个基于MVC框架的房地产信息管理系统; 运用gis技术实现房产信息与地图的结合,完成地图查询
资源推荐
资源详情
资源评论
收起资源包目录
Eclipse+Tomcat+SQLServer2008开发基于MVC框架的房地产信息管理系统+运用gis技术实现地产和地图结合 (576个子文件)
bootstrap.css 99KB
style.css 51KB
editor.css 31KB
editor.css 27KB
editor.css 27KB
font-awesome.css 27KB
dialog.css 15KB
dialog.css 13KB
dialog.css 12KB
web.css 12KB
theme-responsive.css 12KB
jquery.fancybox-1.3.4.css 7KB
style1.css 6KB
index.css 5KB
buildinfo.css 3KB
superfish.css 3KB
yui.css 3KB
buildinfo1.css 3KB
navigationpic.css 2KB
tab.css 2KB
templates.css 2KB
templates.css 1KB
templates.css 1KB
toolbar.css 1KB
wsc.css 1004B
leftframe.css 917B
manstyle.css 848B
contents.css 674B
lightbox.css 646B
album.css 608B
frame.css 548B
webstyle.css 347B
login_08.gif 25KB
login_08.gif 25KB
login_03.gif 19KB
login_03.gif 19KB
login_05.gif 7KB
login_05.gif 7KB
main_09.gif 6KB
login_07.gif 5KB
login_07.gif 5KB
img01.gif 3KB
main_30.gif 3KB
main_40.gif 3KB
main_03.gif 3KB
loading.gif 2KB
main_32.gif 2KB
main_04.gif 2KB
main_29.gif 2KB
main_22.gif 2KB
main_48.gif 2KB
main_47.gif 2KB
login_06.gif 2KB
login_06.gif 2KB
main_20.gif 1KB
main_18.gif 1KB
main_12.gif 1KB
main_11.gif 1KB
main_14.gif 1KB
main_16.gif 1KB
uicolor.gif 1KB
left4.gif 1KB
left3.gif 1KB
search.gif 1KB
left2.gif 893B
left.gif 804B
main_58.gif 804B
main_07.gif 701B
img02.gif 683B
main_37.gif 661B
main_05.gif 640B
main_31.gif 552B
cry_smile.gif 468B
angel_smile.gif 465B
confused_smile.gif 464B
sad_smile.gif 460B
wink_smile.gif 458B
whatchutalkingabout_smile.gif 452B
omg_smile.gif 451B
regular_smile.gif 450B
shades_smile.gif 449B
tounge_smile.gif 446B
angry_smile.gif 443B
teeth_smile.gif 442B
embaressed_smile.gif 442B
devil_smile.gif 436B
envelope.gif 426B
template3.gif 422B
thumbs_down.gif 408B
thumbs_up.gif 396B
dl.gif 377B
dl.gif 377B
template1.gif 375B
lightbulb.gif 368B
button09.gif 335B
template2.gif 333B
main_21.gif 317B
main_34.gif 292B
kiss.gif 241B
button04.gif 224B
共 576 条
- 1
- 2
- 3
- 4
- 5
- 6
资源评论
- weixin_553718552024-07-04发现一个宝藏资源,资源有很高的参考价值,赶紧学起来~
梦回阑珊
- 粉丝: 5445
- 资源: 1707
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功