Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
MiYaFastCashier
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
jiangjiantao
MiYaFastCashier
Commits
0bb3cb46
Commit
0bb3cb46
authored
Apr 25, 2022
by
zhaopengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码整理
parent
52208a37
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
4 additions
and
83 deletions
+4
-83
PrintService.kt
...rc/main/java/com/miya/fastcashier/service/PrintService.kt
+0
-7
AliPayCodeActivity.kt
...c/main/java/com/miya/fastcashier/ui/AliPayCodeActivity.kt
+1
-19
LoginActivity.kt
app/src/main/java/com/miya/fastcashier/ui/LoginActivity.kt
+0
-1
MainActivity.kt
app/src/main/java/com/miya/fastcashier/ui/MainActivity.kt
+0
-10
PayActivity.kt
app/src/main/java/com/miya/fastcashier/ui/PayActivity.kt
+0
-3
PriceInputActivity.kt
...c/main/java/com/miya/fastcashier/ui/PriceInputActivity.kt
+0
-5
ResetAuthorizePasswordActivity.kt
...com/miya/fastcashier/ui/ResetAuthorizePasswordActivity.kt
+0
-7
SearchOrderActivity.kt
.../main/java/com/miya/fastcashier/ui/SearchOrderActivity.kt
+0
-4
SettingActivity.kt
app/src/main/java/com/miya/fastcashier/ui/SettingActivity.kt
+0
-4
WxPayCodeActivity.kt
...rc/main/java/com/miya/fastcashier/ui/WxPayCodeActivity.kt
+1
-20
PrintViewModel.kt
...ain/java/com/miya/fastcashier/viewmodel/PrintViewModel.kt
+2
-3
No files found.
app/src/main/java/com/miya/fastcashier/service/PrintService.kt
View file @
0bb3cb46
package
com.miya.fastcashier.service
import
android.text.TextUtils
import
com.blankj.utilcode.util.LogUtils
import
com.esc.LogUlit
import
com.miya.fastcashier.beans.SelfCashierAccountInfo
import
com.miya.fastcashier.beans.ViewOrderStatisticsInfo
import
com.miya.fastcashier.utils.DateUtils
...
...
@@ -10,15 +8,10 @@ import com.miya.fastcashier.utils.MiYaPayPlantformPayWayEnum
import
com.miya.fastcashier.utils.StringPriceFormat
import
com.miya.fastcashier.utils.isEmpty
import
com.miya.fastcashier.utils.manage.OrderRecordManageKit
import
com.miya.print.BuildConfig
import
com.miya.print.IPrinter
import
com.miya.print.PrinterManager
import
com.miya.print.utils.Page58MmPrintUtils
import
com.miya.print.utils.PrintLogger
import
com.sdy.miya.moblie.component.pay.platform.bean.PayServiceResponse
import
com.tencent.mmkv.MMKV
import
java.lang.Exception
import
java.lang.RuntimeException
import
java.util.*
object
PrintService
{
...
...
app/src/main/java/com/miya/fastcashier/ui/AliPayCodeActivity.kt
View file @
0bb3cb46
package
com.miya.fastcashier.ui
import
android.annotation.SuppressLint
import
android.content.Intent
import
android.os.Build
import
androidx.appcompat.app.AppCompatActivity
import
android.os.Bundle
import
android.os.Handler
import
android.widget.Toast
import
androidx.annotation.RequiresApi
import
androidx.appcompat.content.res.AppCompatResources
import
androidx.core.content.res.ResourcesCompat
import
androidx.appcompat.app.AppCompatActivity
import
androidx.lifecycle.ViewModelProvider
import
com.alibaba.fastjson.JSON
import
com.blankj.utilcode.util.LogUtils
import
com.blankj.utilcode.util.SizeUtils
import
com.miya.fastcashier.R
import
com.miya.fastcashier.R.mipmap.ic_alipay
import
com.miya.fastcashier.R.mipmap.ic_wxpay
import
com.miya.fastcashier.databinding.ActivityAliPayCodeBinding
import
com.miya.fastcashier.databinding.ActivityPayCodeBinding
import
com.miya.fastcashier.databinding.ActivityPriceInputBinding
import
com.miya.fastcashier.service.PrintService
import
com.miya.fastcashier.ui.dialog.PayChooseDialog
import
com.miya.fastcashier.utils.CenterToasty
import
com.miya.fastcashier.utils.DateUtils
import
com.miya.fastcashier.utils.StringPriceFormat
import
com.miya.fastcashier.utils.clickWithTrigger
import
com.miya.fastcashier.utils.manage.OrderRecordManageKit
import
com.miya.fastcashier.viewmodel.PayViewModel
import
com.miya.print.utils.BitmapUtils
import
com.sdy.miya.moblie.component.pay.platform.bean.PayServiceResponse
import
com.tencent.mmkv.MMKV
import
kotlinx.coroutines.Dispatchers
import
kotlinx.coroutines.runBlocking
import
java.util.*
...
...
@@ -54,8 +38,6 @@ class AliPayCodeActivity : AppCompatActivity() {
val
llBack
=
binding
.
llBack
val
tvPrice
=
binding
.
tvPrice
val
kv
=
MMKV
.
defaultMMKV
()
llBack
.
clickWithTrigger
{
finish
()
}
val
extra
=
intent
.
getSerializableExtra
(
"payServiceResponse"
)
...
...
app/src/main/java/com/miya/fastcashier/ui/LoginActivity.kt
View file @
0bb3cb46
...
...
@@ -13,7 +13,6 @@ import android.widget.EditText
import
androidx.appcompat.app.AppCompatActivity
import
androidx.lifecycle.Observer
import
androidx.lifecycle.ViewModelProvider
import
com.blankj.utilcode.util.FileUtils
import
com.blankj.utilcode.util.ToastUtils
import
com.miya.fastcashier.databinding.ActivityLoginBinding
import
com.miya.fastcashier.service.AccountService
...
...
app/src/main/java/com/miya/fastcashier/ui/MainActivity.kt
View file @
0bb3cb46
package
com.miya.fastcashier.ui
import
android.content.Intent
import
androidx.appcompat.app.AppCompatActivity
import
android.os.Bundle
import
android.view.Gravity
import
android.widget.Toast
import
androidx.fragment.app.FragmentManager
import
androidx.lifecycle.Observer
import
androidx.lifecycle.ViewModelProvider
import
com.miya.fastcashier.R
import
com.miya.fastcashier.databinding.ActivityLoginBinding
import
com.miya.fastcashier.databinding.ActivityMainBinding
import
com.miya.fastcashier.service.AccountService
import
com.miya.fastcashier.service.PrintService
import
com.miya.fastcashier.ui.dialog.AuthorizePasswordInputDialog
import
com.miya.fastcashier.ui.dialog.CommonDialog
import
com.miya.fastcashier.ui.dialog.MessageDialog
import
com.miya.fastcashier.utils.CenterToasty
import
com.miya.fastcashier.utils.DateSelectHelper
import
com.miya.fastcashier.utils.DateUtils
...
...
@@ -24,9 +17,6 @@ import com.miya.fastcashier.utils.manage.AccountPasswordManageKit
import
com.miya.fastcashier.utils.manage.LocalKeyDataMKManageKit
import
com.miya.fastcashier.utils.manage.OrderRecordManageKit
import
com.miya.fastcashier.viewmodel.MainViewModel
import
com.sdy.miya.moblie.component.pay.platform.bean.PayServiceResponse
import
com.tencent.mmkv.MMKV
import
java.lang.Exception
import
java.util.*
class
MainActivity
:
BaseActivity
()
{
...
...
app/src/main/java/com/miya/fastcashier/ui/PayActivity.kt
View file @
0bb3cb46
...
...
@@ -6,14 +6,11 @@ import android.view.KeyEvent
import
android.widget.Toast
import
androidx.lifecycle.ViewModelProvider
import
com.miya.fastcashier.databinding.ActivityPayBinding
import
com.miya.fastcashier.service.PrintService
import
com.miya.fastcashier.utils.CenterToasty
import
com.miya.fastcashier.utils.DateUtils
import
com.miya.fastcashier.utils.ScanGunKeyEventHelper
import
com.miya.fastcashier.utils.clickWithTrigger
import
com.miya.fastcashier.utils.manage.OrderRecordManageKit
import
com.miya.fastcashier.viewmodel.PayViewModel
import
com.tencent.mmkv.MMKV
import
java.util.*
...
...
app/src/main/java/com/miya/fastcashier/ui/PriceInputActivity.kt
View file @
0bb3cb46
...
...
@@ -3,17 +3,13 @@ package com.miya.fastcashier.ui
import
android.content.Intent
import
android.os.Bundle
import
android.text.TextUtils
import
android.util.Log
import
android.view.Gravity
import
android.view.View
import
android.widget.Toast
import
androidx.lifecycle.ViewModelProvider
import
com.miya.fastcashier.R
import
com.miya.fastcashier.config.IntentExtra
import
com.miya.fastcashier.databinding.ActivityPriceInputBinding
import
com.miya.fastcashier.service.AccountService
import
com.miya.fastcashier.ui.dialog.CommonDialog
import
com.miya.fastcashier.ui.dialog.MessageDialog
import
com.miya.fastcashier.ui.dialog.PayChooseDialog
import
com.miya.fastcashier.ui.dialog.PayChooseDialog.GeneratePayCodeClickListener
import
com.miya.fastcashier.utils.CenterToasty
...
...
@@ -24,7 +20,6 @@ import com.miya.fastcashier.viewmodel.PayViewModel
import
com.miya.fastcashier.widget.DecimalKeyboard.DELETE
import
com.miya.fastcashier.widget.DecimalKeyboard.DOT
import
com.sdy.miya.moblie.component.pay.platform.bean.PayServiceResponse
import
com.tencent.mmkv.MMKV
import
java.math.BigDecimal
...
...
app/src/main/java/com/miya/fastcashier/ui/ResetAuthorizePasswordActivity.kt
View file @
0bb3cb46
...
...
@@ -4,17 +4,10 @@ import android.content.Context
import
android.content.Intent
import
android.os.Bundle
import
android.text.TextUtils
import
android.view.Gravity
import
com.blankj.utilcode.util.ToastUtils
import
com.miya.fastcashier.R
import
com.miya.fastcashier.databinding.ActivityResetAuthorizePasswordBinding
import
com.miya.fastcashier.databinding.ActivitySettingBinding
import
com.miya.fastcashier.service.AccountService
import
com.miya.fastcashier.ui.dialog.CommonDialog
import
com.miya.fastcashier.utils.CenterToasty
import
com.miya.fastcashier.utils.clickWithTrigger
import
com.miya.fastcashier.utils.manage.AccountPasswordManageKit
import
com.tencent.mmkv.MMKV
class
ResetAuthorizePasswordActivity
:
BaseActivity
()
{
...
...
app/src/main/java/com/miya/fastcashier/ui/SearchOrderActivity.kt
View file @
0bb3cb46
...
...
@@ -9,13 +9,11 @@ import android.view.ViewGroup
import
android.widget.Toast
import
androidx.core.content.res.ResourcesCompat
import
androidx.fragment.app.Fragment
import
androidx.lifecycle.Observer
import
androidx.lifecycle.ViewModelProvider
import
androidx.recyclerview.widget.LinearLayoutManager
import
androidx.recyclerview.widget.RecyclerView
import
androidx.viewpager2.adapter.FragmentStateAdapter
import
com.elvishew.xlog.XLog
import
com.google.android.material.tabs.TabLayout
import
com.google.android.material.tabs.TabLayoutMediator
import
com.miya.fastcashier.R
import
com.miya.fastcashier.beans.ViewPayOrderData
...
...
@@ -28,8 +26,6 @@ import com.miya.fastcashier.service.PrintService
import
com.miya.fastcashier.utils.*
import
com.miya.fastcashier.utils.manage.LocalKeyDataMKManageKit
import
com.miya.fastcashier.viewmodel.SearchOrderViewModel
import
com.miya.fastcashier.widget.Divider
import
com.tencent.mmkv.MMKV
/**
* 查单列表
...
...
app/src/main/java/com/miya/fastcashier/ui/SettingActivity.kt
View file @
0bb3cb46
...
...
@@ -2,17 +2,13 @@ package com.miya.fastcashier.ui
import
android.content.Context
import
android.content.Intent
import
androidx.appcompat.app.AppCompatActivity
import
android.os.Bundle
import
android.view.Gravity
import
com.blankj.utilcode.util.ToastUtils
import
com.miya.fastcashier.BaseApplication
import
com.miya.fastcashier.R
import
com.miya.fastcashier.databinding.ActivitySettingBinding
import
com.miya.fastcashier.service.AccountService
import
com.miya.fastcashier.ui.dialog.CommonDialog
import
com.miya.fastcashier.utils.clickWithTrigger
import
com.tencent.mmkv.MMKV
class
SettingActivity
:
BaseActivity
()
{
...
...
app/src/main/java/com/miya/fastcashier/ui/WxPayCodeActivity.kt
View file @
0bb3cb46
package
com.miya.fastcashier.ui
import
android.annotation.SuppressLint
import
android.content.Intent
import
android.os.Build
import
androidx.appcompat.app.AppCompatActivity
import
android.os.Bundle
import
android.os.Handler
import
android.widget.Toast
import
androidx.annotation.RequiresApi
import
androidx.appcompat.content.res.AppCompatResources
import
androidx.core.content.res.ResourcesCompat
import
androidx.appcompat.app.AppCompatActivity
import
androidx.lifecycle.ViewModelProvider
import
com.alibaba.fastjson.JSON
import
com.blankj.utilcode.util.LogUtils
import
com.blankj.utilcode.util.SizeUtils
import
com.miya.fastcashier.R
import
com.miya.fastcashier.R.mipmap.ic_alipay
import
com.miya.fastcashier.R.mipmap.ic_wxpay
import
com.miya.fastcashier.databinding.ActivityPayCodeBinding
import
com.miya.fastcashier.databinding.ActivityPriceInputBinding
import
com.miya.fastcashier.databinding.ActivityWxPayCodeBinding
import
com.miya.fastcashier.service.PrintService
import
com.miya.fastcashier.ui.dialog.PayChooseDialog
import
com.miya.fastcashier.utils.CenterToasty
import
com.miya.fastcashier.utils.DateUtils
import
com.miya.fastcashier.utils.StringPriceFormat
import
com.miya.fastcashier.utils.clickWithTrigger
import
com.miya.fastcashier.utils.manage.OrderRecordManageKit
import
com.miya.fastcashier.viewmodel.PayViewModel
import
com.miya.print.utils.BitmapUtils
import
com.sdy.miya.moblie.component.pay.platform.bean.PayServiceResponse
import
com.tencent.mmkv.MMKV
import
kotlinx.coroutines.Dispatchers
import
kotlinx.coroutines.runBlocking
import
java.util.*
import
kotlin.concurrent.timerTask
/**
* 微信付款码
...
...
@@ -54,8 +37,6 @@ class WxPayCodeActivity : AppCompatActivity() {
val
llBack
=
binding
.
llBack
val
tvPrice
=
binding
.
tvPrice
val
kv
=
MMKV
.
defaultMMKV
()
llBack
.
clickWithTrigger
{
finish
()
}
val
extra
=
intent
.
getSerializableExtra
(
"payServiceResponse"
)
...
...
app/src/main/java/com/miya/fastcashier/viewmodel/PrintViewModel.kt
View file @
0bb3cb46
...
...
@@ -6,13 +6,12 @@ import androidx.lifecycle.viewModelScope
import
com.miya.fastcashier.service.AccountService
import
com.miya.fastcashier.service.PrintService
import
com.sdy.miya.moblie.component.pay.platform.bean.PayServiceResponse
import
com.tencent.mmkv.MMKV
import
kotlinx.coroutines.
*
import
kotlinx.coroutines.Dispatchers
import
kotlinx.coroutines.
launch
class
PrintViewModel
:
ViewModel
()
{
val
printResultLiveData
:
MutableLiveData
<
Result
<
Any
>>
=
MutableLiveData
()
val
kv
=
MMKV
.
defaultMMKV
()
fun
printOrder
(
payServiceResponse
:
PayServiceResponse
){
//todo 检查参数
...
...
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