3日目の9段階目終了
This commit is contained in:
@@ -23,20 +23,42 @@ public class Main {
|
|||||||
allData[9] = new DepartmentData("14", "教育事業部");
|
allData[9] = new DepartmentData("14", "教育事業部");
|
||||||
allData[10] = new DepartmentData("15", "営業企画部");
|
allData[10] = new DepartmentData("15", "営業企画部");
|
||||||
|
|
||||||
// int count = 0;
|
String targetDeptId = "";
|
||||||
// int countt = 0;
|
|
||||||
|
for (int i = 0; i < allData.length; i++) {
|
||||||
|
|
||||||
|
if (allData[i] instanceof DepartmentData) {
|
||||||
|
DepartmentData dept = (DepartmentData) allData[i];
|
||||||
|
|
||||||
|
if (dept.getNmDepartment().equals("システム開発事業部")) {
|
||||||
|
targetDeptId = dept.getIdDepartment();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (int i = 0; i < allData.length; i++) {
|
for (int i = 0; i < allData.length; i++) {
|
||||||
if (allData[i] instanceof EmployeeData) {
|
if (allData[i] instanceof EmployeeData) {
|
||||||
// count++;
|
|
||||||
EmployeeData emp = (EmployeeData) allData[i];
|
EmployeeData emp = (EmployeeData) allData[i];
|
||||||
|
if (emp.getIdDepartment().equals(targetDeptId)) {
|
||||||
System.out.println(emp.getMailAddress());
|
System.out.println(emp.getNmEmployee() + "\t" + emp.getMailAddress());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// int count = 0;
|
||||||
|
// int countt = 0;
|
||||||
|
// for (int i = 0; i < allData.length; i++) {
|
||||||
|
// if (allData[i] instanceof EmployeeData) {
|
||||||
|
// // count++;
|
||||||
|
// EmployeeData emp = (EmployeeData) allData[i];
|
||||||
|
//
|
||||||
|
// System.out.println(emp.getMailAddress());
|
||||||
|
|
||||||
// else if (allData[i] instanceof DepartmentData) {
|
// else if (allData[i] instanceof DepartmentData) {
|
||||||
// countt++;
|
// countt++;
|
||||||
// }
|
// }
|
||||||
}
|
|
||||||
// System.out.println("社員のデータ:" + count + "件");
|
// System.out.println("社員のデータ:" + count + "件");
|
||||||
// System.out.println("部署のデータ:" + countt + "件");
|
// System.out.println("部署のデータ:" + countt + "件");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user