Commit 7061a8a5 authored by 陈前's avatar 陈前

统计订单~~

parent 8c7684aa
......@@ -49,6 +49,11 @@ public class C {
public static final String synchronousDown = PKG + "downLoad/downLoad";
}
public final class STA {
public static final String statistics = PKG + "downLoad/getTodayCount";
}
public final class SMS {
/**
* 注册发送短信验证码
......
......@@ -248,7 +248,6 @@ public final class ApiFactory {
}
/**
* 销售订单查询接口
*
......@@ -257,12 +256,13 @@ public final class ApiFactory {
* @return
*/
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,
endDate).onErrorReturn(new
ErrorFilter<>()).map(new ResultFilter<>()).subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread());
}
/**
* 获取订单详情
*
......@@ -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 {
......
......@@ -172,6 +172,9 @@ interface ApiService {
Observable<HttpMessage<Pager<Notice>>> queryNotice(@Query("pageNumber") int pageNum, @Query
("pageSize") int pageSize);
@POST(C.URL.STA.statistics)
Observable<HttpMessage<ApiFactory.Sat>> querySat();
@POST(C.URL.PSB.queryDetail)
Observable<HttpMessage<Psb>> queryPsbDetail(@Query("psbNo") String psbNo, @Query("id") long id);
......
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;
}
......@@ -32,5 +32,11 @@ public interface StatisticsContract {
* 获取订单列表
*/
public abstract void getOrderList(int pageNumber, int pageSize, long startDate, long endDate, OrderListFragment orderListFragment);
/**
* 获取统计详情
*/
public abstract void getSat();
}
}
......@@ -14,7 +14,8 @@ import com.xingdata.zzdpos.ui.statistics.fragment.OrderListFragment;
public class StatisticsPresenter extends StatisticsContract.Presenter {
private int pageSize=20;
private int pageSize = 20;
@Override
public void onAttached() {
......@@ -33,13 +34,25 @@ public class StatisticsPresenter extends StatisticsContract.Presenter {
})
.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 -> {
ToastUtils.showShort(throwable.getMessage());
});
}
public void getOrderList(int pageNumber, long startDate, long endDate,OrderListFragment fragment) {
getOrderList(pageNumber,pageSize,startDate,endDate,fragment);
public void getOrderList(int pageNumber, long startDate, long endDate, OrderListFragment fragment) {
getOrderList(pageNumber, pageSize, startDate, endDate, fragment);
}
}
......@@ -32,6 +32,7 @@ public class StatisticsFragment extends BaseFragment<StatisticsPresenter, Fragme
@Override
public void initView() {
mPresenter.getSat();
mViewBinding.icTitle.setOnClickListener(new OnClickListener() {
@Override
protected void myOnClickListener(View v) {
......
......@@ -30,23 +30,20 @@
android:layout_marginTop="@dimen/all_padding"
android:orientation="horizontal"
android:weightSum="2"
android:padding="@dimen/dp_4"
android:background="@color/white_caocao"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="wrap_content">
<Button
android:layout_margin="1dp"
android:layout_margin="@dimen/all_padding"
android:id="@+id/btn_cancel"
style="@style/button_passive"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/all_margin"
android:layout_marginTop="@dimen/all_margin"
android:stateListAnimator="@null"
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_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toLeftOf="@id/btn_confirm"
......@@ -54,17 +51,15 @@
tools:targetApi="lollipop" />
<Button
android:layout_margin="1dp"
android:layout_margin="@dimen/all_padding"
android:id="@+id/btn_confirm"
style="@style/button_positive"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/all_margin"
android:layout_marginTop="@dimen/all_margin"
android:stateListAnimator="@null"
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_constraintLeft_toRightOf="@id/btn_cancel"
app:layout_constraintRight_toRightOf="parent"
......
......@@ -39,210 +39,224 @@
</data>
<android.support.constraint.ConstraintLayout
android:id="@+id/cl_default"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white_caocao"
android:padding="0dp">
<android.support.constraint.ConstraintLayout
android:id="@+id/cl_default"
<TextView
android:id="@+id/handover_tv_sumamt"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:singleLine="true"
android:text="¥9999"
android:textColor="@color/red900"
android:textSize="@dimen/all_text_size_big"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/handover_tv_sumamt_hint" />
<TextView
android:id="@+id/handover_tv_sumamt_hint"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:paddingBottom="@dimen/all_padding"
android:paddingTop="@dimen/all_margin"
android:text="实收金额"
android:textColor="@color/black_baozheng"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<View
android:id="@+id/view1"
android:layout_width="match_parent"
android:layout_height="@dimen/view_line_L1"
android:layout_marginTop="@dimen/all_margin"
android:background="@color/gray_zhouyu"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/handover_tv_sumamt" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white_caocao"
android:padding="0dp">
android:orientation="horizontal"
android:paddingBottom="@dimen/all_padding"
android:paddingEnd="@dimen/dp_4"
android:paddingStart="@dimen/dp_4"
android:paddingTop="@dimen/dp_4"
android:weightSum="2"
app:layout_constraintTop_toBottomOf="@id/view1">
<LinearLayout
<TextView
android:id="@+id/handover_tv_sumamt"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:singleLine="true"
android:text="¥9999"
android:textColor="@color/red900"
android:textSize="@dimen/big_text_size"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/handover_tv_sumamt_hint" />
<TextView
android:id="@+id/handover_tv_sumamt_hint"
android:paddingTop="@dimen/all_margin"
android:paddingBottom="@dimen/all_padding"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="实收金额"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/small_text_size"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<View
android:id="@+id/view1"
android:layout_width="match_parent"
android:layout_height="@dimen/view_line_L1"
android:layout_marginTop="@dimen/all_margin"
android:background="@color/gray_zhouyu"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/handover_tv_sumamt" />
android:layout_weight="1"
android:orientation="vertical">
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:text="@string/handover_date"
android:textSize="@dimen/small_text_size" />
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:text="@string/handover_oper"
android:textSize="@dimen/small_text_size" />
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:text="@string/handover_orderNum"
android:textSize="@dimen/small_text_size" />
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:text="@string/handover_cash"
android:textSize="@dimen/small_text_size" />
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:text="@string/handover_wechat"
android:textSize="@dimen/small_text_size" />
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:text="@string/handover_alipay"
android:textSize="@dimen/small_text_size" />
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:text="@string/handover_bank"
android:textSize="@dimen/small_text_size" />
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:text="@string/handover_vip"
android:textSize="@dimen/small_text_size" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingTop="@dimen/dp_4"
android:paddingStart="@dimen/dp_4"
android:paddingEnd="@dimen/dp_4"
android:paddingBottom="@dimen/all_padding"
android:weightSum="2"
app:layout_constraintTop_toBottomOf="@id/view1">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical">
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:text="@string/handover_date" />
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:text="@string/handover_oper" />
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:text="@string/handover_orderNum" />
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:text="@string/handover_cash" />
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:text="@string/handover_wechat" />
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:text="@string/handover_alipay" />
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:text="@string/handover_bank" />
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:text="@string/handover_vip" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_weight="1"
android:gravity="right"
android:orientation="vertical">
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:singleLine="true"
android:text="@{date}"
android:textColor="@color/black_likui"
android:textSize="@dimen/small_text_size" />
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:singleLine="true"
android:text="@{operName}"
android:textColor="@color/black_likui"
android:textSize="@dimen/small_text_size" />
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:singleLine="true"
android:text="@{orderNum}"
android:textColor="@color/black_likui"
android:textSize="@dimen/small_text_size" />
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:singleLine="true"
android:text="@{cash}"
android:textColor="@color/black_likui"
android:textSize="@dimen/small_text_size" />
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:singleLine="true"
android:text="@{wechat}"
android:textColor="@color/black_likui"
android:textSize="@dimen/small_text_size" />
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:singleLine="true"
android:text="@{alipay}"
android:textColor="@color/black_likui"
android:textSize="@dimen/small_text_size" />
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:singleLine="true"
android:text="@{bank}"
android:textColor="@color/black_likui"
android:textSize="@dimen/small_text_size" />
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:orientation="vertical">
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:singleLine="true"
android:text="@{date}"
android:textColor="@color/black_likui" />
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:singleLine="true"
android:text="@{operName}"
android:textColor="@color/black_likui" />
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:singleLine="true"
android:text="@{orderNum}"
android:textColor="@color/black_likui" />
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:singleLine="true"
android:text="@{cash}"
android:textColor="@color/black_likui" />
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:singleLine="true"
android:text="@{wechat}"
android:textColor="@color/black_likui" />
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:singleLine="true"
android:text="@{alipay}"
android:textColor="@color/black_likui" />
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:singleLine="true"
android:text="@{bank}"
android:textColor="@color/black_likui" />
<TextView
style="@style/textView_body_small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:singleLine="true"
android:text="@{vipPay}"
android:textColor="@color/black_likui" />
</LinearLayout>
android:singleLine="true"
android:text="@{vipPay}"
android:textColor="@color/black_likui"
android:textSize="@dimen/small_text_size" />
</LinearLayout>
</LinearLayout>
</android.support.constraint.ConstraintLayout>
</android.support.constraint.ConstraintLayout>
</layout>
\ No newline at end of file
......@@ -125,7 +125,7 @@
<style name="dialog_title">
<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:gravity">center</item>
<item name="android:padding">@dimen/dialog_padding</item>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment