Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
huangzhicong
/
SmartCanteen
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
23662f9d
authored
Dec 18, 2019
by
patpat
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into production
parents
05c84cab
ec0b4fe8
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
37 additions
and
30 deletions
+37
-30
README.md
+11
-5
app/src/main/assets/pay-balance-not-enough.mp3
+0
-0
app/src/main/assets/pay-other-platform-offline.mp3
+0
-0
app/src/main/java/com/bgycc/smartcanteen/action/LogAction.kt
+20
-21
app/src/main/java/com/bgycc/smartcanteen/action/PayOfflineAction.java
+2
-1
app/src/main/java/com/bgycc/smartcanteen/helper/TTSHelper.kt
+4
-3
No files found.
README.md
View file @
23662f9d
#### 打包流程
### 分支管理
分支名|描述
-|-
develop|开发分支作为源分支,所有新功能开发和bug修复都在develop派生分支进行
test|测试环境,仅用作打包使用,打包前先从develop分支合并过来并递增版本号
uat|uat环境,仅用作打包使用,打包前先从develop分支合并过来并递增版本号
production|生产环境,仅用作打包使用,打包前先从develop分支合并过来并递增版本号
###
#
特殊功能二维码
### 特殊功能二维码
在线生成二维码:https://www.liantu.com
功能|二维码内容
...
...
@@ -10,13 +16,13 @@
软件更新|{"action":"CONFIG_UPDATE","data":{"url":"apk网络地址"}}
清空离线支付记录|{"action":"CONFIG_CLEAR_OFFLINE_RECODE"}
###
#
已知问题
### 已知问题
-
现场反馈终端有偶发性卡死的情况,具体表现为界面右上角时间不走,接入鼠标键盘均没有响应。终端系统日志显示是因为某个App占用过多资源导致系统频繁GC,目前没有排除到是否我们App导致还是终端里其它App导致,建议与甲方沟通把多余无关的App卸载掉,并且把蓝牙关闭。
###
#
注意事项
### 注意事项
-
优卡特p60s受厂家二维码sdk限制,targetSdkVersion必须为22,使用高版本将导致App
**无法在设备上运行!!!切记!!!**
###
#
机型历史
### 机型历史
该项目到现在一共使用过3个机型,按时间顺序排列分别是:
1.
~~深圳小兵Q6~~
2.
~~天波580C~~
...
...
app/src/main/assets/pay-balance-not-enough.mp3
View file @
23662f9d
No preview for this file type
app/src/main/assets/pay-other-platform-offline.mp3
0 → 100644
View file @
23662f9d
File added
app/src/main/java/com/bgycc/smartcanteen/action/LogAction.kt
View file @
23662f9d
package
com.bgycc.smartcanteen.action
import
com.bgycc.smartcanteen.App
import
com.bgycc.smartcanteen.BuildConfig
import
com.bgycc.smartcanteen.server.http.MainHttpClient
import
com.bgycc.smartcanteen.util.LogUtil
import
com.blankj.utilcode.util.FileIOUtils
import
com.blankj.utilcode.util.FileUtils
import
com.blankj.utilcode.util.PathUtils
import
com.blankj.utilcode.util.ZipUtils
...
...
@@ -44,26 +41,28 @@ object LogAction : Action(ActionEnum.LOG_PULL.name) {
}
Thread
{
state
=
State
.
STARTED
val
logZipFile
=
File
(
PathUtils
.
getExternalAppCachePath
(),
"upload/log.zip"
)
val
logUploadDir
=
File
(
PathUtils
.
getExternalAppCachePath
(),
"upload/log"
)
FileUtils
.
delete
(
logZipFile
)
FileUtils
.
deleteDir
(
logUploadDir
)
logUploadDir
.
mkdirs
()
try
{
state
=
State
.
STARTED
val
logZipFile
=
File
(
PathUtils
.
getExternalAppCachePath
(),
"upload/log.zip"
)
val
logUploadDir
=
File
(
PathUtils
.
getExternalAppCachePath
(),
"upload/log"
)
FileUtils
.
delete
(
logZipFile
)
FileUtils
.
deleteDir
(
logUploadDir
)
logUploadDir
.
mkdirs
()
val
logDir
=
when
(
type
)
{
"system"
->
File
(
PathUtils
.
getExternalStoragePath
(),
"boot_log"
)
else
->
File
(
PathUtils
.
getExternalAppCachePath
(),
"log"
)
}
FileUtils
.
listFilesInDir
(
logDir
).
forEach
{
val
date
=
Date
(
it
.
lastModified
())
if
(
date
>=
startTime
&&
date
<=
endTime
)
{
FileUtils
.
copyFile
(
it
,
File
(
logUploadDir
,
it
.
name
))
val
logDir
=
when
(
type
)
{
"system"
->
File
(
PathUtils
.
getExternalStoragePath
(),
"boot_log"
)
else
->
File
(
PathUtils
.
getExternalAppCachePath
(),
"log"
)
}
}
ZipUtils
.
zipFile
(
logUploadDir
,
logZipFile
)
FileUtils
.
deleteDir
(
logUploadDir
)
MainHttpClient
.
uploadLog
(
logZipFile
,
"$type${formatSrc.format(startTime)}${formatSrc.format(endTime)}${App.getDeviceSN()}.zip"
)
FileUtils
.
listFilesInDir
(
logDir
)
?.
forEach
{
val
date
=
Date
(
it
.
lastModified
())
if
(
date
>=
startTime
&&
date
<=
endTime
)
{
FileUtils
.
copyFile
(
it
,
File
(
logUploadDir
,
it
.
name
))
}
}
ZipUtils
.
zipFile
(
logUploadDir
,
logZipFile
)
FileUtils
.
deleteDir
(
logUploadDir
)
MainHttpClient
.
uploadLog
(
logZipFile
,
"$type${formatSrc.format(startTime)}${formatSrc.format(endTime)}${App.getDeviceSN()}.zip"
)
}
catch
(
e
:
Exception
)
{}
state
=
State
.
INITED
}.
start
()
}
catch
(
e
:
Exception
)
{}
...
...
app/src/main/java/com/bgycc/smartcanteen/action/PayOfflineAction.java
View file @
23662f9d
...
...
@@ -4,6 +4,7 @@ import com.bgycc.smartcanteen.App;
import
com.bgycc.smartcanteen.Storage.PayStorage
;
import
com.bgycc.smartcanteen.event.PayStateEvent
;
import
com.bgycc.smartcanteen.event.QRCodeRepeatEvent
;
import
com.bgycc.smartcanteen.helper.TTSHelper
;
import
com.bgycc.smartcanteen.helper.TimerHelper
;
import
com.bgycc.smartcanteen.server.websocket.MainWebSocket
;
import
com.bgycc.smartcanteen.task.QRCodeTask
;
...
...
@@ -79,7 +80,7 @@ public class PayOfflineAction extends Action {
setState
(
State
.
STARTED
);
if
(!
QRCodeTask
.
TYPE_BHPAY
.
equals
(
payCodeType
))
{
setState
(
State
.
FAIL
);
setState
(
State
.
FAIL
,
"第三方支付异常"
);
return
;
}
if
(
checkRepeat
&&
mPayCodeHistory
.
contains
(
payCode
))
{
...
...
app/src/main/java/com/bgycc/smartcanteen/helper/TTSHelper.kt
View file @
23662f9d
...
...
@@ -66,9 +66,10 @@ object TTSHelper {
"您的就餐权限已失效"
->
"pay-invalid-permission.mp3"
"非本窗口营业时间"
->
"pay-window-rest-time.mp3"
"非营业时间"
->
"pay-canteen-rest-time.mp3"
"可用余额不足"
->
"pay-balance-not-enough.mp3"
else
->
null
}
?:
return
"余额不足"
->
"pay-balance-not-enough.mp3"
"第三方支付异常"
->
"pay-other-platform-offline.mp3"
else
->
"pay-fail.mp3"
}
var
id
=
mSoundIdMap
[
soundName
]
if
(
id
==
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