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
3493050a
Commit
3493050a
authored
Mar 24, 2019
by
Lee Jaebin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#32825 作業一覧画面改善
parent
fcc8f297
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
76 additions
and
28 deletions
+76
-28
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/dao/OperationContentDao.java
+9
-0
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/dao/OperationDao.java
+1
-1
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/dao/TaskReportDao.java
+8
-0
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/OperationLogic.java
+0
-0
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/OperationListActivity.java
+51
-24
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/helper/ABookCheckWebViewHelper.java
+7
-3
No files found.
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/dao/OperationContentDao.java
View file @
3493050a
...
@@ -62,6 +62,15 @@ public class OperationContentDao extends AbstractDao {
...
@@ -62,6 +62,15 @@ public class OperationContentDao extends AbstractDao {
return
rawQueryGetLongList
(
"select content_id from r_operation_content where operation_id=?"
,
new
String
[]{
""
+
operationId
});
return
rawQueryGetLongList
(
"select content_id from r_operation_content where operation_id=?"
,
new
String
[]{
""
+
operationId
});
}
}
/**
* 資料IDに紐づいた作業が存在しないと資料を削除する判定
* @param contentId
* @return
*/
public
boolean
isDeleteContent
(
Long
contentId
)
{
return
rawQueryGetInt
(
"select COUNT(*) from r_operation_content where content_id=?"
,
new
String
[]{
""
+
contentId
})
==
0
;
}
public
boolean
insertOperationContent
(
OperationContentDto
dto
)
{
public
boolean
insertOperationContent
(
OperationContentDto
dto
)
{
StringBuffer
sql
=
new
StringBuffer
();
StringBuffer
sql
=
new
StringBuffer
();
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/dao/OperationDao.java
View file @
3493050a
...
@@ -211,13 +211,13 @@ public class OperationDao extends AbstractDao {
...
@@ -211,13 +211,13 @@ public class OperationDao extends AbstractDao {
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_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
);
delete
(
"t_task_report"
,
null
,
null
);
delete
(
"t_task_report"
,
null
,
null
);
delete
(
"t_task_report_send"
,
null
,
null
);
delete
(
"t_task_report_send"
,
null
,
null
);
delete
(
"t_task_report_items"
,
null
,
null
);
delete
(
"t_task_report_items"
,
null
,
null
);
delete
(
"m_worker_group"
,
null
,
null
);
delete
(
"m_worker_group"
,
null
,
null
);
delete
(
"r_task_worker_group"
,
null
,
null
);
}
}
public
List
<
OperationDto
>
getOperations
(
String
searchOperationName
,
String
searchStartDateStr
,
String
searchEndDateStr
,
String
reportTypeStr
)
{
public
List
<
OperationDto
>
getOperations
(
String
searchOperationName
,
String
searchStartDateStr
,
String
searchEndDateStr
,
String
reportTypeStr
)
{
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/dao/TaskReportDao.java
View file @
3493050a
...
@@ -247,6 +247,14 @@ public class TaskReportDao extends AbstractDao {
...
@@ -247,6 +247,14 @@ public class TaskReportDao extends AbstractDao {
}
}
/**
/**
* テーブル物理削除
* @param dto
*/
public
void
delete
(
TaskReportDto
dto
)
{
delete
(
"t_task_report"
,
"task_key=? and task_report_level=?"
,
new
String
[]
{
dto
.
taskKey
,
""
+
dto
.
taskReportLevel
});
}
/**
* テーブル物理削除(定期点検専用)
* テーブル物理削除(定期点検専用)
* @param dto
* @param dto
*/
*/
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/OperationLogic.java
View file @
3493050a
This diff is collapsed.
Click to expand it.
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/OperationListActivity.java
View file @
3493050a
...
@@ -77,7 +77,6 @@ import jp.agentec.abook.abv.bl.download.ContentFileExtractor;
...
@@ -77,7 +77,6 @@ import jp.agentec.abook.abv.bl.download.ContentFileExtractor;
import
jp.agentec.abook.abv.bl.download.ContentZipDownloadNotification
;
import
jp.agentec.abook.abv.bl.download.ContentZipDownloadNotification
;
import
jp.agentec.abook.abv.bl.dto.ContentDto
;
import
jp.agentec.abook.abv.bl.dto.ContentDto
;
import
jp.agentec.abook.abv.bl.dto.FixPushMessageDto
;
import
jp.agentec.abook.abv.bl.dto.FixPushMessageDto
;
import
jp.agentec.abook.abv.bl.dto.RoutineTaskReportDto
;
import
jp.agentec.abook.abv.bl.dto.OperationContentDto
;
import
jp.agentec.abook.abv.bl.dto.OperationContentDto
;
import
jp.agentec.abook.abv.bl.dto.OperationDto
;
import
jp.agentec.abook.abv.bl.dto.OperationDto
;
import
jp.agentec.abook.abv.bl.dto.PushMessageDto
;
import
jp.agentec.abook.abv.bl.dto.PushMessageDto
;
...
@@ -825,6 +824,7 @@ public class OperationListActivity extends ABVUIActivity {
...
@@ -825,6 +824,7 @@ public class OperationListActivity extends ABVUIActivity {
OperationDto
operationDto
=
mOperationLogic
.
getOperation
(
operationId
);
OperationDto
operationDto
=
mOperationLogic
.
getOperation
(
operationId
);
OperationContentDto
operationContentDto
=
mOperationContentDao
.
getOperationMainContent
(
operationId
);
OperationContentDto
operationContentDto
=
mOperationContentDao
.
getOperationMainContent
(
operationId
);
List
<
TaskDto
>
localTaskList
=
mTaskDao
.
selectAllTaskByOperationId
(
operationId
);
List
<
TaskDto
>
localTaskList
=
mTaskDao
.
selectAllTaskByOperationId
(
operationId
);
Date
lastEditDate
;
Date
lastEditDate
;
OperationDataJSON
json
=
AcmsClient
.
getInstance
(
ABVDataCache
.
getInstance
().
getUrlPath
(),
ABVEnvironment
.
getInstance
().
networkAdapter
).
getOpereationData
(
param
);
OperationDataJSON
json
=
AcmsClient
.
getInstance
(
ABVDataCache
.
getInstance
().
getUrlPath
(),
ABVEnvironment
.
getInstance
().
networkAdapter
).
getOpereationData
(
param
);
...
@@ -835,26 +835,35 @@ public class OperationListActivity extends ABVUIActivity {
...
@@ -835,26 +835,35 @@ public class OperationListActivity extends ABVUIActivity {
progress
=
40
/
json
.
taskDtoList
.
size
();
progress
=
40
/
json
.
taskDtoList
.
size
();
}
}
boolean
isRoutineTask
=
operationDto
.
reportType
==
Constant
.
ReportType
.
Routine
;
JSONObject
taskReportJson
;
JSONObject
taskReportJson
;
for
(
TaskDto
serverTaskDto
:
json
.
taskDtoList
)
{
for
(
TaskDto
serverTaskDto
:
json
.
taskDtoList
)
{
if
(
operationDto
.
reportType
==
Constant
.
ReportType
.
Routine
)
{
if
(
isExistsTaskInList
(
localTaskList
,
serverTaskDto
))
{
mTaskDao
.
update
(
serverTaskDto
);
}
else
{
mTaskDao
.
insert
(
serverTaskDto
);
}
List
<
TaskReportDto
>
localTaskReportList
=
mTaskReportDao
.
getNotNullStartDateTaskReportByTaskKey
(
serverTaskDto
.
taskKey
);
List
<
TaskReportDto
>
localRemove
=
new
ArrayList
();
List
<
TaskReportDto
>
localRemove
=
new
ArrayList
();
// 先にローカルにしか存在しない事を削除 : DB, files
List
<
TaskReportDto
>
localTaskReportList
=
mTaskReportDao
.
getTaskReportListByTaskKey
(
serverTaskDto
.
taskKey
);
for
(
TaskReportDto
localTaskReportDto
:
localTaskReportList
)
{
for
(
TaskReportDto
localTaskReportDto
:
localTaskReportList
)
{
if
(!
isExistsRoutinTaskReportInList
(
serverTaskDto
.
taskReportDtoList
,
localTaskReportDto
))
{
if
(!
isExistsTaskReportInList
(
serverTaskDto
.
taskReportDtoList
,
localTaskReportDto
,
isRoutineTask
))
{
mOperationLogic
.
deleteRoutineTaskReport
(
operationId
,
operationContentDto
.
contentId
,
localTaskReportDto
);
if
(
isRoutineTask
)
{
localRemove
.
add
(
localTaskReportDto
);
mOperationLogic
.
deleteRoutineTaskReport
(
operationId
,
operationContentDto
.
contentId
,
localTaskReportDto
);
}
else
{
// taskDtoが存在するとtaskReportLevel 0 (作業報告)が存在しないことはないので、報告(回答)のみチェックして削除
if
(
localTaskReportDto
.
taskReportLevel
==
Constant
.
TaskReportLevel
.
ReportReplyType
)
{
// 作業報告のディレクトリ削除
mOperationLogic
.
deleteTaskReportReplyFileData
(
operationId
,
operationContentDto
.
contentId
,
serverTaskDto
.
taskKey
);
mTaskReportDao
.
delete
(
localTaskReportDto
);
}
}
localTaskReportList
.
remove
(
localTaskReportDto
);
}
}
}
}
localTaskReportList
.
removeAll
(
localRemove
);
if
(
operationDto
.
reportType
==
Constant
.
ReportType
.
Routine
)
{
if
(
isExistsTaskInList
(
localTaskList
,
serverTaskDto
))
{
mTaskDao
.
update
(
serverTaskDto
);
}
else
{
mTaskDao
.
insert
(
serverTaskDto
);
}
// サーバーからの情報で更新
// サーバーからの情報で更新
for
(
TaskReportDto
taskReportDto
:
serverTaskDto
.
taskReportDtoList
)
{
for
(
TaskReportDto
taskReportDto
:
serverTaskDto
.
taskReportDtoList
)
{
...
@@ -866,7 +875,7 @@ public class OperationListActivity extends ABVUIActivity {
...
@@ -866,7 +875,7 @@ public class OperationListActivity extends ABVUIActivity {
if
(
isSyncGetTaskFileError
)
{
if
(
isSyncGetTaskFileError
)
{
return
null
;
return
null
;
}
}
if
(
isExists
RoutinTaskReportInList
(
localTaskReportList
,
taskReportDto
))
{
if
(
isExists
TaskReportInList
(
localTaskReportList
,
taskReportDto
,
true
))
{
// 報告データが存在すると作業報告を更新する
// 報告データが存在すると作業報告を更新する
if
(
taskReportDto
.
jsonData
!=
null
)
{
if
(
taskReportDto
.
jsonData
!=
null
)
{
mOperationLogic
.
updateRoutineTaskReport
(
serverTaskDto
.
operationId
,
operationContentDto
.
contentId
,
taskReportDto
,
false
,
false
,
false
,
false
);
mOperationLogic
.
updateRoutineTaskReport
(
serverTaskDto
.
operationId
,
operationContentDto
.
contentId
,
taskReportDto
,
false
,
false
,
false
,
false
);
...
@@ -900,10 +909,15 @@ public class OperationListActivity extends ABVUIActivity {
...
@@ -900,10 +909,15 @@ public class OperationListActivity extends ABVUIActivity {
taskReportJson
,
serverTaskDto
.
taskHotSpotInfo
,
attachedFileName
,
false
,
false
);
taskReportJson
,
serverTaskDto
.
taskHotSpotInfo
,
attachedFileName
,
false
,
false
);
}
else
{
}
else
{
// 作業報告(回答)
// 作業報告(回答)
if
(
taskReportDto
.
jsonData
!=
null
)
{
if
(
taskReportDto
.
jsonData
!=
null
)
{
mOperationLogic
.
updateTaskReportReplyLevel
(
serverTaskDto
.
taskKey
,
serverTaskDto
.
operationId
,
operationContentDto
.
contentId
,
// データの更新
mOperationLogic
.
updateTaskReportReply
(
serverTaskDto
.
taskKey
,
serverTaskDto
.
operationId
,
operationContentDto
.
contentId
,
taskReportDto
.
enableReport
,
new
JSONObject
(
taskReportDto
.
jsonData
),
attachedFileName
,
false
,
false
);
new
JSONObject
(
taskReportDto
.
jsonData
),
attachedFileName
,
false
,
false
);
}
}
else
{
// jsonDataがない場合
mOperationLogic
.
insertTaskReportReply
(
serverTaskDto
.
taskKey
,
operationContentDto
.
operationId
,
operationContentDto
.
contentId
,
taskReportDto
.
enableReport
,
null
,
attachedFileName
,
false
,
false
);
}
}
}
// 更新済みの場合、localTaskListから削除
// 更新済みの場合、localTaskListから削除
localTaskList
.
remove
(
serverTaskDto
);
localTaskList
.
remove
(
serverTaskDto
);
...
@@ -928,8 +942,12 @@ public class OperationListActivity extends ABVUIActivity {
...
@@ -928,8 +942,12 @@ public class OperationListActivity extends ABVUIActivity {
taskReportJson
,
serverTaskDto
.
taskHotSpotInfo
,
attachedFileName
,
false
,
false
);
taskReportJson
,
serverTaskDto
.
taskHotSpotInfo
,
attachedFileName
,
false
,
false
);
}
else
{
}
else
{
if
(
taskReportDto
.
jsonData
!=
null
)
{
if
(
taskReportDto
.
jsonData
!=
null
)
{
mOperationLogic
.
insertTaskReportReply
(
serverTaskDto
.
taskKey
,
operationContentDto
.
operationId
,
operationContentDto
.
contentId
,
mOperationLogic
.
insertTaskReportReply
(
serverTaskDto
.
taskKey
,
operationContentDto
.
operationId
,
operationContentDto
.
contentId
,
taskReportDto
.
enableReport
,
new
JSONObject
(
taskReportDto
.
jsonData
),
attachedFileName
,
false
,
false
);
new
JSONObject
(
taskReportDto
.
jsonData
),
attachedFileName
,
false
,
false
);
}
else
{
// jsonDataがない場合
mOperationLogic
.
insertTaskReportReply
(
serverTaskDto
.
taskKey
,
operationContentDto
.
operationId
,
operationContentDto
.
contentId
,
taskReportDto
.
enableReport
,
null
,
attachedFileName
,
false
,
false
);
}
}
}
}
}
}
...
@@ -1549,17 +1567,26 @@ public class OperationListActivity extends ABVUIActivity {
...
@@ -1549,17 +1567,26 @@ public class OperationListActivity extends ABVUIActivity {
}
}
/**
/**
*
定期点検の
報告存在チェック
* 報告存在チェック
* @param listDto
* @param listDto
* @param rDto
* @param rDto
* @return
* @return
*/
*/
private
boolean
isExists
RoutinTaskReportInList
(
List
<
TaskReportDto
>
listDto
,
TaskReportDto
rDto
)
{
private
boolean
isExists
TaskReportInList
(
List
<
TaskReportDto
>
listDto
,
TaskReportDto
rDto
,
boolean
isRoutineTask
)
{
for
(
TaskReportDto
lDto
:
listDto
)
{
for
(
TaskReportDto
lDto
:
listDto
)
{
if
(
lDto
.
taskKey
.
equals
(
rDto
.
taskKey
)
&&
if
(
isRoutineTask
)
{
lDto
.
taskReportId
==
rDto
.
taskReportId
&&
// 定期点検の場合、taskKey,taskReportId,reportStartDateで判定
lDto
.
reportStartDate
.
equals
(
rDto
.
reportStartDate
))
{
if
(
lDto
.
taskKey
.
equals
(
rDto
.
taskKey
)
&&
return
true
;
lDto
.
taskReportId
==
rDto
.
taskReportId
&&
lDto
.
reportStartDate
.
equals
(
rDto
.
reportStartDate
))
{
return
true
;
}
}
else
{
// taskKeyと作業報告階層で判定
if
(
lDto
.
taskKey
.
equals
(
rDto
.
taskKey
)
&&
lDto
.
taskReportLevel
==
rDto
.
taskReportLevel
)
{
return
true
;
}
}
}
}
}
return
false
;
return
false
;
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/helper/ABookCheckWebViewHelper.java
View file @
3493050a
...
@@ -97,7 +97,11 @@ public class ABookCheckWebViewHelper extends ABookHelper {
...
@@ -97,7 +97,11 @@ public class ABookCheckWebViewHelper extends ABookHelper {
mOperationLogic
.
createJsonForOperationContent
(
operationId
,
contentPath
,
false
);
mOperationLogic
.
createJsonForOperationContent
(
operationId
,
contentPath
,
false
);
copyRoutineTaskReportAttachedMovie
(
operationId
,
contentId
,
taskKey
,
taskReportId
,
reportStartDate
);
copyRoutineTaskReportAttachedMovie
(
operationId
,
contentId
,
taskKey
,
taskReportId
,
reportStartDate
);
}
else
{
}
else
{
mOperationLogic
.
deleteTaskReportReply
(
operationId
,
contentId
,
taskKey
);
if
(
taskReportLevel
==
Constant
.
TaskReportLevel
.
ReportType
)
{
mOperationLogic
.
deleteTaskReport
(
operationId
,
contentId
,
taskKey
);
}
else
{
mOperationLogic
.
deleteTaskReportReply
(
operationId
,
contentId
,
taskKey
);
}
mOperationLogic
.
createJsonForOperationContent
(
operationId
,
contentPath
,
false
);
mOperationLogic
.
createJsonForOperationContent
(
operationId
,
contentPath
,
false
);
copyTaskAttachedMovie
(
operationId
,
contentId
,
taskKey
,
taskReportLevel
);
copyTaskAttachedMovie
(
operationId
,
contentId
,
taskKey
,
taskReportLevel
);
}
}
...
@@ -301,9 +305,9 @@ public class ABookCheckWebViewHelper extends ABookHelper {
...
@@ -301,9 +305,9 @@ public class ABookCheckWebViewHelper extends ABookHelper {
}
}
}
else
{
}
else
{
if
(
insertFlg
)
{
if
(
insertFlg
)
{
mOperationLogic
.
insertTaskReportReply
(
taskKey
,
operationId
,
contentId
,
taskReportJson
,
null
,
attachedChangeFlag
,
true
);
mOperationLogic
.
insertTaskReportReply
(
taskKey
,
operationId
,
contentId
,
Constant
.
EnableReport
.
YES
,
taskReportJson
,
null
,
attachedChangeFlag
,
true
);
}
else
{
}
else
{
mOperationLogic
.
updateTaskReportReply
Level
(
taskKey
,
operationId
,
contentId
,
taskReportJson
,
null
,
attachedChangeFlag
,
true
);
mOperationLogic
.
updateTaskReportReply
(
taskKey
,
operationId
,
contentId
,
Constant
.
EnableReport
.
YES
,
taskReportJson
,
null
,
attachedChangeFlag
,
true
);
}
}
}
}
mOperationLogic
.
createJsonForOperationContent
(
operationId
,
contentPath
,
false
);
mOperationLogic
.
createJsonForOperationContent
(
operationId
,
contentPath
,
false
);
...
...
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