Vorlagen ergänzt
This commit is contained in:
33
_Vorlagen/Groovy-Skripte/createGlobalDBInstance.groovy
Normal file
33
_Vorlagen/Groovy-Skripte/createGlobalDBInstance.groovy
Normal file
@@ -0,0 +1,33 @@
|
||||
import groovy.sql.*;
|
||||
|
||||
public class PersonnelHooks {
|
||||
// definition of entrypoint
|
||||
|
||||
|
||||
public String username = "sa";
|
||||
public String password = "password"
|
||||
def sql_global ;
|
||||
|
||||
//*************************************** intiale Anmeldung an die DB
|
||||
public PersonnelHooks(){
|
||||
sql_global = Sql.newInstance("jdbc:sqlserver://10.95.6.177:1433;databaseName=D3ER",username, password);
|
||||
|
||||
}
|
||||
|
||||
|
||||
// hook_insert_entry_10 für Bewerbungsdokumente----------------------------------------------------
|
||||
@Entrypoint(entrypoint = "hook_insert_entry_10")
|
||||
@Condition(doctype = [PersonnelConstants.g_DA_BEWERBERDOKUMENTE])
|
||||
public int DbsInsertEntry10_3(D3Interface d3, User d3User, DocumentType docTypeShort, Document docObj) {
|
||||
d3.log.info("[D3ECMPF] groovy hook insert_entry_10_3 $docTypeShort.id");
|
||||
|
||||
sql_global.eachRow("Select zeich_nr from phys_datei ")
|
||||
{
|
||||
d3.log.info("$it.zeich_nr");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
// Ende hook_insert_entry_10 für Bewerbungsdokumente----------------------------------------------------
|
||||
|
||||
} // end of class
|
||||
Reference in New Issue
Block a user