Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
synergy-api-util
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Raimbek Egemberdiev
synergy-api-util
Commits
236ad0cf
Commit
236ad0cf
authored
Feb 09, 2017
by
Raimbek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
синхронизация департаментов
parent
76095495
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
3 deletions
+18
-3
src/main/java/kz/arta/synergy/api/services/PositionsService.java
...n/java/kz/arta/synergy/api/services/PositionsService.java
+8
-2
src/main/java/kz/arta/synergy/api/services/UserChooserService.java
...java/kz/arta/synergy/api/services/UserChooserService.java
+10
-1
No files found.
src/main/java/kz/arta/synergy/api/services/PositionsService.java
View file @
236ad0cf
...
@@ -4,8 +4,6 @@ import kz.arta.synergy.api.JsonUtils;
...
@@ -4,8 +4,6 @@ import kz.arta.synergy.api.JsonUtils;
import
kz.arta.synergy.api.Query
;
import
kz.arta.synergy.api.Query
;
import
kz.arta.synergy.api.QueryContext
;
import
kz.arta.synergy.api.QueryContext
;
import
kz.arta.synergy.api.RestHttpQuery
;
import
kz.arta.synergy.api.RestHttpQuery
;
import
kz.arta.synergy.api.pojo.SynergyDepartment
;
import
kz.arta.synergy.api.pojo.SynergyDepartmentContent
;
import
kz.arta.synergy.api.pojo.SynergyPosition
;
import
kz.arta.synergy.api.pojo.SynergyPosition
;
import
org.codehaus.jackson.type.TypeReference
;
import
org.codehaus.jackson.type.TypeReference
;
...
@@ -66,6 +64,14 @@ public class PositionsService {
...
@@ -66,6 +64,14 @@ public class PositionsService {
return
restHttpQuery
.
doQuery
(
query
);
return
restHttpQuery
.
doQuery
(
query
);
}
}
public
String
dischargeFromPosition
(
String
positionID
,
String
personID
)
throws
IOException
{
Query
query
=
Query
.
newInstance
()
.
url
(
"/rest/api/positions/discharge"
)
.
queryParam
(
"positionID"
,
positionID
)
.
queryParam
(
"userID"
,
personID
);
return
restHttpQuery
.
doQuery
(
query
);
}
public
String
deletePosition
(
String
positionId
)
throws
IOException
{
public
String
deletePosition
(
String
positionId
)
throws
IOException
{
Query
query
=
Query
.
newInstance
()
Query
query
=
Query
.
newInstance
()
.
url
(
"/rest/api/positions/delete"
)
.
url
(
"/rest/api/positions/delete"
)
...
...
src/main/java/kz/arta/synergy/api/services/UserChooserService.java
View file @
236ad0cf
...
@@ -9,7 +9,6 @@ import org.codehaus.jackson.type.TypeReference;
...
@@ -9,7 +9,6 @@ import org.codehaus.jackson.type.TypeReference;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* @author raimbek
* @author raimbek
...
@@ -67,6 +66,16 @@ public class UserChooserService {
...
@@ -67,6 +66,16 @@ public class UserChooserService {
return
JsonUtils
.
read
(
result
,
new
TypeReference
<
List
<
SearchExtUser
>>()
{});
return
JsonUtils
.
read
(
result
,
new
TypeReference
<
List
<
SearchExtUser
>>()
{});
}
}
public
List
<
SearchExtUser
>
getPositionUsers
(
String
positionId
)
throws
IOException
{
Query
query
=
Query
.
newInstance
()
.
url
(
"/rest/api/userchooser/search_ext"
)
.
queryParam
(
"filterPositionID"
,
positionId
)
.
queryParam
(
"showAll"
,
true
)
.
queryParam
(
"recordsCount"
,
0
);
String
result
=
restHttpQuery
.
doQuery
(
query
);
return
JsonUtils
.
read
(
result
,
new
TypeReference
<
List
<
SearchExtUser
>>()
{});
}
public
SynergyUser
findUserByCode
(
String
searchString
,
String
code
)
throws
IOException
{
public
SynergyUser
findUserByCode
(
String
searchString
,
String
code
)
throws
IOException
{
List
<
SearchExtUser
>
users
=
getUsersExt
(
searchString
);
List
<
SearchExtUser
>
users
=
getUsersExt
(
searchString
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment