Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/rest_java_combine' into bugfix_c…
Browse files Browse the repository at this point in the history
…ombine
  • Loading branch information
lani009 committed Jun 2, 2021
2 parents fb00511 + 6537522 commit b69e496
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 16 deletions.
4 changes: 2 additions & 2 deletions jmt_webapp/src/main/java/dao/impl/OrganizationDAO.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ public class OrganizationDAO implements OrganizationDAOI {
+ "join \"GovofcDiv\" GD on GD.govofc_div_cd = \"OrganizationChart\".govofc_div_cd\n"
+ "join \"HgdeptDiv\" HD on HD.hgdept_div_cd = \"OrganizationChart\".hgdept_div_cd\n"
+ "join \"Dept\" D on D.dept_cd_nm = \"OrganizationChart\".dept_cd_nm\n"
+ "where dept_div_nm like = ?\n" + "and govofc_div_nm like = ?\n" + "and hgdept_div_nm like = ?\n"
+ "and dept_nm like = ?";
+ "where dept_div_nm like ?\n" + "and govofc_div_nm like ?\n" + "and hgdept_div_nm like ?\n"
+ "and dept_nm like ?";

private OrganizationDAO() {
}
Expand Down
25 changes: 11 additions & 14 deletions jmt_webapp/src/main/webapp/restful/get/category/GetCategory.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@
Organization organizationDeptDiv;
Organization organizationHgdeptDiv;
if (request.getParameter("deptDiv") == null) {
deptDiv = "";
if (request.getParameter("deptDiv").isEmpty()) {
organizationDeptDiv = new DeptDiv(null, null);
} else {
Expand All @@ -38,25 +37,23 @@
}
if (request.getParameter("govofcDiv") == null) {
govofcDiv = "";
if (request.getParameter("govofcDiv").isEmpty()) {
organizationGovofcDiv = new GovofcDiv(null, null);
} else {
govofcDiv = request.getParameter("govofcDiv");
organizationGovofcDiv = new GovofcDiv(null, govofcDiv);
}
if (request.getParameter("hgdeptDiv") == null) {
hgdeptDiv = "";
if (request.getParameter("hgdeptDiv").isEmpty()) {
organizationHgdeptDiv = new HgdeptDiv(null, null);
} else {
hgdeptDiv = request.getParameter("hgdeptDiv");
organizationHgdeptDiv = new HgdeptDiv(null, hgdeptDiv);
}
if (request.getParameter("dept") == null) {
dept = "";
if (request.getParameter("dept").isEmpty()) {
organizationDept = new Dept(null, null);
} else {
dept = request.getParameter("dept");
Expand All @@ -67,7 +64,7 @@
JSONArray jsonArray = new JSONArray();
JSONObject jsonObject = new JSONObject();
if (deptDiv.equals("")) {
if (deptDiv.isEmpty()) {
list = OrganizationDAO.getInstance()
.getAllOrganization((Class<Organization>) organizationDeptDiv.getClass());
Expand All @@ -80,9 +77,9 @@
System.out.println(jsonObject.toJSONString());
} else if (deptDiv != "") {
} else {
if (govofcDiv == "") {
if (govofcDiv.isEmpty()) {
list = OrganizationDAO.getInstance().getChildrenOf(organizationDeptDiv,organizationGovofcDiv,organizationHgdeptDiv,organizationDept);
for (int i = 0; i < list.size(); i++) {
Expand All @@ -93,9 +90,9 @@
System.out.println(jsonObject.toJSONString());
} else if (govofcDiv != "") {
} else {
if (hgdeptDiv == "") {
if (hgdeptDiv.isEmpty()) {
list = OrganizationDAO.getInstance().getChildrenOf(organizationDeptDiv,organizationGovofcDiv,organizationHgdeptDiv,organizationDept);
for (int i = 0; i < list.size(); i++) {
Expand All @@ -105,7 +102,7 @@
jsonObject.put("hgdeptDiv", jsonArray);
System.out.println(jsonObject.toJSONString());
} else if (hgdeptDiv != "") {
} else {
list = OrganizationDAO.getInstance().getChildrenOf(organizationDeptDiv,organizationGovofcDiv,organizationHgdeptDiv,organizationDept);
for (int i = 0; i < list.size(); i++) {
Expand Down

0 comments on commit b69e496

Please sign in to comment.