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
81ccb204
Commit
81ccb204
authored
Apr 04, 2023
by
Kazuyuki Hida
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Java8依存のコードを代替コードに変更
parent
09c95755
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
67 additions
and
11 deletions
+67
-11
ABVJE_BL/src/jp/agentec/abook/abv/bl/common/util/Base64.java
+0
-0
ABVJE_BL/src/jp/agentec/abook/abv/bl/common/util/Base64DecoderException.java
+32
-0
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/dao/TaskReportDao.java
+8
-3
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/helper/ABookCheckWebViewHelper.java
+20
-4
gradle.properties
+7
-4
No files found.
ABVJE_BL/src/jp/agentec/abook/abv/bl/common/util/Base64.java
0 → 100644
View file @
81ccb204
This diff is collapsed.
Click to expand it.
ABVJE_BL/src/jp/agentec/abook/abv/bl/common/util/Base64DecoderException.java
0 → 100644
View file @
81ccb204
// Copyright 2002, Google, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package
jp
.
agentec
.
abook
.
abv
.
bl
.
common
.
util
;
/**
* Exception thrown when encountering an invalid Base64 input character.
*
* @author nelson
*/
public
class
Base64DecoderException
extends
Exception
{
public
Base64DecoderException
()
{
super
();
}
public
Base64DecoderException
(
String
s
)
{
super
(
s
);
}
private
static
final
long
serialVersionUID
=
1L
;
}
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/dao/TaskReportDao.java
View file @
81ccb204
package
jp
.
agentec
.
abook
.
abv
.
bl
.
data
.
dao
;
package
jp
.
agentec
.
abook
.
abv
.
bl
.
data
.
dao
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Base64
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
java.util.TimeZone
;
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.common.log.Logger
;
import
jp.agentec.abook.abv.bl.common.util.Base64DecoderException
;
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
;
...
@@ -616,13 +616,18 @@ public class TaskReportDao extends AbstractDao {
...
@@ -616,13 +616,18 @@ public class TaskReportDao extends AbstractDao {
if
(
plain
==
null
)
{
if
(
plain
==
null
)
{
return
null
;
return
null
;
}
}
return
Base64
.
getEncoder
().
encodeToString
(
plain
.
getBytes
());
return
jp
.
agentec
.
abook
.
abv
.
bl
.
common
.
util
.
Base64
.
encode
(
plain
.
getBytes
());
}
}
public
static
String
decode
(
String
encoded
)
{
public
static
String
decode
(
String
encoded
)
{
if
(
encoded
==
null
)
{
if
(
encoded
==
null
)
{
return
null
;
return
null
;
}
}
return
new
String
(
Base64
.
getDecoder
().
decode
(
encoded
));
try
{
return
new
String
(
jp
.
agentec
.
abook
.
abv
.
bl
.
common
.
util
.
Base64
.
decode
(
encoded
));
}
catch
(
Base64DecoderException
e
)
{
Logger
.
e
(
TAG
,
e
);
return
null
;
}
}
}
}
}
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/helper/ABookCheckWebViewHelper.java
View file @
81ccb204
...
@@ -98,8 +98,8 @@ public class ABookCheckWebViewHelper extends ABookHelper {
...
@@ -98,8 +98,8 @@ public class ABookCheckWebViewHelper extends ABookHelper {
case
ABookKeys
.
CMD_UPDATE_TASK_REPORT
:
{
case
ABookKeys
.
CMD_UPDATE_TASK_REPORT
:
{
// もとから作業中だったかを調べる
// もとから作業中だったかを調べる
TaskReportDao
taskReportDao
=
AbstractDao
.
getDao
(
TaskReportDao
.
class
);
TaskReportDao
taskReportDao
=
AbstractDao
.
getDao
(
TaskReportDao
.
class
);
int
reportId
=
Integer
.
parseInt
(
String
.
valueOf
(
param
.
getOrDefault
(
TaskReportId
,
"0"
)));
int
reportId
=
Integer
.
parseInt
(
String
.
valueOf
(
getOrZero
(
param
,
TaskReportId
)));
String
startDate
=
param
.
getOrDefault
(
ReportStartDate
,
null
);
String
startDate
=
getOrNull
(
param
,
ReportStartDate
);
boolean
isLocalSaved
=
taskReportDao
.
isLocalSaved
(
taskKey
,
reportId
,
startDate
);
boolean
isLocalSaved
=
taskReportDao
.
isLocalSaved
(
taskKey
,
reportId
,
startDate
);
boolean
isCompleted
=
taskReportDao
.
isCompleted
(
taskKey
,
reportId
,
startDate
);
boolean
isCompleted
=
taskReportDao
.
isCompleted
(
taskKey
,
reportId
,
startDate
);
boolean
isWorking
=
taskReportDao
.
isWorking
(
taskKey
,
reportId
,
startDate
);
boolean
isWorking
=
taskReportDao
.
isWorking
(
taskKey
,
reportId
,
startDate
);
...
@@ -124,8 +124,8 @@ public class ABookCheckWebViewHelper extends ABookHelper {
...
@@ -124,8 +124,8 @@ public class ABookCheckWebViewHelper extends ABookHelper {
case
ABookKeys
.
CMD_LOCAL_SAVE_TASK_REPORT
:
// 一時保存
case
ABookKeys
.
CMD_LOCAL_SAVE_TASK_REPORT
:
// 一時保存
// もとから作業中だったかを調べる
// もとから作業中だったかを調べる
TaskReportDao
taskReportDao
=
AbstractDao
.
getDao
(
TaskReportDao
.
class
);
TaskReportDao
taskReportDao
=
AbstractDao
.
getDao
(
TaskReportDao
.
class
);
int
rportId
=
Integer
.
parseInt
(
String
.
valueOf
(
param
.
getOrDefault
(
TaskReportId
,
"0"
)));
int
rportId
=
Integer
.
parseInt
(
String
.
valueOf
(
getOrZero
(
param
,
TaskReportId
)));
String
startDate
=
param
.
getOrDefault
(
ReportStartDate
,
null
);
String
startDate
=
getOrNull
(
param
,
ReportStartDate
);
boolean
isLocalSaved
=
taskReportDao
.
isLocalSaved
(
taskKey
,
rportId
,
startDate
);
boolean
isLocalSaved
=
taskReportDao
.
isLocalSaved
(
taskKey
,
rportId
,
startDate
);
// 報告書の更新
// 報告書の更新
insertOrUpdateTaskReport
(
taskKey
,
enableReportHistory
,
operationId
,
contentId
,
param
,
contentPath
,
reportType
,
taskReportLevel
,
true
);
insertOrUpdateTaskReport
(
taskKey
,
enableReportHistory
,
operationId
,
contentId
,
param
,
contentPath
,
reportType
,
taskReportLevel
,
true
);
...
@@ -629,4 +629,20 @@ public class ABookCheckWebViewHelper extends ABookHelper {
...
@@ -629,4 +629,20 @@ public class ABookCheckWebViewHelper extends ABookHelper {
return
rotationAngle
;
return
rotationAngle
;
}
}
private
String
getOrZero
(
Map
<
String
,
String
>
param
,
String
key
)
{
if
(
param
.
containsKey
(
key
))
{
return
param
.
get
(
key
);
}
else
{
return
"0"
;
}
}
private
String
getOrNull
(
Map
<
String
,
String
>
param
,
String
key
)
{
if
(
param
.
containsKey
(
key
))
{
return
param
.
get
(
key
);
}
else
{
return
null
;
}
}
}
}
gradle.properties
View file @
81ccb204
...
@@ -39,14 +39,17 @@ app_versioncode=1
...
@@ -39,14 +39,17 @@ app_versioncode=1
#cms server
#cms server
#acms_address=https://check.abookcloud.com/acms
#acms_address=https://check.abookcloud.com/acms
#download_server_address=https://check.abookcloud.com/acms
#download_server_address=https://check.abookcloud.com/acms
acms_address
=
https://abook188-1.abook.bz/acms
#
acms_address=https://abook188-1.abook.bz/acms
download_server_address
=
https://abook188-1.abook.bz/acms
#
download_server_address=https://abook188-1.abook.bz/acms
#acms_address=http://10.0.2.2:8080/acms
#acms_address=http://10.0.2.2:8080/acms
#download_server_address=http://10.0.2.2:8080/acms
#download_server_address=http://10.0.2.2:8080/acms
acms_address
=
https://atform.sato.co.jp//acms
download_server_address
=
https://atform.sato.co.jp//acms
#syncview server
#syncview server
websocket_server_http_url
=
https://a
book188-1.abook.bz
/v1
websocket_server_http_url
=
https://a
tform.sato.co.jp/
/v1
websocket_server_ws_url
=
wss://a
book188-1.abook.bz
/v1
websocket_server_ws_url
=
wss://a
tform.sato.co.jp/
/v1
#WebSocket debug出力
#WebSocket debug出力
websocket_debug
=
false
websocket_debug
=
false
...
...
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