Skip to content

commit for FINERACT-46 (Throw an exception if staff to be deactivated is attached to an entity with status enum id not equal to 600)#170

Closed
emmanuelnnaa wants to merge 1 commit into
apache:developfrom
emmanuelnnaa:FINERACT-46
Closed

commit for FINERACT-46 (Throw an exception if staff to be deactivated is attached to an entity with status enum id not equal to 600)#170
emmanuelnnaa wants to merge 1 commit into
apache:developfrom
emmanuelnnaa:FINERACT-46

Conversation

@emmanuelnnaa

Copy link
Copy Markdown
Contributor

No description provided.

… is attached to an entity with status enum id not equal to 600)

public final static String FIND_BY_OFFICE_QUERY = "select s from Staff s where s.id = :id AND s.office.id = :officeId";

public final static String IS_ANY_ACTIVE_ENTITY_ASSOCIATED_WITH_STAFF_QUERY = "select " +

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of adding a native query in StaffRepository, add new method in StaffReadPlatformService and use JDBC template to run this query

"join m_staff ms on msa.field_officer_id = ms.id " +
"where ms.id = :staffId and " +
"msa.status_enum in (100,300))) as t1 ";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Client and share accounts not checked.

@asfgit asfgit closed this in 29402a3 Nov 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants