JavaWeb房屋租賃管理系統(servlet+jsp+mysql)
- 一、系統介紹
-
- 1.軟體環境
- 2.系統功能
- 3.資料庫
- 二、系統展示
-
- 1.登陸頁
- 2.房屋區域
- 3.合同管理
- 4.租金管理
- 5.押金管理
- 6.收費管理
- 7.租金統計
- 8.合同檔案明細
- 9.代碼庫
- 10.業主資訊
- 11.客戶管理
- 12.房屋管理
- 三、部分代碼
-
- LoginServlet
- OwnerInfoServlet
- AddHouseInfoServlet
- CheckCodeServlet
- ClientinfoDao
- ConnDriver
- SelectTag
- HouseManager.jsp
- MoneyManager.jsp
- 四、其他
-
- 1.擷取源碼
- 2.點贊加關注
- 3.部落客微信公衆号
- 4.其他系統實作
-
- JavaWeb系統系列實作
- JavaSwing系統系列實作
一、系統介紹
1.軟體環境
Java:jdk1.8
Mysql:8.0.11
Tomcat:8.0.28
2.系統功能
系統管理
1.修改密碼
2.使用者管理
3.權限管理
4.資料備份與恢複
5.系統資料初始化
基礎資訊管理
1.代碼庫
2.業主資訊
3.客戶管理
4.房源檔案管理
租賃管理
1.合同管理
2.租金到期提醒
3.合同到期提醒
财務管理
1.租金收款管理
2.押金管理
3.收費管理
統計報表
1.租金收款按月統計
2.客戶交租彙總表
3.合同檔案明細表
4.日常收費明細表
5.日常收費彙總表
6.收租統計表
7.押金收退款統計表
3.資料庫
/*
Navicat MySQL Data Transfer
Source Server : localhost_3306
Source Server Version : 50532
Source Host : localhost:3306
Source Database : housedatabase
Target Server Type : MYSQL
Target Server Version : 50532
File Encoding : 65001
Date: 2014-07-04 16:15:26
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for `accessory`
-- ----------------------------
DROP TABLE IF EXISTS `accessory`;
CREATE TABLE `accessory` (
`accessory_id` int(11) NOT NULL DEFAULT '0',
`accessory_name` varchar(255) COLLATE utf8_bin DEFAULT NULL,
`contract_number` varchar(20) COLLATE utf8_bin DEFAULT NULL,
`accessory_data` longblob,
PRIMARY KEY (`accessory_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- ----------------------------
-- Records of accessory
-- ----------------------------
-- ----------------------------
-- Table structure for `clientinfo`
-- ----------------------------
DROP TABLE IF EXISTS `clientinfo`;
CREATE TABLE `clientinfo` (
`client_id` int(11) NOT NULL AUTO_INCREMENT,
`client_number` varchar(10) COLLATE utf8_bin DEFAULT NULL,
`client_name` varchar(255) COLLATE utf8_bin DEFAULT NULL,
`client_sex` varchar(2) COLLATE utf8_bin DEFAULT NULL,
`client_IDNumber` varchar(18) COLLATE utf8_bin DEFAULT NULL,
`client_phoneNumber` varchar(30) COLLATE utf8_bin DEFAULT NULL,
`client_address` varchar(250) COLLATE utf8_bin DEFAULT NULL,
`client_companyName` varchar(250) COLLATE utf8_bin DEFAULT NULL,
`client_memo` varchar(255) COLLATE utf8_bin DEFAULT NULL,
`client_legalPerson` varchar(50) COLLATE utf8_bin DEFAULT NULL,
`client_legalPersonIDNumber` varchar(50) COLLATE utf8_bin DEFAULT NULL,
`client_licenseNumber` varchar(50) COLLATE utf8_bin DEFAULT NULL,
`client_employeeNumber` longtext COLLATE utf8_bin,
`client_MobileNumber` varchar(50) COLLATE utf8_bin DEFAULT NULL,
PRIMARY KEY (`client_id`)
) ENGINE=InnoDB AUTO_INCREMENT=1707 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- ----------------------------
-- Records of clientinfo
-- ----------------------------
INSERT INTO `clientinfo` VALUES ('1587', '0001', '馬建斌', '', ' ', '1388801XXX', ' ', '', ' ', '', '', '', '', '138909911XX');
INSERT INTO `clientinfo` VALUES ('1589', '0002', '昆明宇通科技有限公司', null, null, '1388801XXX', '昆明經濟技術開發區', '張三豐', ' ', '', '', '', '', '138909911XX');
INSERT INTO `clientinfo` VALUES ('1590', '0003', '昆明強林科技有限公司', null, null, '1388801XXX', '昆明市人民中路218号', '張強林', ' ', '', '', '', '', '138909911XX');
INSERT INTO `clientinfo` VALUES ('1592', '0004', '昆明智宇商務有限公司', null, null, '1388801XXX', '昆明市西昌路915S号', '張林', ' ', '張強', '532333', '15525252', 0xE587BAE7BAB3203538323532353232, '138909911XX');
INSERT INTO `clientinfo` VALUES ('1691', '0005', '宇能商務有限公司', null, null, '1388801XXX', ' ', '', ' ', '', '', '', '', '138909911XX');
INSERT INTO `clientinfo` VALUES ('1700', '0006', '何麗真', null, null, ' ', ' ', '', ' ', '', '', '', '', '138909911XX');
INSERT INTO `clientinfo` VALUES ('1701', '0007', '趙二', null, null, '8989XXX', '本市', '趙二', '示範', '532331197807090223', '趙二', '530102550122109', 0xE697A0E99B87E59198, '1581209XXXX');
INSERT INTO `clientinfo` VALUES ('1702', '0008', '張三', null, null, '0228989XXX', '本市', '張三', '示範', '', '張三', '', '', '1581209XXXX');
INSERT INTO `clientinfo` VALUES ('1703', '0009', '劉四', null, null, '8989XXX', '本市', '劉四', '示範', '', '劉四', '', '', '1581209XXXX');
INSERT INTO `clientinfo` VALUES ('1704', '0010', '何強', null, null, '8989XXX', '本市', '何強', '示範', '', '何強', '', '', '1581209XXXX');
INSERT INTO `clientinfo` VALUES ('1705', '011', '張飛', null, null, '022-88596911', '138****5674', '', '', '', '', '', '', '');
-- ----------------------------
-- Table structure for `columnset`
-- ----------------------------
DROP TABLE IF EXISTS `columnset`;
CREATE TABLE `columnset` (
`cloumn_id` int(11) NOT NULL DEFAULT '0',
`cloumn_form` varchar(38) COLLATE utf8_bin DEFAULT NULL,
`cloumn_number` int(11) DEFAULT NULL,
`cloumn_width` int(11) DEFAULT NULL,
`cloumn_title` varchar(100) COLLATE utf8_bin DEFAULT NULL,
`cloumn_view` tinyint(4) DEFAULT NULL,
PRIMARY KEY (`cloumn_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- ----------------------------
-- Records of columnset
-- ----------------------------
INSERT INTO `columnset` VALUES ('38', '物品檔案表', '0', '90', null, '1');
INSERT INTO `columnset` VALUES ('39', '物品檔案表', '1', '3480', '名稱', '1');
INSERT INTO `columnset` VALUES ('40', '物品檔案表', '2', '2250', '規格', '1');
INSERT INTO `columnset` VALUES ('41', '物品檔案表', '3', '1725', '數量', '1');
INSERT INTO `columnset` VALUES ('42', '物品檔案表', '4', '1425', '單價', '1');
INSERT INTO `columnset` VALUES ('43', '物品檔案表', '5', '1890', '總價值', '1');
INSERT INTO `columnset` VALUES ('44', '物品檔案表', '6', '2205', '備注', '1');
INSERT INTO `columnset` VALUES ('45', '物業檔案表', '0', '900', null, '1');
INSERT INTO `columnset` VALUES ('46', '物業檔案表', '1', '900', '代碼', '1');
INSERT INTO `columnset` VALUES ('47', '物業檔案表', '2', '900', '名稱', '1');
INSERT INTO `columnset` VALUES ('48', '物業檔案表', '3', '900', '開發商', '1');
INSERT INTO `columnset` VALUES ('49', '樓宇檔案表', '0', '900', null, '1');
INSERT INTO `columnset` VALUES ('50', '樓宇檔案表', '1', '900', '編号', '1');
INSERT INTO `columnset` VALUES ('51', '樓宇檔案表', '2', '1290', '名稱', '1');
INSERT INTO `columnset` VALUES ('52', '樓宇檔案表', '3', '2415', '所屬物業', '1');
INSERT INTO `columnset` VALUES ('53', '樓宇檔案表', '4', '2610', '類型', '1');
INSERT INTO `columnset` VALUES ('54', '樓宇檔案表', '5', '900', '占地面積', '1');
INSERT INTO `columnset` VALUES ('55', '樓宇檔案表', '6', '900', '建築面積', '1');
INSERT INTO `columnset` VALUES ('56', '樓宇檔案表', '7', '900', '位置', '1');
INSERT INTO `columnset` VALUES ('57', '樓宇檔案表', '8', '900', '簡介', '1');
INSERT INTO `columnset` VALUES ('58', '客戶清單', '0', '435', null, '1');
INSERT INTO `columnset` VALUES ('59', '客戶清單', '1', '900', '編号', '1');
INSERT INTO `columnset` VALUES ('60', '客戶清單', '2', '2130', '名稱', '1');
INSERT INTO `columnset` VALUES ('61', '客戶清單', '3', '1860', '電話号碼', '1');
INSERT INTO `columnset` VALUES ('62', '客戶清單', '4', '1770', '手機号碼', '1');
INSERT INTO `columnset` VALUES ('63', '客戶清單', '5', '2385', '住址', '1');
INSERT INTO `columnset` VALUES ('64', '客戶清單', '6', '900', '聯系人', '1');
INSERT INTO `columnset` VALUES ('65', '客戶清單', '7', '1440', '法人姓名', '1');
INSERT INTO `columnset` VALUES ('66', '客戶清單', '8', '1905', '法人身份證号', '1');
INSERT INTO `columnset` VALUES ('67', '客戶清單', '9', '2370', '營業執照号', '1');
INSERT INTO `columnset` VALUES ('68', '客戶清單', '10', '900', '雇員情況', '1');
INSERT INTO `columnset` VALUES ('69', '客戶清單', '11', '3165', '備注', '1');
INSERT INTO `columnset` VALUES ('71', '合同檔案清單', '0', '525', null, '1');
INSERT INTO `columnset` VALUES ('72', '合同檔案清單', '1', '900', '房屋名稱', '0');
INSERT INTO `columnset` VALUES ('73', '合同檔案清單', '2', '1125', '合同編号', '1');
INSERT INTO `columnset` VALUES ('74', '合同檔案清單', '3', '3435', '客戶名稱', '1');
INSERT INTO `columnset` VALUES ('75', '合同檔案清單', '4', '1665', '合同狀态', '1');
INSERT INTO `columnset` VALUES ('76', '合同檔案清單', '5', '1260', '起租日期', '1');
INSERT INTO `columnset` VALUES ('77', '合同檔案清單', '6', '1485', '止租日期', '1');
INSERT INTO `columnset` VALUES ('78', '合同檔案清單', '7', '900', '租期(月)', '1');
INSERT INTO `columnset` VALUES ('79', '合同檔案清單', '8', '900', '日租金(日/㎡)', '0');
INSERT INTO `columnset` VALUES ('80', '合同檔案清單', '9', '900', '面積', '0');
INSERT INTO `columnset` VALUES ('81', '合同檔案清單', '10', '1275', '月租金', '1');
INSERT INTO `columnset` VALUES ('82', '合同檔案清單', '11', '2145', '總金額', '1');
INSERT INTO `columnset` VALUES ('83', '合同檔案清單', '12', '3930', '備注', '1');
INSERT INTO `columnset` VALUES ('84', '合同房源清單', '0', '540', '編号', '1');
INSERT INTO `columnset` VALUES ('85', '合同房源清單', '1', '1860', '名稱', '1');
INSERT INTO `columnset` VALUES ('86', '合同房源清單', '2', '1875', '物業名稱', '1');
INSERT INTO `columnset` VALUES ('87', '合同房源清單', '3', '900', '所屬樓宇', '1');
INSERT INTO `columnset` VALUES ('88', '合同房源清單', '4', '3225', '業主', '1');
INSERT INTO `columnset` VALUES ('89', '合同房源清單', '5', '540', '戶型', '1');
INSERT INTO `columnset` VALUES ('90', '合同房源清單', '6', '900', '朝向', '1');
INSERT INTO `columnset` VALUES ('91', '合同房源清單', '7', '540', '樓層', '1');
INSERT INTO `columnset` VALUES ('92', '合同房源清單', '8', '540', '結構', '1');
INSERT INTO `columnset` VALUES ('93', '合同房源清單', '9', '540', '面積', '1');
INSERT INTO `columnset` VALUES ('94', '合同房源清單', '10', '2520', '備注', '1');
INSERT INTO `columnset` VALUES ('95', '合同交款清單', '0', '90', null, '0');
INSERT INTO `columnset` VALUES ('96', '合同交款清單', '1', '1500', '錄單日期', '1');
INSERT INTO `columnset` VALUES ('97', '合同交款清單', '2', '1065', '單據編号', '1');
INSERT INTO `columnset` VALUES ('98', '合同交款清單', '3', '1245', '收款人', '1');
INSERT INTO `columnset` VALUES ('99', '合同交款清單', '4', '3075', '摘要', '1');
INSERT INTO `columnset` VALUES ('100', '合同交款清單', '5', '990', '發票号碼', '1');
INSERT INTO `columnset` VALUES ('101', '合同交款清單', '6', '2745', '租金起止日期', '1');
INSERT INTO `columnset` VALUES ('102', '合同交款清單', '7', '1725', '金 額', '1');
INSERT INTO `columnset` VALUES ('103', '合同交款清單', '8', '4920', '款項類别', '1');
INSERT INTO `columnset` VALUES ('104', '合同物品清單', '0', '2220', '房屋名稱', '1');
INSERT INTO `columnset` VALUES ('105', '合同物品清單', '1', '2910', '物品名稱', '1');
INSERT INTO `columnset` VALUES ('106', '合同物品清單', '2', '450', '規格', '1');
INSERT INTO `columnset` VALUES ('107', '合同物品清單', '3', '450', '數量', '1');
INSERT INTO `columnset` VALUES ('108', '合同物品清單', '4', '450', '單價', '1');
INSERT INTO `columnset` VALUES ('109', '合同物品清單', '5', '630', '總價值', '1');
INSERT INTO `columnset` VALUES ('110', '合同物品清單', '6', '3960', '備注', '1');
INSERT INTO `columnset` VALUES ('111', '房屋檔案表', '0', '420', null, '1');
INSERT INTO `columnset` VALUES ('112', '房屋檔案表', '1', '900', '編号', '1');
INSERT INTO `columnset` VALUES ('113', '房屋檔案表', '2', '900', '名稱', '1');
INSERT INTO `columnset` VALUES ('114', '房屋檔案表', '3', '900', '物業名稱', '1');
INSERT INTO `columnset` VALUES ('115', '房屋檔案表', '4', '900', '所屬樓宇', '1');
INSERT INTO `columnset` VALUES ('116', '房屋檔案表', '5', '900', '朝向', '1');
INSERT INTO `columnset` VALUES ('117', '房屋檔案表', '6', '900', '戶型', '1');
INSERT INTO `columnset` VALUES ('118', '房屋檔案表', '7', '900', '業主', '1');
INSERT INTO `columnset` VALUES ('119', '房屋檔案表', '8', '900', '樓層', '1');
INSERT INTO `columnset` VALUES ('120', '房屋檔案表', '9', '900', '結構', '1');
INSERT INTO `columnset` VALUES ('121', '房屋檔案表', '10', '900', '面積', '1');
INSERT INTO `columnset` VALUES ('122', '房屋檔案表', '11', '900', '狀态', '1');
INSERT INTO `columnset` VALUES ('123', '房屋檔案表', '12', '900', '備注', '1');
INSERT INTO `columnset` VALUES ('124', '曆史租戶', '0', '435', null, '1');
INSERT INTO `columnset` VALUES ('125', '曆史租戶', '1', '900', '房屋名稱', '0');
INSERT INTO `columnset` VALUES ('126', '曆史租戶', '2', '900', '合同編号', '1');
INSERT INTO `columnset` VALUES ('127', '曆史租戶', '3', '4065', '客戶名稱', '1');
INSERT INTO `columnset` VALUES ('128', '曆史租戶', '4', '900', '合同狀态', '1');
INSERT INTO `columnset` VALUES ('129', '曆史租戶', '5', '900', '起租日期', '1');
INSERT INTO `columnset` VALUES ('130', '曆史租戶', '6', '900', '止租日期', '1');
INSERT INTO `columnset` VALUES ('131', '曆史租戶', '7', '900', '租期(月)', '1');
INSERT INTO `columnset` VALUES ('132', '曆史租戶', '8', '900', '日租金(日/㎡)', '0');
INSERT INTO `columnset` VALUES ('133', '曆史租戶', '9', '900', '面積', '0');
INSERT INTO `columnset` VALUES ('134', '曆史租戶', '10', '2370', '月租金', '1');
INSERT INTO `columnset` VALUES ('135', '曆史租戶', '11', '1665', '總金額', '1');
INSERT INTO `columnset` VALUES ('136', '曆史租戶', '12', '3030', '備注', '1');
INSERT INTO `columnset` VALUES ('137', '業主清單', '0', '900', null, '1');
INSERT INTO `columnset` VALUES ('138', '業主清單', '1', '1500', '編号', '1');
INSERT INTO `columnset` VALUES ('139', '業主清單', '2', '2505', '業主名稱', '1');
INSERT INTO `columnset` VALUES ('140', '業主清單', '3', '2310', '電話号碼', '1');
INSERT INTO `columnset` VALUES ('141', '業主清單', '4', '2610', '住址', '1');
INSERT INTO `columnset` VALUES ('142', '業主清單', '5', '3300', '備注', '1');
INSERT INTO `columnset` VALUES ('143', '租金檔案表', '0', '435', null, '1');
INSERT INTO `columnset` VALUES ('144', '租金檔案表', '1', '1230', '房屋名稱', '1');
INSERT INTO `columnset` VALUES ('145', '租金檔案表', '2', '1665', '錄單日期', '1');
INSERT INTO `columnset` VALUES ('146', '租金檔案表', '3', '1665', '單據編号', '1');
INSERT INTO `columnset` VALUES ('147', '租金檔案表', '4', '1455', '合同編号', '1');
INSERT INTO `columnset` VALUES ('148', '租金檔案表', '5', '2460', '客戶名稱', '1');
INSERT INTO `columnset` VALUES ('149', '租金檔案表', '6', '900', '發票号碼', '1');
INSERT INTO `columnset` VALUES ('150', '租金檔案表', '7', '1305', '摘要', '1');
INSERT INTO `columnset` VALUES ('151', '租金檔案表', '8', '1365', '起始日期', '1');
INSERT INTO `columnset` VALUES ('152', '租金檔案表', '9', '1365', '終止日期', '1');
INSERT INTO `columnset` VALUES ('153', '租金檔案表', '10', '1455', '金額', '1');
INSERT INTO `columnset` VALUES ('154', '租金檔案表', '11', '900', '收款人', '1');
INSERT INTO `columnset` VALUES ('155', '租金檔案表', '12', '1830', '收款方式', '1');
INSERT INTO `columnset` VALUES ('156', '押金檔案表', '0', '405', null, '1');
INSERT INTO `columnset` VALUES ('157', '押金檔案表', '1', '1350', '錄單日期', '1');
INSERT INTO `columnset` VALUES ('158', '押金檔案表', '2', '900', '單據編号', '1');
INSERT INTO `columnset` VALUES ('159', '押金檔案表', '3', '1425', '合同編号', '1');
INSERT INTO `columnset` VALUES ('160', '押金檔案表', '4', '2790', '客戶名稱', '1');
INSERT INTO `columnset` VALUES ('161', '押金檔案表', '5', '1770', '摘要', '1');
INSERT INTO `columnset` VALUES ('162', '押金檔案表', '6', '2850', '金額', '1');
INSERT INTO `columnset` VALUES ('163', '押金檔案表', '7', '1725', '收款人', '1');
INSERT INTO `columnset` VALUES ('164', '押金檔案表', '8', '2685', '收款方式', '1');
INSERT INTO `columnset` VALUES ('165', '押金退款檔案表', '0', '255', null, '1');
INSERT INTO `columnset` VALUES ('166', '押金退款檔案表', '1', '1005', '錄單日期', '1');
INSERT INTO `columnset` VALUES ('167', '押金退款檔案表', '2', '1395', '單據編号', '1');
INSERT INTO `columnset` VALUES ('168', '押金退款檔案表', '3', '795', '合同編号', '1');
INSERT INTO `columnset` VALUES ('169', '押金退款檔案表', '4', '2505', '客戶名稱', '1');
INSERT INTO `columnset` VALUES ('170', '押金退款檔案表', '5', '2505', '摘要', '1');
INSERT INTO `columnset` VALUES ('171', '押金退款檔案表', '6', '1500', '金額', '1');
INSERT INTO `columnset` VALUES ('172', '押金退款檔案表', '7', '900', '經辦人', '1');
INSERT INTO `columnset` VALUES ('173', '押金退款檔案表', '8', '0', null, '1');
INSERT INTO `columnset` VALUES ('174', '押金退款檔案表', '9', '0', null, '1');
INSERT INTO `columnset` VALUES ('175', '交費記錄', '0', '615', '選擇', '1');
INSERT INTO `columnset` VALUES ('176', '交費記錄', '1', '900', '費用期間', '1');
INSERT INTO `columnset` VALUES ('177', '交費記錄', '2', '1515', '科目名稱', '1');
INSERT INTO `columnset` VALUES ('178', '交費記錄', '3', '1335', '房屋名稱', '1');
INSERT INTO `columnset` VALUES ('179', '交費記錄', '4', '2280', '客戶名稱', '1');
INSERT INTO `columnset` VALUES ('180', '交費記錄', '5', '2040', '計費周期始', '1');
INSERT INTO `columnset` VALUES ('181', '交費記錄', '6', '1935', '計費周期止', '1');
INSERT INTO `columnset` VALUES ('182', '交費記錄', '7', '900', '起數', '1');
INSERT INTO `columnset` VALUES ('183', '交費記錄', '8', '900', '止數', '1');
INSERT INTO `columnset` VALUES ('184', '交費記錄', '9', '900', '用量', '1');
INSERT INTO `columnset` VALUES ('185', '交費記錄', '10', '1230', '計費标準', '1');
INSERT INTO `columnset` VALUES ('186', '交費記錄', '11', '1200', '金額', '1');
INSERT INTO `columnset` VALUES ('187', '交費記錄', '12', '900', '是否收款', '1');
INSERT INTO `columnset` VALUES ('188', '交費記錄', '13', '900', '收款人', '1');
INSERT INTO `columnset` VALUES ('189', '交費記錄', '14', '1380', '收款日期', '1');
INSERT INTO `columnset` VALUES ('190', '交費記錄', '15', '900', '收款方式', '1');
INSERT INTO `columnset` VALUES ('191', '交費記錄', '16', '900', '合同編号', '1');
-- ----------------------------
-- Table structure for `contractdelay`
-- ----------------------------
DROP TABLE IF EXISTS `contractdelay`;
CREATE TABLE `contractdelay` (
`contractDelay_id` int(11) NOT NULL,
`contract_number` varchar(20) COLLATE utf8_bin DEFAULT NULL,
`startRentDate` datetime DEFAULT NULL,
`oldEndRentDate` datetime DEFAULT NULL,
`oldTotalAmount` decimal(19,4) DEFAULT NULL,
`delay_month` int(11) DEFAULT NULL,
`delay_day` int(11) DEFAULT NULL,
`newEndRentDate` datetime DEFAULT NULL,
`operatePeople` varchar(20) COLLATE utf8_bin DEFAULT NULL,
`addRent` decimal(19,2) DEFAULT NULL,
`newTotalAmount` decimal(19,2) DEFAULT NULL,
`signDate` datetime DEFAULT NULL,
PRIMARY KEY (`contractDelay_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- ----------------------------
-- Records of contractdelay
-- ----------------------------
-- ----------------------------
-- Table structure for `contractinfo`
-- ----------------------------
DROP TABLE IF EXISTS `contractinfo`;
CREATE TABLE `contractinfo` (
`contract_id` int(11) NOT NULL AUTO_INCREMENT,
`contract_number` varchar(20) COLLATE utf8_bin DEFAULT NULL,
`client_name` varchar(255) COLLATE utf8_bin DEFAULT NULL,
`contract_state` varchar(10) COLLATE utf8_bin DEFAULT NULL,
`startRentDate` date DEFAULT NULL,
`endRentDate` date DEFAULT NULL,
`leaseTime_month` int(11) DEFAULT NULL,
`leaseTime_day` int(11) DEFAULT NULL,
`leaseMoney_month` decimal(19,4) DEFAULT NULL,
`totalAmount` decimal(19,4) DEFAULT NULL,
`leaseMoney_day` decimal(19,4) DEFAULT NULL,
`contract_memo` varchar(255) COLLATE utf8_bin DEFAULT NULL,
`contractEnd_date` datetime DEFAULT NULL,
`contractEnd_reason` varchar(50) COLLATE utf8_bin DEFAULT NULL,
`contractEnd_operatePeople` varchar(10) COLLATE utf8_bin DEFAULT NULL,
`contractCancel_date` datetime DEFAULT NULL,
`contractCancel_reason` varchar(50) COLLATE utf8_bin DEFAULT NULL,
`contractCancel_operatePeople` varchar(50) COLLATE utf8_bin DEFAULT NULL,
PRIMARY KEY (`contract_id`),
KEY `contract_number` (`contract_number`)
) ENGINE=InnoDB AUTO_INCREMENT=64 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- ----------------------------
-- Records of contractinfo
-- ----------------------------
INSERT INTO `contractinfo` VALUES ('7', '10002', '馬建斌', '終止', '2014-07-01', '2014-07-31', '12', '0', '500.0000', '6000.0000', '0.0000', '合同房号:紅軍街112号 ', null, null, null, null, null, null);
INSERT INTO `contractinfo` VALUES ('9', '10004', '張明', '生效', '2013-09-26', '2013-11-26', '100', '0', '100.0000', '1200.0000', '0.0000', '', null, null, null, null, null, null);
INSERT INTO `contractinfo` VALUES ('11', '10005', '昆明智宇商務有限公司', '生效', '2013-10-26', '2013-12-26', '12', '0', '1800.0000', '21600.0000', '0.0000', '', null, null, null, null, null, null);
INSERT INTO `contractinfo` VALUES ('12', '10006', '宇能商務有限公司', '終止', '2010-03-08', '2012-11-07', '12', '0', '500.0000', '6000.0000', '0.0000', '', null, null, null, null, null, null);
INSERT INTO `contractinfo` VALUES ('13', '10007', '北京科技公司', '終止', '2013-06-01', '2013-06-30', '100', '0', '100.0000', '1200.0000', '0.0000', null, null, null, null, null, null, null);
INSERT INTO `contractinfo` VALUES ('54', '10001', '宇能商務有限公司', '生效', '2014-06-24', '2014-07-24', '1', null, '6000.0000', '6000.0000', null, '', null, null, null, null, null, null);
INSERT INTO `contractinfo` VALUES ('55', '10003', '昆明智宇商務有限公司', '生效', '2014-07-09', '2014-07-09', '12', null, '12.0000', '144.0000', null, '12', null, null, null, null, null, null);
INSERT INTO `contractinfo` VALUES ('62', '10008', '張飛', '生效', '2013-07-08', '2014-07-17', '12', null, '12.0000', '144.0000', null, 'hah', null, null, null, null, null, null);
INSERT INTO `contractinfo` VALUES ('63', '10009', '昆明強林科技有限公司', '生效', '2014-07-16', '2014-08-07', '1', null, '555.0000', '555.0000', null, '55555', null, null, null, null, null, null);
-- ----------------------------
-- Table structure for `coststatistic`
-- ----------------------------
DROP TABLE IF EXISTS `coststatistic`;
CREATE TABLE `coststatistic` (
`costStatistic_id` int(11) NOT NULL AUTO_INCREMENT,
`costStatistic_subject` int(20) DEFAULT NULL,
`costStatistic_startTime` date DEFAULT NULL,
`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<OwnerInfoBean> 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<ClientinfoBean> clientlist;
public ClientinfoDao(){
this.findAllClientInfo();
}
public List<ClientinfoBean> findAllClientInfo() {
// TODO Auto-generated method stub
List<ClientinfoBean>celist = new ArrayList<ClientinfoBean>();
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<ClientinfoBean> findOneClientById(String num, String name) {
// TODO Auto-generated method stub
ConnDriver cd = new ConnDriver();
ClientinfoBean rb=null;
List<ClientinfoBean>celist = new ArrayList<ClientinfoBean>();
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<ClientinfoBean> clientlist = new ArrayList<ClientinfoBean>();
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<ClientinfoBean> findAllCustomer() {
// TODO Auto-generated method stub
List<ClientinfoBean> Customerlist = new ArrayList<ClientinfoBean>();
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<ClientinfoBean> findContractInfoByChaxun(String client_number,
String client_name) {
List<ClientinfoBean>celist = new ArrayList<ClientinfoBean>();
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<ClientinfoBean> getClientlist() {
return clientlist;
}
public void setClientlist(List<ClientinfoBean> 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\">請選擇...</option>");
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("<option value='"+m1.invoke(item)+"'>"+m2.invoke(item)+"</option>");
}
out.print("</select>");
}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 + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<base href="<%=basePath%>" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>房屋管理</title>
<link rel="stylesheet" type="text/css" href="UI/CSS/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="UI/CSS/themes/icon.css">
<link rel="stylesheet" type="text/css" href="UI/CSS/demo.css">
<script type="text/javascript" src="UI/JS/jquery.min.js"></script>
<script type="text/javascript" src="UI/JS/jquery.easyui.min.js"></script>
<script type="text/javascript" src="UI/JS/fenye.js"></script>
</head>
<body class="easyui-layout" data-options="fit:'true'">
<div data-options="region:'north',border:false" style="height: 50px; background: #B3DFDA; padding: 3px">
<table>
<tr>
<td style="width: 150px;" align="center"><img src="UI/CSS/themes/icons/large_chart.png"></td>
<td>
<table>
<tr><td colspan="3"><b><font style="font-size: 15px;">房屋檔案管理流程</font></b></td></tr>
<tr>
<td style="width: 150px;">1、建立物業資訊</td>
<td style="width: 150px;">2、建立樓宇資訊</td>
<td style="width: 150px;">3、建立出租房資訊</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<div data-options="region:'center'" >
<div class="easyui-tabs" data-options="tools:'#tab-tools',fit:'true'" >
<div title="物業資訊" style="padding: 10px;"
href="JSP/HouseManager/PropertyInfo.jsp"></div>
<div title="樓宇資訊" style="padding:10px;"
href="JSP/HouseManager/FloorInfo.jsp"></div>
<div title="出租房資訊" style="padding:0px;"
href="JSP/HouseManager/RentHouseInfo.jsp"></div>
</div>
</div>
</body>
</html>
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 + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<base href="<%=basePath%>" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>收費管理</title>
<link rel="stylesheet" type="text/css" href="UI/CSS/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="UI/CSS/themes/icon.css">
<link rel="stylesheet" type="text/css" href="UI/CSS/demo.css">
<script type="text/javascript" src="UI/JS/jquery-1.9.1.js"></script>
<script type="text/javascript" src="UI/JS/jquery.easyui.min.js"></script>
<script type="text/javascript" src="UI/JS/time.js"></script>
</head>
<body class="easyui-layout" onload="startclock()">
<div data-options="region:'north',border:false" style="height: 90px; background: #B3DFDA; padding: 3px">
<div id="Mmenu2" class="Mmenu" style="height: 45px, width:100%">
<ul>
<li><a onclick="$('#AddMoneyInfo').dialog('open')">
<img src="images/home.png" align="middle">新增收費 </a></li>
<li><a onclick="$('#ImportCostStatistic').dialog('open')">
<img src="images/part-import.png" align="middle">批量導入 </a></li>
<li><a onclick="editCost_OpenDialog();">
<img src="images/edit-file.png" align="middle">編輯收費 </a></li>
<li><a type="button" onclick="DeleteCostStatistic()">
<img src="images/delete.png" align="middle">删除收費 </a></li>
<li><a onclick="SetReceipt()">
<img src="images/viewAll.png" align="middle">設定已收費</a></li>
<li><a onclick="$('#ViewAllCostStatistic').datagrid('load',{})">
<img src="images/refresh.png" align="middle">重新整理清單</a></li>
<li><a onclick="printNotice()">
<img src="images/print.png" align="middle">列印催費單 </a></li>
<li><a onclick="printNotice()">
<img src="images/this-year.png" align="middle">批量催費單</a></li>
<li><a onclick="printNotice()">
<img src="images/print.png" align="middle">列印收費單 </a></li>
<li><a onclick="printNotice()">
<img src="images/tickets.png" align="middle">批量收款單 </a></li>
<li><a href="JSP/MainWindows/index.jsp">
<img src="images/loginOut.png" align="middle">離開 </a></li>
</ul>
</div>
<script type="text/javascript">
function show1(value){
$('#ViewAllCostStatistic').datagrid('load',{moneystyle:value});
}
function show2(value){
$('#ViewAllCostStatistic').datagrid('load',{ifduqian:value});
}
</script>
<div id="showPrint"></div>
<script type="text/javascript">
function printNotice(){
$("#showPrint").window({href:"JSP/MoneyManager/MoneyMangerprint.jsp",width:500,height:350});
$("#showPrint").window('open');
//$("#showPrint").window('refresh');
}
</script>
<div>
<table border="0" style="position:absolute; top:53px;width=100%;">
<tr>
<td style="height: 30px;width: 90px;"><font size="5">目前操作費用:</font></td>
<td style="height: 30px;width: 100px;">
<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>
</td>
<td style="height: 30px;width: 150px;" align="right">收費情況</td>
<td>
<select name="status" onchange="show2(this.value)" id="status">
<option value="bx">不限</option>
<option value="receive">已收費</option>
<option value="noreceive">未收費</option>
</select>
</td>
<td style="width: 50px;"></td>
<td style="height: 30px;width: 500px;">
<fieldset>
<table>
<tr>
<td style="height: 30px;width: 80px;">客戶名稱</td>
<td><input type="text" name="Client_Name" id="select_client" style="width:120px;height: 20px;"></td>
<td><input type="button" value="查找" onclick="xselect()" style="width:60px;height: 25px;"></td>
<td><input type="button" value="全部" onclick="$('#ViewAllCostStatistic').datagrid('load',{})" style="width:60px;height: 25px;"></td>
</tr>
</table>
</fieldset>
</td>
</tr>
</table>
</div>
</div>
<script type="text/javascript">
function xselect(){
var customer = document.getElementById('select_client').value;
$('#ViewAllCostStatistic').datagrid('load',{customer:customer});
}
</script>
<div data-options="region:'west',split:true" title="導航欄" style="width:200px;">
<ul id="tt" class="easyui-tree">
<li><span>全部房屋</span>
<ul>
<li><span><a onclick="$('#ViewAllCostStatistic').datagrid({url:'CostStatisticServlet?MoneyInfoOperate=MonthSelect&StartTime=2014-01-01&EndTime=2014-12-31'});">2014年</a></span>
<ul>
<li><a onclick="$('#ViewAllCostStatistic').datagrid({url:'CostStatisticServlet?MoneyInfoOperate=MonthSelect&StartTime=2014-10-01&EndTime=2014-10-31'});">10月</a></li>
</ul>
</li>
<li><span><a onclick="$('#ViewAllCostStatistic').datagrid({url:'CostStatisticServlet?MoneyInfoOperate=MonthSelect&StartTime=2013-01-01&EndTime=2013-12-31'});">2013年</a></span>
<ul>
<li><a onclick="$('#ViewAllCostStatistic').datagrid({url:'CostStatisticServlet?MoneyInfoOperate=MonthSelect&StartTime=2013-06-06&EndTime=2013-06-31'});">06月</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div data-options="region:'south',border:false"
style="height: 30px; background: #A9FACD;">
<table border="1" cellspacing="0" height="28px">
<tr>
<td width="500px">【房屋租賃管理系統——網頁版】</td>
<td width="600px">
<form name="clock" onsubmit="0">
【目前時間:<input type="text" name="face" size="14">】
</form>
</td>
<td width="400px">【資料庫:本地資料庫】</td>
</tr>
</table>
</div>
<div data-options="region:'center',title:'工作區'">
<div class="easyui-layout" data-options="fit:true">
<div data-options="region:'center'" style="padding:3px" id="ViewRegion">
<table id="ViewAllCostStatistic" class="easyui-datagrid"
data-options="rownumbers:true,url:'CostStatisticServlet',selectOnCheck:true,
singleSelect:true,autoRowHeight:false,fit:'true',pagination:true,pageSize:10">
<thead>
<tr>
<th data-options="field:'ck',checkbox:true"></th>
<th data-options="field:'costStatistic_id',width:40">編号</th>
<th data-options="field:'costStatistic_period',width:68">費用期間</th>
<th data-options="field:'costStatistic_name',width:60">科目名稱</th>
<th data-options="field:'costStatistic_houseNumber',width:80">房屋名稱</th>
<th data-options="field:'costStatistic_clientName',width:170">客戶名稱</th>
<th data-options="field:'costStatistic_startTime',width:68">計費周期始</th>
<th data-options="field:'costStatistic_endTime',width:68">計費周期止</th>
<th data-options="field:'costStatistic_startNumber',width:30">起數</th>
<th data-options="field:'costStatistic_endNumber',width:30">止數</th>
<th data-options="field:'costStatistic_quantity',width:50">用量</th>
<th data-options="field:'costStatistic_price',width:40">計費标準</th>
<th data-options="field:'costStatistic_amount',width:60">金額</th>
<th data-options="field:'costStatistic_receipt',width:60">是否收款</th>
<th data-options="field:'costStatistic_receiptMan',width:60">收款人</th>
<th data-options="field:'costStatistic_receiptDate',width:68">收款日期</th>
<th data-options="field:'costStatistic_receiptType',width:60">收款方式</th>
<th data-options="field:'costStatistic_contractID',width:60">合同編号</th>
</tr>
</thead>
</tbody>
</table>
</div>
</div>
</div>
<jsp:include page="MoneyManageDialog.jsp"></jsp:include>
<script type="text/javascript">
//輕按兩下行彈出編輯視窗,;form(load加載資料)單擊選中,然後編輯,便可彈出編輯視窗
$('#ViewAllCostStatistic').datagrid({
onDblClickRow : function(rowIndex, rowData) {
var row = $('#ViewAllCostStatistic').datagrid('getSelected');
if(row)
{
$('#EditMoneyInfo').dialog('open');
$('#EditCostStatistic_Form').form('load',
document.getElementById('costStatistic_id').value = row.costStatistic_id,
document.getElementById('Cost_CostName_edit').value = row.costStatistic_subject,
document.getElementById('Cost_CustomerName_edit').value = row.costStatistic_clientName,
document.getElementById('Cost_ContractNumber_edit').value = row.costStatistic_contractID,
document.getElementById('Cost_HouseNumber_edit').value = row.costStatistic_houseNumber,
document.getElementById('Cost_StartDate_edit').value = row.costStatistic_startTime,
document.getElementById('Cost_EndDate_edit').value = row.costStatistic_endTime,
document.getElementById('Cost_StartNumber_edit').value = row.costStatistic_startNumber,
document.getElementById('Cost_EndNumber_edit').value = row.costStatistic_endNumber,
document.getElementById('Cost_Quantity_edit').value = row.costStatistic_quantity,
document.getElementById('Cost_UnitPrice_edit').value = row.costStatistic_price,
document.getElementById('Cost_Amount_edit').value = row.costStatistic_amount,
document.getElementById('Cost_Receipt_edit').value = row.costStatistic_receipt,
document.getElementById('Cost_ReceiptMan_edit').value = row.costStatistic_receiptMan,
document.getElementById('Cost_ReceiptDate_edit').value = row.costStatistic_receiptDate);
}
}
});
//單擊選中,然後編輯,便可彈出編輯視窗的方法
function editCost_OpenDialog(){
var row = $('#ViewAllCostStatistic').datagrid('getSelected');
if(row)
{
$('#EditMoneyInfo').dialog('open');
$('#EditCostStatistic_Form').form('load',
document.getElementById('costStatistic_id').value = row.costStatistic_id,
document.getElementById('Cost_CostName_edit').value = row.costStatistic_subject,//費用科目
document.getElementById('Cost_CustomerName_edit').value = row.costStatistic_clientName,//客戶名稱
document.getElementById('Cost_ContractNumber_edit').value = row.costStatistic_contractID,//合同編号
document.getElementById('Cost_HouseNumber_edit').value = row.costStatistic_houseNumber,//房屋名稱
document.getElementById('Cost_StartDate_edit').value = row.costStatistic_startTime,//起始時間
document.getElementById('Cost_EndDate_edit').value = row.costStatistic_endTime,//結束時間
document.getElementById('Cost_StartNumber_edit').value = row.costStatistic_startNumber,//起始數字
document.getElementById('Cost_EndNumber_edit').value = row.costStatistic_endNumber,//結束數字
document.getElementById('Cost_Quantity_edit').value = row.costStatistic_quantity,//用量
document.getElementById('Cost_UnitPrice_edit').value = row.costStatistic_price,//計費标準
document.getElementById('Cost_Amount_edit').value = row.costStatistic_amount,//金額
document.getElementById('Cost_Receipt_edit').value = row.costStatistic_receipt,//是否收款
document.getElementById('Cost_ReceiptMan_edit').value = row.costStatistic_receiptMan,//收款人
document.getElementById('Cost_ReceiptDate_edit').value = row.costStatistic_receiptDate);//收款日期
}else{
alert("請選中一條資料!!");
}
}
//删除操作
function DeleteCostStatistic()
{
var row = $('#ViewAllCostStatistic').datagrid('getSelected');//獲得删除行
var param={costStatistic_id:row.costStatistic_id,MoneyInfoOperate:'del'};
//獲得删除的參數property_number;delProperty相當于add,edit
alert("是否删除編号為"+row.costStatistic_id+"的記錄?");//彈出框
$.post('CostStatisticServlet',param,function(data){
if (data == 'success') {
alert("删除成功");
$('#ViewAllCostStatistic').datagrid('load',{});//實作删除操作的重新整理表
} else {
//document.getElementById("aaa").innerHTML=data;
alert("删除失敗");
}
});
}
</script>
<script type="text/javascript">
function SetReceipt(){
var row = $('#ViewAllCostStatistic').datagrid('getSelected');
if(row)
{
//alert(row.costStatistic_id);
document.getElementById('SetCharge_CostSta_id').value = row.costStatistic_id;
$('#SetCharge').dialog('open');
}else{
alert("請單擊每行首列的複選框,選中一行!");
}
}
</script>
<script>
function pagerFilter(data){
if (typeof data.length == 'number' && typeof data.splice == 'function'){ // is array
data = {
total: data.length,
rows: data
}
}
var dg = $(this);
var opts = dg.datagrid('options');
var pager = dg.datagrid('getPager');
pager.pagination({
onSelectPage:function(pageNum, pageSize){
opts.pageNumber = pageNum;
opts.pageSize = pageSize;
pager.pagination('refresh',{
pageNumber:pageNum,
pageSize:pageSize
});
dg.datagrid('loadData',data);
}
});
if (!data.originalRows){
data.originalRows = (data.rows);
}
var start = (opts.pageNumber-1)*parseInt(opts.pageSize);
var end = start + parseInt(opts.pageSize);
data.rows = (data.originalRows.slice(start, end));
return data;
}
$(function(){
$('#ViewAllCostStatistic').datagrid({loadFilter:pagerFilter});
});
</script>
</body>
</html>
四、其他
1.擷取源碼
點選以下連結擷取源碼,資料庫檔案在sql檔案夾下面。
JavaWeb房屋租賃管理系統源碼(servlet+jsp+mysql)
2.點贊加關注
如果您覺得這篇文章對你有用請關注加點贊;
3.部落客微信公衆号
Java資源分享,會不定時分享一些Java教程,Java資源,歡迎各位關注!
4.其他系統實作
JavaWeb系統系列實作
Java+JSP實作學生圖書管理系統
Java+JSP實作學生資訊管理系統
Java+JSP實作使用者資訊管理系統
Java+Servlet+JSP實作學生成績管理系統
Java+Servlet+JSP實作寵物診所管理系統
Java+SSM+Easyui實作網上考試系統
Java+Springboot+H-ui實作營銷管理系統
Java+Springboot+Mybatis+Bootstrap實作網上商城系統
Java實作Web航空訂票系統(servlet+jdbc+jsp+mysql)
Java+Servlet+JSP+Mysql+Tomcat實作Web學生選課管理系統
JavaSwing系統系列實作
Java+Swing實作鬥地主遊戲
Java+Swing實作圖書管理系統
Java+Swing實作醫院管理系統
Java+Swing實作倉庫管理系統
Java+Swing實作考試管理系統
Java+Swing實作通訊錄管理系統
Java+Swing實作停車場管理系統
Java+Swing實作學生資訊管理系統
Java+Swing實作學生宿舍管理系統
Java+Swing實作學生選課管理系統
Java+Swing實作學生成績管理系統
Java+Swing實作學校教材管理系統
Java+Swing實作學校教務管理系統
Java+Swing實作企業人事管理系統
Java+Swing實作電子相冊管理系統
Java+Swing實作自助取款機(ATM)系統
Java+Swing實作超市管理系統-TXT存儲資訊
Java+Swing實作寵物商店管理系統-TXT存儲資訊