首页>代码>spring boot调用mysql存储过程,mysql存储过程分页 调用存储过程分页>/springboot-procedure/src/main/java/com/simon/springbootprocedure/Employee.java
package com.simon.springbootprocedure;

import java.util.Date;
import java.util.List;

/**
 * @author Simon
 */
public class Employee {
    private Integer EMPNO;   //员工号
    private String ENAME;   //员工名
    private String JOB;     //工种
    private Integer MGR;     //上级
    private Date HIREDATE;//入职日期
    private double SAL;     //工资
    private double COMM;    //奖金
    private Integer DEPTNO;  //部门号


    @Override
    public String toString() {
        String info = String.format("EMPNO[%d], ENAME[%s], JOB[%s], MGR[%d], HIREDATE[%tF], SAL[%.2f], COMM[%.2f], DEPTNO[%d]", EMPNO, ENAME, JOB, MGR, HIREDATE, SAL, COMM, DEPTNO);
        return info;
    }

    public static void Print(List<Employee> empList) {
        int count = empList.size();
        String format = String.format("Employee[%%%dd]: %%s", String.valueOf(count).length());
        String info = String.format("%5s, %7s, %10s, %4s, %10s, %7s, %7s, %s", "EMPNO", "ENAME", "JOB", "MGR", "HIREDATE", "SAL", "COMM", "DEPTNO");
        System.out.println(String.format(format, count, info));
        for (int i = 0; i < count; i++) {
            Employee emp = empList.get(i);
            info = String.format("%5d, %7s, %10s, %4d, %tF, %7.2f, %7.2f, %d", emp.EMPNO, emp.ENAME, emp.JOB, emp.MGR, emp.HIREDATE, emp.SAL, emp.COMM, emp.DEPTNO);
            System.out.println(String.format(format, i, info));
        }
        return;
    }

    public Integer getEMPNO() {
        return EMPNO;
    }

    public void setEMPNO(Integer eMPNO) {
        EMPNO = eMPNO;
    }

    public String getENAME() {
        return ENAME;
    }

    public void setENAME(String eNAME) {
        ENAME = eNAME;
    }

    public String getJOB() {
        return JOB;
    }

    public void setJOB(String jOB) {
        JOB = jOB;
    }

    public Integer getMGR() {
        return MGR;
    }

    public void setMGR(Integer mGR) {
        MGR = mGR;
    }

    public Date getHIREDATE() {
        return HIREDATE;
    }

    public void setHIREDATE(Date hIREDATE) {
        HIREDATE = hIREDATE;
    }

    public double getSAL() {
        return SAL;
    }

    public void setSAL(double sAL) {
        SAL = sAL;
    }

    public double getCOMM() {
        return COMM;
    }

    public void setCOMM(double cOMM) {
        COMM = cOMM;
    }

    public Integer getDEPTNO() {
        return DEPTNO;
    }

    public void setDEPTNO(Integer dEPTNO) {
        DEPTNO = dEPTNO;
    }


}

最近下载更多
最代码官方  LV167 2023年2月12日
最近浏览更多
mengmeng12323423  LV3 2023年6月17日
zhonghua123  LV2 2023年6月13日
1529860026  LV24 2023年6月1日
syczzxj  LV9 2023年5月30日
lingtiejing  LV15 2023年5月13日
小帅哥  LV2 2023年5月7日
Rd_s20192753 2023年5月2日
暂无贡献等级
3263394665  LV9 2023年4月18日
ssh123  LV10 2023年4月18日
youzitao  LV11 2023年4月16日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友