栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java

项目管理系统

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

项目管理系统

package view;

import domain.Programmer;
import service.NameListService;
import service.ProjectService;

import java.util.ArrayList;

import java.util.ArrayList;

public class IndexView {
    
    public static final String ANSI_RESET = "u001B[0m";
    public static final String ANSI_GREEN = "u001B[32m";
    public static final String ANSI_YELLOW = "u001B[33m";
    public static final String ANSI_PURPLE = "u001B[35m";
    public static final String ANSI_BLUE = "u001B[34m";
    public static final String ANSI_CYAN = "u001B[36m";

    private LoginView loginVi = new LoginView();
    private NameListService nameListSer = new NameListService();
    private TeamView teamVi = new TeamView();
    private ProjectService projectSer = new ProjectService();
    private ArrayList manyTeam=null;



    public  void menu() {
        boolean loopFlag = true;
        char key = 0;


        System.out.println(ANSI_PURPLE);
        System.out.println("");
        System.out.println("                                        ");
        System.out.println("    欢迎来到项目开发团队分配管理软件     ");
        System.out.println("                                        ");
        System.out.println("");
        System.out.println("");
        System.out.println("");
        System.out.println("");
        System.out.println("-----------<请您先进行登录>-------------");
        TSUtility.readReturn();
        try {
            loginVi.login();
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        do {
            System.out.println(ANSI_RESET + ANSI_CYAN);
            System.out.println("");
            System.out.println("                                         ");
            System.out.println("              ~软件主菜单~               ");
            System.out.println("                                         ");
            System.out.println("");
            System.out.println("1. <用户信息修改>                *");
            System.out.println("2. <开发人员管理>                *");
            System.out.println("女3. <开发团队调度管理>            *");
            System.out.println("4. <开发项目管理>                *");
            System.out.println("力5. <退出软件>                    *");
            System.out.println("⬇请选择:  ");
            System.out.print(ANSI_RESET);
            key = TSUtility.readMenuSelectionPro();
            switch (key) {
                case '1':
                    try {
                        loginVi.revise();
                    } catch (InterruptedException e) {
                        e.printStackTrace();
                    }
                    break;
                case '2':
                    try {
                        nameListSer.showEmployee();
                    } catch (InterruptedException e) {
                        e.printStackTrace();
                    }
                    boolean loopFlagSec = true;
                    char keySec = 0;
                    do {
                        System.out.print(ANSI_RESET + ANSI_YELLOW);
                        System.out.println("        ~开发人员管理主菜单~            ");
                        System.out.println("1.     <开发人员的添加>           *");
                        System.out.println("2.     <开发人员的查看>           *");
                        System.out.println("3.     <开发人员的修改>           *");
                        System.out.println("4.     <开发人员的删除>           *");
                        System.out.println("5.     <退出当前菜单>             *");
                        System.out.println("⬇请选择:  ");
                        keySec=TSUtility.readMenuSelectionPro();
                        switch (keySec) {
                            case '1':
                                try {
                                    nameListSer.addEmployee();
                                } catch (InterruptedException e) {
                                    e.printStackTrace();
                                }
                                break;
                            case '2':
                                try {
                                    nameListSer.showEmployee();
                                } catch (InterruptedException e) {
                                    e.printStackTrace();
                                }
                                break;
                            case '3':
                                System.out.println("请输入需要修改的员工id:");
                                int i = TSUtility.readInt();
                                try {
                                    nameListSer.modifyEmployee(i);
                                } catch (InterruptedException e) {
                                    e.printStackTrace();
                                }
                                break;
                            case '4':
                                System.out.println("请输入需要删除的员工id:");
                                int j  = TSUtility.readInt();
                                nameListSer.delEmployee(j);
                                break;
                            case '5':
                                System.out.print("确认是否退出(Y/N):");
                                char yn = TSUtility.readConfirmSelection();
                                if (yn == 'Y') {
                                    loopFlagSec = false;
                                }
                                break;
                            default:
                                System.out.println("输入有误!请重新输入!");
                                break;
                        }
                    } while (loopFlagSec);
                    break;
                case '3':
                     teamVi.developTeamMainMenu();
                     manyTeam=teamVi.TeamSvc.getAllTeam();
                    break;
                case '4':
                    boolean loopFlagThr = true;
                    char keyThr = 0;
                    do {
                        System.out.print(ANSI_RESET + ANSI_GREEN);
                        System.out.println("      ~开发项目管理主菜单~            ");
                        System.out.println("1.     <项目的添加>           *");
                        System.out.println("2.     <项目分配开发团队>           *");
                        System.out.println("3.     <项目的查看>           *");
                        System.out.println("4.     <项目的删除>           *");
                        System.out.println("5.     <退出当前菜单>             *");
                        System.out.println("⬇请选择:  ");
                        System.out.print(ANSI_RESET + ANSI_YELLOW);
                        keyThr=TSUtility.readMenuSelectionPro();
                        switch (keyThr) {
                            case '1':
                                try {
                                    projectSer.addProject();
                                } catch (InterruptedException e) {
                                    e.printStackTrace();
                                }
                                break;
                            case '2':
                             for (Programmer[] pro : manyTeam) {
                                   projectSer.dealingPro(pro);
                              }

                                break;
                            case '3':
                                try {
                                    projectSer.showPro();
                                } catch (InterruptedException e) {
                                    e.printStackTrace();
                                }
                                break;
                            case '4':
                                System.out.println("请输入需要删除的项目id:");
                                int j  = TSUtility.readInt();
                                projectSer.delPro(j);
                                break;
                            case '5':
                                System.out.print("确认是否退出(Y/N):");
                                char yn = TSUtility.readConfirmSelection();
                                if (yn == 'Y') {
                                    loopFlagThr = false;
                                }
                                break;
                            default:
                                System.out.println("输入有误!请重新输入!");
                                break;
                        }
                    } while (loopFlagThr);
                    break;
                case '5':
                    System.out.print("确认是否退出(Y/N):");
                    char yn = TSUtility.readConfirmSelection();
                    if (yn == 'Y') {
                        loopFlag = false;
                    }
                    break;
                default:
                    break;
            }

        } while (loopFlag);
    }

    public static void main(String[] args) {
        new IndexView().menu();
    }

}
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/1039872.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号