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
882c18fd
Commit
882c18fd
authored
Mar 20, 2018
by
姜敏
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
5c0ef2a3
05137101
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
60 additions
and
14 deletions
+60
-14
app/src/main/java/com/xingdata/zzdpos/api/ApiFactory.java
app/src/main/java/com/xingdata/zzdpos/api/ApiFactory.java
+7
-1
app/src/main/java/com/xingdata/zzdpos/model/Saleorder.java
app/src/main/java/com/xingdata/zzdpos/model/Saleorder.java
+4
-2
app/src/main/java/com/xingdata/zzdpos/model/Ticket.java
app/src/main/java/com/xingdata/zzdpos/model/Ticket.java
+1
-3
app/src/main/java/com/xingdata/zzdpos/ui/manage/sssku/SsskuPresenter.java
...a/com/xingdata/zzdpos/ui/manage/sssku/SsskuPresenter.java
+9
-0
app/src/main/java/com/xingdata/zzdpos/ui/statistics/fragment/StatisticsTitleFragment.java
...zdpos/ui/statistics/fragment/StatisticsTitleFragment.java
+1
-1
app/src/main/java/com/xingdata/zzdpos/ui/statistics/fragment/order/OrderMainFragment.java
...zdpos/ui/statistics/fragment/order/OrderMainFragment.java
+38
-7
No files found.
app/src/main/java/com/xingdata/zzdpos/api/ApiFactory.java
View file @
882c18fd
...
@@ -540,7 +540,13 @@ public final class ApiFactory {
...
@@ -540,7 +540,13 @@ public final class ApiFactory {
}
}
public
static
Observable
<
Pager
<
com
.
xingdata
.
zzdpos
.
model
.
Sssku
>>
querySssku
(
String
wd
)
{
public
static
Observable
<
Pager
<
com
.
xingdata
.
zzdpos
.
model
.
Sssku
>>
querySssku
(
String
wd
)
{
return
run
(
Api
.
getInstance
().
service
.
querySssku
(
wd
));
String
mWd
;
try
{
mWd
=
String
.
valueOf
(
Long
.
valueOf
(
wd
));
}
catch
(
NumberFormatException
e
)
{
mWd
=
wd
;
}
return
run
(
Api
.
getInstance
().
service
.
querySssku
(
mWd
));
}
}
public
static
Observable
<
Pager
<
com
.
xingdata
.
zzdpos
.
model
.
Sssku
>>
querySssku
(
int
pageNum
,
String
keyword
)
{
public
static
Observable
<
Pager
<
com
.
xingdata
.
zzdpos
.
model
.
Sssku
>>
querySssku
(
int
pageNum
,
String
keyword
)
{
...
...
app/src/main/java/com/xingdata/zzdpos/model/Saleorder.java
View file @
882c18fd
...
@@ -390,7 +390,9 @@ public class Saleorder extends SectionEntity<MediaStore.Video> implements BaseMo
...
@@ -390,7 +390,9 @@ public class Saleorder extends SectionEntity<MediaStore.Video> implements BaseMo
this
.
orderPayAmt
-=
this
.
msDisAmt
;
this
.
orderPayAmt
-=
this
.
msDisAmt
;
//优惠券
//优惠券
if
(
ticket
!=
null
&&
ticket
.
getTruleOrderAmt
()
>
getOrderPayAmt
())
this
.
ticket
=
null
;
if
(
ticket
!=
null
&&
(
ticket
.
getTruleOrderAmt
()
>
getOrderPayAmt
()
||
ticket
.
getTicketNo
()
==
-
1
))
{
this
.
ticket
=
null
;
}
this
.
ticketId
=
ticket
==
null
?
-
1L
:
ticket
.
getId
();
this
.
ticketId
=
ticket
==
null
?
-
1L
:
ticket
.
getId
();
this
.
ticketAmt
=
ticket
==
null
?
0L
:
ticket
.
getTicketValAmt
();
this
.
ticketAmt
=
ticket
==
null
?
0L
:
ticket
.
getTicketValAmt
();
this
.
ticketNum
=
ticket
==
null
?
(
byte
)
0
:
(
byte
)
1
;
this
.
ticketNum
=
ticket
==
null
?
(
byte
)
0
:
(
byte
)
1
;
...
@@ -1009,7 +1011,7 @@ public class Saleorder extends SectionEntity<MediaStore.Video> implements BaseMo
...
@@ -1009,7 +1011,7 @@ public class Saleorder extends SectionEntity<MediaStore.Video> implements BaseMo
@Override
@Override
public
String
getDRAW_URL
()
{
public
String
getDRAW_URL
()
{
return
"http://tk.demo.xingdata.com/wx/jump.html?sid="
+
LoginPresenter
.
loginReturnBean
.
getShopMapId
()
;
return
"http://tk.demo.xingdata.com/wx/jump.html?sid="
+
LoginPresenter
.
loginReturnBean
.
getShopMapId
();
}
}
@Override
@Override
...
...
app/src/main/java/com/xingdata/zzdpos/model/Ticket.java
View file @
882c18fd
...
@@ -38,9 +38,7 @@ public class Ticket extends SectionEntity<MediaStore.Video> implements BaseBean
...
@@ -38,9 +38,7 @@ public class Ticket extends SectionEntity<MediaStore.Video> implements BaseBean
* @return 默认优惠券
* @return 默认优惠券
*/
*/
public
static
Ticket
defualt
()
{
public
static
Ticket
defualt
()
{
Ticket
ticket
=
new
Ticket
(-
1L
);
return
new
Ticket
(-
1L
);
ticket
.
ticketValAmt
=
0L
;
return
ticket
;
}
}
@Deprecated
@Deprecated
...
...
app/src/main/java/com/xingdata/zzdpos/ui/manage/sssku/SsskuPresenter.java
View file @
882c18fd
...
@@ -133,6 +133,7 @@ public class SsskuPresenter extends SsskuContract.Presenter {
...
@@ -133,6 +133,7 @@ public class SsskuPresenter extends SsskuContract.Presenter {
mView
.
showDetailFragment
(
sssku1
);
mView
.
showDetailFragment
(
sssku1
);
},
},
throwable
->
{
throwable
->
{
mView
.
showMsg
(
throwable
.
getMessage
());
})
})
);
);
break
;
break
;
...
@@ -172,6 +173,7 @@ public class SsskuPresenter extends SsskuContract.Presenter {
...
@@ -172,6 +173,7 @@ public class SsskuPresenter extends SsskuContract.Presenter {
mView
.
dismissAllDialog
();
mView
.
dismissAllDialog
();
this
.
getSkugrp
();
this
.
getSkugrp
();
},
throwable
->
{
},
throwable
->
{
mView
.
showMsg
(
throwable
.
getMessage
());
})
})
);
);
}
}
...
@@ -192,6 +194,7 @@ public class SsskuPresenter extends SsskuContract.Presenter {
...
@@ -192,6 +194,7 @@ public class SsskuPresenter extends SsskuContract.Presenter {
mView
.
dismissAllDialog
();
mView
.
dismissAllDialog
();
this
.
getSkugrp
();
this
.
getSkugrp
();
},
throwable
->
{
},
throwable
->
{
mView
.
showMsg
(
throwable
.
getMessage
());
})
})
);
);
}
}
...
@@ -208,6 +211,7 @@ public class SsskuPresenter extends SsskuContract.Presenter {
...
@@ -208,6 +211,7 @@ public class SsskuPresenter extends SsskuContract.Presenter {
mView
.
dismissAllDialog
();
mView
.
dismissAllDialog
();
this
.
getSkugrp
();
this
.
getSkugrp
();
},
throwable
->
{
},
throwable
->
{
mView
.
showMsg
(
throwable
.
getMessage
());
})
})
);
);
}
}
...
@@ -305,6 +309,7 @@ public class SsskuPresenter extends SsskuContract.Presenter {
...
@@ -305,6 +309,7 @@ public class SsskuPresenter extends SsskuContract.Presenter {
mView
.
loadSsskuCount
(
ssskuPager
.
getTotalRow
());
mView
.
loadSsskuCount
(
ssskuPager
.
getTotalRow
());
mView
.
loadSkus
(
ssskuPager
,
mPageNum
==
1
);
mView
.
loadSkus
(
ssskuPager
,
mPageNum
==
1
);
},
throwable
->
{
},
throwable
->
{
mView
.
showMsg
(
throwable
.
getMessage
());
})
})
);
);
}
}
...
@@ -318,6 +323,7 @@ public class SsskuPresenter extends SsskuContract.Presenter {
...
@@ -318,6 +323,7 @@ public class SsskuPresenter extends SsskuContract.Presenter {
ApiFactory
.
Sssku
.
querySssku
(
mSearchPageNum
,
mKeyword
)
ApiFactory
.
Sssku
.
querySssku
(
mSearchPageNum
,
mKeyword
)
.
doOnSubscribe
(
subscription
->
mView
.
dismissLoadingDialog
())
.
doOnSubscribe
(
subscription
->
mView
.
dismissLoadingDialog
())
.
subscribe
(
ssskuPager
->
mView
.
loadSearchResult
(
ssskuPager
,
mSearchPageNum
==
1
),
throwable
->
{
.
subscribe
(
ssskuPager
->
mView
.
loadSearchResult
(
ssskuPager
,
mSearchPageNum
==
1
),
throwable
->
{
mView
.
showMsg
(
throwable
.
getMessage
());
})
})
);
);
}
}
...
@@ -330,6 +336,7 @@ public class SsskuPresenter extends SsskuContract.Presenter {
...
@@ -330,6 +336,7 @@ public class SsskuPresenter extends SsskuContract.Presenter {
ApiFactory
.
Sskugrp
.
querySskugrp
().
subscribe
(
sskugrpPager
->
{
ApiFactory
.
Sskugrp
.
querySskugrp
().
subscribe
(
sskugrpPager
->
{
mView
.
loadSkugrps
(
sskugrpPager
.
getList
());
mView
.
loadSkugrps
(
sskugrpPager
.
getList
());
},
throwable
->
{
},
throwable
->
{
mView
.
showMsg
(
throwable
.
getMessage
());
}
}
)
)
);
);
...
@@ -341,6 +348,7 @@ public class SsskuPresenter extends SsskuContract.Presenter {
...
@@ -341,6 +348,7 @@ public class SsskuPresenter extends SsskuContract.Presenter {
private
void
getReplenish
()
{
private
void
getReplenish
()
{
mCompositeDisposable
.
add
(
mCompositeDisposable
.
add
(
ApiFactory
.
Psb
.
preOrder
().
subscribe
(
ssskuPager
->
mView
.
loadReplenishCount
(
ssskuPager
.
getTotalRow
()),
throwable
->
{
ApiFactory
.
Psb
.
preOrder
().
subscribe
(
ssskuPager
->
mView
.
loadReplenishCount
(
ssskuPager
.
getTotalRow
()),
throwable
->
{
mView
.
showMsg
(
throwable
.
getMessage
());
})
})
);
);
}
}
...
@@ -351,6 +359,7 @@ public class SsskuPresenter extends SsskuContract.Presenter {
...
@@ -351,6 +359,7 @@ public class SsskuPresenter extends SsskuContract.Presenter {
private
void
getCor
()
{
private
void
getCor
()
{
mCompositeDisposable
.
add
(
mCompositeDisposable
.
add
(
ApiFactory
.
Cor
.
queryAll
().
subscribe
(
cors
->
mView
.
loadCors
(
cors
),
throwable
->
{
ApiFactory
.
Cor
.
queryAll
().
subscribe
(
cors
->
mView
.
loadCors
(
cors
),
throwable
->
{
mView
.
showMsg
(
throwable
.
getMessage
());
})
})
);
);
}
}
...
...
app/src/main/java/com/xingdata/zzdpos/ui/statistics/fragment/StatisticsTitleFragment.java
View file @
882c18fd
...
@@ -196,6 +196,6 @@ public class StatisticsTitleFragment extends BaseFragment<StatisticsPresenter, F
...
@@ -196,6 +196,6 @@ public class StatisticsTitleFragment extends BaseFragment<StatisticsPresenter, F
}
}
public
void
getSmtListSucc
(
Pager
<
Smt
>
smtPager
)
{
public
void
getSmtListSucc
(
Pager
<
Smt
>
smtPager
)
{
mOrderMainFragment
.
getSmtListSucc
(
smtPager
);
mOrderMainFragment
.
getSmtListSucc
(
smtPager
);
}
}
}
}
app/src/main/java/com/xingdata/zzdpos/ui/statistics/fragment/order/OrderMainFragment.java
View file @
882c18fd
...
@@ -4,10 +4,15 @@ package com.xingdata.zzdpos.ui.statistics.fragment.order;
...
@@ -4,10 +4,15 @@ package com.xingdata.zzdpos.ui.statistics.fragment.order;
import
android.content.Intent
;
import
android.content.Intent
;
import
android.databinding.DataBindingUtil
;
import
android.databinding.DataBindingUtil
;
import
android.graphics.Typeface
;
import
android.graphics.Typeface
;
import
android.os.Bundle
;
import
android.support.annotation.NonNull
;
import
android.support.annotation.Nullable
;
import
android.support.design.widget.TabLayout
;
import
android.support.design.widget.TabLayout
;
import
android.support.v4.app.Fragment
;
import
android.support.v4.app.Fragment
;
import
android.view.KeyEvent
;
import
android.view.KeyEvent
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.widget.TextView
;
import
android.widget.TextView
;
import
com.blankj.utilcode.util.TimeUtils
;
import
com.blankj.utilcode.util.TimeUtils
;
...
@@ -47,6 +52,7 @@ public class OrderMainFragment extends BaseFragment<StatisticsPresenter, Fragmen
...
@@ -47,6 +52,7 @@ public class OrderMainFragment extends BaseFragment<StatisticsPresenter, Fragmen
private
List
<
Long
>
dateLongs
=
new
ArrayList
<>();
private
List
<
Long
>
dateLongs
=
new
ArrayList
<>();
private
List
<
Fragment
>
fragments
=
new
ArrayList
<>();
private
List
<
Fragment
>
fragments
=
new
ArrayList
<>();
private
int
month
;
private
int
month
;
private
String
string
=
""
;
@Override
@Override
public
int
getLayoutId
()
{
public
int
getLayoutId
()
{
...
@@ -73,6 +79,19 @@ public class OrderMainFragment extends BaseFragment<StatisticsPresenter, Fragmen
...
@@ -73,6 +79,19 @@ public class OrderMainFragment extends BaseFragment<StatisticsPresenter, Fragmen
}
}
@Nullable
@Override
public
View
onCreateView
(
@NonNull
LayoutInflater
inflater
,
ViewGroup
container
,
Bundle
savedInstanceState
)
{
return
super
.
onCreateView
(
inflater
,
container
,
savedInstanceState
);
}
@Override
public
void
onStart
()
{
mViewBinding
.
edTitle
.
setText
(
string
);
super
.
onStart
();
}
public
void
initViewPager
(
Integer
monthEnd
)
{
public
void
initViewPager
(
Integer
monthEnd
)
{
if
(
fragments
.
size
()
==
0
)
{
if
(
fragments
.
size
()
==
0
)
{
Observable
.
create
(
new
ObservableOnSubscribe
<
String
>()
{
Observable
.
create
(
new
ObservableOnSubscribe
<
String
>()
{
...
@@ -137,6 +156,7 @@ public class OrderMainFragment extends BaseFragment<StatisticsPresenter, Fragmen
...
@@ -137,6 +156,7 @@ public class OrderMainFragment extends BaseFragment<StatisticsPresenter, Fragmen
}
}
private
void
initTab
()
{
private
void
initTab
()
{
mFragmentStateAdapter
=
new
FragmentStateAdapter
(
fragments
,
getChildFragmentManager
());
mFragmentStateAdapter
=
new
FragmentStateAdapter
(
fragments
,
getChildFragmentManager
());
mViewBinding
.
viewPagerData
.
setAdapter
(
mFragmentStateAdapter
);
mViewBinding
.
viewPagerData
.
setAdapter
(
mFragmentStateAdapter
);
...
@@ -190,6 +210,24 @@ public class OrderMainFragment extends BaseFragment<StatisticsPresenter, Fragmen
...
@@ -190,6 +210,24 @@ public class OrderMainFragment extends BaseFragment<StatisticsPresenter, Fragmen
}
}
@Override
public
void
onStop
()
{
string
=
mViewBinding
.
edTitle
.
getText
().
toString
();
super
.
onStop
();
}
@Override
public
void
onDestroy
()
{
string
=
""
;
super
.
onDestroy
();
}
@Override
public
void
onDestroyView
()
{
super
.
onDestroyView
();
}
public
void
getSmtListSucc
(
Pager
<
Smt
>
smtPager
)
{
public
void
getSmtListSucc
(
Pager
<
Smt
>
smtPager
)
{
int
size
=
smtPager
.
getList
().
size
();
int
size
=
smtPager
.
getList
().
size
();
...
@@ -207,11 +245,4 @@ public class OrderMainFragment extends BaseFragment<StatisticsPresenter, Fragmen
...
@@ -207,11 +245,4 @@ public class OrderMainFragment extends BaseFragment<StatisticsPresenter, Fragmen
}
}
@Override
public
void
onStop
()
{
mViewBinding
.
edTitle
.
setText
(
""
);
super
.
onStop
();
}
}
}
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