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
768a103d
Commit
768a103d
authored
Feb 13, 2023
by
Kazuyuki Hida
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
報告送信時に一覧の状況毎の件数表示が更新されるようにした。
parent
dc23f949
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
6 deletions
+51
-6
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/OperationLogic.java
+38
-3
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVContentViewActivity.java
+13
-3
No files found.
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/OperationLogic.java
View file @
768a103d
...
...
@@ -65,6 +65,9 @@ import jp.agentec.adf.util.DateTimeUtil;
import
jp.agentec.adf.util.FileUtil
;
import
jp.agentec.adf.util.StringUtil
;
import
static
jp
.
agentec
.
abook
.
abv
.
bl
.
acms
.
client
.
json
.
OperationListJSON
.
OperationEndDate
;
import
static
jp
.
agentec
.
abook
.
abv
.
bl
.
acms
.
client
.
json
.
OperationListJSON
.
OperationStartDate
;
/**
* Created by leej on 2018/08/17.
*/
...
...
@@ -976,9 +979,14 @@ public class OperationLogic extends AbstractLogic {
if
(
operationDto
.
reportType
==
Constant
.
ReportType
.
ReportReply
)
{
editJson
.
put
(
ABookKeys
.
HAS_AUTHORITY
,
dto
.
enableReport
);
editJson
.
put
(
ABookKeys
.
LOCAL_SAVE_FLG
,
dto
.
localSavedFlg
);
// ロックと差戻情報の追加
addLockSendBackInfo
(
editJson
,
dto
);
taskReportJsonList
.
add
(
editJson
);
}
else
{
taskReportJsonList
.
add
(
new
JSONObject
(
dto
.
jsonData
));
editJson
=
new
JSONObject
(
dto
.
jsonData
);
// ロックと差戻情報の追加
addLockSendBackInfo
(
editJson
,
dto
);
taskReportJsonList
.
add
(
editJson
);
}
}
else
{
JSONObject
emptyTaskReportJson
=
new
JSONObject
();
...
...
@@ -987,6 +995,8 @@ public class OperationLogic extends AbstractLogic {
emptyTaskReportJson
.
put
(
ABookKeys
.
HAS_AUTHORITY
,
dto
.
enableReport
);
emptyTaskReportJson
.
put
(
ABookKeys
.
LOCAL_SAVE_FLG
,
dto
.
localSavedFlg
);
}
// ロックと差戻情報の追加
addLockSendBackInfo
(
emptyTaskReportJson
,
dto
);
taskReportJsonList
.
add
(
emptyTaskReportJson
);
}
// 最後の時、taskReport_{level}でセット
...
...
@@ -994,7 +1004,8 @@ public class OperationLogic extends AbstractLogic {
taskReportJson
.
put
(
String
.
format
(
"taskReport_%s"
,
String
.
valueOf
(
level
)),
taskReportJsonList
);
}
}
taskReportJson
.
put
(
OperationStartDate
,
DateTimeUtil
.
toString
(
operationDto
.
operationStartDate
,
DateTimeFormat
.
yyyyMMddHHmmss_hyphen
));
taskReportJson
.
put
(
OperationEndDate
,
DateTimeUtil
.
toString
(
operationDto
.
operationEndDate
,
DateTimeFormat
.
yyyyMMddHHmmss_hyphen
));
// データが存在しない場合、
if
(
taskReportDtoList
.
size
()
<=
0
||
taskReportJson
.
length
()
==
0
)
{
...
...
@@ -1008,6 +1019,24 @@ public class OperationLogic extends AbstractLogic {
}
/**
* ロックと差戻情報の追加
*
* @param json 格納するJSON
* @param dto もとになる報告書
* @return
*/
private
void
addLockSendBackInfo
(
JSONObject
json
,
TaskReportDto
dto
)
{
json
.
put
(
OperationDataJSON
.
TaskStatus
,
dto
.
taskStatus
);
json
.
put
(
OperationDataJSON
.
ReportLockUserId
,
dto
.
reportLockUserId
);
json
.
put
(
OperationDataJSON
.
ReportLockUserName
,
dto
.
reportLockUserName
);
json
.
put
(
OperationDataJSON
.
ReportLockTime
,
dto
.
reportLockTime
);
json
.
put
(
OperationDataJSON
.
SendBackUserId
,
dto
.
sendBackUserId
);
json
.
put
(
OperationDataJSON
.
SendBackUserName
,
dto
.
sendBackUserName
);
json
.
put
(
OperationDataJSON
.
SendBackComment
,
dto
.
sendBackComment
);
}
/**
* 営業日変更時間と報告日時をチェックし、営業日変更時間が過ぎた場合、報告表示しないように処理
* @param jsonObject 報告回答のJson文字列
* @return true: 報告非表示、false:報告表示
...
...
@@ -1101,9 +1130,15 @@ public class OperationLogic extends AbstractLogic {
taskReportInfoList
.
add
(
new
JSONObject
(
dto
.
jsonData
));
}
taskReportJsonRow
.
put
(
ABookKeys
.
TASK_REPORT_INFO
,
taskReportInfoList
);
// ロックと差戻の情報を追加
addLockSendBackInfo
(
taskReportJsonRow
,
dto
);
taskReportJsonList
.
add
(
taskReportJsonRow
);
}
taskReportJsonRoot
.
put
(
ABookKeys
.
ENABLE_REPORT_UPDATE
,
mOperationDao
.
getOperation
(
operationId
).
enableReportUpdate
);
OperationDto
operationDto
=
mOperationDao
.
getOperation
(
operationId
);
taskReportJsonRoot
.
put
(
ABookKeys
.
ENABLE_REPORT_UPDATE
,
operationDto
.
enableReportUpdate
);
taskReportJsonRoot
.
put
(
OperationStartDate
,
DateTimeUtil
.
toString
(
operationDto
.
operationStartDate
,
DateTimeFormat
.
yyyyMMddHHmmss_hyphen
));
taskReportJsonRoot
.
put
(
OperationEndDate
,
DateTimeUtil
.
toString
(
operationDto
.
operationEndDate
,
DateTimeFormat
.
yyyyMMddHHmmss_hyphen
));
// 最後のtaskReportId
TaskReportDto
lastRoutineTaskReportDto
=
mTaskReportDao
.
getLastRoutineTaskReportData
(
operationId
);
taskReportJsonRoot
.
put
(
ABookKeys
.
TASK_REPORT_ID
,
lastRoutineTaskReportDto
.
taskReportId
);
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVContentViewActivity.java
View file @
768a103d
...
...
@@ -29,6 +29,7 @@ import org.json.adf.JSONObject;
import
java.io.File
;
import
java.io.FileNotFoundException
;
import
java.io.IOException
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.HashMap
;
...
...
@@ -36,7 +37,6 @@ import java.util.Iterator;
import
java.util.List
;
import
java.util.Map
;
import
java.util.TimeZone
;
import
java.util.concurrent.ConcurrentHashMap
;
import
jp.agentec.abook.abv.bl.acms.type.OperationType
;
...
...
@@ -88,7 +88,6 @@ import jp.agentec.adf.util.FileUtil;
import
jp.agentec.adf.util.StringUtil
;
import
static
jp
.
agentec
.
abook
.
abv
.
bl
.
acms
.
client
.
json
.
OperationDataJSON
.
Message
;
import
static
jp
.
agentec
.
abook
.
abv
.
bl
.
acms
.
client
.
json
.
OperationDataJSON
.
ReportStartDate
;
import
static
jp
.
agentec
.
abook
.
abv
.
bl
.
acms
.
client
.
json
.
OperationDataJSON
.
ReportStatus
;
import
static
jp
.
agentec
.
abook
.
abv
.
bl
.
acms
.
client
.
json
.
OperationDataJSON
.
TaskKey
;
...
...
@@ -873,7 +872,7 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
showHelpViewDialog
(
helpViewType
);
}
public
void
commonShouldOverrideUrlLoading
(
Uri
uri
,
OperationTaskDto
operationTaskDto
)
{
public
void
commonShouldOverrideUrlLoading
(
Uri
uri
,
final
OperationTaskDto
operationTaskDto
)
{
//parent method
Map
<
String
,
String
>
abookCheckParam
=
new
HashMap
<
String
,
String
>();
for
(
String
key
:
uri
.
getQueryParameterNames
())
{
...
...
@@ -982,6 +981,17 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
return
null
;
}
if
(
mCmd
.
equals
(
ABookKeys
.
CMD_INSERT_TASK_REPORT
)
||
mCmd
.
equals
(
ABookKeys
.
CMD_UPDATE_TASK_REPORT
))
{
// データを同期する fixme かなり邪道なことをしているので、非同期処理全体を整理する必要がある
ActivityHandlingHelper
helper
=
ActivityHandlingHelper
.
getInstance
();
helper
.
getPreviousOperationListActivity
().
syncOperation
(
operationDto
.
operationId
,
operationDto
.
reportType
,
false
);
ABVEnvironment
env
=
ABVEnvironment
.
getInstance
();
OperationLogic
logic
=
AbstractLogic
.
getLogic
(
OperationLogic
.
class
);
try
{
logic
.
createJsonForOperationContent
(
operationDto
.
operationId
,
mContentPath
,
operationDto
.
reportType
==
Constant
.
ReportType
.
RoutineTask
);
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
// コールバック
ReportStatusLogic
.
TaskReportExtParam
extParam
=
ReportStatusLogic
.
TaskReportExtParam
.
pick
();
JSONObject
extJson
=
new
JSONObject
();
if
(
extParam
!=
null
)
{
...
...
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