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
50646853
Commit
50646853
authored
Feb 24, 2023
by
Yujin Seo
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/contract/sato/1.0.300_52170_unlock' into 'contract/sato/1.0.300'
報告書ロック機能の改善 See merge request
!293
parents
a026403b
88cc2571
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
23 additions
and
25 deletions
+23
-25
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/dao/TaskReportDao.java
+9
-11
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/LockReportLogic.java
+1
-2
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/UnlockReportLogic.java
+3
-6
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVContentViewActivity.java
+2
-6
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/activity/HTMLWebViewActivity.java
+8
-0
No files found.
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/dao/TaskReportDao.java
View file @
50646853
...
@@ -3,8 +3,10 @@ package jp.agentec.abook.abv.bl.data.dao;
...
@@ -3,8 +3,10 @@ package jp.agentec.abook.abv.bl.data.dao;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
java.util.TimeZone
;
import
jp.agentec.abook.abv.bl.common.db.Cursor
;
import
jp.agentec.abook.abv.bl.common.db.Cursor
;
import
jp.agentec.abook.abv.bl.common.log.Logger
;
import
jp.agentec.abook.abv.bl.dto.TaskReportDto
;
import
jp.agentec.abook.abv.bl.dto.TaskReportDto
;
import
jp.agentec.adf.util.DateTimeFormat
;
import
jp.agentec.adf.util.DateTimeFormat
;
import
jp.agentec.adf.util.DateTimeUtil
;
import
jp.agentec.adf.util.DateTimeUtil
;
...
@@ -223,7 +225,6 @@ public class TaskReportDao extends AbstractDao {
...
@@ -223,7 +225,6 @@ public class TaskReportDao extends AbstractDao {
* @param reportLockUserId
* @param reportLockUserId
* @param reportLockUserName
* @param reportLockUserName
* @param reportLockTime
* @param reportLockTime
* @param loginId
* @return
* @return
*/
*/
public
void
updateReportLock
(
public
void
updateReportLock
(
...
@@ -233,8 +234,7 @@ public class TaskReportDao extends AbstractDao {
...
@@ -233,8 +234,7 @@ public class TaskReportDao extends AbstractDao {
int
reportStatus
,
int
reportStatus
,
String
reportLockUserId
,
String
reportLockUserId
,
String
reportLockUserName
,
String
reportLockUserName
,
Date
reportLockTime
,
Date
reportLockTime
String
loginId
)
{
)
{
StringBuilder
sql
=
new
StringBuilder
();
StringBuilder
sql
=
new
StringBuilder
();
List
<
Object
>
args
=
new
ArrayList
<
Object
>();
List
<
Object
>
args
=
new
ArrayList
<
Object
>();
...
@@ -250,24 +250,22 @@ public class TaskReportDao extends AbstractDao {
...
@@ -250,24 +250,22 @@ public class TaskReportDao extends AbstractDao {
}
else
{
}
else
{
sql
.
append
(
" WHERE task_key=? "
);
sql
.
append
(
" WHERE task_key=? "
);
}
}
if
(
loginId
!=
null
)
{
sql
.
append
(
" AND report_lock_user_id=? "
);
//自分以外のロックを変更しないため
}
args
.
add
(
reportStatus
);
args
.
add
(
reportStatus
);
args
.
add
(
reportLockUserId
);
args
.
add
(
reportLockUserId
);
args
.
add
(
reportLockUserName
);
args
.
add
(
reportLockUserName
);
args
.
add
(
reportLockTime
);
args
.
add
(
reportLockTime
);
if
(
reportStartDate
!=
null
)
{
if
(
reportStartDate
!=
null
)
{
args
.
add
(
taskReportId
);
args
.
add
(
taskReportId
);
args
.
add
(
DateTimeUtil
.
toStringInTimeZone
(
reportStartDate
,
DateTimeFormat
.
yyyyMMddHHmmss_hyphen
,
"UTC"
));
int
offset
=
TimeZone
.
getDefault
().
getOffset
(
reportStartDate
.
getTime
());
Date
date
=
new
Date
(
reportStartDate
.
getTime
()
-
offset
);
String
dateStr
=
DateTimeUtil
.
toStringInTimeZone
(
date
,
DateTimeFormat
.
yyyyMMddHHmmss_hyphen
,
"UTC"
);
args
.
add
(
dateStr
);
}
else
{
}
else
{
args
.
add
(
taskKey
);
args
.
add
(
taskKey
);
}
}
if
(
loginId
!=
null
)
{
args
.
add
(
loginId
);
}
update
(
sql
.
toString
(),
args
.
toArray
());
long
count
=
update
(
sql
.
toString
(),
args
.
toArray
());
Logger
.
i
(
TAG
,
"updated "
+
count
+
"record(s) by LOCK/UNLOCK"
);
}
}
/**
/**
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/LockReportLogic.java
View file @
50646853
...
@@ -80,8 +80,7 @@ public class LockReportLogic extends AbstractLogic {
...
@@ -80,8 +80,7 @@ public class LockReportLogic extends AbstractLogic {
reportStatus
,
reportStatus
,
member
.
loginId
,
member
.
loginId
,
member
.
memberName
,
member
.
memberName
,
new
Date
(),
new
Date
()
null
);
);
}
}
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/UnlockReportLogic.java
View file @
50646853
...
@@ -26,10 +26,9 @@ public class UnlockReportLogic extends AbstractLogic {
...
@@ -26,10 +26,9 @@ public class UnlockReportLogic extends AbstractLogic {
}
}
public
Result
unlock
(
String
taskKey
,
Long
taskReportId
,
Date
reportStartDate
)
{
public
Result
unlock
(
String
taskKey
,
Long
taskReportId
,
Date
reportStartDate
)
{
String
loginId
=
cache
.
getMemberInfo
().
loginId
;
Result
r
=
sendUnlockReport
(
taskKey
,
taskReportId
,
reportStartDate
);
Result
r
=
sendUnlockReport
(
taskKey
,
taskReportId
,
reportStartDate
);
if
(
r
.
result
==
0
)
{
if
(
r
.
result
==
0
)
{
updateLocalDB
(
taskKey
,
taskReportId
,
reportStartDate
,
r
.
extParam
.
getReportStatus
()
,
loginId
);
updateLocalDB
(
taskKey
,
taskReportId
,
reportStartDate
,
r
.
extParam
.
getReportStatus
());
}
}
return
r
;
return
r
;
}
}
...
@@ -65,8 +64,7 @@ public class UnlockReportLogic extends AbstractLogic {
...
@@ -65,8 +64,7 @@ public class UnlockReportLogic extends AbstractLogic {
String
taskKey
,
String
taskKey
,
Long
taskReportId
,
Long
taskReportId
,
Date
reportStartDate
,
Date
reportStartDate
,
int
reportStatus
,
int
reportStatus
String
loginId
)
{
)
{
// ローカルDBに反映
// ローカルDBに反映
TaskReportDao
dao
=
AbstractDao
.
getDao
(
TaskReportDao
.
class
);
TaskReportDao
dao
=
AbstractDao
.
getDao
(
TaskReportDao
.
class
);
...
@@ -77,8 +75,7 @@ public class UnlockReportLogic extends AbstractLogic {
...
@@ -77,8 +75,7 @@ public class UnlockReportLogic extends AbstractLogic {
reportStatus
,
reportStatus
,
null
,
null
,
null
,
null
,
null
,
null
loginId
);
);
}
}
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVContentViewActivity.java
View file @
50646853
...
@@ -1121,12 +1121,8 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
...
@@ -1121,12 +1121,8 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
// アンロック
// アンロック
UnlockReportLogic
.
Result
r
=
UnlockReportLogic
.
newInstance
().
unlock
(
taskKey
,
taskReportId
,
startDate
);
UnlockReportLogic
.
Result
r
=
UnlockReportLogic
.
newInstance
().
unlock
(
taskKey
,
taskReportId
,
startDate
);
// JSコールバック
// JSコールバック
if
(
r
.
getMessage
().
length
()
>
0
)
{
// アンロックの失敗は無視
// アンロックの失敗は無視
afterABookCheckApi
(
mCmd
,
mTaskKey
,
0
,
""
,
"{'reportStatus':0}"
);
afterABookCheckApi
(
mCmd
,
mTaskKey
,
0
,
""
,
"{'reportStatus':0}"
);
}
else
{
afterABookCheckApi
(
mCmd
,
mTaskKey
,
r
.
getResult
(),
r
.
getMessage
(),
r
.
getExtParam
().
json
());
}
}
}
}
}
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/activity/HTMLWebViewActivity.java
View file @
50646853
...
@@ -52,6 +52,7 @@ import jp.agentec.abook.abv.ui.common.view.ABVPopupListWindow;
...
@@ -52,6 +52,7 @@ import jp.agentec.abook.abv.ui.common.view.ABVPopupListWindow;
import
jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper
;
import
jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper
;
import
jp.agentec.abook.abv.ui.viewer.view.CheckFormWebview
;
import
jp.agentec.abook.abv.ui.viewer.view.CheckFormWebview
;
import
static
jp
.
agentec
.
abook
.
abv
.
bl
.
common
.
constant
.
ABookKeys
.
REPORT_START_DATE
;
import
static
jp
.
agentec
.
abook
.
abv
.
bl
.
common
.
constant
.
ABookKeys
.
STATUS_CODE
;
import
static
jp
.
agentec
.
abook
.
abv
.
bl
.
common
.
constant
.
ABookKeys
.
STATUS_CODE
;
//TODO: later 遠隔連動関連はContentView,NoPdfViewと共通しているので要集約
//TODO: later 遠隔連動関連はContentView,NoPdfViewと共通しているので要集約
...
@@ -337,6 +338,13 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
...
@@ -337,6 +338,13 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
// AndroidOSが5以下のPANO_SERVER処理のため、置き換える必要がある。
// AndroidOSが5以下のPANO_SERVER処理のため、置き換える必要がある。
url
=
"/"
+
url
;
url
=
"/"
+
url
;
if
(
url
.
contains
(
ABookKeys
.
ABOOK_CHECK_API
))
{
if
(
url
.
contains
(
ABookKeys
.
ABOOK_CHECK_API
))
{
String
cmd
=
uri
.
getQueryParameter
(
ABookKeys
.
CMD
);
if
(
cmd
.
contains
(
ABookKeys
.
CMD_LOCK_REPORT
))
{
String
sd
=
uri
.
getQueryParameter
(
REPORT_START_DATE
);
Logger
.
d
(
TAG
,
"mCmd:"
+
cmd
+
",reportStartDate: "
+
sd
+
", CheckApiUrl: "
+
url
);
}
else
{
Logger
.
d
(
TAG
,
"mCmd:"
+
cmd
+
", CheckApiUrl: "
+
url
);
}
commonShouldOverrideUrlLoading
(
uri
,
null
);
commonShouldOverrideUrlLoading
(
uri
,
null
);
}
}
if
(
fromDashboard
&&
(
url
.
contains
(
ABookKeys
.
CMD_CANCEL_TASK_REPORT
)))
{
if
(
fromDashboard
&&
(
url
.
contains
(
ABookKeys
.
CMD_CANCEL_TASK_REPORT
)))
{
...
...
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