Skip to content

Phần mềm quản lí bán hàng của cửa hàng cung cấp phụ kiện di động DAVISY

Notifications You must be signed in to change notification settings

theanishtar/DAVISY

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status


Dự án được xuất hiện trên website của trường caodang.fpt.edu.vn/tin-tuc-poly/can-tho-tin-sinh-vien/du-an-phan-mem-quan-ly-ban-phu-kien-thiet-bi-di-do...

Xem demo chức năng tại đây

DAVISY-PRO1014

Tên dự án: Xây dựng ứng dụng quản lý bán hàng cho cửa hàng bán phụ kiện thiết bị di động DAVISY



Thành viên

Tên thành viên Ảnh minh họa Chức vụ Sản phẩm nổi bật
Trần Hữu Đang 06-00-18-00-html5.gif Project Manager, developer Mô phỏng thuật toán sắp xếp
Nguyễn Khánh Đan BA Writer, Tester, developer Hệ thống bán hàng FreshFood
Đoàn Hiệp Sỹ DevOps, developer Phần mềm quản lí xe máy
Phùng Quốc Vinh Data Scentist, developer Dodge Game
Lê Bích Vi Business Analyst, developer Quản lí kí túc xá

Ngoài ra các thành viên còn đảm nhận một số nhiệm vụ khác được trình bày cụ thể trong phần báo cáo!


Documents



Mô tả chi tiết dự án

Mô tả

Phần mềm là dự án cuối môn của nhóm DAVISY trong môn dự án 1 - PRO1041 tại FPT Polytechnic được hướng dẫn bởi thầy Trần Văn Nhuộm.

Account

Tên tài khoản Tên đăng nhập Chức vụ Email Trạng Thái
Trần Văn Nhuộm admin Quản trị nhuomtv@fpt.edu.vn Đang hoạt động
Trần Hữu Đang dangth Quản lí dangthpc04349@fpt.edu.vn Đang hoạt động
Nguyễn Khánh Đan dannk Nhân viên dannkpc04351@fpt.edu Đang hoạt động
Đoàn Hiệp Sỹ sydh Nhân viên sydhpc04388@fpt.edu.vn Đang hoạt động
Phùng Quốc Vinh vinhpq Nhân viên vinhpqpc04338@fpt.edu.vn Ngưng hoạt động
Lê Bích Vi vilb Nhân viên vilbpc04354@fpt.edu.vn Đang hoạt động


Quản trị sẽ có toàn quyền với phần mềm

Quản lí chỉ được phép thêm các nhân viên và các thống kê về doanh thu (cùng toàn bộ các quyền của nhân viên)

Nhân viên sẽ bị hạn chế về quyền thêm tài khoản (chỉ được thêm sửa xóa khách hàng), chỉ được xem thống kê sản phẩm bán chạy



Install

  1. Tải và giải nén file đã được đính kèm
  2. Cài đặt vào ổ đĩa D trong máy tính
  3. Chạy chương trình đã cài đặt và đăng nhập với tài khoản bên trên

Run Project by Netbeans IDE

  1. Mở project "DAVISYS"
  2. Chạy trang login hoặc main trong package com.gui
  3. Đăng nhập các tài khoản bên trên


Các công nghệ sử dụng trong dự án

drawer

void initMenu() {
        drawer = Drawer.newDrawer(this)
                .addChild(new DrawerItem("Cửa sổ chính").build())
                .addChild(new DrawerItem("Tài khoản").build())
                .addFooter(new DrawerItem("Đăng xuất").build())
                .event(new EventDrawer() {
                    @Override
                    public void selected(int index, DrawerItem item) {
                        if (drawer.isShow()) {
                          drawer.hide();
                        }
                        switch (index) {
                            case 0:
                              //gọi trang Main
                              break;
                            case 1:
                              //gọi trang tài khoản
                              break;
                        }
                    }
                }).build();
}


webcam

public void initWebcam() {
    Dimension size = WebcamResolution.QVGA.getSize();
    webcam = Webcam.getWebcams().get(0); //0 is default webcam
    webcam.setViewSize(size);
    panel = new WebcamPanel(webcam);
    panel.setPreferredSize(size);
    pnQR.add(panel, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 470, 300));
    executor.execute(this);
}

Ghi đè phương thức chạy của luồng mở webcam

@Override
    public void run() {
        do {
            try {
                Thread.sleep(100);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }

            Result result = null;
            BufferedImage image = null;
            if (!webcam.isOpen()) {
                return;
            }
            if (webcam.isOpen()) {
                if ((image = webcam.getImage()) == null) {
                    continue;
                }
            }
            LuminanceSource source = new BufferedImageLuminanceSource(image);
            BinaryBitmap bitmap = new BinaryBitmap(new HybridBinarizer(source));
            try {
                result = new MultiFormatReader().decode(bitmap);
            } catch (NotFoundException e) {
            }
            if (result != null) {
                //xử lý mã tại đây
            }
        } while (true);
    }


bitmap

//Trình tạo mã QR
try {
    String charset = "UTF-8"; // or "ISO-8859-1"
    Map< EncodeHintType, ErrorCorrectionLevel> hintMap = new HashMap< EncodeHintType, ErrorCorrectionLevel>();
    hintMap.put(EncodeHintType.ERROR_CORRECTION, ErrorCorrectionLevel.L);
    BitMatrix matrix = new MultiFormatWriter().encode(
            new String(qrCodeData.getBytes(charset), charset),
            BarcodeFormat.QR_CODE, 200, 200, hintMap);
    MatrixToImageWriter.writeToFile(matrix, filePath.substring(filePath
            .lastIndexOf('.') + 1), new File(filePath));
     } catch (Exception e) {
}


file

try {
    XSSFWorkbook wb = new XSSFWorkbook();
    XSSFSheet sheet = wb.createSheet("Danh sách sản phẩm");
    XSSFRow row = null;
    Cell cell = null;
    row = sheet.createRow(0);

    cell = row.createCell(0, CellType.STRING);
    cell.setCellValue("MÃ SẢN PHẨM");

    cell = row.createCell(1, CellType.STRING);
    cell.setCellValue("TÊN SẢN PHẨM");

    JFileChooser fc = new JFileChooser();
    fc.showOpenDialog(null);
    File f = fc.getSelectedFile();
    String path = f.getAbsoluteFile().toString();
    String file = f.getAbsolutePath();
    if (!path.contains(".xlsx")) {
        file = f.getAbsolutePath() + ".xlsx";
    }
    try {
        FileOutputStream fis = new FileOutputStream(file);
        wb.write(fis);
        fis.close();
    } catch (Exception ex) {
        System.out.println(ex);
    }
} catch (Exception ex) {
    System.out.println(ex);
}


chart

Date now = new Date();
    SimpleDateFormat formater = new SimpleDateFormat();
    formater.applyPattern("yyyy");
    String thisYear = formater.format(now);
    List<Object[]> listTKSP_L = TKdao.getSPBanChayTL(thisYear);
    DefaultPieDataset data = new DefaultPieDataset();
    float tongsl = 0;
    for (Object[] row : listTKSP_L) {
        tongsl += (int) row[1];
    }
    for (Object[] row : listTKSP_L) {
        data.setValue((String) (row[0]), (((int) row[1] / tongsl) * 100));
    }
    JFreeChart Chart = ChartFactory.createPieChart("Tỷ lệ phần trăm loại sản phẩm bán được", data, true, true, true);
    ChartPanel chartPanel = new ChartPanel(Chart);
    chartPanel.setPreferredSize(new Dimension(jpPie.getWidth(), jpPie.getHeight()));

    jpPie.removeAll();
    jpPie.setLayout(new CardLayout());
    jpPie.add(chartPanel);


Email

Properties prop = new Properties();
    prop.put("mail.smtp.host", "smtp.gmail.com");
    prop.put("mail.smtp.port", "587");
    prop.put("mail.smtp.auth", "true");
    prop.put("mail.smtp.starttls.enable", "true"); //TLS

    Session session = Session.getInstance(prop,
            new Authenticator() {
        protected PasswordAuthentication getPasswordAuthentication() {
            return new PasswordAuthentication(username, password);
        }
    });
    try {
        Message message = new MimeMessage(session);
        message.setFrom(new InternetAddress(email));
        message.setRecipients(
                Message.RecipientType.TO,
                InternetAddress.parse(email)
        );

        Multipart content = new MimeMultipart();
        MimeBodyPart textBody = new MimeBodyPart();

        message.setSubject("DAVISY");

        textBody.setText("Hello");

        content.addBodyPart(textBody);
        message.setContent(content);
        Transport.send(message);

    } catch (MessagingException e) {
        System.out.println(e);
    }

Designed by Theanishtar in CanTho city.

About

Phần mềm quản lí bán hàng của cửa hàng cung cấp phụ kiện di động DAVISY

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published