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
94802da9
Commit
94802da9
authored
Mar 15, 2019
by
Jeong Gilmo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#32926 作業報告画面改善(Android)
parent
a64f797a
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
258 additions
and
59 deletions
+258
-59
ABVJE_BL/src/jp/agentec/abook/abv/bl/acms/client/json/OperationDataJSON.java
+9
-0
ABVJE_BL/src/jp/agentec/abook/abv/bl/common/ABVEnvironment.java
+24
-2
ABVJE_BL/src/jp/agentec/abook/abv/bl/common/constant/ABookKeys.java
+4
-0
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/dao/TaskDao.java
+6
-0
ABVJE_BL/src/jp/agentec/abook/abv/bl/dto/TaskDto.java
+4
-0
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/OperationLogic.java
+129
-47
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVContentViewActivity.java
+31
-4
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/OperationListActivity.java
+10
-2
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/helper/ABookCheckWebViewHelper.java
+37
-3
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/activity/CheckOZDViewActivity.java
+4
-1
No files found.
ABVJE_BL/src/jp/agentec/abook/abv/bl/acms/client/json/OperationDataJSON.java
View file @
94802da9
...
@@ -45,6 +45,10 @@ public class OperationDataJSON extends AcmsCommonJSON {
...
@@ -45,6 +45,10 @@ public class OperationDataJSON extends AcmsCommonJSON {
public
List
<
TaskDto
>
taskDtoList
;
public
List
<
TaskDto
>
taskDtoList
;
public
Date
lastEditDate
;
public
Date
lastEditDate
;
// #32926 start
public
static
final
String
TaskReportLevel
=
"taskReportLevel"
;
// #32926 end
public
OperationDataJSON
(
String
jsonString
)
throws
AcmsException
{
public
OperationDataJSON
(
String
jsonString
)
throws
AcmsException
{
super
(
jsonString
);
super
(
jsonString
);
}
}
...
@@ -90,6 +94,11 @@ public class OperationDataJSON extends AcmsCommonJSON {
...
@@ -90,6 +94,11 @@ public class OperationDataJSON extends AcmsCommonJSON {
if
(
taskJson
.
has
(
TaskReportKey
))
{
if
(
taskJson
.
has
(
TaskReportKey
))
{
dto
.
taskReportDto
.
attachedFileName
=
taskJson
.
getString
(
TaskReportKey
);
dto
.
taskReportDto
.
attachedFileName
=
taskJson
.
getString
(
TaskReportKey
);
}
}
// #32926 start
// dto.taskReportLevel = taskJson.getInt(TaskReportLevel);
// #32926 end
taskDtoList
.
add
(
dto
);
taskDtoList
.
add
(
dto
);
}
}
}
}
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/common/ABVEnvironment.java
View file @
94802da9
...
@@ -68,8 +68,12 @@ public class ABVEnvironment {
...
@@ -68,8 +68,12 @@ public class ABVEnvironment {
public
static
final
String
LoginPasswordAESKey
=
"ABook+!\"#$+kooBA"
;
// 桁数を変更しないこと(16桁)
public
static
final
String
LoginPasswordAESKey
=
"ABook+!\"#$+kooBA"
;
// 桁数を変更しないこと(16桁)
public
static
final
String
MacAddressAESKey
=
"aAg+b2o#n0T}ke3c"
;
// 桁数を変更しないこと(16桁)
public
static
final
String
MacAddressAESKey
=
"aAg+b2o#n0T}ke3c"
;
// 桁数を変更しないこと(16桁)
public
static
final
String
APK_FILE_NAME
=
"abook_plus.apk"
;
public
static
final
String
APK_FILE_NAME
=
"abook_plus.apk"
;
public
static
final
String
DIRECTION
=
"direction"
;
// 作業指示のディレクトリ名
// #32926 start
public
static
final
String
REPORT
=
"report"
;
// 作業報告のディレクトリ名
// public static final String DIRECTION = "direction"; // 作業指示のディレクトリ名
// public static final String REPORT = "report"; // 作業報告のディレクトリ名
public
static
final
String
DIRECTION
=
"0"
;
// 作業指示のディレクトリ名
public
static
final
String
REPORT
=
"1"
;
// 作業報告のディレクトリ名
// #32926 end
public
static
final
String
REPORT_SEND
=
"reportSend"
;
// 作業報告のディレクトリ名
public
static
final
String
REPORT_SEND
=
"reportSend"
;
// 作業報告のディレクトリ名
public
static
final
int
AppId
=
3
;
public
static
final
int
AppId
=
3
;
...
@@ -125,7 +129,11 @@ public class ABVEnvironment {
...
@@ -125,7 +129,11 @@ public class ABVEnvironment {
public
static
final
String
OperationDirectionOrReportDirFormat
=
OperationDirFormat
+
"/%s/%s"
;
public
static
final
String
OperationDirectionOrReportDirFormat
=
OperationDirFormat
+
"/%s/%s"
;
public
static
final
String
CacheTempFormat
=
"%s/temp"
;
public
static
final
String
CacheTempFormat
=
"%s/temp"
;
public
static
final
String
TempTaskDirFormat
=
"%s/%d/temp"
;
public
static
final
String
TempTaskDirFormat
=
"%s/%d/temp"
;
// #32926 start
// 作業報告レベル(taskReportLevel)によってディレクトリを追加する
public
static
final
String
TempTaskKeyDirFormat
=
TempTaskDirFormat
+
"/%s"
;
public
static
final
String
TempTaskKeyDirFormat
=
TempTaskDirFormat
+
"/%s"
;
// public static final String TempTaskKeyDirFormat = TempTaskDirFormat + "/%s/%s";
// #32926 end
public
static
final
String
SavedOzFileFormat
=
OperationDirectionOrReportDirFormat
+
"/%s"
;
public
static
final
String
SavedOzFileFormat
=
OperationDirectionOrReportDirFormat
+
"/%s"
;
public
static
final
String
RoutineTaskSavedOzFileFormat
=
OperationDirectionOrReportDirFormat
+
"/%d/%s/%s"
;
public
static
final
String
RoutineTaskSavedOzFileFormat
=
OperationDirectionOrReportDirFormat
+
"/%d/%s/%s"
;
...
@@ -636,6 +644,19 @@ public class ABVEnvironment {
...
@@ -636,6 +644,19 @@ public class ABVEnvironment {
return
String
.
format
(
TempTaskFileFormat
,
cacheDirectory
,
contentId
,
taskKey
,
fileName
);
return
String
.
format
(
TempTaskFileFormat
,
cacheDirectory
,
contentId
,
taskKey
,
fileName
);
}
}
// #32926 start
/**
* 臨時保存したファイルパス
* @param contentId
* @param taskKey
* @param fileName
* @return ファイルパス
*/
// public String getTempFilePath(long contentId, String taskKey, String taskReportLevel, String fileName) {
// return String.format(TempTaskFileFormat + "/%s", cacheDirectory, contentId, taskKey, taskReportLevel, fileName);
// }
// #32926 end
/**
/**
* * 臨時保存したタスクキーのディレクトリファイルパス
* * 臨時保存したタスクキーのディレクトリファイルパス
* 例)../caches/[contentId]/temp/[task_key]
* 例)../caches/[contentId]/temp/[task_key]
...
@@ -696,6 +717,7 @@ public class ABVEnvironment {
...
@@ -696,6 +717,7 @@ public class ABVEnvironment {
}
}
public
String
getAttachedMoviesFilePath
(
long
contentId
)
{
public
String
getAttachedMoviesFilePath
(
long
contentId
)
{
Logger
.
d
(
TAG
,
"cacheDirectory : "
+
cacheDirectory
);
return
String
.
format
(
AttachedMoviesDirFormat
,
cacheDirectory
,
contentId
);
return
String
.
format
(
AttachedMoviesDirFormat
,
cacheDirectory
,
contentId
);
}
}
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/common/constant/ABookKeys.java
View file @
94802da9
...
@@ -122,4 +122,8 @@ public class ABookKeys {
...
@@ -122,4 +122,8 @@ public class ABookKeys {
public
static
final
String
ADD_REPORT
=
"addReport"
;
// 作業追加区分
public
static
final
String
ADD_REPORT
=
"addReport"
;
// 作業追加区分
public
static
final
String
CMD_LOCAL_SAVE_TASK_REPORT
=
"localSaveTaskReport"
;
// 一時保存
public
static
final
String
CMD_LOCAL_SAVE_TASK_REPORT
=
"localSaveTaskReport"
;
// 一時保存
// #32861 作業情報追加 end
// #32861 作業情報追加 end
// #32926 start
public
static
final
String
TASK_REPORT_LEVEL
=
"taskReportLevel"
;
// 作業報告レベル(0:報告、1:報告(回答)、2:報告(回答))
public
static
final
String
TASK_HAS_AUTHORITY
=
"taskHasAuthority"
;
// #32926 end
}
}
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/dao/TaskDao.java
View file @
94802da9
...
@@ -48,6 +48,12 @@ public class TaskDao extends AbstractDao {
...
@@ -48,6 +48,12 @@ public class TaskDao extends AbstractDao {
if
(
column
!=
-
1
)
{
if
(
column
!=
-
1
)
{
dto
.
delFlg
=
toBool
(
cursor
.
getInt
(
column
));
dto
.
delFlg
=
toBool
(
cursor
.
getInt
(
column
));
}
}
// #32926 start
column
=
cursor
.
getColumnIndex
(
"task_has_Authority"
);
if
(
column
!=
-
1
)
{
dto
.
taskHasAuthority
=
toBool
(
cursor
.
getInt
(
column
));
}
// #32926 end
return
dto
;
return
dto
;
}
}
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/dto/TaskDto.java
View file @
94802da9
...
@@ -26,6 +26,10 @@ public class TaskDto extends AbstractDto {
...
@@ -26,6 +26,10 @@ public class TaskDto extends AbstractDto {
public
int
taskReportId
;
public
int
taskReportId
;
public
List
<
RoutineTaskReportDto
>
RoutineTaskReportList
;
public
List
<
RoutineTaskReportDto
>
RoutineTaskReportList
;
// #32926 start
public
boolean
taskHasAuthority
;
// タスク別の権限
public
int
taskReportLevel
;
// 作業報告階層
// #32926 end
@Override
@Override
public
Object
[]
getInsertValues
()
{
public
Object
[]
getInsertValues
()
{
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/OperationLogic.java
View file @
94802da9
...
@@ -274,6 +274,14 @@ public class OperationLogic extends AbstractLogic {
...
@@ -274,6 +274,14 @@ public class OperationLogic extends AbstractLogic {
String
tempDirPath
=
ABVEnvironment
.
getInstance
().
getTempTaskDirPath
(
contentId
,
taskKey
);
String
tempDirPath
=
ABVEnvironment
.
getInstance
().
getTempTaskDirPath
(
contentId
,
taskKey
);
// #32926 start
// TODO 一時的理療する削除対象
// test start
int
taskReportLevel
=
0
;
// test end
// tempDirPath = String.format(tempDirPath + "/%s", String.valueOf(taskReportLevel));
// #32926 end
//添付ファイル変更の場合、以下の処理を行う
//添付ファイル変更の場合、以下の処理を行う
JSONObject
attachedListJson
=
taskDirectionsJson
.
getJSONObject
(
"attached"
);
JSONObject
attachedListJson
=
taskDirectionsJson
.
getJSONObject
(
"attached"
);
List
<
String
>
attachedFileNames
=
JSONObject
.
getValues
(
attachedListJson
);
List
<
String
>
attachedFileNames
=
JSONObject
.
getValues
(
attachedListJson
);
...
@@ -354,6 +362,13 @@ public class OperationLogic extends AbstractLogic {
...
@@ -354,6 +362,13 @@ public class OperationLogic extends AbstractLogic {
mTaskDirectionsDao
.
update
(
taskDirectionsDto
);
mTaskDirectionsDao
.
update
(
taskDirectionsDto
);
mTaskDao
.
update
(
taskDto
);
mTaskDao
.
update
(
taskDto
);
String
tempDirPath
=
ABVEnvironment
.
getInstance
().
getTempTaskDirPath
(
contentId
,
taskKey
);
String
tempDirPath
=
ABVEnvironment
.
getInstance
().
getTempTaskDirPath
(
contentId
,
taskKey
);
// #32926 start
// TODO 一時的理療する削除対象
// test start
int
taskReportLevel
=
0
;
// test end
// tempDirPath = String.format(tempDirPath + "/%s", String.valueOf(taskReportLevel));
// #32926 end
String
operationDrectionOrReportDirPath
=
ABVEnvironment
.
getInstance
().
getOperationDirectionOrReportDirPath
(
operationId
,
taskKey
,
true
);
String
operationDrectionOrReportDirPath
=
ABVEnvironment
.
getInstance
().
getOperationDirectionOrReportDirPath
(
operationId
,
taskKey
,
true
);
if
(
taskDirectionsDto
.
attachedFileSendFlg
)
{
if
(
taskDirectionsDto
.
attachedFileSendFlg
)
{
//添付ファイル変更の場合、以下の処理を行う
//添付ファイル変更の場合、以下の処理を行う
...
@@ -513,7 +528,10 @@ public class OperationLogic extends AbstractLogic {
...
@@ -513,7 +528,10 @@ public class OperationLogic extends AbstractLogic {
}
}
}
}
*/
*/
public
void
insertTaskReport
(
String
taskKey
,
long
operationId
,
long
contentId
,
JSONObject
taskReportJson
,
String
localAttachedFileName
,
boolean
attachedChangeFlag
,
boolean
dataSendFlg
)
throws
IOException
{
// #32926 start
// TODO parameter 追加 taskReportLevel
public
void
insertTaskReport
(
String
taskKey
,
long
operationId
,
long
contentId
,
JSONObject
taskReportJson
,
String
localAttachedFileName
,
boolean
attachedChangeFlag
,
boolean
dataSendFlg
,
int
taskReportLevel
)
throws
IOException
{
// #32926 end
TaskDto
taskDto
=
mTaskDao
.
getTaskByTaskKey
(
taskKey
);
TaskDto
taskDto
=
mTaskDao
.
getTaskByTaskKey
(
taskKey
);
if
(
taskDto
==
null
)
{
if
(
taskDto
==
null
)
{
//TODO error
//TODO error
...
@@ -555,6 +573,12 @@ public class OperationLogic extends AbstractLogic {
...
@@ -555,6 +573,12 @@ public class OperationLogic extends AbstractLogic {
//添付ファイル変更の場合、以下の処理を行う
//添付ファイル変更の場合、以下の処理を行う
String
tempDirPath
=
ABVEnvironment
.
getInstance
().
getTempTaskDirPath
(
contentId
,
taskKey
);
String
tempDirPath
=
ABVEnvironment
.
getInstance
().
getTempTaskDirPath
(
contentId
,
taskKey
);
// #32926 start
// test start
taskReportLevel
=
0
;
// test end
// tempDirPath = String.format(tempDirPath + "/%s", String.valueOf(taskReportLevel));
// #32926 end
String
operationDrectionOrReportDirPath
=
ABVEnvironment
.
getInstance
().
getOperationDirectionOrReportDirPath
(
operationId
,
taskKey
,
false
);
String
operationDrectionOrReportDirPath
=
ABVEnvironment
.
getInstance
().
getOperationDirectionOrReportDirPath
(
operationId
,
taskKey
,
false
);
JSONObject
attachedListJson
=
taskReportJson
.
getJSONObject
(
"attached"
);
JSONObject
attachedListJson
=
taskReportJson
.
getJSONObject
(
"attached"
);
...
@@ -606,6 +630,13 @@ public class OperationLogic extends AbstractLogic {
...
@@ -606,6 +630,13 @@ public class OperationLogic extends AbstractLogic {
//添付ファイル変更の場合、以下の処理を行う
//添付ファイル変更の場合、以下の処理を行う
String
strReportStartDate
=
DateTimeUtil
.
toString_yyyyMMddHHmmss_none
(
routineTaskReportDto
.
reportStartDate
);
String
strReportStartDate
=
DateTimeUtil
.
toString_yyyyMMddHHmmss_none
(
routineTaskReportDto
.
reportStartDate
);
String
tempDirPath
=
ABVEnvironment
.
getInstance
().
getTempTaskDirPath
(
contentId
,
routineTaskReportDto
.
taskKey
);
String
tempDirPath
=
ABVEnvironment
.
getInstance
().
getTempTaskDirPath
(
contentId
,
routineTaskReportDto
.
taskKey
);
// #32926 start
// TODO 一時的理療する削除対象
// test start
int
taskReportLevel
=
0
;
// test end
// tempDirPath = String.format(tempDirPath + "/%s", String.valueOf(taskReportLevel));
// #32926 end
String
routineTaskReportDirPath
=
ABVEnvironment
.
getInstance
().
getRoutineTaskReportDirFilePath
(
operationId
,
routineTaskReportDto
.
taskKey
,
routineTaskReportDto
.
taskReportId
,
strReportStartDate
);
String
routineTaskReportDirPath
=
ABVEnvironment
.
getInstance
().
getRoutineTaskReportDirFilePath
(
operationId
,
routineTaskReportDto
.
taskKey
,
routineTaskReportDto
.
taskReportId
,
strReportStartDate
);
if
(!
StringUtil
.
isNullOrEmpty
(
routineTaskReportDto
.
jsonData
))
{
if
(!
StringUtil
.
isNullOrEmpty
(
routineTaskReportDto
.
jsonData
))
{
...
@@ -725,11 +756,17 @@ public class OperationLogic extends AbstractLogic {
...
@@ -725,11 +756,17 @@ public class OperationLogic extends AbstractLogic {
}
}
}
}
*/
*/
public
void
updateTaskReport
(
String
taskKey
,
long
operationId
,
long
contentId
,
JSONObject
taskReport
,
String
localAttachedFileName
,
boolean
attachedChangeFlag
,
boolean
dataSendFlg
)
throws
IOException
{
// #32926 start
// TODO parameter taskReportLevel 追加
public
void
updateTaskReport
(
String
taskKey
,
long
operationId
,
long
contentId
,
JSONObject
taskReport
,
String
localAttachedFileName
,
boolean
attachedChangeFlag
,
boolean
dataSendFlg
,
int
taskReportLevel
)
throws
IOException
{
// #32926 end
TaskReportDto
taskReportDto
=
mTaskReportDao
.
getTaskReport
(
taskKey
);
TaskReportDto
taskReportDto
=
mTaskReportDao
.
getTaskReport
(
taskKey
);
if
(
taskReportDto
==
null
)
{
if
(
taskReportDto
==
null
)
{
Logger
.
w
(
TAG
,
"taskReportDto is null"
);
Logger
.
w
(
TAG
,
"taskReportDto is null"
);
insertTaskReport
(
taskKey
,
operationId
,
contentId
,
taskReport
,
localAttachedFileName
,
attachedChangeFlag
,
dataSendFlg
);
// #32926 start
// TODO parameter taskReportLevel 追加
insertTaskReport
(
taskKey
,
operationId
,
contentId
,
taskReport
,
localAttachedFileName
,
attachedChangeFlag
,
dataSendFlg
,
taskReportLevel
);
// #32926 end
return
;
return
;
}
}
JSONObject
taskJson
=
taskReport
.
getJSONObject
(
"task"
);
JSONObject
taskJson
=
taskReport
.
getJSONObject
(
"task"
);
...
@@ -762,6 +799,13 @@ public class OperationLogic extends AbstractLogic {
...
@@ -762,6 +799,13 @@ public class OperationLogic extends AbstractLogic {
mTaskReportDao
.
update
(
taskReportDto
);
mTaskReportDao
.
update
(
taskReportDto
);
mTaskDao
.
update
(
taskDto
);
mTaskDao
.
update
(
taskDto
);
String
tempDirPath
=
ABVEnvironment
.
getInstance
().
getTempTaskDirPath
(
contentId
,
taskKey
);
String
tempDirPath
=
ABVEnvironment
.
getInstance
().
getTempTaskDirPath
(
contentId
,
taskKey
);
// #32926 start
// test start
taskReportLevel
=
0
;
// test end
// tempDirPath = String.format(tempDirPath + "/%d", taskReportLevel);
// #32926 end
String
operationDrectionOrReportDirPath
=
ABVEnvironment
.
getInstance
().
getOperationDirectionOrReportDirPath
(
operationId
,
taskKey
,
false
);
String
operationDrectionOrReportDirPath
=
ABVEnvironment
.
getInstance
().
getOperationDirectionOrReportDirPath
(
operationId
,
taskKey
,
false
);
if
(
taskReportDto
.
attachedFileSendFlg
)
{
if
(
taskReportDto
.
attachedFileSendFlg
)
{
//添付ファイル変更の場合、以下の処理を行う
//添付ファイル変更の場合、以下の処理を行う
...
@@ -836,6 +880,13 @@ public class OperationLogic extends AbstractLogic {
...
@@ -836,6 +880,13 @@ public class OperationLogic extends AbstractLogic {
String
strReportStartDate
=
DateTimeUtil
.
toString_yyyyMMddHHmmss_none
(
routineTaskReportDto
.
reportStartDate
);
String
strReportStartDate
=
DateTimeUtil
.
toString_yyyyMMddHHmmss_none
(
routineTaskReportDto
.
reportStartDate
);
String
tempDirPath
=
ABVEnvironment
.
getInstance
().
getTempTaskDirPath
(
contentId
,
routineTaskReportDto
.
taskKey
);
String
tempDirPath
=
ABVEnvironment
.
getInstance
().
getTempTaskDirPath
(
contentId
,
routineTaskReportDto
.
taskKey
);
// #32926 start
// TODO 一時的理療する削除対象
// test start
int
taskReportLevel
=
0
;
// test end
// tempDirPath = String.format(tempDirPath + "/%s", String.valueOf(taskReportLevel));
// #32926 end
String
routineTaskReportDirPath
=
ABVEnvironment
.
getInstance
().
getRoutineTaskReportDirFilePath
(
operationId
,
routineTaskReportDto
.
taskKey
,
routineTaskReportDto
.
taskReportId
,
strReportStartDate
);
String
routineTaskReportDirPath
=
ABVEnvironment
.
getInstance
().
getRoutineTaskReportDirFilePath
(
operationId
,
routineTaskReportDto
.
taskKey
,
routineTaskReportDto
.
taskReportId
,
strReportStartDate
);
if
(
insertFlg
)
{
if
(
insertFlg
)
{
...
@@ -1010,7 +1061,15 @@ public class OperationLogic extends AbstractLogic {
...
@@ -1010,7 +1061,15 @@ public class OperationLogic extends AbstractLogic {
}
}
// 作業報告のディレクトリ削除
// 作業報告のディレクトリ削除
// #32926 start
// TODO 一時的理療する削除対象
// test start
int
taskReportLevel
=
0
;
// test end
// String tempDirPath = ABVEnvironment.getInstance().getTempTaskDirPath(contentId, taskKey);
// tempDirPath = String.format(tempDirPath + "/%s", String.valueOf(taskReportLevel));
FileUtil
.
delete
(
ABVEnvironment
.
getInstance
().
getTempTaskDirPath
(
contentId
,
taskKey
));
FileUtil
.
delete
(
ABVEnvironment
.
getInstance
().
getTempTaskDirPath
(
contentId
,
taskKey
));
// #32926 end
FileUtil
.
delete
(
ABVEnvironment
.
getInstance
().
getOperationDirectionOrReportDirPath
(
operationId
,
taskKey
,
false
));
FileUtil
.
delete
(
ABVEnvironment
.
getInstance
().
getOperationDirectionOrReportDirPath
(
operationId
,
taskKey
,
false
));
}
}
// #32782 指示者テーブル関連削除 end
// #32782 指示者テーブル関連削除 end
...
@@ -1030,7 +1089,15 @@ public class OperationLogic extends AbstractLogic {
...
@@ -1030,7 +1089,15 @@ public class OperationLogic extends AbstractLogic {
reportStartDate
=
DateTimeUtil
.
toString_yyyyMMddHHmmss_none
(
dto
.
reportStartDate
);
reportStartDate
=
DateTimeUtil
.
toString_yyyyMMddHHmmss_none
(
dto
.
reportStartDate
);
// 作業報告のディレクトリ削除
// 作業報告のディレクトリ削除
// #32926 start
// TODO 一時的理療する削除対象
// test start
int
taskReportLevel
=
0
;
// test end
// String tempDirPath = ABVEnvironment.getInstance().getTempTaskDirPath(contentId, dto.taskKey);
// tempDirPath = String.format(tempDirPath + "/%s", String.valueOf(taskReportLevel));
FileUtil
.
delete
(
ABVEnvironment
.
getInstance
().
getTempTaskDirPath
(
contentId
,
dto
.
taskKey
));
FileUtil
.
delete
(
ABVEnvironment
.
getInstance
().
getTempTaskDirPath
(
contentId
,
dto
.
taskKey
));
// #32926 end
FileUtil
.
delete
(
ABVEnvironment
.
getInstance
().
getRoutineTaskReportDirFilePath
(
operationId
,
dto
.
taskKey
,
dto
.
taskReportId
,
reportStartDate
));
FileUtil
.
delete
(
ABVEnvironment
.
getInstance
().
getRoutineTaskReportDirFilePath
(
operationId
,
dto
.
taskKey
,
dto
.
taskReportId
,
reportStartDate
));
// 作業報告送信のディレクトリ削除
// 作業報告送信のディレクトリ削除
...
@@ -1061,7 +1128,16 @@ public class OperationLogic extends AbstractLogic {
...
@@ -1061,7 +1128,16 @@ public class OperationLogic extends AbstractLogic {
}
}
// 作業報告のディレクトリ削除
// 作業報告のディレクトリ削除
// 作業報告のディレクトリ削除
// #32926 start
// TODO 一時的理療する削除対象
// test start
int
taskReportLevel
=
0
;
// test end
// String tempDirPath = ABVEnvironment.getInstance().getTempTaskDirPath(contentId, taskKey);
// tempDirPath = String.format(tempDirPath + "/%s", String.valueOf(taskReportLevel));
FileUtil
.
delete
(
ABVEnvironment
.
getInstance
().
getTempTaskDirPath
(
contentId
,
taskKey
));
FileUtil
.
delete
(
ABVEnvironment
.
getInstance
().
getTempTaskDirPath
(
contentId
,
taskKey
));
// #32926 end
FileUtil
.
delete
(
ABVEnvironment
.
getInstance
().
getRoutineTaskReportDirFilePath
(
operationId
,
taskKey
,
taskReportId
,
reportStartDate
));
FileUtil
.
delete
(
ABVEnvironment
.
getInstance
().
getRoutineTaskReportDirFilePath
(
operationId
,
taskKey
,
taskReportId
,
reportStartDate
));
}
}
...
@@ -1214,13 +1290,15 @@ public class OperationLogic extends AbstractLogic {
...
@@ -1214,13 +1290,15 @@ public class OperationLogic extends AbstractLogic {
public void createJsonForOperationContent(Long operationId, int reportUpdateType, String contentPath, boolean directionsFlg, boolean routineTaskReportFlg) throws IOException {
public void createJsonForOperationContent(Long operationId, int reportUpdateType, String contentPath, boolean directionsFlg, boolean routineTaskReportFlg) throws IOException {
try {
try {
// #32782 指示者テーブル関連削除 start
// #32782 指示者テーブル関連削除 start
createTaskReportJson(operationId, contentPath);
// 作業タイプは
createTaskReportSuggestJson(operationId, contentPath);
// 0:報告、1: 定期点検、2:報告&報告(回答)
if (!directionsFlg) {
// 報告と報告&報告(回答)、定期点検のjson作成の処理を分ける
if (routineTaskReportFlg) {
if (routineTaskReportFlg) {
createRoutineTaskReportJson(operationId, contentPath);
createRoutineTaskReportJson(operationId, contentPath);
}
} else {
createTaskReportJson(operationId, contentPath);
}
}
createTaskReportSuggestJson(operationId, contentPath);
// #32782 指示者テーブル関連削除 end
// #32782 指示者テーブル関連削除 end
createHopSpotJson(operationId, contentPath);
createHopSpotJson(operationId, contentPath);
...
@@ -1326,19 +1404,14 @@ public class OperationLogic extends AbstractLogic {
...
@@ -1326,19 +1404,14 @@ public class OperationLogic extends AbstractLogic {
}
}
// #32926 start
// #32926 start
// 作業タイプを確認してJSONファイルを作成する
// TODO taskGroup -> taskGroup_%s に変更
int
operationType
=
mOperationDao
.
getOperation
(
operationId
).
operationReportType
;
// 報告と報告(回答)のデータの区分が必要なので、「taskGroup_0」と「taskGroup_1」で形式で作成
// 作業タイプは報告と報告(Type3)の場合
// if (taskReportLevel > 0) {
if
(
operationType
==
Constant
.
OperationReportType
.
REPORT_TYPE
)
{
// taskGroupJson.append(String.format("taskGroup_%s", String.valueOf(taskReportLevel)), workerGroupJsonList);
taskGroupJson
.
put
(
"taskGroup_0"
,
workerGroupJsonList
);
// } else {
taskGroupJson
.
put
(
"taskGroup_1"
,
workerGroupJsonList
);
// taskGroupJson.put(String.format("taskGroup_%s", taskReportLevel), workerGroupJsonList);
// 作業タイプは報告(Type1)の場合
// }
}
else
if
(
operationType
==
Constant
.
OperationReportType
.
DEFAULT
)
{
taskGroupJson
.
put
(
"taskGroup"
,
workerGroupJsonList
);
taskGroupJson
.
put
(
"taskGroup_1"
,
workerGroupJsonList
);
// その以外の作業タイプの場合
}
else
{
taskGroupJson
.
put
(
"taskGroup"
,
workerGroupJsonList
);
}
Logger
.
d
(
TAG
,
"createWorkerGroupJson : "
+
taskGroupJson
.
toString
());
Logger
.
d
(
TAG
,
"createWorkerGroupJson : "
+
taskGroupJson
.
toString
());
// #32926 end
// #32926 end
FileUtil
.
createFile
(
contentPath
+
"/workerGroup.json"
,
taskGroupJson
.
toString
());
FileUtil
.
createFile
(
contentPath
+
"/workerGroup.json"
,
taskGroupJson
.
toString
());
...
@@ -1430,30 +1503,40 @@ public class OperationLogic extends AbstractLogic {
...
@@ -1430,30 +1503,40 @@ public class OperationLogic extends AbstractLogic {
}
}
/**
* 作業指示、作業報告用のjsonファイル
* 報告と報告(回答)のデータの区分が必要なので、「taskReport_0」と「taskReport_1」で形式で作成
* 報告(回答)の場合はtaskReport_1を作成
*
* @param operationId
* @param contentPath
* @throws IOException
*/
public
void
createTaskReportJson
(
Long
operationId
,
String
contentPath
)
throws
IOException
{
public
void
createTaskReportJson
(
Long
operationId
,
String
contentPath
)
throws
IOException
{
List
<
JSONObject
>
taskReportJsonList
=
new
ArrayList
<
JSONObject
>();
List
<
JSONObject
>
taskReportJsonList
=
new
ArrayList
<
JSONObject
>();
JSONObject
taskReportJson
=
new
JSONObject
();
JSONObject
taskReportJson
=
new
JSONObject
();
List
<
TaskReportDto
>
taskReportDtoList
=
mTaskReportDao
.
getTaskReportByOperationId
(
operationId
);
List
<
TaskReportDto
>
taskReportDtoList
=
mTaskReportDao
.
getTaskReportByOperationId
(
operationId
);
// #32926 start
for
(
TaskReportDto
dto
:
taskReportDtoList
)
{
for
(
TaskReportDto
dto
:
taskReportDtoList
)
{
taskReportJson
.
put
(
ABookKeys
.
TASK_KEY
,
dto
.
taskKey
);
if
(
dto
.
jsonData
!=
null
&&
dto
.
jsonData
.
length
()
>
0
)
{
if
(
dto
.
jsonData
!=
null
&&
dto
.
jsonData
.
length
()
>
0
)
{
taskReportJsonList
.
add
(
new
JSONObject
(
dto
.
jsonData
));
taskReportJsonList
.
add
(
new
JSONObject
(
dto
.
jsonData
));
}
}
}
// TODO append taskHasAuthority が必要
// #32926 start
// TaskDto taskDto = mTaskDao.getTaskByTaskKey(dto.taskKey);
int
operationType
=
mOperationDao
.
getOperation
(
operationId
).
operationReportType
;
// taskReportJson.put(ABookKeys.TASK_HAS_AUTHORITY, taskDto.taskHasAuthority);
// 現在の作業タイプは報告と報告(Type3)の場合
// taskReportJsonList.add(taskReportJson);
if
(
operationType
==
Constant
.
OperationReportType
.
REPORT_TYPE
)
{
}
taskReportJson
.
put
(
"taskReport_0"
,
taskReportJsonList
);
// TODO taskReport -> taskReport_%s に変更
taskReportJson
.
put
(
"taskReport_1"
,
taskReportJsonList
);
// if (taskReportLevel > 0) {
}
else
if
(
operationType
==
Constant
.
OperationReportType
.
ROUTINE_TASK
)
{
// taskReportJson.append(String.format("taskReport_%s", String.valueOf(taskReportLevel)), taskReportJsonList);
taskReportJson
.
put
(
"taskReport"
,
taskReportJsonList
);
// } else {
}
else
{
// taskReportJson.put(String.format("taskReport_%s", taskReportLevel), taskReportJsonList);
taskReportJson
.
put
(
"taskReport_1"
,
taskReportJsonList
);
// }
}
taskReportJson
.
put
(
"taskReport"
,
taskReportJsonList
);
// #32926 end
Logger
.
d
(
TAG
,
"createTaskReportJson : "
+
taskReportJson
.
toString
());
Logger
.
d
(
TAG
,
"createTaskReportJson : "
+
taskReportJson
.
toString
());
// #32926 end
FileUtil
.
createFile
(
contentPath
+
"/"
+
ABookKeys
.
TASK_REPORT
+
".json"
,
taskReportJson
.
toString
());
FileUtil
.
createFile
(
contentPath
+
"/"
+
ABookKeys
.
TASK_REPORT
+
".json"
,
taskReportJson
.
toString
());
}
}
...
@@ -1462,29 +1545,28 @@ public class OperationLogic extends AbstractLogic {
...
@@ -1462,29 +1545,28 @@ public class OperationLogic extends AbstractLogic {
JSONObject
taskReportJsonRoot
=
new
JSONObject
();
JSONObject
taskReportJsonRoot
=
new
JSONObject
();
JSONObject
taskReportJsonRow
;
JSONObject
taskReportJsonRow
;
List
<
RoutineTaskReportDto
>
routineTaskReportDtoList
=
mRoutineTaskReportDao
.
getRoutineTaskReportByOperationId
(
operationId
);
List
<
RoutineTaskReportDto
>
routineTaskReportDtoList
=
mRoutineTaskReportDao
.
getRoutineTaskReportByOperationId
(
operationId
);
// #32926 start
// 現在の作業タイプは定期点検の場合
for
(
RoutineTaskReportDto
dto
:
routineTaskReportDtoList
)
{
for
(
RoutineTaskReportDto
dto
:
routineTaskReportDtoList
)
{
taskReportJsonRow
=
new
JSONObject
();
taskReportJsonRow
=
new
JSONObject
();
taskReportJsonRow
.
put
(
ABookKeys
.
TASK_REPORT_ID
,
dto
.
taskReportId
);
taskReportJsonRow
.
put
(
ABookKeys
.
TASK_REPORT_INFO_ID
,
dto
.
taskReportInfoId
);
taskReportJsonRow
.
put
(
ABookKeys
.
TASK_REPORT_INFO_ID
,
dto
.
taskReportInfoId
);
taskReportJsonRow
.
put
(
ABookKeys
.
REPORT_START_DATE
,
DateTimeUtil
.
toStringInTimeZone
(
dto
.
reportStartDate
,
DateTimeFormat
.
yyyyMMddHHmmss_hyphen
,
DateTimeUtil
.
getLocalTimeZone
()));
taskReportJsonRow
.
put
(
ABookKeys
.
REPORT_START_DATE
,
DateTimeUtil
.
toStringInTimeZone
(
dto
.
reportStartDate
,
DateTimeFormat
.
yyyyMMddHHmmss_hyphen
,
DateTimeUtil
.
getLocalTimeZone
()));
taskReportJsonRow
.
put
(
ABookKeys
.
REPORT_END_DATE
,
DateTimeUtil
.
toStringInTimeZone
(
dto
.
reportEndDate
,
DateTimeFormat
.
yyyyMMddHHmmss_hyphen
,
DateTimeUtil
.
getLocalTimeZone
()));
taskReportJsonRow
.
put
(
ABookKeys
.
REPORT_END_DATE
,
DateTimeUtil
.
toStringInTimeZone
(
dto
.
reportEndDate
,
DateTimeFormat
.
yyyyMMddHHmmss_hyphen
,
DateTimeUtil
.
getLocalTimeZone
()));
taskReportJsonRow
.
put
(
ABookKeys
.
REPORTED
,
dto
.
reportedFlag
?
1
:
0
);
List
<
JSONObject
>
taskReportInfoList
=
new
ArrayList
<
JSONObject
>();
List
<
JSONObject
>
taskReportInfoList
=
new
ArrayList
<
JSONObject
>();
if
(!
StringUtil
.
isNullOrEmpty
(
dto
.
jsonData
)){
if
(!
StringUtil
.
isNullOrEmpty
(
dto
.
jsonData
)){
taskReportInfoList
.
add
(
new
JSONObject
(
dto
.
jsonData
));
taskReportInfoList
.
add
(
new
JSONObject
(
dto
.
jsonData
));
}
}
taskReportJsonRow
.
put
(
ABookKeys
.
TASK_REPORT_INFO
,
taskReportInfoList
);
taskReportJsonRow
.
put
(
ABookKeys
.
REPORTED
,
dto
.
reportedFlag
?
1
:
0
);
taskReportJsonList
.
add
(
taskReportJsonRow
);
taskReportJsonList
.
add
(
taskReportJsonRow
);
}
}
// #32926 start
// TODO taskReport -> taskReport_0 に変更
// 現在の作業タイプは報告と報告(Type3)の場合
// taskReportJsonRoot.put("taskReport_0", taskReportJsonList);
if
(
mOperationDao
.
getOperation
(
operationId
).
operationReportType
==
Constant
.
OperationReportType
.
REPORT_TYPE
)
{
taskReportJsonRoot
.
put
(
ABookKeys
.
ENABLE_REPORT_UPDATE
,
mOperationDao
.
getOperation
(
operationId
).
enableReportUpdate
);
taskReportJsonRoot
.
put
(
"taskReport"
,
taskReportJsonList
);
// taskReportJsonRoot.put("taskReport_%s", taskReportLevel, taskReportJsonList);
}
else
{
taskReportJsonRoot
.
put
(
"taskReport"
,
taskReportJsonList
);
}
Logger
.
d
(
TAG
,
"createRoutineTaskReportJson : "
+
taskReportJsonRoot
.
toString
());
Logger
.
d
(
TAG
,
"createRoutineTaskReportJson : "
+
taskReportJsonRoot
.
toString
());
// #32926 end
FileUtil
.
createFile
(
contentPath
+
"/"
+
ABookKeys
.
TASK_REPORT
+
".json"
,
taskReportJsonRoot
.
toString
());
FileUtil
.
createFile
(
contentPath
+
"/"
+
ABookKeys
.
TASK_REPORT
+
".json"
,
taskReportJsonRoot
.
toString
());
}
}
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVContentViewActivity.java
View file @
94802da9
...
@@ -136,6 +136,10 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
...
@@ -136,6 +136,10 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
protected
boolean
mLocalSave
;
// 一時保存情報
protected
boolean
mLocalSave
;
// 一時保存情報
protected
boolean
mAddReport
;
// 作業追加区分
protected
boolean
mAddReport
;
// 作業追加区分
// #32861 作業情報追加 end
// #32861 作業情報追加 end
// #32926 start
// protected String mAttachedChageFlag; // 0:変更なし 1:変更あり
protected
int
mTaskReportLevel
;
// 作業報告レベル(0:報告、1:報告(回答)、2:報告(回答))
// #32926 end
@Override
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
...
@@ -855,6 +859,15 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
...
@@ -855,6 +859,15 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
mCmd
=
abookCheckParam
.
get
(
ABookKeys
.
CMD
);
mCmd
=
abookCheckParam
.
get
(
ABookKeys
.
CMD
);
mTaskKey
=
abookCheckParam
.
get
(
ABookKeys
.
TASK_KEY
);
mTaskKey
=
abookCheckParam
.
get
(
ABookKeys
.
TASK_KEY
);
// #32926 start
// mAttachedChageFlag = abookCheckParam.get(ABookKeys.ATTACHED_CHANGE_FLAG); // 0:変更なし 1:変更あり
if
(
abookCheckParam
.
containsKey
(
ABookKeys
.
TASK_REPORT_LEVEL
))
{
mTaskReportLevel
=
Integer
.
parseInt
(
abookCheckParam
.
get
(
ABookKeys
.
TASK_REPORT_LEVEL
));
// 作業報告レベル
}
else
{
mTaskReportLevel
=
0
;
}
// #32926 end
int
taskReportId
=
0
;
int
taskReportId
=
0
;
String
reportStartDate
=
""
;
String
reportStartDate
=
""
;
...
@@ -864,7 +877,8 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
...
@@ -864,7 +877,8 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
}
}
if
(
StringUtil
.
equalsAny
(
mCmd
,
ABookKeys
.
CMD_INSERT_TASK_DIRECTIONS
,
ABookKeys
.
CMD_UPDATE_TASK_DIRECTIONS
,
ABookKeys
.
CMD_DELETE_TASK_DIRECTIONS
,
ABookKeys
.
CMD_CANCEL_TASK_DIRECTIONS
,
if
(
StringUtil
.
equalsAny
(
mCmd
,
ABookKeys
.
CMD_INSERT_TASK_DIRECTIONS
,
ABookKeys
.
CMD_UPDATE_TASK_DIRECTIONS
,
ABookKeys
.
CMD_DELETE_TASK_DIRECTIONS
,
ABookKeys
.
CMD_CANCEL_TASK_DIRECTIONS
,
ABookKeys
.
CMD_MOVE_HOT_SPOT
,
ABookKeys
.
CMD_INSERT_TASK_REPORT
,
ABookKeys
.
CMD_UPDATE_TASK_REPORT
,
ABookKeys
.
CMD_DELETE_TASK_REPORT
,
ABookKeys
.
CMD_CANCEL_TASK_REPORT
))
{
ABookKeys
.
CMD_MOVE_HOT_SPOT
,
ABookKeys
.
CMD_INSERT_TASK_REPORT
,
ABookKeys
.
CMD_UPDATE_TASK_REPORT
,
ABookKeys
.
CMD_DELETE_TASK_REPORT
,
ABookKeys
.
CMD_CANCEL_TASK_REPORT
,
ABookKeys
.
CMD_LOCAL_SAVE_TASK_REPORT
))
{
boolean
isError
=
false
;
boolean
isError
=
false
;
try
{
try
{
...
@@ -877,9 +891,12 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
...
@@ -877,9 +891,12 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
ABookKeys
.
CMD_UPDATE_TASK_DIRECTIONS
,
ABookKeys
.
CMD_UPDATE_TASK_DIRECTIONS
,
ABookKeys
.
CMD_INSERT_TASK_REPORT
,
ABookKeys
.
CMD_INSERT_TASK_REPORT
,
ABookKeys
.
CMD_UPDATE_TASK_REPORT
,
ABookKeys
.
CMD_UPDATE_TASK_REPORT
,
ABookKeys
.
CMD_MOVE_HOT_SPOT
))
{
ABookKeys
.
CMD_MOVE_HOT_SPOT
,
ABookKeys
.
CMD_LOCAL_SAVE_TASK_REPORT
))
{
String
taskCode
=
""
;
String
taskCode
=
""
;
// #32781 start
// TODO TASK_DIRECTIONSの削除され、TASK_REPORTに変更する
if
(
abookCheckParam
.
get
(
ABookKeys
.
TASK_DIRECTIONS
)
!=
null
)
{
if
(
abookCheckParam
.
get
(
ABookKeys
.
TASK_DIRECTIONS
)
!=
null
)
{
JSONObject
direction
=
new
JSONObject
(
abookCheckParam
.
get
(
ABookKeys
.
TASK_DIRECTIONS
));
JSONObject
direction
=
new
JSONObject
(
abookCheckParam
.
get
(
ABookKeys
.
TASK_DIRECTIONS
));
JSONObject
taskJson
=
direction
.
getJSONObject
(
ABookKeys
.
TASK
);
JSONObject
taskJson
=
direction
.
getJSONObject
(
ABookKeys
.
TASK
);
...
@@ -891,6 +908,7 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
...
@@ -891,6 +908,7 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
}
}
}
}
}
}
// #32781 end
if
(
abookCheckParam
.
get
(
ABookKeys
.
HOT_SPOT
)
!=
null
)
{
if
(
abookCheckParam
.
get
(
ABookKeys
.
HOT_SPOT
)
!=
null
)
{
JSONObject
hotSpot
=
new
JSONObject
(
abookCheckParam
.
get
(
ABookKeys
.
HOT_SPOT
));
JSONObject
hotSpot
=
new
JSONObject
(
abookCheckParam
.
get
(
ABookKeys
.
HOT_SPOT
));
...
@@ -918,7 +936,13 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
...
@@ -918,7 +936,13 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
return
null
;
return
null
;
}
}
};
};
ABookCheckWebViewHelper
.
getInstance
().
doABookCheckParam
(
ABVContentViewActivity
.
this
,
mCmd
,
mTaskKey
,
reportUpdateType
,
abookCheckParam
,
mOperationId
,
mContentPath
,
getContentId
(),
operationDto
.
operationReportType
==
Constant
.
OperationReportType
.
ROUTINE_TASK
,
finishCallback
);
// #32926 start
// ABookCheckWebViewHelper.getInstance().doABookCheckParam(ABVContentViewActivity.this, mCmd, mTaskKey, reportUpdateType, abookCheckParam, mOperationId, mContentPath, getContentId(), operationDto.operationReportType == Constant.OperationReportType.ROUTINE_TASK, finishCallback);
ABookCheckWebViewHelper
.
getInstance
().
doABookCheckParam
(
ABVContentViewActivity
.
this
,
mCmd
,
mTaskKey
,
reportUpdateType
,
abookCheckParam
,
mOperationId
,
mContentPath
,
getContentId
(),
operationDto
.
operationReportType
==
Constant
.
OperationReportType
.
ROUTINE_TASK
,
finishCallback
,
mTaskReportLevel
);
// #32926 end
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
Logger
.
e
(
TAG
,
"doABookCheckParam error"
,
e
);
Logger
.
e
(
TAG
,
"doABookCheckParam error"
,
e
);
}
}
...
@@ -1016,7 +1040,10 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
...
@@ -1016,7 +1040,10 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
boolean
isError
=
false
;
boolean
isError
=
false
;
if
(
data
!=
null
)
{
if
(
data
!=
null
)
{
try
{
try
{
String
imagePath
=
ABVEnvironment
.
getInstance
().
getTempFilePath
(
getContentId
(),
mTaskKey
,
mAttachedFileName
);
// #32926 start
String
imagePath
=
ABVEnvironment
.
getInstance
().
getTempFilePath
(
getContentId
(),
mTaskKey
,
mAttachedFileName
);
// String imagePath = ABVEnvironment.getInstance().getTempFilePath(getContentId(), mTaskKey, String.valueOf(mTaskReportLevel), mAttachedFileName);
// #32926 end
ABookCheckWebViewHelper
.
getInstance
().
decodeToImage
(
data
,
imagePath
);
ABookCheckWebViewHelper
.
getInstance
().
decodeToImage
(
data
,
imagePath
);
//アプリ内のファイルのみ削除(Galleryファイルは削除しない)
//アプリ内のファイルのみ削除(Galleryファイルは削除しない)
if
(
mLocalFile
!=
null
&&
mLocalFile
.
getPath
().
contains
(
getPackageName
()))
{
if
(
mLocalFile
!=
null
&&
mLocalFile
.
getPath
().
contains
(
getPackageName
()))
{
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/OperationListActivity.java
View file @
94802da9
...
@@ -617,6 +617,10 @@ public class OperationListActivity extends ABVUIActivity {
...
@@ -617,6 +617,10 @@ public class OperationListActivity extends ABVUIActivity {
}
}
}
}
// #32926 start
// TODO taskReportLevel の値が確認できたら利用可能
// contentPath = String.format("%s/%s", contentPath, String.valueOf(taskReportLevel));
// #32926 end
// プロジェクトの指示/報告表示時、必要なJSONファイル作成
// プロジェクトの指示/報告表示時、必要なJSONファイル作成
mOperationLogic
.
createJsonForOpenABookCheckPano
(
operationDto
.
operationId
,
operationDto
.
contentId
,
contentPath
);
mOperationLogic
.
createJsonForOpenABookCheckPano
(
operationDto
.
operationId
,
operationDto
.
contentId
,
contentPath
);
mOperationLogic
.
createJsonForOperationContent
(
operationDto
.
operationId
,
0
,
contentPath
,
mOperationAuthLevel
==
OperationAuthLevel
.
OPERATION_INSTRUCTOR
?
true
:
false
,
operationDto
.
operationReportType
==
Constant
.
OperationReportType
.
ROUTINE_TASK
);
mOperationLogic
.
createJsonForOperationContent
(
operationDto
.
operationId
,
0
,
contentPath
,
mOperationAuthLevel
==
OperationAuthLevel
.
OPERATION_INSTRUCTOR
?
true
:
false
,
operationDto
.
operationReportType
==
Constant
.
OperationReportType
.
ROUTINE_TASK
);
...
@@ -995,6 +999,10 @@ public class OperationListActivity extends ABVUIActivity {
...
@@ -995,6 +999,10 @@ public class OperationListActivity extends ABVUIActivity {
taskDirectionJson
=
new
JSONObject
(
taskDto
.
taskDirectionsDto
.
jsonData
);
taskDirectionJson
=
new
JSONObject
(
taskDto
.
taskDirectionsDto
.
jsonData
);
taskDirectionJson
.
put
(
ABookKeys
.
TASK_STATUS
,
taskDto
.
taskStatus
);
taskDirectionJson
.
put
(
ABookKeys
.
TASK_STATUS
,
taskDto
.
taskStatus
);
// #32926 start
int
taskReportLevel
=
taskDto
.
taskReportLevel
;
// #32926 end
int
localTaskIndex
=
localTaskList
.
indexOf
(
taskDto
);
int
localTaskIndex
=
localTaskList
.
indexOf
(
taskDto
);
if
(
localTaskIndex
>=
0
)
{
if
(
localTaskIndex
>=
0
)
{
...
@@ -1011,7 +1019,7 @@ public class OperationListActivity extends ABVUIActivity {
...
@@ -1011,7 +1019,7 @@ public class OperationListActivity extends ABVUIActivity {
// 報告データが存在すると作業報告を更新する
// 報告データが存在すると作業報告を更新する
if
(
taskDto
.
taskReportDto
.
jsonData
!=
null
)
{
if
(
taskDto
.
taskReportDto
.
jsonData
!=
null
)
{
mOperationLogic
.
updateTaskReport
(
taskDto
.
taskKey
,
taskDto
.
operationId
,
operationContentDto
.
contentId
,
mOperationLogic
.
updateTaskReport
(
taskDto
.
taskKey
,
taskDto
.
operationId
,
operationContentDto
.
contentId
,
new
JSONObject
(
taskDto
.
taskReportDto
.
jsonData
),
reportAttachedFileName
,
false
,
false
);
new
JSONObject
(
taskDto
.
taskReportDto
.
jsonData
),
reportAttachedFileName
,
false
,
false
,
taskReportLevel
);
}
}
}
else
{
}
else
{
// 添付ファイルが存在する場合、取得して解凍する。
// 添付ファイルが存在する場合、取得して解凍する。
...
@@ -1025,7 +1033,7 @@ public class OperationListActivity extends ABVUIActivity {
...
@@ -1025,7 +1033,7 @@ public class OperationListActivity extends ABVUIActivity {
taskDirectionJson
,
taskDto
.
taskHotSpotInfo
,
directionsAttachedFileName
,
false
,
false
);
taskDirectionJson
,
taskDto
.
taskHotSpotInfo
,
directionsAttachedFileName
,
false
,
false
);
if
(
taskDto
.
taskReportDto
.
jsonData
!=
null
)
{
if
(
taskDto
.
taskReportDto
.
jsonData
!=
null
)
{
mOperationLogic
.
insertTaskReport
(
taskDto
.
taskKey
,
operationContentDto
.
operationId
,
operationContentDto
.
contentId
,
mOperationLogic
.
insertTaskReport
(
taskDto
.
taskKey
,
operationContentDto
.
operationId
,
operationContentDto
.
contentId
,
new
JSONObject
(
taskDto
.
taskReportDto
.
jsonData
),
reportAttachedFileName
,
false
,
false
);
new
JSONObject
(
taskDto
.
taskReportDto
.
jsonData
),
reportAttachedFileName
,
false
,
false
,
taskReportLevel
);
}
}
}
}
progressCallback
.
callback
(
new
Integer
(
progress
));
progressCallback
.
callback
(
new
Integer
(
progress
));
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/helper/ABookCheckWebViewHelper.java
View file @
94802da9
...
@@ -59,7 +59,21 @@ public class ABookCheckWebViewHelper extends ABookHelper {
...
@@ -59,7 +59,21 @@ public class ABookCheckWebViewHelper extends ABookHelper {
return
panoCheckViewHelper
;
return
panoCheckViewHelper
;
}
}
public
void
doABookCheckParam
(
ABVContentViewActivity
context
,
String
cmd
,
String
taskKey
,
int
reportUpdateType
,
Map
<
String
,
String
>
param
,
long
operationId
,
String
contentPath
,
long
contentId
,
boolean
routineTaskReportFlg
,
Callback
finishCallback
)
throws
IOException
{
/**
* parameterによって処理を分ける
*
* @param context ABVContentViewActivity
* @param cmd
* @param taskKey タスクキー
* @param reportUpdateType
* @param param
* @param operationId プロジェクトID
* @param contentPath
* @param routineTaskReportFlg
* @param finishCallback
* @param taskReportLevel
*/
public
void
doABookCheckParam
(
ABVContentViewActivity
context
,
String
cmd
,
String
taskKey
,
int
reportUpdateType
,
Map
<
String
,
String
>
param
,
long
operationId
,
String
contentPath
,
long
contentId
,
boolean
routineTaskReportFlg
,
Callback
finishCallback
,
int
taskReportLevel
)
throws
IOException
{
int
taskReportSendId
=
0
;
int
taskReportSendId
=
0
;
mFinishCallback
=
finishCallback
;
mFinishCallback
=
finishCallback
;
...
@@ -242,7 +256,12 @@ public class ABookCheckWebViewHelper extends ABookHelper {
...
@@ -242,7 +256,12 @@ public class ABookCheckWebViewHelper extends ABookHelper {
break
;
break
;
case
ABookKeys
.
CMD_CANCEL_TASK_DIRECTIONS
:
case
ABookKeys
.
CMD_CANCEL_TASK_DIRECTIONS
:
case
ABookKeys
.
CMD_CANCEL_TASK_REPORT
:
case
ABookKeys
.
CMD_CANCEL_TASK_REPORT
:
// #32926 start
// TODO 一時的理療する削除対象
// String tempDirPath = ABVEnvironment.getInstance().getTempTaskDirPath(contentId, taskKey);
// tempDirPath = String.format(tempDirPath + "/%d", taskReportLevel);
FileUtil
.
delete
(
ABVEnvironment
.
getInstance
().
getTempTaskDirPath
(
contentId
,
taskKey
));
FileUtil
.
delete
(
ABVEnvironment
.
getInstance
().
getTempTaskDirPath
(
contentId
,
taskKey
));
// #32926 end
mFinishCallback
.
callback
(
false
);
mFinishCallback
.
callback
(
false
);
break
;
break
;
}
}
...
@@ -558,6 +577,13 @@ public class ABookCheckWebViewHelper extends ABookHelper {
...
@@ -558,6 +577,13 @@ public class ABookCheckWebViewHelper extends ABookHelper {
int
taskReportId
=
0
;
int
taskReportId
=
0
;
String
reportStartDate
=
""
;
String
reportStartDate
=
""
;
// #32926 start
int
taskReportLevel
=
0
;
if
(
param
.
containsKey
(
ABookKeys
.
TASK_REPORT_LEVEL
))
{
taskReportLevel
=
Integer
.
valueOf
(
param
.
get
(
ABookKeys
.
TASK_REPORT_LEVEL
));
}
// #32926 end
if
(
routineTaskReportFlg
)
{
if
(
routineTaskReportFlg
)
{
taskReportId
=
Integer
.
valueOf
(
param
.
get
(
ABookKeys
.
TASK_REPORT_ID
));
taskReportId
=
Integer
.
valueOf
(
param
.
get
(
ABookKeys
.
TASK_REPORT_ID
));
reportStartDate
=
param
.
get
(
ABookKeys
.
REPORT_START_DATE
);
reportStartDate
=
param
.
get
(
ABookKeys
.
REPORT_START_DATE
);
...
@@ -570,9 +596,12 @@ public class ABookCheckWebViewHelper extends ABookHelper {
...
@@ -570,9 +596,12 @@ public class ABookCheckWebViewHelper extends ABookHelper {
mOperationLogic
.
updateRoutineTaskReport
(
operationId
,
contentId
,
routineTaskTaskReportDto
,
attachedChangeFlag
,
true
,
insertFlg
,
true
);
mOperationLogic
.
updateRoutineTaskReport
(
operationId
,
contentId
,
routineTaskTaskReportDto
,
attachedChangeFlag
,
true
,
insertFlg
,
true
);
}
else
{
}
else
{
if
(
insertFlg
)
{
if
(
insertFlg
)
{
mOperationLogic
.
insertTaskReport
(
taskKey
,
operationId
,
contentId
,
taskReportJson
,
null
,
attachedChangeFlag
,
true
);
// #32926 start
// mOperationLogic.insertTaskReport(taskKey, operationId, contentId, taskReportJson, null, attachedChangeFlag, true);
mOperationLogic
.
insertTaskReport
(
taskKey
,
operationId
,
contentId
,
taskReportJson
,
null
,
attachedChangeFlag
,
true
,
taskReportLevel
);
// #32926 end
}
else
{
}
else
{
mOperationLogic
.
updateTaskReport
(
taskKey
,
operationId
,
contentId
,
taskReportJson
,
null
,
attachedChangeFlag
,
true
);
mOperationLogic
.
updateTaskReport
(
taskKey
,
operationId
,
contentId
,
taskReportJson
,
null
,
attachedChangeFlag
,
true
,
taskReportLevel
);
}
}
}
}
...
@@ -605,7 +634,12 @@ public class ABookCheckWebViewHelper extends ABookHelper {
...
@@ -605,7 +634,12 @@ public class ABookCheckWebViewHelper extends ABookHelper {
if
(
reportUpdateType
==
Constant
.
OperationUpdateType
.
HISTORY_ADD
)
{
if
(
reportUpdateType
==
Constant
.
OperationUpdateType
.
HISTORY_ADD
)
{
// 作業報告のディレクトリ削除
// 作業報告のディレクトリ削除
// #32926 start
// TODO 一時的理療する削除対象
// String tempDirPath = ABVEnvironment.getInstance().getTempTaskDirPath(contentId, taskKey);
// tempDirPath = String.format(tempDirPath + "/%d", taskReportLevel);
FileUtil
.
delete
(
ABVEnvironment
.
getInstance
().
getTempTaskDirPath
(
contentId
,
taskKey
));
FileUtil
.
delete
(
ABVEnvironment
.
getInstance
().
getTempTaskDirPath
(
contentId
,
taskKey
));
// #32926 start
FileUtil
.
delete
(
ABVEnvironment
.
getInstance
().
getOperationDirectionOrReportDirPath
(
operationId
,
taskKey
,
false
));
FileUtil
.
delete
(
ABVEnvironment
.
getInstance
().
getOperationDirectionOrReportDirPath
(
operationId
,
taskKey
,
false
));
}
}
}
}
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/activity/CheckOZDViewActivity.java
View file @
94802da9
...
@@ -526,7 +526,10 @@ public class CheckOZDViewActivity extends ABVContentViewActivity {
...
@@ -526,7 +526,10 @@ public class CheckOZDViewActivity extends ABVContentViewActivity {
StringBuilder
param
=
new
StringBuilder
();
StringBuilder
param
=
new
StringBuilder
();
param
.
append
(
"export.mode=silent#"
);
param
.
append
(
"export.mode=silent#"
);
param
.
append
(
"export.filename="
+
FileUtil
.
getFilenameWithoutExt
(
mSaveOzdTempFileName
)
+
"#"
);
param
.
append
(
"export.filename="
+
FileUtil
.
getFilenameWithoutExt
(
mSaveOzdTempFileName
)
+
"#"
);
param
.
append
(
"export.path="
+
OzdFileHelper
.
getTempTaskDirPath
(
contentId
,
mTaskKey
)
+
"#"
);
// #32926 start
// param.append("export.path=" + OzdFileHelper.getTempTaskDirPath(contentId, mTaskKey) + "#");
param
.
append
(
"export.path="
+
OzdFileHelper
.
getTempTaskDirPath
(
contentId
,
mTaskKey
)
+
"/"
+
mTaskReportLevel
+
"#"
);
// #32926 end
param
.
append
(
"export.confirmsave=false#"
);
param
.
append
(
"export.confirmsave=false#"
);
param
.
append
(
"export.format=ozd"
);
param
.
append
(
"export.format=ozd"
);
int
result
=
mOzReportViewer
.
ScriptEx
(
"save"
,
param
.
toString
(),
"#"
);
int
result
=
mOzReportViewer
.
ScriptEx
(
"save"
,
param
.
toString
(),
"#"
);
...
...
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