Commit 236ad0cf authored by Raimbek's avatar Raimbek

синхронизация департаментов

parent 76095495
......@@ -4,8 +4,6 @@ import kz.arta.synergy.api.JsonUtils;
import kz.arta.synergy.api.Query;
import kz.arta.synergy.api.QueryContext;
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 org.codehaus.jackson.type.TypeReference;
......@@ -66,6 +64,14 @@ public class PositionsService {
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 {
Query query = Query.newInstance()
.url("/rest/api/positions/delete")
......
......@@ -9,7 +9,6 @@ import org.codehaus.jackson.type.TypeReference;
import java.io.IOException;
import java.util.List;
import java.util.Map;
/**
* @author raimbek
......@@ -67,6 +66,16 @@ public class UserChooserService {
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 {
List<SearchExtUser> users = getUsersExt(searchString);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment