Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
TangKuPos
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王海
TangKuPos
Commits
7061a8a5
Commit
7061a8a5
authored
Dec 25, 2017
by
陈前
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
统计订单~~
parent
8c7684aa
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
341 additions
and
207 deletions
+341
-207
app/src/main/java/com/xingdata/zzdpos/C.java
app/src/main/java/com/xingdata/zzdpos/C.java
+5
-0
app/src/main/java/com/xingdata/zzdpos/api/ApiFactory.java
app/src/main/java/com/xingdata/zzdpos/api/ApiFactory.java
+14
-2
app/src/main/java/com/xingdata/zzdpos/api/ApiService.java
app/src/main/java/com/xingdata/zzdpos/api/ApiService.java
+3
-0
app/src/main/java/com/xingdata/zzdpos/model/Sta.java
app/src/main/java/com/xingdata/zzdpos/model/Sta.java
+85
-0
app/src/main/java/com/xingdata/zzdpos/ui/statistics/StatisticsContract.java
...com/xingdata/zzdpos/ui/statistics/StatisticsContract.java
+6
-0
app/src/main/java/com/xingdata/zzdpos/ui/statistics/StatisticsPresenter.java
...om/xingdata/zzdpos/ui/statistics/StatisticsPresenter.java
+17
-4
app/src/main/java/com/xingdata/zzdpos/ui/statistics/fragment/StatisticsFragment.java
...ata/zzdpos/ui/statistics/fragment/StatisticsFragment.java
+1
-0
app/src/main/res/layout/dialog_base.xml
app/src/main/res/layout/dialog_base.xml
+5
-10
app/src/main/res/layout/dialog_handover.xml
app/src/main/res/layout/dialog_handover.xml
+204
-190
app/src/main/res/values/styles.xml
app/src/main/res/values/styles.xml
+1
-1
No files found.
app/src/main/java/com/xingdata/zzdpos/C.java
View file @
7061a8a5
...
@@ -49,6 +49,11 @@ public class C {
...
@@ -49,6 +49,11 @@ public class C {
public
static
final
String
synchronousDown
=
PKG
+
"downLoad/downLoad"
;
public
static
final
String
synchronousDown
=
PKG
+
"downLoad/downLoad"
;
}
}
public
final
class
STA
{
public
static
final
String
statistics
=
PKG
+
"downLoad/getTodayCount"
;
}
public
final
class
SMS
{
public
final
class
SMS
{
/**
/**
* 注册发送短信验证码
* 注册发送短信验证码
...
...
app/src/main/java/com/xingdata/zzdpos/api/ApiFactory.java
View file @
7061a8a5
...
@@ -248,7 +248,6 @@ public final class ApiFactory {
...
@@ -248,7 +248,6 @@ public final class ApiFactory {
}
}
/**
/**
* 销售订单查询接口
* 销售订单查询接口
*
*
...
@@ -257,12 +256,13 @@ public final class ApiFactory {
...
@@ -257,12 +256,13 @@ public final class ApiFactory {
* @return
* @return
*/
*/
public
static
Observable
<
Pager
<
com
.
xingdata
.
zzdpos
.
model
.
Saleorder
>>
getSaleOrderList
(
int
pageNulmber
,
int
public
static
Observable
<
Pager
<
com
.
xingdata
.
zzdpos
.
model
.
Saleorder
>>
getSaleOrderList
(
int
pageNulmber
,
int
pageSize
,
long
startDate
,
long
endDate
)
{
pageSize
,
long
startDate
,
long
endDate
)
{
return
Api
.
getInstance
().
service
.
getSaleOrder
(
pageNulmber
,
pageSize
,
startDate
,
return
Api
.
getInstance
().
service
.
getSaleOrder
(
pageNulmber
,
pageSize
,
startDate
,
endDate
).
onErrorReturn
(
new
endDate
).
onErrorReturn
(
new
ErrorFilter
<>()).
map
(
new
ResultFilter
<>()).
subscribeOn
(
Schedulers
.
io
())
ErrorFilter
<>()).
map
(
new
ResultFilter
<>()).
subscribeOn
(
Schedulers
.
io
())
.
observeOn
(
AndroidSchedulers
.
mainThread
());
.
observeOn
(
AndroidSchedulers
.
mainThread
());
}
}
/**
/**
* 获取订单详情
* 获取订单详情
*
*
...
@@ -723,6 +723,18 @@ public final class ApiFactory {
...
@@ -723,6 +723,18 @@ public final class ApiFactory {
}
}
}
}
public
static
class
Sat
{
/**
* 查询统计详情
*/
public
static
Observable
<
Sat
>
queryNotice
()
{
return
Api
.
getInstance
().
service
.
querySat
()
.
onErrorReturn
(
new
ErrorFilter
<>())
.
map
(
new
ResultFilter
<>())
.
subscribeOn
(
Schedulers
.
io
())
.
observeOn
(
AndroidSchedulers
.
mainThread
());
}
}
public
static
class
Psb
{
public
static
class
Psb
{
...
...
app/src/main/java/com/xingdata/zzdpos/api/ApiService.java
View file @
7061a8a5
...
@@ -172,6 +172,9 @@ interface ApiService {
...
@@ -172,6 +172,9 @@ interface ApiService {
Observable
<
HttpMessage
<
Pager
<
Notice
>>>
queryNotice
(
@Query
(
"pageNumber"
)
int
pageNum
,
@Query
Observable
<
HttpMessage
<
Pager
<
Notice
>>>
queryNotice
(
@Query
(
"pageNumber"
)
int
pageNum
,
@Query
(
"pageSize"
)
int
pageSize
);
(
"pageSize"
)
int
pageSize
);
@POST
(
C
.
URL
.
STA
.
statistics
)
Observable
<
HttpMessage
<
ApiFactory
.
Sat
>>
querySat
();
@POST
(
C
.
URL
.
PSB
.
queryDetail
)
@POST
(
C
.
URL
.
PSB
.
queryDetail
)
Observable
<
HttpMessage
<
Psb
>>
queryPsbDetail
(
@Query
(
"psbNo"
)
String
psbNo
,
@Query
(
"id"
)
long
id
);
Observable
<
HttpMessage
<
Psb
>>
queryPsbDetail
(
@Query
(
"psbNo"
)
String
psbNo
,
@Query
(
"id"
)
long
id
);
...
...
app/src/main/java/com/xingdata/zzdpos/model/Sta.java
0 → 100644
View file @
7061a8a5
package
com
.
xingdata
.
zzdpos
.
model
;
/**
* Created by Administrator on 2017/12/25.
*/
public
class
Sta
{
/**
* 销售额
*/
private
Long
saleAmt
=
0L
;
/**
* 订单数
*/
private
Long
saleCount
=
0L
;
public
Long
getSaleAmt
()
{
return
saleAmt
;
}
public
void
setSaleAmt
(
Long
saleAmt
)
{
this
.
saleAmt
=
saleAmt
;
}
public
Long
getSaleCount
()
{
return
saleCount
;
}
public
void
setSaleCount
(
Long
saleCount
)
{
this
.
saleCount
=
saleCount
;
}
public
Long
getVipCount
()
{
return
vipCount
;
}
public
void
setVipCount
(
Long
vipCount
)
{
this
.
vipCount
=
vipCount
;
}
public
Long
getVipAddCount
()
{
return
vipAddCount
;
}
public
void
setVipAddCount
(
Long
vipAddCount
)
{
this
.
vipAddCount
=
vipAddCount
;
}
public
Long
getCardAmt
()
{
return
cardAmt
;
}
public
void
setCardAmt
(
Long
cardAmt
)
{
this
.
cardAmt
=
cardAmt
;
}
public
Long
getCardCount
()
{
return
cardCount
;
}
public
void
setCardCount
(
Long
cardCount
)
{
this
.
cardCount
=
cardCount
;
}
/**
* 会员总数
*/
private
Long
vipCount
=
0L
;
/**
* 新增会员数
*/
private
Long
vipAddCount
=
0L
;
/**
* 充值总金额
*/
private
Long
cardAmt
=
0L
;
/**
* 充值次数
*/
private
Long
cardCount
=
0L
;
}
app/src/main/java/com/xingdata/zzdpos/ui/statistics/StatisticsContract.java
View file @
7061a8a5
...
@@ -32,5 +32,11 @@ public interface StatisticsContract {
...
@@ -32,5 +32,11 @@ public interface StatisticsContract {
* 获取订单列表
* 获取订单列表
*/
*/
public
abstract
void
getOrderList
(
int
pageNumber
,
int
pageSize
,
long
startDate
,
long
endDate
,
OrderListFragment
orderListFragment
);
public
abstract
void
getOrderList
(
int
pageNumber
,
int
pageSize
,
long
startDate
,
long
endDate
,
OrderListFragment
orderListFragment
);
/**
* 获取统计详情
*/
public
abstract
void
getSat
();
}
}
}
}
app/src/main/java/com/xingdata/zzdpos/ui/statistics/StatisticsPresenter.java
View file @
7061a8a5
...
@@ -14,7 +14,8 @@ import com.xingdata.zzdpos.ui.statistics.fragment.OrderListFragment;
...
@@ -14,7 +14,8 @@ import com.xingdata.zzdpos.ui.statistics.fragment.OrderListFragment;
public
class
StatisticsPresenter
extends
StatisticsContract
.
Presenter
{
public
class
StatisticsPresenter
extends
StatisticsContract
.
Presenter
{
private
int
pageSize
=
20
;
private
int
pageSize
=
20
;
@Override
@Override
public
void
onAttached
()
{
public
void
onAttached
()
{
...
@@ -33,13 +34,25 @@ public class StatisticsPresenter extends StatisticsContract.Presenter {
...
@@ -33,13 +34,25 @@ public class StatisticsPresenter extends StatisticsContract.Presenter {
})
})
.
subscribe
(
orderlist
->
{
.
subscribe
(
orderlist
->
{
fragment
.
setData
(
orderlist
,
orderlist
.
isFirstPage
());
fragment
.
setData
(
orderlist
,
orderlist
.
isFirstPage
());
},
throwable
->
{
ToastUtils
.
showShort
(
throwable
.
getMessage
());
});
}
@Override
public
void
getSat
()
{
ApiFactory
.
Sat
.
queryNotice
().
doFinally
(()
->
{
})
.
subscribe
(
sat
->
{
},
throwable
->
{
},
throwable
->
{
ToastUtils
.
showShort
(
throwable
.
getMessage
());
ToastUtils
.
showShort
(
throwable
.
getMessage
());
});
});
}
}
public
void
getOrderList
(
int
pageNumber
,
long
startDate
,
long
endDate
,
OrderListFragment
fragment
)
{
public
void
getOrderList
(
int
pageNumber
,
long
startDate
,
long
endDate
,
OrderListFragment
fragment
)
{
getOrderList
(
pageNumber
,
pageSize
,
startDate
,
endDate
,
fragment
);
getOrderList
(
pageNumber
,
pageSize
,
startDate
,
endDate
,
fragment
);
}
}
}
}
app/src/main/java/com/xingdata/zzdpos/ui/statistics/fragment/StatisticsFragment.java
View file @
7061a8a5
...
@@ -32,6 +32,7 @@ public class StatisticsFragment extends BaseFragment<StatisticsPresenter, Fragme
...
@@ -32,6 +32,7 @@ public class StatisticsFragment extends BaseFragment<StatisticsPresenter, Fragme
@Override
@Override
public
void
initView
()
{
public
void
initView
()
{
mPresenter
.
getSat
();
mViewBinding
.
icTitle
.
setOnClickListener
(
new
OnClickListener
()
{
mViewBinding
.
icTitle
.
setOnClickListener
(
new
OnClickListener
()
{
@Override
@Override
protected
void
myOnClickListener
(
View
v
)
{
protected
void
myOnClickListener
(
View
v
)
{
...
...
app/src/main/res/layout/dialog_base.xml
View file @
7061a8a5
...
@@ -30,23 +30,20 @@
...
@@ -30,23 +30,20 @@
android:layout_marginTop=
"@dimen/all_padding"
android:layout_marginTop=
"@dimen/all_padding"
android:orientation=
"horizontal"
android:orientation=
"horizontal"
android:weightSum=
"2"
android:weightSum=
"2"
android:padding=
"@dimen/dp_4"
android:background=
"@color/white_caocao"
android:background=
"@color/white_caocao"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"
match_par
ent"
>
android:layout_height=
"
wrap_cont
ent"
>
<Button
<Button
android:layout_margin=
"
1dp
"
android:layout_margin=
"
@dimen/all_padding
"
android:id=
"@+id/btn_cancel"
android:id=
"@+id/btn_cancel"
style=
"@style/button_passive"
style=
"@style/button_passive"
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_weight=
"1"
android:layout_weight=
"1"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginBottom=
"@dimen/all_margin"
android:layout_marginTop=
"@dimen/all_margin"
android:stateListAnimator=
"@null"
android:stateListAnimator=
"@null"
android:text=
"@string/all_cancel"
android:text=
"@string/all_cancel"
android:textSize=
"@dimen/
dialog_button
_text_size"
android:textSize=
"@dimen/
all
_text_size"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toLeftOf=
"@id/btn_confirm"
app:layout_constraintRight_toLeftOf=
"@id/btn_confirm"
...
@@ -54,17 +51,15 @@
...
@@ -54,17 +51,15 @@
tools:targetApi=
"lollipop"
/>
tools:targetApi=
"lollipop"
/>
<Button
<Button
android:layout_margin=
"
1dp
"
android:layout_margin=
"
@dimen/all_padding
"
android:id=
"@+id/btn_confirm"
android:id=
"@+id/btn_confirm"
style=
"@style/button_positive"
style=
"@style/button_positive"
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_weight=
"1"
android:layout_weight=
"1"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginBottom=
"@dimen/all_margin"
android:layout_marginTop=
"@dimen/all_margin"
android:stateListAnimator=
"@null"
android:stateListAnimator=
"@null"
android:text=
"@string/all_confirm"
android:text=
"@string/all_confirm"
android:textSize=
"@dimen/
dialog_button
_text_size"
android:textSize=
"@dimen/
all
_text_size"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintLeft_toRightOf=
"@id/btn_cancel"
app:layout_constraintLeft_toRightOf=
"@id/btn_cancel"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
...
...
app/src/main/res/layout/dialog_handover.xml
View file @
7061a8a5
This diff is collapsed.
Click to expand it.
app/src/main/res/values/styles.xml
View file @
7061a8a5
...
@@ -125,7 +125,7 @@
...
@@ -125,7 +125,7 @@
<style
name=
"dialog_title"
>
<style
name=
"dialog_title"
>
<item
name=
"android:background"
>
@color/white
</item>
<item
name=
"android:background"
>
@color/white
</item>
<item
name=
"android:textSize"
>
@dimen/
dialog_title
_text_size
</item>
<item
name=
"android:textSize"
>
@dimen/
big
_text_size
</item>
<item
name=
"android:textColor"
>
@color/black
</item>
<item
name=
"android:textColor"
>
@color/black
</item>
<item
name=
"android:gravity"
>
center
</item>
<item
name=
"android:gravity"
>
center
</item>
<item
name=
"android:padding"
>
@dimen/dialog_padding
</item>
<item
name=
"android:padding"
>
@dimen/dialog_padding
</item>
...
...
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