基于javaweb的crm客户关系管理系统(java+springboot+mysql)

news2024/12/23 22:29:41

基于javaweb的crm客户关系管理系统(java+springboot+mysql)

运行环境

Java≥8、MySQL≥5.7

开发工具

eclipse/idea/myeclipse/sts等均可配置运行

适用

课程设计,大作业,毕业设计,项目练习,学习演示等

功能说明

20220519000132

20220519000133

20220519000134

20220519000136

20220519000137

20220519000138

20220519000139

基于javaweb+springboot的客户关系管理系统CRM(Springboot+Maven+MySQL)

Springboot项目CRM客户关系管理系统:

系统实现了CRM客户关系系统的基本功能,主要有看板(当月参与的业务机会、当月转化情况、将要结束的业务机会等)、业务机会(初步接触中、需求分析中、协商方案中、商业谈判中的业务机会)、客户管理、联系人管理、个人日报管理、查看团队日报、主数据管理(组织架构管理)、系统管理(用户管理、角色管理、菜单管理)。

登录控制层:

public class LoginFrm extends javax.swing.JFrame {

/**

  • 皮肤

*/

static {

try {

// LookAndFeel lf = new SubstanceAutumnLookAndFeel();

// LookAndFeel lf = new SubstanceChallengerDeepLookAndFeel();

// LookAndFeel lf = new Plastic3DLookAndFeel();

// LookAndFeel lf = new PlasticLookAndFeel();

LookAndFeel lf = new PlasticXPLookAndFeel();

UIManager.setLookAndFeel(lf);

} catch (UnsupportedLookAndFeelException e) {

e.printStackTrace();

/**

  • 版本序列号

*/

private static final long serialVersionUID = -2989784724450522952L;

// 验证码的String类型

private String imageCode;

private User user;

/** Creates new form LoginFrm */

public LoginFrm(User user) {

this.user = user;

initComponents();

this.setLocationRelativeTo(null);

fillImageCode();

if (user != null) {

this.jtf_username.setText(this.user.getusername());

this.jpw_password.setText(this.user.getpassword());

public void setUser(User user) {

this.user = user;

/**

  • 填充验证码图片

*/

private void fillImageCode() {

// this.jl_checkImage.setIcon(new ImageIcon(“images/check.png”));

// this.repaint();

// jl_checkImage.setIcon(new ImageIcon(ImageIO.read(new

// File(“images/check.png”))));

ImageCodeUtil imageCodeUtil = ImageCodeUtil.getImageCodeUtil();

jl_checkImage.setIcon(new ImageIcon(imageCodeUtil.getBufferedImage()));

imageCode =imageCodeUtil.sRand;

// GEN-BEGIN:initComponents

//

private void initComponents() {

jLabel1 = new javax.swing.JLabel();

jLabel2 = new javax.swing.JLabel();

jLabel3 = new javax.swing.JLabel();

jtf_username = new javax.swing.JTextField();

jpw_password = new javax.swing.JPasswordField();

jLabel4 = new javax.swing.JLabel();

jtf_check = new javax.swing.JTextField();

jl_checkImage = new javax.swing.JLabel();

jb_login = new javax.swing.JButton();

jb_cancle = new javax.swing.JButton();

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

setTitle(“\u7528\u6237\u767b\u5f55”);

jLabel1.setFont(new java.awt.Font(“宋体”, 0, 24));

jLabel1.setText(“\u5ba2\u6237\u5173\u7cfb\u7ba1\u7406\u7cfb\u7edf”);

jLabel2.setText(“\u7528\u6237\u540d\uff1a”);

jLabel3.setText(“\u5bc6 \u7801\uff1a”);

jLabel4.setText(“\u9a8c\u8bc1\u7801\uff1a”);

jb_login.setText(“\u767b\u5f55”);

jb_login.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jb_loginActionPerformed(evt);

});

jb_cancle.setText(“\u53d6\u6d88”);

jb_cancle.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jb_cancleActionPerformed(evt);

});

javax.swing.GroupLayout layout = new javax.swing.GroupLayout(

getContentPane());

getContentPane().setLayout(layout);

layout.setHorizontalGroup(layout

.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(

layout.createSequentialGroup()

.addGroup(

layout.createParallelGroup(

javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(

layout.createSequentialGroup()

.addGap(108,

108,

.addComponent(

jLabel1))

.addGroup(

layout.createSequentialGroup()

.addGap(78, 78,

.addGroup(

layout.createParallelGroup(

javax.swing.GroupLayout.Alignment.LEADING,

false)

.addGroup(

layout.createSequentialGroup()

.addGroup(

layout.createParallelGroup(

javax.swing.GroupLayout.Alignment.TRAILING)

.addComponent(

jLabel2)

.addComponent(

jLabel3)

.addComponent(

jLabel4))

.addPreferredGap(

javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addGroup(

layout.createParallelGroup(

javax.swing.GroupLayout.Alignment.TRAILING,

false)

.addGroup(

javax.swing.GroupLayout.Alignment.LEADING,

layout.createSequentialGroup()

.addComponent(

jtf_check,

javax.swing.GroupLayout.PREFERRED_SIZE,

71,

javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(

javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)

.addComponent(

jl_checkImage))

.addComponent(

jpw_password,

javax.swing.GroupLayout.Alignment.LEADING,

javax.swing.GroupLayout.DEFAULT_SIZE,

157,

Short.MAX_VALUE)

.addComponent(

jtf_username,

javax.swing.GroupLayout.Alignment.LEADING)))

.addGroup(

layout.createSequentialGroup()

.addComponent(

jb_login)

.addPreferredGap(

javax.swing.LayoutStyle.ComponentPlacement.RELATED,

javax.swing.GroupLayout.DEFAULT_SIZE,

Short.MAX_VALUE)

.addComponent(

jb_cancle)))))

.addContainerGap(79, Short.MAX_VALUE)));

layout.setVerticalGroup(layout

.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(

layout.createSequentialGroup()

.addGap(34, 34, 34)

.addComponent(jLabel1)

.addGap(53, 53, 53)

.addGroup(

layout.createParallelGroup(

javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(jLabel2)

.addComponent(

jtf_username,

javax.swing.GroupLayout.PREFERRED_SIZE,

javax.swing.GroupLayout.DEFAULT_SIZE,

javax.swing.GroupLayout.PREFERRED_SIZE))

.addGap(18, 18, 18)

.addGroup(

layout.createParallelGroup(

javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(jLabel3)

.addComponent(

jpw_password,

javax.swing.GroupLayout.PREFERRED_SIZE,

javax.swing.GroupLayout.DEFAULT_SIZE,

javax.swing.GroupLayout.PREFERRED_SIZE))

.addGap(28, 28, 28)

.addGroup(

layout.createParallelGroup(

javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(jLabel4)

.addComponent(

jtf_check,

javax.swing.GroupLayout.PREFERRED_SIZE,

javax.swing.GroupLayout.DEFAULT_SIZE,

javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jl_checkImage))

.addPreferredGap(

javax.swing.LayoutStyle.ComponentPlacement.RELATED,

38, Short.MAX_VALUE)

.addGroup(

layout.createParallelGroup(

javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(jb_login)

.addComponent(jb_cancle))

.addContainerGap()));

pack();

}//

// GEN-END:initComponents

private void jb_cancleActionPerformed(java.awt.event.ActionEvent evt) {

int i = JOptionPane.showConfirmDialog(this, “确定退出系统?”, “确认信息”,

JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);

if (i == 0) {

this.dispose();

private void jb_loginActionPerformed(java.awt.event.ActionEvent evt) {

String userName = this.jtf_username.getText();

String password = new String(this.jpw_password.getPassword());

String checkCode = this.jtf_check.getText();

if (StringUtil.isEmpty(userName)) {

JOptionPane.showMessageDialog(this, “用户名不能为空!”);

return;

if (StringUtil.isEmpty(password)) {

JOptionPane.showMessageDialog(this, “密码不能为空”);

return;

if (!checkCode.equals(imageCode)) {

JOptionPane.showMessageDialog(this, “验证码错误”);

// this.fillImageCode();

// this.jl_checkImage.updateUI();

// this.pack();

return;

User user = new User(userName, password);

UserEbi userEbi = UserEbiFactory.getUserEbi();

User currentUser = userEbi.login(user);

if (currentUser == null) {

JOptionPane.showMessageDialog(this, “用户名或密码错误!”);

return;

// System.out.println(“登录成功”);

this.dispose();

new MainFrm(currentUser).setVisible(true);

/**

  • @param args

  •        the command line arguments
    

*/

public static void main(String args[]) {

java.awt.EventQueue.invokeLater(new Runnable() {

public void run() {

new LoginFrm(null).setVisible(true);

});

// GEN-BEGIN:variables

// Variables declaration - do not modify

private javax.swing.JLabel jLabel1;

private javax.swing.JLabel jLabel2;

private javax.swing.JLabel jLabel3;

private javax.swing.JLabel jLabel4;

private javax.swing.JButton jb_cancle;

private javax.swing.JButton jb_login;

private javax.swing.JLabel jl_checkImage;

private javax.swing.JPasswordField jpw_password;

private javax.swing.JTextField jtf_check;

private javax.swing.JTextField jtf_username;

// End of variables declaration//GEN-END:variables

用户服务类:

public class UserSerInterFrm extends javax.swing.JInternalFrame {

/**

*/

private static final long serialVersionUID = -8462503234613628488L;

private PageBean bean = null;

/** Creates new form UserSerInterFrm */

public UserSerInterFrm() {

initComponents();

this.setLocation(230, 130);

this.fillRole();

QueryInfo info = new QueryInfo();

info.setPagesize(9);

this.fillTable(info);

private void fillRole() {

DefaultComboBoxModel dcm = (DefaultComboBoxModel) this.jcb_role

.getModel();

dcm.removeAllElements();

List list = RoleEbiFactory.getRoleEbo().getRole();

for (Role role : list) {

dcm.addElement(role);

/**

  • This method is called from within the constructor to initialize the form.

  • WARNING: Do NOT modify this code. The content of this method is always

  • regenerated by the Form Editor.

*/

//GEN-BEGIN:initComponents

//

private void initComponents() {

jScrollPane1 = new javax.swing.JScrollPane();

jtb_user = new javax.swing.JTable();

jLabel1 = new javax.swing.JLabel();

jLabel2 = new javax.swing.JLabel();

jLabel3 = new javax.swing.JLabel();

jtf_username = new javax.swing.JTextField();

jtf_password = new javax.swing.JTextField();

jcb_role = new javax.swing.JComboBox();

jb_modify = new javax.swing.JButton();

jb_del = new javax.swing.JButton();

jb_end = new javax.swing.JButton();

jb_nextpage = new javax.swing.JButton();

jb_previouspage = new javax.swing.JButton();

jb_start = new javax.swing.JButton();

jb_add = new javax.swing.JButton();

jLabel4 = new javax.swing.JLabel();

setClosable(true);

setIconifiable(true);

setTitle(“\u7528\u6237\u7ba1\u7406”);

jtb_user.setModel(new javax.swing.table.DefaultTableModel(

new Object[][] {

}, new String[] { “编号”, “用户名”, “角色” }) {

boolean[] canEdit = new boolean[] { false, false, false };

public boolean isCellEditable(int rowIndex, int columnIndex) {

return canEdit[columnIndex];

});

jtb_user.addMouseListener(new java.awt.event.MouseAdapter() {

public void mouseClicked(java.awt.event.MouseEvent evt) {

jtb_userMouseClicked(evt);

});

jScrollPane1.setViewportView(jtb_user);

jLabel1.setText(“\u7528\u6237\u540d\uff1a”);

jLabel2.setText(“\u5bc6 \u7801\uff1a”);

jLabel3.setText(“\u89d2 \u8272\uff1a”);

jcb_role.setModel(new javax.swing.DefaultComboBoxModel(new String[] {

“Item 1”, “Item 2”, “Item 3”, “Item 4” }));

jb_modify.setText(“\u4fee\u6539”);

jb_modify.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jb_modifyActionPerformed(evt);

});

jb_del.setText(“\u5220\u9664”);

jb_del.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jb_delActionPerformed(evt);

});

jb_end.setText(“\u672b\u9875”);

jb_end.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jb_endActionPerformed(evt);

});

jb_nextpage.setText(“\u4e0b\u4e00\u9875”);

jb_nextpage.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jb_nextpageActionPerformed(evt);

});

jb_previouspage.setText(“\u4e0a\u4e00\u9875”);

jb_previouspage.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jb_previouspageActionPerformed(evt);

});

jb_start.setText(“\u9996\u9875”);

jb_start.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jb_startActionPerformed(evt);

});

jb_add.setText(“\u65b0\u5efa”);

jb_add.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jb_addActionPerformed(evt);

});

jLabel4.setText(“jLabel4”);

javax.swing.GroupLayout layout = new javax.swing.GroupLayout(

getContentPane());

getContentPane().setLayout(layout);

layout.setHorizontalGroup(layout

.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(

layout.createSequentialGroup()

.addGroup(

layout.createParallelGroup(

javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(

javax.swing.GroupLayout.Alignment.TRAILING,

layout.createSequentialGroup()

.addContainerGap(

87,

Short.MAX_VALUE)

.addComponent(

jb_start)

.addPreferredGap(

javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(

jb_previouspage)

.addPreferredGap(

javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(

jb_nextpage)

.addPreferredGap(

javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(

jb_end)

.addGap(39, 39,

39))

.addGroup(

layout.createSequentialGroup()

.addContainerGap()

.addGroup(

layout.createParallelGroup(

javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(

jScrollPane1,

javax.swing.GroupLayout.PREFERRED_SIZE,

359,

javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(

jLabel4,

javax.swing.GroupLayout.PREFERRED_SIZE,

271,

javax.swing.GroupLayout.PREFERRED_SIZE))

.addGap(28, 28,

28)))

.addGroup(

layout.createParallelGroup(

javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(

layout.createParallelGroup(

javax.swing.GroupLayout.Alignment.LEADING,

false)

.addGroup(

layout.createSequentialGroup()

.addComponent(

jLabel1)

.addPreferredGap(

javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(

jtf_username,

javax.swing.GroupLayout.PREFERRED_SIZE,

125,

javax.swing.GroupLayout.PREFERRED_SIZE))

.addGroup(

layout.createSequentialGroup()

.addComponent(

jLabel2)

.addPreferredGap(

javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(

jtf_password))

.addGroup(

layout.createSequentialGroup()

.addComponent(

jLabel3)

.addPreferredGap(

javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(

jcb_role,

javax.swing.GroupLayout.PREFERRED_SIZE,

75,

javax.swing.GroupLayout.PREFERRED_SIZE)))

.addGroup(

layout.createSequentialGroup()

.addComponent(

jb_add)

.addPreferredGap(

javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(

jb_modify)

.addPreferredGap(

javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(

jb_del)))

.addContainerGap(20, Short.MAX_VALUE)));

layout.setVerticalGroup(layout

.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(

layout.createSequentialGroup()

.addContainerGap()

.addComponent(jScrollPane1,

javax.swing.GroupLayout.PREFERRED_SIZE,

199,

javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(

javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)

.addComponent(jLabel4)

.addGap(4, 4, 4)

.addGroup(

layout.createParallelGroup(

javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(jb_end)

.addComponent(jb_nextpage)

.addComponent(jb_previouspage)

.addComponent(jb_start)

.addComponent(jb_del)

.addComponent(jb_modify)

.addComponent(jb_add))

.addContainerGap(45, Short.MAX_VALUE))

.addGroup(

javax.swing.GroupLayout.Alignment.TRAILING,

layout.createSequentialGroup()

.addContainerGap(99, Short.MAX_VALUE)

.addGroup(

layout.createParallelGroup(

javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(jLabel1)

.addComponent(

jtf_username,

javax.swing.GroupLayout.PREFERRED_SIZE,

javax.swing.GroupLayout.DEFAULT_SIZE,

javax.swing.GroupLayout.PREFERRED_SIZE))

.addGap(26, 26, 26)

.addGroup(

layout.createParallelGroup(

javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(jLabel2)

.addComponent(

jtf_password,

javax.swing.GroupLayout.PREFERRED_SIZE,

javax.swing.GroupLayout.DEFAULT_SIZE,

javax.swing.GroupLayout.PREFERRED_SIZE))

.addGap(26, 26, 26)

.addGroup(

layout.createParallelGroup(

javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(jLabel3)

.addComponent(

jcb_role,

javax.swing.GroupLayout.PREFERRED_SIZE,

javax.swing.GroupLayout.DEFAULT_SIZE,

javax.swing.GroupLayout.PREFERRED_SIZE))

.addGap(98, 98, 98)));

pack();

}//

//GEN-END:initComponents

private void jtb_userMouseClicked(java.awt.event.MouseEvent evt) {

DefaultTableModel tableModel = (DefaultTableModel) jtb_user.getModel();

int selectRows = jtb_user.getSelectedRows().length;// 取得用户所选行的行数

int selectedRowIndex = jtb_user.getSelectedRow(); // 取得用户所选单行

if (selectRows == 1) {

String id = tableModel.getValueAt(selectedRowIndex, 0).toString();

User user = UserEbiFactory.getUserEbi().search(id);

this.jtf_username.setText(user.getusername());

this.jtf_password.setText(user.getpassword());

// Role[] role = (Role[]) this.jcb_role.getSelectedObjects();

// for (Role r: role) {

// if (r.getId()==user.getid()) {

// this.jcb_role.setSelectedItem®;

// }

// }

for (int i = 0; i < this.jcb_role.getItemCount(); i++) {

Role role = (Role) this.jcb_role.getItemAt(i);

if (role.getId() == user.getroleid()) {

this.jcb_role.setSelectedIndex(i);

private void jb_endActionPerformed(java.awt.event.ActionEvent evt) {

QueryInfo info = new QueryInfo();

info.setCurrentpage(bean.getTotalpage());

info.setPagesize(9);

fillTable(info);

private void jb_nextpageActionPerformed(java.awt.event.ActionEvent evt) {

QueryInfo info = new QueryInfo();

info.setCurrentpage(bean.getNextpage());

info.setPagesize(9);

fillTable(info);

private void jb_previouspageActionPerformed(java.awt.event.ActionEvent evt) {

QueryInfo info = new QueryInfo();

info.setCurrentpage(bean.getPreviouspage());

info.setPagesize(9);

fillTable(info);

private void jb_startActionPerformed(java.awt.event.ActionEvent evt) {

QueryInfo info = new QueryInfo();

info.setCurrentpage(1);

info.setPagesize(9);

fillTable(info);

private void jb_modifyActionPerformed(java.awt.event.ActionEvent evt) {

DefaultTableModel tableModel = (DefaultTableModel) jtb_user.getModel();

int selectRows = jtb_user.getSelectedRows().length;// 取得用户所选行的行数

int selectedRowIndex = jtb_user.getSelectedRow(); // 取得用户所选单行

if (selectRows == 1) {

BigDecimal userId = (BigDecimal) tableModel.getValueAt(

selectedRowIndex, 0);

String username = this.jtf_username.getText();

String password = this.jtf_password.getText();

Role role = (Role) this.jcb_role.getSelectedItem();

BigDecimal roleId = role.getId();

User user = new User(userId, username, password, roleId);

boolean b = UserEbiFactory.getUserEbi().update(user);

if (b) {

JOptionPane.showMessageDialog(this, “修改成功!”);

} else {

JOptionPane.showMessageDialog(this, “修改失败!”);

private void jb_addActionPerformed(java.awt.event.ActionEvent evt) {

String username = this.jtf_username.getText();

String password = this.jtf_password.getText();

User user = new User(username, password, new BigDecimal(5));

boolean b = UserEbiFactory.getUserEbi().add(user);

if (b) {

JOptionPane.showMessageDialog(this, “添加成功!”);

} else {

JOptionPane.showMessageDialog(this, “添加失败!”);

private void jb_delActionPerformed(java.awt.event.ActionEvent evt) {

int i = JOptionPane.showConfirmDialog(this, “确认删除此条记录?”, “确认信息”,

JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);

if (i == 0) {

DefaultTableModel tableModel = (DefaultTableModel) jtb_user

.getModel();

int selectRows = jtb_user.getSelectedRows().length;// 取得用户所选行的行数

int selectedRowIndex = jtb_user.getSelectedRow(); // 取得用户所选单行

if (selectRows == 1) {

String userId = tableModel.getValueAt(selectedRowIndex, 0)

.toString();

boolean b = UserEbiFactory.getUserEbi().del(userId);

if (b) {

JOptionPane.showMessageDialog(this, “删除成功!”);

} else {

JOptionPane.showMessageDialog(this, “删除失败!”);

@SuppressWarnings({ “unchecked”, “rawtypes” })

private void fillTable(QueryInfo info) {

// 获取表格模型

DefaultTableModel dtm = (DefaultTableModel) this.jtb_user.getModel();

// 清空表格

dtm.setRowCount(0);

// 获取业务层接口实现类对象

UserEbi userEbi = UserEbiFactory.getUserEbi();

// 查询数据

bean = userEbi.search(info);

// 获取封装数据的集合

List list = bean.getList();

// 遍历集合并向表格填充数据

for (Object object : list) {

Vector v = new Vector();

User user = (User) object;

v.add(user.getid());

v.add(user.getusername());

v.add(user.getRolename());

dtm.addRow(v);

this.jLabel4.setText(“共” + bean.getTotalrecord() + “条记录-共”

  • bean.getTotalpage() + “页-当前第” + bean.getCurrentpage() + “页”);

//GEN-BEGIN:variables

// Variables declaration - do not modify

private javax.swing.JLabel jLabel1;

private javax.swing.JLabel jLabel2;

private javax.swing.JLabel jLabel3;

private javax.swing.JLabel jLabel4;

private javax.swing.JScrollPane jScrollPane1;

private javax.swing.JButton jb_add;

private javax.swing.JButton jb_del;

private javax.swing.JButton jb_end;

private javax.swing.JButton jb_modify;

private javax.swing.JButton jb_nextpage;

private javax.swing.JButton jb_previouspage;

private javax.swing.JButton jb_start;

private javax.swing.JComboBox jcb_role;

private javax.swing.JTable jtb_user;

private javax.swing.JTextField jtf_password;

private javax.swing.JTextField jtf_username;

// End of variables declaration//GEN-END:variables

订单管理服务类:

public class CusOrderInterFrm extends javax.swing.JInternalFrame {

private static final long serialVersionUID = 5178086178074169208L;

private static final int PAGESIZE = 10;

private String id;

private String name;

private PageBean bean;

/** Creates new form CusOrderInterFrm */

public CusOrderInterFrm(String id, String name) {

this.id = id;

this.name = name;

initComponents();

this.setLocation(330, 80);

initData();

private void initData() {

this.jtf_cusid.setText(id);

this.jtf_cusname.setText(name);

QueryInfo info = new QueryInfo();

info.setPagesize(PAGESIZE);

fillTable(info, id);

@SuppressWarnings({ “unchecked”, “rawtypes” })

private void fillTable(QueryInfo info, String id) {

DefaultTableModel dtm = (DefaultTableModel) this.jtb_order.getModel();

dtm.setRowCount(0);

bean = CustomerEbiFactory.getCustomerEbi().searchOrder(id, info);

List list = bean.getList();

for (CusOrder cusOrder : list) {

Vector v = new Vector();

v.add(cusOrder.getOrderid());

v.add(cusOrder.getOrder_date());

v.add(cusOrder.getOrder_address());

v.add(cusOrder.getOr_state());

dtm.addRow(v);

this.jLabel9.setText(“共” + bean.getTotalrecord() + “条记录-共”

  • bean.getTotalpage() + “页-当前第” + bean.getCurrentpage() + “页”);

//GEN-BEGIN:initComponents

//

private void initComponents() {

jLabel1 = new javax.swing.JLabel();

jtf_cusid = new javax.swing.JTextField();

jLabel2 = new javax.swing.JLabel();

jtf_cusname = new javax.swing.JTextField();

jScrollPane1 = new javax.swing.JScrollPane();

jtb_order = new javax.swing.JTable();

jb_start = new javax.swing.JButton();

jb_end = new javax.swing.JButton();

jb_previouspage = new javax.swing.JButton();

jb_nextpage = new javax.swing.JButton();

jLabel9 = new javax.swing.JLabel();

jb_info = new javax.swing.JButton();

setClosable(true);

setIconifiable(true);

setTitle(“\u5386\u53f2\u8ba2\u5355”);

jLabel1.setText(“\u5ba2\u6237\u7f16\u53f7\uff1a”);

jtf_cusid.setEditable(false);

jLabel2.setText(“\u5ba2\u6237\u540d\u79f0\uff1a”);

jtf_cusname.setEditable(false);

jtb_order.setModel(new javax.swing.table.DefaultTableModel(

new Object[][] {

}, new String[] { “订单编号”, “日期”, “送货地址”, “状态” }) {

boolean[] canEdit = new boolean[] { false, false, false, false };

public boolean isCellEditable(int rowIndex, int columnIndex) {

return canEdit[columnIndex];

});

jScrollPane1.setViewportView(jtb_order);

jb_start.setText(“\u9996\u9875”);

jb_start.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jb_startActionPerformed(evt);

});

jb_end.setText(“\u672b\u9875”);

jb_end.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jb_endActionPerformed(evt);

});

jb_previouspage.setText(“\u4e0a\u4e00\u9875”);

jb_previouspage.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jb_previouspageActionPerformed(evt);

});

jb_nextpage.setText(“\u4e0b\u4e00\u9875”);

jb_nextpage.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jb_nextpageActionPerformed(evt);

});

jLabel9.setText(“jLabel9”);

jb_info.setText(“\u660e\u7ec6”);

jb_info.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jb_infoActionPerformed(evt);

});

javax.swing.GroupLayout layout = new javax.swing.GroupLayout(

getContentPane());

getContentPane().setLayout(layout);

layout.setHorizontalGroup(layout

.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(

layout.createSequentialGroup()

.addContainerGap()

.addGroup(

layout.createParallelGroup(

javax.swing.GroupLayout.Alignment.LEADING,

false)

.addGroup(

javax.swing.GroupLayout.Alignment.TRAILING,

layout.createSequentialGroup()

.addComponent(

jLabel9,

javax.swing.GroupLayout.PREFERRED_SIZE,

162,

javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(

javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(

jb_info)

.addPreferredGap(

javax.swing.LayoutStyle.ComponentPlacement.RELATED,

javax.swing.GroupLayout.DEFAULT_SIZE,

Short.MAX_VALUE)

.addComponent(

jb_start)

.addPreferredGap(

javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(

jb_previouspage)

.addPreferredGap(

javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(

jb_nextpage)

.addPreferredGap(

javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(

jb_end))

.addGroup(

layout.createParallelGroup(

javax.swing.GroupLayout.Alignment.TRAILING)

.addComponent(

jScrollPane1,

javax.swing.GroupLayout.PREFERRED_SIZE,

503,

javax.swing.GroupLayout.PREFERRED_SIZE)

.addGroup(

javax.swing.GroupLayout.Alignment.LEADING,

layout.createSequentialGroup()

.addComponent(

jLabel1)

.addGap(18,

18,

.addComponent(

jtf_cusid,

javax.swing.GroupLayout.PREFERRED_SIZE,

151,

javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(26,

26,

.addComponent(

jLabel2)

.addPreferredGap(

javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)

.addComponent(

jtf_cusname,

javax.swing.GroupLayout.PREFERRED_SIZE,

176,

javax.swing.GroupLayout.PREFERRED_SIZE))))

.addContainerGap(36, Short.MAX_VALUE)));

layout.setVerticalGroup(layout

.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(

layout.createSequentialGroup()

.addContainerGap()

.addGroup(

layout.createParallelGroup(

javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(jLabel1)

.addComponent(

jtf_cusid,

javax.swing.GroupLayout.PREFERRED_SIZE,

javax.swing.GroupLayout.DEFAULT_SIZE,

javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel2)

.addComponent(

jtf_cusname,

javax.swing.GroupLayout.PREFERRED_SIZE,

javax.swing.GroupLayout.DEFAULT_SIZE,

javax.swing.GroupLayout.PREFERRED_SIZE))

.addPreferredGap(

javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(jScrollPane1,

javax.swing.GroupLayout.PREFERRED_SIZE,

193,

javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(

javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addGroup(

layout.createParallelGroup(

javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(jb_end)

.addComponent(jb_nextpage)

.addComponent(jb_previouspage)

.addComponent(jb_start)

.addComponent(jLabel9)

.addComponent(jb_info))

.addGap(24, 24, 24)));

pack();

}//

//GEN-END:initComponents

private void jb_infoActionPerformed(java.awt.event.ActionEvent evt) {

JOptionPane.showMessageDialog(this, “暂不提供查看明细\n系统功能开发中”);

private void jb_endActionPerformed(java.awt.event.ActionEvent evt) {

QueryInfo info = new QueryInfo();

info.setCurrentpage(bean.getTotalpage());

info.setPagesize(PAGESIZE);

fillTable(info, id);

private void jb_nextpageActionPerformed(java.awt.event.ActionEvent evt) {

QueryInfo info = new QueryInfo();

info.setCurrentpage(bean.getNextpage());

info.setPagesize(PAGESIZE);

fillTable(info, id);

private void jb_previouspageActionPerformed(java.awt.event.ActionEvent evt) {

QueryInfo info = new QueryInfo();

info.setCurrentpage(bean.getPreviouspage());

info.setPagesize(PAGESIZE);

fillTable(info, id);

private void jb_startActionPerformed(java.awt.event.ActionEvent evt) {

QueryInfo info = new QueryInfo();

info.setCurrentpage(1);

info.setPagesize(PAGESIZE);

fillTable(info, id);

//GEN-BEGIN:variables

// Variables declaration - do not modify

private javax.swing.JLabel jLabel1;

private javax.swing.JLabel jLabel2;

private javax.swing.JLabel jLabel9;

private javax.swing.JScrollPane jScrollPane1;

private javax.swing.JButton jb_end;

private javax.swing.JButton jb_info;

private javax.swing.JButton jb_nextpage;

private javax.swing.JButton jb_previouspage;

private javax.swing.JButton jb_start;

private javax.swing.JTable jtb_order;

private javax.swing.JTextField jtf_cusid;

private javax.swing.JTextField jtf_cusname;

// End of variables declaration//GEN-END:variables


本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1153.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

云扩研习社 | RPA高级开发技巧(上)

高级元素选择技巧 XPath介绍 XPath是标准的结构化查询语言&#xff0c;内置丰富的语法、高阶函数可以提供非常强大的目标元素特征描述能力。 XPath是一种强大、复杂的查询语言&#xff1b;XPath与编辑器中内置的选择器没有本质区别&#xff0c;均可作为元素特征描述&#xff…

毕业设计 基于51单片机老人防跌倒GSM短信报警系统

基于51单片机无线蓝牙APP控LED灯亮灭亮度设计1、项目简介1.1 系统构成1.2 系统功能2、部分电路设计2.1 GSM SIM800A模块电路设计2.2 蜂鸣器报警电路&#xff08;低电平有效&#xff09;设计2.3 ADXL345倾角传感器模块电路设计2.4 DS18B20温度传感器模块电路设计3、部分代码展示…

面试官问我 “A + B” 算法,我懵了

&#x1f388; 作者&#xff1a;Linux猿 &#x1f388; 简介&#xff1a;CSDN博客专家&#x1f3c6;&#xff0c;华为云享专家&#x1f3c6;&#xff0c;Linux、C/C、云计算、物联网、面试、刷题、算法尽管咨询我&#xff0c;关注我&#xff0c;有问题私聊&#xff01; &…

逆向学习-UltraEdit安装

一、相关软件安装 1、UltraEdit 1.1、简介 UltraEdit 是当今销量第一且最为强大的一款高性价比的文本编辑器。尽管不是一款开源软件&#xff0c;但多数程序员都使用这款编辑器&#xff0c;支持多种编程语言的语法着色和外挂编译功能。UltraEdit 是理想的文本、HTML 和十六进…

最新|全新风格原创YOLOv7、YOLOv5和YOLOX网络结构解析图

&#x1f4a1;本篇分享一下个人绘制的原创全新风格YOLOv7网络结构图、YOLOv5网络结构图和YOLOX网络结构图 个人感觉搭配还行&#xff0c;看着比较直观&#xff0c;所以开源分享一下。 文章目录YOLOv5 网络结构图(最新 推荐&#x1f525;&#x1f525;&#x1f525;)YOLOv7 网络…

【C++笔试强训】第十三天

&#x1f387;C笔试强训 博客主页&#xff1a;一起去看日落吗分享博主的C刷题日常&#xff0c;大家一起学习博主的能力有限&#xff0c;出现错误希望大家不吝赐教分享给大家一句我很喜欢的话&#xff1a;夜色难免微凉&#xff0c;前方必有曙光 &#x1f31e;。 &#x1f4a6;&a…

YOLOv5、v7改进之三十八:引入RepVGG模型结构

前 言&#xff1a;作为当前先进的深度学习目标检测算法YOLOv7&#xff0c;已经集合了大量的trick&#xff0c;但是还是有提高和改进的空间&#xff0c;针对具体应用场景下的检测难点&#xff0c;可以不同的改进方法。此后的系列文章&#xff0c;将重点对YOLOv7的如何改进进行详…

基于javaweb的养老院管理系统(java+springboot+thymeleaf+html+js+mysql)

基于javaweb的养老院管理系统(javaspringbootthymeleafhtmljsmysql) 运行环境 Java≥8、MySQL≥5.7 开发工具 eclipse/idea/myeclipse/sts等均可配置运行 适用 课程设计&#xff0c;大作业&#xff0c;毕业设计&#xff0c;项目练习&#xff0c;学习演示等 功能说明 基于…

synchronized到底锁的是谁、何时生效

一、synchronized锁的几种形式 synchronized修饰普通方法synchronized修饰静态方法synchronized修饰代码块 1、synchronized修饰普通方法 简单示例 public class Test{private String age;private String name;public synchronized void print(String arg1, String arg2) {…

零代码,让业务人员实现应用创造自由

摘要&#xff1a;以汽车营销场景为例&#xff0c;从AppCube零代码和业务大屏入手&#xff0c;帮助开发者更好地理解AppCube低代码和零代码异同点&#xff0c;在实际使用时能更快选取更合适的工具能力&#xff0c;实现应用构建效率最大化。本文分享自华为云社区《DTT第8期直播回…

超级详细的Vue安装与配置教程

Vue web前端三大主流框架之一,是一套用于构建用户界面的渐进式框架,下面这篇文章主要给大家介绍了关于Vue安装与配置教程的相关资料,文中通过图文介绍的非常详细,需要的朋友可以参考下 − 目录 一、下载和安装Vue二、创建全局安装目录和缓存日志目录三、配置环境变量 1. 环境…

【k哥爬虫普法】简历大数据公司被查封,个人隐私是红线!

我国目前并未出台专门针对网络爬虫技术的法律规范&#xff0c;但在司法实践中&#xff0c;相关判决已屡见不鲜&#xff0c;K 哥特设了“K哥爬虫普法”专栏&#xff0c;本栏目通过对真实案例的分析&#xff0c;旨在提高广大爬虫工程师的法律意识&#xff0c;知晓如何合法合规利用…

mysql忘记密码怎么办(附免密登录和修改密码)

前言 博主个人社区&#xff1a;开发与算法学习社区 博主个人主页&#xff1a;Killing Vibe的博客 欢迎大家加入&#xff0c;一起交流学习~~ 一、打开MySQL&#xff08;能打开请跳过此步&#xff09; 第一种&#xff1a;安装完MySQL之后&#xff0c;MySQL提供大家的客户端程序 …

DASCTF X GFCTF 2022十月挑战赛-hade_waibo

这是一个非预期解&#xff0c;但是得到出题人的赞许&#xff0c;莫名开心&#xff0c;哈哈&#xff1a; cancan need处存在任意文件读取 <!DOCTYPE html> <html lang"en" class"no-js"> <head> <meta charset"UTF-8" />…

引爆记忆广告语盘点

在数字化、流量红利见顶、营销环境巨变的进程中&#xff0c;品牌传播的节奏从快到稳。品牌出圈更需要产品、渠道、内容、文化等方面的共振影响&#xff0c;其中广告语作为品牌定位和价值主张的核心载体&#xff0c;是连接消费者心智的重要品牌资产。 根据益普索Ipsos《引爆记忆…

uni-app、小程序项目分包经验之谈与天坑异常:RangeError: Maximum call stack size exceeded

小程序分包经验之谈与天坑异常&#xff1a;RangeError: Maximum call stack size exceeded小程序分包概述分包配置参数&#xff1a;subPackages分包预载配置参数&#xff1a;preloadRule如何使用实际小程序项目分包项目结构配置分包配置分包预载天坑异常场景分析猜想尝试解决解…

springboot配置多个数据源

一.多数据源的典型使用场景 在实际开发中,经常可能遇到在一个应用中可能要访问多个数据库多的情况,以下是两种典型场景 1.业务复杂 数据分布在不同的数据库中,数据库拆了,应用没拆.一个公司多个子项目,各用各的数据库,设计数据共享 2.读写分离 为了解决数据库的性能瓶颈(读…

C++内存管理和模板

目录 内存管理 new T[N] new和delete关键字的总结&#xff1a; 定位new表达式(placement-new)&#xff1a; 作用&#xff1a; 使用格式&#xff1a; 使用场景&#xff1a; 实例&#xff1a; 调用析构函数的两个方法&#xff1a; 池化技术&#xff1a; 面试题&#xff1…

Unity 分享 功能 用Unity Native Share Plugin 实现链接、图片、视频等文件的分享+ 安卓 Ios 都可以,代码图文详解

Unity 分享 功能 用Unity Native Share Plugin 实现链接、图片、视频等文件的分享 安卓 Ios 都可以&#xff0c;代码图文详解前言环境效果一、Unity Native Share Plugin导入1.下载2.导入二、案例1.分享文字1.脚本2.发包注意2.分享视频1.完善下刚才的脚本2.给复制按钮添加点击事…

【Linux】Linux环境搭建

​&#x1f320; 作者&#xff1a;阿亮joy. &#x1f386;专栏&#xff1a;《学会Linux》 &#x1f387; 座右铭&#xff1a;每个优秀的人都有一段沉默的时光&#xff0c;那段时光是付出了很多努力却得不到结果的日子&#xff0c;我们把它叫做扎根 目录&#x1f449;Linux的介…