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
3e9b57d2
Commit
3e9b57d2
authored
Nov 19, 2021
by
Lee Munkyeong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
図面hotspot色不具合対応
parent
c65acac7
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
136 additions
and
3 deletions
+136
-3
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/OperationLogic.java
+49
-2
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/activity/ContentViewActivity.java
+80
-1
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/view/OperationTaskLayout.java
+7
-0
No files found.
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/OperationLogic.java
View file @
3e9b57d2
...
@@ -2,6 +2,7 @@ package jp.agentec.abook.abv.bl.logic;
...
@@ -2,6 +2,7 @@ package jp.agentec.abook.abv.bl.logic;
import
static
jp
.
agentec
.
abook
.
abv
.
bl
.
acms
.
type
.
OperationType
.
DRAWING
;
import
static
jp
.
agentec
.
abook
.
abv
.
bl
.
acms
.
type
.
OperationType
.
DRAWING
;
import
static
jp
.
agentec
.
abook
.
abv
.
bl
.
acms
.
type
.
OperationType
.
PANO
;
import
static
jp
.
agentec
.
abook
.
abv
.
bl
.
acms
.
type
.
OperationType
.
PANO
;
import
static
jp
.
agentec
.
abook
.
abv
.
bl
.
acms
.
type
.
OperationType
.
PDF
;
import
net.lingala.zip4j.exception.ZipException
;
import
net.lingala.zip4j.exception.ZipException
;
...
@@ -1222,7 +1223,7 @@ public class OperationLogic extends AbstractLogic {
...
@@ -1222,7 +1223,7 @@ public class OperationLogic extends AbstractLogic {
JSONObject
phaseStatusJson
=
new
JSONObject
();
JSONObject
phaseStatusJson
=
new
JSONObject
();
phaseStatusJson
.
put
(
ABookKeys
.
PROCESS_LIST
,
processInfoList
);
phaseStatusJson
.
put
(
ABookKeys
.
PROCESS_LIST
,
processInfoList
);
OperationDto
operation
=
mOperationDao
.
getOperation
(
operationId
);
OperationDto
operation
=
mOperationDao
.
getOperation
(
operationId
);
if
(
operation
.
operationType
==
PANO
||
operation
.
operationType
==
DRAWING
)
{
if
(
operation
.
operationType
==
PANO
||
operation
.
operationType
==
DRAWING
||
operation
.
operationType
==
PDF
)
{
contentPath
=
contentPath
.
replaceAll
(
"panoImage"
,
"processList"
);
contentPath
=
contentPath
.
replaceAll
(
"panoImage"
,
"processList"
);
contentPath
=
contentPath
.
replaceAll
(
"taskPdf"
,
"processList"
);
contentPath
=
contentPath
.
replaceAll
(
"taskPdf"
,
"processList"
);
}
}
...
@@ -1249,7 +1250,7 @@ public class OperationLogic extends AbstractLogic {
...
@@ -1249,7 +1250,7 @@ public class OperationLogic extends AbstractLogic {
}
}
processInfoJson
.
put
(
"processList"
,
taskJsonList
);
processInfoJson
.
put
(
"processList"
,
taskJsonList
);
OperationDto
operation
=
mOperationDao
.
getOperation
(
operationId
);
OperationDto
operation
=
mOperationDao
.
getOperation
(
operationId
);
if
(
operation
.
operationType
==
PANO
||
operation
.
operationType
==
DRAWING
)
{
if
(
operation
.
operationType
==
PANO
||
operation
.
operationType
==
DRAWING
||
operation
.
operationType
==
PDF
)
{
contentPath
=
contentPath
.
replaceAll
(
"panoImage"
,
"processList"
);
contentPath
=
contentPath
.
replaceAll
(
"panoImage"
,
"processList"
);
contentPath
=
contentPath
.
replaceAll
(
"taskPdf"
,
"processList"
);
contentPath
=
contentPath
.
replaceAll
(
"taskPdf"
,
"processList"
);
}
}
...
@@ -1257,6 +1258,29 @@ public class OperationLogic extends AbstractLogic {
...
@@ -1257,6 +1258,29 @@ public class OperationLogic extends AbstractLogic {
FileUtil
.
createFile
(
contentPath
+
"/processInfo.json"
,
processInfoJson
.
toString
());
FileUtil
.
createFile
(
contentPath
+
"/processInfo.json"
,
processInfoJson
.
toString
());
}
}
private
String
getProcessInfoJson
(
Long
operationId
,
String
contentPath
)
throws
IOException
{
List
<
JSONObject
>
taskJsonList
=
new
ArrayList
<
JSONObject
>();
JSONObject
processInfoJson
=
new
JSONObject
();
List
<
TaskDto
>
taskDtoList
=
mTaskDao
.
selectTaskGroupByProcessKeyByOperationId
(
operationId
);
for
(
TaskDto
dto
:
taskDtoList
)
{
JSONObject
taskDtoJson
=
new
JSONObject
();
taskDtoJson
.
put
(
ABookKeys
.
TASK_NAME
,
dto
.
taskName
);
taskDtoJson
.
put
(
ABookKeys
.
TASK_CODE
,
dto
.
taskCode
);
taskDtoJson
.
put
(
ABookKeys
.
PROCESS_KEY
,
dto
.
processKey
);
taskDtoJson
.
put
(
ABookKeys
.
PROCESS_STATUS
,
dto
.
processStatus
);
taskJsonList
.
add
(
taskDtoJson
);
}
processInfoJson
.
put
(
"processList"
,
taskJsonList
);
OperationDto
operation
=
mOperationDao
.
getOperation
(
operationId
);
if
(
operation
.
operationType
==
PANO
||
operation
.
operationType
==
DRAWING
||
operation
.
operationType
==
PDF
)
{
contentPath
=
contentPath
.
replaceAll
(
"panoImage"
,
"processList"
);
contentPath
=
contentPath
.
replaceAll
(
"taskPdf"
,
"processList"
);
}
Logger
.
d
(
TAG
,
"createProcessInfoJson : "
+
processInfoJson
.
toString
());
FileUtil
.
createFile
(
contentPath
+
"/processInfo.json"
,
processInfoJson
.
toString
());
return
processInfoJson
.
toString
();
}
/**
/**
* 作業報告用のjsonファイル
* 作業報告用のjsonファイル
* 報告と報告(回答)のデータの区分が必要なので、「taskReport_0」と「taskReport_1」で形式で作成
* 報告と報告(回答)のデータの区分が必要なので、「taskReport_0」と「taskReport_1」で形式で作成
...
@@ -2147,6 +2171,29 @@ public class OperationLogic extends AbstractLogic {
...
@@ -2147,6 +2171,29 @@ public class OperationLogic extends AbstractLogic {
}
}
}
}
public
String
getProcessDataAndCreateJson
(
Long
operationId
,
String
contentPath
,
boolean
routineTaskReportFlg
)
throws
NetworkDisconnectedException
,
ABVException
,
IOException
{
GetOperationDataParameters
param
=
new
GetOperationDataParameters
(
ABVDataCache
.
getInstance
().
getMemberInfo
().
sid
,
operationId
);
ProcessDataJSON
json
=
AcmsClient
.
getInstance
(
ABVDataCache
.
getInstance
().
getUrlPath
(),
ABVEnvironment
.
getInstance
().
networkAdapter
).
getProcessData
(
param
);
for
(
TaskDto
taskDto
:
json
.
taskDtoList
)
{
for
(
TaskDto
phaseTaskDto
:
taskDto
.
phaseList
)
{
//Taskデータ更新(phaseStatus, processStatus)
mTaskDao
.
updateStatus
(
taskDto
.
processKey
,
phaseTaskDto
.
phaseNo
,
taskDto
.
processStatus
,
phaseTaskDto
.
phaseStatus
);
for
(
TaskReportApprovalDto
taskReportApprovalDto
:
phaseTaskDto
.
taskReportApprovalDtoList
)
{
taskReportApprovalDto
.
processKey
=
taskDto
.
processKey
;
taskReportApprovalDto
.
phaseNo
=
phaseTaskDto
.
phaseNo
;
//TaskReportApprovalデータ追加・更新
if
(
mTaskReportApprovalDao
.
selectTaskReportApprovalByProcessKey
(
taskDto
.
processKey
,
phaseTaskDto
.
phaseNo
,
taskReportApprovalDto
.
approvalNo
)
!=
null
)
{
mTaskReportApprovalDao
.
update
(
taskReportApprovalDto
);
}
else
{
mTaskReportApprovalDao
.
insert
(
taskReportApprovalDto
);
}
}
}
}
return
getProcessInfoJson
(
operationId
,
contentPath
);
}
/**
/**
* 工程情報を全部削除する。(全削除ボタンタップ時)
* 工程情報を全部削除する。(全削除ボタンタップ時)
* @param operationId 作業ID
* @param operationId 作業ID
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/activity/ContentViewActivity.java
View file @
3e9b57d2
...
@@ -4,6 +4,10 @@ package jp.agentec.abook.abv.ui.viewer.activity;
...
@@ -4,6 +4,10 @@ package jp.agentec.abook.abv.ui.viewer.activity;
* @author jang
* @author jang
*/
*/
import
static
jp
.
agentec
.
abook
.
abv
.
bl
.
acms
.
type
.
OperationType
.
DRAWING
;
import
static
jp
.
agentec
.
abook
.
abv
.
bl
.
acms
.
type
.
OperationType
.
PANO
;
import
static
jp
.
agentec
.
abook
.
abv
.
bl
.
acms
.
type
.
OperationType
.
PDF
;
import
android.app.AlertDialog
;
import
android.app.AlertDialog
;
import
android.app.Dialog
;
import
android.app.Dialog
;
import
android.content.Context
;
import
android.content.Context
;
...
@@ -79,6 +83,7 @@ import java.util.Map;
...
@@ -79,6 +83,7 @@ import java.util.Map;
import
java.util.Objects
;
import
java.util.Objects
;
import
java.util.concurrent.ConcurrentHashMap
;
import
java.util.concurrent.ConcurrentHashMap
;
import
jp.agentec.abook.abv.bl.acms.client.json.AcmsJSONParser
;
import
jp.agentec.abook.abv.bl.acms.client.json.DownloadedContentInfoJSON
;
import
jp.agentec.abook.abv.bl.acms.client.json.DownloadedContentInfoJSON
;
import
jp.agentec.abook.abv.bl.acms.client.json.MarkingJson
;
import
jp.agentec.abook.abv.bl.acms.client.json.MarkingJson
;
import
jp.agentec.abook.abv.bl.acms.client.json.content.ActionInfoJSON
;
import
jp.agentec.abook.abv.bl.acms.client.json.content.ActionInfoJSON
;
...
@@ -96,7 +101,9 @@ import jp.agentec.abook.abv.bl.common.CommonExecutor;
...
@@ -96,7 +101,9 @@ import jp.agentec.abook.abv.bl.common.CommonExecutor;
import
jp.agentec.abook.abv.bl.common.Constant
;
import
jp.agentec.abook.abv.bl.common.Constant
;
import
jp.agentec.abook.abv.bl.common.constant.ABookCommConstants
;
import
jp.agentec.abook.abv.bl.common.constant.ABookCommConstants
;
import
jp.agentec.abook.abv.bl.common.constant.ABookKeys
;
import
jp.agentec.abook.abv.bl.common.constant.ABookKeys
;
import
jp.agentec.abook.abv.bl.common.exception.ABVException
;
import
jp.agentec.abook.abv.bl.common.exception.ExceptionHandler
;
import
jp.agentec.abook.abv.bl.common.exception.ExceptionHandler
;
import
jp.agentec.abook.abv.bl.common.exception.NetworkDisconnectedException
;
import
jp.agentec.abook.abv.bl.common.log.Logger
;
import
jp.agentec.abook.abv.bl.common.log.Logger
;
import
jp.agentec.abook.abv.bl.common.util.ContentFileUtil
;
import
jp.agentec.abook.abv.bl.common.util.ContentFileUtil
;
import
jp.agentec.abook.abv.bl.common.util.JsonUtil
;
import
jp.agentec.abook.abv.bl.common.util.JsonUtil
;
...
@@ -105,9 +112,13 @@ import jp.agentec.abook.abv.bl.data.dao.AbstractDao;
...
@@ -105,9 +112,13 @@ import jp.agentec.abook.abv.bl.data.dao.AbstractDao;
import
jp.agentec.abook.abv.bl.data.dao.ContentDao
;
import
jp.agentec.abook.abv.bl.data.dao.ContentDao
;
import
jp.agentec.abook.abv.bl.data.dao.ContentPageDao
;
import
jp.agentec.abook.abv.bl.data.dao.ContentPageDao
;
import
jp.agentec.abook.abv.bl.download.ContentFileExtractor
;
import
jp.agentec.abook.abv.bl.download.ContentFileExtractor
;
import
jp.agentec.abook.abv.bl.dto.ChatMessageDto
;
import
jp.agentec.abook.abv.bl.dto.ChatRoomDto
;
import
jp.agentec.abook.abv.bl.dto.ContentBookmarkDto
;
import
jp.agentec.abook.abv.bl.dto.ContentBookmarkDto
;
import
jp.agentec.abook.abv.bl.dto.ContentDto
;
import
jp.agentec.abook.abv.bl.dto.ContentDto
;
import
jp.agentec.abook.abv.bl.dto.OperationDto
;
import
jp.agentec.abook.abv.bl.dto.OperationTaskDto
;
import
jp.agentec.abook.abv.bl.dto.OperationTaskDto
;
import
jp.agentec.abook.abv.bl.dto.TaskDto
;
import
jp.agentec.abook.abv.bl.logic.AbstractLogic
;
import
jp.agentec.abook.abv.bl.logic.AbstractLogic
;
import
jp.agentec.abook.abv.bl.logic.ContentReadingLogLogic
;
import
jp.agentec.abook.abv.bl.logic.ContentReadingLogLogic
;
import
jp.agentec.abook.abv.bl.logic.ContractLogic
;
import
jp.agentec.abook.abv.bl.logic.ContractLogic
;
...
@@ -173,6 +184,7 @@ import jp.agentec.abook.abv.ui.viewer.view.action.TapMediaPlayer;
...
@@ -173,6 +184,7 @@ import jp.agentec.abook.abv.ui.viewer.view.action.TapMediaPlayer;
import
jp.agentec.abook.abv.ui.viewer.view.action.VideoMountAction
;
import
jp.agentec.abook.abv.ui.viewer.view.action.VideoMountAction
;
import
jp.agentec.adf.net.http.HttpDownloadSimpleNotification
;
import
jp.agentec.adf.net.http.HttpDownloadSimpleNotification
;
import
jp.agentec.adf.net.http.HttpDownloadState
;
import
jp.agentec.adf.net.http.HttpDownloadState
;
import
jp.agentec.adf.util.DateTimeUtil
;
import
jp.agentec.adf.util.FileUtil
;
import
jp.agentec.adf.util.FileUtil
;
import
jp.agentec.adf.util.StringUtil
;
import
jp.agentec.adf.util.StringUtil
;
...
@@ -5404,14 +5416,81 @@ public class ContentViewActivity extends ABVContentViewActivity {
...
@@ -5404,14 +5416,81 @@ public class ContentViewActivity extends ABVContentViewActivity {
hotspot
=
new
JSONObject
(
checkParam
.
get
(
ABookKeys
.
HOT_SPOT
));
hotspot
=
new
JSONObject
(
checkParam
.
get
(
ABookKeys
.
HOT_SPOT
));
taskCode
=
hotspot
.
getString
(
ABookKeys
.
TASK_CODE
);
taskCode
=
hotspot
.
getString
(
ABookKeys
.
TASK_CODE
);
}
}
if
(
checkParam
.
get
(
"phaseNo"
)
!=
null
&&
!
Objects
.
equals
(
checkParam
.
get
(
"phaseNo"
),
"1"
))
{
OperationDto
operation
=
mOperationDao
.
getOperation
(
mOperationId
);
String
jsonPath
=
""
;
if
((
operation
.
operationType
==
PANO
||
operation
.
operationType
==
DRAWING
||
operation
.
operationType
==
PDF
)
&&
operation
.
reportType
==
Constant
.
ReportType
.
ReportContinuous
)
{
jsonPath
=
mContentPath
.
replaceAll
(
"panoImage"
,
"processList"
).
replaceAll
(
"taskPdf"
,
"processList"
);
JSONObject
processInfoJson
=
null
;
JSONObject
hotspotInfoJson
=
null
;
String
processKey
=
checkParam
.
get
(
ABookKeys
.
PROCESS_KEY
)
!=
null
?
checkParam
.
get
(
ABookKeys
.
PROCESS_KEY
)
:
""
;
try
{
try
{
processInfoJson
=
new
JSONObject
(
mOperationLogic
.
getProcessDataAndCreateJson
(
mOperationId
,
jsonPath
,
false
));
}
catch
(
NetworkDisconnectedException
e
)
{
e
.
printStackTrace
();
}
catch
(
ABVException
e
)
{
e
.
printStackTrace
();
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
hotspotInfoJson
=
new
JSONObject
(
FileUtil
.
readTextFile
(
jsonPath
+
"/taskHotspot.json"
));
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
if
(
processInfoJson
!=
null
&&
processInfoJson
.
has
(
"processList"
))
{
JSONArray
processList
=
processInfoJson
.
getJSONArray
(
"processList"
);
for
(
int
listCount
=
0
;
listCount
<
processList
.
length
();
listCount
++)
{
if
(
processList
.
getJSONObject
(
listCount
).
length
()
==
0
)
{
break
;
break
;
}
}
String
compareProcessKey
=
processList
.
getJSONObject
(
listCount
).
getString
(
ABookKeys
.
PROCESS_KEY
);
int
compareProcessStatus
=
processList
.
getJSONObject
(
listCount
).
getInt
(
ABookKeys
.
PROCESS_STATUS
);
if
(
processKey
.
equals
(
compareProcessKey
))
{
if
(
compareProcessStatus
==
999
&&
hotspotInfoJson
!=
null
)
{
JSONArray
hotspotList
=
hotspotInfoJson
.
getJSONArray
(
"hotspot"
);
List
<
TaskDto
>
taskList
=
mTaskDao
.
getTaskByProcessKey
(
processKey
);
for
(
TaskDto
task
:
taskList
)
{
if
(
task
.
phaseNo
==
1
)
{
operationTaskLayout
.
setIconStatus
(
taskKey
,
true
);
operationTaskLayout
.
currentTaskDto
.
taskKey
=
task
.
taskKey
;
operationTaskLayout
.
currentTaskDto
.
taskCode
=
task
.
taskCode
;
operationTaskLayout
.
currentTaskDto
.
isFinished
=
true
;
operationTaskLayout
.
addOperationTaskIcon
(
operationTaskLayout
.
currentLayout
,
operationTaskLayout
.
currentTaskDto
);
}
}
}
else
{
if
(
checkParam
.
get
(
"phaseNo"
)
!=
null
&&
!
Objects
.
equals
(
checkParam
.
get
(
"phaseNo"
),
"1"
))
{
return
;
}
else
{
operationTaskLayout
.
setIconStatus
(
taskKey
,
true
);
operationTaskLayout
.
currentTaskDto
.
taskKey
=
taskKey
;
operationTaskLayout
.
currentTaskDto
.
taskCode
=
taskCode
;
operationTaskLayout
.
currentTaskDto
.
isFinished
=
false
;
operationTaskLayout
.
addOperationTaskIcon
(
operationTaskLayout
.
currentLayout
,
operationTaskLayout
.
currentTaskDto
);
}
}
}
int
processStatus
=
processList
.
getJSONObject
(
listCount
).
getInt
(
ABookKeys
.
PROCESS_STATUS
);
}
}
else
{
operationTaskLayout
.
setIconStatus
(
taskKey
,
true
);
operationTaskLayout
.
setIconStatus
(
taskKey
,
true
);
operationTaskLayout
.
currentTaskDto
.
taskKey
=
taskKey
;
operationTaskLayout
.
currentTaskDto
.
taskKey
=
taskKey
;
operationTaskLayout
.
currentTaskDto
.
taskCode
=
taskCode
;
operationTaskLayout
.
currentTaskDto
.
taskCode
=
taskCode
;
operationTaskLayout
.
currentTaskDto
.
isFinished
=
operationTaskLayout
.
isTaskFinished
(
taskKey
);
operationTaskLayout
.
currentTaskDto
.
isFinished
=
operationTaskLayout
.
isTaskFinished
(
taskKey
);
operationTaskLayout
.
addOperationTaskIcon
(
operationTaskLayout
.
currentLayout
,
operationTaskLayout
.
currentTaskDto
);
operationTaskLayout
.
addOperationTaskIcon
(
operationTaskLayout
.
currentLayout
,
operationTaskLayout
.
currentTaskDto
);
}
}
else
{
operationTaskLayout
.
setIconStatus
(
taskKey
,
true
);
operationTaskLayout
.
currentTaskDto
.
taskKey
=
taskKey
;
operationTaskLayout
.
currentTaskDto
.
taskCode
=
taskCode
;
operationTaskLayout
.
currentTaskDto
.
isFinished
=
operationTaskLayout
.
isTaskFinished
(
taskKey
);
operationTaskLayout
.
addOperationTaskIcon
(
operationTaskLayout
.
currentLayout
,
operationTaskLayout
.
currentTaskDto
);
}
//hideOperationTaskLayout();
//hideOperationTaskLayout();
}
else
{
}
else
{
operationTaskLayout
.
setIconStatus
(
taskKey
,
false
);
operationTaskLayout
.
setIconStatus
(
taskKey
,
false
);
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/view/OperationTaskLayout.java
View file @
3e9b57d2
...
@@ -302,6 +302,13 @@ public class OperationTaskLayout extends RelativeLayout {
...
@@ -302,6 +302,13 @@ public class OperationTaskLayout extends RelativeLayout {
return
mTaskDao
.
getTaskByTaskKey
(
taskKey
).
taskStatus
==
FINISHED_STATUS
;
return
mTaskDao
.
getTaskByTaskKey
(
taskKey
).
taskStatus
==
FINISHED_STATUS
;
}
}
public
boolean
isProcessFinished
(
String
taskKey
)
{
if
(
mTaskDao
.
getTaskByTaskKey
(
taskKey
)
==
null
)
{
return
false
;
}
return
mTaskDao
.
getTaskByTaskKey
(
taskKey
).
taskStatus
==
FINISHED_STATUS
;
}
public
void
showTaskList
(
int
pageNum
,
boolean
isNormalSize
)
{
public
void
showTaskList
(
int
pageNum
,
boolean
isNormalSize
)
{
final
String
script
=
String
.
format
(
SCRIPT_SHOW_TASK_LIST
,
pageNum
+
1
);
final
String
script
=
String
.
format
(
SCRIPT_SHOW_TASK_LIST
,
pageNum
+
1
);
...
...
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