Fehlerhafte DataQueries korrigiert.
git-svn-id: https://svn.libreccm.org/ccm/trunk@969 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
697c3078f6
commit
946e111897
|
|
@ -51,14 +51,14 @@ query getIdsOfContactsOfSciDepartment {
|
|||
}
|
||||
|
||||
query getIdsOfSubDepartmentsOfSciDepartment {
|
||||
BigDecimal departmentId;
|
||||
BigDecimal subDepartmentId;
|
||||
|
||||
do {
|
||||
select ct_sciorga_departments_subdepartments_map.department_id
|
||||
select ct_sciorga_departments_subdepartments_map.subdepartment_id
|
||||
from ct_sciorga_departments_subdepartments_map
|
||||
where ct_sciorga_departments_subdepartments_map.department_id = :department
|
||||
} map {
|
||||
departmentId = ct_sciorga_departments_subdepartments_map.department_id;
|
||||
subDepartmentId = ct_sciorga_departments_subdepartments_map.subdepartment_id;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -369,7 +369,7 @@ public class SciDepartment extends GenericOrganizationalUnit {
|
|||
boolean result = false;
|
||||
while (departmentsQuery.next()) {
|
||||
departmentId = (BigDecimal) departmentsQuery.get(
|
||||
"departmentId");
|
||||
"subDepartmentId");
|
||||
result = hasMembers(departmentId, merge, status);
|
||||
|
||||
if (result) {
|
||||
|
|
@ -436,7 +436,7 @@ public class SciDepartment extends GenericOrganizationalUnit {
|
|||
boolean result = false;
|
||||
while (subDepartmentsQuery.next()) {
|
||||
subDepartmentId = (BigDecimal) subDepartmentsQuery.get(
|
||||
"departmentId");
|
||||
"subDepartmentId");
|
||||
result = hasMembers(subDepartmentId, merge, status);
|
||||
|
||||
if (result) {
|
||||
|
|
@ -506,7 +506,7 @@ public class SciDepartment extends GenericOrganizationalUnit {
|
|||
boolean result = false;
|
||||
while (departmentsQuery.next()) {
|
||||
departmentId = (BigDecimal) departmentsQuery.get(
|
||||
"departmentId");
|
||||
"subDepartmentId");
|
||||
result = hasProjects(departmentId, merge, status);
|
||||
|
||||
if (result) {
|
||||
|
|
@ -578,7 +578,7 @@ public class SciDepartment extends GenericOrganizationalUnit {
|
|||
boolean result = false;
|
||||
while (subDepartmentsQuery.next()) {
|
||||
subDepartmentId = (BigDecimal) subDepartmentsQuery.get(
|
||||
"departmentId");
|
||||
"subDepartmentId");
|
||||
result = hasProjects(subDepartmentId, merge, status);
|
||||
|
||||
if (result) {
|
||||
|
|
|
|||
|
|
@ -293,7 +293,7 @@ public class SciOrganization extends GenericOrganizationalUnit {
|
|||
boolean result = false;
|
||||
while (subDepartmentsQuery.next()) {
|
||||
subDepartmentId = (BigDecimal) subDepartmentsQuery.get(
|
||||
"departmentId");
|
||||
"subDepartmentId");
|
||||
result = hasMembers(subDepartmentId, merge, status);
|
||||
|
||||
if (result) {
|
||||
|
|
@ -435,7 +435,7 @@ public class SciOrganization extends GenericOrganizationalUnit {
|
|||
boolean result = false;
|
||||
while (subDepartmentsQuery.next()) {
|
||||
subDepartmentId = (BigDecimal) subDepartmentsQuery.get(
|
||||
"departmentId");
|
||||
"subDepartmentId");
|
||||
result = hasProjects(subDepartmentId, merge, status);
|
||||
|
||||
if (result) {
|
||||
|
|
|
|||
|
|
@ -23,13 +23,15 @@ association {
|
|||
|
||||
query getIdsOfPublicationsOfSciDepartment {
|
||||
BigDecimal publicationId;
|
||||
String objectType;
|
||||
|
||||
do {
|
||||
select ct_department_publication_map.publication_id
|
||||
from ct_department_publication_map
|
||||
select ct_department_publication_map.publication_id, acs_objects.object_type
|
||||
from ct_department_publication_map join acs_objects on ct_department_publication_map.publication_id = acs_objects.object_id
|
||||
where ct_department_publication_map.department_id = :department
|
||||
} map {
|
||||
publicationId = ct_department_publication_map.publication_id;
|
||||
objectType = acs_objects.object_type;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ public class SciDepartmentWithPublications extends SciDepartment {
|
|||
boolean result = false;
|
||||
while (departmentsQuery.next()) {
|
||||
departmentId = (BigDecimal) departmentsQuery.get(
|
||||
"departmentId");
|
||||
"subDepartmentId");
|
||||
result = hasPublications(departmentId, merge);
|
||||
|
||||
if (result) {
|
||||
|
|
@ -124,7 +124,7 @@ public class SciDepartmentWithPublications extends SciDepartment {
|
|||
boolean result = false;
|
||||
while (subDepartmentsQuery.next()) {
|
||||
subDepartmentId = (BigDecimal) subDepartmentsQuery.get(
|
||||
"departmentId");
|
||||
"subDepartmentId");
|
||||
result = hasPublications(subDepartmentId, merge);
|
||||
|
||||
if (result) {
|
||||
|
|
@ -167,7 +167,7 @@ public class SciDepartmentWithPublications extends SciDepartment {
|
|||
boolean result = false;
|
||||
while (departmentsQuery.next()) {
|
||||
departmentId = (BigDecimal) departmentsQuery.get(
|
||||
"departmentId");
|
||||
"subDepartmentId");
|
||||
result = hasWorkingPapers(departmentId, merge);
|
||||
|
||||
if (result) {
|
||||
|
|
@ -211,7 +211,7 @@ public class SciDepartmentWithPublications extends SciDepartment {
|
|||
boolean result = false;
|
||||
while (subDepartmentsQuery.next()) {
|
||||
subDepartmentId = (BigDecimal) subDepartmentsQuery.get(
|
||||
"departmentId");
|
||||
"subDepartmentId");
|
||||
result = hasPublications(subDepartmentId, merge);
|
||||
|
||||
if (result) {
|
||||
|
|
|
|||
|
|
@ -87,8 +87,7 @@ public class SciOrganizationWithPublications extends SciOrganization {
|
|||
DataQuery departmentsQuery =
|
||||
SessionManager.getSession().retrieveQuery(
|
||||
"com.arsdigita.cms.contenttypes.getIdsOfDepartmentsOfSciOrganization");
|
||||
departmentsQuery.setParameter("organization",
|
||||
getID());
|
||||
departmentsQuery.setParameter("organization", getID());
|
||||
|
||||
if (departmentsQuery.size() > 0) {
|
||||
BigDecimal departmentId;
|
||||
|
|
@ -120,13 +119,15 @@ public class SciOrganizationWithPublications extends SciOrganization {
|
|||
final boolean merge) {
|
||||
DataQuery query =
|
||||
SessionManager.getSession().retrieveQuery(
|
||||
"com.arsdigita.cms.contenttypes.getIdsOfPublicationsOfSciOrganization");
|
||||
query.setParameter("organization", departmentId);
|
||||
"com.arsdigita.cms.contenttypes.getIdsOfPublicationsOfSciDepartment");
|
||||
query.setParameter("department", departmentId);
|
||||
if (getConfig().getOrganizationPublicationsSeparateWorkingPapers()) {
|
||||
query.addFilter(
|
||||
"objectType != 'com.arsdigita.cms.contenttypes.WorkingPaper'");
|
||||
}
|
||||
|
||||
System.out.printf("Proceedings department id %s\n ", departmentId.toString());
|
||||
|
||||
if (query.size() > 0) {
|
||||
query.close();
|
||||
return true;
|
||||
|
|
@ -143,7 +144,8 @@ public class SciOrganizationWithPublications extends SciOrganization {
|
|||
boolean result = false;
|
||||
while (subDepartmentsQuery.next()) {
|
||||
subDepartmentId = (BigDecimal) subDepartmentsQuery.get(
|
||||
"departmentId");
|
||||
"subDepartmentId");
|
||||
System.out.printf("Proceesing sub department %s...\n", subDepartmentId.toString());
|
||||
result = hasPublications(subDepartmentId, merge);
|
||||
|
||||
if (result) {
|
||||
|
|
@ -236,7 +238,7 @@ public class SciOrganizationWithPublications extends SciOrganization {
|
|||
boolean result = false;
|
||||
while (subDepartmentsQuery.next()) {
|
||||
subDepartmentId = (BigDecimal) subDepartmentsQuery.get(
|
||||
"departmentId");
|
||||
"subDepartmentId");
|
||||
result = hasPublications(subDepartmentId, merge);
|
||||
|
||||
if (result) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue