Commit 371eac2b by onuma

#41843 @Form I/O帳票Android DB追加・修正

parent 1d21c8a2
...@@ -200,7 +200,8 @@ public class AcmsApis { ...@@ -200,7 +200,8 @@ public class AcmsApis {
} 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(ApiGetMasterData)) { methodName.equals(ApiGetMasterData) ||
methodName.equals(ApiOperationGroupMaster)) { // カテゴリ選択機能
apiValue = Constant.ApiValue.checkapi; apiValue = Constant.ApiValue.checkapi;
} }
......
...@@ -153,5 +153,12 @@ public interface ServiceOption { ...@@ -153,5 +153,12 @@ public interface ServiceOption {
*/ */
int OperationChangeTime = 173; int OperationChangeTime = 173;
///////////////////////////////////////////////////////////////////////////////////////////////////////
// カテゴリ選択機能
///////////////////////////////////////////////////////////////////////////////////////////////////////
/**
* 作業種別:N(通常)、Y(作業種別毎に絞り込み可能なボタン・画面表示)
*/
int OperationGroupMaster = 175;
} }
} }
\ No newline at end of file
...@@ -351,6 +351,16 @@ public class ServiceOption { ...@@ -351,6 +351,16 @@ public class ServiceOption {
ServiceOptionDto dto = getServiceOption(ServiceOptionId.OperationChangeTime); ServiceOptionDto dto = getServiceOption(ServiceOptionId.OperationChangeTime);
return dto.val; return dto.val;
} }
///////////////////////////////////////////////////////////////////////////////////////////////////////
// カテゴリ選択機能
///////////////////////////////////////////////////////////////////////////////////////////////////////
/**
* 作業種別のサービスオプション情報取得
* @return
*/
public boolean isOperationGroupMaster() {
return isServiceOptionEnable(ServiceOptionId.OperationGroupMaster);
}
} }
public void setDiffMinFromUTC(String timeZone) { public void setDiffMinFromUTC(String timeZone) {
......
...@@ -13,6 +13,7 @@ import jp.agentec.abook.abv.bl.data.tables.MAppConfig; ...@@ -13,6 +13,7 @@ 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;
...@@ -98,6 +99,12 @@ public class ABVDataOpenHelper { ...@@ -98,6 +99,12 @@ public class ABVDataOpenHelper {
// SPP通信端末管理テーブルをスクリプトに追加 // SPP通信端末管理テーブルをスクリプトに追加
iTableScripts.add(new TSppDevice()); iTableScripts.add(new TSppDevice());
///////////////////////////////////////////////////////////////////////////////////////////////////////
// カテゴリ選択機能
///////////////////////////////////////////////////////////////////////////////////////////////////////
iTableScripts.add(new MOperationGroupMaster());
return iTableScripts; return iTableScripts;
} }
......
...@@ -19,7 +19,10 @@ import jp.agentec.abook.abv.bl.common.db.SQLiteDatabase; ...@@ -19,7 +19,10 @@ 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_2; ///////////////////////////////////////////////////////////////////////////////////////////////////////
// カテゴリ選択機能
///////////////////////////////////////////////////////////////////////////////////////////////////////
public static final int DatabaseVersion = DatabaseVersions.Ver1_0_3;
protected SQLiteDatabase db = null; protected SQLiteDatabase db = null;
......
...@@ -4,5 +4,9 @@ package jp.agentec.abook.abv.bl.data; ...@@ -4,5 +4,9 @@ package jp.agentec.abook.abv.bl.data;
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_0_2 = 11; // SATO HACCP 1.0.2 public static final int Ver1_0_2 = 11; // SATO HACCP 1.0.2
///////////////////////////////////////////////////////////////////////////////////////////////////////
// カテゴリ選択機能
///////////////////////////////////////////////////////////////////////////////////////////////////////
public static final int Ver1_0_3 = 21; // @From
} }
...@@ -112,6 +112,11 @@ public class OperationDao extends AbstractDao { ...@@ -112,6 +112,11 @@ public class OperationDao extends AbstractDao {
dto.enableAddReport = cursor.getInt(column); dto.enableAddReport = cursor.getInt(column);
} }
column = cursor.getColumnIndex("quick_report");
if (column != -1) {
dto.quickReport = cursor.getInt(column);
}
return dto; return dto;
} }
...@@ -182,9 +187,10 @@ public class OperationDao extends AbstractDao { ...@@ -182,9 +187,10 @@ public class OperationDao extends AbstractDao {
+ "enable_report_update, " + "enable_report_update, "
+ "enable_report_history, " + "enable_report_history, "
+ "enable_report_edit," + "enable_report_edit,"
+ "enable_add_report) " + "enable_add_report,"
+ "quick_report) "
+ "values " + "values "
+ "(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)", + "(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)",
dto.getInsertValues()); dto.getInsertValues());
} }
...@@ -205,7 +211,8 @@ public class OperationDao extends AbstractDao { ...@@ -205,7 +211,8 @@ public class OperationDao extends AbstractDao {
+ "enable_report_update=?, " + "enable_report_update=?, "
+ "enable_report_history=?, " + "enable_report_history=?, "
+ "enable_report_edit=?, " + "enable_report_edit=?, "
+ "enable_add_report=? " + "enable_add_report=?, "
+ "quick_report=? "
+ "where operation_id=?", + "where operation_id=?",
dto.getUpdateValues()); dto.getUpdateValues());
return count > 0; return count > 0;
...@@ -341,6 +348,8 @@ public class OperationDao extends AbstractDao { ...@@ -341,6 +348,8 @@ public class OperationDao extends AbstractDao {
// カテゴリ選択機能 // カテゴリ選択機能
/////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////
// quick_report フィールドを追加
/** /**
* 作業グループに紐づく同期可能な作業リストが存在するかチェック * 作業グループに紐づく同期可能な作業リストが存在するかチェック
* @param operationGroupMasterId * @param operationGroupMasterId
......
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.abook.abv.bl.data.DatabaseVersions;
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;
}
}
...@@ -38,6 +38,11 @@ public class TOperation extends SQLiteTableScript { ...@@ -38,6 +38,11 @@ public class TOperation extends SQLiteTableScript {
sql.append(" , enable_report_history SMALLINT NOT NULL DEFAULT 0 "); sql.append(" , enable_report_history SMALLINT NOT NULL DEFAULT 0 ");
sql.append(" , enable_report_edit SMALLINT NOT NULL DEFAULT 0 "); sql.append(" , enable_report_edit SMALLINT NOT NULL DEFAULT 0 ");
sql.append(" , enable_add_report SMALLINT NOT NULL DEFAULT 0 "); sql.append(" , enable_add_report SMALLINT NOT NULL DEFAULT 0 ");
///////////////////////////////////////////////////////////////////////////////////////////////////////
// カテゴリ選択機能
///////////////////////////////////////////////////////////////////////////////////////////////////////
sql.append(" , operation_open_date DATETIME ");
sql.append(" , quick_report SMALLINT NOT NULL DEFAULT 0 ");
sql.append(" , PRIMARY KEY (operation_id) "); sql.append(" , PRIMARY KEY (operation_id) ");
sql.append(" ) "); sql.append(" ) ");
ddl.add(sql.toString()); ddl.add(sql.toString());
......
...@@ -46,16 +46,26 @@ public class OperationDto extends AbstractDto { ...@@ -46,16 +46,26 @@ public class OperationDto extends AbstractDto {
@Override @Override
public Object[] getInsertValues() { public Object[] getInsertValues() {
return new Object[] { operationId, operationName, operationDescriptions, operationStartDate, operationEndDate, operationType, reportType, lastEditDate, contentCreatingFlg, editLockFlg, needSyncFlg, reportCycle, enableReportUpdate, enableReportHistory, enableReportEdit, enableAddReport }; return new Object[] { operationId, operationName, operationDescriptions, operationStartDate, operationEndDate, operationType, reportType, lastEditDate, contentCreatingFlg, editLockFlg, needSyncFlg, reportCycle, enableReportUpdate, enableReportHistory, enableReportEdit, enableAddReport, quickReport };
} }
@Override @Override
public Object[] getUpdateValues() { public Object[] getUpdateValues() {
return new Object[] { operationName, operationDescriptions, operationStartDate, operationEndDate, operationType, reportType, lastEditDate, contentCreatingFlg, editLockFlg, needSyncFlg, reportCycle, enableReportUpdate, enableReportHistory, enableReportEdit, enableAddReport, operationId }; return new Object[] { operationName, operationDescriptions, operationStartDate, operationEndDate, operationType, reportType, lastEditDate, contentCreatingFlg, editLockFlg, needSyncFlg, reportCycle, enableReportUpdate, enableReportHistory, enableReportEdit, enableAddReport, quickReport, operationId };
} }
@Override @Override
public String[] getKeyValues() { public String[] getKeyValues() {
return new String[] { "" + operationId }; return new String[] { "" + operationId };
} }
///////////////////////////////////////////////////////////////////////////////////////////////////////
// カテゴリ選択機能
///////////////////////////////////////////////////////////////////////////////////////////////////////
// getInsertValues() getUpdateValues() も更新した
public int quickReport; // 簡易帳票区分
public List<OperationGroupMasterRelationDto> operationGroupMasterRelationDtoList; // 作業種別に紐づく作業Dto
} }
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