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
2cac1130
Commit
2cac1130
authored
Mar 19, 2019
by
Kim Jinsung
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/1.0.1_32926' into 'feature/1.0.1'
Feature/1.0.1 32926 See merge request
!8
parents
4554093e
1bea882c
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
440 additions
and
170 deletions
+440
-170
ABVJE_BL/src/jp/agentec/abook/abv/bl/acms/client/json/OperationDataJSON.java
+5
-0
ABVJE_BL/src/jp/agentec/abook/abv/bl/common/ABVEnvironment.java
+53
-43
ABVJE_BL/src/jp/agentec/abook/abv/bl/common/Constant.java
+8
-0
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/data/dao/TaskReportDao.java
+5
-2
ABVJE_BL/src/jp/agentec/abook/abv/bl/dto/OperationDto.java
+4
-0
ABVJE_BL/src/jp/agentec/abook/abv/bl/dto/TaskDto.java
+4
-0
ABVJE_BL/src/jp/agentec/abook/abv/bl/dto/TaskReportDto.java
+10
-0
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/OperationLogic.java
+153
-44
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVContentViewActivity.java
+44
-12
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/OperationListActivity.java
+41
-20
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/helper/ABookCheckWebViewHelper.java
+70
-40
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/helper/ActivityHandlingHelper.java
+5
-1
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/helper/OzdFileHelper.java
+8
-4
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/activity/CheckOZDViewActivity.java
+14
-2
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/view/OperationTaskLayout.java
+6
-2
No files found.
ABVJE_BL/src/jp/agentec/abook/abv/bl/acms/client/json/OperationDataJSON.java
View file @
2cac1130
...
@@ -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,7 @@ public class OperationDataJSON extends AcmsCommonJSON {
...
@@ -90,6 +94,7 @@ 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
);
}
}
taskDtoList
.
add
(
dto
);
taskDtoList
.
add
(
dto
);
}
}
}
}
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/common/ABVEnvironment.java
View file @
2cac1130
...
@@ -68,9 +68,7 @@ public class ABVEnvironment {
...
@@ -68,9 +68,7 @@ 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"
;
// 作業指示のディレクトリ名
public
static
final
String
REPORT_SEND
=
"reportSend"
;
// 作業報告のディレクトリ名
public
static
final
String
REPORT
=
"report"
;
// 作業報告のディレクトリ名
public
static
final
String
REPORT_SEND
=
"reportSend"
;
// 作業報告のディレクトリ名
public
static
final
int
AppId
=
3
;
public
static
final
int
AppId
=
3
;
public
static
final
int
DeviceTypeId
=
3
;
public
static
final
int
DeviceTypeId
=
3
;
...
@@ -110,10 +108,6 @@ public class ABVEnvironment {
...
@@ -110,10 +108,6 @@ public class ABVEnvironment {
public
static
final
String
OperationDirFormat
=
"%s/ABook/projects/%d"
;
public
static
final
String
OperationDirFormat
=
"%s/ABook/projects/%d"
;
public
static
final
String
OperationTaskKeyDirFormat
=
"%s/ABook/projects/%d/%s"
;
public
static
final
String
OperationTaskKeyDirFormat
=
"%s/ABook/projects/%d/%s"
;
public
static
final
String
OperationTaskKeyReportSendDirFormat
=
OperationTaskKeyDirFormat
+
"/reportSend/%d"
;
public
static
final
String
OperationTaskKeyRoutineTaskReportSendDirFormat
=
OperationTaskKeyDirFormat
+
"/reportSend/%d/%s/%d"
;
public
static
final
String
OperationTaskKeyRoutineTaskReportSendDirFormatForDelete
=
OperationTaskKeyDirFormat
+
"/reportSend/%d/%s"
;
public
static
final
String
OperationTaskKeyRoutineTaskReportDirFormat
=
OperationTaskKeyDirFormat
+
"/report/%d/%s"
;
public
static
final
String
PanoImageDirFormat
=
"%s/panoImage"
;
public
static
final
String
PanoImageDirFormat
=
"%s/panoImage"
;
public
static
final
String
PanoImageFileFormat
=
"%s/panoImage.zip"
;
public
static
final
String
PanoImageFileFormat
=
"%s/panoImage.zip"
;
public
static
final
String
TaskPdfDirFormat
=
"%s/taskPdf"
;
public
static
final
String
TaskPdfDirFormat
=
"%s/taskPdf"
;
...
@@ -127,8 +121,6 @@ public class ABVEnvironment {
...
@@ -127,8 +121,6 @@ public class ABVEnvironment {
public
static
final
String
TempTaskDirFormat
=
"%s/%d/temp"
;
public
static
final
String
TempTaskDirFormat
=
"%s/%d/temp"
;
public
static
final
String
TempTaskKeyDirFormat
=
TempTaskDirFormat
+
"/%s"
;
public
static
final
String
TempTaskKeyDirFormat
=
TempTaskDirFormat
+
"/%s"
;
public
static
final
String
SavedOzFileFormat
=
OperationDirectionOrReportDirFormat
+
"/%s"
;
public
static
final
String
RoutineTaskSavedOzFileFormat
=
OperationDirectionOrReportDirFormat
+
"/%d/%s/%s"
;
public
static
final
String
DefaultOzFileFormat
=
ContentCacheDirectoryFormat
+
"/%s"
;
public
static
final
String
DefaultOzFileFormat
=
ContentCacheDirectoryFormat
+
"/%s"
;
public
static
final
String
TempTaskFileFormat
=
TempTaskKeyDirFormat
+
"/%s"
;
public
static
final
String
TempTaskFileFormat
=
TempTaskKeyDirFormat
+
"/%s"
;
public
static
final
String
AttachedMoviesDirFormat
=
"%s/%d/attachedMovie"
;
public
static
final
String
AttachedMoviesDirFormat
=
"%s/%d/attachedMovie"
;
...
@@ -136,6 +128,18 @@ public class ABVEnvironment {
...
@@ -136,6 +128,18 @@ public class ABVEnvironment {
public
static
final
String
AttachedMoviesRoutineTaskTypeDir
=
AttachedMoviesDirFormat
+
"/%s/report/%d/%s"
;
public
static
final
String
AttachedMoviesRoutineTaskTypeDir
=
AttachedMoviesDirFormat
+
"/%s/report/%d/%s"
;
public
static
final
String
CacheTempAttachedImageFormat
=
"%s/temp/attachedImage"
;
public
static
final
String
CacheTempAttachedImageFormat
=
"%s/temp/attachedImage"
;
// #32926 作業報告画面改善 start
// 作業報告レベル(taskReportLevel)によってディレクトリを追加する
public
static
final
String
TaskReportLevelDir
=
"/%s"
;
public
static
final
String
SavedOzFileFormat
=
OperationDirectionOrReportDirFormat
+
TaskReportLevelDir
+
"/%s"
;
public
static
final
String
RoutineTaskSavedOzFileFormat
=
OperationDirectionOrReportDirFormat
+
TaskReportLevelDir
+
"/%d/%s/%s"
;
public
static
final
String
OperationTaskKeyReportSendDirFormat
=
OperationTaskKeyDirFormat
+
TaskReportLevelDir
+
"/reportSend/%d"
;
public
static
final
String
OperationTaskKeyRoutineTaskReportSendDirFormat
=
OperationTaskKeyDirFormat
+
TaskReportLevelDir
+
"/reportSend/%d/%s/%d"
;
public
static
final
String
OperationTaskKeyRoutineTaskReportSendDirFormatForDelete
=
OperationTaskKeyDirFormat
+
TaskReportLevelDir
+
"/reportSend/%d/%s"
;
public
static
final
String
OperationTaskKeyRoutineTaskReportDirFormat
=
OperationTaskKeyDirFormat
+
TaskReportLevelDir
+
"/report/%d/%s"
;
// #32926 作業報告画面改善 end
/**
/**
* コンテンツのファイルを暗号化するときに、暗号化するサイズをバイト単位で指定します。
* コンテンツのファイルを暗号化するときに、暗号化するサイズをバイト単位で指定します。
* @since 1.0.0
* @since 1.0.0
...
@@ -586,20 +590,19 @@ public class ABVEnvironment {
...
@@ -586,20 +590,19 @@ public class ABVEnvironment {
return
String
.
format
(
OperationDirFormat
,
rootDirectory
,
operationId
);
return
String
.
format
(
OperationDirFormat
,
rootDirectory
,
operationId
);
}
}
/**
// #32926 作業報告画面改善 start
* 保存されたOZファイルパス
/**
* @param operationId
* 保存されたOZファイルパス
* @param taskKey
* @param operationId
* @param fileName
* @param taskKey
* @param directionFlg 指示者(true)と報告者(false)
* @param fileName
* @return ファイルパス
* @param taskReportLevel
*/
* @return ファイルパス
public
String
getSavedOzFilePath
(
long
operationId
,
String
taskKey
,
String
fileName
,
boolean
directionFlg
)
{
*/
if
(
directionFlg
)
{
public
String
getSavedOzFileTaskReportLevelPath
(
long
operationId
,
String
taskKey
,
String
fileName
,
String
taskReportLevel
)
{
return
String
.
format
(
SavedOzFileFormat
,
rootDirectory
,
operationId
,
taskKey
,
"direction"
,
fileName
);
return
String
.
format
(
SavedOzFileFormat
,
rootDirectory
,
operationId
,
taskKey
,
taskReportLevel
,
"report"
,
fileName
);
}
}
return
String
.
format
(
SavedOzFileFormat
,
rootDirectory
,
operationId
,
taskKey
,
"report"
,
fileName
);
// #32926 作業報告画面改善 end
}
/**
/**
* 保存されたOZファイルパス、定期点検用
* 保存されたOZファイルパス、定期点検用
...
@@ -610,8 +613,10 @@ public class ABVEnvironment {
...
@@ -610,8 +613,10 @@ public class ABVEnvironment {
* @param fileName
* @param fileName
* @return
* @return
*/
*/
public
String
getRoutineTaskSavedOzFilePath
(
long
operationId
,
String
taskKey
,
int
taskReportId
,
String
reportStartDate
,
String
fileName
)
{
public
String
getRoutineTaskSavedOzFilePath
(
long
operationId
,
String
taskKey
,
int
taskReportId
,
String
reportStartDate
,
String
fileName
,
String
taskReportLevel
)
{
return
String
.
format
(
RoutineTaskSavedOzFileFormat
,
rootDirectory
,
operationId
,
taskKey
,
"report"
,
taskReportId
,
reportStartDate
,
fileName
);
// #32926 作業報告画面改善 start
return
String
.
format
(
RoutineTaskSavedOzFileFormat
,
rootDirectory
,
operationId
,
taskKey
,
taskReportLevel
,
"report"
,
taskReportId
,
reportStartDate
,
fileName
);
// #32926 作業報告画面改善 end
}
}
/**
/**
...
@@ -668,43 +673,48 @@ public class ABVEnvironment {
...
@@ -668,43 +673,48 @@ public class ABVEnvironment {
return
String
.
format
(
OperationTaskKeyDirFormat
,
rootDirectory
,
operationId
,
taskKey
);
return
String
.
format
(
OperationTaskKeyDirFormat
,
rootDirectory
,
operationId
,
taskKey
);
}
}
public
String
getOperationTaskReportSendDirFilePath
(
long
operationId
,
String
taskKey
,
int
taskReportSendId
)
{
// #32926 作業報告画面改善 start
return
String
.
format
(
OperationTaskKeyReportSendDirFormat
,
rootDirectory
,
operationId
,
taskKey
,
taskReportSendId
);
// taskReportLevelの値によってディレクトリを構成
public
String
getOperationTaskReportSendDirFilePath
(
long
operationId
,
String
taskKey
,
int
taskReportSendId
,
int
taskReportLevel
)
{
return
String
.
format
(
OperationTaskKeyReportSendDirFormat
,
rootDirectory
,
operationId
,
taskKey
,
String
.
valueOf
(
taskReportLevel
),
taskReportSendId
);
}
}
public
String
getRoutineTaskReportSendDirFilePath
(
long
operationId
,
String
taskKey
,
int
taskReportId
,
String
reportStartDate
)
{
public
String
getRoutineTaskReportSendDirFilePath
(
long
operationId
,
String
taskKey
,
int
taskReportId
,
String
reportStartDate
,
int
taskReportLevel
)
{
return
String
.
format
(
OperationTaskKeyRoutineTaskReportSendDirFormatForDelete
,
rootDirectory
,
operationId
,
taskKey
,
taskReportId
,
getReportDate
(
reportStartDate
));
return
String
.
format
(
OperationTaskKeyRoutineTaskReportSendDirFormatForDelete
,
rootDirectory
,
operationId
,
taskKey
,
String
.
valueOf
(
taskReportLevel
),
taskReportId
,
getReportDate
(
reportStartDate
));
}
}
public
String
getRoutineTaskReportSendDirFilePath
(
long
operationId
,
String
taskKey
,
int
taskReportId
,
String
reportStartDate
,
int
taskReportSendId
)
{
public
String
getRoutineTaskReportSendDirFilePath
(
long
operationId
,
String
taskKey
,
int
taskReportId
,
String
reportStartDate
,
int
taskReportSendId
,
int
taskReportLevel
)
{
return
String
.
format
(
OperationTaskKeyRoutineTaskReportSendDirFormat
,
rootDirectory
,
operationId
,
taskKey
,
taskReportId
,
getReportDate
(
reportStartDate
),
taskReportSendId
);
return
String
.
format
(
OperationTaskKeyRoutineTaskReportSendDirFormat
,
rootDirectory
,
operationId
,
taskKey
,
String
.
valueOf
(
taskReportLevel
),
taskReportId
,
getReportDate
(
reportStartDate
),
taskReportSendId
);
}
}
public
String
getRoutineTaskReportDirFilePath
(
long
operationId
,
String
taskKey
,
int
taskReportId
,
String
reportStartDate
)
{
public
String
getRoutineTaskReportDirFilePath
(
long
operationId
,
String
taskKey
,
int
taskReportId
,
String
reportStartDate
,
int
taskReportLevel
)
{
return
String
.
format
(
OperationTaskKeyRoutineTaskReportDirFormat
,
rootDirectory
,
operationId
,
taskKey
,
taskReportId
,
getReportDate
(
reportStartDate
));
return
String
.
format
(
OperationTaskKeyRoutineTaskReportDirFormat
,
rootDirectory
,
operationId
,
taskKey
,
String
.
valueOf
(
taskReportLevel
),
taskReportId
,
getReportDate
(
reportStartDate
));
}
}
public
String
getOperationDirectionOrReportDirPath
(
long
operationId
,
String
taskKey
,
boolean
directionFlg
)
{
public
String
getOperationDirectionOrReportDirPath
(
long
operationId
,
String
taskKey
,
String
taskReportLevel
)
{
if
(
directionFlg
)
{
return
String
.
format
(
OperationDirectionOrReportDirFormat
,
rootDirectory
,
operationId
,
taskKey
,
taskReportLevel
);
return
String
.
format
(
OperationDirectionOrReportDirFormat
,
rootDirectory
,
operationId
,
taskKey
,
DIRECTION
);
}
}
return
String
.
format
(
OperationDirectionOrReportDirFormat
,
rootDirectory
,
operationId
,
taskKey
,
REPORT
);
public
String
getOperationTaskReportLevelDirPath
(
long
operationId
,
String
taskKey
,
String
taskReportLevel
)
{
return
String
.
format
(
OperationDirectionOrReportDirFormat
,
rootDirectory
,
operationId
,
taskKey
,
taskReportLevel
);
}
}
// #32926 作業報告画面改善 end
public
String
getOperationReportSendDirPath
(
long
operationId
,
String
taskKey
)
{
public
String
getOperationReportSendDirPath
(
long
operationId
,
String
taskKey
)
{
return
String
.
format
(
OperationDirectionOrReportDirFormat
,
rootDirectory
,
operationId
,
taskKey
,
REPORT_SEND
);
return
String
.
format
(
OperationDirectionOrReportDirFormat
,
rootDirectory
,
operationId
,
taskKey
,
REPORT_SEND
);
}
}
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
);
}
}
public
String
getAttachedDirectionOrReportDirPath
(
long
contentId
,
String
taskKey
,
boolean
directionFlg
)
{
// #32926 作業報告画面改善 start
if
(
directionFlg
)
{
// taskReportLevelの値によってディレクトリを構成
return
String
.
format
(
AttachedMoviesTaskTypeDir
,
cacheDirectory
,
contentId
,
taskKey
,
DIRECTION
);
public
String
getAttachedDirectionOrReportDirPath
(
long
contentId
,
String
taskKey
,
String
taskReportLevel
)
{
}
return
String
.
format
(
AttachedMoviesTaskTypeDir
,
cacheDirectory
,
contentId
,
taskKey
,
taskReportLevel
);
return
String
.
format
(
AttachedMoviesTaskTypeDir
,
cacheDirectory
,
contentId
,
taskKey
,
REPORT
);
}
}
// #32926 作業報告画面改善 end
public
String
getAttachedRoutineTaskReportDirPath
(
long
contentId
,
String
taskKey
,
int
taskReportId
,
String
reportStartDate
)
{
public
String
getAttachedRoutineTaskReportDirPath
(
long
contentId
,
String
taskKey
,
int
taskReportId
,
String
reportStartDate
)
{
return
String
.
format
(
AttachedMoviesRoutineTaskTypeDir
,
cacheDirectory
,
contentId
,
taskKey
,
taskReportId
,
getReportDate
(
reportStartDate
));
return
String
.
format
(
AttachedMoviesRoutineTaskTypeDir
,
cacheDirectory
,
contentId
,
taskKey
,
taskReportId
,
getReportDate
(
reportStartDate
));
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/common/Constant.java
View file @
2cac1130
...
@@ -140,4 +140,12 @@ public class Constant {
...
@@ -140,4 +140,12 @@ public class Constant {
int
Camera
=
2
;
int
Camera
=
2
;
int
Audio
=
3
;
int
Audio
=
3
;
}
}
// #32926 作業報告画面改善 start
public
interface
ReportType
{
int
Report
=
0
;
// 報告
int
Routine
=
1
;
// 定期点検
int
Report_Answer
=
2
;
// 報告(回答)
}
// #32926 作業報告画面改善 end
}
}
ABVJE_BL/src/jp/agentec/abook/abv/bl/common/constant/ABookKeys.java
View file @
2cac1130
...
@@ -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 @
2cac1130
...
@@ -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/data/dao/TaskReportDao.java
View file @
2cac1130
...
@@ -159,9 +159,12 @@ public class TaskReportDao extends AbstractDao {
...
@@ -159,9 +159,12 @@ public class TaskReportDao extends AbstractDao {
// #32782 指示者テーブル関連削除 end
// #32782 指示者テーブル関連削除 end
}
}
public
String
getTaskReportAttachedFileName
(
String
taskKey
)
{
// #32926 作業報告画面改善 start
return
rawQueryGetString
(
"select local_attached_file_name from t_task_report where task_key=?"
,
new
String
[]{
""
+
taskKey
});
// taskReportLevel によって添付ファイルを取得する
public
String
getTaskReportAttachedFileName
(
String
taskKey
,
String
taskReportLevel
)
{
return
rawQueryGetString
(
"select local_attached_file_name from t_task_report where task_key=?"
,
new
String
[]{
""
+
taskKey
,
""
+
taskReportLevel
});
}
}
// #32926 作業報告画面改善 end
public
List
<
TaskReportDto
>
selectByTaskKey
(
String
taskKey
)
{
public
List
<
TaskReportDto
>
selectByTaskKey
(
String
taskKey
)
{
return
rawQueryGetDtoList
(
"select * from t_task_report where task_key=?"
,
new
String
[]{
taskKey
},
TaskReportDto
.
class
);
return
rawQueryGetDtoList
(
"select * from t_task_report where task_key=?"
,
new
String
[]{
taskKey
},
TaskReportDto
.
class
);
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/dto/OperationDto.java
View file @
2cac1130
...
@@ -30,6 +30,10 @@ public class OperationDto extends AbstractDto {
...
@@ -30,6 +30,10 @@ public class OperationDto extends AbstractDto {
public
String
reportPeriod
;
//定期点検、2018/12/20 08:10:00 ~ 2018/12/21 18:10:00
public
String
reportPeriod
;
//定期点検、2018/12/20 08:10:00 ~ 2018/12/21 18:10:00
public
int
reportCount
;
//定期点検、作業数
public
int
reportCount
;
//定期点検、作業数
// #32926 作業報告画面改善 start
public
int
reportType
;
// 作業報告タイプ 0:報告 1:定期点検 2:報告(回答)
// #32926 作業報告画面改善 end
public
boolean
equalsLastEdit
(
OperationDto
dto
)
{
public
boolean
equalsLastEdit
(
OperationDto
dto
)
{
if
(
dto
!=
null
)
{
if
(
dto
!=
null
)
{
if
(
operationId
.
equals
(
dto
.
operationId
)
&&
lastEditDate
.
equals
(
dto
.
lastEditDate
))
{
if
(
operationId
.
equals
(
dto
.
operationId
)
&&
lastEditDate
.
equals
(
dto
.
lastEditDate
))
{
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/dto/TaskDto.java
View file @
2cac1130
...
@@ -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/dto/TaskReportDto.java
View file @
2cac1130
package
jp
.
agentec
.
abook
.
abv
.
bl
.
dto
;
package
jp
.
agentec
.
abook
.
abv
.
bl
.
dto
;
import
java.util.Date
;
/**
/**
* Created by leej on 2018/09/10.
* Created by leej on 2018/09/10.
*/
*/
...
@@ -17,6 +19,14 @@ public class TaskReportDto extends AbstractDto {
...
@@ -17,6 +19,14 @@ public class TaskReportDto extends AbstractDto {
// #32782 指示者テーブル関連削除 start
// #32782 指示者テーブル関連削除 start
public
boolean
reporterFlag
;
public
boolean
reporterFlag
;
public
int
taskReportLevel
;
// 作業報告レベル
public
int
taskHasAuthority
;
// 権限
public
int
taskReportId
;
// 作業報告ID
public
int
taskReportInfoId
;
// 作業報告情報ID
public
Date
reportStartDate
;
// 作業開始日
public
Date
reportEndDate
;
// 作業終了日
public
int
enableReport
;
// 報告可能区分
public
boolean
reportedFlag
;
//
// #32782 指示者テーブル関連削除 end
// #32782 指示者テーブル関連削除 end
@Override
@Override
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/OperationLogic.java
View file @
2cac1130
...
@@ -86,7 +86,10 @@ public class OperationLogic extends AbstractLogic {
...
@@ -86,7 +86,10 @@ public class OperationLogic extends AbstractLogic {
private
TaskReportDao
mTaskReportDao
=
AbstractDao
.
getDao
(
TaskReportDao
.
class
);
private
TaskReportDao
mTaskReportDao
=
AbstractDao
.
getDao
(
TaskReportDao
.
class
);
private
TaskReportSendDao
mTaskReportSendDao
=
AbstractDao
.
getDao
(
TaskReportSendDao
.
class
);
private
TaskReportSendDao
mTaskReportSendDao
=
AbstractDao
.
getDao
(
TaskReportSendDao
.
class
);
private
TaskReportItemsDao
mTaskReportItemsDao
=
AbstractDao
.
getDao
(
TaskReportItemsDao
.
class
);
private
TaskReportItemsDao
mTaskReportItemsDao
=
AbstractDao
.
getDao
(
TaskReportItemsDao
.
class
);
// #32926 作業報告画面改善 start
// TODO delete RoutineTaskReportDao
private
RoutineTaskReportDao
mRoutineTaskReportDao
=
AbstractDao
.
getDao
(
RoutineTaskReportDao
.
class
);
private
RoutineTaskReportDao
mRoutineTaskReportDao
=
AbstractDao
.
getDao
(
RoutineTaskReportDao
.
class
);
// #32926 作業報告画面改善 end
private
PushMessageDao
mPushMessageDao
=
AbstractDao
.
getDao
(
PushMessageDao
.
class
);
private
PushMessageDao
mPushMessageDao
=
AbstractDao
.
getDao
(
PushMessageDao
.
class
);
...
@@ -280,7 +283,7 @@ public class OperationLogic extends AbstractLogic {
...
@@ -280,7 +283,7 @@ public class OperationLogic extends AbstractLogic {
// コピー元のファイルで、添付ファイルとして使用しないファイル削除
// コピー元のファイルで、添付ファイルとして使用しないファイル削除
deleteDifferentialFile
(
tempDirPath
,
attachedFileNames
);
deleteDifferentialFile
(
tempDirPath
,
attachedFileNames
);
String
operationDrectionOrReportDirPath
=
ABVEnvironment
.
getInstance
().
getOperationDirectionOrReportDirPath
(
operationId
,
taskKey
,
true
);
String
operationDrectionOrReportDirPath
=
ABVEnvironment
.
getInstance
().
getOperationDirectionOrReportDirPath
(
operationId
,
taskKey
,
"0"
);
// 添付ディレクトリの移動
// 添付ディレクトリの移動
boolean
result
=
FileUtil
.
copy
(
tempDirPath
,
operationDrectionOrReportDirPath
,
true
);
boolean
result
=
FileUtil
.
copy
(
tempDirPath
,
operationDrectionOrReportDirPath
,
true
);
...
@@ -354,7 +357,8 @@ public class OperationLogic extends AbstractLogic {
...
@@ -354,7 +357,8 @@ 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
);
String
operationDrectionOrReportDirPath
=
ABVEnvironment
.
getInstance
().
getOperationDirectionOrReportDirPath
(
operationId
,
taskKey
,
true
);
String
operationDrectionOrReportDirPath
=
ABVEnvironment
.
getInstance
().
getOperationDirectionOrReportDirPath
(
operationId
,
taskKey
,
"0"
);
if
(
taskDirectionsDto
.
attachedFileSendFlg
)
{
if
(
taskDirectionsDto
.
attachedFileSendFlg
)
{
//添付ファイル変更の場合、以下の処理を行う
//添付ファイル変更の場合、以下の処理を行う
JSONObject
attachedListJson
=
taskDirectionsJson
.
getJSONObject
(
"attached"
);
JSONObject
attachedListJson
=
taskDirectionsJson
.
getJSONObject
(
"attached"
);
...
@@ -513,7 +517,9 @@ public class OperationLogic extends AbstractLogic {
...
@@ -513,7 +517,9 @@ 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
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,7 +561,9 @@ public class OperationLogic extends AbstractLogic {
...
@@ -555,7 +561,9 @@ public class OperationLogic extends AbstractLogic {
//添付ファイル変更の場合、以下の処理を行う
//添付ファイル変更の場合、以下の処理を行う
String
tempDirPath
=
ABVEnvironment
.
getInstance
().
getTempTaskDirPath
(
contentId
,
taskKey
);
String
tempDirPath
=
ABVEnvironment
.
getInstance
().
getTempTaskDirPath
(
contentId
,
taskKey
);
String
operationDrectionOrReportDirPath
=
ABVEnvironment
.
getInstance
().
getOperationDirectionOrReportDirPath
(
operationId
,
taskKey
,
false
);
// #32926 作業報告画面改善 start
String
operationDrectionOrReportDirPath
=
ABVEnvironment
.
getInstance
().
getOperationTaskReportLevelDirPath
(
operationId
,
taskKey
,
String
.
valueOf
(
taskReportLevel
));
// #32926 作業報告画面改善 end
JSONObject
attachedListJson
=
taskReportJson
.
getJSONObject
(
"attached"
);
JSONObject
attachedListJson
=
taskReportJson
.
getJSONObject
(
"attached"
);
List
<
String
>
attachedFileNames
=
JSONObject
.
getValues
(
attachedListJson
);
List
<
String
>
attachedFileNames
=
JSONObject
.
getValues
(
attachedListJson
);
...
@@ -606,7 +614,11 @@ public class OperationLogic extends AbstractLogic {
...
@@ -606,7 +614,11 @@ 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
);
String
routineTaskReportDirPath
=
ABVEnvironment
.
getInstance
().
getRoutineTaskReportDirFilePath
(
operationId
,
routineTaskReportDto
.
taskKey
,
routineTaskReportDto
.
taskReportId
,
strReportStartDate
);
// #32926 作業報告画面改善 start
// TODO routineTaskReportDto -> taskReportDto
// String routineTaskReportDirPath = ABVEnvironment.getInstance().getRoutineTaskReportDirFilePath(operationId, routineTaskReportDto.taskKey, routineTaskReportDto.taskReportId, strReportStartDate, routineTaskReportDto.taskReportLevel);
String
routineTaskReportDirPath
=
ABVEnvironment
.
getInstance
().
getRoutineTaskReportDirFilePath
(
operationId
,
routineTaskReportDto
.
taskKey
,
routineTaskReportDto
.
taskReportId
,
strReportStartDate
,
0
);
// #32926 作業報告画面改善 end
if
(!
StringUtil
.
isNullOrEmpty
(
routineTaskReportDto
.
jsonData
))
{
if
(!
StringUtil
.
isNullOrEmpty
(
routineTaskReportDto
.
jsonData
))
{
JSONObject
attachedListJson
=
(
new
JSONObject
(
routineTaskReportDto
.
jsonData
)).
getJSONObject
(
"attached"
);
JSONObject
attachedListJson
=
(
new
JSONObject
(
routineTaskReportDto
.
jsonData
)).
getJSONObject
(
"attached"
);
...
@@ -725,11 +737,15 @@ public class OperationLogic extends AbstractLogic {
...
@@ -725,11 +737,15 @@ 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
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
insertTaskReport
(
taskKey
,
operationId
,
contentId
,
taskReport
,
localAttachedFileName
,
attachedChangeFlag
,
dataSendFlg
,
taskReportLevel
);
// #32926 作業報告画面改善 end
return
;
return
;
}
}
JSONObject
taskJson
=
taskReport
.
getJSONObject
(
"task"
);
JSONObject
taskJson
=
taskReport
.
getJSONObject
(
"task"
);
...
@@ -762,7 +778,9 @@ public class OperationLogic extends AbstractLogic {
...
@@ -762,7 +778,9 @@ 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
);
String
operationDrectionOrReportDirPath
=
ABVEnvironment
.
getInstance
().
getOperationDirectionOrReportDirPath
(
operationId
,
taskKey
,
false
);
// #32926 作業報告画面改善 start
String
operationDrectionOrReportDirPath
=
ABVEnvironment
.
getInstance
().
getOperationTaskReportLevelDirPath
(
operationId
,
taskKey
,
String
.
valueOf
(
taskReportLevel
));
// #32926 作業報告画面改善 end
if
(
taskReportDto
.
attachedFileSendFlg
)
{
if
(
taskReportDto
.
attachedFileSendFlg
)
{
//添付ファイル変更の場合、以下の処理を行う
//添付ファイル変更の場合、以下の処理を行う
JSONObject
attachedListJson
=
taskReport
.
getJSONObject
(
"attached"
);
JSONObject
attachedListJson
=
taskReport
.
getJSONObject
(
"attached"
);
...
@@ -836,7 +854,11 @@ public class OperationLogic extends AbstractLogic {
...
@@ -836,7 +854,11 @@ 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
);
String
routineTaskReportDirPath
=
ABVEnvironment
.
getInstance
().
getRoutineTaskReportDirFilePath
(
operationId
,
routineTaskReportDto
.
taskKey
,
routineTaskReportDto
.
taskReportId
,
strReportStartDate
);
// #32926 作業報告画面改善 start
// TODO routineTaskReportDto -> taskReportDto
// String routineTaskReportDirPath = ABVEnvironment.getInstance().getRoutineTaskReportDirFilePath(operationId, routineTaskReportDto.taskKey, routineTaskReportDto.taskReportId, strReportStartDate, taskReportDto.taskReportLevel);
String
routineTaskReportDirPath
=
ABVEnvironment
.
getInstance
().
getRoutineTaskReportDirFilePath
(
operationId
,
routineTaskReportDto
.
taskKey
,
routineTaskReportDto
.
taskReportId
,
strReportStartDate
,
0
);
// #32926 作業報告画面改善 end
if
(
insertFlg
)
{
if
(
insertFlg
)
{
if
(!
StringUtil
.
isNullOrEmpty
(
routineTaskReportDto
.
jsonData
))
{
if
(!
StringUtil
.
isNullOrEmpty
(
routineTaskReportDto
.
jsonData
))
{
...
@@ -994,7 +1016,7 @@ public class OperationLogic extends AbstractLogic {
...
@@ -994,7 +1016,7 @@ public class OperationLogic extends AbstractLogic {
}
}
*/
*/
public
void
deleteTaskReport
(
long
operationId
,
long
contentId
,
String
taskKey
)
{
public
void
deleteTaskReport
(
long
operationId
,
long
contentId
,
String
taskKey
,
int
taskReportLevel
)
{
TaskReportDto
taskReportDto
=
mTaskReportDao
.
getTaskReport
(
taskKey
);
TaskReportDto
taskReportDto
=
mTaskReportDao
.
getTaskReport
(
taskKey
);
if
(
taskReportDto
!=
null
)
{
if
(
taskReportDto
!=
null
)
{
taskReportDto
.
dataSendFlg
=
true
;
taskReportDto
.
dataSendFlg
=
true
;
...
@@ -1011,7 +1033,10 @@ public class OperationLogic extends AbstractLogic {
...
@@ -1011,7 +1033,10 @@ public class OperationLogic extends AbstractLogic {
// 作業報告のディレクトリ削除
// 作業報告のディレクトリ削除
FileUtil
.
delete
(
ABVEnvironment
.
getInstance
().
getTempTaskDirPath
(
contentId
,
taskKey
));
FileUtil
.
delete
(
ABVEnvironment
.
getInstance
().
getTempTaskDirPath
(
contentId
,
taskKey
));
FileUtil
.
delete
(
ABVEnvironment
.
getInstance
().
getOperationDirectionOrReportDirPath
(
operationId
,
taskKey
,
false
));
// #32926 作業報告画面改善 start
FileUtil
.
delete
(
ABVEnvironment
.
getInstance
().
getOperationTaskReportLevelDirPath
(
operationId
,
taskKey
,
String
.
valueOf
(
taskReportLevel
)));
// #32926 作業報告画面改善 end
}
}
// #32782 指示者テーブル関連削除 end
// #32782 指示者テーブル関連削除 end
...
@@ -1021,7 +1046,11 @@ public class OperationLogic extends AbstractLogic {
...
@@ -1021,7 +1046,11 @@ public class OperationLogic extends AbstractLogic {
* @param contentId
* @param contentId
* @param dto
* @param dto
*/
*/
// #32926 作業報告画面改善 start
// TODO RoutineTaskReportDto -> TaskReportDto
// public void deleteRoutineTaskReport(long operationId, long contentId, TaskReportDto dto) {
public
void
deleteRoutineTaskReport
(
long
operationId
,
long
contentId
,
RoutineTaskReportDto
dto
)
{
public
void
deleteRoutineTaskReport
(
long
operationId
,
long
contentId
,
RoutineTaskReportDto
dto
)
{
// #32926 作業報告画面改善 end
mRoutineTaskReportDao
.
delete
(
dto
);
mRoutineTaskReportDao
.
delete
(
dto
);
String
reportStartDate
=
DateTimeUtil
.
toString
(
dto
.
reportStartDate
,
DateTimeFormat
.
yyyyMMddHHmmss_hyphen
);
String
reportStartDate
=
DateTimeUtil
.
toString
(
dto
.
reportStartDate
,
DateTimeFormat
.
yyyyMMddHHmmss_hyphen
);
...
@@ -1031,10 +1060,16 @@ public class OperationLogic extends AbstractLogic {
...
@@ -1031,10 +1060,16 @@ public class OperationLogic extends AbstractLogic {
// 作業報告のディレクトリ削除
// 作業報告のディレクトリ削除
FileUtil
.
delete
(
ABVEnvironment
.
getInstance
().
getTempTaskDirPath
(
contentId
,
dto
.
taskKey
));
FileUtil
.
delete
(
ABVEnvironment
.
getInstance
().
getTempTaskDirPath
(
contentId
,
dto
.
taskKey
));
FileUtil
.
delete
(
ABVEnvironment
.
getInstance
().
getRoutineTaskReportDirFilePath
(
operationId
,
dto
.
taskKey
,
dto
.
taskReportId
,
reportStartDate
));
// #32926 作業報告画面改善 start
// TODO routineTaskReportDto -> taskReportDto
// FileUtil.delete(ABVEnvironment.getInstance().getRoutineTaskReportDirFilePath(operationId, dto.taskKey, dto.taskReportId, reportStartDate, dto.taskReportLevel));
FileUtil
.
delete
(
ABVEnvironment
.
getInstance
().
getRoutineTaskReportDirFilePath
(
operationId
,
dto
.
taskKey
,
dto
.
taskReportId
,
reportStartDate
,
0
));
// 作業報告送信のディレクトリ削除
// 作業報告送信のディレクトリ削除
FileUtil
.
delete
(
ABVEnvironment
.
getInstance
().
getRoutineTaskReportSendDirFilePath
(
operationId
,
dto
.
taskKey
,
dto
.
taskReportId
,
reportStartDate
));
// TODO routineTaskReportDto -> taskReportDto
// FileUtil.delete(ABVEnvironment.getInstance().getRoutineTaskReportSendDirFilePath(operationId, dto.taskKey, dto.taskReportId, reportStartDate, dto.taskReportLevel));
FileUtil
.
delete
(
ABVEnvironment
.
getInstance
().
getRoutineTaskReportSendDirFilePath
(
operationId
,
dto
.
taskKey
,
dto
.
taskReportId
,
reportStartDate
,
0
));
// #32926 作業報告画面改善 end
}
}
/**
/**
...
@@ -1062,7 +1097,10 @@ public class OperationLogic extends AbstractLogic {
...
@@ -1062,7 +1097,10 @@ public class OperationLogic extends AbstractLogic {
// 作業報告のディレクトリ削除
// 作業報告のディレクトリ削除
FileUtil
.
delete
(
ABVEnvironment
.
getInstance
().
getTempTaskDirPath
(
contentId
,
taskKey
));
FileUtil
.
delete
(
ABVEnvironment
.
getInstance
().
getTempTaskDirPath
(
contentId
,
taskKey
));
FileUtil
.
delete
(
ABVEnvironment
.
getInstance
().
getRoutineTaskReportDirFilePath
(
operationId
,
taskKey
,
taskReportId
,
reportStartDate
));
// #32926 作業報告画面改善 start
// TODO routineTaskReportDto -> taskReportDto
FileUtil
.
delete
(
ABVEnvironment
.
getInstance
().
getRoutineTaskReportDirFilePath
(
operationId
,
taskKey
,
taskReportId
,
reportStartDate
,
0
));
// #32926 作業報告画面改善 end
}
}
/**
/**
...
@@ -1124,7 +1162,7 @@ public class OperationLogic extends AbstractLogic {
...
@@ -1124,7 +1162,7 @@ public class OperationLogic extends AbstractLogic {
// #32782 指示者テーブル関連削除 start
// #32782 指示者テーブル関連削除 start
// TODO change
// TODO change
/*
/*
public void updateTaskHotspot(String taskKey, Map<String, String> param) {
public void updateTaskHotspot(String taskKey, Map<String, String> param
, int taskReportLevel
) {
TaskDto taskDto = mTaskDao.getTaskByTaskKey(taskKey);
TaskDto taskDto = mTaskDao.getTaskByTaskKey(taskKey);
// #32782 指示者テーブル関連削除 start
// #32782 指示者テーブル関連削除 start
TaskReportDto taskReportDao = mTaskReportDao.getTaskReport(taskKey);
TaskReportDto taskReportDao = mTaskReportDao.getTaskReport(taskKey);
...
@@ -1135,7 +1173,7 @@ public class OperationLogic extends AbstractLogic {
...
@@ -1135,7 +1173,7 @@ public class OperationLogic extends AbstractLogic {
mTaskDao.update(taskDto);
mTaskDao.update(taskDto);
}
}
*/
*/
public
void
updateTaskHotspot
(
String
taskKey
,
Map
<
String
,
String
>
param
)
{
public
void
updateTaskHotspot
(
String
taskKey
,
Map
<
String
,
String
>
param
,
int
taskReportLevel
)
{
TaskDto
taskDto
=
mTaskDao
.
getTaskByTaskKey
(
taskKey
);
TaskDto
taskDto
=
mTaskDao
.
getTaskByTaskKey
(
taskKey
);
TaskDirectionsDto
taskDirectionsDto
=
mTaskDirectionsDao
.
getTaskDirections
(
taskKey
);
TaskDirectionsDto
taskDirectionsDto
=
mTaskDirectionsDao
.
getTaskDirections
(
taskKey
);
taskDirectionsDto
.
dataSendFlg
=
true
;
taskDirectionsDto
.
dataSendFlg
=
true
;
...
@@ -1214,13 +1252,15 @@ public class OperationLogic extends AbstractLogic {
...
@@ -1214,13 +1252,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);
...
@@ -1273,7 +1313,10 @@ public class OperationLogic extends AbstractLogic {
...
@@ -1273,7 +1313,10 @@ public class OperationLogic extends AbstractLogic {
public
void
createJsonForOpenABookCheckPano
(
Long
operationId
,
Long
contentId
,
String
contentPath
)
throws
IOException
{
public
void
createJsonForOpenABookCheckPano
(
Long
operationId
,
Long
contentId
,
String
contentPath
)
throws
IOException
{
try
{
try
{
createContentJson
(
operationId
,
contentId
,
contentPath
);
createContentJson
(
operationId
,
contentId
,
contentPath
);
createWorkerGroupJson
(
contentPath
);
// #32926 作業報告画面改善 start
// 作業タイプ確認用のparameterを追加
createWorkerGroupJson
(
operationId
,
contentPath
);
// #32926 作業報告画面改善 end
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
Logger
.
e
(
TAG
,
"createJsonForOpenABookCheckPano error : "
,
e
);
Logger
.
e
(
TAG
,
"createJsonForOpenABookCheckPano error : "
,
e
);
throw
e
;
throw
e
;
...
@@ -1302,10 +1345,15 @@ public class OperationLogic extends AbstractLogic {
...
@@ -1302,10 +1345,15 @@ public class OperationLogic extends AbstractLogic {
/**
/**
* workerGroup.jsonファイル作成
* workerGroup.jsonファイル作成
*
*
* @param operationId
* @param contentPath
* @param contentPath
* @throws IOException
* @throws IOException
*/
*/
private
void
createWorkerGroupJson
(
String
contentPath
)
throws
IOException
{
// #32926 作業報告画面改善 start
// 現在作業タイプを確認用のparameter追加
private
void
createWorkerGroupJson
(
Long
operationId
,
String
contentPath
)
throws
IOException
{
// #32926 作業報告画面改善 end
List
<
JSONObject
>
workerGroupJsonList
=
new
ArrayList
<
JSONObject
>();
List
<
JSONObject
>
workerGroupJsonList
=
new
ArrayList
<
JSONObject
>();
JSONObject
taskGroupJson
=
new
JSONObject
();
JSONObject
taskGroupJson
=
new
JSONObject
();
...
@@ -1317,7 +1365,16 @@ public class OperationLogic extends AbstractLogic {
...
@@ -1317,7 +1365,16 @@ public class OperationLogic extends AbstractLogic {
workerGroupJsonList
.
add
(
workerGroupJson
);
workerGroupJsonList
.
add
(
workerGroupJson
);
}
}
// #32926 作業報告画面改善 start
// 報告と報告(回答)のデータの区分が必要なので、「taskGroup_0」と「taskGroup_1」で形式で作成
List
<
TaskReportDto
>
taskReportList
=
mTaskReportDao
.
getTaskReportByOperationId
(
operationId
);
for
(
TaskReportDto
dto
:
taskReportList
)
{
taskGroupJson
.
put
(
String
.
format
(
"taskGroup_%s"
,
String
.
valueOf
(
dto
.
taskReportLevel
)),
workerGroupJsonList
);
}
taskGroupJson
.
put
(
"taskGroup"
,
workerGroupJsonList
);
taskGroupJson
.
put
(
"taskGroup"
,
workerGroupJsonList
);
Logger
.
d
(
TAG
,
"createWorkerGroupJson : "
+
taskGroupJson
.
toString
());
Logger
.
d
(
TAG
,
contentPath
+
"/workerGroup.json"
);
// #32926 作業報告画面改善 end
FileUtil
.
createFile
(
contentPath
+
"/workerGroup.json"
,
taskGroupJson
.
toString
());
FileUtil
.
createFile
(
contentPath
+
"/workerGroup.json"
,
taskGroupJson
.
toString
());
}
}
...
@@ -1407,18 +1464,37 @@ public class OperationLogic extends AbstractLogic {
...
@@ -1407,18 +1464,37 @@ 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
();
JSONObject
taskReportJsonRow
;
List
<
TaskReportDto
>
taskReportDtoList
=
mTaskReportDao
.
getTaskReportByOperationId
(
operationId
);
List
<
TaskReportDto
>
taskReportDtoList
=
mTaskReportDao
.
getTaskReportByOperationId
(
operationId
);
// #32926 作業報告画面改善 start
int
taskReportLevel
=
0
;
for
(
TaskReportDto
dto
:
taskReportDtoList
)
{
for
(
TaskReportDto
dto
:
taskReportDtoList
)
{
taskReportJsonRow
=
new
JSONObject
();
taskReportLevel
=
dto
.
taskReportLevel
;
if
(
dto
.
jsonData
!=
null
&&
dto
.
jsonData
.
length
()
>
0
)
{
if
(
dto
.
jsonData
!=
null
&&
dto
.
jsonData
.
length
()
>
0
)
{
taskReportJsonRow
.
put
(
ABookKeys
.
TASK_HAS_AUTHORITY
,
dto
.
taskHasAuthority
);
taskReportJsonList
.
add
(
new
JSONObject
(
dto
.
jsonData
));
taskReportJsonList
.
add
(
new
JSONObject
(
dto
.
jsonData
));
taskReportJsonList
.
add
(
taskReportJsonRow
);
}
}
}
}
taskReportJson
.
put
(
"taskReport"
,
taskReportJsonList
);
taskReportJson
.
put
(
String
.
format
(
"taskReport_%d"
,
taskReportLevel
),
taskReportJsonList
);
Logger
.
d
(
TAG
,
"createTaskReportJson : "
+
taskReportJson
.
toString
());
Logger
.
d
(
TAG
,
"createTaskReportJson : "
+
taskReportJson
.
toString
());
Logger
.
d
(
TAG
,
contentPath
+
"/"
+
ABookKeys
.
TASK_REPORT
+
".json"
);
// #32926 作業報告画面改善 end
FileUtil
.
createFile
(
contentPath
+
"/"
+
ABookKeys
.
TASK_REPORT
+
".json"
,
taskReportJson
.
toString
());
FileUtil
.
createFile
(
contentPath
+
"/"
+
ABookKeys
.
TASK_REPORT
+
".json"
,
taskReportJson
.
toString
());
}
}
...
@@ -1426,24 +1502,33 @@ public class OperationLogic extends AbstractLogic {
...
@@ -1426,24 +1502,33 @@ public class OperationLogic extends AbstractLogic {
List
<
JSONObject
>
taskReportJsonList
=
new
ArrayList
<
JSONObject
>();
List
<
JSONObject
>
taskReportJsonList
=
new
ArrayList
<
JSONObject
>();
JSONObject
taskReportJsonRoot
=
new
JSONObject
();
JSONObject
taskReportJsonRoot
=
new
JSONObject
();
JSONObject
taskReportJsonRow
;
JSONObject
taskReportJsonRow
;
List
<
RoutineTaskReportDto
>
routineTaskReportDtoList
=
mRoutineTaskReportDao
.
getRoutineTaskReportByOperationId
(
operationId
);
// #32926 作業報告画面改善 start
for
(
RoutineTaskReportDto
dto
:
routineTaskReportDtoList
)
{
int
taskReportLevel
=
0
;
int
taskReportId
=
0
;
List
<
TaskReportDto
>
routineTaskReportDtoList
=
mTaskReportDao
.
getTaskReportByOperationId
(
operationId
);
// 現在の作業タイプは定期点検の場合
for
(
TaskReportDto
dto
:
routineTaskReportDtoList
)
{
taskReportJsonRow
=
new
JSONObject
();
taskReportJsonRow
=
new
JSONObject
();
taskReportLevel
=
dto
.
taskReportLevel
;
taskReportId
=
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
.
TASK_REPORT_INFO
,
taskReportInfoList
);
taskReportJsonRow
.
put
(
ABookKeys
.
REPORTED
,
dto
.
reportedFlag
?
1
:
0
);
taskReportJsonList
.
add
(
taskReportJsonRow
);
taskReportJsonList
.
add
(
taskReportJsonRow
);
}
}
taskReportJsonRoot
.
put
(
"taskReport"
,
taskReportJsonList
);
taskReportJsonRoot
.
put
(
ABookKeys
.
ENABLE_REPORT_UPDATE
,
mOperationDao
.
getOperation
(
operationId
).
enableReportUpdate
);
Logger
.
d
(
TAG
,
"createTaskReportJson : "
+
taskReportJsonRoot
.
toString
());
taskReportJsonRoot
.
put
(
ABookKeys
.
TASK_REPORT_ID
,
taskReportId
);
taskReportJsonRoot
.
put
(
String
.
format
(
"taskReport_%d"
,
taskReportLevel
),
taskReportJsonList
);
Logger
.
d
(
TAG
,
"createRoutineTaskReportJson : "
+
taskReportJsonRoot
.
toString
());
Logger
.
d
(
TAG
,
contentPath
+
"/"
+
ABookKeys
.
TASK_REPORT
+
".json"
);
// #32926 作業報告画面改善 end
FileUtil
.
createFile
(
contentPath
+
"/"
+
ABookKeys
.
TASK_REPORT
+
".json"
,
taskReportJsonRoot
.
toString
());
FileUtil
.
createFile
(
contentPath
+
"/"
+
ABookKeys
.
TASK_REPORT
+
".json"
,
taskReportJsonRoot
.
toString
());
}
}
...
@@ -1471,7 +1556,14 @@ public class OperationLogic extends AbstractLogic {
...
@@ -1471,7 +1556,14 @@ public class OperationLogic extends AbstractLogic {
itemJson
.
put
(
dto
.
itemKey
,
jsonArray
);
itemJson
.
put
(
dto
.
itemKey
,
jsonArray
);
}
}
}
}
taskReportSuggestJson
.
put
(
ABookKeys
.
TASK_REPORT_SUGGEST
,
itemJson
);
// #32926 作業報告画面改善 start
List
<
TaskReportDto
>
taskReportList
=
mTaskReportDao
.
getTaskReportByOperationId
(
operationId
);
for
(
TaskReportDto
dto
:
taskReportList
)
{
taskReportSuggestJson
.
put
(
String
.
format
(
"%s_%s"
,
ABookKeys
.
TASK_REPORT_SUGGEST
,
String
.
valueOf
(
dto
.
taskReportLevel
)),
itemJson
);
}
Logger
.
d
(
TAG
,
"createTaskReportSuggestJson : "
+
taskReportSuggestJson
.
toString
());
Logger
.
d
(
TAG
,
contentPath
+
"/"
+
ABookKeys
.
TASK_REPORT_SUGGEST
+
".json"
);
// #32926 作業報告画面改善 end
FileUtil
.
createFile
(
contentPath
+
"/"
+
ABookKeys
.
TASK_REPORT_SUGGEST
+
".json"
,
taskReportSuggestJson
.
toString
());
FileUtil
.
createFile
(
contentPath
+
"/"
+
ABookKeys
.
TASK_REPORT_SUGGEST
+
".json"
,
taskReportSuggestJson
.
toString
());
}
}
...
@@ -1701,7 +1793,7 @@ public class OperationLogic extends AbstractLogic {
...
@@ -1701,7 +1793,7 @@ public class OperationLogic extends AbstractLogic {
File
zipFile
=
null
;
File
zipFile
=
null
;
if
(
dto
.
attachedFileSendFlg
)
{
if
(
dto
.
attachedFileSendFlg
)
{
String
fileName
=
null
;
String
fileName
=
null
;
zipFile
=
createAttachedFile
(
operationId
,
dto
.
taskKey
,
true
);
zipFile
=
createAttachedFile
(
operationId
,
dto
.
taskKey
,
true
,
"0"
);
if
(
zipFile
!=
null
)
{
if
(
zipFile
!=
null
)
{
fileName
=
FileUtil
.
getFilenameWithoutExt
(
zipFile
.
getName
());
fileName
=
FileUtil
.
getFilenameWithoutExt
(
zipFile
.
getName
());
}
}
...
@@ -1885,7 +1977,7 @@ public class OperationLogic extends AbstractLogic {
...
@@ -1885,7 +1977,7 @@ public class OperationLogic extends AbstractLogic {
if
(
taskReportDto
.
attachedFileSendFlg
)
{
if
(
taskReportDto
.
attachedFileSendFlg
)
{
String
fileName
=
null
;
String
fileName
=
null
;
zipFile
=
createAttachedFileForSend
(
operationId
,
taskReportDto
.
taskKey
,
taskReportSendDto
.
taskReportSendId
,
false
,
0
,
""
);
zipFile
=
createAttachedFileForSend
(
operationId
,
taskReportDto
.
taskKey
,
taskReportSendDto
.
taskReportSendId
,
false
,
0
,
""
,
taskReportDto
.
taskReportLevel
);
if
(
zipFile
!=
null
)
{
if
(
zipFile
!=
null
)
{
fileName
=
FileUtil
.
getFilenameWithoutExt
(
zipFile
.
getName
());
fileName
=
FileUtil
.
getFilenameWithoutExt
(
zipFile
.
getName
());
}
}
...
@@ -1906,7 +1998,9 @@ public class OperationLogic extends AbstractLogic {
...
@@ -1906,7 +1998,9 @@ public class OperationLogic extends AbstractLogic {
);
);
progressCallback
.
callback
(
new
Integer
(
progress
));
progressCallback
.
callback
(
new
Integer
(
progress
));
mTaskReportSendDao
.
deleteBySendId
(
taskReportSendDto
.
taskReportSendId
);
mTaskReportSendDao
.
deleteBySendId
(
taskReportSendDto
.
taskReportSendId
);
FileUtil
.
delete
(
ABVEnvironment
.
getInstance
().
getOperationTaskReportSendDirFilePath
(
operationId
,
taskReportSendDto
.
taskKey
,
taskReportSendDto
.
taskReportSendId
));
// #32926 作業報告画面改善 start
FileUtil
.
delete
(
ABVEnvironment
.
getInstance
().
getOperationTaskReportSendDirFilePath
(
operationId
,
taskReportSendDto
.
taskKey
,
taskReportSendDto
.
taskReportSendId
,
taskReportDto
.
taskReportLevel
));
// #32926 作業報告画面改善 end
}
catch
(
Exception
ex
)
{
}
catch
(
Exception
ex
)
{
throw
ex
;
throw
ex
;
}
finally
{
}
finally
{
...
@@ -1974,7 +2068,11 @@ public class OperationLogic extends AbstractLogic {
...
@@ -1974,7 +2068,11 @@ public class OperationLogic extends AbstractLogic {
if
(
routineTaskReportDto
.
attachedFileSendFlag
)
{
if
(
routineTaskReportDto
.
attachedFileSendFlag
)
{
String
fileName
=
null
;
String
fileName
=
null
;
zipFile
=
createAttachedFileForSend
(
operationId
,
routineTaskReportDto
.
taskKey
,
taskReportSendDto
.
taskReportSendId
,
true
,
routineTaskReportDto
.
taskReportId
,
strReportStartDate
);
// #32926 作業報告画面改善 start
// TODO routineTaskReportDto -> taskReportDto
// zipFile = createAttachedFileForSend(operationId, routineTaskReportDto.taskKey, taskReportSendDto.taskReportSendId, true, routineTaskReportDto.taskReportId, strReportStartDate, taskReportDto.taskReportLevel);
zipFile
=
createAttachedFileForSend
(
operationId
,
routineTaskReportDto
.
taskKey
,
taskReportSendDto
.
taskReportSendId
,
true
,
routineTaskReportDto
.
taskReportId
,
strReportStartDate
,
0
);
// #32926 作業報告画面改善 end
if
(
zipFile
!=
null
)
{
if
(
zipFile
!=
null
)
{
fileName
=
FileUtil
.
getFilenameWithoutExt
(
zipFile
.
getName
());
fileName
=
FileUtil
.
getFilenameWithoutExt
(
zipFile
.
getName
());
}
}
...
@@ -1995,11 +2093,19 @@ public class OperationLogic extends AbstractLogic {
...
@@ -1995,11 +2093,19 @@ public class OperationLogic extends AbstractLogic {
);
);
progressCallback
.
callback
(
new
Integer
(
progress
));
progressCallback
.
callback
(
new
Integer
(
progress
));
mTaskReportSendDao
.
deleteBySendId
(
taskReportSendDto
.
taskReportSendId
);
mTaskReportSendDao
.
deleteBySendId
(
taskReportSendDto
.
taskReportSendId
);
FileUtil
.
delete
(
ABVEnvironment
.
getInstance
().
getRoutineTaskReportSendDirFilePath
(
operationId
,
taskReportSendDto
.
taskKey
,
routineTaskReportDto
.
taskReportId
,
strReportStartDate
,
taskReportSendDto
.
taskReportSendId
));
// #32926 作業報告画面改善 start
// TODO routineTaskReportDto -> taskReportDto
// FileUtil.delete(ABVEnvironment.getInstance().getRoutineTaskReportSendDirFilePath(operationId, taskReportSendDto.taskKey, routineTaskReportDto.taskReportId, strReportStartDate, taskReportSendDto.taskReportSendId, taskReportDto.taskReportLevel));
FileUtil
.
delete
(
ABVEnvironment
.
getInstance
().
getRoutineTaskReportSendDirFilePath
(
operationId
,
taskReportSendDto
.
taskKey
,
routineTaskReportDto
.
taskReportId
,
strReportStartDate
,
taskReportSendDto
.
taskReportSendId
,
0
));
// #33926 作業報告画面改善 end
}
catch
(
ABVException
ex
)
{
}
catch
(
ABVException
ex
)
{
if
(
ex
.
getCode
()
==
ABVExceptionCode
.
P_E_ACMS_P005
)
{
if
(
ex
.
getCode
()
==
ABVExceptionCode
.
P_E_ACMS_P005
)
{
mTaskReportSendDao
.
deleteBySendId
(
taskReportSendDto
.
taskReportSendId
);
mTaskReportSendDao
.
deleteBySendId
(
taskReportSendDto
.
taskReportSendId
);
FileUtil
.
delete
(
ABVEnvironment
.
getInstance
().
getRoutineTaskReportSendDirFilePath
(
operationId
,
taskReportSendDto
.
taskKey
,
routineTaskReportDto
.
taskReportId
,
strReportStartDate
,
taskReportSendDto
.
taskReportSendId
));
// #32926 作業報告画面改善 start
// TODO routineTaskReportDto -> taskReportDto
// FileUtil.delete(ABVEnvironment.getInstance().getRoutineTaskReportSendDirFilePath(operationId, taskReportSendDto.taskKey, routineTaskReportDto.taskReportId, strReportStartDate, taskReportSendDto.taskReportSendId, taskReportDto.taskReportLevel));
FileUtil
.
delete
(
ABVEnvironment
.
getInstance
().
getRoutineTaskReportSendDirFilePath
(
operationId
,
taskReportSendDto
.
taskKey
,
routineTaskReportDto
.
taskReportId
,
strReportStartDate
,
taskReportSendDto
.
taskReportSendId
,
0
));
// #32926 作業報告画面改善 end
sendErrorCnt
++;
sendErrorCnt
++;
}
}
}
catch
(
Exception
ex
)
{
}
catch
(
Exception
ex
)
{
...
@@ -2090,7 +2196,7 @@ public class OperationLogic extends AbstractLogic {
...
@@ -2090,7 +2196,7 @@ public class OperationLogic extends AbstractLogic {
*/
*/
public
String
getRoutineTaskReportFile
(
long
operationId
,
String
taskKey
,
long
taskId
,
int
taskReportId
,
int
taskReportInfoId
,
String
reportStartDate
,
String
attachedFileName
)
throws
ABVException
,
InterruptedException
{
public
String
getRoutineTaskReportFile
(
long
operationId
,
String
taskKey
,
long
taskId
,
int
taskReportId
,
int
taskReportInfoId
,
String
reportStartDate
,
String
attachedFileName
)
throws
ABVException
,
InterruptedException
{
GetTaskFileParameters
parameters
=
new
GetTaskFileParameters
(
cache
.
getMemberInfo
().
sid
,
taskId
,
1
,
taskReportInfoId
);
GetTaskFileParameters
parameters
=
new
GetTaskFileParameters
(
cache
.
getMemberInfo
().
sid
,
taskId
,
1
,
taskReportInfoId
);
String
outputFilePath
=
ABVEnvironment
.
getInstance
().
getRoutineTaskReportDirFilePath
(
operationId
,
taskKey
,
taskReportId
,
reportStartDate
)
+
"/"
+
attachedFileName
+
".zip"
;
String
outputFilePath
=
ABVEnvironment
.
getInstance
().
getRoutineTaskReportDirFilePath
(
operationId
,
taskKey
,
taskReportId
,
reportStartDate
,
0
)
+
"/"
+
attachedFileName
+
".zip"
;
AcmsClient
.
getInstance
(
cache
.
getUrlPath
(),
networkAdapter
).
getTaskFile
(
parameters
,
operationId
,
outputFilePath
);
AcmsClient
.
getInstance
(
cache
.
getUrlPath
(),
networkAdapter
).
getTaskFile
(
parameters
,
operationId
,
outputFilePath
);
return
outputFilePath
;
return
outputFilePath
;
}
}
...
@@ -2144,9 +2250,12 @@ public class OperationLogic extends AbstractLogic {
...
@@ -2144,9 +2250,12 @@ public class OperationLogic extends AbstractLogic {
* @throws NoSuchAlgorithmException
* @throws NoSuchAlgorithmException
* @throws IOException
* @throws IOException
*/
*/
private
File
createAttachedFile
(
Long
operationId
,
String
taskKey
,
boolean
directionFlg
)
throws
ZipException
,
NoSuchAlgorithmException
,
IOException
{
private
File
createAttachedFile
(
Long
operationId
,
String
taskKey
,
boolean
directionFlg
,
String
taskReportLevel
)
throws
ZipException
,
NoSuchAlgorithmException
,
IOException
{
File
zipFile
;
File
zipFile
;
String
filePath
=
ABVEnvironment
.
getInstance
().
getOperationDirectionOrReportDirPath
(
operationId
,
taskKey
,
directionFlg
);
// #32926 作業報告画面改善 start
String
filePath
=
ABVEnvironment
.
getInstance
().
getOperationTaskReportLevelDirPath
(
operationId
,
taskKey
,
taskReportLevel
);
// #32926 作業報告画面改善 end
File
fileDir
=
new
File
(
filePath
);
File
fileDir
=
new
File
(
filePath
);
if
(!
fileDir
.
exists
())
{
if
(!
fileDir
.
exists
())
{
return
null
;
return
null
;
...
@@ -2190,14 +2299,14 @@ public class OperationLogic extends AbstractLogic {
...
@@ -2190,14 +2299,14 @@ public class OperationLogic extends AbstractLogic {
* @throws NoSuchAlgorithmException
* @throws NoSuchAlgorithmException
* @throws IOException
* @throws IOException
*/
*/
private
File
createAttachedFileForSend
(
Long
operationId
,
String
taskKey
,
int
taskReportSendId
,
boolean
routineFlag
,
int
reportId
,
String
reportStartDate
)
throws
ZipException
,
NoSuchAlgorithmException
,
IOException
{
private
File
createAttachedFileForSend
(
Long
operationId
,
String
taskKey
,
int
taskReportSendId
,
boolean
routineFlag
,
int
reportId
,
String
reportStartDate
,
int
taskReportLevel
)
throws
ZipException
,
NoSuchAlgorithmException
,
IOException
{
File
zipFile
;
File
zipFile
;
String
filePath
;
String
filePath
;
if
(
routineFlag
)
{
if
(
routineFlag
)
{
filePath
=
ABVEnvironment
.
getInstance
().
getRoutineTaskReportSendDirFilePath
(
operationId
,
taskKey
,
reportId
,
reportStartDate
,
taskReportSendId
);
filePath
=
ABVEnvironment
.
getInstance
().
getRoutineTaskReportSendDirFilePath
(
operationId
,
taskKey
,
reportId
,
reportStartDate
,
taskReportSendId
);
}
else
{
}
else
{
filePath
=
ABVEnvironment
.
getInstance
().
getOperationTaskReportSendDirFilePath
(
operationId
,
taskKey
,
taskReportSendId
);
filePath
=
ABVEnvironment
.
getInstance
().
getOperationTaskReportSendDirFilePath
(
operationId
,
taskKey
,
taskReportSendId
,
taskReportLevel
);
}
}
File
fileDir
=
new
File
(
filePath
);
File
fileDir
=
new
File
(
filePath
);
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVContentViewActivity.java
View file @
2cac1130
...
@@ -855,6 +855,13 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
...
@@ -855,6 +855,13 @@ 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
int
taskReportLevel
=
0
;
// 作業報告レベル(0:報告、1:報告(回答)、2:報告(回答))
if
(
abookCheckParam
.
containsKey
(
ABookKeys
.
TASK_REPORT_LEVEL
))
{
taskReportLevel
=
Integer
.
parseInt
(
abookCheckParam
.
get
(
ABookKeys
.
TASK_REPORT_LEVEL
));
// 作業報告レベル
}
// #32926 作業報告画面改善 end
int
taskReportId
=
0
;
int
taskReportId
=
0
;
String
reportStartDate
=
""
;
String
reportStartDate
=
""
;
...
@@ -864,7 +871,8 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
...
@@ -864,7 +871,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 +885,12 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
...
@@ -877,9 +885,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 +902,7 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
...
@@ -891,6 +902,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 +930,12 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
...
@@ -918,7 +930,12 @@ 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
.
reportType
==
Constant
.
ReportType
.
Routine
,
finishCallback
,
taskReportLevel
);
// #32926 作業報告画面改善 end
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
Logger
.
e
(
TAG
,
"doABookCheckParam error"
,
e
);
Logger
.
e
(
TAG
,
"doABookCheckParam error"
,
e
);
}
}
...
@@ -949,11 +966,15 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
...
@@ -949,11 +966,15 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
if
(
abookCheckParam
.
containsKey
(
ABookKeys
.
ADD_REPORT
))
{
if
(
abookCheckParam
.
containsKey
(
ABookKeys
.
ADD_REPORT
))
{
mAddReport
=
Integer
.
parseInt
(
abookCheckParam
.
get
(
ABookKeys
.
ADD_REPORT
))
>
0
?
true
:
false
;
mAddReport
=
Integer
.
parseInt
(
abookCheckParam
.
get
(
ABookKeys
.
ADD_REPORT
))
>
0
?
true
:
false
;
}
}
ActivityHandlingHelper
.
getInstance
().
startOZViewerActivity
(
this
,
mOperationId
,
getContentId
(),
mTaskKey
,
false
,
taskReportId
,
reportStartDate
,
mReportFileName
,
mLocalSave
,
mAddReport
);
// #32926 作業報告画面改善 start
ActivityHandlingHelper
.
getInstance
().
startOZViewerActivity
(
this
,
mOperationId
,
getContentId
(),
mTaskKey
,
false
,
taskReportId
,
reportStartDate
,
mReportFileName
,
mLocalSave
,
mAddReport
,
taskReportLevel
);
// #32926 作業報告画面改善 end
// #32861 作業情報追加 end
// #32861 作業情報追加 end
}
else
if
(
mCmd
.
equals
(
ABookKeys
.
CMD_PREVIEW_REPORT_OZD
))
{
}
else
if
(
mCmd
.
equals
(
ABookKeys
.
CMD_PREVIEW_REPORT_OZD
))
{
mReportFileName
=
abookCheckParam
.
get
(
ABookKeys
.
REPORT_FILE_NAME
);
mReportFileName
=
abookCheckParam
.
get
(
ABookKeys
.
REPORT_FILE_NAME
);
ActivityHandlingHelper
.
getInstance
().
startOZViewerActivity
(
this
,
mOperationId
,
getContentId
(),
mTaskKey
,
true
,
taskReportId
,
reportStartDate
,
mReportFileName
,
false
,
false
);
// #32926 作業報告画面改善 start
ActivityHandlingHelper
.
getInstance
().
startOZViewerActivity
(
this
,
mOperationId
,
getContentId
(),
mTaskKey
,
true
,
taskReportId
,
reportStartDate
,
mReportFileName
,
false
,
false
,
taskReportLevel
);
// #32926 作業報告画面改善 end
}
else
if
(
mCmd
.
equals
(
ABookKeys
.
CMD_CONTENT_EDIT_CLOSE
))
{
}
else
if
(
mCmd
.
equals
(
ABookKeys
.
CMD_CONTENT_EDIT_CLOSE
))
{
showProgressPopup
();
showProgressPopup
();
handler
.
postDelayed
(
new
Runnable
()
{
handler
.
postDelayed
(
new
Runnable
()
{
...
@@ -964,7 +985,9 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
...
@@ -964,7 +985,9 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
}
}
},
5000
);
},
5000
);
}
else
if
(
mCmd
.
equals
(
ABookKeys
.
CMD_GET_GPS_INFO
))
{
}
else
if
(
mCmd
.
equals
(
ABookKeys
.
CMD_GET_GPS_INFO
))
{
setLocation
(
true
,
(
Integer
.
valueOf
(
abookCheckParam
.
get
(
ABookKeys
.
GPS_TYPE
))
!=
1
));
// #32926 作業報告画面改善 start
setLocation
((
Integer
.
valueOf
(
abookCheckParam
.
get
(
ABookKeys
.
GPS_TYPE
))
!=
1
),
taskReportLevel
);
// #32926 作業報告画面改善 end
}
else
if
(
mCmd
.
equals
(
ABookKeys
.
CMD_SCENE_REGIST
))
{
}
else
if
(
mCmd
.
equals
(
ABookKeys
.
CMD_SCENE_REGIST
))
{
String
successFlg
=
abookCheckParam
.
get
(
ABookKeys
.
SUCCESS_FLG
);
String
successFlg
=
abookCheckParam
.
get
(
ABookKeys
.
SUCCESS_FLG
);
if
(
Integer
.
parseInt
(
successFlg
)
==
0
)
{
if
(
Integer
.
parseInt
(
successFlg
)
==
0
)
{
...
@@ -1016,7 +1039,7 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
...
@@ -1016,7 +1039,7 @@ 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
);
String
imagePath
=
ABVEnvironment
.
getInstance
().
getTempFilePath
(
getContentId
(),
mTaskKey
,
mAttachedFileName
);
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
()))
{
...
@@ -1099,9 +1122,12 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
...
@@ -1099,9 +1122,12 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
/**
/**
* 位置情報取得
* 位置情報取得
* @param isReport
* @param showPermissionDialogFlg
* @param taskReportLevel
*/
*/
protected
void
setLocation
(
final
boolean
isReport
,
final
boolean
showPermissionDialogFlg
)
{
// #32926 作業報告画面改善 start
protected
void
setLocation
(
final
boolean
showPermissionDialogFlg
,
final
int
taskReportLevel
)
{
// #32926 作業報告画面改善 end
ABookPermissionHelper
helper
=
new
ABookPermissionHelper
(
this
,
Constant
.
ABookPermissionType
.
AccessFineLocation
,
null
);
ABookPermissionHelper
helper
=
new
ABookPermissionHelper
(
this
,
Constant
.
ABookPermissionType
.
AccessFineLocation
,
null
);
if
(
helper
.
checkMultiPermissions
(
showPermissionDialogFlg
))
{
if
(
helper
.
checkMultiPermissions
(
showPermissionDialogFlg
))
{
// 位置情報取得
// 位置情報取得
...
@@ -1109,7 +1135,10 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
...
@@ -1109,7 +1135,10 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
@Override
@Override
public
void
onGetLocationFailed
()
{
public
void
onGetLocationFailed
()
{
Logger
.
w
(
TAG
,
"onGetLocationFailed"
);
Logger
.
w
(
TAG
,
"onGetLocationFailed"
);
if
(
isReport
)
{
// #32926 作業報告画面改善 start
// 報告(回答)の場合
if
(
taskReportLevel
>
0
)
{
// #32926 作業報告画面改善 end
afterABookCheckApi
(
mCmd
,
""
,
1
,
getString
(
R
.
string
.
msg_location_search_fail
),
null
);
afterABookCheckApi
(
mCmd
,
""
,
1
,
getString
(
R
.
string
.
msg_location_search_fail
),
null
);
}
}
}
}
...
@@ -1122,7 +1151,10 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
...
@@ -1122,7 +1151,10 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
CommonExecutor
.
execute
(
new
Runnable
()
{
CommonExecutor
.
execute
(
new
Runnable
()
{
@Override
@Override
public
void
run
()
{
public
void
run
()
{
if
(
isReport
)
{
// #32926 作業報告画面改善 start
// 報告(回答)の場合
if
(
taskReportLevel
>
0
)
{
// #32926 作業報告画面改善 end
JSONObject
json
=
new
JSONObject
();
JSONObject
json
=
new
JSONObject
();
json
.
put
(
"latitude"
,
latitude
);
json
.
put
(
"latitude"
,
latitude
);
json
.
put
(
"longitude"
,
longitude
);
json
.
put
(
"longitude"
,
longitude
);
...
@@ -1148,7 +1180,7 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
...
@@ -1148,7 +1180,7 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
locationManagerUtil
.
startLocationService
();
locationManagerUtil
.
startLocationService
();
}
else
{
}
else
{
Logger
.
w
(
TAG
,
"onGetLocationFailed AccessFineLocation false"
);
Logger
.
w
(
TAG
,
"onGetLocationFailed AccessFineLocation false"
);
if
(
isReport
)
{
if
(
taskReportLevel
>
0
)
{
afterABookCheckApi
(
mCmd
,
""
,
1
,
getString
(
R
.
string
.
msg_location_search_fail
),
null
);
afterABookCheckApi
(
mCmd
,
""
,
1
,
getString
(
R
.
string
.
msg_location_search_fail
),
null
);
}
}
}
}
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/OperationListActivity.java
View file @
2cac1130
...
@@ -609,7 +609,11 @@ public class OperationListActivity extends ABVUIActivity {
...
@@ -609,7 +609,11 @@ public class OperationListActivity extends ABVUIActivity {
long
operationId
=
operationDto
.
operationId
;
long
operationId
=
operationDto
.
operationId
;
for
(
TaskReportDto
taskReportDto
:
listTaskReport
)
{
for
(
TaskReportDto
taskReportDto
:
listTaskReport
)
{
FileUtil
.
delete
(
ABVEnvironment
.
getInstance
().
getOperationDirectionOrReportDirPath
(
operationId
,
taskReportDto
.
taskKey
,
false
));
// #32926 作業報告画面改善 start
if
(
taskReportDto
.
reporterFlag
)
{
FileUtil
.
delete
(
ABVEnvironment
.
getInstance
().
getOperationTaskReportLevelDirPath
(
operationId
,
taskReportDto
.
taskKey
,
String
.
valueOf
(
taskReportDto
.
taskReportLevel
));
}
// #32926 作業報告画面改善 end
}
}
mTaskReportDao
.
deleteAll
();
mTaskReportDao
.
deleteAll
();
...
@@ -625,15 +629,18 @@ public class OperationListActivity extends ABVUIActivity {
...
@@ -625,15 +629,18 @@ public class OperationListActivity extends ABVUIActivity {
mOperationLogic
.
createJsonForRoutineTaskReport
(
operationDto
.
reportCycle
,
operationDto
.
enableReportUpdate
,
mOperationLogic
.
getLastRoutineTaskReportData
(
operationDto
.
operationId
).
taskReportId
,
contentPath
);
mOperationLogic
.
createJsonForRoutineTaskReport
(
operationDto
.
reportCycle
,
operationDto
.
enableReportUpdate
,
mOperationLogic
.
getLastRoutineTaskReportData
(
operationDto
.
operationId
).
taskReportId
,
contentPath
);
}
}
// TODO
// サーバ作業後、対応必要
// サーバ作業後、対応必要
StringBuffer
path
=
new
StringBuffer
();
StringBuffer
path
=
new
StringBuffer
();
path
.
append
(
contentPath
);
path
.
append
(
contentPath
);
// #32926 作業報告画面改善 start
path
.
append
(
"/index.html?app=android"
);
path
.
append
(
"/index.html?app=android"
);
path
.
append
(
"&view_mode="
+
mOperationAuthLevel
);
path
.
append
(
"&view_mode="
+
mOperationAuthLevel
);
path
.
append
(
"&project_type="
+
operationDto
.
operationType
);
path
.
append
(
"&report_type="
+
operationDto
.
reportType
);
// 作業報告タイプ : 0:報告 1:定期点検 2:報告(回答)
path
.
append
(
"&full_screen_flg="
+
(
isNormalSize
()
?
"1"
:
"0"
));
path
.
append
(
"&mobile_flg="
+
(
isNormalSize
()
?
"1"
:
"0"
));
// ScreenType
path
.
append
(
"&project_report_type="
+
(
operationDto
.
operationReportType
==
Constant
.
OperationReportType
.
ROUTINE_TASK
?
"1"
:
"0"
));
path
.
append
(
"&operation_type="
+
operationDto
.
operationType
);
// 作業タイプ : 0:リスト、1:図面、2:360°
Logger
.
d
(
TAG
,
"path : "
+
path
);
// #32926 作業報告画面改善 end
Intent
intent
=
new
Intent
();
Intent
intent
=
new
Intent
();
intent
.
putExtra
(
ABookKeys
.
CONTENT_ID
,
operationDto
.
contentId
);
intent
.
putExtra
(
ABookKeys
.
CONTENT_ID
,
operationDto
.
contentId
);
intent
.
putExtra
(
ABookKeys
.
OPERATION_ID
,
operationDto
.
operationId
);
intent
.
putExtra
(
ABookKeys
.
OPERATION_ID
,
operationDto
.
operationId
);
...
@@ -986,11 +993,15 @@ public class OperationListActivity extends ABVUIActivity {
...
@@ -986,11 +993,15 @@ 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
)
{
// 添付ファイルが存在する場合、取得して解凍する。
// 添付ファイルが存在する場合、取得して解凍する。
refreshTaskFile
(
operationId
,
operationContentDto
.
contentId
,
taskDto
.
taskId
,
taskDto
.
taskKey
,
directionsAttachedFileName
,
reportAttachedFileName
);
refreshTaskFile
(
operationId
,
operationContentDto
.
contentId
,
taskDto
.
taskId
,
taskDto
.
taskKey
,
directionsAttachedFileName
,
reportAttachedFileName
,
String
.
valueOf
(
taskReportLevel
)
);
if
(
isSyncGetTaskFileError
)
{
if
(
isSyncGetTaskFileError
)
{
return
null
;
return
null
;
}
}
...
@@ -1002,11 +1013,11 @@ public class OperationListActivity extends ABVUIActivity {
...
@@ -1002,11 +1013,11 @@ 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
{
// 添付ファイルが存在する場合、取得して解凍する。
// 添付ファイルが存在する場合、取得して解凍する。
refreshTaskFile
(
operationId
,
operationContentDto
.
contentId
,
taskDto
.
taskId
,
taskDto
.
taskKey
,
directionsAttachedFileName
,
reportAttachedFileName
);
refreshTaskFile
(
operationId
,
operationContentDto
.
contentId
,
taskDto
.
taskId
,
taskDto
.
taskKey
,
directionsAttachedFileName
,
reportAttachedFileName
,
String
.
valueOf
(
taskReportLevel
)
);
if
(
isSyncGetTaskFileError
)
{
if
(
isSyncGetTaskFileError
)
{
return
null
;
return
null
;
}
}
...
@@ -1016,7 +1027,7 @@ public class OperationListActivity extends ABVUIActivity {
...
@@ -1016,7 +1027,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
));
...
@@ -1037,16 +1048,16 @@ public class OperationListActivity extends ABVUIActivity {
...
@@ -1037,16 +1048,16 @@ public class OperationListActivity extends ABVUIActivity {
return
lastEditDate
;
return
lastEditDate
;
}
}
public
void
refreshTaskFile
(
final
long
operationId
,
final
long
contentId
,
final
long
taskId
,
final
String
taskKey
,
final
String
directionsAttachedFileName
,
final
String
reportAttachedFileName
)
throws
ABVException
,
InterruptedException
,
ZipException
,
NoSuchAlgorithmException
,
IOException
{
public
void
refreshTaskFile
(
final
long
operationId
,
final
long
contentId
,
final
long
taskId
,
final
String
taskKey
,
final
String
directionsAttachedFileName
,
final
String
reportAttachedFileName
,
final
String
taskReportLevel
)
throws
ABVException
,
InterruptedException
,
ZipException
,
NoSuchAlgorithmException
,
IOException
{
// 既存の添付ディレクトリ削除
// 既存の添付ディレクトリ削除
FileUtil
.
delete
(
ABVEnvironment
.
getInstance
().
getTempTaskDirPath
(
contentId
,
taskKey
));
FileUtil
.
delete
(
ABVEnvironment
.
getInstance
().
getTempTaskDirPath
(
contentId
,
taskKey
));
// #32782 指示者テーブル関連削除 start
// #32782 指示者テーブル関連削除 start
// TODO change
String
directionsLocalAttachedFileName
=
mTaskReportDao
.
getTaskReportAttachedFileName
(
taskKey
,
taskReportLevel
);
String
directionsLocalAttachedFileName
=
mTaskDirectionsDao
.
getTaskDirectionsAttachedFileName
(
taskKey
);
// String directionsLocalAttachedFileName = mTaskReportDao.getTaskReportAttachedFileName(taskKey);
// #32782 指示者テーブル関連削除 end
// #32782 指示者テーブル関連削除 end
String
reportLocalAttachedFileName
=
mTaskReportDao
.
getTaskReportAttachedFileName
(
taskKey
);
// #32926 start
String
reportLocalAttachedFileName
=
mTaskReportDao
.
getTaskReportAttachedFileName
(
taskKey
,
taskReportLevel
);
// #32926 end
int
count
=
0
;
int
count
=
0
;
boolean
getDirectionsFileFlg
=
directionsAttachedFileName
!=
null
&&
!
directionsAttachedFileName
.
equals
(
directionsLocalAttachedFileName
);
boolean
getDirectionsFileFlg
=
directionsAttachedFileName
!=
null
&&
!
directionsAttachedFileName
.
equals
(
directionsLocalAttachedFileName
);
boolean
getReportFileFlg
=
reportAttachedFileName
!=
null
&&
!
reportAttachedFileName
.
equals
(
reportLocalAttachedFileName
);
boolean
getReportFileFlg
=
reportAttachedFileName
!=
null
&&
!
reportAttachedFileName
.
equals
(
reportLocalAttachedFileName
);
...
@@ -1065,10 +1076,10 @@ public class OperationListActivity extends ABVUIActivity {
...
@@ -1065,10 +1076,10 @@ public class OperationListActivity extends ABVUIActivity {
protected
Void
doInBackground
(
Void
...
params
)
{
protected
Void
doInBackground
(
Void
...
params
)
{
try
{
try
{
Logger
.
i
(
TAG
,
"[Get Task Directions Files] operationId=%s, taskKey=%s, taskId=%s, attachedFileName=%s"
,
operationId
,
taskKey
,
taskId
,
directionsAttachedFileName
);
Logger
.
i
(
TAG
,
"[Get Task Directions Files] operationId=%s, taskKey=%s, taskId=%s, attachedFileName=%s"
,
operationId
,
taskKey
,
taskId
,
directionsAttachedFileName
);
FileUtil
.
delete
(
ABVEnvironment
.
getInstance
().
getOperationDirectionOrReportDirPath
(
operationId
,
taskKey
,
t
rue
));
FileUtil
.
delete
(
ABVEnvironment
.
getInstance
().
getOperationDirectionOrReportDirPath
(
operationId
,
taskKey
,
t
askReportLevel
));
String
outputFilePath
=
mOperationLogic
.
getTaskFile
(
operationId
,
taskKey
,
taskId
,
directionsAttachedFileName
,
0
);
String
outputFilePath
=
mOperationLogic
.
getTaskFile
(
operationId
,
taskKey
,
taskId
,
directionsAttachedFileName
,
0
);
ContentFileExtractor
.
getInstance
().
extractZipFile
(
contentId
,
outputFilePath
,
ContentFileExtractor
.
getInstance
().
extractZipFile
(
contentId
,
outputFilePath
,
ABVEnvironment
.
getInstance
().
getOperationDirectionOrReportDirPath
(
operationId
,
taskKey
,
t
rue
),
null
,
true
);
ABVEnvironment
.
getInstance
().
getOperationDirectionOrReportDirPath
(
operationId
,
taskKey
,
t
askReportLevel
),
null
,
true
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
Logger
.
e
(
TAG
,
e
);
Logger
.
e
(
TAG
,
e
);
ABVToastUtil
.
showMakeText
(
getApplicationContext
(),
R
.
string
.
msg_error_task_receiving_failed
,
Toast
.
LENGTH_LONG
);
ABVToastUtil
.
showMakeText
(
getApplicationContext
(),
R
.
string
.
msg_error_task_receiving_failed
,
Toast
.
LENGTH_LONG
);
...
@@ -1092,10 +1103,15 @@ public class OperationListActivity extends ABVUIActivity {
...
@@ -1092,10 +1103,15 @@ public class OperationListActivity extends ABVUIActivity {
protected
Void
doInBackground
(
Void
...
params
)
{
protected
Void
doInBackground
(
Void
...
params
)
{
try
{
try
{
Logger
.
i
(
TAG
,
"[Get Task Report Files] operationId=%s, taskKey=%s, taskId=%s, attachedFileName=%s"
,
operationId
,
taskKey
,
taskId
,
reportAttachedFileName
);
Logger
.
i
(
TAG
,
"[Get Task Report Files] operationId=%s, taskKey=%s, taskId=%s, attachedFileName=%s"
,
operationId
,
taskKey
,
taskId
,
reportAttachedFileName
);
FileUtil
.
delete
(
ABVEnvironment
.
getInstance
().
getOperationDirectionOrReportDirPath
(
operationId
,
taskKey
,
false
));
// #32926 start
FileUtil
.
delete
(
ABVEnvironment
.
getInstance
().
getOperationTaskReportLevelDirPath
(
operationId
,
taskKey
,
taskReportLevel
));
// #32926 end
String
outputFilePath
=
mOperationLogic
.
getTaskFile
(
operationId
,
taskKey
,
taskId
,
reportAttachedFileName
,
1
);
String
outputFilePath
=
mOperationLogic
.
getTaskFile
(
operationId
,
taskKey
,
taskId
,
reportAttachedFileName
,
1
);
ContentFileExtractor
.
getInstance
().
extractZipFile
(
contentId
,
outputFilePath
,
ContentFileExtractor
.
getInstance
().
extractZipFile
(
contentId
,
outputFilePath
,
ABVEnvironment
.
getInstance
().
getOperationDirectionOrReportDirPath
(
operationId
,
taskKey
,
false
),
null
,
true
);
// #32926 start
ABVEnvironment
.
getInstance
().
getOperationTaskReportLevelDirPath
(
operationId
,
taskKey
,
taskReportLevel
),
// #32926 end
null
,
true
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
Logger
.
e
(
TAG
,
e
);
Logger
.
e
(
TAG
,
e
);
ABVToastUtil
.
showMakeText
(
getApplicationContext
(),
R
.
string
.
msg_error_task_report_receiving_failed
,
Toast
.
LENGTH_LONG
);
ABVToastUtil
.
showMakeText
(
getApplicationContext
(),
R
.
string
.
msg_error_task_report_receiving_failed
,
Toast
.
LENGTH_LONG
);
...
@@ -1152,10 +1168,15 @@ public class OperationListActivity extends ABVUIActivity {
...
@@ -1152,10 +1168,15 @@ public class OperationListActivity extends ABVUIActivity {
protected
Void
doInBackground
(
Void
...
params
)
{
protected
Void
doInBackground
(
Void
...
params
)
{
try
{
try
{
Logger
.
i
(
TAG
,
"[Get Task Report Files] operationId=%s, taskKey=%s, taskId=%s, attachedFileName=%s"
,
operationId
,
taskKey
,
taskId
,
reportAttachedFileName
);
Logger
.
i
(
TAG
,
"[Get Task Report Files] operationId=%s, taskKey=%s, taskId=%s, attachedFileName=%s"
,
operationId
,
taskKey
,
taskId
,
reportAttachedFileName
);
FileUtil
.
delete
(
ABVEnvironment
.
getInstance
().
getRoutineTaskReportDirFilePath
(
operationId
,
taskKey
,
taskReportId
,
reportStartDateNone
));
// #32926 start
int
taskReportLevel
=
0
;
FileUtil
.
delete
(
ABVEnvironment
.
getInstance
().
getRoutineTaskReportDirFilePath
(
operationId
,
taskKey
,
taskReportId
,
reportStartDateNone
,
taskReportLevel
));
// #32926 end
String
outputFilePath
=
mOperationLogic
.
getRoutineTaskReportFile
(
operationId
,
taskKey
,
taskId
,
taskReportId
,
taskReportInfoId
,
reportStartDateNone
,
reportAttachedFileName
);
String
outputFilePath
=
mOperationLogic
.
getRoutineTaskReportFile
(
operationId
,
taskKey
,
taskId
,
taskReportId
,
taskReportInfoId
,
reportStartDateNone
,
reportAttachedFileName
);
// #32926 start
ContentFileExtractor
.
getInstance
().
extractZipFile
(
contentId
,
outputFilePath
,
ContentFileExtractor
.
getInstance
().
extractZipFile
(
contentId
,
outputFilePath
,
ABVEnvironment
.
getInstance
().
getRoutineTaskReportDirFilePath
(
operationId
,
taskKey
,
taskReportId
,
reportStartDateNone
),
null
,
true
);
ABVEnvironment
.
getInstance
().
getRoutineTaskReportDirFilePath
(
operationId
,
taskKey
,
taskReportId
,
reportStartDateNone
,
taskReportLevel
),
null
,
true
);
// #32926 end
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
Logger
.
e
(
TAG
,
e
);
Logger
.
e
(
TAG
,
e
);
ABVToastUtil
.
showMakeText
(
getApplicationContext
(),
R
.
string
.
msg_error_task_report_receiving_failed
,
Toast
.
LENGTH_LONG
);
ABVToastUtil
.
showMakeText
(
getApplicationContext
(),
R
.
string
.
msg_error_task_report_receiving_failed
,
Toast
.
LENGTH_LONG
);
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/helper/ABookCheckWebViewHelper.java
View file @
2cac1130
...
@@ -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
;
...
@@ -78,7 +92,7 @@ public class ABookCheckWebViewHelper extends ABookHelper {
...
@@ -78,7 +92,7 @@ public class ABookCheckWebViewHelper extends ABookHelper {
case ABookKeys.CMD_INSERT_TASK_REPORT:
case ABookKeys.CMD_INSERT_TASK_REPORT:
insertOrUpdateTaskReport(taskKey, reportUpdateType, operationId, contentId, param, contentPath, true, routineTaskReportFlg);
insertOrUpdateTaskReport(taskKey, reportUpdateType, operationId, contentId, param, contentPath, true, routineTaskReportFlg);
if (mOperationAuthLevel == OperationAuthLevel.OPERATION_INSTRUCTOR) {
if (mOperationAuthLevel == OperationAuthLevel.OPERATION_INSTRUCTOR) {
copyTaskAttachedMovie(operationId, contentId, taskKey);
copyTaskAttachedMovie(operationId, contentId, taskKey
, String.valueOf(taskReportLevel)
);
sendTaskReportData(context, operationId, taskKey, -1, true);
sendTaskReportData(context, operationId, taskKey, -1, true);
} else {
} else {
sendTaskReportData(context, operationId, taskKey, reportUpdateType, false);
sendTaskReportData(context, operationId, taskKey, reportUpdateType, false);
...
@@ -91,7 +105,7 @@ public class ABookCheckWebViewHelper extends ABookHelper {
...
@@ -91,7 +105,7 @@ public class ABookCheckWebViewHelper extends ABookHelper {
insertOrUpdateTaskReport(taskKey, reportUpdateType, operationId, contentId, param, contentPath, false, routineTaskReportFlg);
insertOrUpdateTaskReport(taskKey, reportUpdateType, operationId, contentId, param, contentPath, false, routineTaskReportFlg);
if (mOperationAuthLevel == OperationAuthLevel.OPERATION_INSTRUCTOR) {
if (mOperationAuthLevel == OperationAuthLevel.OPERATION_INSTRUCTOR) {
copyTaskAttachedMovie(operationId, contentId, taskKey);
copyTaskAttachedMovie(operationId, contentId, taskKey
, String.valueOf(taskReportLevel)
);
sendTaskReportData(context, operationId, taskKey, -1, true);
sendTaskReportData(context, operationId, taskKey, -1, true);
} else {
} else {
sendTaskReportData(context, operationId, taskKey, reportUpdateType, false);
sendTaskReportData(context, operationId, taskKey, reportUpdateType, false);
...
@@ -108,7 +122,7 @@ public class ABookCheckWebViewHelper extends ABookHelper {
...
@@ -108,7 +122,7 @@ public class ABookCheckWebViewHelper extends ABookHelper {
if (mOperationAuthLevel == OperationAuthLevel.OPERATION_INSTRUCTOR) {
if (mOperationAuthLevel == OperationAuthLevel.OPERATION_INSTRUCTOR) {
mOperationLogic.deleteTaskReport(operationId, contentId, taskKey);
mOperationLogic.deleteTaskReport(operationId, contentId, taskKey);
mOperationLogic.createJsonForOperationContent(operationId, reportUpdateType, contentPath, false);
mOperationLogic.createJsonForOperationContent(operationId, reportUpdateType, contentPath, false);
copyTaskAttachedMovie(operationId, contentId, taskKey);
copyTaskAttachedMovie(operationId, contentId, taskKey
, String.valueOf(taskReportLevel)
);
sendTaskReportData(context, operationId, taskKey, -1, true);
sendTaskReportData(context, operationId, taskKey, -1, true);
} else {
} else {
if (routineTaskReportFlg) {
if (routineTaskReportFlg) {
...
@@ -126,7 +140,7 @@ public class ABookCheckWebViewHelper extends ABookHelper {
...
@@ -126,7 +140,7 @@ public class ABookCheckWebViewHelper extends ABookHelper {
} else {
} else {
mOperationLogic.deleteTaskReport(operationId, contentId, taskKey);
mOperationLogic.deleteTaskReport(operationId, contentId, taskKey);
mOperationLogic.createJsonForOperationContent(operationId, reportUpdateType, contentPath, false);
mOperationLogic.createJsonForOperationContent(operationId, reportUpdateType, contentPath, false);
copyTaskAttachedMovie(operationId, contentId, taskKey);
copyTaskAttachedMovie(operationId, contentId, taskKey
, String.valueOf(taskReportLevel)
);
TaskReportDto taskReportDto = mOperationLogic.getTaskReport(taskKey);
TaskReportDto taskReportDto = mOperationLogic.getTaskReport(taskKey);
if (taskReportDto != null && reportUpdateType != Constant.OperationUpdateType.HISTORY_ADD) {
if (taskReportDto != null && reportUpdateType != Constant.OperationUpdateType.HISTORY_ADD) {
...
@@ -164,37 +178,39 @@ public class ABookCheckWebViewHelper extends ABookHelper {
...
@@ -164,37 +178,39 @@ public class ABookCheckWebViewHelper extends ABookHelper {
switch
(
cmd
)
{
switch
(
cmd
)
{
case
ABookKeys
.
CMD_INSERT_TASK_DIRECTIONS
:
case
ABookKeys
.
CMD_INSERT_TASK_DIRECTIONS
:
insertOrUpdateTaskDirections
(
taskKey
,
operationId
,
contentId
,
param
,
contentPath
,
true
);
insertOrUpdateTaskDirections
(
taskKey
,
operationId
,
contentId
,
param
,
contentPath
,
true
);
copyTaskAttachedMovie
(
operationId
,
contentId
,
taskKey
);
copyTaskAttachedMovie
(
operationId
,
contentId
,
taskKey
,
String
.
valueOf
(
taskReportLevel
)
);
sendTaskDirectionsData
(
context
,
operationId
,
taskKey
);
sendTaskDirectionsData
(
context
,
operationId
,
taskKey
);
break
;
break
;
case
ABookKeys
.
CMD_UPDATE_TASK_DIRECTIONS
:
case
ABookKeys
.
CMD_UPDATE_TASK_DIRECTIONS
:
insertOrUpdateTaskDirections
(
taskKey
,
operationId
,
contentId
,
param
,
contentPath
,
false
);
insertOrUpdateTaskDirections
(
taskKey
,
operationId
,
contentId
,
param
,
contentPath
,
false
);
copyTaskAttachedMovie
(
operationId
,
contentId
,
taskKey
);
copyTaskAttachedMovie
(
operationId
,
contentId
,
taskKey
,
String
.
valueOf
(
taskReportLevel
)
);
sendTaskDirectionsData
(
context
,
operationId
,
taskKey
);
sendTaskDirectionsData
(
context
,
operationId
,
taskKey
);
break
;
break
;
case
ABookKeys
.
CMD_DELETE_TASK_DIRECTIONS
:
case
ABookKeys
.
CMD_DELETE_TASK_DIRECTIONS
:
mOperationLogic
.
deleteTaskDirections
(
operationId
,
contentId
,
taskKey
);
mOperationLogic
.
deleteTaskDirections
(
operationId
,
contentId
,
taskKey
);
mOperationLogic
.
createJsonForOperationContent
(
operationId
,
reportUpdateType
,
contentPath
,
true
);
mOperationLogic
.
createJsonForOperationContent
(
operationId
,
reportUpdateType
,
contentPath
,
true
);
copyTaskAttachedMovie
(
operationId
,
contentId
,
taskKey
);
copyTaskAttachedMovie
(
operationId
,
contentId
,
taskKey
,
String
.
valueOf
(
taskReportLevel
)
);
sendTaskDirectionsData
(
context
,
operationId
,
taskKey
);
sendTaskDirectionsData
(
context
,
operationId
,
taskKey
);
break
;
break
;
case
ABookKeys
.
CMD_MOVE_HOT_SPOT
:
case
ABookKeys
.
CMD_MOVE_HOT_SPOT
:
mOperationLogic
.
updateTaskHotspot
(
taskKey
,
param
);
// #32926 作業報告画面改善 start
mOperationLogic
.
updateTaskHotspot
(
taskKey
,
param
,
taskReportLevel
);
// #32926 作業報告画面改善 end
mOperationLogic
.
createHopSpotJson
(
operationId
,
contentPath
);
mOperationLogic
.
createHopSpotJson
(
operationId
,
contentPath
);
break
;
break
;
case
ABookKeys
.
CMD_INSERT_TASK_REPORT
:
case
ABookKeys
.
CMD_INSERT_TASK_REPORT
:
insertOrUpdateTaskReport
(
taskKey
,
reportUpdateType
,
operationId
,
contentId
,
param
,
contentPath
,
true
,
routineTaskReportFlg
);
insertOrUpdateTaskReport
(
taskKey
,
reportUpdateType
,
operationId
,
contentId
,
param
,
contentPath
,
true
,
routineTaskReportFlg
,
taskReportLevel
);
sendTaskReportData
(
context
,
operationId
,
taskKey
,
reportUpdateType
);
sendTaskReportData
(
context
,
operationId
,
taskKey
,
reportUpdateType
);
break
;
break
;
case
ABookKeys
.
CMD_UPDATE_TASK_REPORT
:
case
ABookKeys
.
CMD_UPDATE_TASK_REPORT
:
insertOrUpdateTaskReport
(
taskKey
,
reportUpdateType
,
operationId
,
contentId
,
param
,
contentPath
,
false
,
routineTaskReportFlg
);
insertOrUpdateTaskReport
(
taskKey
,
reportUpdateType
,
operationId
,
contentId
,
param
,
contentPath
,
false
,
routineTaskReportFlg
,
taskReportLevel
);
sendTaskReportData
(
context
,
operationId
,
taskKey
,
reportUpdateType
);
sendTaskReportData
(
context
,
operationId
,
taskKey
,
reportUpdateType
);
break
;
break
;
// #32861 作業情報追加 start
// #32861 作業情報追加 start
// 一時保存処理
// 一時保存処理
case
ABookKeys
.
CMD_LOCAL_SAVE_TASK_REPORT
:
case
ABookKeys
.
CMD_LOCAL_SAVE_TASK_REPORT
:
insertOrUpdateTaskReport
(
taskKey
,
reportUpdateType
,
operationId
,
contentId
,
param
,
contentPath
,
false
,
routineTaskReportFlg
);
insertOrUpdateTaskReport
(
taskKey
,
reportUpdateType
,
operationId
,
contentId
,
param
,
contentPath
,
false
,
routineTaskReportFlg
,
taskReportLevel
);
context
.
handleErrorMessageToast
(
R
.
string
.
msg_temp_save_result
);
context
.
handleErrorMessageToast
(
R
.
string
.
msg_temp_save_result
);
break
;
break
;
// #32861 作業情報追加 end
// #32861 作業情報追加 end
...
@@ -209,16 +225,16 @@ public class ABookCheckWebViewHelper extends ABookHelper {
...
@@ -209,16 +225,16 @@ public class ABookCheckWebViewHelper extends ABookHelper {
reportStartDate
=
reportStartDate
.
replace
(
"T"
,
" "
);
reportStartDate
=
reportStartDate
.
replace
(
"T"
,
" "
);
mOperationLogic
.
deleteRoutineTaskReport
(
operationId
,
contentId
,
taskKey
,
taskReportId
,
reportStartDate
);
mOperationLogic
.
deleteRoutineTaskReport
(
operationId
,
contentId
,
taskKey
,
taskReportId
,
reportStartDate
);
mOperationLogic
.
createJsonForOperationContent
(
operationId
,
reportUpdateType
,
contentPath
,
false
);
mOperationLogic
.
createJsonForOperationContent
(
operationId
,
reportUpdateType
,
contentPath
,
false
);
copyRoutineTaskReportAttachedMovie
(
operationId
,
contentId
,
taskKey
,
taskReportId
,
reportStartDate
);
copyRoutineTaskReportAttachedMovie
(
operationId
,
contentId
,
taskKey
,
taskReportId
,
reportStartDate
,
taskReportLevel
);
RoutineTaskReportDto
routineTaskTaskReportDto
=
mOperationLogic
.
getRoutineTaskReportUtc
(
taskKey
,
taskReportId
,
reportStartDate
);
RoutineTaskReportDto
routineTaskTaskReportDto
=
mOperationLogic
.
getRoutineTaskReportUtc
(
taskKey
,
taskReportId
,
reportStartDate
);
if
(
routineTaskTaskReportDto
!=
null
&&
reportUpdateType
!=
Constant
.
OperationUpdateType
.
HISTORY_ADD
)
{
if
(
routineTaskTaskReportDto
!=
null
&&
reportUpdateType
!=
Constant
.
OperationUpdateType
.
HISTORY_ADD
)
{
sendTaskReportDataFlg
=
true
;
sendTaskReportDataFlg
=
true
;
}
}
}
else
{
}
else
{
mOperationLogic
.
deleteTaskReport
(
operationId
,
contentId
,
taskKey
);
mOperationLogic
.
deleteTaskReport
(
operationId
,
contentId
,
taskKey
,
taskReportLevel
);
mOperationLogic
.
createJsonForOperationContent
(
operationId
,
reportUpdateType
,
contentPath
,
false
);
mOperationLogic
.
createJsonForOperationContent
(
operationId
,
reportUpdateType
,
contentPath
,
false
);
copyTaskAttachedMovie
(
operationId
,
contentId
,
taskKey
);
copyTaskAttachedMovie
(
operationId
,
contentId
,
taskKey
,
String
.
valueOf
(
taskReportLevel
)
);
TaskReportDto
taskReportDto
=
mOperationLogic
.
getTaskReport
(
taskKey
);
TaskReportDto
taskReportDto
=
mOperationLogic
.
getTaskReport
(
taskKey
);
if
(
taskReportDto
!=
null
&&
reportUpdateType
!=
Constant
.
OperationUpdateType
.
HISTORY_ADD
)
{
if
(
taskReportDto
!=
null
&&
reportUpdateType
!=
Constant
.
OperationUpdateType
.
HISTORY_ADD
)
{
...
@@ -230,7 +246,7 @@ public class ABookCheckWebViewHelper extends ABookHelper {
...
@@ -230,7 +246,7 @@ public class ABookCheckWebViewHelper extends ABookHelper {
if
(
reportUpdateType
==
Constant
.
OperationUpdateType
.
HISTORY_NO
)
{
if
(
reportUpdateType
==
Constant
.
OperationUpdateType
.
HISTORY_NO
)
{
taskReportSendId
=
mOperationLogic
.
getLastTaskReportSendId
(
taskKey
);
taskReportSendId
=
mOperationLogic
.
getLastTaskReportSendId
(
taskKey
);
mOperationLogic
.
updateTaskReportSend
(
taskKey
,
taskReportId
,
reportStartDate
,
null
,
true
);
mOperationLogic
.
updateTaskReportSend
(
taskKey
,
taskReportId
,
reportStartDate
,
null
,
true
);
deleteReportTaskSendFiles
(
operationId
,
taskKey
,
taskReportSendId
);
deleteReportTaskSendFiles
(
operationId
,
taskKey
,
taskReportSendId
,
taskReportLevel
);
}
else
if
(
reportUpdateType
==
Constant
.
OperationUpdateType
.
HISTORY_UPDATE
)
{
}
else
if
(
reportUpdateType
==
Constant
.
OperationUpdateType
.
HISTORY_UPDATE
)
{
mOperationLogic
.
insertTaskReportSend
(
taskKey
,
taskReportId
,
reportStartDate
,
null
,
true
);
mOperationLogic
.
insertTaskReportSend
(
taskKey
,
taskReportId
,
reportStartDate
,
null
,
true
);
}
}
...
@@ -242,7 +258,9 @@ public class ABookCheckWebViewHelper extends ABookHelper {
...
@@ -242,7 +258,9 @@ 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
FileUtil
.
delete
(
ABVEnvironment
.
getInstance
().
getTempTaskDirPath
(
contentId
,
taskKey
));
FileUtil
.
delete
(
ABVEnvironment
.
getInstance
().
getTempTaskDirPath
(
contentId
,
taskKey
));
// #32926 作業報告画面改善 end
mFinishCallback
.
callback
(
false
);
mFinishCallback
.
callback
(
false
);
break
;
break
;
}
}
...
@@ -520,7 +538,7 @@ public class ABookCheckWebViewHelper extends ABookHelper {
...
@@ -520,7 +538,7 @@ public class ABookCheckWebViewHelper extends ABookHelper {
copyRoutineTaskReportAttachedMovie(operationId, contentId, taskKey, taskReportId, reportStartDate);
copyRoutineTaskReportAttachedMovie(operationId, contentId, taskKey, taskReportId, reportStartDate);
} else {
} else {
mOperationLogic.createJsonForOperationContent(operationId, reportUpdateType, contentPath, false);
mOperationLogic.createJsonForOperationContent(operationId, reportUpdateType, contentPath, false);
copyTaskAttachedMovie(operationId, contentId, taskKey);
copyTaskAttachedMovie(operationId, contentId, taskKey
, String.valueOf(taskReportLevel)
);
}
}
if (reportUpdateType == Constant.OperationUpdateType.HISTORY_NO) {
if (reportUpdateType == Constant.OperationUpdateType.HISTORY_NO) {
...
@@ -550,7 +568,7 @@ public class ABookCheckWebViewHelper extends ABookHelper {
...
@@ -550,7 +568,7 @@ public class ABookCheckWebViewHelper extends ABookHelper {
}
}
}
}
*/
*/
private
void
insertOrUpdateTaskReport
(
String
taskKey
,
int
reportUpdateType
,
long
operationId
,
long
contentId
,
Map
<
String
,
String
>
param
,
String
contentPath
,
boolean
insertFlg
,
boolean
routineTaskReportFlg
)
throws
IOException
{
private
void
insertOrUpdateTaskReport
(
String
taskKey
,
int
reportUpdateType
,
long
operationId
,
long
contentId
,
Map
<
String
,
String
>
param
,
String
contentPath
,
boolean
insertFlg
,
boolean
routineTaskReportFlg
,
int
taskReportLevel
)
throws
IOException
{
int
taskReportSendId
=
0
;
int
taskReportSendId
=
0
;
boolean
attachedChangeFlag
=
param
.
get
(
ABookKeys
.
ATTACHED_CHANGE_FLAG
).
equals
(
"1"
)
?
true
:
false
;
boolean
attachedChangeFlag
=
param
.
get
(
ABookKeys
.
ATTACHED_CHANGE_FLAG
).
equals
(
"1"
)
?
true
:
false
;
String
taskReport
=
param
.
get
(
ABookKeys
.
TASK_REPORT
);
String
taskReport
=
param
.
get
(
ABookKeys
.
TASK_REPORT
);
...
@@ -570,18 +588,20 @@ public class ABookCheckWebViewHelper extends ABookHelper {
...
@@ -570,18 +588,20 @@ 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
,
taskReportLevel
);
// #32926 作業報告画面改善 end
}
else
{
}
else
{
mOperationLogic
.
updateTaskReport
(
taskKey
,
operationId
,
contentId
,
taskReportJson
,
null
,
attachedChangeFlag
,
true
);
mOperationLogic
.
updateTaskReport
(
taskKey
,
operationId
,
contentId
,
taskReportJson
,
null
,
attachedChangeFlag
,
true
,
taskReportLevel
);
}
}
}
}
if
(
routineTaskReportFlg
)
{
if
(
routineTaskReportFlg
)
{
mOperationLogic
.
createJsonForOperationContent
(
operationId
,
reportUpdateType
,
contentPath
,
false
);
mOperationLogic
.
createJsonForOperationContent
(
operationId
,
reportUpdateType
,
contentPath
,
false
);
copyRoutineTaskReportAttachedMovie
(
operationId
,
contentId
,
taskKey
,
taskReportId
,
reportStartDate
);
copyRoutineTaskReportAttachedMovie
(
operationId
,
contentId
,
taskKey
,
taskReportId
,
reportStartDate
,
taskReportLevel
);
}
else
{
}
else
{
mOperationLogic
.
createJsonForOperationContent
(
operationId
,
reportUpdateType
,
contentPath
,
false
);
mOperationLogic
.
createJsonForOperationContent
(
operationId
,
reportUpdateType
,
contentPath
,
false
);
copyTaskAttachedMovie
(
operationId
,
contentId
,
taskKey
);
copyTaskAttachedMovie
(
operationId
,
contentId
,
taskKey
,
String
.
valueOf
(
taskReportLevel
)
);
}
}
if
(
reportUpdateType
==
Constant
.
OperationUpdateType
.
HISTORY_NO
)
{
if
(
reportUpdateType
==
Constant
.
OperationUpdateType
.
HISTORY_NO
)
{
...
@@ -601,12 +621,16 @@ public class ABookCheckWebViewHelper extends ABookHelper {
...
@@ -601,12 +621,16 @@ public class ABookCheckWebViewHelper extends ABookHelper {
}
}
}
}
copyReportTaskSendFiles
(
operationId
,
taskKey
,
taskReportSendId
,
routineTaskReportFlg
,
taskReportId
,
reportStartDate
);
// #32926 作業報告画面改善 start
copyReportTaskSendFiles
(
operationId
,
taskKey
,
taskReportSendId
,
routineTaskReportFlg
,
taskReportId
,
reportStartDate
,
taskReportLevel
);
// #32926 作業報告画面改善 end
if
(
reportUpdateType
==
Constant
.
OperationUpdateType
.
HISTORY_ADD
)
{
if
(
reportUpdateType
==
Constant
.
OperationUpdateType
.
HISTORY_ADD
)
{
// 作業報告のディレクトリ削除
// 作業報告のディレクトリ削除
// #32926 作業報告画面改善 start
FileUtil
.
delete
(
ABVEnvironment
.
getInstance
().
getTempTaskDirPath
(
contentId
,
taskKey
));
FileUtil
.
delete
(
ABVEnvironment
.
getInstance
().
getTempTaskDirPath
(
contentId
,
taskKey
));
FileUtil
.
delete
(
ABVEnvironment
.
getInstance
().
getOperationDirectionOrReportDirPath
(
operationId
,
taskKey
,
false
));
FileUtil
.
delete
(
ABVEnvironment
.
getInstance
().
getOperationTaskReportLevelDirPath
(
operationId
,
taskKey
,
String
.
valueOf
(
taskReportLevel
)));
// #32926 作業報告画面改善 end
}
}
}
}
// #32782 指示者テーブル関連削除 end
// #32782 指示者テーブル関連削除 end
...
@@ -619,10 +643,12 @@ public class ABookCheckWebViewHelper extends ABookHelper {
...
@@ -619,10 +643,12 @@ public class ABookCheckWebViewHelper extends ABookHelper {
if
(
operationDto
.
operationReportType
==
Constant
.
OperationReportType
.
ROUTINE_TASK
)
{
if
(
operationDto
.
operationReportType
==
Constant
.
OperationReportType
.
ROUTINE_TASK
)
{
List
<
RoutineTaskReportDto
>
listRoutineTaskReport
=
mOperationLogic
.
getRoutineTaskReportByTaskKey
(
taskDto
.
taskKey
);
List
<
RoutineTaskReportDto
>
listRoutineTaskReport
=
mOperationLogic
.
getRoutineTaskReportByTaskKey
(
taskDto
.
taskKey
);
for
(
RoutineTaskReportDto
routineTaskDto
:
listRoutineTaskReport
)
{
for
(
RoutineTaskReportDto
routineTaskDto
:
listRoutineTaskReport
)
{
copyRoutineTaskReportAttachedMovie
(
operationId
,
contentId
,
routineTaskDto
.
taskKey
,
routineTaskDto
.
taskReportId
,
routineTaskDto
.
reportStartDate
);
copyRoutineTaskReportAttachedMovie
(
operationId
,
contentId
,
routineTaskDto
.
taskKey
,
routineTaskDto
.
taskReportId
,
routineTaskDto
.
reportStartDate
,
0
);
}
}
}
else
{
}
else
{
copyTaskAttachedMovie
(
operationId
,
contentId
,
taskDto
.
taskKey
);
// #32926 作業報告画面改善 start
copyTaskAttachedMovie
(
operationId
,
contentId
,
taskDto
.
taskKey
,
String
.
valueOf
(
taskDto
.
taskReportLevel
));
// #32926 作業報告画面改善 end
}
}
}
}
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
...
@@ -641,7 +667,7 @@ public class ABookCheckWebViewHelper extends ABookHelper {
...
@@ -641,7 +667,7 @@ public class ABookCheckWebViewHelper extends ABookHelper {
* @param objReportStartDate
* @param objReportStartDate
* @throws IOException
* @throws IOException
*/
*/
public
void
copyRoutineTaskReportAttachedMovie
(
long
operationId
,
long
contentId
,
String
taskKey
,
int
taskReportId
,
Object
objReportStartDate
)
throws
IOException
{
public
void
copyRoutineTaskReportAttachedMovie
(
long
operationId
,
long
contentId
,
String
taskKey
,
int
taskReportId
,
Object
objReportStartDate
,
int
taskReportLevel
)
throws
IOException
{
String
reportStartDate
;
String
reportStartDate
;
if
(
objReportStartDate
instanceof
String
)
{
if
(
objReportStartDate
instanceof
String
)
{
reportStartDate
=
DateTimeUtil
.
toString_yyyyMMddHHmmss_none
(
DateTimeUtil
.
toDate
((
String
)
objReportStartDate
,
DateTimeFormat
.
yyyyMMddHHmmss_hyphen
));
reportStartDate
=
DateTimeUtil
.
toString_yyyyMMddHHmmss_none
(
DateTimeUtil
.
toDate
((
String
)
objReportStartDate
,
DateTimeFormat
.
yyyyMMddHHmmss_hyphen
));
...
@@ -651,7 +677,7 @@ public class ABookCheckWebViewHelper extends ABookHelper {
...
@@ -651,7 +677,7 @@ public class ABookCheckWebViewHelper extends ABookHelper {
return
;
return
;
}
}
String
taskKeyPath
=
ABVEnvironment
.
getInstance
().
getRoutineTaskReportDirFilePath
(
operationId
,
taskKey
,
taskReportId
,
reportStartDate
);
String
taskKeyPath
=
ABVEnvironment
.
getInstance
().
getRoutineTaskReportDirFilePath
(
operationId
,
taskKey
,
taskReportId
,
reportStartDate
,
taskReportLevel
);
File
taskKeyFile
=
new
File
(
taskKeyPath
);
File
taskKeyFile
=
new
File
(
taskKeyPath
);
// 作業報告書の添付ファイル(mp4,mov拡張子のみ)コピー
// 作業報告書の添付ファイル(mp4,mov拡張子のみ)コピー
...
@@ -674,12 +700,14 @@ public class ABookCheckWebViewHelper extends ABookHelper {
...
@@ -674,12 +700,14 @@ public class ABookCheckWebViewHelper extends ABookHelper {
* @param operationId
* @param operationId
* @param contentId
* @param contentId
*/
*/
public
void
copyTaskAttachedMovie
(
long
operationId
,
long
contentId
,
String
taskKey
)
throws
IOException
{
// #32926 作業報告画面改善 start
public
void
copyTaskAttachedMovie
(
long
operationId
,
long
contentId
,
String
taskKey
,
String
taskReportLevel
)
throws
IOException
{
// 作業指示書の添付ファイル(mp4,mov拡張子のみ)コピー
// 作業指示書の添付ファイル(mp4,mov拡張子のみ)コピー
String
taskKeyPath
=
ABVEnvironment
.
getInstance
().
getOperationDirectionOrReportDirPath
(
operationId
,
taskKey
,
true
);
String
taskKeyPath
=
ABVEnvironment
.
getInstance
().
getOperationTaskReportLevelDirPath
(
operationId
,
taskKey
,
taskReportLevel
);
// #32926 作業報告画面改善 end
File
taskKeyFile
=
new
File
(
taskKeyPath
);
File
taskKeyFile
=
new
File
(
taskKeyPath
);
if
(
taskKeyFile
.
exists
())
{
if
(
taskKeyFile
.
exists
())
{
String
attachedMoviesFilePath
=
ABVEnvironment
.
getInstance
().
getAttachedDirectionOrReportDirPath
(
contentId
,
taskKey
,
t
rue
);
String
attachedMoviesFilePath
=
ABVEnvironment
.
getInstance
().
getAttachedDirectionOrReportDirPath
(
contentId
,
taskKey
,
t
askReportLevel
);
// 存在しない場合は無視する
// 存在しない場合は無視する
FileUtil
.
delete
(
attachedMoviesFilePath
);
FileUtil
.
delete
(
attachedMoviesFilePath
);
...
@@ -692,10 +720,10 @@ public class ABookCheckWebViewHelper extends ABookHelper {
...
@@ -692,10 +720,10 @@ public class ABookCheckWebViewHelper extends ABookHelper {
}
}
// 作業報告書の添付ファイル(mp4,mov拡張子のみ)コピー
// 作業報告書の添付ファイル(mp4,mov拡張子のみ)コピー
if
(
ABVDataCache
.
getInstance
().
getMemberInfo
().
operationAuthLevel
==
OperationAuthLevel
.
WORKER
)
{
if
(
ABVDataCache
.
getInstance
().
getMemberInfo
().
operationAuthLevel
==
OperationAuthLevel
.
WORKER
)
{
taskKeyPath
=
ABVEnvironment
.
getInstance
().
getOperationDirectionOrReportDirPath
(
operationId
,
taskKey
,
false
);
taskKeyPath
=
ABVEnvironment
.
getInstance
().
getOperationDirectionOrReportDirPath
(
operationId
,
taskKey
,
taskReportLevel
);
taskKeyFile
=
new
File
(
taskKeyPath
);
taskKeyFile
=
new
File
(
taskKeyPath
);
if
(
taskKeyFile
.
exists
())
{
if
(
taskKeyFile
.
exists
())
{
String
attachedMoviesFilePath
=
ABVEnvironment
.
getInstance
().
getAttachedDirectionOrReportDirPath
(
contentId
,
taskKey
,
false
);
String
attachedMoviesFilePath
=
ABVEnvironment
.
getInstance
().
getAttachedDirectionOrReportDirPath
(
contentId
,
taskKey
,
taskReportLevel
);
FileUtil
.
delete
(
attachedMoviesFilePath
);
FileUtil
.
delete
(
attachedMoviesFilePath
);
FileUtil
.
createNewDirectory
(
attachedMoviesFilePath
);
FileUtil
.
createNewDirectory
(
attachedMoviesFilePath
);
for
(
String
taskAttachedFile
:
taskKeyFile
.
list
())
{
for
(
String
taskAttachedFile
:
taskKeyFile
.
list
())
{
...
@@ -717,7 +745,7 @@ public class ABookCheckWebViewHelper extends ABookHelper {
...
@@ -717,7 +745,7 @@ public class ABookCheckWebViewHelper extends ABookHelper {
* @param reportStartDate
* @param reportStartDate
* @throws IOException
* @throws IOException
*/
*/
public
void
copyReportTaskSendFiles
(
final
long
operationId
,
final
String
taskKey
,
final
int
taskReportSendId
,
boolean
routineTaskReportFlg
,
int
taskReportId
,
String
reportStartDate
)
throws
IOException
{
public
void
copyReportTaskSendFiles
(
final
long
operationId
,
final
String
taskKey
,
final
int
taskReportSendId
,
boolean
routineTaskReportFlg
,
int
taskReportId
,
String
reportStartDate
,
int
taskReportLevel
)
throws
IOException
{
String
taskAttachedPath
;
String
taskAttachedPath
;
Date
dReportStartDate
;
Date
dReportStartDate
;
String
sReportStartDate
=
""
;
String
sReportStartDate
=
""
;
...
@@ -725,18 +753,20 @@ public class ABookCheckWebViewHelper extends ABookHelper {
...
@@ -725,18 +753,20 @@ public class ABookCheckWebViewHelper extends ABookHelper {
if
(
routineTaskReportFlg
)
{
if
(
routineTaskReportFlg
)
{
dReportStartDate
=
DateTimeUtil
.
toDate
(
reportStartDate
,
DateTimeFormat
.
yyyyMMddHHmmss_hyphen
);
dReportStartDate
=
DateTimeUtil
.
toDate
(
reportStartDate
,
DateTimeFormat
.
yyyyMMddHHmmss_hyphen
);
sReportStartDate
=
DateTimeUtil
.
toString_yyyyMMddHHmmss_none
(
dReportStartDate
);
sReportStartDate
=
DateTimeUtil
.
toString_yyyyMMddHHmmss_none
(
dReportStartDate
);
taskAttachedPath
=
ABVEnvironment
.
getInstance
().
getRoutineTaskReportDirFilePath
(
operationId
,
taskKey
,
taskReportId
,
sReportStartDate
);
taskAttachedPath
=
ABVEnvironment
.
getInstance
().
getRoutineTaskReportDirFilePath
(
operationId
,
taskKey
,
taskReportId
,
sReportStartDate
,
taskReportLevel
);
}
else
{
}
else
{
taskAttachedPath
=
ABVEnvironment
.
getInstance
().
getOperationDirectionOrReportDirPath
(
operationId
,
taskKey
,
false
);
// #32926 作業報告画面改善 start
taskAttachedPath
=
ABVEnvironment
.
getInstance
().
getOperationTaskReportLevelDirPath
(
operationId
,
taskKey
,
String
.
valueOf
(
taskReportLevel
));
// #32926 作業報告画面改善 end
}
}
File
taskAttachedFiles
=
new
File
(
taskAttachedPath
);
File
taskAttachedFiles
=
new
File
(
taskAttachedPath
);
if
(
taskAttachedFiles
.
exists
())
{
if
(
taskAttachedFiles
.
exists
())
{
String
taskReportSendPath
;
String
taskReportSendPath
;
if
(
routineTaskReportFlg
)
{
if
(
routineTaskReportFlg
)
{
taskReportSendPath
=
ABVEnvironment
.
getInstance
().
getRoutineTaskReportSendDirFilePath
(
operationId
,
taskKey
,
taskReportId
,
sReportStartDate
,
taskReportSendId
);
taskReportSendPath
=
ABVEnvironment
.
getInstance
().
getRoutineTaskReportSendDirFilePath
(
operationId
,
taskKey
,
taskReportId
,
sReportStartDate
,
taskReportSendId
,
taskReportLevel
);
}
else
{
}
else
{
taskReportSendPath
=
ABVEnvironment
.
getInstance
().
getOperationTaskReportSendDirFilePath
(
operationId
,
taskKey
,
taskReportSendId
);
taskReportSendPath
=
ABVEnvironment
.
getInstance
().
getOperationTaskReportSendDirFilePath
(
operationId
,
taskKey
,
taskReportSendId
,
taskReportLevel
);
}
}
FileUtil
.
delete
(
taskReportSendPath
);
FileUtil
.
delete
(
taskReportSendPath
);
FileUtil
.
createNewDirectory
(
taskReportSendPath
);
FileUtil
.
createNewDirectory
(
taskReportSendPath
);
...
@@ -754,12 +784,12 @@ public class ABookCheckWebViewHelper extends ABookHelper {
...
@@ -754,12 +784,12 @@ public class ABookCheckWebViewHelper extends ABookHelper {
* @param taskReportSendId
* @param taskReportSendId
* @throws IOException
* @throws IOException
*/
*/
public
void
deleteReportTaskSendFiles
(
final
long
operationId
,
final
String
taskKey
,
final
int
taskReportSendId
)
throws
IOException
{
public
void
deleteReportTaskSendFiles
(
final
long
operationId
,
final
String
taskKey
,
final
int
taskReportSendId
,
final
int
taskReportLevel
)
throws
IOException
{
new
AsyncTask
<
Void
,
Void
,
Void
>()
{
new
AsyncTask
<
Void
,
Void
,
Void
>()
{
@Override
@Override
protected
Void
doInBackground
(
Void
...
params
)
{
protected
Void
doInBackground
(
Void
...
params
)
{
try
{
try
{
String
taskReportSendPath
=
ABVEnvironment
.
getInstance
().
getOperationTaskReportSendDirFilePath
(
operationId
,
taskKey
,
taskReportSendId
);
String
taskReportSendPath
=
ABVEnvironment
.
getInstance
().
getOperationTaskReportSendDirFilePath
(
operationId
,
taskKey
,
taskReportSendId
,
taskReportLevel
);
FileUtil
.
delete
(
taskReportSendPath
);
FileUtil
.
delete
(
taskReportSendPath
);
}
catch
(
Exception
ex
)
{
}
catch
(
Exception
ex
)
{
Logger
.
e
(
String
.
format
(
"%s.deleteReportTaskSendFiles(%d, %s)"
,
TAG
,
operationId
,
taskKey
),
ex
);
Logger
.
e
(
String
.
format
(
"%s.deleteReportTaskSendFiles(%d, %s)"
,
TAG
,
operationId
,
taskKey
),
ex
);
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/helper/ActivityHandlingHelper.java
View file @
2cac1130
...
@@ -1545,9 +1545,10 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
...
@@ -1545,9 +1545,10 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
* @param reportFileName
* @param reportFileName
* @param localSave
* @param localSave
* @param addReport
* @param addReport
* @param taskReportLevel
*/
*/
// #32861 作業情報追加 start
// #32861 作業情報追加 start
public
void
startOZViewerActivity
(
Context
context
,
long
operationId
,
long
contentId
,
String
taskKey
,
boolean
isReadOnly
,
int
taskReportId
,
String
reportStartDate
,
String
reportFileName
,
boolean
localSave
,
boolean
addReport
)
{
public
void
startOZViewerActivity
(
Context
context
,
long
operationId
,
long
contentId
,
String
taskKey
,
boolean
isReadOnly
,
int
taskReportId
,
String
reportStartDate
,
String
reportFileName
,
boolean
localSave
,
boolean
addReport
,
int
taskReportLevel
)
{
reportStartDate
=
reportStartDate
.
replace
(
"T"
,
" "
);
reportStartDate
=
reportStartDate
.
replace
(
"T"
,
" "
);
String
strReportStartDate
=
DateTimeUtil
.
toString
(
DateTimeUtil
.
toDate
(
reportStartDate
,
DateTimeFormat
.
yyyyMMddHHmmss_hyphen
),
DateTimeFormat
.
yyyyMMddHHmm_none
);
String
strReportStartDate
=
DateTimeUtil
.
toString
(
DateTimeUtil
.
toDate
(
reportStartDate
,
DateTimeFormat
.
yyyyMMddHHmmss_hyphen
),
DateTimeFormat
.
yyyyMMddHHmm_none
);
...
@@ -1565,6 +1566,9 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
...
@@ -1565,6 +1566,9 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
intent
.
putExtra
(
ABookKeys
.
LOCAL_SAVE
,
localSave
);
// 一時保存情報
intent
.
putExtra
(
ABookKeys
.
LOCAL_SAVE
,
localSave
);
// 一時保存情報
intent
.
putExtra
(
ABookKeys
.
ADD_REPORT
,
addReport
);
// 作業追加区分
intent
.
putExtra
(
ABookKeys
.
ADD_REPORT
,
addReport
);
// 作業追加区分
// #32861 作業情報追加 end
// #32861 作業情報追加 end
// #32926 作業報告画面改善 start
intent
.
putExtra
(
ABookKeys
.
TASK_REPORT_LEVEL
,
taskReportLevel
);
// 作業報告レベル(0:報告、1:報告(回答)、2:報告(回答))
// #32926 作業報告画面改善 end
context
.
startActivity
(
intent
);
context
.
startActivity
(
intent
);
}
}
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/helper/OzdFileHelper.java
View file @
2cac1130
...
@@ -92,7 +92,7 @@ public class OzdFileHelper {
...
@@ -92,7 +92,7 @@ public class OzdFileHelper {
return
REPORT_OZD_FILE_NAME
;
return
REPORT_OZD_FILE_NAME
;
}
}
public
static
final
String
getOzFilePath
(
long
operationId
,
long
contentId
,
String
taskKey
,
boolean
directionFlg
,
int
taskReportId
,
String
reportStartDate
,
String
reportFileName
)
{
public
static
final
String
getOzFilePath
(
long
operationId
,
long
contentId
,
String
taskKey
,
boolean
directionFlg
,
int
taskReportId
,
String
reportStartDate
,
String
reportFileName
,
int
taskReportLevel
)
{
String
ozdFileName
=
null
;
String
ozdFileName
=
null
;
String
ozrFileName
=
null
;
String
ozrFileName
=
null
;
...
@@ -100,13 +100,15 @@ public class OzdFileHelper {
...
@@ -100,13 +100,15 @@ public class OzdFileHelper {
ozdFileName
=
reportFileName
;
ozdFileName
=
reportFileName
;
ozrFileName
=
reportFileName
;
ozrFileName
=
reportFileName
;
}
else
{
}
else
{
if
(
directionFlg
)
{
// #32926 作業報告画面改善 start
if
(
taskReportLevel
==
0
)
{
ozdFileName
=
DIRECTION_OZD_FILE_NAME
;
ozdFileName
=
DIRECTION_OZD_FILE_NAME
;
ozrFileName
=
DIRECTION_OZR_FILE_NAME
;
ozrFileName
=
DIRECTION_OZR_FILE_NAME
;
}
else
{
}
else
{
ozdFileName
=
REPORT_OZD_FILE_NAME
;
ozdFileName
=
REPORT_OZD_FILE_NAME
;
ozrFileName
=
REPORT_OZR_FILE_NAME
;
ozrFileName
=
REPORT_OZR_FILE_NAME
;
}
}
// #32926 作業報告画面改善 end
}
}
String
ozFilePath
=
ABVEnvironment
.
getInstance
().
getTempFilePath
(
contentId
,
taskKey
,
ozdFileName
);
String
ozFilePath
=
ABVEnvironment
.
getInstance
().
getTempFilePath
(
contentId
,
taskKey
,
ozdFileName
);
...
@@ -115,9 +117,11 @@ public class OzdFileHelper {
...
@@ -115,9 +117,11 @@ public class OzdFileHelper {
}
}
if
(
taskReportId
>
0
&&
!
StringUtil
.
isNullOrEmpty
(
reportStartDate
))
{
if
(
taskReportId
>
0
&&
!
StringUtil
.
isNullOrEmpty
(
reportStartDate
))
{
ozFilePath
=
ABVEnvironment
.
getInstance
().
getRoutineTaskSavedOzFilePath
(
operationId
,
taskKey
,
taskReportId
,
reportStartDate
,
ozdFileName
);
ozFilePath
=
ABVEnvironment
.
getInstance
().
getRoutineTaskSavedOzFilePath
(
operationId
,
taskKey
,
taskReportId
,
reportStartDate
,
ozdFileName
,
String
.
valueOf
(
taskReportLevel
)
);
}
else
{
}
else
{
ozFilePath
=
ABVEnvironment
.
getInstance
().
getSavedOzFilePath
(
operationId
,
taskKey
,
ozdFileName
,
directionFlg
);
// #32926 作業報告画面改善 start
ozFilePath
=
ABVEnvironment
.
getInstance
().
getSavedOzFileTaskReportLevelPath
(
operationId
,
taskKey
,
ozdFileName
,
String
.
valueOf
(
taskReportLevel
));
// #32926 作業報告画面改善 end
}
}
if
(
FileUtil
.
exists
(
ozFilePath
))
{
if
(
FileUtil
.
exists
(
ozFilePath
))
{
return
ozFilePath
;
return
ozFilePath
;
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/activity/CheckOZDViewActivity.java
View file @
2cac1130
...
@@ -74,6 +74,10 @@ public class CheckOZDViewActivity extends ABVContentViewActivity {
...
@@ -74,6 +74,10 @@ public class CheckOZDViewActivity extends ABVContentViewActivity {
private
String
mSaveOzdTempFileName
;
private
String
mSaveOzdTempFileName
;
private
String
mSaveOzdFileName
;
private
String
mSaveOzdFileName
;
// #32926 作業報告画面改善 start
private
int
mTaskReportLevel
;
// 作業報告レベル
// #32926 作業報告画面改善 end
@Override
@Override
public
void
onCreate
(
Bundle
savedInstanceState
)
{
public
void
onCreate
(
Bundle
savedInstanceState
)
{
Logger
.
i
(
TAG
,
"onCreate"
);
Logger
.
i
(
TAG
,
"onCreate"
);
...
@@ -92,6 +96,10 @@ public class CheckOZDViewActivity extends ABVContentViewActivity {
...
@@ -92,6 +96,10 @@ public class CheckOZDViewActivity extends ABVContentViewActivity {
mReportStartDate
=
intent
.
getStringExtra
(
ABookKeys
.
REPORT_START_DATE
);
mReportStartDate
=
intent
.
getStringExtra
(
ABookKeys
.
REPORT_START_DATE
);
mReportFileName
=
intent
.
getStringExtra
(
ABookKeys
.
REPORT_FILE_NAME
);
mReportFileName
=
intent
.
getStringExtra
(
ABookKeys
.
REPORT_FILE_NAME
);
// #32926 作業報告画面改善 start
mTaskReportLevel
=
intent
.
getIntExtra
(
ABookKeys
.
TASK_REPORT_LEVEL
,
0
);
// 作業報告レベル
// #32926 作業報告画面改善 end
String
frontTitle
=
""
;
String
frontTitle
=
""
;
String
rearTitle
=
""
;
String
rearTitle
=
""
;
...
@@ -163,7 +171,9 @@ public class CheckOZDViewActivity extends ABVContentViewActivity {
...
@@ -163,7 +171,9 @@ public class CheckOZDViewActivity extends ABVContentViewActivity {
});
});
// #32861 作業情報追加 end
// #32861 作業情報追加 end
mOzFilePath
=
OzdFileHelper
.
getOzFilePath
(
mOperationId
,
contentId
,
mTaskKey
,
mDirectionFlg
,
mTaskReportId
,
mReportStartDate
,
mReportFileName
);
// #32926 作業報告画面改善 start
mOzFilePath
=
OzdFileHelper
.
getOzFilePath
(
mOperationId
,
contentId
,
mTaskKey
,
mDirectionFlg
,
mTaskReportId
,
mReportStartDate
,
mReportFileName
,
mTaskReportLevel
);
// #32926 作業報告画面改善 end
Logger
.
i
(
TAG
,
"********mOzFilePath = %s"
+
mOzFilePath
);
Logger
.
i
(
TAG
,
"********mOzFilePath = %s"
+
mOzFilePath
);
if
(
mOzFilePath
==
null
)
{
if
(
mOzFilePath
==
null
)
{
...
@@ -526,7 +536,9 @@ public class CheckOZDViewActivity extends ABVContentViewActivity {
...
@@ -526,7 +536,9 @@ 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
)
+
"/"
+
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
(),
"#"
);
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/view/OperationTaskLayout.java
View file @
2cac1130
...
@@ -379,8 +379,12 @@ public class OperationTaskLayout extends RelativeLayout {
...
@@ -379,8 +379,12 @@ public class OperationTaskLayout extends RelativeLayout {
setLayoutParams
(
params
);
setLayoutParams
(
params
);
}
else
{
}
else
{
DisplayMetrics
displayMetrics
=
getResources
().
getDisplayMetrics
();
DisplayMetrics
displayMetrics
=
getResources
().
getDisplayMetrics
();
int
halfWidth
=
(
int
)
(
displayMetrics
.
density
*
OperationTaskLayout
.
HALF_WIDTH
);
params
=
createParam
(
halfWidth
,
ViewGroup
.
LayoutParams
.
WRAP_CONTENT
);
// #32926 作業報告画面改善 start
// 作業報告画面を全画面に表示する
int
screenWidth
=
displayMetrics
.
widthPixels
;
params
=
createParam
(
screenWidth
,
ViewGroup
.
LayoutParams
.
WRAP_CONTENT
);
// #32926 作業報告画面改善 end
if
(!
StringUtil
.
isNullOrEmpty
(
taskKey
))
{
if
(!
StringUtil
.
isNullOrEmpty
(
taskKey
))
{
TaskDto
taskDto
=
mTaskDao
.
getTaskByTaskKey
(
taskKey
);
TaskDto
taskDto
=
mTaskDao
.
getTaskByTaskKey
(
taskKey
);
...
...
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