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
21004d02
Commit
21004d02
authored
Mar 05, 2019
by
Jeong Gilmo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#32782 - 指示者テーブル関連削除(TaskDirections, TaskDirectionsItems)
parent
4dfce160
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
142 additions
and
37 deletions
+142
-37
ABVJE_BL/src/jp/agentec/abook/abv/bl/acms/client/json/OperationDataJSON.java
+4
-1
ABVJE_BL/src/jp/agentec/abook/abv/bl/acms/client/json/RoutineTaskDataJSON.java
+4
-1
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/ABVDataOpenHelper.java
+4
-2
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/dao/OperationDao.java
+4
-2
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/dao/TaskDao.java
+10
-4
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/dao/TaskDirectionsDao.java
+32
-8
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/dao/TaskDirectionsItemsDao.java
+17
-4
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/dao/TaskReportDao.java
+18
-3
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/tables/TTaskDirections.java
+4
-1
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/tables/TTaskDirectionsItems.java
+4
-1
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/tables/TTaskReport.java
+3
-0
ABVJE_BL/src/jp/agentec/abook/abv/bl/dto/TaskDto.java
+4
-1
ABVJE_BL/src/jp/agentec/abook/abv/bl/dto/TaskReportDto.java
+12
-2
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
+22
-7
No files found.
ABVJE_BL/src/jp/agentec/abook/abv/bl/acms/client/json/OperationDataJSON.java
View file @
21004d02
...
...
@@ -50,7 +50,10 @@ public class OperationDataJSON extends AcmsCommonJSON {
for
(
int
i
=
0
;
i
<
taskList
.
length
();
i
++)
{
JSONObject
taskJson
=
taskList
.
getJSONObject
(
i
);
TaskDto
dto
=
new
TaskDto
();
dto
.
taskDirectionsDto
=
new
TaskDirectionsDto
();
// 0305 start
// dto.taskDirectionsDto = new TaskDirectionsDto();
dto
.
taskDirectionsDto
=
new
TaskReportDto
();
// 0305 end
dto
.
taskReportDto
=
new
TaskReportDto
();
dto
.
operationId
=
taskJson
.
getLong
(
OperationId
);
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/acms/client/json/RoutineTaskDataJSON.java
View file @
21004d02
...
...
@@ -41,7 +41,10 @@ public class RoutineTaskDataJSON extends OperationDataJSON {
for
(
int
i
=
0
;
i
<
taskList
.
length
();
i
++)
{
JSONObject
taskJson
=
taskList
.
getJSONObject
(
i
);
TaskDto
dto
=
new
TaskDto
();
dto
.
taskDirectionsDto
=
new
TaskDirectionsDto
();
// 0305 start
// dto.taskDirectionsDto = new TaskDirectionsDto();
dto
.
taskDirectionsDto
=
new
TaskReportDto
();
// 0305 end
dto
.
taskReportDto
=
new
TaskReportDto
();
dto
.
operationId
=
taskJson
.
getLong
(
OperationId
);
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/ABVDataOpenHelper.java
View file @
21004d02
...
...
@@ -91,8 +91,10 @@ public class ABVDataOpenHelper {
iTableScripts
.
add
(
new
TOperation
());
iTableScripts
.
add
(
new
ROperationContent
());
iTableScripts
.
add
(
new
TTask
());
iTableScripts
.
add
(
new
TTaskDirections
());
iTableScripts
.
add
(
new
TTaskDirectionsItems
());
// 0305 start
// iTableScripts.add(new TTaskDirections());
// iTableScripts.add(new TTaskDirectionsItems());
// 0305 end
iTableScripts
.
add
(
new
TTaskReport
());
iTableScripts
.
add
(
new
TTaskReportSend
());
iTableScripts
.
add
(
new
TTaskReportItems
());
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/dao/OperationDao.java
View file @
21004d02
...
...
@@ -204,8 +204,10 @@ public class OperationDao extends AbstractDao {
delete
(
"r_project_content"
,
null
,
null
);
delete
(
"t_project"
,
null
,
null
);
delete
(
"t_task"
,
null
,
null
);
delete
(
"t_task_directions"
,
null
,
null
);
delete
(
"t_task_directions_items"
,
null
,
null
);
// 0305 start
// delete("t_task_directions", null, null);
// delete("t_task_directions_items", null, null);
// 0305 end
delete
(
"t_task_report"
,
null
,
null
);
delete
(
"t_task_report_send"
,
null
,
null
);
delete
(
"t_task_report_items"
,
null
,
null
);
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/dao/TaskDao.java
View file @
21004d02
...
...
@@ -100,8 +100,12 @@ public class TaskDao extends AbstractDao {
if
(
directionFlg
)
{
delete
(
"t_task"
,
"task_key=?"
,
keyValues
);
delete
(
"t_task_directions"
,
"task_key=?"
,
keyValues
);
delete
(
"t_task_directions_items"
,
"task_key=?"
,
keyValues
);
// 0305 start
// delete("t_task_directions", "task_key=?", keyValues);
// delete("t_task_directions_items", "task_key=?", keyValues);
delete
(
"t_task_report"
,
"task_key=?"
,
keyValues
);
delete
(
"t_task_report_items"
,
"task_key=?"
,
keyValues
);
// 0305 end
}
else
{
delete
(
"t_task_report"
,
"task_key=?"
,
keyValues
);
delete
(
"t_task_report_items"
,
"task_key=?"
,
keyValues
);
...
...
@@ -114,8 +118,10 @@ public class TaskDao extends AbstractDao {
*/
public
void
delete
(
TaskDto
dto
)
{
delete
(
"t_task"
,
"task_key=?"
,
dto
.
getKeyValues
());
delete
(
"t_task_directions"
,
"task_key=?"
,
dto
.
getKeyValues
());
delete
(
"t_task_directions_items"
,
"task_key=?"
,
dto
.
getKeyValues
());
// 0305 start
// delete("t_task_directions", "task_key=?", dto.getKeyValues());
// delete("t_task_directions_items", "task_key=?", dto.getKeyValues());
// 0305 end
delete
(
"t_task_report"
,
"task_key=?"
,
dto
.
getKeyValues
());
delete
(
"t_task_report_items"
,
"task_key=?"
,
dto
.
getKeyValues
());
delete
(
"t_inspect_task_report"
,
"task_key=?"
,
new
String
[]
{
dto
.
taskKey
});
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/dao/TaskDirectionsDao.java
View file @
21004d02
...
...
@@ -11,7 +11,10 @@ import jp.agentec.abook.abv.bl.dto.TaskDirectionsDto;
public
class
TaskDirectionsDao
extends
AbstractDao
{
private
static
final
String
TAG
=
"TaskDirectionsDao"
;
// 0305 start
// private static final String TAG = "TaskDirectionsDao";
private
static
final
String
TAG
=
"TaskReportDao"
;
// 0305 end
/*package*/
TaskDirectionsDao
()
{
}
...
...
@@ -58,7 +61,10 @@ public class TaskDirectionsDao extends AbstractDao {
public
void
insert
(
TaskDirectionsDto
dto
)
{
insert
(
"insert into t_task_directions "
// 0305 start
// insert("insert into t_task_directions "
// 0305 end
insert
(
"insert into t_task_report "
+
"(task_key, "
+
"json_data, "
+
"attached_file_name, "
...
...
@@ -73,7 +79,10 @@ public class TaskDirectionsDao extends AbstractDao {
public
List
<
TaskDirectionsDto
>
getTaskDirectionsByOperationId
(
Long
operationId
)
{
StringBuilder
sb
=
new
StringBuilder
();
sb
.
append
(
" select ttd.* "
);
sb
.
append
(
" from t_task_directions ttd "
);
// 0305 start
// sb.append(" from t_task_directions ttd ");
sb
.
append
(
" from t_task_report ttd "
);
// 0305 end
sb
.
append
(
" inner join "
);
sb
.
append
(
" t_task tt "
);
sb
.
append
(
" ON tt.task_key == ttd.task_key "
);
...
...
@@ -83,15 +92,24 @@ public class TaskDirectionsDao extends AbstractDao {
}
public
TaskDirectionsDto
getTaskDirections
(
String
taskKey
)
{
return
rawQueryGetDto
(
"select * from t_task_directions where task_key=?"
,
new
String
[]{
""
+
taskKey
},
TaskDirectionsDto
.
class
);
// 0305 start
// return rawQueryGetDto("select * from t_task_directions where task_key=?", new String[]{"" + taskKey}, TaskDirectionsDto.class);
return
rawQueryGetDto
(
"select * from t_task_report where task_key=?"
,
new
String
[]{
""
+
taskKey
},
TaskDirectionsDto
.
class
);
// 0305 end
}
public
String
getTaskDirectionsAttachedFileName
(
String
taskKey
)
{
return
rawQueryGetString
(
"select local_attached_file_name from t_task_directions where task_key=?"
,
new
String
[]{
""
+
taskKey
});
// 0305 start
// return rawQueryGetString("select local_attached_file_name from t_task_directions where task_key=?", new String[]{"" + taskKey});
return
rawQueryGetString
(
"select local_attached_file_name from t_task_report where task_key=?"
,
new
String
[]{
""
+
taskKey
});
// 0305 end
}
public
boolean
update
(
TaskDirectionsDto
dto
)
{
long
count
=
update
(
"update t_task_directions "
// 0305 start
// long count = update("update t_task_directions "
// 0305 end
long
count
=
update
(
"update t_task_report "
+
"set "
+
"json_data=?, "
+
"attached_file_name=?, "
...
...
@@ -110,7 +128,10 @@ public class TaskDirectionsDao extends AbstractDao {
public
List
<
TaskDirectionsDto
>
getSendableTaskData
(
Long
operationId
)
{
StringBuilder
sb
=
new
StringBuilder
();
sb
.
append
(
" select * "
);
sb
.
append
(
" from t_task_directions ttd "
);
// 0305 start
// sb.append(" from t_task_directions ttd ");
sb
.
append
(
" from t_task_report ttd "
);
// 0305 end
sb
.
append
(
" inner join "
);
sb
.
append
(
" t_task tt "
);
sb
.
append
(
" ON tt.task_key == ttd.task_key "
);
...
...
@@ -122,7 +143,10 @@ public class TaskDirectionsDao extends AbstractDao {
public
List
<
TaskDirectionsDto
>
getSendableTaskData
(
Long
operationId
,
String
taskKey
)
{
StringBuilder
sb
=
new
StringBuilder
();
sb
.
append
(
" select * "
);
sb
.
append
(
" from t_task_directions ttd "
);
// 0305 start
// sb.append(" from t_task_directions ttd ");
sb
.
append
(
" from t_task_report ttd "
);
// 0305 end
sb
.
append
(
" inner join "
);
sb
.
append
(
" t_task tt "
);
sb
.
append
(
" ON tt.task_key == ttd.task_key "
);
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/dao/TaskDirectionsItemsDao.java
View file @
21004d02
...
...
@@ -35,17 +35,26 @@ public class TaskDirectionsItemsDao extends AbstractDao {
}
public
void
insertTaskDirectionsItems
(
TaskDirectionsItemsDto
dto
)
{
insert
(
"insert into t_task_directions_items (task_key, item_key, input_value) values (?,?,?)"
,
dto
.
getInsertValues
());
// 0305 start
// insert("insert into t_task_directions_items (task_key, item_key, input_value) values (?,?,?)", dto.getInsertValues());
insert
(
"insert into t_task_report_items (task_key, item_key, input_value) values (?,?,?)"
,
dto
.
getInsertValues
());
// 0305 end
}
public
List
<
TaskDirectionsItemsDto
>
getTaskDirectionsItemByTaskKey
(
String
taskKey
)
{
return
rawQueryGetDtoList
(
"select * from t_task_directions_items where task_key=?"
,
new
String
[]{
""
+
taskKey
},
TaskDirectionsItemsDto
.
class
);
// 0305 start
// return rawQueryGetDtoList("select * from t_task_directions_items where task_key=?", new String[]{"" + taskKey}, TaskDirectionsItemsDto.class);
return
rawQueryGetDtoList
(
"select * from t_task_report_items where task_key=?"
,
new
String
[]{
""
+
taskKey
},
TaskDirectionsItemsDto
.
class
);
// 0305 end
}
public
List
<
TaskDirectionsItemsDto
>
getTaskDirectionsItemByOperationId
(
Long
operationId
)
{
StringBuilder
sb
=
new
StringBuilder
();
sb
.
append
(
" select distinct ttdi.* "
);
sb
.
append
(
" from t_task_directions_items ttdi "
);
// 0305 start
// sb.append(" from t_task_directions_items ttdi ");
sb
.
append
(
" from t_task_report_items ttdi "
);
// 0305 end
sb
.
append
(
" inner join "
);
sb
.
append
(
" t_task tt "
);
sb
.
append
(
" ON tt.task_key == ttdi.task_key "
);
...
...
@@ -55,7 +64,10 @@ public class TaskDirectionsItemsDao extends AbstractDao {
}
public
boolean
updateTaskDirectionsItems
(
TaskDirectionsItemsDto
dto
)
{
long
count
=
update
(
"update t_task_directions_items set input_value=? where item_key=? and task_key=? "
,
dto
.
getUpdateValues
());
// 0305 start
// long count = update("update t_task_directions_items set input_value=? where item_key=? and task_key=? ", dto.getUpdateValues());
long
count
=
update
(
"update t_task_report_items set input_value=? where item_key=? and task_key=? "
,
dto
.
getUpdateValues
());
// 0305 end
return
(
count
>
0
);
}
}
\ No newline at end of file
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/dao/TaskReportDao.java
View file @
21004d02
...
...
@@ -53,6 +53,12 @@ public class TaskReportDao extends AbstractDao {
if
(
column
!=
-
1
)
{
dto
.
delFlg
=
toBool
(
cursor
.
getInt
(
column
));
}
// 0305 start
column
=
cursor
.
getColumnIndex
(
"reportor_flag"
);
if
(
column
!=
-
1
)
{
dto
.
reportorFlag
=
toBool
(
cursor
.
getInt
(
column
));
}
// 0305 end
return
dto
;
}
...
...
@@ -64,6 +70,9 @@ public class TaskReportDao extends AbstractDao {
+
"attached_file_name, "
+
"local_attached_file_name, "
+
"attached_file_send_flg, "
// 0301 start
+
"reportor_flag, "
// 0301 end
+
"data_send_flg) "
+
"values "
+
"(?,?,?,?,?,?,?)"
,
...
...
@@ -93,7 +102,10 @@ public class TaskReportDao extends AbstractDao {
+
"attached_file_name=?, "
+
"local_attached_file_name=?, "
+
"attached_file_send_flg=?, "
+
"data_send_flg=? "
+
"data_send_flg=?, "
// 0301 start
+
"reportor_flag=? "
// 0301 end
+
"where task_key=?"
,
dto
.
getUpdateValues
());
return
count
>
0
;
...
...
@@ -121,7 +133,7 @@ public class TaskReportDao extends AbstractDao {
return
rawQueryGetDtoList
(
sb
.
toString
(),
new
String
[]{
""
+
operationId
},
TaskReportDto
.
class
);
}
public
List
<
TaskReportDto
>
getSendableTaskData
(
Long
operationId
,
String
taskKey
)
{
public
List
<
TaskReportDto
>
getSendableTaskData
(
Long
operationId
,
String
taskKey
,
boolean
reportorFlag
)
{
StringBuilder
sb
=
new
StringBuilder
();
sb
.
append
(
" select * "
);
sb
.
append
(
" from t_task_report ttr "
);
...
...
@@ -131,7 +143,10 @@ public class TaskReportDao extends AbstractDao {
sb
.
append
(
" WHERE ttr.data_send_flg = 1"
);
sb
.
append
(
" AND tt.project_id = ?"
);
sb
.
append
(
" AND tt.task_key = ?"
);
return
rawQueryGetDtoList
(
sb
.
toString
(),
new
String
[]{
""
+
operationId
,
""
+
taskKey
},
TaskReportDto
.
class
);
// 0305 start
sb
.
append
(
" AND ttr.reportor_flag = ?"
);
return
rawQueryGetDtoList
(
sb
.
toString
(),
new
String
[]{
""
+
operationId
,
""
+
taskKey
,
""
+
reportorFlag
},
TaskReportDto
.
class
);
// 0305 end
}
public
String
getTaskReportAttachedFileName
(
String
taskKey
)
{
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/tables/TTaskDirections.java
View file @
21004d02
...
...
@@ -21,7 +21,10 @@ public class TTaskDirections extends SQLiteTableScript {
List
<
String
>
ddl
=
new
ArrayList
<
String
>();
StringBuffer
sql
=
new
StringBuffer
();
sql
.
append
(
" CREATE TABLE t_task_directions ( "
);
// 0305 start
// sql.append(" CREATE TABLE t_task_directions ( ");
sql
.
append
(
" CREATE TABLE t_task_report ( "
);
// 0305 end
sql
.
append
(
" task_key TEXT NOT NULL "
);
sql
.
append
(
" , json_data TEXT NOT NULL "
);
sql
.
append
(
" , attached_file_name TEXT "
);
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/tables/TTaskDirectionsItems.java
View file @
21004d02
...
...
@@ -21,7 +21,10 @@ public class TTaskDirectionsItems extends SQLiteTableScript {
List
<
String
>
ddl
=
new
ArrayList
<
String
>();
StringBuffer
sql
=
new
StringBuffer
();
sql
.
append
(
" CREATE TABLE t_task_directions_items ( "
);
// 0305 start
// sql.append(" CREATE TABLE t_task_directions_items ( ");
sql
.
append
(
" CREATE TABLE t_task_report_items ( "
);
// 0305 end
sql
.
append
(
" task_key TEXT NOT NULL "
);
sql
.
append
(
" , item_key VARCHAR(64) "
);
sql
.
append
(
" , input_value VARCHAR(64) "
);
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/tables/TTaskReport.java
View file @
21004d02
...
...
@@ -28,6 +28,9 @@ public class TTaskReport extends SQLiteTableScript {
sql
.
append
(
" , local_attached_file_name TEXT "
);
sql
.
append
(
" , attached_file_send_flg BOOLEAN DEFAULT 0 "
);
sql
.
append
(
" , data_send_flg BOOLEAN DEFAULT 0 "
);
// 0305 start
sql
.
append
(
" , reportor_flag BOOLEAN DEFAULT 0 "
);
// 0305 end
sql
.
append
(
" ) "
);
ddl
.
add
(
sql
.
toString
());
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/dto/TaskDto.java
View file @
21004d02
...
...
@@ -16,8 +16,11 @@ public class TaskDto extends AbstractDto {
public
String
taskHotSpotInfo
;
public
boolean
delFlg
;
public
TaskDirectionsDto
taskDirectionsDto
;
// 0305 start
// public TaskDirectionsDto taskDirectionsDto;
public
TaskReportDto
taskDirectionsDto
;
public
TaskReportDto
taskReportDto
;
// 0305 end
public
int
taskReportId
;
public
List
<
RoutineTaskReportDto
>
RoutineTaskReportList
;
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/dto/TaskReportDto.java
View file @
21004d02
...
...
@@ -15,14 +15,24 @@ public class TaskReportDto extends AbstractDto {
public
String
taskHotSpotInfo
;
public
boolean
delFlg
;
// 0301 start
public
boolean
reportorFlag
;
// 0301 end
@Override
public
Object
[]
getInsertValues
()
{
return
new
Object
[]
{
taskKey
,
jsonData
,
attachedFileName
,
localAttachedFileName
,
attachedFileSendFlg
,
dataSendFlg
};
// 0301 start
return
new
Object
[]
{
taskKey
,
jsonData
,
attachedFileName
,
localAttachedFileName
,
attachedFileSendFlg
,
dataSendFlg
,
reportorFlag
};
// return new Object[] { taskKey, jsonData, attachedFileName, localAttachedFileName, attachedFileSendFlg, dataSendFlg };
// 0301 end
}
@Override
public
Object
[]
getUpdateValues
()
{
return
new
Object
[]
{
jsonData
,
attachedFileName
,
localAttachedFileName
,
attachedFileSendFlg
,
dataSendFlg
,
taskKey
};
// 0301 start
return
new
Object
[]
{
jsonData
,
attachedFileName
,
localAttachedFileName
,
attachedFileSendFlg
,
dataSendFlg
,
reportorFlag
,
taskKey
};
// return new Object[] { jsonData, attachedFileName, localAttachedFileName, attachedFileSendFlg, dataSendFlg, taskKey };
// 0301 end
}
@Override
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/OperationLogic.java
View file @
21004d02
This diff is collapsed.
Click to expand it.
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/OperationListActivity.java
View file @
21004d02
...
...
@@ -143,7 +143,9 @@ public class OperationListActivity extends ABVUIActivity {
private
Dialog
mPanoEntryDialog
;
private
OperationContentDao
mOperationContentDao
=
AbstractDao
.
getDao
(
OperationContentDao
.
class
);
private
TaskDirectionsDao
mTaskDirectionsDao
=
AbstractDao
.
getDao
(
TaskDirectionsDao
.
class
);
// 0301 start
// private TaskDirectionsDao mTaskDirectionsDao = AbstractDao.getDao(TaskDirectionsDao.class);
// 0301 end
private
TaskReportDao
mTaskReportDao
=
AbstractDao
.
getDao
(
TaskReportDao
.
class
);
private
RoutineTaskReportDao
mRoutineTaskReportDao
=
AbstractDao
.
getDao
(
RoutineTaskReportDao
.
class
);
private
OperationLogic
mOperationLogic
=
AbstractLogic
.
getLogic
(
OperationLogic
.
class
);
...
...
@@ -1033,6 +1035,7 @@ public class OperationListActivity extends ABVUIActivity {
}
lastEditDate
=
json
.
lastEditDate
;
}
else
{
// TODO
OperationDataJSON
json
=
AcmsClient
.
getInstance
(
ABVDataCache
.
getInstance
().
getUrlPath
(),
ABVEnvironment
.
getInstance
().
networkAdapter
).
getOpereationData
(
param
);
//プログレスを40%進行させるための計算
...
...
@@ -1041,13 +1044,17 @@ public class OperationListActivity extends ABVUIActivity {
progress
=
40
/
json
.
taskDtoList
.
size
();
}
JSONObject
taskDirectionJson
;
// 0305 start
// JSONObject taskDirectionJson;
JSONObject
taskReportJson
;
for
(
TaskDto
taskDto
:
json
.
taskDtoList
)
{
String
directionsAttachedFileName
=
taskDto
.
taskDirectionsDto
.
attachedFileName
;
String
reportAttachedFileName
=
taskDto
.
taskReportDto
.
attachedFileName
;
taskDirectionJson
=
new
JSONObject
(
taskDto
.
taskDirectionsDto
.
jsonData
);
taskDirectionJson
.
put
(
ABookKeys
.
TASK_STATUS
,
taskDto
.
taskStatus
);
// 0305 start
taskReportJson
=
new
JSONObject
(
taskDto
.
taskDirectionsDto
.
jsonData
);
taskReportJson
.
put
(
ABookKeys
.
TASK_STATUS
,
taskDto
.
taskStatus
);
// 0305 end
int
localTaskIndex
=
localTaskList
.
indexOf
(
taskDto
);
if
(
localTaskIndex
>=
0
)
{
...
...
@@ -1058,9 +1065,11 @@ public class OperationListActivity extends ABVUIActivity {
return
null
;
}
// 0305 start
// 作業更新
mOperationLogic
.
updateTaskDirections
(
taskDto
.
taskKey
,
taskDto
.
operationId
,
operationContentDto
.
contentId
,
taskDirectionJson
,
taskDto
.
taskHotSpotInfo
,
directionsAttachedFileName
,
false
,
false
);
taskReportJson
,
taskDto
.
taskHotSpotInfo
,
directionsAttachedFileName
,
false
,
false
);
// 0305 end
localTaskList
.
remove
(
taskDto
);
// 報告データが存在すると作業報告を更新する
if
(
taskDto
.
taskReportDto
.
jsonData
!=
null
)
{
...
...
@@ -1074,9 +1083,11 @@ public class OperationListActivity extends ABVUIActivity {
return
null
;
}
// 0301 start
// 作業登録
mOperationLogic
.
insertTaskDirections
(
taskDto
.
taskKey
,
operationContentDto
.
operationId
,
operationContentDto
.
contentId
,
taskDirectionJson
,
taskDto
.
taskHotSpotInfo
,
directionsAttachedFileName
,
false
,
false
);
taskReportJson
,
taskDto
.
taskHotSpotInfo
,
directionsAttachedFileName
,
false
,
false
);
// 0305 end
if
(
taskDto
.
taskReportDto
.
jsonData
!=
null
)
{
mOperationLogic
.
insertTaskReport
(
taskDto
.
taskKey
,
operationContentDto
.
operationId
,
operationContentDto
.
contentId
,
new
JSONObject
(
taskDto
.
taskReportDto
.
jsonData
),
reportAttachedFileName
,
false
,
false
);
...
...
@@ -1084,6 +1095,7 @@ public class OperationListActivity extends ABVUIActivity {
}
progressCallback
.
callback
(
new
Integer
(
progress
));
}
// 0305 end
// サーバーから取得した作業情報がローカルに存在しないので削除する
for
(
TaskDto
taskDto
:
localTaskList
)
{
...
...
@@ -1103,7 +1115,10 @@ public class OperationListActivity extends ABVUIActivity {
// 既存の添付ディレクトリ削除
FileUtil
.
delete
(
ABVEnvironment
.
getInstance
().
getTempTaskDirPath
(
contentId
,
taskKey
));
String
directionsLocalAttachedFileName
=
mTaskDirectionsDao
.
getTaskDirectionsAttachedFileName
(
taskKey
);
// 0305 start
// String directionsLocalAttachedFileName = mTaskDirectionsDao.getTaskDirectionsAttachedFileName(taskKey);
String
directionsLocalAttachedFileName
=
mTaskReportDao
.
getTaskReportAttachedFileName
(
taskKey
);
// 0305 end
String
reportLocalAttachedFileName
=
mTaskReportDao
.
getTaskReportAttachedFileName
(
taskKey
);
int
count
=
0
;
boolean
getDirectionsFileFlg
=
directionsAttachedFileName
!=
null
&&
!
directionsAttachedFileName
.
equals
(
directionsLocalAttachedFileName
);
...
...
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