Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
abook_check
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abook_android
abook_check
Commits
89ebc857
Commit
89ebc857
authored
Jun 24, 2020
by
yuichiro ogawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#38369 t_operationへのカラム追加対応
parent
b2c82cf4
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
22 additions
and
8 deletions
+22
-8
ABVJE_BL/src/jp/agentec/abook/abv/bl/acms/client/json/OperationListJSON.java
+3
-0
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/DBConnector.java
+1
-1
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/DatabaseVersions.java
+1
-0
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/dao/OperationDao.java
+10
-5
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/tables/TOperation.java
+4
-0
ABVJE_BL/src/jp/agentec/abook/abv/bl/dto/OperationDto.java
+3
-2
No files found.
ABVJE_BL/src/jp/agentec/abook/abv/bl/acms/client/json/OperationListJSON.java
View file @
89ebc857
...
@@ -60,6 +60,8 @@ public class OperationListJSON extends AcmsCommonJSON {
...
@@ -60,6 +60,8 @@ public class OperationListJSON extends AcmsCommonJSON {
public
static
final
String
OperationGroupMasterIdList
=
"operationGroupMasterIdList"
;
public
static
final
String
OperationGroupMasterIdList
=
"operationGroupMasterIdList"
;
public
static
final
String
QuickReport
=
"quickReport"
;
public
List
<
OperationDto
>
operationList
;
public
List
<
OperationDto
>
operationList
;
public
OperationListJSON
(
String
jsonString
)
throws
AcmsException
{
public
OperationListJSON
(
String
jsonString
)
throws
AcmsException
{
...
@@ -89,6 +91,7 @@ public class OperationListJSON extends AcmsCommonJSON {
...
@@ -89,6 +91,7 @@ public class OperationListJSON extends AcmsCommonJSON {
dto
.
enableReportHistory
=
operationJson
.
getInt
(
EnableReportHistory
);
// 報告履歴管理
dto
.
enableReportHistory
=
operationJson
.
getInt
(
EnableReportHistory
);
// 報告履歴管理
dto
.
enableReportEdit
=
operationJson
.
has
(
EnableReportEdit
)
?
operationJson
.
getInt
(
EnableReportEdit
)
:
0
;
// 作業編集区分
dto
.
enableReportEdit
=
operationJson
.
has
(
EnableReportEdit
)
?
operationJson
.
getInt
(
EnableReportEdit
)
:
0
;
// 作業編集区分
dto
.
enableAddReport
=
operationJson
.
has
(
EnableAddReport
)
?
operationJson
.
getInt
(
EnableAddReport
)
:
0
;
// 作業追加区分
dto
.
enableAddReport
=
operationJson
.
has
(
EnableAddReport
)
?
operationJson
.
getInt
(
EnableAddReport
)
:
0
;
// 作業追加区分
dto
.
quickReport
=
operationJson
.
getInt
(
QuickReport
);
// 作業終了更新日
// 作業終了更新日
if
(
operationJson
.
has
(
OperationLastEditDate
))
{
if
(
operationJson
.
has
(
OperationLastEditDate
))
{
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/DBConnector.java
View file @
89ebc857
...
@@ -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_2_
0
;
public
static
final
int
DatabaseVersion
=
DatabaseVersions
.
Ver1_2_
3
;
protected
SQLiteDatabase
db
=
null
;
protected
SQLiteDatabase
db
=
null
;
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/DatabaseVersions.java
View file @
89ebc857
...
@@ -5,5 +5,6 @@ public class DatabaseVersions {
...
@@ -5,5 +5,6 @@ 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
;
public
static
final
int
Ver1_1_0
=
11
;
public
static
final
int
Ver1_2_0
=
21
;
public
static
final
int
Ver1_2_0
=
21
;
public
static
final
int
Ver1_2_3
=
22
;
}
}
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/dao/OperationDao.java
View file @
89ebc857
package
jp
.
agentec
.
abook
.
abv
.
bl
.
data
.
dao
;
package
jp
.
agentec
.
abook
.
abv
.
bl
.
data
.
dao
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
...
@@ -8,7 +7,6 @@ import jp.agentec.abook.abv.bl.acms.type.OperationSortingType;
...
@@ -8,7 +7,6 @@ import jp.agentec.abook.abv.bl.acms.type.OperationSortingType;
import
jp.agentec.abook.abv.bl.common.Constant
;
import
jp.agentec.abook.abv.bl.common.Constant
;
import
jp.agentec.abook.abv.bl.common.db.Cursor
;
import
jp.agentec.abook.abv.bl.common.db.Cursor
;
import
jp.agentec.abook.abv.bl.common.log.Logger
;
import
jp.agentec.abook.abv.bl.common.log.Logger
;
import
jp.agentec.abook.abv.bl.data.SortDirection
;
import
jp.agentec.abook.abv.bl.dto.OperationDto
;
import
jp.agentec.abook.abv.bl.dto.OperationDto
;
import
jp.agentec.adf.util.DateTimeFormat
;
import
jp.agentec.adf.util.DateTimeFormat
;
import
jp.agentec.adf.util.DateTimeUtil
;
import
jp.agentec.adf.util.DateTimeUtil
;
...
@@ -113,6 +111,11 @@ public class OperationDao extends AbstractDao {
...
@@ -113,6 +111,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
;
}
}
...
@@ -187,9 +190,10 @@ public class OperationDao extends AbstractDao {
...
@@ -187,9 +190,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
());
}
}
...
@@ -210,7 +214,8 @@ public class OperationDao extends AbstractDao {
...
@@ -210,7 +214,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
;
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/tables/TOperation.java
View file @
89ebc857
...
@@ -39,6 +39,7 @@ public class TOperation extends SQLiteTableScript {
...
@@ -39,6 +39,7 @@ public class TOperation extends SQLiteTableScript {
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
(
" , 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
());
...
@@ -54,6 +55,9 @@ public class TOperation extends SQLiteTableScript {
...
@@ -54,6 +55,9 @@ public class TOperation extends SQLiteTableScript {
if
(
oldVersion
<
DatabaseVersions
.
Ver1_2_0
)
{
// カラムの追加
if
(
oldVersion
<
DatabaseVersions
.
Ver1_2_0
)
{
// カラムの追加
ddl
.
add
(
"ALTER TABLE t_operation ADD COLUMN operation_open_date DATETIME"
);
ddl
.
add
(
"ALTER TABLE t_operation ADD COLUMN operation_open_date DATETIME"
);
}
}
if
(
oldVersion
<
DatabaseVersions
.
Ver1_2_3
)
{
ddl
.
add
(
"ALTER TABLE t_operation ADD COLUMN quick_report SMALLINT NOT NULL DEFAULT 0 "
);
}
return
ddl
;
return
ddl
;
}
}
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/dto/OperationDto.java
View file @
89ebc857
...
@@ -31,6 +31,7 @@ public class OperationDto extends AbstractDto {
...
@@ -31,6 +31,7 @@ public class OperationDto extends AbstractDto {
public
int
enableReportHistory
;
// 0: 履歴無し, 1: 履歴可
public
int
enableReportHistory
;
// 0: 履歴無し, 1: 履歴可
public
int
enableReportEdit
;
// 作業編集可能区分
public
int
enableReportEdit
;
// 作業編集可能区分
public
int
enableAddReport
;
// 作業追加区分
public
int
enableAddReport
;
// 作業追加区分
public
int
quickReport
;
// 簡易帳票区分
public
List
<
OperationGroupMasterRelationDto
>
operationGroupMasterRelationDtoList
;
// 作業種別に紐づく作業Dto
public
List
<
OperationGroupMasterRelationDto
>
operationGroupMasterRelationDtoList
;
// 作業種別に紐づく作業Dto
...
@@ -48,12 +49,12 @@ public class OperationDto extends AbstractDto {
...
@@ -48,12 +49,12 @@ 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
...
...
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