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
68b7cad4
Commit
68b7cad4
authored
Apr 09, 2021
by
Lee Munkyeong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
アーカイブ実装
parent
e7e39533
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
74 additions
and
7 deletions
+74
-7
ABVJE_BL/src/jp/agentec/abook/abv/bl/acms/client/json/ArchiveListJSON.java
+3
-3
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/dao/ArchiveDao.java
+39
-1
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/tables/TArchive.java
+1
-1
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/CommunicationLogic.java
+17
-2
ABVJE_BL/src/jp/agentec/adf/util/DateTimeUtil.java
+7
-0
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/ChatWebviewActivity.java
+7
-0
No files found.
ABVJE_BL/src/jp/agentec/abook/abv/bl/acms/client/json/ArchiveListJSON.java
View file @
68b7cad4
...
...
@@ -43,9 +43,9 @@ public class ArchiveListJSON extends AcmsCommonJSON {
archiveDto
.
archiveId
=
archiveJSON
.
getInt
(
ABookCommConstants
.
KEY
.
ARCHIVE_ID
);
archiveDto
.
archiveName
=
archiveJSON
.
getString
(
ABookCommConstants
.
KEY
.
ARCHIVE_NAME
);
archiveDto
.
archiveType
=
archiveJSON
.
getInt
(
ABookCommConstants
.
KEY
.
ARCHIVE_TYPE
);
archiveDto
.
archiveDate
=
DateTimeUtil
.
millToDateString
(
archiveJSON
.
getJSONObject
(
ABookCommConstants
.
KEY
.
TIM
E
)
.
getLong
(
ABookCommConstants
.
KEY
.
TIME
));
archiveDto
.
delFlg
=
archiveJSON
.
getInt
(
ABookCommConstants
.
KEY
.
ARCHIVE_ID
);
archiveDto
.
archiveDate
=
DateTimeUtil
.
millToDateString
(
archiveJSON
.
getJSONObject
(
ABookCommConstants
.
KEY
.
ARCHIVE_DAT
E
)
.
getLong
(
ABookCommConstants
.
KEY
.
TIME
)
,
"yyyy/MM/dd HH:mm"
);
archiveDto
.
delFlg
=
archiveJSON
.
getInt
(
ABookCommConstants
.
KEY
.
DEL_FLG
);
archiveList
.
add
(
archiveDto
);
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/dao/ArchiveDao.java
View file @
68b7cad4
...
...
@@ -59,16 +59,54 @@ public class ArchiveDao extends AbstractDao {
return
list
;
}
public
List
<
ArchiveDto
>
getAllArchive
()
{
List
<
ArchiveDto
>
list
=
rawQueryGetDtoList
(
"select * from t_archive "
,
null
,
ArchiveDto
.
class
);
return
list
;
}
public
void
insertArchive
(
ArchiveDto
dto
)
{
insert
(
"insert or replace into t_archive (archive_id, archive_name, archive_date, archive_type, room_id, save_user_id, attend_user_ids) values (?,?,?,?,?,?,?)"
,
dto
.
getInsertValues
());
}
public
void
insertArchiveList
(
List
<
ArchiveDto
>
archiveDtoList
)
{
try
{
beginTransaction
();
for
(
ArchiveDto
archiveDto
:
archiveDtoList
)
{
insertArchive
(
archiveDto
);
}
commit
();
}
catch
(
Exception
e
)
{
rollback
();
Logger
.
e
(
"insertArchive failed."
,
e
);
throw
new
RuntimeException
(
e
);
}
}
public
void
deleteArchiveList
(
List
<
ArchiveDto
>
archiveDtoList
)
{
try
{
beginTransaction
();
for
(
ArchiveDto
archiveDto
:
archiveDtoList
)
{
deleteArchive
(
archiveDto
);
}
commit
();
}
catch
(
Exception
e
)
{
rollback
();
Logger
.
e
(
"deleteArchive failed."
,
e
);
throw
new
RuntimeException
(
e
);
}
}
public
boolean
updateArchive
(
ArchiveDto
dto
)
{
long
count
=
update
(
"update t_archive set archive_name=?, archive_type=?, room_id=?, collaboration_id=?, shop_member_id=?, archive_save_path=? where archive_id=?"
,
dto
.
getUpdateValues
());
return
count
>
0
;
}
public
void
deleteArchive
()
{
public
void
deleteArchive
(
ArchiveDto
archiveDto
)
{
delete
(
"t_archive"
,
"archive_id=?"
,
archiveDto
.
getKeyValues
());
}
public
void
deleteArchiveAllData
()
{
try
{
beginTransaction
();
delete
(
"t_archive"
,
null
,
null
);
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/data/tables/TArchive.java
View file @
68b7cad4
...
...
@@ -22,7 +22,7 @@ public class TArchive extends SQLiteTableScript {
sql
.
append
(
" , archive_date VARCHAR2(64) "
);
sql
.
append
(
" , attend_user_ids VARCHAR2 "
);
sql
.
append
(
" , room_id INTEGER "
);
sql
.
append
(
" , save_user_id INTEGER
NOT NULL
"
);
sql
.
append
(
" , save_user_id INTEGER "
);
sql
.
append
(
" , PRIMARY KEY (archive_id)"
);
sql
.
append
(
" ) "
);
...
...
ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/CommunicationLogic.java
View file @
68b7cad4
...
...
@@ -668,8 +668,8 @@ public class CommunicationLogic extends AbstractLogic {
deleteList
.
add
(
archiveDto
);
}
}
archiveDao
.
insertArchiveList
();
archiveDao
.
deleteArchiveList
();
archiveDao
.
insertArchiveList
(
insertList
);
archiveDao
.
deleteArchiveList
(
deleteList
);
}
public
void
updateGroup
(
List
<
ChatGroupDto
>
GroupList
)
{
...
...
@@ -776,4 +776,19 @@ public class CommunicationLogic extends AbstractLogic {
}
return
attendUsers
.
toString
();
};
public
String
getAllArchive
()
{
List
<
ArchiveDto
>
archiveList
=
archiveDao
.
getAllArchive
();
JSONArray
archiveArray
=
new
JSONArray
();
for
(
ArchiveDto
archive
:
archiveList
)
{
Map
<
String
,
Object
>
userMap
=
new
HashMap
<
String
,
Object
>();
userMap
.
put
(
ABookCommConstants
.
KEY
.
ARCHIVE_ID
,
archive
.
archiveId
);
userMap
.
put
(
ABookCommConstants
.
KEY
.
ARCHIVE_NAME
,
archive
.
archiveName
);
userMap
.
put
(
ABookCommConstants
.
KEY
.
ARCHIVE_DATE
,
archive
.
archiveDate
);
userMap
.
put
(
ABookCommConstants
.
KEY
.
ARCHIVE_TYPE
,
archive
.
archiveType
);
JSONObject
jsonObject
=
new
JSONObject
(
userMap
);
archiveArray
.
put
(
jsonObject
);
}
return
archiveArray
.
toString
();
}
}
ABVJE_BL/src/jp/agentec/adf/util/DateTimeUtil.java
View file @
68b7cad4
...
...
@@ -593,4 +593,11 @@ public class DateTimeUtil {
return
timeInFormat
;
}
public
static
String
millToDateString
(
long
mills
,
String
format
)
{
SimpleDateFormat
dateFormat
=
new
SimpleDateFormat
(
format
);
Date
timeInDate
=
new
Date
(
mills
);
String
timeInFormat
=
dateFormat
.
format
(
timeInDate
);
return
timeInFormat
;
}
}
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/ChatWebviewActivity.java
View file @
68b7cad4
...
...
@@ -1038,6 +1038,13 @@ public class ChatWebviewActivity extends ParentWebViewActivity {
editor
.
commit
();
}
@JavascriptInterface
public
String
getArchiveList
()
{
String
archiveListStr
=
communicationLogic
.
getAllArchive
();
return
archiveListStr
;
}
}
/**
...
...
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