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
3b6a2e99
Commit
3b6a2e99
authored
Jan 27, 2023
by
Kazuyuki Hida
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
文字列リテラルを文字列定数に置き換えた
parent
9638c11e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
58 additions
and
19 deletions
+58
-19
ABVJE_BL/src/jp/agentec/abook/abv/bl/acms/client/json/OperationDataJSON.java
+24
-0
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/LockReportLogic.java
+18
-10
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/UnlockReportLogic.java
+12
-7
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVContentViewActivity.java
+4
-2
No files found.
ABVJE_BL/src/jp/agentec/abook/abv/bl/acms/client/json/OperationDataJSON.java
View file @
3b6a2e99
...
...
@@ -45,6 +45,30 @@ public class OperationDataJSON extends AcmsCommonJSON {
public
static
final
String
SendBackUserName
=
"sendBackUserName"
;
// 差し戻しユーザ名 差し戻された場合のみ
public
static
final
String
SendBackComment
=
"sendBackComment"
;
// 確認コメント 差し戻された場合のみ
public
static
final
String
ReportStatus
=
"reportStatus"
;
/*
public String json() {
JSONObject extParam = new JSONObject();
extParam.put("", String.valueOf(reportStatus));
extParam.put("", reportLockUserId);
extParam.put("reportLockUserName", reportLockUserName);
extParam.put("reportLockTime", DateTimeUtil.formatDate(reportLockTime, DateTimeFormat.yyyyMMddHHmmssSSS_hyphen));
if (taskReportId != null && taskReportId != 0) {
extParam.put("taskReportId", taskReportId);
}
if (reportStartDate != null) {
extParam.put("reportStartDate", DateTimeUtil.formatDate(reportStartDate, DateTimeFormat.yyyyMMddHHmmssSSS_hyphen));
}
return extParam.toString();
}
*/
public
List
<
TaskDto
>
taskDtoList
;
public
Date
lastEditDate
;
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/LockReportLogic.java
View file @
3b6a2e99
...
...
@@ -13,6 +13,13 @@ import jp.agentec.adf.util.DateTimeFormat;
import
jp.agentec.adf.util.DateTimeUtil
;
import
static
java
.
net
.
HttpURLConnection
.
HTTP_OK
;
import
static
jp
.
agentec
.
abook
.
abv
.
bl
.
acms
.
client
.
json
.
OperationDataJSON
.
ReportLockTime
;
import
static
jp
.
agentec
.
abook
.
abv
.
bl
.
acms
.
client
.
json
.
OperationDataJSON
.
ReportLockUserId
;
import
static
jp
.
agentec
.
abook
.
abv
.
bl
.
acms
.
client
.
json
.
OperationDataJSON
.
ReportLockUserName
;
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
.
TaskReportId
;
import
static
jp
.
agentec
.
abook
.
abv
.
bl
.
common
.
constant
.
ABookKeys
.
TASK_KEY
;
public
class
LockReportLogic
extends
AbstractLogic
{
...
...
@@ -21,11 +28,11 @@ public class LockReportLogic extends AbstractLogic {
}
public
Result
lock
(
Map
<
String
,
String
>
param
)
{
Long
taskReportId
=
longOrNull
(
param
.
get
(
"taskReportId"
));
Date
reportStartDate
=
dateOrNull
(
param
.
get
(
"reportStartDate"
));
Long
taskReportId
=
longOrNull
(
param
.
get
(
TaskReportId
));
Date
reportStartDate
=
dateOrNull
(
param
.
get
(
ReportStartDate
));
return
sendLockReport
(
param
.
get
(
"taskKey"
),
param
.
get
(
TASK_KEY
),
taskReportId
,
reportStartDate
);
...
...
@@ -78,6 +85,7 @@ public class LockReportLogic extends AbstractLogic {
// コールバック用のパラメータ
public
static
class
Result
{
public
static
final
int
BAD_STATUS
=
999
;
int
result
;
String
message
;
ExtParam
extParam
;
...
...
@@ -105,7 +113,7 @@ public class LockReportLogic extends AbstractLogic {
result
.
result
=
1
;
result
.
message
=
e
.
getLocalizedMessage
();
result
.
extParam
=
new
ExtParam
(
999
,
BAD_STATUS
,
null
,
null
,
null
,
...
...
@@ -187,16 +195,16 @@ public class LockReportLogic extends AbstractLogic {
public
String
json
()
{
JSONObject
extParam
=
new
JSONObject
();
extParam
.
put
(
"reportStatus"
,
String
.
valueOf
(
reportStatus
));
extParam
.
put
(
"reportLockUserId"
,
reportLockUserId
);
extParam
.
put
(
"reportLockUserName"
,
reportLockUserName
);
extParam
.
put
(
"reportLockTime"
,
DateTimeUtil
.
formatDate
(
reportLockTime
,
DateTimeFormat
.
yyyyMMddHHmmssSSS_hyphen
));
extParam
.
put
(
ReportStatus
,
String
.
valueOf
(
reportStatus
));
extParam
.
put
(
ReportLockUserId
,
reportLockUserId
);
extParam
.
put
(
ReportLockUserName
,
reportLockUserName
);
extParam
.
put
(
ReportLockTime
,
DateTimeUtil
.
formatDate
(
reportLockTime
,
DateTimeFormat
.
yyyyMMddHHmmssSSS_hyphen
));
if
(
taskReportId
!=
null
&&
taskReportId
!=
0
)
{
extParam
.
put
(
"taskReportId"
,
taskReportId
);
extParam
.
put
(
TaskReportId
,
taskReportId
);
}
if
(
reportStartDate
!=
null
)
{
extParam
.
put
(
"reportStartDate"
,
DateTimeUtil
.
formatDate
(
reportStartDate
,
DateTimeFormat
.
yyyyMMddHHmmssSSS_hyphen
));
extParam
.
put
(
ReportStartDate
,
DateTimeUtil
.
formatDate
(
reportStartDate
,
DateTimeFormat
.
yyyyMMddHHmmssSSS_hyphen
));
}
return
extParam
.
toString
();
}
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/UnlockReportLogic.java
View file @
3b6a2e99
...
...
@@ -14,6 +14,10 @@ import jp.agentec.adf.util.DateTimeFormat;
import
jp.agentec.adf.util.DateTimeUtil
;
import
static
java
.
net
.
HttpURLConnection
.
HTTP_OK
;
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
;
import
static
jp
.
agentec
.
abook
.
abv
.
bl
.
acms
.
client
.
json
.
OperationDataJSON
.
TaskReportId
;
public
class
UnlockReportLogic
extends
AbstractLogic
{
...
...
@@ -22,11 +26,11 @@ public class UnlockReportLogic extends AbstractLogic {
}
public
Result
unlock
(
Map
<
String
,
String
>
param
)
{
Long
taskReportId
=
longOrNull
(
param
.
get
(
"taskReportId"
));
Date
reportStartDate
=
dateOrNull
(
param
.
get
(
"reportStartDate"
));
Long
taskReportId
=
longOrNull
(
param
.
get
(
TaskReportId
));
Date
reportStartDate
=
dateOrNull
(
param
.
get
(
ReportStartDate
));
return
sendUnlockReport
(
param
.
get
(
"taskKey"
),
param
.
get
(
TaskKey
),
taskReportId
,
reportStartDate
);
...
...
@@ -77,6 +81,7 @@ public class UnlockReportLogic extends AbstractLogic {
// コールバック用のパラメータ
public
static
class
Result
{
public
static
final
int
BAD_STATUS
=
999
;
int
result
;
String
message
;
ExtParam
extParam
;
...
...
@@ -95,7 +100,7 @@ public class UnlockReportLogic extends AbstractLogic {
Result
result
=
new
Result
();
result
.
result
=
1
;
result
.
message
=
e
.
getLocalizedMessage
();
result
.
extParam
=
new
ExtParam
(
999
,
taskReportId
,
reportStartDate
);
result
.
extParam
=
new
ExtParam
(
BAD_STATUS
,
taskReportId
,
reportStartDate
);
return
result
;
}
...
...
@@ -138,12 +143,12 @@ public class UnlockReportLogic extends AbstractLogic {
public
String
json
()
{
JSONObject
extParam
=
new
JSONObject
();
extParam
.
put
(
"reportStatus"
,
String
.
valueOf
(
reportStatus
));
extParam
.
put
(
ReportStatus
,
String
.
valueOf
(
reportStatus
));
if
(
taskReportId
!=
null
&&
taskReportId
!=
0
)
{
extParam
.
put
(
"taskReportId"
,
taskReportId
);
extParam
.
put
(
TaskReportId
,
taskReportId
);
}
if
(
reportStartDate
!=
null
)
{
extParam
.
put
(
"reportStartDate"
,
DateTimeUtil
.
formatDate
(
reportStartDate
,
DateTimeFormat
.
yyyyMMddHHmmssSSS_hyphen
));
extParam
.
put
(
ReportStartDate
,
DateTimeUtil
.
formatDate
(
reportStartDate
,
DateTimeFormat
.
yyyyMMddHHmmssSSS_hyphen
));
}
return
extParam
.
toString
();
}
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVContentViewActivity.java
View file @
3b6a2e99
...
...
@@ -85,6 +85,8 @@ 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
.
OperationDataJSON
.
ReportStartDate
;
public
abstract
class
ABVContentViewActivity
extends
ABVAuthenticatedActivity
{
private
static
final
String
TAG
=
"ABVContentViewActivity"
;
...
...
@@ -1082,7 +1084,7 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
TaskReportDao
dao
=
AbstractDao
.
getDao
(
TaskReportDao
.
class
);
dao
.
updateReportLock
(
mTaskKey
,
dateOrNull
(
abookCheckParam
.
get
(
"reportStartDate"
)),
dateOrNull
(
abookCheckParam
.
get
(
ReportStartDate
)),
r
.
getExtParam
().
getReportStatus
(),
r
.
getExtParam
().
getReportLockUserId
(),
r
.
getExtParam
().
getReportLockUserName
(),
...
...
@@ -1102,7 +1104,7 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
TaskReportDao
dao
=
AbstractDao
.
getDao
(
TaskReportDao
.
class
);
dao
.
updateReportLock
(
mTaskKey
,
dateOrNull
(
abookCheckParam
.
get
(
"reportStartDate"
)),
dateOrNull
(
abookCheckParam
.
get
(
ReportStartDate
)),
r
.
getExtParam
().
getReportStatus
(),
null
,
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