JavaWeb房屋租赁管理系统(servlet+jsp+mysql)

costStatistic_endTime date DEFAULT NULL,

costStatistic_contractID varchar(50) COLLATE utf8_bin DEFAULT NULL,

costStatistic_clientName varchar(50) COLLATE utf8_bin DEFAULT NULL,

costStatistic_houseNumber varchar(50) COLLATE utf8_bin DEFAULT NULL,

costStatistic_startNumber int(50) DEFAULT NULL,

costStatistic_endNumber int(50) DEFAULT NULL,

costStatistic_quantity int(50) DEFAULT NULL,

costStatistic_price float(50,4) DEFAULT NULL,

costStatistic_amount decimal(50,6) DEFAULT NULL,

costStatistic_receipt int(1) DEFAULT NULL,

costStatistic_receiptMan varchar(50) COLLATE utf8_bin DEFAULT NULL,

costStatistic_receiptDate datetime DEFAULT NULL,

costStatistic_period date DEFAULT NULL,

costStatistic_receiptType varchar(50) COLLATE utf8_bin DEFAULT NULL,

PRIMARY KEY (costStatistic_id),

KEY costStatistic_subject (costStatistic_subject),

CONSTRAINT costSubject FOREIGN KEY (costStatistic_subject) REFERENCES costsubject (costSubject_id)

) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;


– Records of coststatistic


INSERT INTO coststatistic VALUES (‘0’, ‘12’, ‘2014-06-01’, ‘2014-06-30’, ‘0003’, ‘马建斌’, ‘0092’, ‘0’, ‘0’, ‘0’, ‘1.5000’, ‘150.000000’, ‘1’, ‘’, ‘2014-06-01 00:00:00’, ‘2014-02-01’, null);

INSERT INTO coststatistic VALUES (‘1’, ‘12’, ‘2014-06-01’, ‘2014-06-30’, ‘0004’, ‘马建斌’, ‘0093’, ‘0’, ‘0’, ‘0’, ‘2.0000’, ‘200.000000’, ‘1’, ‘管理员’, ‘2014-06-01 00:00:00’, ‘2014-02-01’, ‘信用卡’);

INSERT INTO coststatistic VALUES (‘2’, ‘12’, ‘2014-06-01’, ‘2014-06-30’, ‘0003’, ‘马建斌’, ‘0098’, ‘0’, ‘0’, ‘0’, ‘0.5500’, ‘59.400000’, ‘1’, ‘管理员’, ‘2014-06-30 00:00:00’, ‘2015-03-01’, ‘支付宝’);

INSERT INTO coststatistic VALUES (‘3’, ‘14’, ‘2010-01-01’, ‘2010-03-31’, ‘0002’, ‘马建斌’, ‘0001’, null, null, ‘6000’, ‘0.0300’, ‘180.000000’, ‘1’, ‘管理员’, ‘2012-09-15 00:00:00’, ‘2010-03-01’, ‘现金’);

INSERT INTO coststatistic VALUES (‘4’, ‘13’, ‘2010-01-01’, ‘2010-03-16’, ‘0002’, ‘马建斌’, ‘0001’, null, ‘68’, ‘68’, ‘0.5500’, ‘37.400000’, ‘1’, ‘刘强’, ‘2012-09-15 00:00:00’, ‘2010-03-01’, ‘现金’);

INSERT INTO coststatistic VALUES (‘5’, ‘12’, ‘2012-09-15’, ‘2012-10-14’, ‘0005’, ‘昆明宇通科技有限公司’, ‘0002,0096’, null, null, ‘65’, ‘1.0500’, ‘68.250000’, ‘0’, ‘管理员’, ‘2012-10-10 00:00:00’, ‘2012-09-01’, null);

INSERT INTO coststatistic VALUES (‘7’, ‘13’, ‘2014-01-01’, ‘2014-07-31’, ‘0004’, ‘张明’, ‘0097’, ‘100’, ‘350’, ‘250’, ‘1.0000’, ‘250.000000’, ‘1’, ‘管理员’, ‘2014-07-01 00:00:00’, ‘2014-04-01’, ‘现金’);

INSERT INTO coststatistic VALUES (‘8’, ‘12’, ‘2014-07-01’, ‘2014-07-31’, ‘0002’, ‘马建斌’, ‘00002’, ‘0’, ‘0’, ‘0’, ‘0.5000’, ‘54.000000’, ‘1’, ‘’, ‘2014-07-01 00:00:00’, ‘2014-07-01’, null);

INSERT INTO coststatistic VALUES (‘9’, ‘12’, ‘2014-07-01’, ‘2014-07-31’, ‘0002’, ‘马建斌’, ‘0001’, ‘0’, ‘0’, ‘0’, ‘0.8000’, ‘80.000000’, ‘1’, ‘管理员’, ‘2014-07-30 00:00:00’, ‘2014-03-01’, ‘银行’);


– Table structure for costsubject


DROP TABLE IF EXISTS costsubject;

CREATE TABLE costsubject (

costSubject_id int(11) NOT NULL,

costSubject_name varchar(50) COLLATE utf8_bin DEFAULT NULL,

costSubject_price decimal(20,2) DEFAULT NULL,

costSubject_type varchar(50) COLLATE utf8_bin DEFAULT NULL,

costSubject_firstTime datetime DEFAULT NULL,

PRIMARY KEY (costSubject_id)

) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;


– Records of costsubject


INSERT INTO costsubject VALUES (‘12’, ‘物业管理费’, ‘1.05’, ‘按面积’, ‘2010-03-02 00:00:00’);

INSERT INTO costsubject VALUES (‘13’, ‘电费’, ‘0.70’, ‘按面积’, ‘2014-06-03 00:00:00’);

INSERT INTO costsubject VALUES (‘14’, ‘违约金’, ‘0.03’, ‘按合同额百分比’, ‘2010-03-16 00:00:00’);

INSERT INTO costsubject VALUES (‘15’, ‘垃圾费’, ‘5.00’, ‘按面积’, ‘2014-06-26 00:00:00’);

INSERT INTO costsubject VALUES (‘17’, ‘测试’, ‘1.00’, ‘按面积’, ‘2014-06-04 00:00:00’);


– Table structure for deposit


DROP TABLE IF EXISTS deposit;

CREATE TABLE deposit (

deposit_id int(11) NOT NULL AUTO_INCREMENT,

receipts_number varchar(15) COLLATE utf8_bin DEFAULT NULL,

receipts_type varchar(15) COLLATE utf8_bin DEFAULT NULL,

recordDate datetime DEFAULT NULL,

receiptPeople varchar(20) COLLATE utf8_bin DEFAULT NULL,

contract_number varchar(20) COLLATE utf8_bin DEFAULT NULL,

billNumber varchar(15) COLLATE utf8_bin DEFAULT NULL,

deposit_memo varchar(200) COLLATE utf8_bin DEFAULT NULL,

deposit_amount decimal(19,4) DEFAULT NULL,

deposit_type int(11) DEFAULT NULL,

deposit_main varchar(50) COLLATE utf8_bin DEFAULT NULL,

receipt_name varchar(50) COLLATE utf8_bin DEFAULT NULL,

PRIMARY KEY (deposit_id),

KEY pc (contract_number),

CONSTRAINT pc FOREIGN KEY (contract_number) REFERENCES contractinfo (contract_number)

) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;


– Records of deposit


INSERT INTO deposit VALUES (‘0’, ‘0001’, ‘押金收款’, ‘2014-07-16 00:00:00’, ‘管理员’, ‘10002’, null, ‘’, ‘6000.0000’, ‘0’, null, ‘支付宝’);

INSERT INTO deposit VALUES (‘1’, ‘0002’, ‘押金收款’, ‘2014-07-15 00:00:00’, ‘管理员’, ‘10006’, null, ‘徐子超’, ‘1800.0000’, null, null, ‘null’);

INSERT INTO deposit VALUES (‘3’, ‘TKD-0001’, ‘押金退款’, ‘2014-07-30 00:00:00’, ‘管理员’, ‘10006’, null, ‘退手续费100元’, ‘100.0000’, null, null, null);

INSERT INTO deposit VALUES (‘4’, ‘TKD-0002’, ‘押金退款’, ‘2014-07-16 00:00:00’, ‘管理员’, ‘10006’, null, ‘电饭锅’, ‘33.0000’, null, null, null);

INSERT INTO deposit VALUES (‘14’, ‘0003’, ‘押金收款’, ‘2014-07-24 00:00:00’, ‘管理员’, ‘10004’, null, ‘你好’, ‘90000.0000’, null, null, ‘null’);

INSERT INTO deposit VALUES (‘15’, ‘0004’, ‘押金收款’, ‘2014-06-18 11:30:58’, ‘管理员’, ‘10004’, null, ‘你好’, ‘10001.0000’, null, null, null);


– Table structure for developers


DROP TABLE IF EXISTS developers;

CREATE TABLE developers (

developer_id int(11) NOT NULL AUTO_INCREMENT,

developer_number varchar(4) COLLATE utf8_bin DEFAULT NULL,

developer_name varchar(50) COLLATE utf8_bin DEFAULT NULL,

developer_spellName varchar(50) COLLATE utf8_bin DEFAULT NULL,

PRIMARY KEY (developer_id)

) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;


– Records of developers


INSERT INTO developers VALUES (‘3’, ‘0001’, ‘昆明灵豚科技有限公司’, null);

INSERT INTO developers VALUES (‘5’, ‘0003’, ‘河北省’, null);

INSERT INTO developers VALUES (‘6’, ‘0004’, ‘软件园’, null);

INSERT INTO developers VALUES (‘7’, ‘0005’, ‘工业大学’, null);

INSERT INTO developers VALUES (‘8’, ‘0006’, ‘计算机学院’, null);

INSERT INTO developers VALUES (‘9’, ‘0007’, ‘计算机科学与软件学院’, null);


– Table structure for equipment


DROP TABLE IF EXISTS equipment;

CREATE TABLE equipment (

equip_id int(11) NOT NULL AUTO_INCREMENT,

equip_number varchar(4) COLLATE utf8_bin DEFAULT NULL,

equip_name varchar(50) COLLATE utf8_bin DEFAULT NULL,

equip_spellName varchar(50) COLLATE utf8_bin DEFAULT NULL,

PRIMARY KEY (equip_id)

) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;


– Records of equipment


INSERT INTO equipment VALUES (‘1’, ‘0001’, ‘水表’, null);

INSERT INTO equipment VALUES (‘3’, ‘0002’, ‘卫生设施’, null);

INSERT INTO equipment VALUES (‘10’, ‘0003’, ‘配电设施’, null);

INSERT INTO equipment VALUES (‘11’, ‘0004’, ‘其他’, null);


– Table structure for floorinfo


DROP TABLE IF EXISTS floorinfo;

CREATE TABLE floorinfo (

floorInfo_id int(11) NOT NULL AUTO_INCREMENT,

floorInfo_number varchar(4) COLLATE utf8_bin DEFAULT NULL,

floorInfo_name varchar(50) COLLATE utf8_bin DEFAULT NULL,

floorInfo_propertyname varchar(50) COLLATE utf8_bin DEFAULT NULL,

floorInfo_type varchar(50) COLLATE utf8_bin DEFAULT NULL,

floorInfo_floorAera varchar(20) COLLATE utf8_bin DEFAULT NULL,

floorInfo_coveredAera varchar(20) COLLATE utf8_bin DEFAULT NULL,

floorInfo_site varchar(50) COLLATE utf8_bin DEFAULT NULL,

floorInfo_memo varchar(50) COLLATE utf8_bin DEFAULT NULL,

PRIMARY KEY (floorInfo_id)

) ENGINE=InnoDB AUTO_INCREMENT=4427 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;


– Records of floorinfo


INSERT INTO floorinfo VALUES (‘0’, ‘0001’, ‘红军街’, ‘我的物业’, ‘其他’, ‘’, ‘’, ‘’, ‘’);

INSERT INTO floorinfo VALUES (‘1’, ‘0002’, ‘商务楼’, ‘昆明世纪城’, ‘厂房’, ‘’, ‘’, ‘’, ‘’);

INSERT INTO floorinfo VALUES (‘4423’, ‘0003’, ‘府前街’, ‘我的物业’, ‘办公’, ‘’, ‘’, ‘’, ‘’);

INSERT INTO floorinfo VALUES (‘4424’, ‘0004’, ‘青云路’, ‘天明物业’, ‘职工宿舍’, ‘’, ‘’, ‘’, ‘’);

INSERT INTO floorinfo VALUES (‘4425’, ‘0005’, ‘迎水道’, ‘海泰物业’, ‘职工宿舍’, ‘’, ‘’, ‘’, ‘’);


– Table structure for floortype


DROP TABLE IF EXISTS floortype;

CREATE TABLE floortype (

floorType_id int(11) NOT NULL AUTO_INCREMENT,

floorType_number varchar(4) COLLATE utf8_bin DEFAULT NULL,

floorType_name varchar(50) COLLATE utf8_bin DEFAULT NULL,

floorType_spellName varchar(50) COLLATE utf8_bin DEFAULT NULL,

PRIMARY KEY (floorType_id)

) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;


– Records of floortype


INSERT INTO floortype VALUES (‘8’, ‘0001’, ‘厂房’, null);

INSERT INTO floortype VALUES (‘9’, ‘0002’, ‘办公’, null);

INSERT INTO floortype VALUES (‘10’, ‘0003’, ‘职工宿舍’, null);

INSERT INTO floortype VALUES (‘11’, ‘0004’, ‘其他’, null);


– Table structure for goodsstock


DROP TABLE IF EXISTS goodsstock;

CREATE TABLE goodsstock (

goods_id int(11) NOT NULL AUTO_INCREMENT,

goods_name varchar(50) COLLATE utf8_bin DEFAULT NULL,

goods_standard varchar(50) COLLATE utf8_bin DEFAULT NULL,

goods_number int(11) DEFAULT NULL,

goods_price decimal(19,0) DEFAULT NULL,

goods_totalAmount decimal(19,0) DEFAULT NULL,

goods_memo varchar(250) COLLATE utf8_bin DEFAULT NULL,

House_number varchar(50) COLLATE utf8_bin DEFAULT NULL,

PRIMARY KEY (goods_id)

) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;


– Records of goodsstock


INSERT INTO goodsstock VALUES (‘1’, ‘饮水机’, ‘台’, ‘2’, ‘80’, ‘160’, ‘无’, ‘0001’);

INSERT INTO goodsstock VALUES (‘2’, ‘电视机’, null, ‘1’, ‘5800’, ‘5800’, null, ‘0002’);

INSERT INTO goodsstock VALUES (‘3’, ‘洗衣机’, ‘台’, ‘1’, ‘1200’, ‘1200’, ‘’, ‘0003’);

INSERT INTO goodsstock VALUES (‘4’, ‘洗衣机’, ‘台’, ‘1’, ‘1200’, ‘1200’, ‘’, ‘0004’);


– Table structure for housedirection


DROP TABLE IF EXISTS housedirection;

CREATE TABLE housedirection (

houseD_id int(11) NOT NULL AUTO_INCREMENT,

houseD_number varchar(4) COLLATE utf8_bin DEFAULT NULL,

houseD_name varchar(50) COLLATE utf8_bin DEFAULT NULL,

houseD_spellName varchar(50) COLLATE utf8_bin DEFAULT NULL,

PRIMARY KEY (houseD_id)

) ENGINE=InnoDB AUTO_INCREMENT=34 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;


– Records of housedirection


INSERT INTO housedirection VALUES (‘17’, ‘0001’, ‘坐南朝北’, null);

INSERT INTO housedirection VALUES (‘18’, ‘0002’, ‘坐北朝南’, null);

INSERT INTO housedirection VALUES (‘19’, ‘0003’, ‘坐东朝西’, null);

INSERT INTO housedirection VALUES (‘22’, ‘0004’, ‘坐西朝东’, null);

INSERT INTO housedirection VALUES (‘27’, ‘0005’, ‘东’, null);

INSERT INTO housedirection VALUES (‘28’, ‘0006’, ‘南’, null);

INSERT INTO housedirection VALUES (‘29’, ‘0007’, ‘西’, null);

INSERT INTO housedirection VALUES (‘30’, ‘0008’, ‘北’, null);


– Table structure for houserepair


DROP TABLE IF EXISTS houserepair;

CREATE TABLE houserepair (

houseRepair_id int(11) NOT NULL,

houseRepair_date datetime DEFAULT NULL,

renHouse_id int(11) DEFAULT NULL,

houseRepair_context varchar(200) COLLATE utf8_bin DEFAULT NULL,

houseRepair_repairCompany varchar(50) COLLATE utf8_bin DEFAULT NULL,

houseRepair_spend decimal(19,2) DEFAULT NULL,

houseRepair_memo varchar(200) COLLATE utf8_bin DEFAULT NULL,

PRIMARY KEY (houseRepair_id)

) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;


– Records of houserepair



– Table structure for housestructure


DROP TABLE IF EXISTS housestructure;

CREATE TABLE housestructure (

houseS_id int(11) NOT NULL AUTO_INCREMENT,

houseS_number varchar(4) COLLATE utf8_bin DEFAULT NULL,

houseS_name varchar(50) COLLATE utf8_bin DEFAULT NULL,

houseS_spellName varchar(50) COLLATE utf8_bin DEFAULT NULL,

PRIMARY KEY (houseS_id)

) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;


– Records of housestructure


INSERT INTO housestructure VALUES (‘10’, ‘0001’, ‘瓦木’, null);

INSERT INTO housestructure VALUES (‘11’, ‘0002’, ‘混合’, null);

INSERT INTO housestructure VALUES (‘12’, ‘0003’, ‘框架’, null);

INSERT INTO housestructure VALUES (‘13’, ‘0004’, ‘剪框’, null);

INSERT INTO housestructure VALUES (‘14’, ‘0005’, ‘水泥’, null);


– Table structure for housetype


DROP TABLE IF EXISTS housetype;

CREATE TABLE housetype (

houseType_id int(11) NOT NULL AUTO_INCREMENT,

houseType_number varchar(4) COLLATE utf8_bin DEFAULT NULL,

houseType_name varchar(50) COLLATE utf8_bin DEFAULT NULL,

houseType_spellName varchar(50) COLLATE utf8_bin DEFAULT NULL,

PRIMARY KEY (houseType_id)

) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;


– Records of housetype


INSERT INTO housetype VALUES (‘11’, ‘0001’, ‘单层’, null);

INSERT INTO housetype VALUES (‘12’, ‘0002’, ‘双层’, null);

INSERT INTO housetype VALUES (‘13’, ‘0003’, ‘多层’, null);

INSERT INTO housetype VALUES (‘14’, ‘0004’, ‘单套’, null);

INSERT INTO housetype VALUES (‘15’, ‘0005’, ‘双套’, null);

INSERT INTO housetype VALUES (‘16’, ‘0006’, ‘多套’, null);

INSERT INTO housetype VALUES (‘17’, ‘0007’, ‘其他’, null);


– Table structure for lesson


DROP TABLE IF EXISTS lesson;

CREATE TABLE lesson (

lesson_id int(11) NOT NULL DEFAULT ‘0’,

lesson_number varchar(20) COLLATE utf8_bin DEFAULT NULL,

lesson_name varchar(50) COLLATE utf8_bin DEFAULT NULL,

lesson_ownFloor varchar(50) COLLATE utf8_bin DEFAULT NULL,

lesson_propertyName varchar(50) COLLATE utf8_bin DEFAULT NULL,

lesson_direction varchar(20) COLLATE utf8_bin DEFAULT NULL,

lesson_houseType varchar(20) COLLATE utf8_bin DEFAULT NULL,

lesson_master varchar(20) COLLATE utf8_bin DEFAULT NULL,

lesson_floor varchar(10) COLLATE utf8_bin DEFAULT NULL,

lesson_structure varchar(20) COLLATE utf8_bin DEFAULT NULL,

lesson_rentState varchar(20) COLLATE utf8_bin DEFAULT NULL,

lesson_memo varchar(50) COLLATE utf8_bin DEFAULT NULL,

lesson_pitch varchar(2) COLLATE utf8_bin DEFAULT NULL,

lesson_aera varchar(20) COLLATE utf8_bin DEFAULT NULL,

PRIMARY KEY (lesson_id)

) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;


– Records of lesson


INSERT INTO lesson VALUES (‘2737’, ‘0001’, ‘红军街112号’, ‘红军街’, ‘我的物业’, ‘’, ‘’, ‘’, ‘’, ‘’, ‘未出租’, ‘’, ‘假’, ‘56’);

INSERT INTO lesson VALUES (‘2738’, ‘0002’, ‘红军街113号’, ‘红军街’, ‘我的物业’, ‘’, ‘’, ‘’, ‘’, ‘’, ‘已出租’, ‘’, ‘假’, ‘65’);

INSERT INTO lesson VALUES (‘2743’, ‘0096’, ‘A-120’, ‘商务楼’, ‘昆明世纪城’, ‘坐南朝北’, ‘单层’, ‘浙江省农业科学院柑桔研究所’, ‘1’, ‘框架’, ‘已出租’, ‘’, ‘假’, ‘’);

INSERT INTO lesson VALUES (‘2744’, ‘0097’, ‘A-121’, ‘商务楼’, ‘昆明世纪城’, ‘坐南朝北’, ‘单层’, ‘浙江省农业科学院柑桔研究所’, ‘3’, ‘框架’, ‘已出租’, ‘’, ‘假’, ‘0’);

INSERT INTO lesson VALUES (‘2745’, ‘0098’, ‘A-122’, ‘商务楼’, ‘昆明世纪城’, ‘坐南朝北’, ‘单层’, ‘浙江省农业科学院柑桔研究所’, ‘2’, ‘瓦木’, ‘已出租’, ‘’, ‘假’, ‘0’);

INSERT INTO lesson VALUES (‘2746’, ‘0099’, ‘A-123’, ‘商务楼’, ‘昆明世纪城’, ‘坐南朝北’, ‘单层’, ‘浙江省农业科学院柑桔研究所’, ‘2’, ‘瓦木’, ‘已出租’, ‘’, ‘假’, ‘’);

INSERT INTO lesson VALUES (‘2750’, ‘0100’, ‘A-125’, ‘红军街’, ‘我的物业’, ‘坐南朝北’, ‘单层’, ‘’, ‘1’, ‘瓦木’, ‘已出租’, ‘’, ‘假’, ‘0’);

INSERT INTO lesson VALUES (‘2753’, ‘0101’, ‘A-125’, ‘红军街’, ‘我的物业’, ‘’, ‘’, ‘’, ‘’, ‘’, ‘未出租’, ‘’, ‘假’, ‘0’);


– Table structure for ownerinfo


DROP TABLE IF EXISTS ownerinfo;

CREATE TABLE ownerinfo (

owner_id int(11) NOT NULL AUTO_INCREMENT,

owner_number varchar(10) COLLATE utf8_bin DEFAULT NULL,

owner_name varchar(255) COLLATE utf8_bin DEFAULT NULL,

owner_sex varchar(2) COLLATE utf8_bin DEFAULT NULL,

owner_IDNumber varchar(18) COLLATE utf8_bin DEFAULT NULL,

owner_phoneNumber varchar(30) COLLATE utf8_bin DEFAULT NULL,

owner_address varchar(50) COLLATE utf8_bin DEFAULT NULL,

owner_memo varchar(50) COLLATE utf8_bin DEFAULT NULL,

PRIMARY KEY (owner_id)

) ENGINE=InnoDB AUTO_INCREMENT=41 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;


– Records of ownerinfo


INSERT INTO ownerinfo VALUES (‘1’, ‘51’, ‘李浩然’, ‘男’, ‘0101’, ‘110’, ‘山东省’, null);

INSERT INTO ownerinfo VALUES (‘3’, ‘51’, ‘刘小曼’, ‘女’, ‘0202’, ‘120’, ‘河北省’, null);

INSERT INTO ownerinfo VALUES (‘7’, ‘53’, ‘刘伟’, ‘女’, ‘0301’, ‘114’, ‘塘沽’, null);

INSERT INTO ownerinfo VALUES (‘8’, ‘54’, ‘徐子超’, ‘男’, ‘1102’, ‘119’, ‘江西省’, null);

INSERT INTO ownerinfo VALUES (‘10’, ‘55’, ‘刑亚文’, ‘女’, ‘0401’, ‘911’, ‘河南省’, null);

INSERT INTO ownerinfo VALUES (‘12’, ‘56’, ‘刘承’, ‘女’, ‘0502’, ‘10068’, ‘黑龙江’, null);

INSERT INTO ownerinfo VALUES (‘13’, ‘57’, ‘鲍宁’, ‘男’, ‘0303’, ‘1008611’, ‘山东省’, null);

INSERT INTO ownerinfo VALUES (‘14’, ‘58’, ‘卢青’, ‘女’, ‘0911’, ‘12706’, ‘河北省’, null);


– Table structure for propertyinfo


DROP TABLE IF EXISTS propertyinfo;

CREATE TABLE propertyinfo (

property_id int(11) NOT NULL AUTO_INCREMENT,

property_number varchar(10) COLLATE utf8_bin DEFAULT NULL,

property_name varchar(50) COLLATE utf8_bin DEFAULT NULL,

peoperty_developers varchar(50) COLLATE utf8_bin DEFAULT NULL,

PRIMARY KEY (property_id)

) ENGINE=InnoDB AUTO_INCREMENT=122 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;


– Records of propertyinfo


INSERT INTO propertyinfo VALUES (‘0’, ‘0001’, ‘我的物业’, ‘’);

INSERT INTO propertyinfo VALUES (‘1’, ‘0002’, ‘昆明世纪城’, ‘’);

INSERT INTO propertyinfo VALUES (‘120’, ‘003’, ‘天津’, ‘河北省’);


– Table structure for receiptway


DROP TABLE IF EXISTS receiptway;

CREATE TABLE receiptway (

receipt_id int(11) NOT NULL AUTO_INCREMENT,

receipt_code varchar(10) COLLATE utf8_bin DEFAULT NULL,

receipt_name varchar(50) COLLATE utf8_bin DEFAULT NULL,

PRIMARY KEY (receipt_id)

) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;


– Records of receiptway


INSERT INTO receiptway VALUES (‘1’, ‘0001’, ‘现金’);

INSERT INTO receiptway VALUES (‘2’, ‘0002’, ‘银行’);

INSERT INTO receiptway VALUES (‘3’, ‘0003’, ‘支付宝’);


– Table structure for rentclientsum


DROP TABLE IF EXISTS rentclientsum;

CREATE TABLE rentclientsum (

clientname varchar(20) COLLATE utf8_bin NOT NULL,

datanumber varchar(20) COLLATE utf8_bin NOT NULL,

contractnumber varchar(20) COLLATE utf8_bin NOT NULL,

recorddate datetime NOT NULL,

contractsumoney varchar(20) COLLATE utf8_bin NOT NULL,

abstract varchar(30) COLLATE utf8_bin NOT NULL,

startdate datetime NOT NULL,

enddate datetime NOT NULL,

givemoney varchar(20) COLLATE utf8_bin NOT NULL,

PRIMARY KEY (clientname)

) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;


– Records of rentclientsum



– Table structure for rentdetail


DROP TABLE IF EXISTS rentdetail;

CREATE TABLE rentdetail (

rentD_id int(11) NOT NULL AUTO_INCREMENT,

rentD_receiptNumber varchar(15) COLLATE utf8_bin DEFAULT NULL,

rentD_receiptProgram varchar(40) COLLATE utf8_bin DEFAULT NULL,

rentD_totalAmount decimal(19,2) DEFAULT NULL,

rentD_memo varchar(200) COLLATE utf8_bin DEFAULT NULL,

PRIMARY KEY (rentD_id)

) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;


– Records of rentdetail


INSERT INTO rentdetail VALUES (‘1’, ‘10001’, ‘租金’, ‘6000.00’, null);

INSERT INTO rentdetail VALUES (‘2’, ‘10002’, ‘租金’, ‘21600.00’, null);

INSERT INTO rentdetail VALUES (‘3’, ‘10003’, ‘租金’, ‘21600.00’, null);

INSERT INTO rentdetail VALUES (‘4’, ‘10004’, ‘租金’, ‘25346.00’, null);

INSERT INTO rentdetail VALUES (‘6’, ‘10005’, ‘租金’, ‘2000.00’, null);

INSERT INTO rentdetail VALUES (‘7’, ‘10006’, ‘租金’, ‘1300.00’, null);

INSERT INTO rentdetail VALUES (‘8’, ‘10007’, ‘租金’, ‘2620.00’, null);

INSERT INTO rentdetail VALUES (‘15’, ‘10008’, ‘租金’, ‘1200.00’, null);


– Table structure for renthouseinfor


DROP TABLE IF EXISTS renthouseinfor;

CREATE TABLE renthouseinfor (

rentHouse_id int(11) NOT NULL AUTO_INCREMENT,

rentHouse_number varchar(20) COLLATE utf8_bin DEFAULT NULL,

rentHouse_name varchar(50) COLLATE utf8_bin DEFAULT NULL,

rentHouse_belongFloor varchar(50) COLLATE utf8_bin DEFAULT NULL,

property_name varchar(50) COLLATE utf8_bin DEFAULT NULL,

rentHouse_direction varchar(20) COLLATE utf8_bin DEFAULT NULL,

rentHouse_type varchar(20) COLLATE utf8_bin DEFAULT NULL,

rentHouse_master varchar(20) COLLATE utf8_bin DEFAULT NULL,

rentHouse_floor varchar(10) COLLATE utf8_bin DEFAULT NULL,

rentHouse_structure varchar(20) COLLATE utf8_bin DEFAULT NULL,

rentHouse_state varchar(20) COLLATE utf8_bin DEFAULT NULL,

rentHouse_memo varchar(50) COLLATE utf8_bin DEFAULT NULL,

rentHouse_pitch varchar(2) COLLATE utf8_bin DEFAULT NULL,

rentHouse_aera varchar(20) COLLATE utf8_bin DEFAULT NULL,

PRIMARY KEY (rentHouse_id)

) ENGINE=InnoDB AUTO_INCREMENT=2758 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;


– Records of renthouseinfor


INSERT INTO renthouseinfor VALUES (‘2737’, ‘0001’, ‘红军街112号’, ‘红军街’, ‘我的物业’, ‘’, ‘’, ‘’, ‘’, ‘’, ‘未出租’, ‘’, ‘假’, ‘56’);

INSERT INTO renthouseinfor VALUES (‘2738’, ‘0002’, ‘红军街113号’, ‘红军街’, ‘我的物业’, ‘’, ‘’, ‘’, ‘’, ‘’, ‘已出租’, ‘’, ‘假’, ‘65’);

INSERT INTO renthouseinfor VALUES (‘2743’, ‘0003’, ‘A-120’, ‘商务楼’, ‘昆明世纪城’, ‘坐南朝北’, ‘单层’, ‘浙江省农业科学院柑桔研究所’, ‘1’, ‘框架’, ‘已出租’, ‘’, ‘假’, ‘’);

INSERT INTO renthouseinfor VALUES (‘2744’, ‘0004’, ‘A-121’, ‘商务楼’, ‘昆明世纪城’, ‘坐南朝北’, ‘单层’, ‘浙江省农业科学院柑桔研究所’, ‘3’, ‘框架’, ‘已出租’, ‘’, ‘假’, ‘0’);

INSERT INTO renthouseinfor VALUES (‘2745’, ‘0005’, ‘A-122’, ‘商务楼’, ‘昆明世纪城’, ‘坐南朝北’, ‘单层’, ‘浙江省农业科学院柑桔研究所’, ‘2’, ‘瓦木’, ‘已出租’, ‘’, ‘假’, ‘0’);

INSERT INTO renthouseinfor VALUES (‘2746’, ‘0006’, ‘A-123’, ‘商务楼’, ‘昆明世纪城’, ‘坐南朝北’, ‘单层’, ‘浙江省农业科学院柑桔研究所’, ‘2’, ‘瓦木’, ‘已出租’, ‘’, ‘假’, ‘’);

INSERT INTO renthouseinfor VALUES (‘2750’, ‘0007’, ‘A-125’, ‘红军街’, ‘我的物业’, ‘坐南朝北’, ‘单层’, ‘’, ‘1’, ‘瓦木’, ‘已出租’, ‘’, ‘假’, ‘0’);

INSERT INTO renthouseinfor VALUES (‘2753’, ‘0008’, ‘A-125’, ‘红军街’, ‘我的物业’, ‘’, ‘’, ‘’, ‘’, ‘’, ‘未出租’, ‘’, ‘假’, ‘0’);

INSERT INTO renthouseinfor VALUES (‘2755’, ‘0009’, ‘商务楼11-01’, ‘商务楼’, ‘昆明世纪城’, ‘坐南朝北’, ‘单层’, ‘刘小曼’, ‘1’, ‘瓦木’, ‘未出租’, ‘’, null, ‘150’);


– Table structure for rentmoney


DROP TABLE IF EXISTS rentmoney;

CREATE TABLE rentmoney (

rentM_id int(11) NOT NULL AUTO_INCREMENT,

rentM_receiptNumber varchar(15) COLLATE utf8_bin DEFAULT NULL,

rentM_receiptType varchar(15) COLLATE utf8_bin DEFAULT NULL,

rentM_recordDate datetime DEFAULT NULL,

rentM_receiptPeople varchar(20) COLLATE utf8_bin DEFAULT NULL,

contract_number varchar(20) COLLATE utf8_bin DEFAULT NULL,

billNumber varchar(15) COLLATE utf8_bin DEFAULT NULL,

rentM_memo varchar(200) COLLATE utf8_bin DEFAULT NULL,

startRentDate datetime DEFAULT NULL,

endRentDate datetime DEFAULT NULL,

rentM_sign tinyint(4) DEFAULT NULL,

receipt_name varchar(50) COLLATE utf8_bin DEFAULT NULL,

PRIMARY KEY (rentM_id)

) ENGINE=InnoDB AUTO_INCREMENT=48 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;


– Records of rentmoney


INSERT INTO rentmoney VALUES (‘14’, ‘10001’, ‘租金收款’, ‘2013-07-11 00:00:00’, ‘管理员’, ‘10001’, null, null, ‘2013-07-01 00:00:00’, ‘2013-07-31 00:00:00’, null, null);

INSERT INTO rentmoney VALUES (‘15’, ‘10002’, ‘租金收款’, ‘2014-07-22 00:00:00’, ‘管理员’, ‘10002’, ‘456789’, ‘’, ‘2014-07-03 00:00:00’, ‘2014-07-23 00:00:00’, null, ‘银行’);

INSERT INTO rentmoney VALUES (‘19’, ‘10003’, ‘租金收款’, ‘2012-10-21 00:00:00’, ‘管理员’, ‘10003’, ‘’, ‘’, ‘2010-03-08 00:00:00’, ‘2012-11-07 00:00:00’, ‘0’, ‘银行’);

INSERT INTO rentmoney VALUES (‘21’, ‘10004’, ‘租金收款’, ‘2014-12-08 00:00:00’, ‘管理员’, ‘10004’, ‘’, ‘’, ‘2014-07-02 00:00:00’, ‘2014-12-24 00:00:00’, null, ‘银行’);

INSERT INTO rentmoney VALUES (‘22’, ‘10005’, ‘租金收款’, ‘2014-02-08 00:00:00’, ‘管理员’, ‘10005’, ‘’, ‘’, ‘2014-01-02 00:00:00’, ‘2014-07-24 00:00:00’, null, ‘银行’);

INSERT INTO rentmoney VALUES (‘46’, ‘10006’, null, ‘2014-07-10 00:00:00’, ‘管理员’, ‘10008’, ‘23’, ‘23’, ‘2014-06-03 00:00:00’, ‘2014-07-10 00:00:00’, null, ‘银行’);

INSERT INTO rentmoney VALUES (‘47’, ‘10007’, null, ‘2014-06-10 00:00:00’, ‘管理员’, ‘10008’, ‘23’, ‘23’, ‘2014-06-03 00:00:00’, ‘2014-07-10 00:00:00’, null, ‘银行’);


– Table structure for rentroom


DROP TABLE IF EXISTS rentroom;

CREATE TABLE rentroom (

rentR_id int(11) NOT NULL AUTO_INCREMENT,

rentR_contractNumber varchar(20) COLLATE utf8_bin DEFAULT NULL,

rentR_roomNumber varchar(20) COLLATE utf8_bin DEFAULT NULL,

rentR_roomName varchar(30) COLLATE utf8_bin DEFAULT NULL,

rentR_ownFloor varchar(50) COLLATE utf8_bin DEFAULT NULL,

rentR_monthRent decimal(19,2) DEFAULT NULL,

PRIMARY KEY (rentR_id)

) ENGINE=InnoDB AUTO_INCREMENT=149 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;


– Records of rentroom


INSERT INTO rentroom VALUES (‘2’, ‘10007’, ‘777’, ‘A_132’, null, ‘1234.00’);

INSERT INTO rentroom VALUES (‘10’, ‘10002’, ‘0001’, ‘A-121’, null, ‘1230.00’);

INSERT INTO rentroom VALUES (‘11’, ‘10003’, ‘0098’, ‘A-122’, null, ‘2330.00’);

INSERT INTO rentroom VALUES (‘12’, ‘10004’, ‘0097’, ‘A-124’, null, ‘32.00’);

INSERT INTO rentroom VALUES (‘19’, ‘10005’, ‘0002’, ‘A-126’, null, ‘22220.00’);

INSERT INTO rentroom VALUES (‘55’, ‘10001’, ‘00003’, ‘A-555’, null, ‘6000.00’);

INSERT INTO rentroom VALUES (‘126’, ‘10006’, ‘666’, ‘A-131’, null, ‘1200.00’);

INSERT INTO rentroom VALUES (‘147’, ‘10008’, null, null, null, ‘23.00’);

INSERT INTO rentroom VALUES (‘148’, ‘10008’, null, null, null, ‘23.00’);


– Table structure for user


DROP TABLE IF EXISTS user;

CREATE TABLE user (

user_id int(11) NOT NULL AUTO_INCREMENT,

user_name varchar(50) COLLATE utf8_bin DEFAULT NULL,

user_pwd varchar(50) COLLATE utf8_bin DEFAULT NULL,

user_manage tinyint(4) DEFAULT NULL,

user_info tinyint(4) DEFAULT NULL,

rentManage tinyint(4) DEFAULT NULL,

financeManage tinyint(4) DEFAULT NULL,

dataManage tinyint(4) DEFAULT NULL,

statisticForm tinyint(4) DEFAULT NULL,

registerDate datetime DEFAULT NULL,

lastDate datetime DEFAULT NULL,

startDays int(11) DEFAULT NULL,

PRIMARY KEY (user_id)

) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;


– Records of user


INSERT INTO user VALUES (‘2’, ‘管理员’, ‘8888’, ‘1’, ‘1’, ‘1’, ‘1’, ‘1’, ‘1’, ‘2014-06-08 11:19:12’, ‘2014-06-13 09:09:32’, ‘5’);

INSERT INTO user VALUES (‘10’, ‘张三’, ‘8888’, ‘0’, ‘1’, ‘0’, ‘0’, ‘1’, ‘0’, null, null, null);

INSERT INTO user VALUES (‘11’, ‘zs’, ‘1234’, ‘1’, ‘0’, ‘0’, ‘0’, ‘0’, ‘0’, null, null, null);

二、系统展示

=====================================================================

1.登陆页


在这里插入图片描述

2.房屋区域


在这里插入图片描述

3.合同管理


在这里插入图片描述

4.租金管理


在这里插入图片描述

5.押金管理


在这里插入图片描述

6.收费管理


在这里插入图片描述

7.租金统计


在这里插入图片描述

8.合同档案明细


在这里插入图片描述

9.代码库


在这里插入图片描述

10.业主信息


在这里插入图片描述

11.客户管理


在这里插入图片描述

12.房屋管理


在这里插入图片描述

三、部分代码

=====================================================================

LoginServlet


package com.Team5.Servlet;

import java.io.IOException;

import java.io.PrintWriter;

import javax.servlet.ServletException;

import javax.servlet.http.HttpServlet;

import javax.servlet.http.HttpServletRequest;

import javax.servlet.http.HttpServletResponse;

import javax.servlet.http.HttpSession;

import com.Team5.Bean.UserBean;

import com.Team5.Dao.UserDao;

/**

  • Servlet implementation class LoginServlet

*/

public class LoginServlet extends HttpServlet

{

private static final long serialVersionUID = 1L;

/**

  • @see HttpServlet#HttpServlet()

*/

public LoginServlet()

{

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

this.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.setContentType(“text/html;charset=utf-8”);

HttpSession session = request.getSession();

PrintWriter out = response.getWriter();

String user_name = request.getParameter(“user_name”);

String pwd = request.getParameter(“pwd”);

// System.out.println(user_name);

UserDao ud = new UserDao();

UserBean ub = ud.findUserByUname(user_name);

if (ub != null)

{

if (ub.getUser_pwd().equals(pwd))

{

session.setAttribute(“user”, ub);

// response.sendRedirect(“/HouseManager/JSP/MainWindows/index.jsp”);

out.print(“chg”);

} else

{

out.print(“密码错误!”);

}

} else

{

out.print(“用户不存在!”);

}

}

}

OwnerInfoServlet


package com.Team5.Servlet;

import java.io.IOException;

import java.io.PrintWriter;

import java.util.List;

import javax.servlet.ServletException;

import javax.servlet.http.HttpServlet;

import javax.servlet.http.HttpServletRequest;

import javax.servlet.http.HttpServletResponse;

import com.Team5.Bean.DevelopersBean;

import com.Team5.Bean.OwnerInfoBean;

import com.Team5.Dao.DevelopersDao;

import com.Team5.Dao.HouseDirectionDao;

import com.Team5.Dao.OwnerInfoDao;

import com.alibaba.fastjson.JSONArray;

import com.alibaba.fastjson.JSONObject;

/**

  • Servlet implementation class OwnerInfoDao

*/

public class OwnerInfoServlet extends HttpServlet {

private static final long serialVersionUID = 1L;

/**

  • @see HttpServlet#HttpServlet()

*/

public OwnerInfoServlet() {

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

this.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.setContentType(“text/html;charset=utf-8”);

String edit = request.getParameter(“edit”);

System.out.println(“edit===”+edit);

if(“add”.equals(edit)){

try {

int owner_number =Integer.parseInt(request.getParameter(“owner_number”)) ;

String owner_name = request.getParameter(“owner_name”);

String owner_phoneNumber = request.getParameter(“owner_phoneNumber”);

String owner_address = request.getParameter(“owner_address”);

OwnerInfoDao OInfoD = new OwnerInfoDao();

int a=OInfoD.addOwnerInfo(owner_number, owner_name, owner_phoneNumber, owner_address);

PrintWriter out = response.getWriter();

out.print(“{‘codes1’:1,‘message’:‘保存成功!’}”);

out.flush();

out.close();

} catch (Exception e) {

// TODO Auto-generated catch block

e.printStackTrace();

}

}

else if(“edit”.equals(edit)){

try {

String owner_number =request.getParameter(“owner_number”) ;

String owner_name = request.getParameter(“owner_name”);

String owner_phoneNumber = request.getParameter(“owner_phoneNumber”);

String owner_address = request.getParameter(“owner_address”);

System.out.println(“内容是”+owner_phoneNumber+“===”+owner_number);

OwnerInfoDao OInfoD = new OwnerInfoDao();

int a =OInfoD.editOwnerInfo(owner_number, owner_name,owner_phoneNumber, owner_address);

PrintWriter out = response.getWriter();

out.print(“{“codes1”:2,“message”:“修改成功!”}”);

System.out.print(“chg”);

out.flush();

out.close();

} catch (Exception e) {

// TODO Auto-generated catch block

e.printStackTrace();

}

}else if(“view”.equals(edit)){

try {

OwnerInfoDao OInfoD = new OwnerInfoDao();

List develist = OInfoD.getOwninfolist();

JSONObject obj = new JSONObject();//创建JSONOobj类型的obj对象

obj.put(“total”, develist.size());//堆栈先进后出,多少个obj对象

JSONArray array = new JSONArray();//创建JSONArray类型的array对象

array.addAll(develist);//把"row":[{},{}]添加到array中去

obj.put(“rows”, array);//堆栈先进后出,

String json = obj.toString();

response.setContentType(“text/html;charset=utf-8”);

PrintWriter out = response.getWriter();

out.print(json.toString());

out.flush();

out.close();

} catch (ClassNotFoundException e) {

e.printStackTrace();

}

}

else{

String ss = request.getParameter(“owner_id”);

int a=Integer.parseInt(ss);

try {

OwnerInfoDao OInfoD = new OwnerInfoDao();

int b=OInfoD.delOwnerInfo(a);

System.out.println(“zhelishishanchu======”+ss);

PrintWriter out = response.getWriter();

//out.print(“success”);

out.flush();

out.close();

} catch (Exception e) {

// TODO Auto-generated catch block

e.printStackTrace();

}

}

}

}

AddHouseInfoServlet


package com.Team5.Servlet;

import java.io.IOException;

import java.io.PrintWriter;

import javax.servlet.ServletException;

import javax.servlet.http.HttpServlet;

import javax.servlet.http.HttpServletRequest;

import javax.servlet.http.HttpServletResponse;

import com.Team5.Bean.RentHouseInfoBean;

import com.Team5.Dao.RentHouseInfoDao;

/**

  • Servlet implementation class AddHouseInfoServlet

*/

public class AddHouseInfoServlet extends HttpServlet {

private static final long serialVersionUID = 1L;

/**

  • @see HttpServlet#HttpServlet()

*/

public AddHouseInfoServlet() {

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”);

String num = request.getParameter(“num”);

String name = request.getParameter(“name”);

String property_name = request.getParameter(“property_name”);

String floorInfo_name = request.getParameter(“floorInfo_name”);

String houseD_name = request.getParameter(“houseD_name”);

String houseType_name = request.getParameter(“houseType_name”);

String floor = request.getParameter(“Floor”);

String houseS_name = request.getParameter(“houseS_name”);

String area = request.getParameter(“area”);

String rentState = request.getParameter(“rentState”);

if(rentState.equals(“rent”))

{

rentState = “已出租”;

}else if(rentState.equals(“unrent”)){

rentState = “未出租”;

}

String owner_name = request.getParameter(“owner_name”);

String detail = request.getParameter(“detail”);

RentHouseInfoBean rb = new RentHouseInfoBean();

rb.setRentHouse_number(num);

rb.setRentHouse_name(name);

rb.setProperty_name(property_name);

rb.setRentHouse_belongFloor(floorInfo_name);

rb.setRentHouse_direction(houseD_name);

rb.setRentHouse_type(houseType_name);

rb.setRentHouse_floor(floor);

rb.setRentHouse_structure(houseS_name);

rb.setRentHouse_aera(area);

rb.setRentHouse_state(rentState);

rb.setRentHouse_master(owner_name);

rb.setRentHouse_memo(detail);

RentHouseInfoDao rhid = new RentHouseInfoDao();

int i = rhid.addRentHouse(rb);

response.setContentType(“text/html; charset=UTF-8”);

PrintWriter out = response.getWriter();

if(i==1){out.print(“添加成功!”);}

else{out.print(“添加失败!”);}

}

}

CheckCodeServlet


package com.Team5.Servlet;

import java.awt.Color;

import java.awt.Font;

import java.awt.Graphics2D;

import java.awt.image.BufferedImage;

import java.io.IOException;

import java.util.Random;

import javax.servlet.ServletException;

import javax.servlet.ServletOutputStream;

import javax.servlet.http.HttpServlet;

import javax.servlet.http.HttpServletRequest;

import javax.servlet.http.HttpServletResponse;

import com.sun.image.codec.jpeg.JPEGCodec;

import com.sun.image.codec.jpeg.JPEGImageEncoder;

public class CheckCodeServlet extends HttpServlet {

private static final long serialVersionUID = -479885884254942306L;

//设置验证码图片文字

public static final char[] CHARS = { ‘2’, ‘3’, ‘4’, ‘5’, ‘6’, ‘7’, ‘8’,

‘9’, ‘A’, ‘B’, ‘C’, ‘D’, ‘E’, ‘F’, ‘G’, ‘H’, ‘J’, ‘K’, ‘L’, ‘M’,

‘N’, ‘P’, ‘Q’, ‘R’, ‘S’, ‘T’, ‘U’, ‘V’, ‘W’, ‘X’, ‘Y’, ‘Z’ };

//取得随机数,用来随机获取验正文字

public static Random random = new Random();

public static String getRandomString() {

StringBuffer buffer = new StringBuffer();//定义一个字符串缓存,用来存放验证码

for (int i = 0; i < 4; i++) {//循环六次,随机取得四个验正文字

buffer.append(CHARS[random.nextInt(CHARS.length)]);

}

return buffer.toString();

}

public static Color getRandomColor() {//取得随机颜色

return new Color(random.nextInt(255), random.nextInt(255), random

.nextInt(255));

}

public static Color getReverseColor(Color c) {//取的某个颜色的前景色

return new Color(255 - c.getRed(), 255 - c.getGreen(), 255 - c

.getBlue());

}

public void doGet(HttpServletRequest request, HttpServletResponse response)

throws ServletException, IOException {

response.setContentType(“image/jpeg”);//设置输出类型

String randomString = getRandomString();//调用函数,取得随机字符串

request.getSession(true).setAttribute(“randomString”, randomString);//放到Session中

System.out.println(“这里是验证码字符”+randomString);

//图片的宽度和高度

int width = 100;

int height = 30;

Color color = getRandomColor();

Color reverse = getReverseColor(color);

建立BufferedImage对象。指定图片的长度宽度和色彩。

BufferedImage bi = new BufferedImage(width, height,BufferedImage.TYPE_INT_RGB);

Graphics2D g = bi.createGraphics();//获取绘图对象

g.setFont(new Font(Font.SANS_SERIF, Font.BOLD, 16));//设置字体

g.setColor(color);//设置颜色

g.fillRect(0, 0, width, height);//绘制背景

g.setColor(reverse);

g.drawString(randomString, 18, 20);//绘制随机字符串

for (int i = 0, n = random.nextInt(100); i < n; i++) {//画出最多100个噪点

g.drawRect(random.nextInt(width), random.nextInt(height), 1, 1);

}

// 转成JPEG格式

ServletOutputStream out = response.getOutputStream();

JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out);

encoder.encode(bi);

out.flush();

}

public static void main(String[] args) {

System.out.println(getRandomString());

}

}

ClientinfoDao


package com.Team5.Dao;

import java.sql.Connection;

import java.sql.PreparedStatement;

import java.sql.ResultSet;

import java.sql.SQLException;

import java.sql.Statement;

import java.util.ArrayList;

import java.util.List;

import com.Team5.Bean.ClientinfoBean;

public class ClientinfoDao {

List clientlist;

public ClientinfoDao(){

this.findAllClientInfo();

}

public List findAllClientInfo() {

// TODO Auto-generated method stub

Listcelist = new ArrayList();

ConnDriver cd = new ConnDriver();

int rel=0;

try {

Connection conn = cd.condri();

String sql=“select client_number,client_name,client_phoneNumber,client_MobileNumber,client_address,client_companyName,client_legalPerson,”+

“client_legalPersonIDNumber,client_licenseNumber,client_employeeNumber,client_memo from clientinfo”;

PreparedStatement ps = conn.prepareStatement(sql);

ResultSet rs = ps.executeQuery();

while(rs.next()){

ClientinfoBean rb = new ClientinfoBean();

rb.setClient_number(rs.getString(1));

rb.setClient_name(rs.getString(2));

rb.setClient_phoneNumber(rs.getString(3));

rb.setClient_MobileNumber(rs.getString(4));

rb.setClient_address(rs.getString(5));

rb.setClient_companyName(rs.getString(6));

rb.setClient_legalPerson(rs.getString(7));

rb.setClient_legalPersonIDNumber(rs.getString(8));

rb.setClient_licenseNumber(rs.getString(9));

rb.setClient_employeeNumber(rs.getString(10));

rb.setClient_memo(rs.getString(11));

celist.add(rb);

}

ps.close();

conn.close();

} catch (ClassNotFoundException e) {

// TODO Auto-generated catch block

e.printStackTrace();

} catch (SQLException e) {

// TODO Auto-generated catch block

e.printStackTrace();

}

return celist;

}

public List findOneClientById(String num, String name) {

// TODO Auto-generated method stub

ConnDriver cd = new ConnDriver();

ClientinfoBean rb=null;

Listcelist = new ArrayList();

int rel=0;

try {

Connection conn = cd.condri();

String whe=“”;

if (num !=null && !“”.equals(num)) {

whe+=" and client_number=‘“+num+”’";

}

if (name !=null && !“”.equals(name)) {

whe+=" and client_name=‘“+name+”’";

}

String sql=“select client_number,client_name,client_phoneNumber,client_MobileNumber,client_address,client_companyName,client_legalPerson,”+

“client_legalPersonIDNumber,client_licenseNumber,client_employeeNumber,client_memo from clientinfo where 1=1”+whe+“”;

PreparedStatement ps = conn.prepareStatement(sql);

ResultSet rs = ps.executeQuery();

while(rs.next()){

rb = new ClientinfoBean();

rb.setClient_number(rs.getString(1));

rb.setClient_name(rs.getString(2));

rb.setClient_phoneNumber(rs.getString(3));

rb.setClient_MobileNumber(rs.getString(4));

rb.setClient_address(rs.getString(5));

rb.setClient_companyName(rs.getString(6));

rb.setClient_legalPerson(rs.getString(7));

rb.setClient_legalPersonIDNumber(rs.getString(8));

rb.setClient_licenseNumber(rs.getString(9));

rb.setClient_employeeNumber(rs.getString(10));

rb.setClient_memo(rs.getString(11));

celist.add(rb);

}

ps.close();

conn.close();

} catch (ClassNotFoundException e) {

// TODO Auto-generated catch block

e.printStackTrace();

} catch (SQLException e) {

// TODO Auto-generated catch block

e.printStackTrace();

}

return celist;

}

public int AddClientAll(ClientinfoBean ClientInfo)

throws ClassNotFoundException {

ArrayList clientlist = new ArrayList();

Connection conn = null;

PreparedStatement pstm = null;

int i = 0;

try {

conn = ConnDriver.condri();

String sql = “insert into clientinfo(client_number,client_name,”

  • “client_phoneNumber,client_MobileNumber,client_address,”

  • “client_companyName,client_legalPerson,client_legalPersonIDNumber,”

  • "client_licenseNumber,client_employeeNumber,client_memo) "

  • " values(?,?,?,?,?,?,?,?,?,?,?)";

pstm = conn.prepareStatement(sql);

pstm.setString(1, ClientInfo.getClient_number());

pstm.setString(2, ClientInfo.getClient_name());

pstm.setString(3, ClientInfo.getClient_phoneNumber());

pstm.setString(4, ClientInfo.getClient_MobileNumber());

pstm.setString(5, ClientInfo.getClient_address());

pstm.setString(6, ClientInfo.getClient_companyName());

pstm.setString(7, ClientInfo.getClient_legalPerson());

pstm.setString(8, ClientInfo.getClient_legalPersonIDNumber());

pstm.setString(9, ClientInfo.getClient_licenseNumber());

pstm.setString(10, ClientInfo.getClient_employeeNumber());

pstm.setString(11, ClientInfo.getClient_memo());

i = pstm.executeUpdate();

} catch (ClassNotFoundException e) {

e.printStackTrace();

} catch (SQLException e) {

e.printStackTrace();

}

return i;

}

public int EditClientAll(String num, String name, String phone,String mobile,String address,String contacts,String frname,String number,String license,String

employee,

String memo) throws Exception {

Connection conn = null;

Statement Epstm = null;

int i = 0;

conn = ConnDriver.condri();

String sql = “update clientinfo set client_number='” + num+ “‘, client_name=’” + name

  • “‘,client_phoneNumber=’” + phone + “‘,client_MobileNumber=’” + mobile

  • “‘,client_address=’” + address + “‘,client_companyName=’”+ contacts

  • “‘,client_legalPerson=’” + frname+ “‘,client_legalPersonIDNumber=’” + number

  • “‘,client_licenseNumber=’”+ license + “‘,client_employeeNumber=’” + employee

  • “‘,client_memo=’” + memo + “’ where client_number='” + num +“'”;

Epstm = conn.createStatement();

i = Epstm.executeUpdate(sql);

return i;

}

public int delClient(String client_number) throws Exception{

int rlt = 0;

Connection conn = null;

conn = ConnDriver.condri();

String sql=“delete from clientinfo where client_number='”+client_number+“'”;

PreparedStatement stmt = conn.prepareStatement(sql);

rlt=stmt.executeUpdate();

return rlt;

}

public List findAllCustomer() {

// TODO Auto-generated method stub

List Customerlist = new ArrayList();

try {

Connection conn = ConnDriver.condri();

String sql=“select client_number,client_name,” +

“client_sex,client_IDNumber,” +

"client_phoneNumber,client_address " +

" from clientinfo";

PreparedStatement ps = conn.prepareStatement(sql);

ResultSet rs = ps.executeQuery();

while(rs.next()){

ClientinfoBean rb = new ClientinfoBean();

rb.setClient_number(rs.getString(1));

rb.setClient_name(rs.getString(2));

rb.setClient_sex(rs.getString(3));

rb.setClient_IDNumber(rs.getString(4));

rb.setClient_phoneNumber(rs.getString(5));

rb.setClient_address(rs.getString(6));

Customerlist.add(rb);

}

ps.close();

conn.close();

} catch (Exception e) {

// TODO Auto-generated catch block

e.printStackTrace();

}

return Customerlist;

}

public List findContractInfoByChaxun(String client_number,

String client_name) {

Listcelist = new ArrayList();

ConnDriver cd = new ConnDriver();

int rel=0;

Connection conn = null;

PreparedStatement ps = null;

ResultSet rs = null;

try {

conn = cd.condri();

String s=“”;

if(client_name!=null && !“”.equals(client_name)){

s+=“and client_name='”+client_name+“'”;

}

else if(client_number!=null && !“”.equals(client_number)){

s+=“and client_number='”+client_number+“'”;

}

String sql=“select client_number,client_name,client_phoneNumber,client_MobileNumber,client_address,client_companyName,client_legalPerson,”+

"client_legalPersonIDNumber,client_licenseNumber,client_employeeNumber,client_memo from clientinfo where 1=1 "+s;

ps = conn.prepareStatement(sql);

rs = ps.executeQuery();

while(rs.next()){

ClientinfoBean rb = new ClientinfoBean();

rb.setClient_number(rs.getString(1));

rb.setClient_name(rs.getString(2));

rb.setClient_phoneNumber(rs.getString(3));

rb.setClient_MobileNumber(rs.getString(4));

rb.setClient_address(rs.getString(5));

rb.setClient_companyName(rs.getString(6));

rb.setClient_legalPerson(rs.getString(7));

rb.setClient_legalPersonIDNumber(rs.getString(8));

rb.setClient_licenseNumber(rs.getString(9));

rb.setClient_employeeNumber(rs.getString(10));

rb.setClient_memo(rs.getString(11));

celist.add(rb);

}

} catch (ClassNotFoundException e) {

e.printStackTrace();

} catch (SQLException e) {

e.printStackTrace();

}finally{

try {

ps.close();

} catch (SQLException e) {

e.printStackTrace();

}

try {

conn.close();

} catch (SQLException e) {

e.printStackTrace();

}

}

return celist;

}

public List getClientlist() {

return clientlist;

}

public void setClientlist(List clientlist) {

this.clientlist = clientlist;

}

}

ConnDriver


package com.Team5.Dao;

import java.sql.Connection;

import java.sql.DriverManager;

import java.sql.SQLException;

public class ConnDriver

{

public static Connection condri() throws ClassNotFoundException, SQLException

{

Class.forName(“com.mysql.cj.jdbc.Driver”);

// String url = “jdbc:mysql://10.3.4.10/housedatabase?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8&useSSL=false”;

String url = “jdbc:mysql://localhost:3306/housedatabase?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8&useSSL=false”;

Connection conn = DriverManager.getConnection(url, “root”, “123456”);

return conn;

}

public static Connection condri(String url,String admin,String password) throws ClassNotFoundException, SQLException

{

Class.forName(“com.mysql.cj.jdbc.Driver”);

Connection conn = DriverManager.getConnection(url, admin, password);

return conn;

}

}

SelectTag


package com.Team5.Tag;

import java.lang.reflect.Method;

import java.util.List;

import javax.servlet.jsp.JspException;

import javax.servlet.jsp.JspWriter;

import javax.servlet.jsp.PageContext;

import javax.servlet.jsp.tagext.Tag;

public class SelectTag implements Tag {

private PageContext pageContext;

private String value;

private String text;

private String name;

private String id;

private List items;

private String custom;

@Override

public int doEndTag() throws JspException {

try{

String str_custom = “”;

if (custom != null) {

str_custom = custom;

}

JspWriter out = pageContext.getOut();

out.println(“<select name='”+name+“’ id='”+id+“’ " + custom + " style=‘width:100%;’>”);

out.println(“<option value=“null”>请选择…”);

for (Object item : items) {

//返回itme对象所属的类,并把类赋值给clazz

Class clazz = item.getClass();

Method m1 = clazz.getDeclaredMethod(this.getMethodName(value));//m1==getClassNum()

//Method m1 = clazz.getDeclaredMethod(this.getMethodName(classNum))

//Method m1 = clazz.getDeclaredMethod(getClassNum)

//m1==getClassNum()

Method m2 = clazz.getDeclaredMethod(this.getMethodName(text));//m2==getClassName()

//Method m2 = clazz.getDeclaredMethod(this.getMethodName(className))

//Method m2 = clazz.getDeclaredMethod(getClassName)

//m2==getClassName()

out.println(“”+m2.invoke(item)+“”);

}

out.print(“”);

}catch(Exception e){

e.printStackTrace();

}

return 0;

}

@Override

public int doStartTag() throws JspException {

return 0;

}

private String getMethodName(String property){

String mn=“get”;

mn=mn+property.substring(0, 1).toUpperCase()+property.substring(1);

return mn;

}

@Override

public Tag getParent() {

return null;

}

@Override

public void release() {

}

@Override

public void setPageContext(PageContext arg0) {

this.pageContext=arg0;

}

@Override

public void setParent(Tag arg0) {

}

public void setValue(String value) {

this.value = value;

}

public void setText(String text) {

this.text = text;

}

public void setName(String name) {

this.name = name;

}

public void setItems(List items) {

this.items = items;

}

public void setId(String id) {

this.id = id;

}

public String getCustom() {

return custom;

}

public void setCustom(String custom) {

this.custom = custom;

}

}

HouseManager.jsp


<%@ page language=“java” contentType=“text/html; charset=utf-8”

pageEncoding=“utf-8”%>

<%

String path = request.getContextPath();

String basePath = request.getScheme() + “😕/”

  • request.getServerName() + “:” + request.getServerPort()

  • path + “/”;

%>

房屋管理
房屋档案管理流程 1、建立物业信息 2、建立楼宇信息 3、建立出租房信息

href=“JSP/HouseManager/PropertyInfo.jsp”>

href=“JSP/HouseManager/FloorInfo.jsp”>

href=“JSP/HouseManager/RentHouseInfo.jsp”>

MoneyManager.jsp


<%@ page language=“java” contentType=“text/html; charset=utf-8”

pageEncoding=“utf-8”%>

<%@ taglib prefix=“my” uri=“http://mytag/Select” %>

<%

String path = request.getContextPath();

String basePath = request.getScheme() + “😕/”

  • request.getServerName() + “:” + request.getServerPort()

  • path + “/”;

%>

收费管理
    • 新增收费

    • 批量导入

    • 编辑收费

    • 删除收费

    • 设置已收费

    • 刷新列表

    • 打印催费单

    • 批量催费单

    • 打印收费单

    • 批量收款单

    • 离开

      当前操作费用:

      <jsp:useBean id=“costSubject” class=“com.Team5.Dao.CostsubjectDao”></jsp:useBean>

      <my:select items=“${costSubject.costSublist }” custom=“οnchange=‘show1(this.value)’” name=“costSubject_name” value=“costSubject_name” text=“costSubject_name”></my:select>

      收费情况 不限 已收费 未收费
      客户名称
      • 全部房屋
        • 2014年
          • 10月
          • 2013年
            • 06月
            • style=“height: 30px; background: #A9FACD;”>

              【房屋租赁管理系统——网页版】

              【当前时间:】

              【数据库:本地数据库】

              data-options="rownumbers:true,url:‘CostStatisticServlet’,selectOnCheck:true,

              singleSelect:true,autoRowHeight:false,fit:‘true’,pagination:true,pageSize:10">

              编号 费用期间 科目名称 房屋名称 客户名称 计费周期始 计费周期止 起数 止数 用量 计费标准 金额 是否收款 收款人 收款日期 收款方式 合同编号

              <jsp:include page=“MoneyManageDialog.jsp”></jsp:include>

            评论
            添加红包

            请填写红包祝福语或标题

            红包个数最小为10个

            红包金额最低5元

            当前余额3.43前往充值 >
            需支付:10.00
            成就一亿技术人!
            领取后你会自动成为博主和红包主的粉丝 规则
            hope_wisdom
            发出的红包
            实付
            使用余额支付
            点击重新获取
            扫码支付
            钱包余额 0

            抵扣说明:

            1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
            2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

            余额充值