
正文
java实现请假功能代码 java请求超时时间怎么实现
提示:扫一扫查出行【扫一扫了解最新限行尾号】
复制提示
JAVA手写请假工作流
简单的话就不使用流程引擎
创建几个表格进行数据存储
创建一个页面用于个人请假java实现请假功能代码,页面字段如(请假原因java实现请假功能代码,请假天数java实现请假功能代码,事由,备注,开始时间,结束时间,审批人员,隐藏个人id);
将数据存储到请假表中,添加字段,请假状态。记录,默认添加时为0 待审批
在处理人添加处理页面,填写意见,或审批通过不通过。
根据数据id 更新请假状态,记录-1 不通过,1通过。并将审批人记录到处理表中。
如需要转派,可添加修改操作,更新请假记录表。
用户就可以进行审批java实现请假功能代码了。
统计个人审批的根据审批字段查询就好了。
如果需要组织结构,可以创建 dept表,user表,dept_user表,leaveInfo表
相关问答
Q1: java基于cs结构的,含有客户端,服务端的请假管理系统的源代码
import redis.clients.jedis.Jedis;
//java代码模拟处理redis分布式锁代码
public class redisTest {
private static long timeout = 1000;
Q2: java IO练习题
希望对你有用~~嘿嘿~~(我写的是控制台的程序,没用SWING做界面)
import java.io.*;
import java.util.Arrays;
import java.util.Scanner;
public class AbsenteeNote {
public static void main(String[] args) throws IOException {
int select = 0;
select = welcome();
if (select == 1 || select == 2) {
writeLetter(select);
} else {
viewLetter();
}
}
private static int welcome() {
int num = 0;//用于第一层菜单的选择
int num1 = 0;//用于第二层菜单的选择
do {
System.out.println("1:编写请假条");
System.out.println("2:查看请假条");
System.out.print("请选择功能号:");
Scanner in = new Scanner(System.in);
num = in.nextInt();
} while (num != 1 num != 2);//若输出的数字不为1或2,则继续选择
if (num == 1) {
do {
System.out.println("1:病假");
System.out.println("2:事假");
System.out.print("请选择功能号:");
Scanner in = new Scanner(System.in);
num1 = in.nextInt();
} while (num1 != 1 num1 != 2);
return num1;
} else {//当输入的是2(查看请假条),则任意返回一个值。
return 0;
}
}
private static void viewLetter() {//查看请假条
File letter = new File("c:\\Letter\\Letter.txt");
try {
FileInputStream view = new FileInputStream(letter);
byte b[] = new byte[view.available()];
while (view.read(b) != -1) {
FilterOutputStream viewContain=new FilterOutputStream(System.out);
System.out.println("假条内容如下:");
viewContain.write(b);
viewContain.close();
}
view.close();
} catch (FileNotFoundException e) {
System.out.println("文件不存在!!!");
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
private static void writeLetter(int num1) {//写请假条
String str = new String();
if (num1 == 1)
str = "我因发烧,请假一天 ";
else
str = "参加婚礼,于4.10请假一天";
File letter = new File("c:\\Letter\\Letter.txt");
StringBuilder contain = new StringBuilder();
Scanner in = new Scanner(System.in);
System.out.print("寄信人地址:");
contain.append("寄信人地址:" + in.nextLine() + "\r\n");
System.out.print("收件人地址:");
contain.append("收件人地址:" + in.nextLine() + "\r\n");
System.out.print("签名:");
contain.append("签名:" + in.nextLine() + "\r\n");
System.out.print("日期:");
contain.append("日期:" + in.nextLine() + "\r\n");
contain.append(str);
byte[] input = contain.toString().getBytes();
try {
FileOutputStream out = new FileOutputStream(letter);
out.write(input, 0, input.length);
System.out.println("请假条生成成功!!!");
out.close();
} catch (FileNotFoundException e) {
System.out.println("文件不存在!!!");
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
}
Q3: 各位大神java后台请假审核功能怎么写
权限系统
状态筛选
逻辑是请教条写完之后提交审核,boss后台可以看到其权限下的待审核的请假条
Q4: 用java编写员工类Employee
public class Employee {
private int id;
private byte sex;
private String name;
private String duty;
private float salary;
private int holidays;
public Employee(int id,byte sex,String name,String duty, float salary,int holidays){
this.id = id;
this.sex = sex;
this.name = name;
this.duty = duty;
this.salary = salary;
this.holidays = holidays;
}
public String getDuty() {
return duty;
}
public void setDuty(String duty) {
this.duty = duty;
}
public int getHolidays() {
return holidays;
}
public void setHolidays(int holidays) {
this.holidays = holidays;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public float getSalary() {
return salary;
}
public void setSalary(float salary) {
this.salary = salary;
}
public byte getSex() {
return sex;
}
public void setSex(byte sex) {
this.sex = sex;
}
/**
* display(),无返回值,该方法能打印员工的姓名、性别以及职务
* @param employee
*/
public void display(Employee employee){
System.out.println("员工姓名为: " + employee.getName());
if(employee.getSex()==1){
System.out.println("员工性别为: 男 ");
}else if(employee.getSex()==2){
System.out.println("员工性别为:女 ");
}
System.out.println("员工职务为: " + employee.getDuty());
}
/**
* getDecMoney(int day) 返回值是int型。
* 如果请假天数=3,则扣款为30×请假天数;
* 如果请假天数超过3天,则扣款为50×请假天数。
* @param day
* @return
*/
public int getDecMoney(int day){
int deduction = 0; //扣除的工资
if(day = 3){
deduction = 30*day;
}else if(day 3){
deduction = 50*day;
}
return deduction;
}
public static void main(String[] args){
//创建一个员工类的对象
Employee employee = new Employee(123456789,(byte) 1,"陈冠希","生产帽子的(绿色)",(float) 500.8,5);
employee.display(employee); //调用display()
int deduction = employee.getDecMoney(employee.getHolidays());//调用getDecMoney()
System.out.println("该员工因请假扣除工资" + deduction + "元");
}
}
Q5: java导出时候改里面的内容,请假类型数据库存着的是1、2倒出来时候我想把他们换成病假,事假 要怎么改啊
if (null != entParms[j]) {
if (entParms[j] instanceof Date) {
Date date = (Date) entParms[j];
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
entParms[j] = sdf.format(date);
}
//加代码
if(j==5){
if("1".equals(entParms[j].toString()))
entParms[j]="病假";
else
entParms[j]="事假";
}
//加完标示
HSSFCell createCell = row2.createCell(j);
createCell.setCellValue(entParms[j].toString());
java实现请假功能代码的介绍就聊到这里吧,感谢你花时间阅读本站内容,更多关于java请求超时时间怎么实现、java实现请假功能代码的信息别忘了在本站进行查找喔。







