Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
supplier
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王宇航
supplier
Commits
8366fd1e
Commit
8366fd1e
authored
Oct 31, 2020
by
宁斌
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into dev
parents
4cce725c
547e42b5
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
13 additions
and
160 deletions
+13
-160
base-module/src/main/java/com/gingersoft/gsa/cloud/aspectj/SingleClick.java
+0
-17
base-module/src/main/java/com/gingersoft/gsa/cloud/aspectj/SingleClickAspect.java
+0
-59
base-module/src/main/java/com/gingersoft/gsa/cloud/aspectj/SwitchPrintAspect.java
+0
-61
base-module/src/main/java/com/gingersoft/gsa/cloud/aspectj/SwitchPrintMethod.java
+0
-15
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/model/MealStandModel.java
+12
-7
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/presenter/MealStandPresenter.java
+1
-0
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/activity/SoldoutCtrlActivity.java
+0
-1
No files found.
base-module/src/main/java/com/gingersoft/gsa/cloud/aspectj/SingleClick.java
deleted
100644 → 0
View file @
4cce725c
package
com
.
gingersoft
.
gsa
.
cloud
.
aspectj
;
import
java.lang.annotation.ElementType
;
import
java.lang.annotation.Retention
;
import
java.lang.annotation.RetentionPolicy
;
import
java.lang.annotation.Target
;
/**
* Created by Wyh on 2020/2/29.
* 雙擊檢測
*/
@Retention
(
RetentionPolicy
.
RUNTIME
)
@Target
(
ElementType
.
METHOD
)
public
@interface
SingleClick
{
/* 点击间隔时间 */
long
value
()
default
1000
;
}
base-module/src/main/java/com/gingersoft/gsa/cloud/aspectj/SingleClickAspect.java
deleted
100644 → 0
View file @
4cce725c
package
com
.
gingersoft
.
gsa
.
cloud
.
aspectj
;
import
android.util.Log
;
import
android.view.View
;
import
org.aspectj.lang.ProceedingJoinPoint
;
import
org.aspectj.lang.annotation.Around
;
import
org.aspectj.lang.annotation.Aspect
;
import
org.aspectj.lang.annotation.Pointcut
;
import
org.aspectj.lang.reflect.MethodSignature
;
import
java.lang.reflect.Method
;
/**
* Created by Wyh on 2020/2/29.
*/
@Aspect
public
class
SingleClickAspect
{
private
static
final
long
DEFAULT_TIME_INTERVAL
=
5000
;
/**
* 定义切点,标记切点为所有被@SingleClick注解的方法
* 注意:这里me.baron.test.annotation.SingleClick需要替换成
* 你自己项目中SingleClick这个类的全路径哦
*/
@Pointcut
(
"execution(@com.gingersoft.gsa.cloud.aspectj.SingleClick * *(..))"
)
public
void
methodAnnotated
()
{
}
/**
* 定义一个切面方法,包裹切点方法
*/
@Around
(
"methodAnnotated()"
)
public
void
aroundJoinPoint
(
ProceedingJoinPoint
joinPoint
)
throws
Throwable
{
// 取出方法的参数
View
view
=
null
;
for
(
Object
arg
:
joinPoint
.
getArgs
())
{
if
(
arg
instanceof
View
)
{
view
=
(
View
)
arg
;
break
;
}
}
if
(
view
==
null
)
{
return
;
}
// 取出方法的注解
MethodSignature
methodSignature
=
(
MethodSignature
)
joinPoint
.
getSignature
();
Method
method
=
methodSignature
.
getMethod
();
if
(!
method
.
isAnnotationPresent
(
SingleClick
.
class
))
{
return
;
}
SingleClick
singleClick
=
method
.
getAnnotation
(
SingleClick
.
class
);
// 判断是否快速点击
if
(!
XClickUtil
.
isFastDoubleClick
(
view
,
singleClick
.
value
()))
{
// 不是快速点击,执行原方法
joinPoint
.
proceed
();
}
}
}
base-module/src/main/java/com/gingersoft/gsa/cloud/aspectj/SwitchPrintAspect.java
deleted
100644 → 0
View file @
4cce725c
package
com
.
gingersoft
.
gsa
.
cloud
.
aspectj
;
import
android.app.Dialog
;
import
android.view.View
;
import
com.gingersoft.gsa.cloud.base.R
;
import
com.gingersoft.gsa.cloud.base.utils.other.SPUtils
;
import
com.gingersoft.gsa.cloud.base.widget.DialogUtils
;
import
com.gingersoft.gsa.cloud.constans.PrintConstans
;
import
org.aspectj.lang.ProceedingJoinPoint
;
import
org.aspectj.lang.annotation.Around
;
import
org.aspectj.lang.annotation.Aspect
;
import
org.aspectj.lang.annotation.Pointcut
;
/**
* Created by Wyh on 2020/3/2.
* 組件化使用Aspect有問題。
*/
@Aspect
public
class
SwitchPrintAspect
{
/**
* 定义切点,标记切点为所有被@SwitchPrintMethod注解的方法
*/
@Pointcut
(
"execution(@com.gingersoft.gsa.cloud.aspectj.SwitchPrintMethod * *(..))"
)
public
void
methodAnnotated
()
{
}
/**
* 定义一个切面方法,包裹切点方法
*/
@Around
(
"methodAnnotated()"
)
public
void
aroundJoinPoint
(
ProceedingJoinPoint
joinPoint
)
{
// 取出方法的参数
View
view
=
null
;
for
(
Object
arg
:
joinPoint
.
getArgs
())
{
if
(
arg
instanceof
View
)
{
view
=
(
View
)
arg
;
break
;
}
}
if
(
view
==
null
||
view
.
getContext
()
==
null
)
{
return
;
}
// 顯示切換打印方式的彈窗
new
DialogUtils
(
view
.
getContext
(),
R
.
layout
.
print_select_print_method
)
{
@Override
public
void
initLayout
(
ViewHepler
hepler
,
Dialog
dialog
)
{
hepler
.
setViewClick
(
R
.
id
.
local_print
,
v
->
{
SPUtils
.
put
(
dialog
.
getContext
(),
PrintConstans
.
DEFAULT_PRINT_METHOD
,
PrintConstans
.
LOCAL_PRINT
);
dialog
.
dismiss
();
});
hepler
.
setViewClick
(
R
.
id
.
internet_print
,
v
->
{
SPUtils
.
put
(
dialog
.
getContext
(),
PrintConstans
.
DEFAULT_PRINT_METHOD
,
PrintConstans
.
IP_PRINT
);
dialog
.
dismiss
();
});
}
}.
show
();
}
}
base-module/src/main/java/com/gingersoft/gsa/cloud/aspectj/SwitchPrintMethod.java
deleted
100644 → 0
View file @
4cce725c
package
com
.
gingersoft
.
gsa
.
cloud
.
aspectj
;
import
java.lang.annotation.ElementType
;
import
java.lang.annotation.Retention
;
import
java.lang.annotation.RetentionPolicy
;
import
java.lang.annotation.Target
;
/**
* Created by Wyh on 2020/3/2.
* 切換默認打印方式
*/
@Retention
(
RetentionPolicy
.
RUNTIME
)
@Target
(
ElementType
.
METHOD
)
public
@interface
SwitchPrintMethod
{
}
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/model/MealStandModel.java
View file @
8366fd1e
...
@@ -5,6 +5,7 @@ import android.text.TextUtils;
...
@@ -5,6 +5,7 @@ import android.text.TextUtils;
import
com.gingersoft.gsa.cloud.base.common.bean.BaseResult
;
import
com.gingersoft.gsa.cloud.base.common.bean.BaseResult
;
import
com.gingersoft.gsa.cloud.base.order.bean.mealManger.MyOrderManage
;
import
com.gingersoft.gsa.cloud.base.order.bean.mealManger.MyOrderManage
;
import
com.gingersoft.gsa.cloud.base.utils.CollectionUtils
;
import
com.gingersoft.gsa.cloud.database.bean.ComboItem
;
import
com.gingersoft.gsa.cloud.database.bean.ComboItem
;
import
com.gingersoft.gsa.cloud.database.bean.Discount
;
import
com.gingersoft.gsa.cloud.database.bean.Discount
;
import
com.gingersoft.gsa.cloud.database.bean.FoodCombo
;
import
com.gingersoft.gsa.cloud.database.bean.FoodCombo
;
...
@@ -28,11 +29,15 @@ import com.jess.arms.integration.IRepositoryManager;
...
@@ -28,11 +29,15 @@ import com.jess.arms.integration.IRepositoryManager;
import
com.jess.arms.mvp.BaseModel
;
import
com.jess.arms.mvp.BaseModel
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.Comparator
;
import
java.util.List
;
import
java.util.List
;
import
javax.inject.Inject
;
import
javax.inject.Inject
;
import
io.reactivex.Observable
;
import
io.reactivex.Observable
;
import
io.reactivex.SingleObserver
;
import
io.reactivex.disposables.Disposable
;
import
io.reactivex.functions.Function
;
import
io.reactivex.functions.Function
;
import
okhttp3.RequestBody
;
import
okhttp3.RequestBody
;
...
@@ -71,6 +76,7 @@ public class MealStandModel extends BaseModel implements MealStandContract.Model
...
@@ -71,6 +76,7 @@ public class MealStandModel extends BaseModel implements MealStandContract.Model
/**
/**
* 過濾食品條件
* 過濾食品條件
* 1、過濾餐種
* 1、過濾餐種
*
* @param foodList
* @param foodList
* @param summary
* @param summary
* @return
* @return
...
@@ -78,8 +84,7 @@ public class MealStandModel extends BaseModel implements MealStandContract.Model
...
@@ -78,8 +84,7 @@ public class MealStandModel extends BaseModel implements MealStandContract.Model
public
List
<
Food
>
foodConditionFilter
(
List
<
Food
>
foodList
,
int
summary
)
{
public
List
<
Food
>
foodConditionFilter
(
List
<
Food
>
foodList
,
int
summary
)
{
String
strSummary
=
String
.
valueOf
(
summary
);
String
strSummary
=
String
.
valueOf
(
summary
);
List
<
Food
>
newFoodList
=
new
ArrayList
<>();
List
<
Food
>
newFoodList
=
new
ArrayList
<>();
for
(
int
i
=
foodList
.
size
()
-
1
;
i
>=
0
;
i
--)
{
for
(
Food
food
:
foodList
)
{
Food
food
=
foodList
.
get
(
i
);
String
foodSummary
=
food
.
getFoodSummary
();
String
foodSummary
=
food
.
getFoodSummary
();
if
(!
TextUtils
.
isEmpty
(
foodSummary
))
{
if
(!
TextUtils
.
isEmpty
(
foodSummary
))
{
String
[]
summarys
=
foodSummary
.
split
(
","
);
String
[]
summarys
=
foodSummary
.
split
(
","
);
...
@@ -96,6 +101,7 @@ public class MealStandModel extends BaseModel implements MealStandContract.Model
...
@@ -96,6 +101,7 @@ public class MealStandModel extends BaseModel implements MealStandContract.Model
/**
/**
* 過濾套餐食品條件
* 過濾套餐食品條件
* 1、過濾餐種
* 1、過濾餐種
*
* @param comboItemList
* @param comboItemList
* @param summary
* @param summary
* @return
* @return
...
@@ -103,8 +109,7 @@ public class MealStandModel extends BaseModel implements MealStandContract.Model
...
@@ -103,8 +109,7 @@ public class MealStandModel extends BaseModel implements MealStandContract.Model
public
List
<
ComboItem
>
comboConditionFilter
(
List
<
ComboItem
>
comboItemList
,
int
summary
)
{
public
List
<
ComboItem
>
comboConditionFilter
(
List
<
ComboItem
>
comboItemList
,
int
summary
)
{
String
strSummary
=
String
.
valueOf
(
summary
);
String
strSummary
=
String
.
valueOf
(
summary
);
List
<
ComboItem
>
newComboItemList
=
new
ArrayList
<>();
List
<
ComboItem
>
newComboItemList
=
new
ArrayList
<>();
for
(
int
i
=
comboItemList
.
size
()
-
1
;
i
>=
0
;
i
--)
{
for
(
ComboItem
comboItem
:
comboItemList
)
{
ComboItem
comboItem
=
comboItemList
.
get
(
i
);
String
foodSummary
=
comboItem
.
getFoodSummary
();
String
foodSummary
=
comboItem
.
getFoodSummary
();
if
(!
TextUtils
.
isEmpty
(
foodSummary
))
{
if
(!
TextUtils
.
isEmpty
(
foodSummary
))
{
String
[]
summarys
=
foodSummary
.
split
(
","
);
String
[]
summarys
=
foodSummary
.
split
(
","
);
...
@@ -130,7 +135,7 @@ public class MealStandModel extends BaseModel implements MealStandContract.Model
...
@@ -130,7 +135,7 @@ public class MealStandModel extends BaseModel implements MealStandContract.Model
FoodDaoUtils
foodDaoUtils
=
new
FoodDaoUtils
(
mApplication
);
FoodDaoUtils
foodDaoUtils
=
new
FoodDaoUtils
(
mApplication
);
List
<
Food
>
foods
=
foodDaoUtils
.
queryFoodGroupByQueryBuilder
(
foodSummary
);
List
<
Food
>
foods
=
foodDaoUtils
.
queryFoodGroupByQueryBuilder
(
foodSummary
);
// return foods;
// return foods;
return
foodConditionFilter
(
foods
,
foodSummary
);
return
foodConditionFilter
(
foods
,
foodSummary
);
}
}
@Override
@Override
...
@@ -138,7 +143,7 @@ public class MealStandModel extends BaseModel implements MealStandContract.Model
...
@@ -138,7 +143,7 @@ public class MealStandModel extends BaseModel implements MealStandContract.Model
FoodDaoUtils
foodDaoUtils
=
new
FoodDaoUtils
(
mApplication
);
FoodDaoUtils
foodDaoUtils
=
new
FoodDaoUtils
(
mApplication
);
List
<
Food
>
foods
=
foodDaoUtils
.
queryFoodByQueryBuilder
(
parentId
,
foodSummary
);
List
<
Food
>
foods
=
foodDaoUtils
.
queryFoodByQueryBuilder
(
parentId
,
foodSummary
);
// return foods;
// return foods;
return
foodConditionFilter
(
foods
,
foodSummary
);
return
foodConditionFilter
(
foods
,
foodSummary
);
}
}
...
@@ -153,7 +158,7 @@ public class MealStandModel extends BaseModel implements MealStandContract.Model
...
@@ -153,7 +158,7 @@ public class MealStandModel extends BaseModel implements MealStandContract.Model
ComboItemDaoUtils
comboItemDao
=
new
ComboItemDaoUtils
(
mApplication
);
ComboItemDaoUtils
comboItemDao
=
new
ComboItemDaoUtils
(
mApplication
);
List
<
ComboItem
>
foodCombos
=
comboItemDao
.
queryComboItemsByFidQueryBuilder
(
fid
,
foodSummary
);
List
<
ComboItem
>
foodCombos
=
comboItemDao
.
queryComboItemsByFidQueryBuilder
(
fid
,
foodSummary
);
// return foodCombos;
// return foodCombos;
return
comboConditionFilter
(
foodCombos
,
foodSummary
);
return
comboConditionFilter
(
foodCombos
,
foodSummary
);
}
}
@Override
@Override
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/presenter/MealStandPresenter.java
View file @
8366fd1e
...
@@ -170,6 +170,7 @@ public class MealStandPresenter extends BaseOrderPresenter<MealStandContract.Mod
...
@@ -170,6 +170,7 @@ public class MealStandPresenter extends BaseOrderPresenter<MealStandContract.Mod
Food
defalutFoodGroup
=
getDefalutFoodGroup
(
mFoodGroupList
);
Food
defalutFoodGroup
=
getDefalutFoodGroup
(
mFoodGroupList
);
if
(
defalutFoodGroup
!=
null
)
{
if
(
defalutFoodGroup
!=
null
)
{
//默認選中第一組
//默認選中第一組
defalutFoodGroup
.
setSelected
(
true
);
defalutFoodGroup
.
setSelected
(
true
);
}
}
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/activity/SoldoutCtrlActivity.java
View file @
8366fd1e
...
@@ -233,7 +233,6 @@ public class SoldoutCtrlActivity extends BaseFragmentActivity<SoldoutCtrlPresent
...
@@ -233,7 +233,6 @@ public class SoldoutCtrlActivity extends BaseFragmentActivity<SoldoutCtrlPresent
//总的页数向上取整
//总的页数向上取整
totalPage
=
(
int
)
Math
.
ceil
(
foodGroupList
.
size
()
*
1.0
/
GoldConstants
.
foodGriupPageSize
);
totalPage
=
(
int
)
Math
.
ceil
(
foodGroupList
.
size
()
*
1.0
/
GoldConstants
.
foodGriupPageSize
);
int
Rows
=
foodGroupRow
;
int
Rows
=
foodGroupRow
;
if
(
foodGroupList
.
size
()
<=
foodGroupColumn
)
{
if
(
foodGroupList
.
size
()
<=
foodGroupColumn
)
{
Rows
=
1
;
Rows
=
1
;
...
...
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