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
c7c962b6
Commit
c7c962b6
authored
Dec 26, 2022
by
Kazuyuki Hida
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
作業報告のロック関連を実装
parent
7adad3ac
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
67 additions
and
6 deletions
+67
-6
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/DatabaseVersions.java
+1
-1
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/dao/TaskReportDao.java
+59
-3
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/tables/TTaskReport.java
+4
-0
ABVJE_BL/src/jp/agentec/abook/abv/bl/dto/TaskReportDto.java
+3
-2
No files found.
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/DatabaseVersions.java
View file @
c7c962b6
...
...
@@ -7,5 +7,5 @@ public class DatabaseVersions {
public
static
final
int
Ver1_0_3
=
21
;
// @From カテゴリ選択機能追加
public
static
final
int
Ver1_0_4
=
31
;
// @From 作業の進捗状況を追加
public
static
final
int
Ver1_0_5
=
41
;
// @From 作業のロック、差し戻し対応
public
static
final
int
Ver1_0_6
=
51
;
// @From 作業のロック情報を追加
}
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/dao/TaskReportDao.java
View file @
c7c962b6
package
jp
.
agentec
.
abook
.
abv
.
bl
.
data
.
dao
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
jp.agentec.abook.abv.bl.common.db.Cursor
;
...
...
@@ -15,6 +17,10 @@ public class TaskReportDao extends AbstractDao {
private
static
final
String
TAG
=
"TaskReportDao"
;
private
static
final
int
REPORT_LOCKING
=
0
;
private
static
final
int
REPORT_UNLOCKED
=
1
;
private
static
final
int
REPORT_PENDING
=
2
;
/*package*/
TaskReportDao
()
{
}
...
...
@@ -124,6 +130,10 @@ public class TaskReportDao extends AbstractDao {
if
(
column
!=
-
1
)
{
dto
.
taskStatus
=
cursor
.
getString
(
column
);
}
column
=
cursor
.
getColumnIndex
(
"report_status"
);
if
(
column
!=
-
1
)
{
dto
.
reportStatus
=
cursor
.
getInt
(
column
);
}
return
dto
;
}
...
...
@@ -153,9 +163,10 @@ public class TaskReportDao extends AbstractDao {
+
"send_back_user_name, "
+
"send_back_comment, "
+
"task_status, "
+
"report_status, "
+
"local_saved_flg ) "
+
"values "
+
"(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"
,
+
"(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?
,?
)"
,
dto
.
getInsertValues
());
}
...
...
@@ -184,18 +195,19 @@ public class TaskReportDao extends AbstractDao {
sql
.
append
(
"send_back_user_name=?, "
);
sql
.
append
(
"send_back_comment=?, "
);
sql
.
append
(
"task_status=?, "
);
sql
.
append
(
"report_status=?, "
);
sql
.
append
(
"task_report_info_id=? "
);
sql
.
append
(
"WHERE task_key=? AND task_report_level=?"
);
if
(
dto
.
reportStartDate
!=
null
)
{
sql
.
append
(
" AND datetime(report_start_date)=datetime(?)"
);
objects
=
new
Object
[]{
dto
.
jsonData
,
dto
.
attachedFileName
,
dto
.
localAttachedFileName
,
dto
.
attachedFileSendFlg
,
dto
.
dataSendFlg
,
dto
.
reportEndDate
,
dto
.
enableReport
,
dto
.
taskReportLevel
,
dto
.
localSavedFlg
,
dto
.
reportLockUserId
,
dto
.
reportLockUserName
,
dto
.
reportLockTime
,
dto
.
sendBackUserId
,
dto
.
sendBackUserName
,
dto
.
sendBackComment
,
dto
.
taskStatus
,
dto
.
reportLockUserId
,
dto
.
reportLockUserName
,
dto
.
reportLockTime
,
dto
.
sendBackUserId
,
dto
.
sendBackUserName
,
dto
.
sendBackComment
,
dto
.
taskStatus
,
dto
.
reportStatus
,
dto
.
taskReportInfoId
,
dto
.
taskKey
,
dto
.
taskReportLevel
,
dto
.
reportStartDate
};
}
else
{
objects
=
new
Object
[]{
dto
.
jsonData
,
dto
.
attachedFileName
,
dto
.
localAttachedFileName
,
dto
.
attachedFileSendFlg
,
dto
.
dataSendFlg
,
dto
.
reportEndDate
,
dto
.
enableReport
,
dto
.
taskReportLevel
,
dto
.
localSavedFlg
,
dto
.
reportLockUserId
,
dto
.
reportLockUserName
,
dto
.
reportLockTime
,
dto
.
sendBackUserId
,
dto
.
sendBackUserName
,
dto
.
sendBackComment
,
dto
.
taskStatus
,
dto
.
reportLockUserId
,
dto
.
reportLockUserName
,
dto
.
reportLockTime
,
dto
.
sendBackUserId
,
dto
.
sendBackUserName
,
dto
.
sendBackComment
,
dto
.
taskStatus
,
dto
.
reportStatus
,
dto
.
taskReportInfoId
,
dto
.
taskKey
,
dto
.
taskReportLevel
};
}
...
...
@@ -203,6 +215,50 @@ public class TaskReportDao extends AbstractDao {
}
/**
* ロック、アンロック時の状態変更
*
* @param taskKey
* @param reportStartDate
* @param reportStatus
* @param reportLockUserId
* @param reportLockUserName
* @param reportLockTime
* @return
*/
public
boolean
updateReportLock
(
String
taskKey
,
Date
reportStartDate
,
int
reportStatus
,
String
reportLockUserId
,
String
reportLockUserName
,
Date
reportLockTime
)
{
StringBuilder
sql
=
new
StringBuilder
();
List
<
Object
>
args
=
new
ArrayList
<
Object
>();
sql
.
append
(
"UPDATE t_task_report SET "
);
sql
.
append
(
" report_status=?, "
);
sql
.
append
(
" report_lock_user_id=?, "
);
sql
.
append
(
" report_lock_user_name=?, "
);
sql
.
append
(
" report_lock_time=?, "
);
sql
.
append
(
"WHERE task_key=? "
);
if
(
reportStartDate
!=
null
)
{
sql
.
append
(
"AND datetime(report_start_date)=datetime(?);"
);
}
args
.
add
(
reportStatus
);
args
.
add
(
reportLockUserId
);
args
.
add
(
reportLockUserName
);
args
.
add
(
reportLockTime
);
args
.
add
(
taskKey
);
if
(
reportStartDate
!=
null
)
{
args
.
add
(
reportStartDate
);
}
return
update
(
sql
.
toString
(),
args
.
toArray
())
>
0
;
}
/**
* 作業IDで報告取得
* (作業報告タイプ 昇順、作業報告ID 昇順、報告開始日 昇順)
* @param operationId
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/tables/TTaskReport.java
View file @
c7c962b6
...
...
@@ -41,6 +41,7 @@ public class TTaskReport extends SQLiteTableScript {
sql
.
append
(
" , send_back_user_id TEXT "
);
// 差し戻しユーザId 差し戻された場合のみ" +
sql
.
append
(
" , send_back_user_name TEXT "
);
// 差し戻しユーザ名 差し戻された場合のみ
sql
.
append
(
" , send_back_comment TEXT "
);
// 確認コメント 差し戻された場合のみ
sql
.
append
(
" , report_status INTEGER NOT NULL DEFAULT 0 "
);
// 0:ロック成功、1:ロック中、2:承認中、999:その他エラー
sql
.
append
(
" , task_status TEXT "
);
// 状況 0:未実施、1:作業中、999:作業完了
sql
.
append
(
" ) "
);
ddl
.
add
(
sql
.
toString
());
...
...
@@ -61,6 +62,9 @@ public class TTaskReport extends SQLiteTableScript {
ddl
.
add
(
" ALTER TABLE t_task_report ADD COLUMN send_back_comment TEXT"
);
// 確認コメント 差し戻された場合のみ
ddl
.
add
(
" ALTER TABLE t_task_report ADD COLUMN task_status TEXT"
);
// 状況 0:未実施、1:作業中、999:作業完了
}
if
(
oldVersion
<
DatabaseVersions
.
Ver1_0_6
)
{
ddl
.
add
(
" ALTER TABLE t_task_report ADD COLUMN report_status INTEGER NOT NULL DEFAULT 0"
);
// 0:ロック成功、1:ロック中、2:承認中、999:その他エラー
}
return
ddl
;
}
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/dto/TaskReportDto.java
View file @
c7c962b6
...
...
@@ -33,15 +33,16 @@ public class TaskReportDto extends AbstractDto {
public
String
sendBackUserName
=
"差戻ユーザ名"
;
// 差し戻しユーザ名 差し戻された場合のみ
public
String
sendBackComment
=
"確認コメント"
;
// 確認コメント 差し戻された場合のみ
public
String
taskStatus
=
"状況:0"
;
// 状況 0:未実施、1:作業中、999:作業完了
public
int
reportStatus
=
0
;
@Override
public
Object
[]
getInsertValues
()
{
return
new
Object
[]
{
taskKey
,
jsonData
,
attachedFileName
,
localAttachedFileName
,
attachedFileSendFlg
,
dataSendFlg
,
taskReportId
,
taskReportInfoId
,
reportStartDate
,
reportEndDate
,
enableReport
,
taskReportLevel
,
reportLockUserId
,
reportLockUserName
,
reportLockTime
,
sendBackUserId
,
sendBackUserName
,
sendBackComment
,
taskStatus
,
localSavedFlg
};
return
new
Object
[]
{
taskKey
,
jsonData
,
attachedFileName
,
localAttachedFileName
,
attachedFileSendFlg
,
dataSendFlg
,
taskReportId
,
taskReportInfoId
,
reportStartDate
,
reportEndDate
,
enableReport
,
taskReportLevel
,
reportLockUserId
,
reportLockUserName
,
reportLockTime
,
sendBackUserId
,
sendBackUserName
,
sendBackComment
,
taskStatus
,
reportStatus
,
localSavedFlg
};
}
@Override
public
Object
[]
getUpdateValues
()
{
return
new
Object
[]
{
jsonData
,
attachedFileName
,
localAttachedFileName
,
attachedFileSendFlg
,
dataSendFlg
,
reportEndDate
,
enableReport
,
taskReportLevel
,
localSavedFlg
,
taskKey
,
taskReportLevel
,
reportLockUserId
,
reportLockUserName
,
reportLockTime
,
sendBackUserId
,
sendBackUserName
,
sendBackComment
,
taskStatus
,
reportStartDate
};
return
new
Object
[]
{
jsonData
,
attachedFileName
,
localAttachedFileName
,
attachedFileSendFlg
,
dataSendFlg
,
reportEndDate
,
enableReport
,
taskReportLevel
,
localSavedFlg
,
taskKey
,
taskReportLevel
,
reportLockUserId
,
reportLockUserName
,
reportLockTime
,
sendBackUserId
,
sendBackUserName
,
sendBackComment
,
taskStatus
,
reportSta
tus
,
reportSta
rtDate
};
}
@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