Java固定资产管理系统源代码
java仓库管理系统课程设计源代码

一、项目背景介绍1.1 仓库管理系统的重要性仓库管理系统是一种对仓库内物品进行全面管理和监控的信息系统。
在现代物流管理中,仓库管理系统扮演着至关重要的角色,可以提高仓库的利用率、降低存货成本、提高物流效率,为企业节省大量人力和物力资源,是企业管理中不可或缺的一部分。
1.2 项目意义本课程设计拟设计并实现一套基于Java语言的仓库管理系统,旨在通过应用软件技术和信息管理技术,实现对进销存等多类业务流程的自动化管理,并在实际操作中验证其运行效果和实用性,为学生提供一种将所学知识应用于实践的机会。
二、系统功能需求2.1 基本功能1) 系统登入:要求用户输入用户名和密码进行登入验证;2) 信息录入:包括商品信息、入库信息、出库信息等的录入;3) 信息查询:可以根据商品编号、名称、类别等条件查询商品信息;4) 库存管理:可以实时查看库存状况,并进行库存的盘点与调剂;5) 报表输出:可以输出商品进销存报表,方便管理人员进行决策;6) 权限管理:不同用户具有不同的权限,管理员具有对系统进行设置的权限。
2.2 进一步功能1) 供应商管理:可以录入供应商信息,并进行供应商的评价和选择;2) 客户管理:可以录入客户信息,并对客户进行分类管理;3) 交易管理:支持交易的生成、记录和统计。
三、技术选型和开发环境3.1 技术选型本系统采用Java语言作为主要开发语言,使用MySQL作为数据库,前端采用Swing技术进行界面设计,后端采用JDBC进行数据传输和交互。
3.2 开发工具1) 开发环境:Eclipse2) 数据库工具:Navicat3) 版本管理工具:Git4) 项目管理工具:Maven四、系统设计4.1 系统架构设计本系统采用MVC(Model-View-Controller)架构,将业务逻辑、数据表示和用户界面分离,使得系统更加易于维护和升级。
4.2 数据库设计1) 商品表:包括商品编号、名称、类别、进价、售价、库存等字段;2) 入库表:包括入库单号、商品编号、数量、日期等字段;3) 出库表:包括出库单号、商品编号、数量、日期等字段;4) 用户表:包括用户名、密码、权限等字段。
java设备管理系统免费源码

java设备管理系统免费源码以下是一个Java设备管理系统的免费源码示例,超过500字:```javaimport java.util.ArrayList;import java.util.List;import java.util.Scanner;class Deviceprivate String deviceName;private String deviceType;public Device(String deviceName, String deviceType) this.deviceName = deviceName;this.deviceType = deviceType;}public String getDeviceName。
return deviceName;}public void setDeviceName(String deviceName)this.deviceName = deviceName;}public String getDeviceType。
return deviceType;}public void setDeviceType(String deviceType) this.deviceType = deviceType;}class DeviceManagementSystemprivate List<Device> devices;public DeviceManagementSystem。
devices = new ArrayList<>(;}public void addDevice(Device device)devices.add(device);System.out.println("Device added successfully!"); }public void removeDevice(String deviceName) boolean removed = false;for (Device device : devices)if (device.getDeviceName(.equals(deviceName))devices.remove(device);removed = true;break;}}if (removed)System.out.println("Device removed successfully!");} elseSystem.out.println("Device not found!");}}public void displayDevices。
基于java的物业管理系统任务书

任务书任务名称:基于Java的物业管理系统开发任务发布人:XXX 公司任务接受人:XXX 开发团队任务时间:2023年1月1日-2023年6月30日任务目标:1.开发一套基于Java的物业管理系统,实现对小区、楼宇、房屋、业主等信息的管理和维护。
2.系统应具备用户管理、数据查询、费用管理、报修管理、公告发布等基本功能,并实现对各项功能的权限控制。
3.系统应具备良好的用户交互界面和操作体验,保证系统的稳定性和可靠性。
4.系统应具备一定的扩展性和可维护性,方便后续的功能升级和维护工作。
任务内容:1.需求分析和功能设计1.1.对物业管理系统的需求进行详细分析,确定系统的功能模块和技术方案。
1.2.细化功能设计,包括用户管理、数据查询、费用管理、报修管理、公告发布等模块的详细功能和交互流程。
2.技术选型和框架搭建2.1.根据需求和功能设计,确定系统所需的技术框架和组件,包括数据库、后端开发框架、前端界面框架等。
2.2.搭建系统的基本框架,包括数据库设计、后端接口设计、前端界面设计等。
3.功能开发与测试3.1.根据功能设计和技术框架,开发系统的各个功能模块。
3.2.进行功能模块的单元测试和集成测试,确保功能的正常运行和稳定性。
4.用户交互界面设计与优化4.1.设计用户交互界面,确保界面简洁、清晰、易用。
4.2.对用户交互界面进行优化,提升用户体验和操作效率。
5.系统整体测试5.1.对整个系统进行全面测试,包括功能测试、性能测试、安全测试等。
5.2.发现并解决系统中存在的问题和bug,确保系统的稳定性和可靠性。
6.系统上线与运营6.1.将系统部署上线,确保系统的稳定运行。
6.2.进行系统的运营和维护工作,解决用户反馈的问题,定期更新和优化系统。
任务验收标准:1.系统具备完整的功能模块,包括用户管理、数据查询、费用管理、报修管理、公告发布等。
2.系统的界面简洁清晰,用户操作流畅,用户体验良好。
3.系统稳定性和可靠性得到验证,能够满足大量用户同时上线使用的需求。
固定资产管理系统系统需求规格说明书

固定资产管理系统系统需求规格说明书版本:1.0变更记录目录1.简介 (4)1.1开发背景 (4)1.2目的 (4)1.3业务范围 (4)1.4参考文档 (4)2.约束及假定 (5)2.1 软件运行环境以及技术约束 (5)2.1.1 软件约束 (5)2.1.2 资产约束 (5)2.2 交付及部署约束 (5)3.功能性需求 (6)3.1 系统角色 (6)3.2 需求描述 (7)3.2.1 资产维护 (7)3.2.2资产报损 (8)3.2.3资产出售 (10)3.2.4资产调拨 (11)3.2.5资产维修 (12)3.2.6 资产购置申请 (13)3.2.7 资产购置审批 (14)3.2.8 报表管理 (14)3.2.9系统用户管理 (15)3.2.10系统字典管理 (17)4.非功能性需求 (19)4.1 性能 (19)4.2 可扩展性 (19)4.3 可用性 (19)4.4 安全性 (19)4.5 易用性 (20)1.简介1.1开发背景系统名称:固定资产管理系统[以下简称FAM系统];本项目的任务提出者是某事业单位。
开发者为UCS公司;系统用户是使用此系统的工作人员;本项目是某事业单位信息化平台的一部分。
1.2目的本文档定义了FAM系统的详细需求,明确了FAM系统的功能内容、功能边界、开发途径。
1.3业务范围固定资产管理系统用来支持固定资产管理,包括资产管理、资产采购、报表管理、系统用户管理。
固定资产管理系统是一个桌面应用系统,由管理员操作。
1.4参考文档2.约束及假定2.1 软件运行环境以及技术约束2.1.1 软件约束FAM系统采用Java技术进行开发。
开发及运行的软件环境为:●Java开发包JDK:jdk-1_5_0_01-windows版●数据库SQL Server2000 或MySQL●开发框架:二层应用架构2.1.2 资产约束数据库服务器采用Intel P4(1.8G HZ)PC 工作站。
固定资产管理系统软件开发方案

固定资产管理系统软件开发方案一、背景和目标:随着企业规模的扩大,企业的固定资产数量也在不断增长。
对固定资产进行有效的管理和监控,能够提高资产的使用效率,降低管理成本,并为企业的发展提供重要的支持。
因此,研发一款固定资产管理系统软件具有重要意义。
本固定资产管理系统软件开发方案旨在设计和实现一款功能完善、操作简便、安全稳定的财务管理系统,以实现对企业固定资产的全面管理,包括固定资产的入库、出库、折旧、维修与保养等。
二、系统需求:1.入库管理:实现对固定资产的入库登记、验收和档案管理等功能。
包括固定资产的基本信息录入、资产的入库流程审批、入库单的打印等。
2.出库管理:实现对固定资产的出库审批、归还管理等功能。
包括对固定资产借用申请的审批、出库单的打印、出库资产的归还登记等。
3.折旧管理:对固定资产进行折旧计算和折旧费用的核算。
包括折旧方法的选择、折旧核算的自动化处理、折旧报告的生成等。
4.维修与保养管理:实现对固定资产的维修保养计划和操作的管理。
包括对维修保养计划的制定和执行的跟踪,维修保养记录的保存和查询等。
5.报表分析:生成固定资产报表,包括入库报表、出库报表、折旧报表、维修保养报表等,以便企业管理层进行决策分析和财务报告。
6.数据安全性:系统数据的安全性是重要的考虑因素,需加入权限管理、备份恢复等功能,确保数据的完整性和保密性。
三、技术路线:1.系统架构:采用B/S架构,基于浏览器的操作界面,采用前后端分离技术,提高系统的易用性和性能。
2. 开发语言和工具:前端使用HTML、CSS、JavaScript等技术进行页面开发;后端使用Java开发,采用Spring框架和MySQL数据库。
同时,可以考虑使用Vue.js等现代化前端框架提升用户体验。
3.数据库设计:根据系统需求,设计相应的数据库表结构,并进行优化,以提高系统的响应速度和稳定性。
4.安全措施:引入权限管理模块,设置不同角色对系统的访问权限;定期进行数据备份,并提供恢复功能,保障数据的安全性和完整性。
物资管理系统源代码

#include<string.h>void menu(){int n,w1;do{printf("\t\t *** choose function ****\n\n");printf("\t\t *** 1 Enter new data ****\n\n");printf("\t\t *** 2 Modify data ****\n\n");printf("\t\t *** 3 Search by pro.date and name\n\n");printf("\t\t *** 4 Browse data ****\n\n");printf("\t\t *** 5 add data ****\n\n");printf("\t\t *** 6 Exit ****\n\n");printf("Choose your number(1-6):[ ]\b\b");scanf("%d",&n);if(n<1||n>6)w1=1;else w1=0;}while(w1==1);switch(n){case 1:enter();break;case 2:modify();break;case 3:search();break;case 4:browse();break;case 5:add();break;case 6:exit(0);}}main(){menu();}#define N 100struct Product{char num[100];char name[15];char size[4];char time[10];char amount[20];}Product[N];# include <stdio.h>enter(){int i,n;printf("How many Products(0-%d)?:",N-1);scanf("%d",&n);printf("\n Enter data now\n\n");for(i=0;i<n;i++){printf("\n Input %dth product record.\n",i+1); input(i);}if(i!=0)save(n);printf_back();}browse(){int i,j,n;n=load();printf_face();for(i=0;i<n;i++){if((i!=0)&&(i%10==0)){printf("\n\nPass any key to continue ....");getch();puts("\n\n");}printf_one(i) ;}printf("\tThere are %d record.\n",n);printf("\nPass any key to back ...");getch();menu();}add(){int i,n,m,k;FILE*fp;n=load();printf("How many Products are you want to add(0-%d)?:",N-1-n);scanf("%d",&m);k=m+n;for(i=n;i<k;i++){printf("\nInput %dth Product record.\n",i-n+1 );input(i);}if((fp=fopen("Pro.txt","ab"))==NULL){printf("cannot open file\n");}for(i=n;i<k;i++)if(fwrite(&Product[i],sizeof(struct Product),1,fp)!=1)printf("file write error\n");fclose(fp);printf_back();}search(){int i,n,k,w1=1,w2,w3,w4,m,a;struct Product p;n=load();do{printf("\n\nWhich way do you want to choose? \n\t1).By time 2).By name [ ]\b\b");scanf("%d",&m);switch(m){case 1:do{ k=-1;printf("\n\nEnter time that you want to search! TIME.");scanf("%s",p.time);printf_face();for(i=0;i<n;i++)if(strcmp(p.time,Product[i].time)==0){ k=i;printf_one(k);break;}if(k==-1){ printf("\n\nNO exist!please");printf("\n\nAre you again?\n\t1).again 2).NO and back [ ]\b\b");scanf("%d",&w1);if(w1==2)printf_back();}}while(k==-1&&w1==1);break;case 2:do{k=-1;printf("\n\nEnter name that you want to search! name.");scanf("%s",);printf_face();for(i=0;i<n;i++)if(strcmp(,Product[i].name)==0){k=i;printf_one(k);break;}if(k==-1){printf("\n\nNO exist!please");printf("\n\nAre you again?\n\t1).again 2).NO and back [ ]\b\b");scanf("%d",&w1);if(w1==2)printf_back();}}while(k==-1&&w1==1);break;}w4=0;w3=0;if(k!=-1){printf("\n\nWhat do you want to do?\n\t 1).Search 2).Modify 3).Delete 4).Back menu [ ]\b\b");scanf("%d",&w2);switch(w2){case 2:w3=modify_data(k,n);break;case 3:{printf("\nAre you sure?\n\t 1).Sure 2).No and back [ ]\b\b");scanf("%d",&w4);if(w4==1)for(a=k;a<n;a++){strcpy(Product[a].num,Product[a+1].num);strcpy(Product[a].name,Product[a+1].name);strcpy(Product[a].size,Product[a+1].size);strcpy(Product[a].time,Product[a+1].time);strcpy(Product[a].amount,Product[a+1].amount);}break;}}if(w3==1||w4==1){save(n);printf("\n\nSuccessful.^_^.");printf("\n\nWhant do you want to do? \n\t 1).Search another 2).Back [ ]\b\b" );scanf("%d",&w2);}}}while(w2==1);menu();}modify(){struct Product p;FILE *fp;int i,n,k,w0=1,w1,w2=0;n=load();do{k=-1;printf_face();for(i=0;i<n;i++){if((i!=0)&&(i%10==0)){printf("\n\nRemember NO.which needed modify.pass any key to contiune ...");getch();puts("\n\n");}printf_one(i);}do{printf("\n\nEnter NO.that you want to modify! NO.:");scanf("%s",p.num);for(i=0;i<n;i++)if(strcmp(p.num,Product[i].num)==0){k=i;p=Product[i];}if(k==-1)printf("\n\nNO exist!please again");}while(k==-1);printf_face();printf_one(k);w1=modify_data(k,n);if(w1==1){printf("\nSuccessful ^_^.\n\nAre you modify another ?\n\n\t 1).Yes 2).Back with save\t[ ]\b\b");scanf("%d",&w0);w2=1;}else{w0=0;if(w2==1)Product[k]=p;}if(w0!=1&&w2==1)save(n);}while(w0==1);menu();}save(int n){FILE *fp;int i;if((fp=fopen("Pro.txt","wb"))==NULL){printf("\nCannot open file\n");return NULL;}for(i=0;i<n;i++)if(Product[i].time!=0)if(fwrite(&Product[i],sizeof(struct Product),1,fp)!=1) printf("file write error\n");fclose(fp);}load(){FILE *fp;int i;if((fp=fopen("Pro.txt","rb"))==NULL){printf("\nCannot open file\n");return NULL;}for(i=0;!feof(fp);i++)fread(&Product[i],sizeof(struct Product),1,fp);fclose(fp);return(i-1);}input(int i){no_input(i,i);printf("num:");scanf("%s",Product[i].num);printf("name:");scanf("%s", Product[i].name) ;printf("size:");scanf("%s",Product[i].size);printf("time:");scanf("%s",Product[i].time);printf("amount:");scanf("%s",Product[i].amount);}modify_data(int i){int c,w1;do{puts("\nmodify by=>\n\n 1).num 2).name 3).size 4).time 5).amount ");printf("Which you needed?:[ ]\b\b");scanf("%d",&c);if(c>5||c<1){puts("\nChoice error!Please again!");getchar();}}while(c>5||c<1);do{switch(c){case 1:printf("num:");scanf("%s",Product[i].num);break;case 2:printf("name:");scanf("%s",Product[i].name);break;case 3:printf("size:");scanf("%s",Product[i].size);break;case 4:printf("time:");scanf("%s",Product[i].time);break;case 5:printf("amount:");scanf("%s",Product[i].amount);break;}puts("\nNow:\n");printf_face();printf_one(i);printf("\nAre you sure?\n\n\t 1).Sure 2).No and remodify 3).Back without save in this time [ ]\b\b");scanf("%d",&w1);}while(w1==2);return(w1);}no_input(int i,int n){int j,k,w1;do{w1=0;printf("NO.:");scanf("%s",Product[i].num);for(j=0;Product[i].num[j]!='\0';j++)if(Product[i].num[j]>'9'){puts("Input error!Only be made up of(0-9).Please reinput!\n");w1=1;break;}if(w1!=1)for(k=0;k<n;k++)if(k!=i&&strcmp(Product[k].num,Product[i].num)==0){puts("This record is exist.please reinput!\n");}}while(w1==1);}printf_face(){printf("\nnum name size time amount \n");}printf_one(int i){int j;printf("%7s%7s%7s%10s%12s\n",Product[i].num,Product[i].name,Product[i].size,Product[ i].time,Product[i].amount);}printf_back(){int j,w;printf("\n\n\tSuccessful.^_^\n\n");printf("What do you want you to do?\n\n\t1).Browse all now\t2).Back: [ ]\b\b");scanf("%d",&w);if(w==1)browse();else menu();}。
固定资产管理系统软件开发方案

固定资产管理系统软件开发方案一、项目背景与介绍固定资产是指企业拥有并且用于生产经营活动期间的、不打算转售的、预计使用期限超过一个会计年度的资产。
随着企业规模的扩大和发展,固定资产数量也相应增加,使得对固定资产的管理变得愈发复杂。
因此,开发一款固定资产管理系统软件,能够提高企业固定资产管理的效率和精度,实现固定资产的全面管理。
二、项目目标1.开发一款功能完善、易于使用的固定资产管理系统软件;2.实现固定资产的全面管理,包括资产购置、使用、维护、报废等环节的管理;3.提供数据分析与报表生成功能,帮助企业进行固定资产的决策和评估。
三、项目范围与预期成果1.固定资产基本信息管理:包括资产名称、编号、型号、规格、购置日期等;2.资产购置管理:包括采购申请、采购订单、采购入库等环节;3.资产领用与归还管理:包括领用申请、领用登记、领用归还等;4.资产维护管理:包括维修申请、维修登记、维修历史记录等;5.报废管理:包括报废申请、报废审批、报废记录等;6.统计与分析功能:包括资产总量统计、资产价值分析、资产折旧分析等;7.报表生成与导出:包括资产清单、资产折旧表、资产使用情况等报表的生成和导出。
四、项目实施计划1.确定需求和功能设计:与用户部门进行需求沟通,明确软件功能和界面设计;2.数据库设计与搭建:设计并建立支持软件运行所需的数据库;3.系统开发:根据需求和设计,进行系统的编码和开发;4. 测试与调试:对开发完成的系统进行单元测试和综合测试,修复bug;5.用户培训:为使用该系统的员工提供相关的使用培训;6.部署与上线:在完成测试和培训后,将系统部署到生产环境中;7.后期维护与优化:对系统进行定期的维护更新和性能优化。
五、开发技术和工具1. 开发语言:建议使用Java或C#进行开发,具备良好的可扩展性和跨平台性;2. 数据库:建议使用关系型数据库,如MySQL或Oracle,以支持大规模数据的管理与查询;3. 前端技术:使用HTML、CSS和JavaScript等前端开发技术,构建用户友好的界面;4. 开发工具:推荐使用IDE工具,如Eclipse或Visual Studio等,提高开发效率;5. 数据分析与报表生成:选择合适的数据分析工具和报表生成工具,如Excel或Power BI等。
基于Java的企业固定资产管理系统的设计与实现

目录摘要 (I)Abstract................................................................................................................ I I 引言. (1)1相关技术 (3)1.1 Vue框架 (3)1.2 Spring Boot框架 (3)1.3 ECharts (3)1.4 JQuery技术 (3)1.5 本章小结 (4)2系统分析 (5)2.1需求分析 (5)2.2非功能需求 (6)2.3本章小结 (6)3系统设计 (7)3.1系统总体设计 (7)3.1.1系统体系结构 (7)3.1.2系统目录结构 (7)3.1.3系统功能结构 (7)3.2系统详细设计 (8)3.2.1 系统功能设计 (8)3.2.2数据库设计 (9)3.3本章小结 (12)4系统实现 (13)4.1开发环境 (13)4.2开发规范 (13)4.3数据库实现 (13)4.4 Spring Boot项目搭建 (14)4.5功能实现 (14)5系统测试 (19)5.1测试计划 (19)5.2用例测试 (19)5.3压力测试 (19)5.4本章小结 (20)结论 (21)摘要随着不断的扩大企业的规模,一开始用手工去管理固定资产的方法已经不能适用于现在的企业发展现状,也无法满足企业的许多要求,比如管理的快捷性和管理的准确性。
然而计算机信息管理技术的迅猛成长就能恰当的解决这个问题,同时,计算机技术能够与现代化的管理技术互相的协调与配合,做完企业每日的固定资产管理工作就会更加的精准与快速!这样企业就能用最少的人员去完成较多的工作,工作的效率与完成工作的质量也有了大幅度的提高!在这样有应用需求的强行推动下,近期中国自主研发的技术有了很大的提升,比如说ERP软件技术,它的功能齐全,满足于多数的大、中型企业的发展需求。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
/////////////////////////////////////////////////////////////////////////////////////////////////////用户登录/////////////////////////////////////////////////////////////////////////////////////////////////////package com.newer.property;import java.awt.GridLayout;import java.awt.event.ActionEvent;import java.awt.event.ActionListener;import java.sql.*;import java.sql.Statement;import java.sql.ResultSet;import javax.swing.JButton;import javax.swing.JLabel;import javax.swing.JTextField;import javax.swing.JPasswordField;import javax.swing.JPanel;import javax.swing.JFrame;public class user_land extends JFrame implements ActionListener{static Connection conn=null;static Statement stat=null;static ResultSet rs=null;static String url="jdbc:sqlserver://127.0.0.1:1433;DatabaseName=_Property";static String user="sa";static String password="";JPanel p1,p2,p3,p4,p5;JLabel lbl1,lbl2,lbl3,lbl4;JTextField txt_name;JPasswordField txt_pwd;JButton btn1,btn2,btn3;static{try{Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver"); } catch(Exception e){System.out.println(" 加载驱动失败");e.printStackTrace();}}public user_land(){this.setTitle(" 固定资产及设备用户登录");p1=new JPanel();p2=new JPanel();p3=new JPanel();p4=new JPanel();p5=new JPanel();lbl1=new JLabel(" 欢迎登录 ");lbl2=new JLabel(" 用户名: ");lbl3=new JLabel(" 密码:");lbl4=new JLabel();txt_name=new JTextField(10);txt_pwd=new JPasswordField(10);btn1=new JButton(" 登录 ");btn2=new JButton(" 清空 ");btn3=new JButton(" 退出 ");p1.add(lbl1);p2.add(lbl2);p2.add(txt_name);p3.add(lbl3);p3.add(txt_pwd);p4.add(btn1);p4.add(btn2);p4.add(btn3);p5.add(lbl4);this.setLayout(new GridLayout(5,1));this.add(p1);this.add(p2);this.add(p3);this.add(p4);this.add(p5);this.setBounds(400, 300, 400, 300);this.setDefaultCloseOperation(EXIT_ON_CLOSE);this.setVisible(true);//添加按钮登录事件btn1.addActionListener(new ActionListener(){public void actionPerformed(ActionEvent e) {if((txt_name.getText().equals("")==true)&&(txt_pwd.getText().equals("")==false))lbl4.setText(" 登录失败,用户名不能为空");if((txt_name.getText().equals("")==false)&&(txt_pwd.getText().equals("")==true))lbl4.setText(" 登录失败,密码不能为空 ");if((txt_name.getText().equals("")==true)&&(txt_pwd.getText().equals("")==true))lbl4.setText(" 登录失败,用户名/密码不能为空");if(is_Property()){new Sys_interface().show();}elseif((txt_name.getText().equals("")==false)&&(txt_pwd.getText().equals("")==false))lbl4.setText(" 登录失败,用户名/密码错误 ");}});btn1.addActionListener(this);//清空用户名和密码btn2.addActionListener(new ActionListener(){public void actionPerformed(ActionEvent e) {txt_name.setText(null);txt_pwd.setText(null);lbl4.setText(null);}});//退出btn3.addActionListener(new ActionListener(){public void actionPerformed(ActionEvent e) {System.exit(0);}});}protected void user_land(Object setVisible) {// TODO Auto-generated method stub}public boolean is_Property(){try{conn=DriverManager.getConnection(url, user, password);//System.out.println(" 连接成功 ");stat=conn.createStatement();String sql="select * from Admin_Info";rs=stat.executeQuery(sql);while(rs.next()){//System.out.println(rs.getString("A_name")+"\t"+rs.getString("A_pwd"));String name=txt_name.getText();String pwd=txt_pwd.getText();if(name.equals(rs.getString("A_name")) &&pwd.equals(rs.getString("A_pwd"))){//System.out.println(" 登录成功!!");return true;}}}catch(SQLException e){System.out.println(" 连接失败 !!!");e.printStackTrace();}//关闭数据库finally{try{if(rs!=null){rs.close();}if(stat!=null){stat.close();}if(conn!=null){conn.close();}}catch(Exception e2){System.out.println(" 关闭失败 ");e2.printStackTrace();}}return false;}public static void main(String[] args) {new user_land();}public void actionPerformed(ActionEvent e) {//System.exit(0);this.setVisible(false);}}//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////主界面///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// package com.newer.property;import java.awt.BorderLayout;import java.awt.Color;import java.awt.Dialog;import java.awt.FlowLayout;import java.awt.Font;import java.awt.event.ActionEvent;import java.awt.event.ActionListener;import javax.swing.JFrame;import javax.swing.JLabel;import javax.swing.JMenuBar;import javax.swing.JMenuItem;import javax.swing.JMenu;import javax.swing.JPanel;import javax.swing.JTextArea;import javax.swing.JTextField;public class Sys_interface extends JFrame implements ActionListener {JPanel p=null;JMenuItem jmi_1,jmi_2,jmi_3,jmi_4,jmi_5,jmi_6,jmi_7,jmi_8,jmi_9,jmi_10;JMenuBar jmb=null;JMenu jm_1=null,jm_2=null,jm_3=null,jm_4=null;JLabel text;public Sys_interface(){this.setTitle(" 固定资产及设备管理系统");text=new JLabel("欢迎进入固定资产及设备管理系统");text.setFont(new Font(" 宋体 ",1,28));text.setForeground(Color.blue);p=new JPanel();jmb=new JMenuBar();jm_1=new JMenu(" 系统功能 ");jm_2=new JMenu(" 资产管理 ");jm_3=new JMenu(" 系统查询 ");jm_4=new JMenu(" 帮助 ");jmi_1=new JMenuItem(" 用户登录 ");jmi_2=new JMenuItem(" 注销用户 ");jmi_3=new JMenuItem(" 用户添加 ");jmi_4=new JMenuItem(" 退出系统 ");jmi_5=new JMenuItem(" 资产借出管理");jmi_6=new JMenuItem(" 资产信息管理");jmi_7=new JMenuItem(" 资产信息查询");jmi_8=new JMenuItem(" 资产借出查询");jmi_9=new JMenuItem(" 资产归还查询");jmi_10=new JMenuItem(" 关于 ");jm_1.add(jmi_1);jm_1.add(jmi_2);jm_1.add(jmi_3);jm_1.add(jmi_4);jm_2.add(jmi_5);jm_2.add(jmi_6);jm_3.add(jmi_7);jm_3.add(jmi_8);jm_3.add(jmi_9);jm_4.add(jmi_10);jmb.add(jm_1);jmb.add(jm_2);jmb.add(jm_3);jmb.add(jm_4);add(text,BorderLayout.CENTER);this.setJMenuBar(jmb);//this.setLayout(new BorderLayout());//this.add(p,BorderLayout.NORTH);jmi_1.addActionListener(new ActionListener(){public void actionPerformed(ActionEvent e) {new user_land().show();}});jmi_2.addActionListener(this);jmi_2.addActionListener(new ActionListener() {@Overridepublic void actionPerformed(ActionEvent arg0) {new user_land().show();}});jmi_3.addActionListener(new ActionListener(){public void actionPerformed(ActionEvent e) {new Pass_word().show();}});jmi_4.addActionListener(new ActionListener(){public void actionPerformed(ActionEvent e) {System.exit(0);}});jmi_5.addActionListener(new ActionListener(){public void actionPerformed(ActionEvent e) {new loan_prop_manage().show();}});jmi_6.addActionListener(new ActionListener(){public void actionPerformed(ActionEvent e) {new property_Info().show();}});jmi_7.addActionListener(new ActionListener(){public void actionPerformed(ActionEvent e) {new prop_info_select().show();}});jmi_8.addActionListener(new ActionListener(){public void actionPerformed(ActionEvent e) {new Loan_prop_select().show();}});jmi_9.addActionListener(new ActionListener(){public void actionPerformed(ActionEvent e) {new back_prop_select ().show();}});jmi_10.addActionListener(new ActionListener(){public void actionPerformed(ActionEvent e) {new about().show();}});this.setBounds(200,200,500,400);this.setDefaultCloseOperation(EXIT_ON_CLOSE);}public void actionPerformed(ActionEvent e) {//System.exit(0);this.setVisible(false);}public static void main(String[] args) {new Sys_interface().show();}}////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////资产借出管理///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////package com.newer.property;import java.awt.*;import java.awt.event.ActionEvent;import java.awt.event.ActionListener;import java.sql.*;import java.util.Vector;import javax.swing.*;import java.awt.event.FocusEvent;import java.awt.event.FocusListener;import java.awt.event.MouseEvent;import java.awt.event.MouseListener;import javax.swing.event.ListSelectionEvent;import javax.swing.event.ListSelectionListener;import javax.swing.event.TableModelListener;import javax.swing.event.TableModelEvent;import javax.swing.table.DefaultTableModel;import javax.swing.table.TableModel;public class loan_prop_manage extends JFrame implementsActionListener{ Vector<Vector> data=null;DefaultTableModel model = null;Connection conn=null;Statement stat=null;ResultSet rs1=null;JTable loan_prop=null;JLabel label;JTextField text;JTextField txt01,txt02,txt03,txt04,txt05,txt06;JPanel p1=null,p2=null,p3=null,p4,p5,p6,p7,p8,p9,p10; Choice c1=null,c2=null;JLabel lb1=null,lb2=null,lb3=null,lb4=null,lb5=null,lb6=null; JButton btn_ok=null;JButton btn_exit=null;JButton btn_fresh=null;JButton btn_save=null;JButton btn_del=null;Vector<String> columnName=new Vector();public loan_prop_manage(){text=new JTextField();columnName.add(" 资产编号 ");columnName.add(" 资产名称 ");columnName.add(" 资产型号 ");columnName.add(" 借出时间 ");columnName.add(" 借出数量 ");columnName.add(" 借出人 ");p1=new JPanel();p2=new JPanel();p3=new JPanel();p4=new JPanel();p5=new JPanel();p6=new JPanel();p7=new JPanel();p8=new JPanel();p9=new JPanel();p10=new JPanel();lb1=new JLabel(" 资产编号 ");lb2=new JLabel(" 资产名称 ");lb3=new JLabel(" 资产型号 ");lb4=new JLabel(" 借出时间 ");lb5=new JLabel(" 借出数量 ");lb6=new JLabel(" 借出人");txt01=new JTextField(8);txt02=new JTextField(8);txt03=new JTextField(8);txt04=new JTextField(8);txt05=new JTextField(8);txt06=new JTextField(8);c1=new Choice();c2=new Choice();text=new JTextField(5);c1.add(" 资产编号 ");btn_ok=new JButton(" 确定 ");btn_exit=new JButton(" 退出 ");btn_fresh=new JButton(" 刷新 ");btn_save=new JButton(" 保存 ");btn_del=new JButton(" 删除 ");p1.add(new JLabel(" 查询字段 "));p1.add(c1);p1.add(new JLabel(" 运算符 "));p1.add(c2);p1.add(new JLabel(" 输入数据 "));p1.add(text);p1.add(btn_ok);p1.add(btn_exit);p1.setBorder(BorderFactory.createTitledBorder(" 请操作 ")); p3.add(lb1);p3.add(txt01);p4.add(lb2);p4.add(txt02);p5.add(lb3);p5.add(txt03);p6.add(lb4);p6.add(txt04);p7.add(lb5);p7.add(txt05);p8.add(lb6);p8.add(txt06);p10.add(btn_fresh);p10.add(btn_save);p10.add(btn_del);p2.setLayout(new GridLayout(3, 2));p2.add(p3);p2.add(p4);p2.add(p5);p2.add(p6);p2.add(p7);p2.add(p8);loan_prop=new JTable(this.getDate(),columnName);model = new DefaultTableModel(getDate(),columnName);p9.add(new JScrollPane(loan_prop));this.setLayout(new GridLayout(4, 1));this.add(p1);this.add(p9);this.add(p2);this.setBounds(400,300,500,400);this.setDefaultCloseOperation(EXIT_ON_CLOSE);this.setTitle(" 资产借出管理");btn_save.addActionListener(new ActionListener(){public void actionPerformed(ActionEvent arg0){try{Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");conn=DriverManager.getConnection("jdbc:sqlserver://127.0.0.1:1433;DatabaseName=_prop erty","sa","");stat=conn.createStatement();String sql="insert into loan_info (prop_name,prop_type,loan_time,loan_num)"+"values('"+txt02.getText()+"','"+txt03.getText()+"','"+txt04.getText()+"','"+txt05.getText()+"')";stat.executeUpdate(sql);DefaultTableModel mod= new DefaultTableModel(getDate(),columnName);loan_prop.setModel(mod);loan_prop.repaint();loan_prop.updateUI();}catch(Exception e){System.out.println(e.getMessage());}try{if(rs1!=null){rs1.close();}if(stat!=null){stat.close();}if(conn!=null){conn.close();}}catch(Exception e2){");System.out.println(" 关闭失败e2.printStackTrace();}}});btn_ok.addActionListener(new ActionListener(){public void actionPerformed(ActionEvent e) {DefaultTableModel dtb=newDefaultTableModel(selectDate(),columnName);loan_prop.setModel(dtb);loan_prop.repaint();loan_prop.updateUI();}});/*btn_exit.addActionListener(new ActionListener(){public void actionPerformed(ActionEvent arg0){}});*/btn_exit.addActionListener(this);btn_fresh.addActionListener(new ActionListener(){public void actionPerformed(ActionEvent arg0){DefaultTableModel mod = new DefaultTableModel(getDate(),columnName);loan_prop.setModel(mod);loan_prop.repaint();loan_prop.updateUI();}});loan_prop.getSelectionModel().addListSelectionListener(new ListSelectionListener(){public void valueChanged(ListSelectionEvent e){btn_del.addActionListener(new ActionListener(){public void actionPerformed(ActionEvent arg0){try{int j= loan_prop.getSelectedRow();Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");conn=DriverManager.getConnection("jdbc:sqlserver://127.0.0.1:1433;DatabaseName=_prop erty","sa","");stat=conn.createStatement();String sql1="delete from loan_info where prop_id="+""+data.get(j).get(0)+"";stat.executeUpdate(sql1);}catch(Exception ee){System.out.println(ee.getMessage());}finally{try{if(rs1!=null){rs1.close();}if(stat!=null){stat.close();}if(conn!=null){conn.close();}}catch(Exception e2){System.out.println(" 关闭失败 ");e2.printStackTrace();}}DefaultTableModel mod=new DefaultTableModel(getDate(),columnName);loan_prop.setModel(mod);loan_prop.repaint();loan_prop.updateUI();}});}});loan_prop.getSelectionModel().addListSelectionListener(new ListSelectionListener(){public void valueChanged(ListSelectionEvent e){int i= loan_prop.getSelectedRow();txt01.setText(data.get(i).get(0).toString());txt02.setText((String)data.get(i).get(1));txt03.setText((String)data.get(i).get(2));txt04.setText(data.get(i).get(3).toString());txt05.setText(data.get(i).get(4).toString());txt06.setText(data.get(i).get(5).toString());}});}public Vector selectDate(){data=new Vector<Vector>();try{Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");conn=DriverManager.getConnection("jdbc:sqlserver://127.0.0.1:1433;DatabaseName=_prop erty","sa","");stat=conn.createStatement();int x=Integer.parseInt(text.getText().trim());//System.out.println(x);rs1=stat.executeQuery("select * from loan_info where prop_id="+x);while(rs1.next()){Vector al=new Vector();al.add(rs1.getInt("prop_id"));al.add(rs1.getString("prop_name"));al.add(rs1.getString("prop_type"));al.add(rs1.getDate("loan_time"));al.add(rs1.getInt("loan_num"));al.add(rs1.getString("u_name"));data.add(al);}}catch(Exception e){e.printStackTrace();}finally{try{if(rs1!=null){rs1.close();}if(stat!=null){stat.close();}if(conn!=null){conn.close();}}catch(Exception e2){System.out.println(" 关闭失败 ");e2.printStackTrace();}}return data;}public Vector getDate(){data=new Vector<Vector>();try{Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");conn=DriverManager.getConnection("jdbc:sqlserver://127.0.0.1:1433;DatabaseName=_prop erty","sa","");stat=conn.createStatement();rs1=stat.executeQuery("select * from loan_info");while(rs1.next()){Vector al=new Vector();al.add(rs1.getInt("prop_id"));al.add(rs1.getString("prop_name"));al.add(rs1.getString("prop_type"));al.add(rs1.getDate("loan_time"));al.add(rs1.getInt("loan_num"));al.add(rs1.getString("u_name"));data.add(al);}}catch(Exception e){System.out.println(e.getMessage());}finally{try{if(rs1!=null){rs1.close();}if(stat!=null){stat.close();}if(conn!=null){conn.close();}}catch(Exception e2){System.out.println(" 关闭失败 ");e2.printStackTrace();}}return data;}public static void main(String[] args){new loan_prop_manage().show();}public void actionPerformed(ActionEvent e) {//System.exit(0);this.setVisible(false);}}///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////资产借出查询////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////package com.newer.property;import java.sql.*;import java.util.ArrayList;import javax.swing.JButton;import java.awt.event.*;import javax.swing.JTextField;import java.util.Vector;import java.awt.BorderLayout;import java.awt.Choice;import java.awt.FlowLayout;import javax.swing.BorderFactory;import javax.swing.JFrame;import javax.swing.JLabel;import javax.swing.JPanel;import javax.swing.JScrollPane;import javax.swing.JTable;import javax.swing.table.DefaultTableModel;public class Loan_prop_select extends JFrame implements ActionListener{Connection conn=null;Statement stat=null;ResultSet rs=null;JTable table=null;JLabel label;JTextField text;JButton btn_ok=null,btn_exit=null;JPanel p1=null,p2=null;Vector<String> columnName=new Vector();public Loan_prop_select(){this.setTitle(" 资产借出查询 ");columnName.add(" 流水号 ");columnName.add(" 资产编号 ");columnName.add(" 借用人 ");columnName.add(" 借出数量 ");columnName.add(" 借出时间 ");p1=new JPanel();p2=new JPanel();text=new JTextField();text=new JTextField(5);btn_ok=new JButton(" 查询 ");btn_exit=new JButton(" 退出 ");p1.add(new JLabel(" 资产编号 "));p1.add(text);p1.add(btn_ok);p1.add(btn_exit);p1.setBorder(BorderFactory.createTitledBorder(" 数据查询 "));btn_exit.addActionListener(this);table=new JTable(this.getDate(),columnName);this.setLayout(new BorderLayout());this.add(p1,BorderLayout.NORTH);this.add(new JScrollPane(table),BorderLayout.CENTER);this.setBounds(400,300,500,400);this.setDefaultCloseOperation(EXIT_ON_CLOSE);btn_ok.addActionListener(new ActionListener() {@Overridepublic void actionPerformed(ActionEvent arg0) {DefaultTableModel dtm=new DefaultTableModel(selectDate(),columnName);table.setModel(dtm);table.repaint();table.updateUI();}});}public Vector selectDate(){Vector<Vector> data=new V ector<Vector>();try{Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");conn=DriverManager.getConnection("jdbc:sqlserver://127.0.0.1:1433;DatabaseName=_prop erty","sa","");stat=conn.createStatement();int x=Integer.parseInt(text.getText().trim());//System.out.println(x);rs=stat.executeQuery("select * from loan_info where prop_id="+x);while(rs.next()){Vector al=new Vector();al.add(rs.getString("loan_id"));al.add(rs.getString("prop_id"));al.add(rs.getString("u_id"));al.add(rs.getString("loan_num"));al.add(rs.getString("loan_time"));data.add(al);}}catch(Exception e){System.out.println(e.getMessage());}finally{//关闭try{if(rs!=null){rs.close();}if(stat!=null){stat.close();}if(conn!=null){conn.close();}}catch(Exception e2){System.out.println(" 关闭失败 ");e2.printStackTrace();}}return data;}public Vector getDate(){Vector<Vector> data=new V ector<Vector>();try{Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");conn=DriverManager.getConnection("jdbc:sqlserver://127.0.0.1:1433;DatabaseName=_prop erty","sa","");stat=conn.createStatement();rs=stat.executeQuery("select * from loan_Info");while(rs.next()){Vector al=new Vector();al.add(rs.getString("loan_id"));al.add(rs.getString("prop_id"));al.add(rs.getString("u_id"));al.add(rs.getString("loan_num"));al.add(rs.getString("loan_time"));data.add(al);}}catch(Exception e){System.out.println(e.getMessage());}finally{//关闭try{if(rs!=null){rs.close();}if(stat!=null){stat.close();}if(conn!=null){conn.close();}}catch(Exception e2){System.out.println(" 关闭失败 ");e2.printStackTrace();}}return data;}public static void main(String[] args) {new Loan_prop_select().show();}public void actionPerformed(ActionEvent e) {//System.exit(0);this.setVisible(false);}}/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////资产归还查询///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// package com.newer.property;import java.sql.*;import java.util.Vector;import java.awt.BorderLayout;import java.awt.event.ActionEvent;import java.awt.event.ActionListener;import java.awt.event.FocusEvent;import java.awt.event.FocusListener;import java.awt.event.MouseEvent;import java.awt.event.MouseListener;import javax.swing.BorderFactory;import javax.swing.JFrame;import javax.swing.JLabel;import javax.swing.JTextField;import javax.swing.JButton;import javax.swing.JPanel;import javax.swing.JScrollPane;import javax.swing.JTable;import javax.swing.table.DefaultTableModel;import javax.swing.table.TableModel;import javax.swing.event.ListSelectionEvent;import javax.swing.event.ListSelectionListener;import javax.swing.event.TableModelEvent;import javax.swing.event.TableModelListener;public class back_prop_select extends JFrame implements ActionListener {Vector<Vector> data=null;DefaultTableModel model=null;Connection conn=null;Statement stat=null;ResultSet rs=null;JPanel pa1,pa2;JButton btn1,btn2;JTable tab=null;JTextField tex=null;JTextField txt1,txt2,txt3,txt4,txt5;JLabel lab1,lab2,lab3;Vector columnName=new V ector();public back_prop_select(){columnName.add(" 流水号 ");columnName.add(" 资产编号 ");columnName.add(" 借用人 ");columnName.add(" 借用数量 ");columnName.add(" 借用时间 ");columnName.add(" 归还数量 ");columnName.add(" 归还时间 ");pa1=new JPanel();pa2=new JPanel();btn1=new JButton(" 确定 ");btn2=new JButton(" 退出 ");lab1=new JLabel(" 查询字段: ");lab2=new JLabel(" 借用人 ");tex=new JTextField(5);tab=new JTable(this.getDate(),columnName);txt1=new JTextField(10);txt2=new JTextField(10);txt3=new JTextField(10);txt4=new JTextField(10);txt5=new JTextField(10);pa1.add(lab1);pa1.add(lab2);pa1.add(tex);pa1.add(btn1);pa1.add(btn2);pa2.add(tab);model = new DefaultTableModel(getDate(),columnName);tab=new JTable(model);pa1.setBorder(BorderFactory.createTitledBorder(" 查询参数 ")); pa2.add(new JScrollPane(tab));this.setTitle(" 资产归还查询 ");this.setLayout(new BorderLayout());this.add(pa1,BorderLayout.NORTH);this.add(new JScrollPane(tab));this.setBounds(300,200,500,300);this.setDefaultCloseOperation(EXIT_ON_CLOSE);//查询btn1.addActionListener(new ActionListener(){public void actionPerformed(ActionEvent e) {//1、定义一个方法//2、更新表格的显示DefaultTableModel dtm=new DefaultTableModel(selectDate(), columnName);tab.setModel(dtm);tab.repaint();tab.updateUI();}});/*tab.getSelectionModel().addListSelectionListener(new ListSelectionListener(){public void valueChanged(ListSelectionEvent e) {int x=tab.getSelectedRow();txt1.setText((String)data.get(x).get(0));txt2.setText((String)data.get(x).get(1));txt3.setText((String)data.get(x).get(2));txt4.setText((String)data.get(x).get(3));txt5.setText(data.get(x).get(4).toString());}});*///选中显示/*tab.getSelectionModel().addListSelectionListener(new ListSelectionListener(){public void valueChanged(ListSelectionEvent e) {int x=tab.getSelectedRow();txt1.setText((String)data.get(x).get(0));txt2.setText((String)data.get(x).get(1));txt3.setText((String)data.get(x).get(2));txt4.setText(data.get(x).get(3).toString());}});*/btn2.addActionListener(this);}public Vector getDate(){Vector<Vector> data=new V ector<Vector>();try{Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");conn=DriverManager.getConnection("jdbc:sqlserver://127.0.0.1:1433;DatabaseName=Proper ty","sa","123");stat=conn.createStatement();rs=stat.executeQuery("select * from loan_Info");while(rs.next()){Vector al=new Vector();al.add(rs.getString("loan_id"));al.add(rs.getString("prop_id"));al.add(rs.getString("u_id"));al.add(rs.getString("loan_time"));al.add(rs.getString("loan_num"));data.add(al);}}catch(Exception e){System.out.println(e.getMessage());}finally{//关闭try{if(rs!=null){rs.close();}if(stat!=null){stat.close();}if(conn!=null){conn.close();}}catch(Exception e2){System.out.println(" 关闭失败 ");e2.printStackTrace();}}return data;}public Vector selectDate(){data=new Vector<Vector>();try{Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");conn=DriverManager.getConnection("jdbc:sqlserver://127.0.0.1:1433;DatabaseName=Proper ty","sa","123");stat=conn.createStatement();String lab1="select * from loan_info where u_id='"+tex.getText().trim()+"'";rs=stat.executeQuery(lab1);while(rs.next()){Vector back=new Vector();back.add(rs.getString("loan_id"));back.add(rs.getString("prop_id"));back.add(rs.getString("u_id"));back.add(rs.getString("loan_time"));back.add(rs.getInt("loan_num"));data.add(back);}}catch(Exception e){System.out.println(e.getMessage());}finally{//关闭try{if(rs!=null){rs.close();}if(stat!=null){stat.close();}if(conn!=null){。