Commit 1e37ede3 by Lee Jaebin

#34190 作業種別毎に作業を絞り込み機能追加

parent 137e7770
...@@ -22,6 +22,7 @@ import jp.agentec.abook.abv.bl.acms.client.json.ContentVersionsJSON; ...@@ -22,6 +22,7 @@ import jp.agentec.abook.abv.bl.acms.client.json.ContentVersionsJSON;
import jp.agentec.abook.abv.bl.acms.client.json.GroupsJSON; import jp.agentec.abook.abv.bl.acms.client.json.GroupsJSON;
import jp.agentec.abook.abv.bl.acms.client.json.LogSendFlagJSON; import jp.agentec.abook.abv.bl.acms.client.json.LogSendFlagJSON;
import jp.agentec.abook.abv.bl.acms.client.json.NewAppStoreLoginJSON; import jp.agentec.abook.abv.bl.acms.client.json.NewAppStoreLoginJSON;
import jp.agentec.abook.abv.bl.acms.client.json.OperationGroupMasterJSON;
import jp.agentec.abook.abv.bl.acms.client.json.RequirePasswordChangeJSON; import jp.agentec.abook.abv.bl.acms.client.json.RequirePasswordChangeJSON;
import jp.agentec.abook.abv.bl.acms.client.json.ResultJSON; import jp.agentec.abook.abv.bl.acms.client.json.ResultJSON;
import jp.agentec.abook.abv.bl.acms.client.json.ServerTimeZoneJSON; import jp.agentec.abook.abv.bl.acms.client.json.ServerTimeZoneJSON;
...@@ -702,6 +703,19 @@ public class AcmsClient implements AcmsClientResponseListener { ...@@ -702,6 +703,19 @@ public class AcmsClient implements AcmsClientResponseListener {
return json; return json;
} }
/**
* 作業種別の取得API
* @param param
* @return
* @throws NetworkDisconnectedException
* @throws AcmsException
*/
public OperationGroupMasterJSON getOperationGroupMaster(AcmsParameters param) throws NetworkDisconnectedException, AcmsException {
HttpResponse response = send(AcmsApis.ApiOperationGroupMaster, param);
OperationGroupMasterJSON json = new OperationGroupMasterJSON(response.httpResponseBody);
return json;
}
/**********************************************************************************************/ /**********************************************************************************************/
/** 以下、共用メソッド---------------------------------------------------------------------- **/ /** 以下、共用メソッド---------------------------------------------------------------------- **/
/**********************************************************************************************/ /**********************************************************************************************/
......
package jp.agentec.abook.abv.bl.acms.client.json;
import org.json.adf.JSONArray;
import org.json.adf.JSONObject;
import java.util.ArrayList;
import jp.agentec.abook.abv.bl.common.exception.AcmsException;
import jp.agentec.abook.abv.bl.common.exception.JSONValidationException;
import jp.agentec.abook.abv.bl.dto.OperationGroupMasterDto;
import jp.agentec.abook.abv.bl.dto.OperationGroupMasterOperationDto;
/**
* Created by leej on 2019/06/24.
*/
public class OperationGroupMasterJSON extends AcmsCommonJSON {
public static final String OperationGroupMasterList = "operatioinGroupMasterList";
public static final String OperationGroupMasterId = "operationGroupMasterId";
public static final String OperationGroupMasterName = "operationGroupMasterName";
public static final String OperationGroupMasterLevel = "operationGroupMasterLevel";
public static final String ParentOperationGroupMasterId = "parentOperationGroupMasterId";
public static final String OperationIdList = "operationIdList";
public Integer[] userGroupIds;
public ArrayList<OperationGroupMasterDto> operationGroupMasterList;
public OperationGroupMasterJSON(String jsonString) throws AcmsException {
super(jsonString);
}
@Override
protected void parse(JSONObject json) throws JSONValidationException {
operationGroupMasterList = new ArrayList<OperationGroupMasterDto>();
if (json.has(OperationGroupMasterList)) {
JSONArray operationGroupMasterJsonList = json.getJSONArray(OperationGroupMasterList);
for (int i = 0; i < operationGroupMasterJsonList.length(); i++) {
OperationGroupMasterDto dto = new OperationGroupMasterDto();
dto.operationGroupMasterOperationDtoList = new ArrayList<OperationGroupMasterOperationDto>();
JSONObject operationGroupMasterJson = operationGroupMasterJsonList.getJSONObject(i);
dto.operationGroupMasterId = getInt(operationGroupMasterJson, OperationGroupMasterId);
dto.operationGroupMasterName = getString(operationGroupMasterJson, OperationGroupMasterName);
dto.operationGroupMasterLevel = getInt(operationGroupMasterJson, OperationGroupMasterLevel);
dto.parentOperationGroupMasterId = getInt(operationGroupMasterJson, ParentOperationGroupMasterId);
if (operationGroupMasterJson.has(OperationIdList)) {
// 作業種別に紐づく作業種別ID、作業IDセット
JSONArray operationIdJsonArray = operationGroupMasterJson.getJSONArray(OperationIdList);
for (int k = 0; k < operationIdJsonArray.length(); k++) {
OperationGroupMasterOperationDto operationGroupMasterOperationDto = new OperationGroupMasterOperationDto();
operationGroupMasterOperationDto.operationGroupMasterId = dto.operationGroupMasterId;
operationGroupMasterOperationDto.operationId = operationIdJsonArray.getLong(k);
dto.operationGroupMasterOperationDtoList.add(operationGroupMasterOperationDto);
}
}
operationGroupMasterList.add(dto);
}
}
}
}
...@@ -152,7 +152,8 @@ public class AcmsApis { ...@@ -152,7 +152,8 @@ public class AcmsApis {
public static final String ApiGetPushMessages = "getPushMessage"; public static final String ApiGetPushMessages = "getPushMessage";
// 定期点検データ送信 // 定期点検データ送信
public static final String ApiSendRoutineTaskData = "routineTaskData"; public static final String ApiSendRoutineTaskData = "routineTaskData";
// 作業種別データ取得
public static final String ApiOperationGroupMaster = "operationGroupMaster";
// download // download
/** /**
...@@ -196,7 +197,7 @@ public class AcmsApis { ...@@ -196,7 +197,7 @@ public class AcmsApis {
apiValue = Constant.ApiValue.nuapi; apiValue = Constant.ApiValue.nuapi;
} else if (methodName.equals(ApiOperationList) || methodName.equals(ApiWorkingGroupList) || methodName.equals(ApiSendTaskData) || methodName.equals(ApiGetOperationData) || } else if (methodName.equals(ApiOperationList) || methodName.equals(ApiWorkingGroupList) || methodName.equals(ApiSendTaskData) || methodName.equals(ApiGetOperationData) ||
methodName.equals(ApiGetTaskFile) || methodName.equals(ApiSceneEntry) || methodName.equals(ApiTaskContentEntry) || methodName.equals(ApiGetTaskFile) || methodName.equals(ApiSceneEntry) || methodName.equals(ApiTaskContentEntry) ||
methodName.equals(ApiSendPushMessage) || methodName.equals(ApiGetPushMessages) || methodName.equals(ApiSendRoutineTaskData)) { methodName.equals(ApiSendPushMessage) || methodName.equals(ApiGetPushMessages) || methodName.equals(ApiSendRoutineTaskData) || methodName.equals(ApiOperationGroupMaster)) {
apiValue = Constant.ApiValue.checkapi; apiValue = Constant.ApiValue.checkapi;
} }
......
...@@ -147,5 +147,10 @@ public interface ServiceOption { ...@@ -147,5 +147,10 @@ public interface ServiceOption {
* 報告タイプ:N(通常)、Y(定期点検) * 報告タイプ:N(通常)、Y(定期点検)
*/ */
int OperationReportType = 171; int OperationReportType = 171;
/**
* 作業種別:N(通常)、Y(作業種別毎に絞り込み可能なボタン・画面表示)
*/
int OperationGroupMaster = 175;
} }
} }
\ No newline at end of file
...@@ -294,10 +294,6 @@ public class ABVDataCache { ...@@ -294,10 +294,6 @@ public class ABVDataCache {
return isServiceOptionEnable(ServiceOptionId.CatalogEdition); return isServiceOptionEnable(ServiceOptionId.CatalogEdition);
} }
public boolean isBizEdition() {
return !isServiceOptionEnable(ServiceOptionId.CatalogEdition) && !isServiceOptionEnable(ServiceOptionId.Publisher);
}
public boolean isReportGPS() { public boolean isReportGPS() {
return isServiceOptionEnable(ServiceOptionId.REPORT_GPS); return isServiceOptionEnable(ServiceOptionId.REPORT_GPS);
} }
...@@ -334,6 +330,14 @@ public class ABVDataCache { ...@@ -334,6 +330,14 @@ public class ABVDataCache {
return isServiceOptionEnable(ServiceOptionId.PanoImage); return isServiceOptionEnable(ServiceOptionId.PanoImage);
} }
/**
* 作業種別のサービスオプション情報取得
* @return
*/
public boolean isOperationGroupMaster() {
return isServiceOptionEnable(ServiceOptionId.OperationGroupMaster);
}
public boolean isServiceOptionEnable(int serviceOptionId) { public boolean isServiceOptionEnable(int serviceOptionId) {
ServiceOptionDto dto = getServiceOption(serviceOptionId); ServiceOptionDto dto = getServiceOption(serviceOptionId);
if (dto != null) { if (dto != null) {
......
...@@ -13,12 +13,14 @@ import jp.agentec.abook.abv.bl.data.tables.MAppConfig; ...@@ -13,12 +13,14 @@ import jp.agentec.abook.abv.bl.data.tables.MAppConfig;
import jp.agentec.abook.abv.bl.data.tables.MCategory; import jp.agentec.abook.abv.bl.data.tables.MCategory;
import jp.agentec.abook.abv.bl.data.tables.MGroup; import jp.agentec.abook.abv.bl.data.tables.MGroup;
import jp.agentec.abook.abv.bl.data.tables.MMemberInfo; import jp.agentec.abook.abv.bl.data.tables.MMemberInfo;
import jp.agentec.abook.abv.bl.data.tables.MOperationGroupMaster;
import jp.agentec.abook.abv.bl.data.tables.MPasswordLockInfo; import jp.agentec.abook.abv.bl.data.tables.MPasswordLockInfo;
import jp.agentec.abook.abv.bl.data.tables.MServiceOption; import jp.agentec.abook.abv.bl.data.tables.MServiceOption;
import jp.agentec.abook.abv.bl.data.tables.MWorkerGroup; import jp.agentec.abook.abv.bl.data.tables.MWorkerGroup;
import jp.agentec.abook.abv.bl.data.tables.ROperationContent; import jp.agentec.abook.abv.bl.data.tables.ROperationContent;
import jp.agentec.abook.abv.bl.data.tables.RContentCategory; import jp.agentec.abook.abv.bl.data.tables.RContentCategory;
import jp.agentec.abook.abv.bl.data.tables.RContentGroup; import jp.agentec.abook.abv.bl.data.tables.RContentGroup;
import jp.agentec.abook.abv.bl.data.tables.ROperationGroupMasterOperation;
import jp.agentec.abook.abv.bl.data.tables.RTaskWorkerGroup; import jp.agentec.abook.abv.bl.data.tables.RTaskWorkerGroup;
import jp.agentec.abook.abv.bl.data.tables.SQLiteTableScript; import jp.agentec.abook.abv.bl.data.tables.SQLiteTableScript;
import jp.agentec.abook.abv.bl.data.tables.TContent; import jp.agentec.abook.abv.bl.data.tables.TContent;
...@@ -94,6 +96,8 @@ public class ABVDataOpenHelper { ...@@ -94,6 +96,8 @@ public class ABVDataOpenHelper {
iTableScripts.add(new TTaskReportSend()); iTableScripts.add(new TTaskReportSend());
iTableScripts.add(new TTaskReportItems()); iTableScripts.add(new TTaskReportItems());
iTableScripts.add(new TPushMessage()); iTableScripts.add(new TPushMessage());
iTableScripts.add(new MOperationGroupMaster());
iTableScripts.add(new ROperationGroupMasterOperation());
return iTableScripts; return iTableScripts;
} }
......
...@@ -19,7 +19,7 @@ import jp.agentec.abook.abv.bl.common.db.SQLiteDatabase; ...@@ -19,7 +19,7 @@ import jp.agentec.abook.abv.bl.common.db.SQLiteDatabase;
public class DBConnector { public class DBConnector {
private static volatile DBConnector dbConnector = null; private static volatile DBConnector dbConnector = null;
public static final String DatabaseName = "ABVJE"; public static final String DatabaseName = "ABVJE";
public static final int DatabaseVersion = DatabaseVersions.Ver1_0_0; public static final int DatabaseVersion = DatabaseVersions.Ver1_1_0;
protected SQLiteDatabase db = null; protected SQLiteDatabase db = null;
......
...@@ -3,5 +3,6 @@ package jp.agentec.abook.abv.bl.data; ...@@ -3,5 +3,6 @@ package jp.agentec.abook.abv.bl.data;
// バージョンが上がるごとに+10すること // バージョンが上がるごとに+10すること
public class DatabaseVersions { public class DatabaseVersions {
public static final int Ver1_0_0 = 1; public static final int Ver1_0_0 = 1;
public static final int Ver1_1_0 = 11;
} }
...@@ -210,15 +210,24 @@ public class OperationDao extends AbstractDao { ...@@ -210,15 +210,24 @@ public class OperationDao extends AbstractDao {
return count > 0; return count > 0;
} }
/**
* 該当作業を削除(関連テーブルを含む)
* @param dto
*/
public void delete(OperationDto dto) { public void delete(OperationDto dto) {
delete("r_task_worker_group", "operation_id=?", dto.getKeyValues()); delete("r_task_worker_group", "operation_id=?", dto.getKeyValues());
delete("r_operation_content", "operation_id=?", dto.getKeyValues()); delete("r_operation_content", "operation_id=?", dto.getKeyValues());
delete("r_operation_group_master_relation", "operation_id=?", dto.getKeyValues());
delete("t_operation", "operation_id=?", dto.getKeyValues()); delete("t_operation", "operation_id=?", dto.getKeyValues());
} }
/**
* 作業リスト全て削除(関連テーブルを含む)
*/
public void deleteAll() { public void deleteAll() {
delete("t_push_message", null, null); delete("t_push_message", null, null);
delete("r_operation_content", null, null); delete("r_operation_content", null, null);
delete("r_operation_group_master_relation", null, null);
delete("r_task_worker_group", null, null); delete("r_task_worker_group", null, null);
delete("t_operation", null, null); delete("t_operation", null, null);
delete("t_task", null, null); delete("t_task", null, null);
...@@ -228,12 +237,31 @@ public class OperationDao extends AbstractDao { ...@@ -228,12 +237,31 @@ public class OperationDao extends AbstractDao {
delete("m_worker_group", null, null); delete("m_worker_group", null, null);
} }
public List<OperationDto> getOperations(String searchOperationName, String searchStartDateStr, String searchEndDateStr, String reportTypeStr) { /**
String sql = generateGetOperationQuery(searchOperationName, searchStartDateStr, searchEndDateStr, reportTypeStr); * 引数の検索条件で作業情報リストを取得(作業一覧表示用)
* @param searchOperationName
* @param searchStartDateStr
* @param searchEndDateStr
* @param reportTypeStr
* @param operationGroupMasterId
* @return
*/
public List<OperationDto> getOperations(String searchOperationName, String searchStartDateStr, String searchEndDateStr, String reportTypeStr, Integer operationGroupMasterId) {
String sql = generateGetOperationQuery(searchOperationName, searchStartDateStr, searchEndDateStr, reportTypeStr, operationGroupMasterId);
return rawQueryGetDtoList(sql, null, OperationDto.class); return rawQueryGetDtoList(sql, null, OperationDto.class);
} }
private String generateGetOperationQuery(String searchOperationName, String searchStartDateStr, String searchEndDateStr, String reportTypeStr) { /**
* 引数の検索条件で作業情報リストを
* 取得用のsql文作成
* @param searchOperationName
* @param searchStartDateStr
* @param searchEndDateStr
* @param reportTypeStr
* @param operationGroupMasterId
* @return
*/
private String generateGetOperationQuery(String searchOperationName, String searchStartDateStr, String searchEndDateStr, String reportTypeStr, Integer operationGroupMasterId) {
String curDate = DateTimeUtil.toStringInTimeZone(new Date(), DateTimeFormat.yyyyMMddHHmmss_hyphen, "UTC"); String curDate = DateTimeUtil.toStringInTimeZone(new Date(), DateTimeFormat.yyyyMMddHHmmss_hyphen, "UTC");
StringBuffer sql = new StringBuffer(); StringBuffer sql = new StringBuffer();
...@@ -278,6 +306,12 @@ public class OperationDao extends AbstractDao { ...@@ -278,6 +306,12 @@ public class OperationDao extends AbstractDao {
sql.append(" LEFT OUTER JOIN r_operation_content AS rpc "); sql.append(" LEFT OUTER JOIN r_operation_content AS rpc ");
sql.append(" ON top.operation_id = rpc.operation_id "); sql.append(" ON top.operation_id = rpc.operation_id ");
sql.append(" AND rpc.operation_content_flg = 1 "); sql.append(" AND rpc.operation_content_flg = 1 ");
// 作業種別IDに紐づく作業のみ検索するため、INNER JOINする
if (operationGroupMasterId != null) {
sql.append(" INNER JOIN r_operation_group_master_relation AS rogmo ");
sql.append(" ON rogmo.operation_id = top.operation_id ");
sql.append(" AND rogmo.operation_group_master_id =" + operationGroupMasterId);
}
sql.append(" WHERE top.operation_id IS NOT NULL "); sql.append(" WHERE top.operation_id IS NOT NULL ");
if (!StringUtil.isNullOrEmpty(searchOperationName)) { if (!StringUtil.isNullOrEmpty(searchOperationName)) {
sql.append(" AND top.operation_name GLOB " + "'*" + searchOperationName + "*'"); sql.append(" AND top.operation_name GLOB " + "'*" + searchOperationName + "*'");
......
package jp.agentec.abook.abv.bl.data.dao;
import java.util.ArrayList;
import java.util.List;
import jp.agentec.abook.abv.bl.acms.type.SearchDivisionType;
import jp.agentec.abook.abv.bl.common.db.Cursor;
import jp.agentec.abook.abv.bl.common.db.SQLiteDatabase;
import jp.agentec.abook.abv.bl.common.log.Logger;
import jp.agentec.abook.abv.bl.dto.GroupDto;
import jp.agentec.abook.abv.bl.dto.OperationGroupMasterDto;
import jp.agentec.adf.util.NumericUtil;
import jp.agentec.adf.util.StringUtil;
/**
* Created by leej on 2019/06/25.
*/
public class OperationGroupMasterDao extends AbstractDao {
private static final String TAG = "OperationGroupMasterDao";
private enum QueryType {GetAllGroups, GetRootGroups, GetGroups}
/*package*/ OperationGroupMasterDao() {
}
@Override
protected OperationGroupMasterDto convert(Cursor cursor) {
OperationGroupMasterDto dto = new OperationGroupMasterDto();
int column = cursor.getColumnIndex("operation_group_master_id");
if (column != -1) {
dto.operationGroupMasterId = cursor.getInt(column);
}
column = cursor.getColumnIndex("operation_group_master_name");
if (column != -1) {
dto.operationGroupMasterName = cursor.getString(column);
}
if (column != -1) {
column = cursor.getColumnIndex("parent_operation_group_master_id");
dto.parentOperationGroupMasterId = cursor.getInt(column);
}
column = cursor.getColumnIndex("operation_group_master_level");
if (column != -1) {
dto.operationGroupMasterLevel = cursor.getInt(column);
}
column = cursor.getColumnIndex("operation_count");
if (column != -1) {
dto.operationCount = cursor.getInt(column);
}
return dto;
}
/**
* 作業種別をDB登録処理
* @param dto
*/
public void insertOperationGroupMaster(OperationGroupMasterDto dto) {
StringBuffer sql = new StringBuffer();
sql.append(" INSERT OR IGNORE INTO m_operation_group_master (operation_group_master_id, operation_group_master_name, parent_operation_group_master_id, operation_group_master_level) ");
sql.append(" VALUES (?,?,?,?) ");
try {
beginTransaction();
insert(sql.toString(), dto.getInsertValues());
commit();
} catch (Exception e) {
rollback();
Logger.e("insertOperationGroupMaster failed.", e);
throw new RuntimeException(e);
}
Logger.v(TAG, "sql=%s", sql);
}
/**
* 作業種別をDB更新処理
* @param dto
*/
public void updateOperationGroupMaster(OperationGroupMasterDto dto) {
StringBuffer sql = new StringBuffer();
sql.append(" UPDATE m_operation_group_master ");
sql.append(" SET operation_group_master_name = ? ");
sql.append(" ,parent_operation_group_master_id = ? ");
sql.append(" ,operation_group_master_level = ? ");
sql.append(" WHERE operation_group_master_id = ? ");
try {
beginTransaction();
update(sql.toString(), dto.getUpdateValues());
commit();
} catch (Exception e) {
rollback();
Logger.e("insertGroup failed.", e);
throw new RuntimeException(e);
}
Logger.v(TAG, "sql=%s", sql);
}
/**
* 親階層のIDで子供の階層を取得
* @param parentId
* @return
*/
public List<OperationGroupMasterDto> getOperationGroupMasterChildList(int parentId) {
List<OperationGroupMasterDto> list;
list = rawQueryGetDtoList("select * from m_operation_group_master mogm where (mogm.parent_operation_group_master_id = ?)", new String[]{""+ parentId}, OperationGroupMasterDto.class);
return list;
}
/**
* 最上位階層を取得
* @return
*/
public OperationGroupMasterDto getTopOperationGroupMaster() {
return rawQueryGetDto("select * from m_operation_group_master where operation_group_master_level = 0", null, OperationGroupMasterDto.class);
}
/**
* 全作業種別を取得
* @return
*/
public List<OperationGroupMasterDto> getAllOperationGroupMaster() {
return rawQueryGetDtoList("select * from m_operation_group_master", null, OperationGroupMasterDto.class);
}
/**
* operationGroupMasterIdで作業種別を取得
* @param operationGroupMasterId
* @return
*/
public OperationGroupMasterDto getOperationGroupMaster(Integer operationGroupMasterId) {
return rawQueryGetDto("select * from m_operation_group_master where operation_group_master_id = ?", new String[]{"" + operationGroupMasterId}, OperationGroupMasterDto.class);
}
/**
* operationGroupMasterIdのデータ存在チェック
* @param operationGroupMasterId
* @return
*/
public boolean isExistOperationGroupMaster(Integer operationGroupMasterId) {
return getOperationGroupMaster(operationGroupMasterId) != null;
}
/**
* 作業種別に関連するテーブルを全て削除
* @param dto
*/
public void delete(OperationGroupMasterDto dto) {
// 作業種別と作業のリレーションテーブル
delete("r_operation_group_master_relation", "operation_group_master_id=?", dto.getKeyValues());
// 作業種別のマスタテーブル
delete("m_operation_group_master", "operation_group_master_id=?", dto.getKeyValues());
}
/**
* 階層の作業種別情報取得
* @param level
* @return
*/
public List<OperationGroupMasterDto> getOperationGroupMasterListBylevel(Integer level) {
StringBuffer sql = new StringBuffer();
sql.append(" SELECT M1.*, count(R1.operation_id) AS operation_count FROM m_operation_group_master AS M1");
sql.append(" LEFT OUTER JOIN r_operation_group_master_relation R1");
sql.append(" ON R1.operation_group_master_id = M1.operation_group_master_id");
sql.append(" WHERE M1.operation_group_master_level =? ");
sql.append(" GROUP BY M1.operation_group_master_id");
return rawQueryGetDtoList(sql.toString(), new String[]{""+ level}, OperationGroupMasterDto.class);
}
/**
* 最後のOperationGroupMasterレベル取得
* @return
*/
public Integer getLastGroupLevel() {
return rawQueryGetInt("SELECT MAX(operation_group_master_level) FROM m_operation_group_master", null);
}
}
\ No newline at end of file
package jp.agentec.abook.abv.bl.data.dao;
import java.util.List;
import jp.agentec.abook.abv.bl.common.db.Cursor;
import jp.agentec.abook.abv.bl.common.db.SQLiteDatabase;
import jp.agentec.abook.abv.bl.common.db.SQLiteStatement;
import jp.agentec.abook.abv.bl.common.log.Logger;
import jp.agentec.abook.abv.bl.dto.OperationGroupMasterDto;
import jp.agentec.abook.abv.bl.dto.OperationGroupMasterOperationDto;
/**
* Created by leej on 2019/06/26.
*/
public class OperationGroupMasterOperationDao extends AbstractDao {
private static final String TAG = "OperationGroupMasterDao";
private enum QueryType {GetAllGroups, GetRootGroups, GetGroups}
/*package*/ OperationGroupMasterOperationDao() {
}
@Override
protected OperationGroupMasterOperationDto convert(Cursor cursor) {
OperationGroupMasterOperationDto dto = new OperationGroupMasterOperationDto();
int column = cursor.getColumnIndex("operation_group_master_id");
if (column != -1) {
dto.operationGroupMasterId = cursor.getInt(column);
}
column = cursor.getColumnIndex("operation_id");
if (column != -1) {
dto.operationId = cursor.getLong(column);
}
return dto;
}
/**
* 作業種別と作業のリレーションテーブル削除
* @param operationGroupMasterId
*/
public void deleteOperationGroupMasterOperation(Integer operationGroupMasterId, Long operationId) {
delete("r_operation_group_master_relation", "operation_group_master_id=? AND operation_id=?", new String[]{""+ operationGroupMasterId, ""+ operationId});
}
/**
* 作業種別と作業のリレーションテーブルのDB登録処理
* @param dto
*/
public boolean insertOperationGroupMasterOperation(OperationGroupMasterOperationDto dto) {
StringBuffer sql = new StringBuffer();
sql.append(" INSERT OR IGNORE INTO r_operation_group_master_relation ");
sql.append(" SELECT " + dto.operationGroupMasterId);
sql.append(" , " + dto.operationId);
sql.append(" FROM t_operation AS top ");
sql.append(" LEFT OUTER JOIN r_operation_group_master_relation AS rmogm ");
sql.append(" ON rmogm.operation_group_master_id = ? ");
sql.append(" AND top.operation_id <> rmogm.operation_id ");
sql.append(" WHERE top.operation_id = ? ");
sql.append(" GROUP BY rmogm.operation_group_master_id ");
SQLiteStatement stmt = null;
Logger.v(TAG, "sql=%s", sql);
try {
SQLiteDatabase db = getDatabase();
stmt = db.compileStatement(sql.toString());
stmt.bindLong(1, dto.operationGroupMasterId);
stmt.bindLong(2, dto.operationId);
return (stmt.executeInsert() > 0);
} finally {
if (stmt != null) {
stmt.close();
}
}
}
/**
* 作業種別IDで関連する作業のIDを取得
* @param operationGroupMasterId
* @return
*/
public List<Long> getOperationIds(Integer operationGroupMasterId) {
return rawQueryGetLongList("select operation_id from r_operation_group_master_relation where operation_group_master_id=?", new String[]{""+ operationGroupMasterId});
}
}
\ No newline at end of file
package jp.agentec.abook.abv.bl.data.tables;
import java.util.ArrayList;
import java.util.List;
import jp.agentec.abook.abv.bl.common.db.SQLiteDatabase;
import jp.agentec.adf.util.StringUtil;
/**
* Created by leej on 2019/06/24.
*/
public class MOperationGroupMaster extends SQLiteTableScript {
public MOperationGroupMaster() {
super();
}
@Override
public List<String> getCreateScript(int version) {
List<String> ddl = new ArrayList<String>();
StringBuffer sql = new StringBuffer();
sql.append(" CREATE TABLE m_operation_group_master ( ");
sql.append(" operation_group_master_id INTEGER NOT NULL ");
sql.append(" , operation_group_master_name VARCHAR(64) NOT NULL ");
sql.append(" , parent_operation_group_master_id INTEGER ");
sql.append(" , operation_group_master_level INTEGER NOT NULL ");
sql.append(" , PRIMARY KEY (operation_group_master_id) ");
sql.append(" ) ");
ddl.add(sql.toString());
StringUtil.clear(sql);
sql.append(" CREATE INDEX idx_group_master_1 ON m_operation_group_master ( ");
sql.append(" parent_operation_group_master_id ");
sql.append(" ) ");
ddl.add(sql.toString());
return ddl;
}
@Override
public List<String> getUpgradeScript(int oldVersion, int newVersion) {
return null;
}
@Override
public List<String> getMigrationScript(SQLiteDatabase databaseConnection, int oldVersion, int newVersion, Object... params) {
return null;
}
}
package jp.agentec.abook.abv.bl.data.tables;
import java.util.ArrayList;
import java.util.List;
import jp.agentec.abook.abv.bl.common.db.SQLiteDatabase;
/**
* Created by leej on 2019/06/25.
*/
public class ROperationGroupMasterOperation extends SQLiteTableScript {
public ROperationGroupMasterOperation() {
super();
}
@Override
public List<String> getCreateScript(int version) {
List<String> ddl = new ArrayList<String>();
StringBuffer sql = new StringBuffer();
sql.append(" CREATE TABLE r_operation_group_master_relation ( ");
sql.append(" operation_group_master_id INTEGER NOT NULL ");
sql.append(" , operation_id BIGINT NOT NULL ");
sql.append(" , PRIMARY KEY (operation_group_master_id, operation_id) ");
sql.append(" , FOREIGN KEY (operation_group_master_id) REFERENCES m_operation_group_master (operation_group_master_id) ");
sql.append(" , FOREIGN KEY (operation_id) REFERENCES t_operation (operation_id)");
sql.append(" ) ");
ddl.add(sql.toString());
return ddl;
}
@Override
public List<String> getUpgradeScript(int oldVersion, int newVersion) {
return null;
}
@Override
public List<String> getMigrationScript(SQLiteDatabase databaseConnection, int oldVersion, int newVersion, Object... params) {
return null;
}
}
\ No newline at end of file
...@@ -331,6 +331,7 @@ public class ContentRefresher { ...@@ -331,6 +331,7 @@ public class ContentRefresher {
try { try {
// サーバー通信でプロジェクト取得 // サーバー通信でプロジェクト取得
operationLogic.initializeOperations(); operationLogic.initializeOperations();
} catch (Exception e1) { } catch (Exception e1) {
Logger.e(TAG, e1); Logger.e(TAG, e1);
e = e1; e = e1;
......
package jp.agentec.abook.abv.bl.dto;
import java.util.List;
/**
* Created by leej on 2019/06/25.
*/
public class OperationGroupMasterDto extends AbstractDto {
public int operationGroupMasterId; // 作業種別ID
public String operationGroupMasterName; // 作業種別名称
public int parentOperationGroupMasterId; // 作業種別の親階層ID
public int operationGroupMasterLevel; // 作業種別の階層レベル
public int operationCount = 0; // 作業種別に紐づく作業数
public List<OperationGroupMasterOperationDto> operationGroupMasterOperationDtoList; // 作業種別に紐づく作業Dto
public OperationGroupMasterDto() {
}
@Override
public Object[] getInsertValues() {
return new Object[]{operationGroupMasterId, operationGroupMasterName, parentOperationGroupMasterId, operationGroupMasterLevel};
}
@Override
public Object[] getUpdateValues() {
return new Object[]{operationGroupMasterName, parentOperationGroupMasterId, operationGroupMasterLevel, operationGroupMasterId};
}
@Override
public String[] getKeyValues() {
return new String[]{""+ operationGroupMasterId};
}
}
\ No newline at end of file
package jp.agentec.abook.abv.bl.dto;
/**
* Created by leej on 2019/06/25.
*/
public class OperationGroupMasterOperationDto extends AbstractDto {
// 作業種別ID
public Integer operationGroupMasterId;
// 作業ID
public Long operationId;
@Override
public Object[] getInsertValues() {
return new Object[]{operationGroupMasterId, operationId};
}
@Override
public String[] getKeyValues() {
return new String[]{""+ operationGroupMasterId};
}
}
\ No newline at end of file
package jp.agentec.abook.abv.bl.dto.comparator;
import java.util.Comparator;
import jp.agentec.abook.abv.bl.dto.OperationGroupMasterDto;
/**
* Created by leej on 2019/06/28.
*/
public class OperationGroupMasterLevelComparator implements Comparator<OperationGroupMasterDto> {
@Override
public int compare(OperationGroupMasterDto dto1, OperationGroupMasterDto dto2) {
int operationGroupMasterLevel1 = dto1.operationGroupMasterLevel;
int operationGroupMasterLevel2 = dto2.operationGroupMasterLevel;
int result;
if (operationGroupMasterLevel1 > operationGroupMasterLevel2) {
result = 1;
} else if(operationGroupMasterLevel1 == operationGroupMasterLevel2) {
result = 0;
} else {
result = -1;
}
return result;
}
}
\ No newline at end of file
...@@ -79,19 +79,28 @@ public class OperationLogic extends AbstractLogic { ...@@ -79,19 +79,28 @@ public class OperationLogic extends AbstractLogic {
private ContentLogic mContentLogic = AbstractLogic.getLogic(ContentLogic.class); private ContentLogic mContentLogic = AbstractLogic.getLogic(ContentLogic.class);
private OperationGroupMasterLogic mOperationGroupMasterLogic = AbstractLogic.getLogic(OperationGroupMasterLogic.class);
private PushMessageDao mPushMessageDao = AbstractDao.getDao(PushMessageDao.class); private PushMessageDao mPushMessageDao = AbstractDao.getDao(PushMessageDao.class);
private TaskWorkerGroupDao mTaskWorkerGroupDao = AbstractDao.getDao(TaskWorkerGroupDao.class); private TaskWorkerGroupDao mTaskWorkerGroupDao = AbstractDao.getDao(TaskWorkerGroupDao.class);
/**
* 作業に関連する情報取得(API通信で取得して、DB保存処理)
* @throws AcmsException
* @throws NetworkDisconnectedException
*/
public void initializeOperations() throws AcmsException, NetworkDisconnectedException { public void initializeOperations() throws AcmsException, NetworkDisconnectedException {
// 作業グループリスト取得 // 作業グループリスト取得
setWorkingGroupList(); setWorkingGroupList();
// プロジェクト一覧取得し、登録・更新・削除する // 作業一覧取得し、登録・更新・削除する
retrieveServerOperation(); retrieveServerOperation();
// 作業種別・作業種別に紐づいた作業IDを取得
mOperationGroupMasterLogic.setOperationGroupMaster();
} }
/** /**
* プロジェクト一覧取得し、登録・更新・削除する * 作業一覧取得し、登録・更新・削除する
* *
* @throws AcmsException * @throws AcmsException
* @throws NetworkDisconnectedException * @throws NetworkDisconnectedException
...@@ -105,12 +114,11 @@ public class OperationLogic extends AbstractLogic { ...@@ -105,12 +114,11 @@ public class OperationLogic extends AbstractLogic {
for (OperationDto serverOperationDto : serverOperations) { for (OperationDto serverOperationDto : serverOperations) {
// 登録フラグ // 登録フラグ
boolean insertFlg = true; boolean insertFlg = true;
for (OperationDto localProjcetDto : localOperations) { for (OperationDto localOperationDto : localOperations) {
if (serverOperationDto.operationId.equals(localProjcetDto.operationId)) { if (serverOperationDto.operationId.equals(localOperationDto.operationId)) {
//update //update
serverOperationDto.needSyncFlg = serverOperationDto.equalsLastEdit(localProjcetDto) ? localProjcetDto.needSyncFlg : true; serverOperationDto.needSyncFlg = serverOperationDto.equalsLastEdit(localOperationDto) ? localOperationDto.needSyncFlg : true;
List<Long> localOperationContentIds = mOperationContentDao.getContentIds(serverOperationDto.operationId); List<Long> localOperationContentIds = mOperationContentDao.getContentIds(serverOperationDto.operationId);
boolean operationContentFlg = false;
for (OperationContentDto operationContentDto : serverOperationDto.operationContentDtoList) { for (OperationContentDto operationContentDto : serverOperationDto.operationContentDtoList) {
if (localOperationContentIds == null || localOperationContentIds.size() == 0) { if (localOperationContentIds == null || localOperationContentIds.size() == 0) {
// insert // insert
...@@ -129,7 +137,7 @@ public class OperationLogic extends AbstractLogic { ...@@ -129,7 +137,7 @@ public class OperationLogic extends AbstractLogic {
if (localOperationContentIds != null) { if (localOperationContentIds != null) {
// 関連資料の削除処理 // 関連資料の削除処理
for (Long deleteContentId : localOperationContentIds) { for (Long deleteContentId : localOperationContentIds) {
mOperationContentDao.deleteOperationContent(localProjcetDto.operationId, deleteContentId); mOperationContentDao.deleteOperationContent(localOperationDto.operationId, deleteContentId);
} }
} }
...@@ -195,7 +203,7 @@ public class OperationLogic extends AbstractLogic { ...@@ -195,7 +203,7 @@ public class OperationLogic extends AbstractLogic {
deleteListDtoArray.add(localProjcetDto); deleteListDtoArray.add(localProjcetDto);
} }
} }
// サーバーから取得したプロジェクト情報がローカルに存在しないので削除する // サーバーから取得した作業情報がローカルに存在しないので削除する
for (OperationDto deleteOperationDto : deleteListDtoArray) { for (OperationDto deleteOperationDto : deleteListDtoArray) {
List<TaskDto> taskDtoList = mTaskDao.selectAllTaskByOperationId(deleteOperationDto.operationId); List<TaskDto> taskDtoList = mTaskDao.selectAllTaskByOperationId(deleteOperationDto.operationId);
List<Long> contentIds = mOperationContentDao.getContentIds(deleteOperationDto.operationId); List<Long> contentIds = mOperationContentDao.getContentIds(deleteOperationDto.operationId);
...@@ -1033,9 +1041,9 @@ public class OperationLogic extends AbstractLogic { ...@@ -1033,9 +1041,9 @@ public class OperationLogic extends AbstractLogic {
* @param searchEndDateStr * @param searchEndDateStr
* @return * @return
*/ */
public List<OperationDto> getRefreshOperation(String searchWord, String searchStartDateStr, String searchEndDateStr, String reportTypeStr) { public List<OperationDto> getRefreshOperation(String searchWord, String searchStartDateStr, String searchEndDateStr, String reportTypeStr, Integer operationGroupMasterId) {
List<OperationDto> operationDtoList; List<OperationDto> operationDtoList;
operationDtoList = mOperationDao.getOperations(searchWord, searchStartDateStr, searchEndDateStr, reportTypeStr); operationDtoList = mOperationDao.getOperations(searchWord, searchStartDateStr, searchEndDateStr, reportTypeStr, operationGroupMasterId);
for (OperationDto operationDto : operationDtoList) { for (OperationDto operationDto : operationDtoList) {
// 作業送信フラグが存在する場合またはホットスポット更新フラグが存在する場合、needSyncFlgをtrueにセット // 作業送信フラグが存在する場合またはホットスポット更新フラグが存在する場合、needSyncFlgをtrueにセット
if (mTaskReportDao.isExistSendTaskData(operationDto.operationId) || mTaskReportDao.isExistUpdateTargetHotSpotTaskData(operationDto.operationId)) { if (mTaskReportDao.isExistSendTaskData(operationDto.operationId) || mTaskReportDao.isExistUpdateTargetHotSpotTaskData(operationDto.operationId)) {
......
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
<item
android:state_pressed="true"
android:drawable="@drawable/ic_show_list_off"/>
<item
android:drawable="@drawable/ic_show_list_on"/>
</selector>
\ No newline at end of file
...@@ -117,6 +117,7 @@ ...@@ -117,6 +117,7 @@
<string name="password_condition">半角英数字,記号(-_)のみ\n6文字以上16文字以下\n英数字両方を利用する\n同じ文字を3文字以上連続して使用しない\n前回パスワードに使った文字は4文字以上使用しない。</string> <string name="password_condition">半角英数字,記号(-_)のみ\n6文字以上16文字以下\n英数字両方を利用する\n同じ文字を3文字以上連続して使用しない\n前回パスワードに使った文字は4文字以上使用しない。</string>
<string name="no_content_need_refresh">該当資料は存在しないか、閲覧権限の無い資料です。</string> <string name="no_content_need_refresh">該当資料は存在しないか、閲覧権限の無い資料です。</string>
<string name="content_num">No.</string> <string name="content_num">No.</string>
<string name="no_child">これより下はありません。</string>
<string name="no_content_history">閲覧履歴がありません。</string> <string name="no_content_history">閲覧履歴がありません。</string>
<string name="contractor">事業者</string> <string name="contractor">事業者</string>
<string name="showPassword">パスワードを表示する</string> <string name="showPassword">パスワードを表示する</string>
...@@ -517,6 +518,7 @@ ...@@ -517,6 +518,7 @@
<string name="msg_help_list_report_add">新たに報告を追加することができます。</string> <string name="msg_help_list_report_add">新たに報告を追加することができます。</string>
<string name="msg_help_360_move">このボタンを押すと作業コードラベルを移動させることができるようになります。</string> <string name="msg_help_360_move">このボタンを押すと作業コードラベルを移動させることができるようになります。</string>
<string name="msg_help_360_touch">このボタンを押すと作業コードボタンのタップが可能になり、報告できるようになります。</string> <string name="msg_help_360_touch">このボタンを押すと作業コードボタンのタップが可能になり、報告できるようになります。</string>
<!-- 1.0.1 Resource Pattern 1 --> <!-- 1.0.1 Resource Pattern 1 -->
<!-- 1.9.0.0--> <!-- 1.9.0.0-->
<string name="meetingroom_setting_1">会議室設定(1)</string> <string name="meetingroom_setting_1">会議室設定(1)</string>
......
...@@ -118,6 +118,7 @@ ...@@ -118,6 +118,7 @@
<string name="password_condition">영문, 숫자,기호(-_)만 입력\n6문자이상16문자이하\n영문,숫자 혼합 사용\n동일 문자 3문자 연속 사용금지\n이전 패스워드랑 연속 4문자 이상 같은 문자 사용 금지</string> <string name="password_condition">영문, 숫자,기호(-_)만 입력\n6문자이상16문자이하\n영문,숫자 혼합 사용\n동일 문자 3문자 연속 사용금지\n이전 패스워드랑 연속 4문자 이상 같은 문자 사용 금지</string>
<string name="no_content_need_refresh">해당 자료는 존재하지 않거나 열람권한이 없는 자료입니다.</string> <string name="no_content_need_refresh">해당 자료는 존재하지 않거나 열람권한이 없는 자료입니다.</string>
<string name="content_num">No.</string> <string name="content_num">No.</string>
<string name="no_child">이 아래로는 데이터가 없습니다.</string>
<string name="no_content_history">열람 이력이 없습니다.</string> <string name="no_content_history">열람 이력이 없습니다.</string>
<string name="contractor">사업자</string> <string name="contractor">사업자</string>
<string name="showPassword">패스워드를 표시</string> <string name="showPassword">패스워드를 표시</string>
...@@ -634,6 +635,7 @@ ...@@ -634,6 +635,7 @@
<string name="msg_help_report_task_director_main_1">지시자가 등록한 내용을 표시합니다.</string> <string name="msg_help_report_task_director_main_1">지시자가 등록한 내용을 표시합니다.</string>
<string name="msg_help_report_task_director_input_1">작업보고화면을 표시합니다.</string> <string name="msg_help_report_task_director_input_1">작업보고화면을 표시합니다.</string>
<!-- 1.0.1 Resource Pattern 1 -->
<string name="title_permission_dialog_1">애플리케이션권한(1)</string> <string name="title_permission_dialog_1">애플리케이션권한(1)</string>
<string name="msg_permission_dialog_storage_update_1">앱을 버젼업하기 위해서는 외부스트레지 이용권한이 필요합니다. \n앱설정화면으로 이동합니다.(1)</string> <string name="msg_permission_dialog_storage_update_1">앱을 버젼업하기 위해서는 외부스트레지 이용권한이 필요합니다. \n앱설정화면으로 이동합니다.(1)</string>
<string name="msg_permission_dialog_location_1">위치정보이용권한이 필요합니다.\n앱설정화면으로 이동합니다.(1)</string> <string name="msg_permission_dialog_location_1">위치정보이용권한이 필요합니다.\n앱설정화면으로 이동합니다.(1)</string>
......
...@@ -117,6 +117,7 @@ ...@@ -117,6 +117,7 @@
<string name="password_condition">Alphanumeric,-,_ only available\nfrom 6chars to 16chars\nUse both Alphabet and Number\nCannot use same 3 letters continuously\nCannot use more than 4 letters in previous password.</string> <string name="password_condition">Alphanumeric,-,_ only available\nfrom 6chars to 16chars\nUse both Alphabet and Number\nCannot use same 3 letters continuously\nCannot use more than 4 letters in previous password.</string>
<string name="no_content_need_refresh">Content not found or No authority.</string> <string name="no_content_need_refresh">Content not found or No authority.</string>
<string name="content_num">No.</string> <string name="content_num">No.</string>
<string name="no_child">No more data below.</string>
<string name="no_content_history">No reading history.</string> <string name="no_content_history">No reading history.</string>
<string name="contractor">Company</string> <string name="contractor">Company</string>
<string name="showPassword">show password</string> <string name="showPassword">show password</string>
...@@ -523,6 +524,7 @@ ...@@ -523,6 +524,7 @@
<string name="msg_help_list_report_add">You can add new reports.</string> <string name="msg_help_list_report_add">You can add new reports.</string>
<string name="msg_help_360_move">Press this button to move the work code label.</string> <string name="msg_help_360_move">Press this button to move the work code label.</string>
<string name="msg_help_360_touch">If you press this button, you will be able to touch the work code button, so you can report the work.</string> <string name="msg_help_360_touch">If you press this button, you will be able to touch the work code button, so you can report the work.</string>
<!-- 1.0.1 Resource Pattern 1 --> <!-- 1.0.1 Resource Pattern 1 -->
<!-- 1.9.0.0--> <!-- 1.9.0.0-->
<string name="meetingroom_setting_1">Meeting room setting(1)</string> <string name="meetingroom_setting_1">Meeting room setting(1)</string>
......
...@@ -31,6 +31,15 @@ ...@@ -31,6 +31,15 @@
android:onClick="onClickOperationFilterList" android:onClick="onClickOperationFilterList"
android:src="@drawable/ic_filter" /> android:src="@drawable/ic_filter" />
<ImageButton
android:id="@+id/icon_operation_group_master"
style="@style/ToolBarIcon"
android:layout_centerVertical="true"
android:layout_marginLeft="10dp"
android:layout_toRightOf="@+id/icon_filter"
android:src="@drawable/ic_filter"
android:visibility="gone"/>
<TextView <TextView
android:id="@+id/title" android:id="@+id/title"
style="@style/DialogToolBarTitle" style="@style/DialogToolBarTitle"
......
...@@ -31,6 +31,15 @@ ...@@ -31,6 +31,15 @@
android:onClick="onClickOperationFilterList" android:onClick="onClickOperationFilterList"
android:src="@drawable/ic_filter" /> android:src="@drawable/ic_filter" />
<ImageButton
android:id="@+id/icon_operation_group_master"
style="@style/ToolBarIcon"
android:layout_centerVertical="true"
android:layout_marginLeft="10dp"
android:layout_toRightOf="@+id/icon_filter"
android:src="@drawable/ic_filter"
android:visibility="gone"/>
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
......
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#ffffff"
android:gravity="center_vertical"
android:orientation="horizontal" >
<Button
android:id="@+id/btn_show_list_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/btn_show_list" />
<HorizontalScrollView
android:id="@+id/bread_crumbs_scroll_view"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" >
<LinearLayout
android:id="@+id/bread_crumbs_layout"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="horizontal" >
</LinearLayout>
</HorizontalScrollView>
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/RelativeLayout1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<ImageView
android:id="@+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_alignParentLeft="true"
android:paddingLeft="10dp"
android:paddingBottom="8dp"
android:src="@drawable/icon_folder_empty_on" />
<TextView
android:id="@+id/itemText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toRightOf="@+id/imageView1"
android:text="@string/dummy_str"
android:textColor="@color/text_select"
android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView
android:id="@+id/itemCountText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_alignParentRight="true"
android:paddingRight="30dp"
android:textSize="20sp"/>
<ImageView
android:id="@+id/nextLevel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_alignParentRight="true"
android:src="@drawable/ic_navigation_next_item"
android:visibility="gone" />
</RelativeLayout>
\ No newline at end of file
...@@ -4,6 +4,7 @@ import java.util.ArrayList; ...@@ -4,6 +4,7 @@ import java.util.ArrayList;
import jp.agentec.abook.abv.bl.common.Constant.ReportType; import jp.agentec.abook.abv.bl.common.Constant.ReportType;
import jp.agentec.abook.abv.bl.common.log.Logger; import jp.agentec.abook.abv.bl.common.log.Logger;
import jp.agentec.abook.abv.bl.dto.OperationGroupMasterDto;
import jp.agentec.abook.abv.cl.util.PreferenceUtil; import jp.agentec.abook.abv.cl.util.PreferenceUtil;
import jp.agentec.abook.abv.ui.common.appinfo.AppDefType; import jp.agentec.abook.abv.ui.common.appinfo.AppDefType;
import jp.agentec.abook.abv.ui.common.appinfo.AppDefType.DefPrefKey; import jp.agentec.abook.abv.ui.common.appinfo.AppDefType.DefPrefKey;
...@@ -13,6 +14,7 @@ import jp.agentec.adf.util.StringUtil; ...@@ -13,6 +14,7 @@ import jp.agentec.adf.util.StringUtil;
import android.content.Context; import android.content.Context;
import java.util.List; import java.util.List;
import java.util.Stack;
public class ABVUIDataCache { public class ABVUIDataCache {
private static final String TAG = "ABVUIDataCache"; private static final String TAG = "ABVUIDataCache";
...@@ -22,6 +24,9 @@ public class ABVUIDataCache { ...@@ -22,6 +24,9 @@ public class ABVUIDataCache {
// ホーム画面項目 // ホーム画面項目
private int viewMode; // パンネル、リスト形式 private int viewMode; // パンネル、リスト形式
// 作業種別絞り込み用のスタック
public Stack<OperationGroupMasterDto> operationGroupMasterStack;
private ArrayList<Integer> mReportTypes; private ArrayList<Integer> mReportTypes;
public long lastUpdateTime = -1; public long lastUpdateTime = -1;
...@@ -50,8 +55,10 @@ public class ABVUIDataCache { ...@@ -50,8 +55,10 @@ public class ABVUIDataCache {
init(); init();
} }
// 初期状態
private void init() { private void init() {
viewMode = loadViewMode(); viewMode = loadViewMode();
operationGroupMasterStack = new Stack<>();
} }
public long saveLastUpdateTime() { public long saveLastUpdateTime() {
...@@ -89,6 +96,48 @@ public class ABVUIDataCache { ...@@ -89,6 +96,48 @@ public class ABVUIDataCache {
} }
/** /**
* xmlにファイル書き込みされた
* 通常・作業種別のモード切り替えの値を取得
* @return
*/
public int getOperationGroupMasterMode() {
return PreferenceUtil.getUserPref(context, UserPrefKey.OPERATION_GROUP_MASERT_MODE, 0);
}
/**
* 通常・作業種別のモード切り替えの値をxmlにファイル書き込みする
* @param operationGroupMasterMode
*/
public void setOperationGroupMasterMode(int operationGroupMasterMode) {
PreferenceUtil.putUserPref(context, UserPrefKey.OPERATION_GROUP_MASERT_MODE, operationGroupMasterMode);
}
/**
* xmlに書き込みされた作業種別IDを取得
* @return
*/
public int getOperationGroupMasterId() {
return PreferenceUtil.getUserPref(context, UserPrefKey.OPERATION_GROUP_MASERT_ID, 0);
}
/**
* xmlに作業種別IDをファイル書き込みする
* @param operationGroupMasterId
*/
public void setOperationGroupMasterId(int operationGroupMasterId) {
PreferenceUtil.putUserPref(context, UserPrefKey.OPERATION_GROUP_MASERT_ID, operationGroupMasterId);
}
/**
* 保持していた作業種別のデータをクリアする
*/
public void clearOperationGroupMaster() {
setOperationGroupMasterMode(AppDefType.OperationGroupMasterMode.NO);
setOperationGroupMasterId(0);
operationGroupMasterStack.clear();
}
/**
* コンテンツビューからコンテンツビューへ * コンテンツビューからコンテンツビューへ
* 戻る時のコンテンツIDとページのセット * 戻る時のコンテンツIDとページのセット
* @param contentId * @param contentId
......
...@@ -11,6 +11,12 @@ public interface AppDefType { ...@@ -11,6 +11,12 @@ public interface AppDefType {
int PANEL = 0; int PANEL = 0;
int LIST = 1; int LIST = 1;
} }
// 作業種別モードフラグ
interface OperationGroupMasterMode {
int NO = 0;
int YES = 1;
}
interface DefPrefKey { interface DefPrefKey {
String REPEATABLE_PLAY = "repeatablePlay"; String REPEATABLE_PLAY = "repeatablePlay";
...@@ -56,6 +62,8 @@ public interface AppDefType { ...@@ -56,6 +62,8 @@ public interface AppDefType {
String OPERATION_REPORT_TYPES = "operationReportTypes"; String OPERATION_REPORT_TYPES = "operationReportTypes";
String RESOURCE_PATTERN_TYPE = "resourcePatternType"; // 文言リソースパターン String RESOURCE_PATTERN_TYPE = "resourcePatternType"; // 文言リソースパターン
String OPERATION_GROUP_MASERT_MODE = "operation_group_master"; // 通常・作業種別モード(画面)
String OPERATION_GROUP_MASERT_ID = "operation_group_master_id"; // 作業種別のID
} }
/** /**
......
package jp.agentec.abook.abv.ui.home.adapter;
import java.util.ArrayList;
import jp.agentec.abook.abv.bl.common.log.Logger;
import jp.agentec.abook.abv.launcher.android.R;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.TextView;
public class HierarchyOperationGroupListAdapter extends BaseAdapter {
private static LayoutInflater mInflater = null;
private ArrayList<String> mNameList = new ArrayList<>();
private boolean[] mHaveChildFlags;
private int[] mOperationCounts;
public HierarchyOperationGroupListAdapter(Context context, ArrayList<String> nameList, boolean[] haveChildFlags, int[] operationCounts) {
mInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
mNameList = nameList;
mHaveChildFlags = haveChildFlags;
mOperationCounts = operationCounts;
}
@Override
public int getCount() {
return mNameList.size();
}
@Override
public Object getItem(int position) {
return mNameList.get(position);
}
@Override
public long getItemId(int position) {
return position;
}
public void remove(int position) {
mNameList.remove(position);
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
ViewHolder holder;
if (null == convertView) {
convertView = mInflater.inflate(R.layout.item_popup_list_item, null);
holder = new ViewHolder();
holder.title = (TextView) convertView.findViewById(R.id.itemText);
holder.nextLevel = (ImageView) convertView.findViewById(R.id.nextLevel);
holder.itemCount = (TextView) convertView.findViewById(R.id.itemCountText);
convertView.setTag(holder);
} else {
holder = (ViewHolder) convertView.getTag();
}
// タイトル
holder.title.setText((String)getItem(position));
// 子作業種別がある場合、「>」を表示
if (mHaveChildFlags[position]) {
holder.nextLevel.setVisibility(View.VISIBLE);
}
// 作業数
holder.itemCount.setText("" + mOperationCounts[position]);
return convertView;
}
static class ViewHolder {
TextView title;
ImageView nextLevel;
TextView itemCount;
}
}
package jp.agentec.abook.abv.ui.home.helper;
import android.graphics.Color;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;
import android.widget.HorizontalScrollView;
import android.widget.LinearLayout;
import java.util.ArrayList;
import java.util.List;
import java.util.Stack;
import jp.agentec.abook.abv.launcher.android.R;
import jp.agentec.abook.abv.ui.home.activity.OperationListActivity;
import jp.agentec.abook.abv.ui.home.view.BreadCrumbButton;
import static jp.agentec.abook.abv.cl.util.PreferenceUtil.getUserPref;
/**
* 階層構造をロジックの共通処理を実装
* @author jang
*
*/
public abstract class HierarchyOperationListHelper<StackObject> extends OperationListHelper implements OnClickListener {
private final int MP = LayoutParams.MATCH_PARENT;
private final int WP = LayoutParams.WRAP_CONTENT;
protected Stack<StackObject> stack;
private LinearLayout mHierarchyContentLayout = null;
private LinearLayout mBreadCrumbsLayout = null;
private ViewGroup mOperationListView = null;
protected ArrayList<BreadCrumbButton> breadCrumbList = null;
private HorizontalScrollView panList;
/**
* 階層構造を持つ親クラス
* @param appActivity
*/
public HierarchyOperationListHelper(OperationListActivity appActivity) {
super(appActivity);
mHierarchyContentLayout = new LinearLayout(appActivity);
mHierarchyContentLayout.setOrientation(LinearLayout.VERTICAL);
View v = new View(appActivity);
v.setBackgroundColor(Color.GRAY);
LinearLayout.LayoutParams vlp = new LinearLayout.LayoutParams(MP, 1);
mHierarchyContentLayout.addView(v, vlp);
LinearLayout panListLayout = (LinearLayout) LayoutInflater.from(appActivity).inflate(R.layout.content_breadcrumb_layout, null);
// 階層構造ビューを表示するボタン
panListLayout.findViewById(R.id.btn_show_list_view).setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
mAppActivity.showOperationGroupMasterDialog(true,false);
}
});
// パンくずのスクロールを作成
panList = (HorizontalScrollView) panListLayout.findViewById(R.id.bread_crumbs_scroll_view);
mBreadCrumbsLayout = (LinearLayout) panListLayout.findViewById(R.id.bread_crumbs_layout);
breadCrumbList = new ArrayList<>();
// パンくずリストを追加
mHierarchyContentLayout.addView(panListLayout, new LinearLayout.LayoutParams(MP, WP));
}
public void addBreadCrumbs(String name) {
addBreadCrumbs(name, stack.size() + 1);
}
public void addBreadCrumbs(String name, int level) {
BreadCrumbButton bcb = new BreadCrumbButton(mAppActivity, name);
bcb.level = level;
breadCrumbList.add(bcb);
bcb.setOnClickListener(this);
LayoutParams l = new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
mBreadCrumbsLayout.addView(bcb, l);
// 右側へスクロールさせる
panList.post(new Runnable() {
@Override
public void run() {
panList.fullScroll(View.FOCUS_RIGHT);
}
});
}
protected void removeBreadCrumbs(View v) {
mBreadCrumbsLayout.removeView(v);
if (v instanceof BreadCrumbButton) {
breadCrumbList.remove(v);
}
}
/**
* 作業一覧のViewGroup取得
* @return
*/
@Override
public ViewGroup getOperationView() {
if (mOperationListView != null) {
ViewGroup parent = (ViewGroup) mOperationListView.getParent();
if (parent != null) {
parent.removeView(mOperationListView);
}
}
mOperationListView = super.getOperationView();
LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(MP, 1);
lp.weight = 1;
mHierarchyContentLayout.addView(mOperationListView, 0, lp);
return mHierarchyContentLayout;
}
/**
* HorizontalScrollViewパンくずボタンをクリック時に呼ばれるメソッド
*/
@Override
public void onClick(View v) {
BreadCrumbButton button = (BreadCrumbButton) v;
int popCount = mBreadCrumbsLayout.getChildCount() - button.level;
if (popCount > 0) {
popList(popCount);
}
}
/**
* 階層スタックの現在のサイズを返します
*
* @return
*/
public int getStackSize() {
return stack.size();
}
/**
* 指定した階層分上のリストへ移動する
*
* @param popCount いくつ上の階層を表示するか指定します。
*/
abstract public void popList(int popCount);
/**
* 一つ下の階層のリストへ移動する
*
* @param stackObject
*/
abstract public void pushList(StackObject stackObject);
/**
* 子階層の一覧を取得します
* @return
*/
abstract public List<StackObject> getChildList();
/**
* 現在の階層の名前を取得します
* @return
*/
abstract public String getPeekName();
/**
* 一つ上の階層の名前を取得します
* @return
*/
abstract public String getPrePeekName();
}
package jp.agentec.abook.abv.ui.home.helper;
import java.util.List;
import jp.agentec.abook.abv.bl.common.log.Logger;
import jp.agentec.abook.abv.bl.dto.ContentDto;
import jp.agentec.abook.abv.bl.dto.OperationDto;
import jp.agentec.abook.abv.bl.logic.AbstractLogic;
import jp.agentec.abook.abv.bl.logic.OperationLogic;
import jp.agentec.abook.abv.ui.common.appinfo.AppDefType;
import jp.agentec.abook.abv.ui.home.activity.OperationListActivity;
import static jp.agentec.abook.abv.cl.util.PreferenceUtil.getUserPref;
/**
* Created by leej on 2019/06/24.
*/
public class HomeOperationListHelper extends OperationListHelper {
private static final String TAG = "HomeOperationListHelper";
public HomeOperationListHelper(OperationListActivity activity) {
super(activity);
}
@Override
protected List<OperationDto> findOperationList() throws Exception {
String reportTypeStr = getUserPref(mAppActivity, AppDefType.UserPrefKey.OPERATION_REPORT_TYPES, null);
return operationLogic.getRefreshOperation(mAppActivity.mSearchWord, mAppActivity.mStartDateStr, mAppActivity.mEndDateStr, reportTypeStr, null);
}
}
package jp.agentec.abook.abv.ui.home.helper;
import java.util.ArrayList;
import java.util.List;
import jp.agentec.abook.abv.bl.common.log.Logger;
import jp.agentec.abook.abv.bl.data.dao.AbstractDao;
import jp.agentec.abook.abv.bl.data.dao.OperationGroupMasterDao;
import jp.agentec.abook.abv.bl.dto.OperationDto;
import jp.agentec.abook.abv.bl.dto.OperationGroupMasterDto;
import jp.agentec.abook.abv.bl.logic.AbstractLogic;
import jp.agentec.abook.abv.bl.logic.OperationGroupMasterLogic;
import jp.agentec.abook.abv.launcher.android.ABVApplication;
import jp.agentec.abook.abv.ui.common.appinfo.AppDefType;
import jp.agentec.abook.abv.ui.home.activity.OperationListActivity;
import jp.agentec.adf.util.CollectionUtil;
import static jp.agentec.abook.abv.cl.util.PreferenceUtil.getUserPref;
public class OperationGroupMasterListHelper extends HierarchyOperationListHelper<OperationGroupMasterDto> {
private static final String TAG = "OperationGroupMasterListHelper";
private OperationGroupMasterDao mOperationGroupMasterDao = AbstractDao.getDao(OperationGroupMasterDao.class);
private OperationGroupMasterLogic mOperationGroupMasterLogic = AbstractLogic.getLogic(OperationGroupMasterLogic.class);
public OperationGroupMasterListHelper(OperationListActivity appActivity) {
super(appActivity);
// キャッシュのスタックを利用する
stack = ABVApplication.getABVUIDataCache(mAppActivity).operationGroupMasterStack;
if (stack.size() == 0) {
// スタックが空の場合、全体を入れる
OperationGroupMasterDto operationGroupMasterDto;
if (mAppActivity.getOperationGroupMasterId() == 0) {
// 最上位階層をセット
operationGroupMasterDto = mOperationGroupMasterDao.getTopOperationGroupMaster();
if (operationGroupMasterDto != null) {
pushList(operationGroupMasterDto);
}
} else {
// 前回開いた際のIDでセット
List<OperationGroupMasterDto> operationGroupMasterDtoList = mOperationGroupMasterLogic.test(mAppActivity.getOperationGroupMasterId());
if (CollectionUtil.isNotEmpty(operationGroupMasterDtoList)) {
for (OperationGroupMasterDto dto : operationGroupMasterDtoList) {
pushList(dto);
}
}
}
} else {
// スタックに積まれている分だけパンくずボタンを作成
for (int i = 0; i < stack.size(); i++) {
OperationGroupMasterDto groupDto = stack.get(i);
addBreadCrumbs(groupDto.operationGroupMasterName, i + 1);
}
}
}
@Override
protected List<OperationDto> findOperationList() throws Exception {
OperationGroupMasterDto peekOperationGroupMasterDto = stack.peek();
String reportTypeStr = getUserPref(mAppActivity, AppDefType.UserPrefKey.OPERATION_REPORT_TYPES, null);
Integer operationGroupMasterId;
// operationGroupMasterIdのデータが存在しないと
if (mOperationGroupMasterDao.isExistOperationGroupMaster(peekOperationGroupMasterDto.operationGroupMasterId)) {
operationGroupMasterId = peekOperationGroupMasterDto.operationGroupMasterId;
} else {
// 表示する作業種別が既に削除された場合、最上位階層に戻る(リセット)
popList(breadCrumbList.size() - 1);
// 保存されたoperationGroupMasterIDを0にセット
mAppActivity.setOperationGroupMasterId(0);
//TODO 最上位階層のID取得
operationGroupMasterId = 0;
}
return operationLogic.getRefreshOperation(mAppActivity.mSearchWord, mAppActivity.mStartDateStr, mAppActivity.mEndDateStr, reportTypeStr, operationGroupMasterId);
}
@Override
public void popList(int popCount) {
for (int i = 0; i < popCount; i++) {
stack.pop();
// パンくずリスト削除
removeBreadCrumbs(breadCrumbList.get(breadCrumbList.size() - 1));
}
refreshList();
}
@Override
public void pushList(OperationGroupMasterDto operationGroupMasterDto) {
if (operationGroupMasterDto == null) {
Logger.w(TAG, "[pushList] groupDto is null");
return;
}
// パンくずリスト追加
addBreadCrumbs(operationGroupMasterDto.operationGroupMasterName);
// ID保存
mAppActivity.setOperationGroupMasterId(operationGroupMasterDto.operationGroupMasterId);
stack.push(operationGroupMasterDto);
refreshList();
}
@Override
public String getPrePeekName() {
String groupName = "";
if (stack.size() > 1) {
groupName = stack.get(stack.size() - 2).operationGroupMasterName;
}
return groupName;
}
@Override
public String getPeekName() {
String groupName = "";
if (stack.size() > 0) {
groupName = stack.peek().operationGroupMasterName;
}
return groupName;
}
@Override
public List<OperationGroupMasterDto> getChildList() {
OperationGroupMasterDto peekOperationGroupMasterDto = stack.peek();
return getChildList(peekOperationGroupMasterDto.operationGroupMasterId);
}
public List<OperationGroupMasterDto> getChildList(Integer operationGroupMasterId) {
return mOperationGroupMasterDao.getOperationGroupMasterChildList(operationGroupMasterId);
}
}
package jp.agentec.abook.abv.ui.home.helper; package jp.agentec.abook.abv.ui.home.helper;
import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.GridView; import android.widget.GridView;
import android.widget.ListView; import android.widget.ListView;
import android.widget.Toast;
import com.handmark.pulltorefresh.library.PullToRefreshBase; import com.handmark.pulltorefresh.library.PullToRefreshBase;
import com.handmark.pulltorefresh.library.PullToRefreshGridView; import com.handmark.pulltorefresh.library.PullToRefreshGridView;
...@@ -14,6 +11,7 @@ import com.handmark.pulltorefresh.library.PullToRefreshListView; ...@@ -14,6 +11,7 @@ import com.handmark.pulltorefresh.library.PullToRefreshListView;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import jp.agentec.abook.abv.bl.common.exception.NetworkDisconnectedException;
import jp.agentec.abook.abv.bl.common.log.Logger; import jp.agentec.abook.abv.bl.common.log.Logger;
import jp.agentec.abook.abv.bl.dto.OperationDto; import jp.agentec.abook.abv.bl.dto.OperationDto;
import jp.agentec.abook.abv.bl.logic.AbstractLogic; import jp.agentec.abook.abv.bl.logic.AbstractLogic;
...@@ -24,7 +22,6 @@ import jp.agentec.abook.abv.ui.common.appinfo.AppDefType; ...@@ -24,7 +22,6 @@ import jp.agentec.abook.abv.ui.common.appinfo.AppDefType;
import jp.agentec.abook.abv.ui.common.appinfo.AppDefType.ViewMode; import jp.agentec.abook.abv.ui.common.appinfo.AppDefType.ViewMode;
import jp.agentec.abook.abv.ui.common.constant.ErrorCode; import jp.agentec.abook.abv.ui.common.constant.ErrorCode;
import jp.agentec.abook.abv.ui.common.constant.ErrorMessage; import jp.agentec.abook.abv.ui.common.constant.ErrorMessage;
import jp.agentec.abook.abv.ui.common.util.ABVToastUtil;
import jp.agentec.abook.abv.ui.common.util.PatternStringUtil; import jp.agentec.abook.abv.ui.common.util.PatternStringUtil;
import jp.agentec.abook.abv.ui.home.activity.OperationListActivity; import jp.agentec.abook.abv.ui.home.activity.OperationListActivity;
import jp.agentec.abook.abv.ui.home.adapter.AbstractOperationAdapter; import jp.agentec.abook.abv.ui.home.adapter.AbstractOperationAdapter;
...@@ -38,13 +35,13 @@ import static jp.agentec.abook.abv.cl.util.PreferenceUtil.getUserPref; ...@@ -38,13 +35,13 @@ import static jp.agentec.abook.abv.cl.util.PreferenceUtil.getUserPref;
* Created by leej on 2019/03/06. * Created by leej on 2019/03/06.
*/ */
public class OperationListHelper { public abstract class OperationListHelper {
private static final String TAG = "OperationListHelper"; private static final String TAG = "OperationListHelper";
private OperationListActivity mAppActivity; protected OperationListActivity mAppActivity;
private AbstractOperationAdapter mAdapter; private AbstractOperationAdapter mAdapter;
private PullToRefreshListView mPullToRefreshListView; private PullToRefreshListView mPullToRefreshListView;
private PullToRefreshGridView mPullToRefreshGridView; private PullToRefreshGridView mPullToRefreshGridView;
private OperationLogic mOperationLogic = AbstractLogic.getLogic(OperationLogic.class); protected OperationLogic operationLogic = AbstractLogic.getLogic(OperationLogic.class);
private List<OperationDto> operationDtoList = new ArrayList<>(); private List<OperationDto> operationDtoList = new ArrayList<>();
// スマートフォンの1行のパンネル数 // スマートフォンの1行のパンネル数
...@@ -61,10 +58,19 @@ public class OperationListHelper { ...@@ -61,10 +58,19 @@ public class OperationListHelper {
mPullToRefreshGridView = new PullToRefreshGridView(activity); mPullToRefreshGridView = new PullToRefreshGridView(activity);
} }
/**
* 作業を検索してListを返す
*
* @return
* @throws Exception
* @throws NetworkDisconnectedException
*/
abstract protected List<OperationDto> findOperationList() throws Exception;
private List<OperationDto> filterOperationList() { private List<OperationDto> filterOperationList() {
try { try {
String reportTypeStr = getUserPref(mAppActivity, AppDefType.UserPrefKey.OPERATION_REPORT_TYPES, null); operationDtoList = findOperationList();
operationDtoList = mOperationLogic.getRefreshOperation(mAppActivity.mSearchWord, mAppActivity.mStartDateStr, mAppActivity.mEndDateStr, reportTypeStr);
} catch (Exception e) { } catch (Exception e) {
Logger.e(TAG, "findOperationList", e); Logger.e(TAG, "findOperationList", e);
ErrorMessage.showErrorMessageToast(mAppActivity.getApplicationContext(), ErrorCode.E107); ErrorMessage.showErrorMessageToast(mAppActivity.getApplicationContext(), ErrorCode.E107);
...@@ -247,7 +253,7 @@ public class OperationListHelper { ...@@ -247,7 +253,7 @@ public class OperationListHelper {
} }
/** /**
* プロジェクトの件数取得 * 作業の件数取得
* @return * @return
*/ */
public int getOperationCount() { public int getOperationCount() {
...@@ -255,7 +261,7 @@ public class OperationListHelper { ...@@ -255,7 +261,7 @@ public class OperationListHelper {
} }
/** /**
* プロジェクトリスト取得 * 作業リスト取得
* @return * @return
*/ */
public List<OperationDto> getOperationList() { public List<OperationDto> getOperationList() {
......
package jp.agentec.abook.abv.ui.home.view;
import jp.agentec.abook.abv.launcher.android.R;
import android.content.Context;
import android.graphics.Color;
import android.widget.Button;
/**
* パンくず履歴用のボタン
* @author jang
*
*/
public class BreadCrumbButton extends Button {
private BreadCrumbButton(Context context) {
super(context);
}
public BreadCrumbButton(Context context, String name) {
super(context);
this.name = name;
setText(name);
setTextColor(Color.BLACK);
setBackgroundResource(R.drawable.btn_breadcrumbs);
setPadding(10, 0, 40, 0);
}
public int level;
public long dtoId;
public String name;
}
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