软件工程课程设计人事管理系统.docx
《软件工程课程设计人事管理系统.docx》由会员分享,可在线阅读,更多相关《软件工程课程设计人事管理系统.docx(56页珍藏版)》请在冰豆网上搜索。
![软件工程课程设计人事管理系统.docx](https://file1.bdocx.com/fileroot1/2023-2/2/1e8c79ba-5cf7-48f2-bf5d-e6efe728f44b/1e8c79ba-5cf7-48f2-bf5d-e6efe728f44b1.gif)
软件工程课程设计人事管理系统
一、系统概述
随着计算机技术的飞速发展,计算机在企业管理中应用的普及,利用计算机实现企业人事管理势在必行。
对于大中型企业来说,利用计算机支持企业高效率完成劳动人事管理的日常事务,是适应现代企业制度要求、推动企业劳动人事管理走向科学化、规范化的必要条件;计算机管理所无法比拟的优点检索迅速、查找方便、可靠性高、存储量大、保密性好、寿命长、成本低等。
这些优点能够极大地提高人事管理的效率,也是企业的科学化、正规化管理,与世界接轨的重要条件。
不同的企业具有不同的人事管理制度,这就决定了不同的企业需要不同的人事管理系统。
二、需求分析
需求分析是介于系统分析阶段和软件设计阶段之间的重要桥梁。
一方面,需求分析以系统规格说明和项目规划作为分析活动的基本出发点,并从软件角度对它们进行检查与调整;另一方面,需求规格说明又是软件设计、实现测试直至维护的主要基础.良好的分析活动有助于避免或尽早发现早期的错误,从而提高软件生产率,降低开发成本,改进软件质量。
该系统分为4个模块:
用户管理模块、人事信息管理模块、员工调动管理模块和薪酬管理模块。
用户登管理模块:
该模块是对登陆该系统的用户的用户名及密码进行管理。
分为用户登录和注册新用户两项.不同的用户拥有不同的权限。
人事信息管理模块:
该模块是关于公司的人事信息维护,首先是对入职员工的基本信息的录入、修改、浏览等操作;其次是员工人事档案、合同档案等基本信息的管理和公司的部门管理;最后,并对公司的人事信息从工种,专业,学历等属性进行统计分析。
员工调动管理模块:
该模块是对员工的职位调动进行管理的,员工调动主要分为内部调动和外部调动两方面,内部调动为本城市中部门间的调动,外部调动为分公司间的调动。
本模块还有登记新员工和复职、离职等信息管理。
薪酬管理模块:
主要包括薪酬登记、薪酬修改、薪酬查询薪酬设置4部分组成。
其中,薪酬登记是完成对员工薪酬的添加,如果有需要更正的部分,通过薪酬修改模块来实现,系统还提供给员工查询薪酬的功能,通过薪酬查询来实现。
综上所述,系统的总体功能需求如图2.1所示。
图2.1
三、建立系统用例模型
(1)识别角色
●人事部
●财务部
●员工
(2)创建用例
与人事部相关的用例:
用户管理;人事信息管理;员工调动管理;
与财务部相关的用例:
薪酬管理;
与员工相关的用例:
用户管理;人事信息管理;员工调动管理;薪酬管理;
(3)建立用例图
整个系统用例图如图3。
1所示
图3.1
四、建立系统动态模型
(1)活动图
图4.1是描述员工申请调动过程。
首先,员工提出书面调动申请。
若人事部不同意,则通知员工不能进行工作交换。
若人事部同意,则提出岗位安排,通知财务部进行工资变更,并且通知员工办理相关手续,进行工作交换.储存新职位变动,操作完成。
图4.1
(2)时序图
员工工资过程时序图如图4.2所示。
图4。
2
员工考勤查询时序图如图4。
3所示。
(3)协作图
员工实际工资协作图如图4。
4所示.
图4。
4
考勤记录查询协作图如图4。
5所示。
图4。
5
员工信息查询协作图如图4.6
图4。
6
五、系统类模型
(1)系统包图
如图5。
1所示。
图5.1
(2)类图
图5。
2描述了员工信息包中的类图。
图5。
2
图5.3描述了合同信息包中的类图
图5。
3
图5.4描述了实发工资包中的类图
图5.4
六、数据库概念模型设计
在需求分析的基础上设计出能够满足用户需求的各种实体以及它们之间的关系.下面例举出各实体的实体图及实体关系E-R图:
1员工:
编号、姓名、性别、身份证号……
图6。
1员工实体图
2合同:
合同编号、员工编号、合同类型、合同开始日期、合同期限……
图6。
2合同实体图
3考勤:
所属工资月份、员工编号、出勤天数、请假天数、迟到或早退次数……
图6.3考勤实体图
4工资:
所属工资月份、员工编号、员工姓名、出勤天数……
图6.4工资实体图
5操作员:
名称、密码、权限
图6.5操作员实体图
6员工-合同实体关系图
图6。
6员工-合同实体关系图
7与工资有关的实体关系E—R图
图6.7与工资有关的实体关系E-R图
七、可行性研究
开发任何一个基于计算机的系统,都会受到时间和资源上的限制。
因此,在接受项目开发任务之前,必须根据客户提供的时间和资源条件进行可行性分析,以减少项目开发风险,避免人力、物力和财力的浪费。
可行性分析与风险分析在很多方面是相互关联的,项目风险越大,开发高质量的软件的可行性就越小。
(1)新系统目标可行性分析:
分析新系统的目标是否符合企业的现状和发展的需要。
如果公司采用人事管理系统来管理公司人员,那么它在工作效率上会有很大的提高。
(2)社会可行性分析:
社会可行性分析主要是指管理信息系统的开发是否符合国家法律、政策,是否能够与社会大系统实现良好的对接。
这个人事管理系统是个小规模的管理系统,是用来管理一个公司的员工信息的,它符合国家法律要求,能与社会大系统实现良好对接。
(3)技术可行性分析:
技术可行性分析是根据新系统的目标来衡量是否具备所需要的技术,包括系统开发人员数量和水平,硬件方面,软件方面及其它应用技术.
(4)经济可行性分析:
经济可行性分析主要是对开发新系统所投入的资金与系统投入使用后所带来的经济效益进行比较,确认新系统是否会给企业带来一定的经济效益.由于本系统规模较小,所以开发本系统不会耗费太多的资金,相反如果将本系统很好的运用到工作中,能大大提高工作效率,给公司带来更多的经济效益。
(5)管理可行性分析:
管理可行性分析主要是分析企业现行的管理体制和企业领导是否具有现代化的管理意识和管理水平。
八、详细设计
图8.1登录窗体
主要实现代码如下:
#pragmaonce
namespace登陆界面{
usingnamespaceSystem;
usingnamespaceSystem:
:
ComponentModel;
usingnamespaceSystem:
:
Collections;
usingnamespaceSystem:
:
Windows:
:
Forms;
usingnamespaceSystem:
:
Data;
usingnamespaceSystem:
:
Drawing;
publicrefclassForm1:
publicSystem:
:
Windows:
:
Forms:
:
Form
{
public:
Form1(void)
{
InitializeComponent();
}
protected:
~Form1()
{
if(components)
{
deletecomponents;
}
}
private:
System:
:
Windows:
:
Forms:
:
Button^button1;
private:
System:
:
Windows:
:
Forms:
:
CheckBox^登陆界面;
private:
System:
:
Windows:
:
Forms:
:
Button^button2;
private:
System:
:
Windows:
:
Forms:
:
Button^button3;
private:
System:
:
Windows:
:
Forms:
:
CheckBox^checkBox2;
private:
System:
:
Windows:
:
Forms:
:
TextBox^textBox1;
private:
System:
:
Windows:
:
Forms:
:
TextBox^textBox2;
private:
System:
:
Windows:
:
Forms:
:
TextBox^textBox3;
private:
System:
:
Windows:
:
Forms:
:
Label^label1;
private:
System:
:
Windows:
:
Forms:
:
Label^label2;
private:
System:
:
Windows:
:
Forms:
:
Label^label3;
protected:
private:
System:
:
ComponentModel:
:
Container^components;
#pragmaregionWindowsFormDesignergeneratedcode
voidInitializeComponent(void)
{
this-〉button1=(gcnewSystem:
:
Windows:
:
Forms:
:
Button());
this—>登陆界面=(gcnewSystem:
:
Windows:
:
Forms:
:
CheckBox());
this—>button2=(gcnewSystem:
:
Windows:
:
Forms:
:
Button());
this-〉button3=(gcnewSystem:
:
Windows:
:
Forms:
:
Button());
this-〉checkBox2=(gcnewSystem:
:
Windows:
:
Forms:
:
CheckBox());
this-〉textBox1=(gcnewSystem:
:
Windows:
:
Forms:
:
TextBox());
this-〉textBox2=(gcnewSystem:
:
Windows:
:
Forms:
:
TextBox());
this—〉textBox3=(gcnewSystem:
:
Windows:
:
Forms:
:
TextBox());
this-〉label1=(gcnewSystem:
:
Windows:
:
Forms:
:
Label());
this->label2=(gcnewSystem:
:
Windows:
:
Forms:
:
Label());
this—>label3=(gcnewSystem:
:
Windows:
:
Forms:
:
Label());
this—〉SuspendLayout();
//
//button1
//
this->button1—>Font=(gcnewSystem:
:
Drawing:
:
Font(L”宋体”,9,System:
:
Drawing:
:
FontStyle:
:
Bold,System:
:
Drawing:
:
GraphicsUnit:
:
Point,
static_cast:
Byte〉(134)));
this—>button1-〉Location=System:
:
Drawing:
:
Point(22,215);
this-〉button1->Name=L”button1”;
this->button1->Size=System:
:
Drawing:
:
Size(54,26);
this—>button1->TabIndex=0;
this—〉button1—〉Text=L”登陆”;
this—〉button1—〉UseVisualStyleBackColor=true;
//
//登陆界面
//
this—>登陆界面—>AutoSize=true;
this-〉登陆界面->Checked=true;
this->登陆界面-〉CheckState=System:
:
Windows:
:
Forms:
:
CheckState:
:
Checked;
this—>登陆界面->Cursor=System:
:
Windows:
:
Forms:
:
Cursors:
:
No;
this—〉登陆界面-〉Location=System:
:
Drawing:
:
Point(31,193);
this—〉登陆界面->Name=L"登陆界面";
this-〉登陆界面->Size=System:
:
Drawing:
:
Size(72,16);
this->登陆界面—>TabIndex=1;
this—>登陆界面—〉Text=L"记住密码";
this—>登陆界面->UseVisualStyleBackColor=true;
//
//button2
//
this-〉button2—>Font=(gcnewSystem:
:
Drawing:
:
Font(L”宋体",9,System:
:
Drawing:
:
FontStyle:
:
Bold,System:
:
Drawing:
:
GraphicsUnit:
:
Point,
static_cast:
Byte〉(134)));
this—>button2—>Location=System:
:
Drawing:
:
Point(115,215);
this—>button2-〉Name=L”button2";
this-〉button2-〉Size=System:
:
Drawing:
:
Size(54,26);
this—〉button2—>TabIndex=2;
this->button2—>Text=L”取消”;
this-〉button2-〉UseVisualStyleBackColor=true;
//
//button3
//
this->button3-〉Font=(gcnewSystem:
:
Drawing:
:
Font(L"宋体",9,System:
:
Drawing:
:
FontStyle:
:
Bold,System:
:
Drawing:
:
GraphicsUnit:
:
Point,
static_cast〈System:
:
Byte>(134)));
this—>button3—〉Location=System:
:
Drawing:
:
Point(207,215);
this—>button3—>Name=L"button3”;
this—〉button3—〉Size=System:
:
Drawing:
:
Size(86,26);
this->button3—>TabIndex=3;
this—〉button3-〉Text=L"注册新用户”;
this->button3->UseVisualStyleBackColor=true;
//
//checkBox2
//
this—〉checkBox2—>AutoSize=true;
this-〉checkBox2—〉Location=System:
:
Drawing:
:
Point(179,193);
this—〉checkBox2—>Name=L"checkBox2”;
this—〉checkBox2->Size=System:
:
Drawing:
:
Size(72,16);
this—>checkBox2—>TabIndex=4;
this—>checkBox2—〉Text=L”自动登陆";
this—>checkBox2->UseVisualStyleBackColor=true;
//
//textBox1
//
this—>textBox1—>Location=System:
:
Drawing:
:
Point(179,32);
this—〉textBox1->Name=L”textBox1";
this—>textBox1->Size=System:
:
Drawing:
:
Size(100,21);
this-〉textBox1->TabIndex=5;
//
//textBox2
//
this—>textBox2->Location=System:
:
Drawing:
:
Point(179,84);
this-〉textBox2-〉Name=L"textBox2”;
this-〉textBox2—>Size=System:
:
Drawing:
:
Size(100,21);
this—〉textBox2—〉TabIndex=6;
//
//textBox3
//
this—〉textBox3—>Location=System:
:
Drawing:
:
Point(179,136);
this-〉textBox3—>Name=L"textBox3";
this—〉textBox3—>Size=System:
:
Drawing:
:
Size(100,21);
this—>textBox3-〉TabIndex=7;
//
//label1
//
this—>label1->AutoSize=true;
this—>label1—>Location=System:
:
Drawing:
:
Point(35,35);
this-〉label1—>Name=L”label1";
this—〉label1—>Size=System:
:
Drawing:
:
Size(53,12);
this-〉label1->TabIndex=8;
this->label1->Text=L"职工编号”;
//
//label2
//
this—〉label2->AutoSize=true;
this—>label2-〉Location=System:
:
Drawing:
:
Point(35,87);
this—〉label2—>Name=L"label2”;
this->label2—>Size=System:
:
Drawing:
:
Size(53,12);
this-〉label2-〉TabIndex=9;
this-〉label2—〉Text=L”职工姓名";
//
//label3
//
this—〉label3-〉AutoSize=true;
this-〉label3—>Location=System:
:
Drawing:
:
Point(35,136);
this->label3—〉Name=L"label3”;
this-〉label3—〉Size=System:
:
Drawing:
:
Size(29,12);
this->label3—〉TabIndex=10;
this->label3—>Text=L”密码”;
//
//Form1
//
this-〉AutoScaleDimensions=System:
:
Drawing:
:
SizeF(6,12);
this-〉AutoScaleMode=System:
:
Windows:
:
Forms:
:
AutoScaleMode:
:
Font;
this-〉ClientSize=System:
:
Drawing:
:
Size(312,266);
this->Controls—〉Add(this—〉label3);
this-〉Controls-〉Add(this-〉label2);
this—>Controls->Add(this—〉label1);
this—〉Controls—>Add(this-〉textBox3);
this—>Controls—>Add(this—>textBox2);
this—〉Controls—>Add(this->textBox1);
this—>Controls—>Add(this—〉checkBox2);
this-〉Controls—〉Add(this—〉button3);
this—>Controls—>Add(this—>button2);
this->Controls—>Add(this—>登陆界面);
this—〉Controls—〉Add(this-〉button1);
this->Name=L"Form1";
this—>Text=L"Form1”;
this-〉Load+=gcnewSystem:
:
EventHandler(this,&Form1:
:
Form1_Load);
this—〉ResumeLayout(false);
this—〉PerformLayout();
}
#pragmaendregion
private:
System:
:
VoidForm1_Load(System:
:
Object^sender,System:
:
EventArgs^e){
}
};
}
EndClass
图8.2注册新用户
主要实现代码如下
#pragmaonce
namespace注册新用户{
usingnamespaceSystem;
usingnamespaceSystem:
:
ComponentModel;
usingnamespaceSystem:
:
Collections;
usingnamespaceSystem:
:
Windows:
:
Forms;
usingnamespaceSystem:
:
Data;
usingnamespaceSystem:
:
Drawing;
///〈summary〉
///
publicrefclassForm1:
publicSystem:
:
Windows:
:
Forms:
:
Form
{
public:
Form1(void)
{
InitializeComponent();
}
protected:
///〈summary〉
///清理所有正在使用的资源.
///
~Form1()
{
if(components)
{
deletecomponents;
}
}
private:
System:
:
Windows:
:
Forms:
:
Button^button1;
protected:
private:
System:
:
Windows:
:
Forms:
:
Button^button2;
private:
System:
:
Windows:
:
Forms:
:
TextBox^textBox1;
private:
System:
:
Windows:
:
Forms:
:
TextBox^t