Commit d75dff25 by yuichiro ogawa

#38496 担当グループ参照

parent c2abc033
...@@ -34,6 +34,7 @@ public class ABookKeys { ...@@ -34,6 +34,7 @@ public class ABookKeys {
public static final String CMD_MOVE_PAGE = "movePage"; public static final String CMD_MOVE_PAGE = "movePage";
public static final String CMD_SHOW_RELATED_CONTENT = "showRelatedContent"; public static final String CMD_SHOW_RELATED_CONTENT = "showRelatedContent";
public static final String CMD_PAGE_NUM = "pageNum"; public static final String CMD_PAGE_NUM = "pageNum";
public static final String CMD_GET_GROUP_TREE_INFO = "getGroupTreeInfo";
public static final String GPS_TYPE = "gpsType"; public static final String GPS_TYPE = "gpsType";
public static final String STATUS_CODE = "statusCode"; public static final String STATUS_CODE = "statusCode";
......
package jp.agentec.abook.abv.bl.logic; package jp.agentec.abook.abv.bl.logic;
import org.json.adf.JSONObject;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Locale; import java.util.Locale;
...@@ -35,7 +37,8 @@ public class GroupLogic extends AbstractLogic { ...@@ -35,7 +37,8 @@ public class GroupLogic extends AbstractLogic {
/** /**
* グループ情報をサーバから受信し、ローカルに保存します。既存のデータは上書きされます。また、サーバにないグループがローカルにある場合、そのグループは削除されます。 * グループ情報をサーバから受信し、ローカルに保存します。既存のデータは上書きされます。また、サーバにないグループがローカルにある場合、そのグループは削除されます。
* @throws ABVException キャッシュにユーザ情報がありません。再度ログインする必要があります。 *
* @throws ABVException  キャッシュにユーザ情報がありません。再度ログインする必要があります。
* @throws AcmsException * @throws AcmsException
* @throws Exception その他、例外です。 * @throws Exception その他、例外です。
* @since 1.0.0 * @since 1.0.0
...@@ -129,9 +132,9 @@ public class GroupLogic extends AbstractLogic { ...@@ -129,9 +132,9 @@ public class GroupLogic extends AbstractLogic {
} }
//해당 콘텐츠 아이디를 가지고 있는 그룹정보 //해당 콘텐츠 아이디를 가지고 있는 그룹정보
public ArrayList<String>getExistContentsGroupInfo(long contentId) { public ArrayList<String> getExistContentsGroupInfo(long contentId) {
List<GroupDto>groupDtoList = groupDao.getExistContentGroup(contentId); List<GroupDto> groupDtoList = groupDao.getExistContentGroup(contentId);
ArrayList<String>groupList = new ArrayList<String>(); ArrayList<String> groupList = new ArrayList<String>();
for (GroupDto groupDto : groupDtoList) { for (GroupDto groupDto : groupDtoList) {
groupList.add(groupDto.groupName); groupList.add(groupDto.groupName);
} }
...@@ -154,4 +157,21 @@ public class GroupLogic extends AbstractLogic { ...@@ -154,4 +157,21 @@ public class GroupLogic extends AbstractLogic {
return AcmsClient.getInstance(cache.getUrlPath(), networkAdapter).addMemberGroup(param); return AcmsClient.getInstance(cache.getUrlPath(), networkAdapter).addMemberGroup(param);
} }
public List<JSONObject> getAllGroupsJson() {
List<JSONObject> groupList = new ArrayList<JSONObject>();
List<GroupDto> groups = groupDao.getUserGroups();
if (groups != null) {
for (GroupDto groupDto : groups) {
JSONObject group = new JSONObject();
group.put("groupId", groupDto.groupId);
group.put("groupName", groupDto.groupName);
group.put("groupLevel", groupDto.groupLevel);
group.put("parentGroupId", groupDto.parentGroupId);
group.put("contentCount", groupDto.contentCount);
groupList.add(group);
}
}
return groupList;
}
} }
...@@ -13,7 +13,6 @@ import android.provider.MediaStore; ...@@ -13,7 +13,6 @@ import android.provider.MediaStore;
import android.view.Gravity; import android.view.Gravity;
import android.view.KeyEvent; import android.view.KeyEvent;
import android.view.MotionEvent; import android.view.MotionEvent;
import android.view.OrientationEventListener;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.AdapterView; import android.widget.AdapterView;
...@@ -52,6 +51,7 @@ import jp.agentec.abook.abv.bl.dto.OperationDto; ...@@ -52,6 +51,7 @@ import jp.agentec.abook.abv.bl.dto.OperationDto;
import jp.agentec.abook.abv.bl.dto.OperationTaskDto; import jp.agentec.abook.abv.bl.dto.OperationTaskDto;
import jp.agentec.abook.abv.bl.logic.AbstractLogic; import jp.agentec.abook.abv.bl.logic.AbstractLogic;
import jp.agentec.abook.abv.bl.logic.ContentReadingLogLogic; import jp.agentec.abook.abv.bl.logic.ContentReadingLogLogic;
import jp.agentec.abook.abv.bl.logic.GroupLogic;
import jp.agentec.abook.abv.bl.logic.OperationLogic; import jp.agentec.abook.abv.bl.logic.OperationLogic;
import jp.agentec.abook.abv.bl.websocket.MeetingManager; import jp.agentec.abook.abv.bl.websocket.MeetingManager;
import jp.agentec.abook.abv.cl.environment.DeviceInfo; import jp.agentec.abook.abv.cl.environment.DeviceInfo;
...@@ -85,6 +85,8 @@ import jp.agentec.adf.util.StringUtil; ...@@ -85,6 +85,8 @@ import jp.agentec.adf.util.StringUtil;
public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity { public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
protected static GroupLogic groupLogic = AbstractLogic.getLogic(GroupLogic.class);
private static final String TAG ="ABVContentViewActivity"; private static final String TAG ="ABVContentViewActivity";
public final static int ABOOK_CHECK_TASK_IMAGE = 103; public final static int ABOOK_CHECK_TASK_IMAGE = 103;
public final static int ABOOK_CHECK_TASK_VIDEO = 104; public final static int ABOOK_CHECK_TASK_VIDEO = 104;
...@@ -1088,6 +1090,9 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity { ...@@ -1088,6 +1090,9 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
Logger.e(TAG, "startContentActivity failed.", e); Logger.e(TAG, "startContentActivity failed.", e);
ErrorMessage.showErrorMessageToast(getApplicationContext(), ErrorCode.E107); ErrorMessage.showErrorMessageToast(getApplicationContext(), ErrorCode.E107);
} }
} else if (mCmd.equals(ABookKeys.CMD_GET_GROUP_TREE_INFO)) {
List<JSONObject> groups = groupLogic.getAllGroupsJson();
afterABookCheckApi(mCmd, null, 0, "getAllGroups", groups.toString());
} }
} }
......
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