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
cc2bb8ac
Commit
cc2bb8ac
authored
Oct 14, 2020
by
宁斌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1、食品組 食品 細項 折扣寬高行列字體大小可配置
parent
f142c320
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
36 changed files
with
639 additions
and
655 deletions
+639
-655
base-module/src/main/java/com/gingersoft/gsa/cloud/base/Api.java
+2
-0
base-module/src/main/java/com/gingersoft/gsa/cloud/base/application/GsaCloudApplication.java
+4
-0
base-module/src/main/java/com/gingersoft/gsa/cloud/base/utils/RestaurantExpandInfoUtils.java
+70
-36
base-module/src/main/java/com/gingersoft/gsa/cloud/bean/RestaurantExpandInfo.java
+47
-75
base-module/src/main/java/com/gingersoft/gsa/cloud/constans/GoldConstants.java
+7
-7
base-module/src/main/java/com/gingersoft/gsa/cloud/database/bean/ColorBean.java
+98
-0
base-module/src/main/java/com/gingersoft/gsa/cloud/database/bean/ExpandInfo.java
+34
-63
base-module/src/main/java/com/gingersoft/gsa/cloud/database/bean/Food.java
+0
-271
base-module/src/main/java/com/gingersoft/gsa/cloud/database/greendao/DaoMaster.java
+3
-0
base-module/src/main/java/com/gingersoft/gsa/cloud/database/greendao/DaoSession.java
+14
-0
base-module/src/main/java/com/gingersoft/gsa/cloud/database/greendao/ExpandInfoDao.java
+2
-22
base-module/src/main/java/com/gingersoft/gsa/cloud/database/utils/ColorDaoUtils.java
+155
-0
config.gradle
+2
-2
download-module/src/main/java/com/gingersoft/gsa/cloud/download/mvp/contract/DownloadContract.java
+2
-0
download-module/src/main/java/com/gingersoft/gsa/cloud/download/mvp/model/DownloadModel.java
+7
-0
download-module/src/main/java/com/gingersoft/gsa/cloud/download/mvp/model/downmanager/DownloadManager.java
+21
-40
download-module/src/main/java/com/gingersoft/gsa/cloud/download/mvp/model/downmanager/DownloadRequest.java
+0
-1
download-module/src/main/java/com/gingersoft/gsa/cloud/download/mvp/model/downmanager/DownloadTaskImp.java
+35
-30
download-module/src/main/java/com/gingersoft/gsa/cloud/download/mvp/model/service/DownloadService.java
+3
-0
download-module/src/main/java/com/gingersoft/gsa/cloud/download/mvp/presenter/DownloadPresenter.java
+0
-0
main-module/src/main/java/com/gingersoft/gsa/cloud/main/mvp/ui/activity/ExpandListActivity.java
+1
-1
table-module/src/main/java/com/gingersoft/gsa/cloud/bean/mvp/presenter/BaseOrderPresenter.java
+1
-1
table-module/src/main/java/com/gingersoft/gsa/cloud/bean/mvp/presenter/MealStandPresenter.java
+4
-1
table-module/src/main/java/com/gingersoft/gsa/cloud/bean/mvp/presenter/OrderContentPresenter.java
+8
-0
table-module/src/main/java/com/gingersoft/gsa/cloud/bean/mvp/ui/activity/MealStandActivity.java
+53
-14
table-module/src/main/java/com/gingersoft/gsa/cloud/bean/mvp/ui/activity/OrderContentActivity.java
+1
-1
table-module/src/main/java/com/gingersoft/gsa/cloud/bean/mvp/ui/activity/SoldoutCtrlActivity.java
+14
-16
table-module/src/main/java/com/gingersoft/gsa/cloud/bean/mvp/ui/adapter/CurrentSlodoutFoodAdapter.java
+5
-7
table-module/src/main/java/com/gingersoft/gsa/cloud/bean/mvp/ui/adapter/FineItemOneAdapter.java
+5
-5
table-module/src/main/java/com/gingersoft/gsa/cloud/bean/mvp/ui/adapter/FineItemTwoAdapter.java
+5
-5
table-module/src/main/java/com/gingersoft/gsa/cloud/bean/mvp/ui/adapter/meal/ComboAdapter.java
+5
-5
table-module/src/main/java/com/gingersoft/gsa/cloud/bean/mvp/ui/adapter/meal/DiscountAdapter.java
+11
-10
table-module/src/main/java/com/gingersoft/gsa/cloud/bean/mvp/ui/adapter/meal/FoodAdapter.java
+7
-17
table-module/src/main/java/com/gingersoft/gsa/cloud/bean/mvp/ui/adapter/meal/FoodGroupAdapter.java
+7
-15
table-module/src/main/java/com/gingersoft/gsa/cloud/bean/mvp/ui/adapter/meal/ModifierAdapter.java
+5
-9
table-module/src/main/java/com/gingersoft/gsa/cloud/bean/mvp/ui/fragment/FineItemAllFragment.java
+1
-1
No files found.
base-module/src/main/java/com/gingersoft/gsa/cloud/base/Api.java
View file @
cc2bb8ac
...
@@ -32,4 +32,6 @@ public interface Api {
...
@@ -32,4 +32,6 @@ public interface Api {
String
printerDevice_list
=
"printerDevice/list"
;
String
printerDevice_list
=
"printerDevice/list"
;
//日誌上傳
//日誌上傳
String
upload_app_log
=
"public/cloud/gsa/upload"
;
String
upload_app_log
=
"public/cloud/gsa/upload"
;
//獲取顏色表數據
String
color_list
=
"food/getColorList"
;
}
}
base-module/src/main/java/com/gingersoft/gsa/cloud/base/application/GsaCloudApplication.java
View file @
cc2bb8ac
...
@@ -68,6 +68,8 @@ public class GsaCloudApplication extends BaseApplication {
...
@@ -68,6 +68,8 @@ public class GsaCloudApplication extends BaseApplication {
private
Activity
mCurrentActivity
;
private
Activity
mCurrentActivity
;
public
static
RestaurantExpandInfo
androidSetting
;
public
static
RestaurantExpandInfo
androidSetting
;
public
static
RestaurantExpandInfo
.
UIStyleConfiguration
uiStyleConfiguration
;
public
static
RestaurantExpandInfo
.
FunctionConfiguration
functionConfiguration
;
/**
/**
* 是否開啟皮膚切換
* 是否開啟皮膚切換
*/
*/
...
@@ -128,6 +130,8 @@ public class GsaCloudApplication extends BaseApplication {
...
@@ -128,6 +130,8 @@ public class GsaCloudApplication extends BaseApplication {
AppCrashHandler
.
getInstance
().
init
(
this
);
AppCrashHandler
.
getInstance
().
init
(
this
);
androidSetting
=
new
RestaurantExpandInfo
();
androidSetting
=
new
RestaurantExpandInfo
();
uiStyleConfiguration
=
new
RestaurantExpandInfo
.
UIStyleConfiguration
();
functionConfiguration
=
new
RestaurantExpandInfo
.
FunctionConfiguration
();
isLogin
=
(
boolean
)
SPUtils
.
get
(
this
,
PrintConstans
.
IS_LOGIN
,
false
);
isLogin
=
(
boolean
)
SPUtils
.
get
(
this
,
PrintConstans
.
IS_LOGIN
,
false
);
initExpandInfo
();
initExpandInfo
();
...
...
base-module/src/main/java/com/gingersoft/gsa/cloud/base/utils/RestaurantExpandInfoUtils.java
View file @
cc2bb8ac
package
com
.
gingersoft
.
gsa
.
cloud
.
base
.
utils
;
package
com
.
gingersoft
.
gsa
.
cloud
.
base
.
utils
;
import
android.text.TextUtils
;
import
com.gingersoft.gsa.cloud.base.application.GsaCloudApplication
;
import
com.gingersoft.gsa.cloud.base.application.GsaCloudApplication
;
import
com.gingersoft.gsa.cloud.bean.RestaurantExpandInfo
;
import
com.gingersoft.gsa.cloud.bean.RestaurantExpandInfo
;
import
com.gingersoft.gsa.cloud.constans.ExpandConstant
;
import
com.gingersoft.gsa.cloud.constans.ExpandConstant
;
import
com.gingersoft.gsa.cloud.database.bean.ExpandInfo
;
import
com.gingersoft.gsa.cloud.database.bean.ExpandInfo
;
import
java.lang.reflect.Field
;
import
java.lang.reflect.Field
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -68,43 +71,74 @@ public class RestaurantExpandInfoUtils {
...
@@ -68,43 +71,74 @@ public class RestaurantExpandInfoUtils {
}
}
}
}
//
for (ExpandInfo expandInfo : expandInfoList) {
for
(
ExpandInfo
expandInfo
:
expandInfoList
)
{
// if (expandInfo.getValueInt() != null
) {
if
(
expandInfo
.
getDataType
()
==
ExpandInfo
.
data_type_int
)
{
//
map.put(expandInfo.getSettingName(), expandInfo.getValueInt());
map
.
put
(
expandInfo
.
getSettingName
(),
expandInfo
.
getValueInt
());
// } else
{
}
else
if
(
expandInfo
.
getDataType
()
==
ExpandInfo
.
data_type_string
)
{
//
map.put(expandInfo.getSettingName(), expandInfo.getValueChar());
map
.
put
(
expandInfo
.
getSettingName
(),
expandInfo
.
getValueChar
());
// }
}
else
if
(
expandInfo
.
getDataType
()
==
ExpandInfo
.
data_type_boolean
)
{
// }
map
.
put
(
expandInfo
.
getSettingName
(),
expandInfo
.
getValueInt
()
==
0
);
//
}
else
if
(
expandInfo
.
getDataType
()
==
ExpandInfo
.
data_type_date
)
{
// List<Map> uiFields = ReflectionUtils.getFiledsInfo(RestaurantExpandInfo.UIStyleConfiguration.class
);
map
.
put
(
expandInfo
.
getSettingName
(),
expandInfo
.
getValueDatetime
()
);
// List<Map> functionFields = ReflectionUtils.getFiledsInfo(RestaurantExpandInfo.FunctionConfiguration.class);
}
else
{
// for (Map fields : uiFields) {
//之前的老數據 默認DataType == 0
// String expandinfoName = (String) fields.get("name");
if
(
expandInfo
.
getValueInt
()
!=
null
)
{
// if (map.containsKey(expandinfoName)) {
map
.
put
(
expandInfo
.
getSettingName
(),
expandInfo
.
getValueInt
());
// Field field = (Field) fields.get("field");
}
else
if
(!
TextUtils
.
isEmpty
(
expandInfo
.
getValueChar
()))
{
// Object value = map.get(expandinfoName
);
map
.
put
(
expandInfo
.
getSettingName
(),
expandInfo
.
getValueChar
()
);
// try
{
}
else
if
(!
TextUtils
.
isEmpty
(
expandInfo
.
getValueDatetime
()))
{
// field.set(expandinfoName,value
);
map
.
put
(
expandInfo
.
getSettingName
(),
expandInfo
.
getValueDatetime
()
);
// } catch (IllegalAccessException e) {
}
// e.printStackTrace();
}
//
}
}
// }
// }
RestaurantExpandInfo
.
UIStyleConfiguration
uiStyleConfiguration
=
GsaCloudApplication
.
uiStyleConfiguration
;
// for (Map field : functionFields) {
Field
uiFields
[]
=
uiStyleConfiguration
.
getClass
().
getDeclaredFields
();
// if (map.containsKey(field)
) {
for
(
Field
field
:
uiFields
)
{
// String expandinfoName = (String) field.get("name"
);
String
expandinfoName
=
field
.
getName
(
);
//
if (map.containsKey(expandinfoName)) {
if
(
map
.
containsKey
(
expandinfoName
))
{
// Field curField = (Field) field.get("field"
);
Object
value
=
map
.
get
(
expandinfoName
);
// Object value = map.get(expandinfoName);
try
{
// try {
field
.
setAccessible
(
true
);
// curField.set(expandinfoName,value
);
Object
fieldType
=
field
.
get
(
uiStyleConfiguration
);
// } catch (IllegalAccessException e) {
boolean
typeMatch
=
(
value
instanceof
Integer
&&
fieldType
instanceof
Integer
)
||
// e.printStackTrace();
(
value
instanceof
String
&&
fieldType
instanceof
String
)
||
// }
(
value
instanceof
Boolean
&&
fieldType
instanceof
Boolean
);
// }
if
(!
typeMatch
)
{
// }
//後台配置的類型與前端的不一致 直接不管
// }
continue
;
}
}
field
.
set
(
uiStyleConfiguration
,
value
);
}
catch
(
IllegalAccessException
e
)
{
e
.
printStackTrace
();
}
}
}
RestaurantExpandInfo
.
FunctionConfiguration
functionConfiguration
=
GsaCloudApplication
.
functionConfiguration
;
Field
functionFields
[]
=
functionConfiguration
.
getClass
().
getDeclaredFields
();
for
(
Field
field
:
functionFields
)
{
String
expandinfoName
=
field
.
getName
();
if
(
map
.
containsKey
(
expandinfoName
))
{
Object
value
=
map
.
get
(
expandinfoName
);
try
{
field
.
setAccessible
(
true
);
Object
fieldType
=
field
.
get
(
functionConfiguration
);
boolean
typeMatch
=
(
value
instanceof
Integer
&&
fieldType
instanceof
Integer
)
||
(
value
instanceof
String
&&
fieldType
instanceof
String
)
||
(
value
instanceof
Boolean
&&
fieldType
instanceof
Boolean
);
if
(!
typeMatch
)
{
//後台配置的類型與前端的不一致 直接不管
continue
;
}
field
.
set
(
functionConfiguration
,
value
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
}
}
public
static
<
T
>
T
getValue
(
String
name
,
Object
defaultValue
)
{
public
static
<
T
>
T
getValue
(
String
name
,
Object
defaultValue
)
{
if
(
map
!=
null
&&
map
.
containsKey
(
name
))
{
if
(
map
!=
null
&&
map
.
containsKey
(
name
))
{
...
...
base-module/src/main/java/com/gingersoft/gsa/cloud/bean/RestaurantExpandInfo.java
View file @
cc2bb8ac
...
@@ -12,98 +12,70 @@ import lombok.Data;
...
@@ -12,98 +12,70 @@ import lombok.Data;
@Data
@Data
public
class
RestaurantExpandInfo
{
public
class
RestaurantExpandInfo
{
@Data
private
int
TableDirection
;
public
static
final
class
UIStyleConfiguration
{
private
int
RefreshTime
=
1
;
/**
private
int
ItemDecimals
;
* 食品組、食品、細項、折扣行列寬高
private
int
RoundingDecimal
=
1
;
*/
private
int
Rounding
;
private
int
foodGroupRow
=
2
;
private
int
SystemLanguage
=
2
;
private
int
foodGroupColumn
=
6
;
private
int
nowLanguageIndex
=
1
;
private
int
foodColumn
=
4
;
private
String
orderlanguage
=
"1,2,3"
;
private
int
comboColumn
=
4
;
private
String
LanageName
=
"中文,粵語,英文"
;
private
int
modColumn
=
4
;
private
int
DataLanguage
=
2
;
private
int
discountColumn
=
4
;
private
boolean
MemberLoginCover
=
true
;
private
boolean
BillTextScroll
=
true
;
private
boolean
EnableErrorLog
=
true
;
private
int
AutoQuitTime
=
600
;
/**
/**
* UI配置相關
* 食品組、食品、細項、折扣Item高度
*/
*/
private
int
FoodTypeCol
=
4
;
private
int
foodGroupBtnHeight
=
150
;
private
int
FoodTypeRow
=
1
;
private
int
foodBtnHeight
=
120
;
private
int
FoodCol
=
4
;
private
int
modBtnHeight
=
80
;
private
int
ModCol
=
5
;
private
int
comboHeight
=
90
;
private
int
DiscountCol
=
5
;
private
int
discountHeight
=
80
;
private
int
LayoutFoodTypeHeight
=
100
;
private
int
FoodBtnHeight
=
120
;
private
int
LayoutQtyHeight
=
40
;
private
int
LayoutQtyHeight
=
40
;
private
int
LayoutQuitHeight
=
40
;
/**
private
int
ModBtnHeight
=
75
;
* 食品組、食品、細項、折扣字體大小
*/
private
int
foodGroupFontSize
=
14
;
private
int
foodFontSize
=
14
;
private
int
comboFontSize
=
12
;
private
int
modFontSize
=
12
;
private
int
discountFontSize
=
12
;
private
int
FoodTypeFontSize
=
12
;
private
int
FoodFontSize
=
12
;
private
int
ModFontSize
=
14
;
private
int
BillListFontSize
=
12
;
private
int
BillTotalFontSize
=
12
;
private
int
FoodlListFontSize
=
18
;
private
int
ReportFontSize
=
15
;
private
int
orderInfoFontSize
=
16
;
private
int
OrderNumberShowSize
=
20
;
private
int
OrderNumberShowSize
=
20
;
private
int
OrderNumberFontSize
=
7
;
private
int
OrderNumberFontSize
=
7
;
private
int
OrderNumberChildShowSize
=
20
;
private
int
OrderNumberChildShowSize
=
20
;
private
int
OrderNumberChildFontSize
=
10
;
private
int
OrderNumberChildFontSize
=
10
;
//估清控制食品字體大小
public
static
final
class
UIStyleConfiguration
{
private
int
soldoutCtrlFoodFontSize
=
16
;
private
int
foodGroupRow
=
5
;
private
int
foodGroupColumn
=
2
;
private
int
foodRow
=
4
;
private
int
comboRow
=
4
;
private
int
modRow
=
4
;
private
int
discountRow
=
4
;
private
int
foodGroupBtnHeight
=
100
;
private
int
foodBtnHeight
=
120
;
private
int
modBtnHeight
=
80
;
private
int
comboHeight
=
90
;
private
int
foodGroupFontSize
=
12
;
private
int
foodFontSize
=
12
;
private
int
comboFontSize
=
12
;
private
int
modFontSize
=
14
;
private
int
discountFontSize
=
14
;
}
}
@Data
public
static
final
class
FunctionConfiguration
{
public
static
final
class
FunctionConfiguration
{
/**
* 賬單小數相關
*/
private
int
Rounding
;
private
int
Rounding
;
private
int
RoundingDecimal
;
private
int
RoundingDecimal
;
private
int
ItemDecimals
;
private
int
ItemDecimals
;
private
String
DeliveryPrintCount
;
//外送印單打印次數
private
int
DeliveryPrintCount
;
//外送印單打印次數
private
String
DeliveryClosingPC
;
//外送結賬打印次數
private
int
DeliveryClosingPC
;
//外送結賬打印次數
private
String
TableModePrintCount
;
//餐檯印單打印次數
private
int
TableModePrintCount
;
//餐檯印單打印次數
private
String
TableModeClosingPC
;
//餐檯模式結賬單打印次數
private
int
TableModeClosingPC
;
//餐檯模式結賬單打印次數
private
String
OrderReceivingTimeout
;
//外送接單超時時間
private
int
OrderReceivingTimeout
;
//外送接單超時時間
private
String
PrintMemberInfo
;
//是否打印會員信息
private
int
PrintMemberInfo
;
//是否打印會員信息
private
String
PrintPage
;
//是否打印頁數
private
int
PrintPage
;
//是否打印頁數
private
String
PrintMergerFood
;
//是否合併食品
private
int
PrintMergerFood
;
//是否合併食品
private
String
PrintStatisticsAmount
;
//是否顯示統計打印數
private
int
PrintStatisticsAmount
;
//是否顯示統計打印數
private
String
PrintFirstOrder
;
//是否打印"頭單"文字
private
int
PrintFirstOrder
;
//是否打印"頭單"文字
private
String
FrozenChainAutoOrder
;
//是否自動接單 為0true
private
int
FrozenChainAutoOrder
;
//是否自動接單 為0true
private
String
MergeSendFood
;
private
int
MergeSendFood
;
//送單是否自動合併食品
/**
private
int
AutoPrinterPaper
;
//送單自動打印上菜紙
* 送單自動打印上菜紙
private
int
ToPrintQRCode
;
//結賬是否打印積分二維碼
*/
private
int
AutoQuitTime
=
600
;
//餐檯模式下單頁多少秒不操作返回餐檯頁面
private
String
AutoPrinterPaper
;
/**
* 結賬是否打印積分二維碼
*/
private
String
ToPrintQRCode
;
}
}
}
}
base-module/src/main/java/com/gingersoft/gsa/cloud/constans/GoldConstants.java
View file @
cc2bb8ac
...
@@ -15,11 +15,11 @@ public interface GoldConstants {
...
@@ -15,11 +15,11 @@ public interface GoldConstants {
int
refreshTime
=
3
;
int
refreshTime
=
3
;
// boolean isRefreshData = false;
// boolean isRefreshData = false;
int
DetailColCount
=
4
;
//
int DetailColCount = 4;
int
foodGriupColCount
=
5
;
//食品組列數
//
int foodGriupColCount = 5;//食品組列數
//
int
foodGriupRows
=
2
;
//食品組行數
//
int foodGriupRows = 2;//食品組行數
int
foodGriupColumns
=
5
;
//食品組列數
//
int foodGriupColumns = 5;//食品組列數
//
int
foodGriupPageSize
=
1
0
;
//食品組最大顯示數
int
foodGriupPageSize
=
1
2
;
//食品組最大顯示數
}
}
base-module/src/main/java/com/gingersoft/gsa/cloud/database/bean/ColorBean.java
0 → 100644
View file @
cc2bb8ac
package
com
.
gingersoft
.
gsa
.
cloud
.
database
.
bean
;
import
org.greenrobot.greendao.annotation.Entity
;
import
lombok.Data
;
import
org.greenrobot.greendao.annotation.Generated
;
@Data
@Entity
public
class
ColorBean
{
/**
* colorId : 0
* colorStart : $00AF3D0C
* colorStop : $00581C05
* fontColor : $00FDFDFD
* androidColor : #0B0B61
* androidFontColor : #FFFFFF
* createTime : Dec 12, 2018 6:03:58 PM
* editTime : Dec 12, 2018 6:03:58 PM
*/
private
int
colorId
;
private
String
colorStart
;
private
String
colorStop
;
private
String
fontColor
;
private
String
androidColor
;
private
String
androidFontColor
;
private
String
createTime
;
private
String
editTime
;
@Generated
(
hash
=
703020793
)
public
ColorBean
(
int
colorId
,
String
colorStart
,
String
colorStop
,
String
fontColor
,
String
androidColor
,
String
androidFontColor
,
String
createTime
,
String
editTime
)
{
this
.
colorId
=
colorId
;
this
.
colorStart
=
colorStart
;
this
.
colorStop
=
colorStop
;
this
.
fontColor
=
fontColor
;
this
.
androidColor
=
androidColor
;
this
.
androidFontColor
=
androidFontColor
;
this
.
createTime
=
createTime
;
this
.
editTime
=
editTime
;
}
@Generated
(
hash
=
521532773
)
public
ColorBean
()
{
}
public
int
getColorId
()
{
return
this
.
colorId
;
}
public
void
setColorId
(
int
colorId
)
{
this
.
colorId
=
colorId
;
}
public
String
getColorStart
()
{
return
this
.
colorStart
;
}
public
void
setColorStart
(
String
colorStart
)
{
this
.
colorStart
=
colorStart
;
}
public
String
getColorStop
()
{
return
this
.
colorStop
;
}
public
void
setColorStop
(
String
colorStop
)
{
this
.
colorStop
=
colorStop
;
}
public
String
getFontColor
()
{
return
this
.
fontColor
;
}
public
void
setFontColor
(
String
fontColor
)
{
this
.
fontColor
=
fontColor
;
}
public
String
getAndroidColor
()
{
return
this
.
androidColor
;
}
public
void
setAndroidColor
(
String
androidColor
)
{
this
.
androidColor
=
androidColor
;
}
public
String
getAndroidFontColor
()
{
return
this
.
androidFontColor
;
}
public
void
setAndroidFontColor
(
String
androidFontColor
)
{
this
.
androidFontColor
=
androidFontColor
;
}
public
String
getCreateTime
()
{
return
this
.
createTime
;
}
public
void
setCreateTime
(
String
createTime
)
{
this
.
createTime
=
createTime
;
}
public
String
getEditTime
()
{
return
this
.
editTime
;
}
public
void
setEditTime
(
String
editTime
)
{
this
.
editTime
=
editTime
;
}
}
base-module/src/main/java/com/gingersoft/gsa/cloud/database/bean/ExpandInfo.java
View file @
cc2bb8ac
...
@@ -6,6 +6,8 @@ import org.greenrobot.greendao.annotation.Id;
...
@@ -6,6 +6,8 @@ import org.greenrobot.greendao.annotation.Id;
import
org.greenrobot.greendao.annotation.Property
;
import
org.greenrobot.greendao.annotation.Property
;
import
org.greenrobot.greendao.annotation.Transient
;
import
org.greenrobot.greendao.annotation.Transient
;
import
lombok.Data
;
/**
/**
* 作者:ELEGANT_BIN
* 作者:ELEGANT_BIN
* 版本:1.6.0
* 版本:1.6.0
...
@@ -13,6 +15,7 @@ import org.greenrobot.greendao.annotation.Transient;
...
@@ -13,6 +15,7 @@ import org.greenrobot.greendao.annotation.Transient;
* 修订历史:2020-05-08
* 修订历史:2020-05-08
* 描述:餐廳擴展設置表
* 描述:餐廳擴展設置表
*/
*/
@Data
@Entity
@Entity
public
class
ExpandInfo
{
public
class
ExpandInfo
{
...
@@ -30,21 +33,33 @@ public class ExpandInfo {
...
@@ -30,21 +33,33 @@ public class ExpandInfo {
*/
*/
private
Integer
valueInt
;
private
Integer
valueInt
;
private
String
valueChar
;
private
String
valueChar
;
private
int
valueBoolean
;
private
String
valueDatetime
;
private
String
valueDatetime
;
/**
/**
* 功能说明
* 功能说明
*/
*/
private
String
remark
;
private
String
remark
;
private
int
dataType
;
//配置的數據類型 1:整形,2:字符型,3:布爾型,4:日期類型
/**
private
String
sort
;
//排序
* 配置的數據類型
* 1:整形
* 2:字符型
* 3:布爾型
* 4:日期類型
*/
private
int
dataType
;
//是否被編輯了
@Transient
@Transient
private
boolean
isUpdate
=
false
;
//是否被編輯了
private
boolean
isUpdate
=
false
;
@Generated
(
hash
=
136088095
)
public
ExpandInfo
(
Long
id
,
int
restaurantId
,
String
settingName
,
Integer
valueInt
,
String
valueChar
,
public
static
final
int
data_type_int
=
1
;
String
valueDatetime
,
String
remark
,
int
dataType
,
String
sort
,
int
valueBoolean
)
{
public
static
final
int
data_type_string
=
2
;
public
static
final
int
data_type_boolean
=
3
;
public
static
final
int
data_type_date
=
4
;
@Generated
(
hash
=
372331474
)
public
ExpandInfo
(
Long
id
,
int
restaurantId
,
String
settingName
,
Integer
valueInt
,
String
valueChar
,
String
valueDatetime
,
String
remark
,
int
dataType
)
{
this
.
id
=
id
;
this
.
id
=
id
;
this
.
restaurantId
=
restaurantId
;
this
.
restaurantId
=
restaurantId
;
this
.
settingName
=
settingName
;
this
.
settingName
=
settingName
;
...
@@ -53,95 +68,59 @@ public class ExpandInfo {
...
@@ -53,95 +68,59 @@ public class ExpandInfo {
this
.
valueDatetime
=
valueDatetime
;
this
.
valueDatetime
=
valueDatetime
;
this
.
remark
=
remark
;
this
.
remark
=
remark
;
this
.
dataType
=
dataType
;
this
.
dataType
=
dataType
;
this
.
sort
=
sort
;
this
.
valueBoolean
=
valueBoolean
;
}
}
@Generated
(
hash
=
9429432
)
@Generated
(
hash
=
9429432
)
public
ExpandInfo
()
{
public
ExpandInfo
()
{
}
}
public
Long
getId
()
{
public
Long
getId
()
{
return
this
.
id
;
return
this
.
id
;
}
}
public
void
setId
(
Long
id
)
{
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
this
.
id
=
id
;
}
}
public
int
getRestaurantId
()
{
public
int
getRestaurantId
()
{
return
restaurantId
;
return
this
.
restaurantId
;
}
}
public
void
setRestaurantId
(
int
restaurantId
)
{
public
void
setRestaurantId
(
int
restaurantId
)
{
this
.
restaurantId
=
restaurantId
;
this
.
restaurantId
=
restaurantId
;
}
}
public
String
getSettingName
()
{
public
String
getSettingName
()
{
return
settingName
;
return
this
.
settingName
;
}
}
public
void
setSettingName
(
String
settingName
)
{
public
void
setSettingName
(
String
settingName
)
{
this
.
settingName
=
settingName
;
this
.
settingName
=
settingName
;
}
}
public
Integer
getValueInt
()
{
public
Integer
getValueInt
()
{
return
valueInt
;
return
this
.
valueInt
;
}
}
public
void
setValueInt
(
Integer
valueInt
)
{
public
void
setValueInt
(
Integer
valueInt
)
{
this
.
valueInt
=
valueInt
;
this
.
valueInt
=
valueInt
;
}
}
public
String
getValueChar
()
{
public
String
getValueChar
()
{
return
valueChar
;
return
this
.
valueChar
;
}
}
public
void
setValueChar
(
String
valueChar
)
{
public
void
setValueChar
(
String
valueChar
)
{
this
.
valueChar
=
valueChar
;
this
.
valueChar
=
valueChar
;
}
}
public
String
getRemark
()
{
return
remark
;
}
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
}
public
String
getValueDatetime
()
{
public
String
getValueDatetime
()
{
return
valueDatetime
;
return
this
.
valueDatetime
;
}
}
public
void
setValueDatetime
(
String
valueDatetime
)
{
public
void
setValueDatetime
(
String
valueDatetime
)
{
this
.
valueDatetime
=
valueDatetime
;
this
.
valueDatetime
=
valueDatetime
;
}
}
public
String
getRemark
()
{
return
this
.
remark
;
}
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
}
public
int
getDataType
()
{
public
int
getDataType
()
{
return
dataType
;
return
this
.
dataType
;
}
}
public
void
setDataType
(
int
dataType
)
{
public
void
setDataType
(
int
dataType
)
{
this
.
dataType
=
dataType
;
this
.
dataType
=
dataType
;
}
}
public
String
getSort
()
{
return
sort
;
}
public
void
setSort
(
String
sort
)
{
this
.
sort
=
sort
;
}
public
int
getValueBoolean
()
{
return
valueBoolean
;
}
public
void
setValueBoolean
(
int
valueBoolean
)
{
this
.
valueBoolean
=
valueBoolean
;
}
public
boolean
isUpdate
()
{
public
boolean
isUpdate
()
{
return
isUpdate
;
return
isUpdate
;
}
}
...
@@ -149,12 +128,4 @@ public class ExpandInfo {
...
@@ -149,12 +128,4 @@ public class ExpandInfo {
public
void
setUpdate
(
boolean
update
)
{
public
void
setUpdate
(
boolean
update
)
{
isUpdate
=
update
;
isUpdate
=
update
;
}
}
public
boolean
getIsUpdate
()
{
return
this
.
isUpdate
;
}
public
void
setIsUpdate
(
boolean
isUpdate
)
{
this
.
isUpdate
=
isUpdate
;
}
}
}
base-module/src/main/java/com/gingersoft/gsa/cloud/database/bean/Food.java
View file @
cc2bb8ac
...
@@ -28,277 +28,6 @@ import com.gingersoft.gsa.cloud.database.greendao.FoodDao;
...
@@ -28,277 +28,6 @@ import com.gingersoft.gsa.cloud.database.greendao.FoodDao;
@Entity
@Entity
public
class
Food
{
public
class
Food
{
// /**
// * ID
// */
// @Property(nameInDb = "FID")
// @Id(autoincrement = true)
// private Long id;
//
// /**
// * 上級ID (如0=最高級)
// */
// private Long parentId;
// /**
// * 商户ID
// */
// private Long restaurantId;
// /**食品ID*/
//// private Long fid;
// /**
// * 是否組別
// */
// private Byte isParent;
// /**
// * 排序
// */
// private Long seqNo;
// /**
// * 名稱1
// */
// private String foodName;
// /**
// * 食品名称1
// */
// private String foodName1;
// /**
// * 食品名称2
// */
// private String foodName2;
// /**
// * 自定義食品編號
// */
// private String plu;
// /**
// * 本地对应ID
// */
// private String posFid;
// /**
// * 描述
// */
// private String foodDesc;
// /**
// * 限制比例#0不做判断;(人数*N)
// */
// private Long limitAmount;
// /**
// * 限制类型#1:表示每次送单限制 ;2:表示整单限制
// */
// private Long limitType;
// /**
// * 餐种
// */
// private Long foodSummary;
// /**
// * 0=顯示, 1=隱藏, 2=暫停,3=只显示,不操作
// */
// private Long invisible;
// /**
// * 自動跳出細項頁
// */
// private Byte autoMod;
// /**
// * 金額
// */
// private Double price;
// /**
// * 原價 (刪除線)
// */
// private Double marketPrice;
// /**
// * 餐盒费
// */
// private Double lunchboxPrice;
// /**
// * 食品小图片
// */
// private String imgUrlSmall;
// /**
// * 食品大图片
// */
// private String imageurl;
// /**
// * ricepon显示状态,当为0的时候,取Invisible的状态:0=顯示, 1=隱藏, 2=暫停
// */
// private Long riceponInvisible;
// /**
// * 成本
// */
// private Double cost;
// /**
// * 開始日期
// */
// private Date startDate;
// /**
// * 結束日期
// */
// private Date endDate;
// /**
// * 贊
// */
// private Long like;
// /**
// * 已售
// */
// private Long totalSold;
// /**
// * 是否显示已售
// */
// private Long isSold;
// /**
// * 创建人
// */
// private String createBy;
//
// private Date createTime;
// /**
// * 更新人
// */
// private String updateBy;
// /**
// * 更新时间
// */
// private Date updateTime;
// /**
// * 時段, 請關聯到m_period_info
// */
// private Long periodId;
// /**
// * 是否参与折扣#1:可折扣
// */
// private Long ableDiscount;
// /**
// * 是否外卖#0:是;1:否
// */
// private Long takeaway;
// /**
// * 餐頁面中藍色按鈕有沒有編輯按鈕 (筆的圖按) 0=不可編輯 1=可編輯
// */
// private Long blueEdit;
// /**
// * 購物車中是否可編輯 (加入口味) 0=隱藏購物車中食品的編輯按鈕 1=顯示按鈕
// */
// private Long cartEdit;
// /**
// * 相同項目自動合併 0=不自動合併 1=自動合併
// */
// private Long autoMerge;
// /**
// * 打印設定, 用逗號分隔, *=切紙
// */
// private String printSeting;
// /**
// * 是否打印叫号小票
// */
// private Long isPrintQueueCode;
// /**
// * 打印叫号小票对应队ID
// */
// private Long queueHeadId;
// /**
// * 是否需要經理批準
// */
// private Long approve;
// /**
// * 0=系統顏色, 1=黑色, 2=紅色
// */
// private Long printFont;
// /**
// * 自動顯示細項
// */
// private Long advPrice;
// /**
// * 當金額=0時, 是否打印在帳單上
// */
// private Long printToBill;
// /**
// * 額外食品加分
// */
// private Double pointsAdd;
// /**
// * 額外積分比率
// */
// private Long pointsRatio;
// /**
// * 換購食品所需積分
// */
// private Double pointsRedeem;
// /**
// * 是否打印主项
// */
// private Long ktPrintMainItem;
// /**
// * 是否打印价格
// */
// private Long ktShowPrice;
// /**
// * 0食品清单打印 账单打印//1食品清单不打印 账单不打印//2食品清单打印 账单不打印//3食品清单不打印 账单打印
// */
// private Long printTo;
// /**
// * 食品数量是否同步 餐台人数
// */
// private Long toPax;
// /**
// * 食品类型 0普通食品 1称重食品
// */
// private Long foodType;
// /**
// * gspos自定义表中的Id
// */
// private Long majorMainId;
// /**
// * 部门Id
// */
// private Long deptId;
// /**
// * 是否收取服務費
// */
// private Byte serviceCharge;
// /**
// * 顏色ID
// */
// private Long colorId;
// /**
// * 0:新增;1:修改;2:刪除
// */
// private Long conditions;
// /**
// * 是否同步 0:否 1:是
// */
// private Long isRt;
// /**
// * 是否删除:0正常,1删除
// */
// private Long deletes;
// /**
// * 是否時長食物 0=普通食品 1=計費食品 2=免費N小時 3=時段對沖 4=入場費食品
// */
// private Long isTimingFood;
// /**
// * 最低持續時間
// */
// private Long minLongTime;
//
// private Long unitTime;
// /**
// * 單位價格
// */
// private Double unitPrice;
// /**
// * 免費時間(小時)
// */
// private Long freeLongTime;
// /**
// * 免費開始時間
// */
// private Date freePeriodBegin;
// /**
// * 是否參與會員喜好統計 0 參與 1 不參與
// */
// private Long isStatistic;
/**
/**
* ID
* ID
*/
*/
...
...
base-module/src/main/java/com/gingersoft/gsa/cloud/database/greendao/DaoMaster.java
View file @
cc2bb8ac
...
@@ -21,6 +21,7 @@ public class DaoMaster extends AbstractDaoMaster {
...
@@ -21,6 +21,7 @@ public class DaoMaster extends AbstractDaoMaster {
/** Creates underlying database table using DAOs. */
/** Creates underlying database table using DAOs. */
public
static
void
createAllTables
(
Database
db
,
boolean
ifNotExists
)
{
public
static
void
createAllTables
(
Database
db
,
boolean
ifNotExists
)
{
ColorBeanDao
.
createTable
(
db
,
ifNotExists
);
ComboItemDao
.
createTable
(
db
,
ifNotExists
);
ComboItemDao
.
createTable
(
db
,
ifNotExists
);
DiscountDao
.
createTable
(
db
,
ifNotExists
);
DiscountDao
.
createTable
(
db
,
ifNotExists
);
ExpandInfoDao
.
createTable
(
db
,
ifNotExists
);
ExpandInfoDao
.
createTable
(
db
,
ifNotExists
);
...
@@ -37,6 +38,7 @@ public class DaoMaster extends AbstractDaoMaster {
...
@@ -37,6 +38,7 @@ public class DaoMaster extends AbstractDaoMaster {
/** Drops underlying database table using DAOs. */
/** Drops underlying database table using DAOs. */
public
static
void
dropAllTables
(
Database
db
,
boolean
ifExists
)
{
public
static
void
dropAllTables
(
Database
db
,
boolean
ifExists
)
{
ColorBeanDao
.
dropTable
(
db
,
ifExists
);
ComboItemDao
.
dropTable
(
db
,
ifExists
);
ComboItemDao
.
dropTable
(
db
,
ifExists
);
DiscountDao
.
dropTable
(
db
,
ifExists
);
DiscountDao
.
dropTable
(
db
,
ifExists
);
ExpandInfoDao
.
dropTable
(
db
,
ifExists
);
ExpandInfoDao
.
dropTable
(
db
,
ifExists
);
...
@@ -67,6 +69,7 @@ public class DaoMaster extends AbstractDaoMaster {
...
@@ -67,6 +69,7 @@ public class DaoMaster extends AbstractDaoMaster {
public
DaoMaster
(
Database
db
)
{
public
DaoMaster
(
Database
db
)
{
super
(
db
,
SCHEMA_VERSION
);
super
(
db
,
SCHEMA_VERSION
);
registerDaoClass
(
ColorBeanDao
.
class
);
registerDaoClass
(
ComboItemDao
.
class
);
registerDaoClass
(
ComboItemDao
.
class
);
registerDaoClass
(
DiscountDao
.
class
);
registerDaoClass
(
DiscountDao
.
class
);
registerDaoClass
(
ExpandInfoDao
.
class
);
registerDaoClass
(
ExpandInfoDao
.
class
);
...
...
base-module/src/main/java/com/gingersoft/gsa/cloud/database/greendao/DaoSession.java
View file @
cc2bb8ac
...
@@ -8,6 +8,7 @@ import org.greenrobot.greendao.database.Database;
...
@@ -8,6 +8,7 @@ import org.greenrobot.greendao.database.Database;
import
org.greenrobot.greendao.identityscope.IdentityScopeType
;
import
org.greenrobot.greendao.identityscope.IdentityScopeType
;
import
org.greenrobot.greendao.internal.DaoConfig
;
import
org.greenrobot.greendao.internal.DaoConfig
;
import
com.gingersoft.gsa.cloud.database.bean.ColorBean
;
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.ExpandInfo
;
import
com.gingersoft.gsa.cloud.database.bean.ExpandInfo
;
...
@@ -21,6 +22,7 @@ import com.gingersoft.gsa.cloud.database.bean.PrintCurrencyBean;
...
@@ -21,6 +22,7 @@ import com.gingersoft.gsa.cloud.database.bean.PrintCurrencyBean;
import
com.gingersoft.gsa.cloud.database.bean.PrintModelBean
;
import
com.gingersoft.gsa.cloud.database.bean.PrintModelBean
;
import
com.gingersoft.gsa.cloud.database.bean.PrinterDeviceBean
;
import
com.gingersoft.gsa.cloud.database.bean.PrinterDeviceBean
;
import
com.gingersoft.gsa.cloud.database.greendao.ColorBeanDao
;
import
com.gingersoft.gsa.cloud.database.greendao.ComboItemDao
;
import
com.gingersoft.gsa.cloud.database.greendao.ComboItemDao
;
import
com.gingersoft.gsa.cloud.database.greendao.DiscountDao
;
import
com.gingersoft.gsa.cloud.database.greendao.DiscountDao
;
import
com.gingersoft.gsa.cloud.database.greendao.ExpandInfoDao
;
import
com.gingersoft.gsa.cloud.database.greendao.ExpandInfoDao
;
...
@@ -43,6 +45,7 @@ import com.gingersoft.gsa.cloud.database.greendao.PrinterDeviceBeanDao;
...
@@ -43,6 +45,7 @@ import com.gingersoft.gsa.cloud.database.greendao.PrinterDeviceBeanDao;
*/
*/
public
class
DaoSession
extends
AbstractDaoSession
{
public
class
DaoSession
extends
AbstractDaoSession
{
private
final
DaoConfig
colorBeanDaoConfig
;
private
final
DaoConfig
comboItemDaoConfig
;
private
final
DaoConfig
comboItemDaoConfig
;
private
final
DaoConfig
discountDaoConfig
;
private
final
DaoConfig
discountDaoConfig
;
private
final
DaoConfig
expandInfoDaoConfig
;
private
final
DaoConfig
expandInfoDaoConfig
;
...
@@ -56,6 +59,7 @@ public class DaoSession extends AbstractDaoSession {
...
@@ -56,6 +59,7 @@ public class DaoSession extends AbstractDaoSession {
private
final
DaoConfig
printModelBeanDaoConfig
;
private
final
DaoConfig
printModelBeanDaoConfig
;
private
final
DaoConfig
printerDeviceBeanDaoConfig
;
private
final
DaoConfig
printerDeviceBeanDaoConfig
;
private
final
ColorBeanDao
colorBeanDao
;
private
final
ComboItemDao
comboItemDao
;
private
final
ComboItemDao
comboItemDao
;
private
final
DiscountDao
discountDao
;
private
final
DiscountDao
discountDao
;
private
final
ExpandInfoDao
expandInfoDao
;
private
final
ExpandInfoDao
expandInfoDao
;
...
@@ -73,6 +77,9 @@ public class DaoSession extends AbstractDaoSession {
...
@@ -73,6 +77,9 @@ public class DaoSession extends AbstractDaoSession {
daoConfigMap
)
{
daoConfigMap
)
{
super
(
db
);
super
(
db
);
colorBeanDaoConfig
=
daoConfigMap
.
get
(
ColorBeanDao
.
class
).
clone
();
colorBeanDaoConfig
.
initIdentityScope
(
type
);
comboItemDaoConfig
=
daoConfigMap
.
get
(
ComboItemDao
.
class
).
clone
();
comboItemDaoConfig
=
daoConfigMap
.
get
(
ComboItemDao
.
class
).
clone
();
comboItemDaoConfig
.
initIdentityScope
(
type
);
comboItemDaoConfig
.
initIdentityScope
(
type
);
...
@@ -109,6 +116,7 @@ public class DaoSession extends AbstractDaoSession {
...
@@ -109,6 +116,7 @@ public class DaoSession extends AbstractDaoSession {
printerDeviceBeanDaoConfig
=
daoConfigMap
.
get
(
PrinterDeviceBeanDao
.
class
).
clone
();
printerDeviceBeanDaoConfig
=
daoConfigMap
.
get
(
PrinterDeviceBeanDao
.
class
).
clone
();
printerDeviceBeanDaoConfig
.
initIdentityScope
(
type
);
printerDeviceBeanDaoConfig
.
initIdentityScope
(
type
);
colorBeanDao
=
new
ColorBeanDao
(
colorBeanDaoConfig
,
this
);
comboItemDao
=
new
ComboItemDao
(
comboItemDaoConfig
,
this
);
comboItemDao
=
new
ComboItemDao
(
comboItemDaoConfig
,
this
);
discountDao
=
new
DiscountDao
(
discountDaoConfig
,
this
);
discountDao
=
new
DiscountDao
(
discountDaoConfig
,
this
);
expandInfoDao
=
new
ExpandInfoDao
(
expandInfoDaoConfig
,
this
);
expandInfoDao
=
new
ExpandInfoDao
(
expandInfoDaoConfig
,
this
);
...
@@ -122,6 +130,7 @@ public class DaoSession extends AbstractDaoSession {
...
@@ -122,6 +130,7 @@ public class DaoSession extends AbstractDaoSession {
printModelBeanDao
=
new
PrintModelBeanDao
(
printModelBeanDaoConfig
,
this
);
printModelBeanDao
=
new
PrintModelBeanDao
(
printModelBeanDaoConfig
,
this
);
printerDeviceBeanDao
=
new
PrinterDeviceBeanDao
(
printerDeviceBeanDaoConfig
,
this
);
printerDeviceBeanDao
=
new
PrinterDeviceBeanDao
(
printerDeviceBeanDaoConfig
,
this
);
registerDao
(
ColorBean
.
class
,
colorBeanDao
);
registerDao
(
ComboItem
.
class
,
comboItemDao
);
registerDao
(
ComboItem
.
class
,
comboItemDao
);
registerDao
(
Discount
.
class
,
discountDao
);
registerDao
(
Discount
.
class
,
discountDao
);
registerDao
(
ExpandInfo
.
class
,
expandInfoDao
);
registerDao
(
ExpandInfo
.
class
,
expandInfoDao
);
...
@@ -137,6 +146,7 @@ public class DaoSession extends AbstractDaoSession {
...
@@ -137,6 +146,7 @@ public class DaoSession extends AbstractDaoSession {
}
}
public
void
clear
()
{
public
void
clear
()
{
colorBeanDaoConfig
.
clearIdentityScope
();
comboItemDaoConfig
.
clearIdentityScope
();
comboItemDaoConfig
.
clearIdentityScope
();
discountDaoConfig
.
clearIdentityScope
();
discountDaoConfig
.
clearIdentityScope
();
expandInfoDaoConfig
.
clearIdentityScope
();
expandInfoDaoConfig
.
clearIdentityScope
();
...
@@ -151,6 +161,10 @@ public class DaoSession extends AbstractDaoSession {
...
@@ -151,6 +161,10 @@ public class DaoSession extends AbstractDaoSession {
printerDeviceBeanDaoConfig
.
clearIdentityScope
();
printerDeviceBeanDaoConfig
.
clearIdentityScope
();
}
}
public
ColorBeanDao
getColorBeanDao
()
{
return
colorBeanDao
;
}
public
ComboItemDao
getComboItemDao
()
{
public
ComboItemDao
getComboItemDao
()
{
return
comboItemDao
;
return
comboItemDao
;
}
}
...
...
base-module/src/main/java/com/gingersoft/gsa/cloud/database/greendao/ExpandInfoDao.java
View file @
cc2bb8ac
...
@@ -32,8 +32,6 @@ public class ExpandInfoDao extends AbstractDao<ExpandInfo, Long> {
...
@@ -32,8 +32,6 @@ public class ExpandInfoDao extends AbstractDao<ExpandInfo, Long> {
public
final
static
Property
ValueDatetime
=
new
Property
(
5
,
String
.
class
,
"valueDatetime"
,
false
,
"VALUE_DATETIME"
);
public
final
static
Property
ValueDatetime
=
new
Property
(
5
,
String
.
class
,
"valueDatetime"
,
false
,
"VALUE_DATETIME"
);
public
final
static
Property
Remark
=
new
Property
(
6
,
String
.
class
,
"remark"
,
false
,
"REMARK"
);
public
final
static
Property
Remark
=
new
Property
(
6
,
String
.
class
,
"remark"
,
false
,
"REMARK"
);
public
final
static
Property
DataType
=
new
Property
(
7
,
int
.
class
,
"dataType"
,
false
,
"DATA_TYPE"
);
public
final
static
Property
DataType
=
new
Property
(
7
,
int
.
class
,
"dataType"
,
false
,
"DATA_TYPE"
);
public
final
static
Property
Sort
=
new
Property
(
8
,
String
.
class
,
"sort"
,
false
,
"SORT"
);
public
final
static
Property
ValueBoolean
=
new
Property
(
9
,
int
.
class
,
"valueBoolean"
,
false
,
"VALUE_BOOLEAN"
);
}
}
...
@@ -56,9 +54,7 @@ public class ExpandInfoDao extends AbstractDao<ExpandInfo, Long> {
...
@@ -56,9 +54,7 @@ public class ExpandInfoDao extends AbstractDao<ExpandInfo, Long> {
"\"VALUE_CHAR\" TEXT,"
+
// 4: valueChar
"\"VALUE_CHAR\" TEXT,"
+
// 4: valueChar
"\"VALUE_DATETIME\" TEXT,"
+
// 5: valueDatetime
"\"VALUE_DATETIME\" TEXT,"
+
// 5: valueDatetime
"\"REMARK\" TEXT,"
+
// 6: remark
"\"REMARK\" TEXT,"
+
// 6: remark
"\"DATA_TYPE\" INTEGER NOT NULL ,"
+
// 7: dataType
"\"DATA_TYPE\" INTEGER NOT NULL );"
);
// 7: dataType
"\"SORT\" TEXT,"
+
// 8: sort
"\"VALUE_BOOLEAN\" INTEGER NOT NULL );"
);
// 9: valueBoolean
}
}
/** Drops the underlying database table. */
/** Drops the underlying database table. */
...
@@ -102,12 +98,6 @@ public class ExpandInfoDao extends AbstractDao<ExpandInfo, Long> {
...
@@ -102,12 +98,6 @@ public class ExpandInfoDao extends AbstractDao<ExpandInfo, Long> {
stmt
.
bindString
(
7
,
remark
);
stmt
.
bindString
(
7
,
remark
);
}
}
stmt
.
bindLong
(
8
,
entity
.
getDataType
());
stmt
.
bindLong
(
8
,
entity
.
getDataType
());
String
sort
=
entity
.
getSort
();
if
(
sort
!=
null
)
{
stmt
.
bindString
(
9
,
sort
);
}
stmt
.
bindLong
(
10
,
entity
.
getValueBoolean
());
}
}
@Override
@Override
...
@@ -145,12 +135,6 @@ public class ExpandInfoDao extends AbstractDao<ExpandInfo, Long> {
...
@@ -145,12 +135,6 @@ public class ExpandInfoDao extends AbstractDao<ExpandInfo, Long> {
stmt
.
bindString
(
7
,
remark
);
stmt
.
bindString
(
7
,
remark
);
}
}
stmt
.
bindLong
(
8
,
entity
.
getDataType
());
stmt
.
bindLong
(
8
,
entity
.
getDataType
());
String
sort
=
entity
.
getSort
();
if
(
sort
!=
null
)
{
stmt
.
bindString
(
9
,
sort
);
}
stmt
.
bindLong
(
10
,
entity
.
getValueBoolean
());
}
}
@Override
@Override
...
@@ -168,9 +152,7 @@ public class ExpandInfoDao extends AbstractDao<ExpandInfo, Long> {
...
@@ -168,9 +152,7 @@ public class ExpandInfoDao extends AbstractDao<ExpandInfo, Long> {
cursor
.
isNull
(
offset
+
4
)
?
null
:
cursor
.
getString
(
offset
+
4
),
// valueChar
cursor
.
isNull
(
offset
+
4
)
?
null
:
cursor
.
getString
(
offset
+
4
),
// valueChar
cursor
.
isNull
(
offset
+
5
)
?
null
:
cursor
.
getString
(
offset
+
5
),
// valueDatetime
cursor
.
isNull
(
offset
+
5
)
?
null
:
cursor
.
getString
(
offset
+
5
),
// valueDatetime
cursor
.
isNull
(
offset
+
6
)
?
null
:
cursor
.
getString
(
offset
+
6
),
// remark
cursor
.
isNull
(
offset
+
6
)
?
null
:
cursor
.
getString
(
offset
+
6
),
// remark
cursor
.
getInt
(
offset
+
7
),
// dataType
cursor
.
getInt
(
offset
+
7
)
// dataType
cursor
.
isNull
(
offset
+
8
)
?
null
:
cursor
.
getString
(
offset
+
8
),
// sort
cursor
.
getInt
(
offset
+
9
)
// valueBoolean
);
);
return
entity
;
return
entity
;
}
}
...
@@ -185,8 +167,6 @@ public class ExpandInfoDao extends AbstractDao<ExpandInfo, Long> {
...
@@ -185,8 +167,6 @@ public class ExpandInfoDao extends AbstractDao<ExpandInfo, Long> {
entity
.
setValueDatetime
(
cursor
.
isNull
(
offset
+
5
)
?
null
:
cursor
.
getString
(
offset
+
5
));
entity
.
setValueDatetime
(
cursor
.
isNull
(
offset
+
5
)
?
null
:
cursor
.
getString
(
offset
+
5
));
entity
.
setRemark
(
cursor
.
isNull
(
offset
+
6
)
?
null
:
cursor
.
getString
(
offset
+
6
));
entity
.
setRemark
(
cursor
.
isNull
(
offset
+
6
)
?
null
:
cursor
.
getString
(
offset
+
6
));
entity
.
setDataType
(
cursor
.
getInt
(
offset
+
7
));
entity
.
setDataType
(
cursor
.
getInt
(
offset
+
7
));
entity
.
setSort
(
cursor
.
isNull
(
offset
+
8
)
?
null
:
cursor
.
getString
(
offset
+
8
));
entity
.
setValueBoolean
(
cursor
.
getInt
(
offset
+
9
));
}
}
@Override
@Override
...
...
base-module/src/main/java/com/gingersoft/gsa/cloud/database/utils/ColorDaoUtils.java
0 → 100644
View file @
cc2bb8ac
package
com
.
gingersoft
.
gsa
.
cloud
.
database
.
utils
;
import
android.content.Context
;
import
android.util.Log
;
import
com.gingersoft.gsa.cloud.database.DaoManager
;
import
com.gingersoft.gsa.cloud.database.bean.ColorBean
;
import
com.gingersoft.gsa.cloud.database.greendao.ColorBeanDao
;
import
java.util.List
;
/**
* 作者:ELEGANT_BIN
* 版本:1.6.0
* 创建日期:2020-01-02
* 修订历史:2020-01-02
* 描述:
*/
public
class
ColorDaoUtils
{
private
static
final
String
TAG
=
ColorDaoUtils
.
class
.
getSimpleName
();
private
DaoManager
mManager
;
private
Context
mContext
;
public
ColorDaoUtils
(
Context
context
)
{
mManager
=
DaoManager
.
getInstance
();
mManager
.
init
(
context
);
this
.
mContext
=
context
;
}
/**
* 清除緩存
*/
public
void
detachAll
()
{
ColorBeanDao
colorBeanDao
=
DaoManager
.
getInstance
().
getDaoSession
().
getColorBeanDao
();
colorBeanDao
.
detachAll
();
}
/**
* 完成Food记录的插入,如果表未创建,先创建Food表
*
* @param colorBean
* @return
*/
public
boolean
insertColorBean
(
ColorBean
colorBean
)
{
boolean
flag
=
false
;
flag
=
mManager
.
getDaoSession
().
getColorBeanDao
().
insert
(
colorBean
)
==
-
1
?
false
:
true
;
Log
.
i
(
TAG
,
"insert ColorBeanItem :"
+
flag
+
"-->"
+
colorBean
.
toString
());
return
flag
;
}
/**
* 插入多条数据,在子线程操作
*
* @param colorBeanList
* @return
*/
public
boolean
insertMultColorBean
(
final
List
<
ColorBean
>
colorBeanList
)
{
boolean
flag
=
false
;
try
{
mManager
.
getDaoSession
().
runInTx
(
new
Runnable
()
{
@Override
public
void
run
()
{
for
(
ColorBean
colorBean
:
colorBeanList
)
{
mManager
.
getDaoSession
().
insertOrReplace
(
colorBean
);
}
}
});
flag
=
true
;
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
flag
;
}
/**
* 修改一条数据
*
* @param colorBean
* @return
*/
public
boolean
updateColorBean
(
ColorBean
colorBean
)
{
boolean
flag
=
false
;
try
{
mManager
.
getDaoSession
().
update
(
colorBean
);
flag
=
true
;
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
flag
;
}
/**
* 删除单条记录
*
* @param colorBean
* @return
*/
public
boolean
deleteColorBean
(
ColorBean
colorBean
)
{
boolean
flag
=
false
;
try
{
//按照id删除
mManager
.
getDaoSession
().
delete
(
colorBean
);
flag
=
true
;
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
flag
;
}
/**
* 删除所有记录
*
* @return
*/
public
boolean
deleteAll
()
{
boolean
flag
=
false
;
try
{
//按照id删除
mManager
.
getDaoSession
().
deleteAll
(
ColorBean
.
class
);
flag
=
true
;
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
flag
;
}
/**
* 查询所有记录
*
* @return
*/
public
List
<
ColorBean
>
queryAllColorBean
()
{
return
mManager
.
getDaoSession
().
loadAll
(
ColorBean
.
class
);
}
/**
* 根据主键id查询记录
*
* @param key
* @return
*/
public
ColorBean
queryColorBeanById
(
long
key
)
{
return
mManager
.
getDaoSession
().
load
(
ColorBean
.
class
,
key
);
}
/**
* 使用native sql进行查询操作
*/
public
List
<
ColorBean
>
queryColorBeanByNativeSql
(
String
sql
,
String
[]
conditions
)
{
return
mManager
.
getDaoSession
().
queryRaw
(
ColorBean
.
class
,
sql
,
conditions
);
}
}
config.gradle
View file @
cc2bb8ac
...
@@ -7,8 +7,8 @@ ext {
...
@@ -7,8 +7,8 @@ ext {
targetSdkVersion
:
29
,
targetSdkVersion
:
29
,
//正式版: 1.0.3 3
//正式版: 1.0.3 3
//內部測試版:1.2.0 20
//內部測試版:1.2.0 20
versionCode
:
8
,
versionCode
:
9
,
versionName
:
"1.0.
8
"
versionName
:
"1.0.
9
"
]
]
version
=
[
version
=
[
...
...
download-module/src/main/java/com/gingersoft/gsa/cloud/download/mvp/contract/DownloadContract.java
View file @
cc2bb8ac
...
@@ -66,5 +66,7 @@ public interface DownloadContract {
...
@@ -66,5 +66,7 @@ public interface DownloadContract {
Observable
<
BaseResult
>
downExpandInfo
(
int
restaurantId
);
Observable
<
BaseResult
>
downExpandInfo
(
int
restaurantId
);
Observable
<
BaseResult
>
downPrinterList
(
int
restaurantId
);
Observable
<
BaseResult
>
downPrinterList
(
int
restaurantId
);
Observable
<
BaseResult
>
downColorList
();
}
}
}
}
download-module/src/main/java/com/gingersoft/gsa/cloud/download/mvp/model/DownloadModel.java
View file @
cc2bb8ac
...
@@ -125,5 +125,11 @@ public class DownloadModel extends BaseModel implements DownloadContract.Model {
...
@@ -125,5 +125,11 @@ public class DownloadModel extends BaseModel implements DownloadContract.Model {
.
downPrinterList
(
restaurantId
);
.
downPrinterList
(
restaurantId
);
}
}
@Override
public
Observable
<
BaseResult
>
downColorList
()
{
return
mRepositoryManager
.
obtainRetrofitService
(
DownloadService
.
class
)
.
downColorList
();
}
}
}
\ No newline at end of file
download-module/src/main/java/com/gingersoft/gsa/cloud/download/mvp/model/downmanager/DownloadManager.java
View file @
cc2bb8ac
...
@@ -36,7 +36,7 @@ public class DownloadManager {
...
@@ -36,7 +36,7 @@ public class DownloadManager {
return
downloadManager
;
return
downloadManager
;
}
}
public
DownloadManager
takeRequestExecute
(
List
<
DownloadRequest
>
requests
,
DownloadPresenter
presenter
)
{
public
DownloadManager
takeRequestExecute
(
List
<
DownloadRequest
>
requests
)
{
this
.
requestCount
=
requests
.
size
();
this
.
requestCount
=
requests
.
size
();
//重置响应数
//重置响应数
this
.
responseSuccessCount
=
0
;
this
.
responseSuccessCount
=
0
;
...
@@ -46,66 +46,47 @@ public class DownloadManager {
...
@@ -46,66 +46,47 @@ public class DownloadManager {
for
(
int
i
=
0
;
i
<
requests
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
requests
.
size
();
i
++)
{
DownloadRequest
request
=
requests
.
get
(
i
);
DownloadRequest
request
=
requests
.
get
(
i
);
if
(
request
!=
null
)
{
if
(
request
!=
null
)
{
DownloadTaskImp
taskImp
=
new
DownloadTaskImp
(
request
,
presenter
);
DownloadTaskImp
taskImp
=
new
DownloadTaskImp
(
request
);
poolManager
.
putExecutableTasks
(
taskImp
);
poolManager
.
putExecutableTasks
(
taskImp
);
}
}
}
}
return
this
;
return
this
;
}
}
public
DownloadManager
takeRequestExecute
(
List
<
DownloadRequest
>
requests
,
OnRunnableListener
listener
)
{
public
void
download
(
DownloadRequest
request
)
{
if
(
listener
==
null
)
{
OkHttp3Utils
.
get
(
request
.
getUrl
())
return
this
;
.
subscribeOn
(
Schedulers
.
io
())
.
subscribeOn
(
AndroidSchedulers
.
mainThread
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
(
new
Observer
<
String
>()
{
@Override
public
void
onSubscribe
(
Disposable
d
)
{
}
}
@Override
this
.
requestCount
=
requests
.
size
();
public
void
onNext
(
String
data
)
{
//重置响应数
if
(
listener
!=
null
)
{
this
.
responseSuccessCount
=
0
;
listener
.
onSuccess
(
data
,
request
.
getDownTag
());
}
//同步响应数加+1
responseSuccessCount
++;
}
@Override
ThreadPoolManager
poolManager
=
ThreadPoolManager
.
getInstence
();
public
void
onError
(
Throwable
t
)
{
if
(
listener
!=
null
)
{
listener
.
onError
(
t
,
request
.
getDownTag
());
}
responseErrorCount
++;
}
for
(
int
i
=
0
;
i
<
requests
.
size
();
i
++)
{
DownloadRequest
request
=
requests
.
get
(
i
);
if
(
request
!=
null
)
{
poolManager
.
putExecutableTasks
(
new
Runnable
()
{
@Override
@Override
public
void
onComplete
()
{
public
void
run
()
{
if
(
responseSuccessCount
==
requestCount
)
{
listener
.
run
(
request
);
if
(
listener
!=
null
)
{
listener
.
noComplete
();
}
}
});
}
}
}
}
})
;
return
this
;
}
}
private
On
DownloadResult
Listener
listener
;
private
On
Runnable
Listener
listener
;
public
void
set
DownloadResultListener
(
OnDownloadResult
Listener
listener
)
{
public
void
set
RunnableListener
(
OnRunnable
Listener
listener
)
{
this
.
listener
=
listener
;
this
.
listener
=
listener
;
}
}
public
interface
OnDownloadResultListener
{
public
interface
OnRunnableListener
{
void
onSuccess
(
String
respose
,
int
downTag
);
void
onError
(
Throwable
t
,
int
downTag
);
void
noComplete
(
);
void
run
(
Object
o
);
}
}
}
}
download-module/src/main/java/com/gingersoft/gsa/cloud/download/mvp/model/downmanager/DownloadRequest.java
View file @
cc2bb8ac
...
@@ -14,7 +14,6 @@ public class DownloadRequest {
...
@@ -14,7 +14,6 @@ public class DownloadRequest {
private
int
restaurantId
;
private
int
restaurantId
;
public
int
getDownTag
()
{
public
int
getDownTag
()
{
return
downTag
;
return
downTag
;
}
}
...
...
download-module/src/main/java/com/gingersoft/gsa/cloud/download/mvp/model/downmanager/DownloadTaskImp.java
View file @
cc2bb8ac
...
@@ -14,41 +14,46 @@ public class DownloadTaskImp implements Runnable {
...
@@ -14,41 +14,46 @@ public class DownloadTaskImp implements Runnable {
private
DownloadRequest
request
;
private
DownloadRequest
request
;
private
DownloadPresenter
presenter
;
private
DownloadPresenter
presenter
;
public
DownloadTaskImp
(
DownloadRequest
request
,
DownloadPresenter
presenter
)
{
// public DownloadTaskImp(DownloadRequest request, DownloadPresenter presenter) {
// this.request = request;
// this.presenter = presenter;
// }
public
DownloadTaskImp
(
DownloadRequest
request
)
{
this
.
request
=
request
;
this
.
request
=
request
;
this
.
presenter
=
presenter
;
this
.
presenter
=
presenter
;
}
}
@Override
@Override
public
void
run
()
{
public
void
run
()
{
switch
(
request
.
getDownTag
())
{
//
switch (request.getDownTag()) {
case
0
:
//
case 0:
presenter
.
downFun
(
request
.
getDownTag
());
//
presenter.downFun(request.getDownTag());
break
;
//
break;
case
1
:
//
case 1:
presenter
.
downFoodList
(
request
.
getDownTag
());
//
presenter.downFoodList(request.getDownTag());
break
;
//
break;
case
2
:
//
case 2:
presenter
.
downModifier
(
request
.
getDownTag
());
//
presenter.downModifier(request.getDownTag());
break
;
//
break;
case
3
:
//
case 3:
presenter
.
downFoodCombo
(
request
.
getDownTag
());
//
presenter.downFoodCombo(request.getDownTag());
break
;
//
break;
case
4
:
//
case 4:
presenter
.
downComboItem
(
request
.
getDownTag
());
//
presenter.downComboItem(request.getDownTag());
break
;
//
break;
case
5
:
//
case 5:
presenter
.
downFoodModifier
(
request
.
getDownTag
());
//
presenter.downFoodModifier(request.getDownTag());
break
;
//
break;
case
6
:
//
case 6:
presenter
.
downDiscount
(
request
.
getDownTag
());
//
presenter.downDiscount(request.getDownTag());
break
;
//
break;
case
7
:
//
case 7:
presenter
.
downExpandInfo
(
request
.
getDownTag
());
//
presenter.downExpandInfo(request.getDownTag());
break
;
//
break;
case
8
:
//
case 8:
presenter
.
downPrinterList
(
request
.
getDownTag
());
//
presenter.downPrinterList(request.getDownTag());
break
;
//
break;
}
//
}
}
}
}
}
download-module/src/main/java/com/gingersoft/gsa/cloud/download/mvp/model/service/DownloadService.java
View file @
cc2bb8ac
...
@@ -46,4 +46,7 @@ public interface DownloadService {
...
@@ -46,4 +46,7 @@ public interface DownloadService {
@GET
(
Api
.
printerDevice_list
+
RetrofitUrlManager
.
IDENTIFICATION_PATH_SIZE
+
2
)
@GET
(
Api
.
printerDevice_list
+
RetrofitUrlManager
.
IDENTIFICATION_PATH_SIZE
+
2
)
Observable
<
BaseResult
>
downPrinterList
(
@Query
(
"restaurantId"
)
int
restaurantId
);
Observable
<
BaseResult
>
downPrinterList
(
@Query
(
"restaurantId"
)
int
restaurantId
);
@GET
(
Api
.
color_list
+
RetrofitUrlManager
.
IDENTIFICATION_PATH_SIZE
+
2
)
Observable
<
BaseResult
>
downColorList
();
}
}
download-module/src/main/java/com/gingersoft/gsa/cloud/download/mvp/presenter/DownloadPresenter.java
View file @
cc2bb8ac
This diff is collapsed.
Click to expand it.
main-module/src/main/java/com/gingersoft/gsa/cloud/main/mvp/ui/activity/ExpandListActivity.java
View file @
cc2bb8ac
...
@@ -132,7 +132,7 @@ public class ExpandListActivity extends BaseActivity<ExpandListPresenter> implem
...
@@ -132,7 +132,7 @@ public class ExpandListActivity extends BaseActivity<ExpandListPresenter> implem
List
<
ExpandInfo
>
data
=
expandListAdapter
.
getData
();
List
<
ExpandInfo
>
data
=
expandListAdapter
.
getData
();
List
<
ExpandInfo
>
updateDate
=
new
ArrayList
<>();
List
<
ExpandInfo
>
updateDate
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
data
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
data
.
size
();
i
++)
{
if
(
data
.
get
(
i
).
getI
sUpdate
())
{
if
(
data
.
get
(
i
).
i
sUpdate
())
{
updateDate
.
add
(
data
.
get
(
i
));
updateDate
.
add
(
data
.
get
(
i
));
}
}
}
}
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/bean/mvp/presenter/BaseOrderPresenter.java
View file @
cc2bb8ac
...
@@ -1400,7 +1400,7 @@ public abstract class BaseOrderPresenter<M extends BaseOrderContract.Model, V ex
...
@@ -1400,7 +1400,7 @@ public abstract class BaseOrderPresenter<M extends BaseOrderContract.Model, V ex
*
*
* @param foodList
* @param foodList
*/
*/
pr
ivate
void
mergeMainFoodNumber
(
List
<
OrderDetail
>
foodList
)
{
pr
otected
void
mergeMainFoodNumber
(
List
<
OrderDetail
>
foodList
)
{
List
<
Integer
>
removeIndexs
=
new
ArrayList
<>();
List
<
Integer
>
removeIndexs
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
foodList
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
foodList
.
size
();
i
++)
{
OrderDetail
orderFood
=
foodList
.
get
(
i
);
OrderDetail
orderFood
=
foodList
.
get
(
i
);
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/bean/mvp/presenter/MealStandPresenter.java
View file @
cc2bb8ac
...
@@ -864,6 +864,10 @@ public class MealStandPresenter extends BaseOrderPresenter<MealStandContract.Mod
...
@@ -864,6 +864,10 @@ public class MealStandPresenter extends BaseOrderPresenter<MealStandContract.Mod
*/
*/
private
void
printSendOrder
(
boolean
initTable
)
{
private
void
printSendOrder
(
boolean
initTable
)
{
if
(
RestaurantExpandInfoUtils
.
getValue
(
ExpandConstant
.
AutoPrinterPaper
,
true
))
{
if
(
RestaurantExpandInfoUtils
.
getValue
(
ExpandConstant
.
AutoPrinterPaper
,
true
))
{
if
(
RestaurantExpandInfoUtils
.
getValue
(
ExpandConstant
.
MergeSendFood
,
true
))
{
//合并主食品
mergeMainFoodNumber
(
mOrderFoodList
);
}
CC
.
obtainBuilder
(
"Component.Print"
)
CC
.
obtainBuilder
(
"Component.Print"
)
.
setActionName
(
"printActivity"
)
.
setActionName
(
"printActivity"
)
.
addParam
(
PrintConstans
.
PRINT_TYPE
,
PrintConstans
.
PRINT_SERVE
)
.
addParam
(
PrintConstans
.
PRINT_TYPE
,
PrintConstans
.
PRINT_SERVE
)
...
@@ -871,7 +875,6 @@ public class MealStandPresenter extends BaseOrderPresenter<MealStandContract.Mod
...
@@ -871,7 +875,6 @@ public class MealStandPresenter extends BaseOrderPresenter<MealStandContract.Mod
.
callAsyncCallbackOnMainThread
((
cc
,
result
)
->
{
.
callAsyncCallbackOnMainThread
((
cc
,
result
)
->
{
if
(
result
.
isSuccess
())
{
if
(
result
.
isSuccess
())
{
}
else
{
}
else
{
mRootView
.
showMessage
(
"打印失敗"
);
mRootView
.
showMessage
(
"打印失敗"
);
}
}
//打印成功
//打印成功
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/bean/mvp/presenter/OrderContentPresenter.java
View file @
cc2bb8ac
...
@@ -379,6 +379,10 @@ public class OrderContentPresenter extends BaseOrderPresenter<OrderContentContra
...
@@ -379,6 +379,10 @@ public class OrderContentPresenter extends BaseOrderPresenter<OrderContentContra
mRootView
.
startActivityForResult
(
OrderContentActivity
.
BILL_CODE
,
afterToActivity
,
null
);
mRootView
.
startActivityForResult
(
OrderContentActivity
.
BILL_CODE
,
afterToActivity
,
null
);
}
}
if
(
RestaurantExpandInfoUtils
.
getValue
(
ExpandConstant
.
AutoPrinterPaper
,
true
))
{
if
(
RestaurantExpandInfoUtils
.
getValue
(
ExpandConstant
.
AutoPrinterPaper
,
true
))
{
if
(
RestaurantExpandInfoUtils
.
getValue
(
ExpandConstant
.
MergeSendFood
,
true
))
{
//合并主食品
mergeMainFoodNumber
(
mOrderFoodList
);
}
CC
.
obtainBuilder
(
"Component.Print"
)
CC
.
obtainBuilder
(
"Component.Print"
)
.
setActionName
(
"printActivity"
)
.
setActionName
(
"printActivity"
)
.
addParam
(
PrintConstans
.
PRINT_TYPE
,
PrintConstans
.
PRINT_SERVE
)
.
addParam
(
PrintConstans
.
PRINT_TYPE
,
PrintConstans
.
PRINT_SERVE
)
...
@@ -418,6 +422,10 @@ public class OrderContentPresenter extends BaseOrderPresenter<OrderContentContra
...
@@ -418,6 +422,10 @@ public class OrderContentPresenter extends BaseOrderPresenter<OrderContentContra
@Override
@Override
public
void
onNext
(
@NonNull
BaseOrderRespose
info
)
{
public
void
onNext
(
@NonNull
BaseOrderRespose
info
)
{
if
(
info
!=
null
&&
info
.
isSuccess
())
{
if
(
info
!=
null
&&
info
.
isSuccess
())
{
if
(
RestaurantExpandInfoUtils
.
getValue
(
ExpandConstant
.
MergeSendFood
,
true
))
{
//合并主食品
mergeMainFoodNumber
(
mOrderFoodList
);
}
CC
.
obtainBuilder
(
"Component.Print"
)
CC
.
obtainBuilder
(
"Component.Print"
)
.
addParam
(
PrintConstans
.
PRINT_TYPE
,
PrintConstans
.
PRINT_SLIP
)
//印單
.
addParam
(
PrintConstans
.
PRINT_TYPE
,
PrintConstans
.
PRINT_SLIP
)
//印單
.
setActionName
(
"printActivity"
)
.
setActionName
(
"printActivity"
)
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/bean/mvp/ui/activity/MealStandActivity.java
View file @
cc2bb8ac
...
@@ -71,6 +71,7 @@ import com.qmuiteam.qmui.util.QMUIDrawableHelper;
...
@@ -71,6 +71,7 @@ import com.qmuiteam.qmui.util.QMUIDrawableHelper;
import
org.simple.eventbus.EventBus
;
import
org.simple.eventbus.EventBus
;
import
java.text.DecimalFormat
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.List
;
...
@@ -84,6 +85,7 @@ import androidx.recyclerview.widget.GridLayoutManager;
...
@@ -84,6 +85,7 @@ import androidx.recyclerview.widget.GridLayoutManager;
import
androidx.recyclerview.widget.LinearLayoutManager
;
import
androidx.recyclerview.widget.LinearLayoutManager
;
import
androidx.recyclerview.widget.RecyclerView
;
import
androidx.recyclerview.widget.RecyclerView
;
import
androidx.viewpager.widget.ViewPager
;
import
androidx.viewpager.widget.ViewPager
;
import
butterknife.BindView
;
import
butterknife.BindView
;
import
butterknife.OnClick
;
import
butterknife.OnClick
;
import
butterknife.OnLongClick
;
import
butterknife.OnLongClick
;
...
@@ -255,8 +257,13 @@ public class MealStandActivity extends BaseFragmentActivity<MealStandPresenter>
...
@@ -255,8 +257,13 @@ public class MealStandActivity extends BaseFragmentActivity<MealStandPresenter>
private
static
final
int
ORDER_CONTENT_CODE
=
1002
;
private
static
final
int
ORDER_CONTENT_CODE
=
1002
;
public
static
final
int
SCAN_REQUEST_CODE
=
0x0000c0de
;
public
static
final
int
SCAN_REQUEST_CODE
=
0x0000c0de
;
private
int
ComboColCount
=
4
;
private
int
foodGroupRow
=
2
;
private
int
DiscountCol
=
3
;
private
int
foodGroupColumn
=
6
;
private
int
foodColumn
=
4
;
private
int
comboColumn
=
4
;
private
int
modColumn
=
4
;
private
int
discountColumn
=
4
;
@Override
@Override
public
void
setupActivityComponent
(
@NonNull
AppComponent
appComponent
)
{
public
void
setupActivityComponent
(
@NonNull
AppComponent
appComponent
)
{
...
@@ -282,6 +289,7 @@ public class MealStandActivity extends BaseFragmentActivity<MealStandPresenter>
...
@@ -282,6 +289,7 @@ public class MealStandActivity extends BaseFragmentActivity<MealStandPresenter>
@Override
@Override
public
void
initData
(
@Nullable
Bundle
savedInstanceState
)
{
public
void
initData
(
@Nullable
Bundle
savedInstanceState
)
{
initUIStyleConfiguration
();
initViewMap
();
initViewMap
();
//初始化Plu模式
//初始化Plu模式
setPluMode
();
setPluMode
();
...
@@ -306,6 +314,15 @@ public class MealStandActivity extends BaseFragmentActivity<MealStandPresenter>
...
@@ -306,6 +314,15 @@ public class MealStandActivity extends BaseFragmentActivity<MealStandPresenter>
initTableDetail
();
initTableDetail
();
}
}
private
void
initUIStyleConfiguration
()
{
foodGroupColumn
=
GsaCloudApplication
.
uiStyleConfiguration
.
getFoodGroupColumn
();
foodGroupRow
=
GsaCloudApplication
.
uiStyleConfiguration
.
getFoodGroupRow
();
foodColumn
=
GsaCloudApplication
.
uiStyleConfiguration
.
getFoodColumn
();
comboColumn
=
GsaCloudApplication
.
uiStyleConfiguration
.
getComboColumn
();
modColumn
=
GsaCloudApplication
.
uiStyleConfiguration
.
getModColumn
();
discountColumn
=
GsaCloudApplication
.
uiStyleConfiguration
.
getModColumn
();
}
private
void
initTableDetail
()
{
private
void
initTableDetail
()
{
if
(
OpenTableManage
.
getDefault
().
getPeopleNumber
()
==
0
)
{
if
(
OpenTableManage
.
getDefault
().
getPeopleNumber
()
==
0
)
{
showChoosePeopleNumDialog
(
false
);
showChoosePeopleNumDialog
(
false
);
...
@@ -342,11 +359,17 @@ public class MealStandActivity extends BaseFragmentActivity<MealStandPresenter>
...
@@ -342,11 +359,17 @@ public class MealStandActivity extends BaseFragmentActivity<MealStandPresenter>
//总的页数向上取整
//总的页数向上取整
totalPage
=
(
int
)
Math
.
ceil
(
foodGroupList
.
size
()
*
1.0
/
GoldConstants
.
foodGriupPageSize
);
totalPage
=
(
int
)
Math
.
ceil
(
foodGroupList
.
size
()
*
1.0
/
GoldConstants
.
foodGriupPageSize
);
int
Rows
=
GoldConstants
.
foodGriupRows
;
// int Rows = GoldConstants.foodGriupRows;
if
(
foodGroupList
.
size
()
<=
GoldConstants
.
foodGriupColumns
)
{
// if (foodGroupList.size() <= GoldConstants.foodGriupColumns) {
// Rows = 1;
// }
// mLayoutManager = new PagerGridLayoutManager(Rows, GoldConstants.foodGriupColumns, PagerGridLayoutManager.HORIZONTAL);
int
Rows
=
foodGroupRow
;
if
(
foodGroupList
.
size
()
<=
foodGroupColumn
)
{
Rows
=
1
;
Rows
=
1
;
}
}
mLayoutManager
=
new
PagerGridLayoutManager
(
Rows
,
GoldConstants
.
foodGriupColumns
,
PagerGridLayoutManager
.
HORIZONTAL
);
mLayoutManager
=
new
PagerGridLayoutManager
(
Rows
,
foodGroupColumn
,
PagerGridLayoutManager
.
HORIZONTAL
);
// 水平分页布局管理器
// 水平分页布局管理器
mLayoutManager
.
setPageListener
(
this
);
mLayoutManager
.
setPageListener
(
this
);
...
@@ -379,7 +402,7 @@ public class MealStandActivity extends BaseFragmentActivity<MealStandPresenter>
...
@@ -379,7 +402,7 @@ public class MealStandActivity extends BaseFragmentActivity<MealStandPresenter>
}
}
});
});
int
mParentColHeight
=
GsaCloudApplication
.
androidSetting
.
getLayoutFoodTypeHeight
()
/
GsaCloudApplication
.
androidSetting
.
getFoodTypeRow
()
*
Rows
;
int
mParentColHeight
=
GsaCloudApplication
.
uiStyleConfiguration
.
getFoodGroupBtnHeight
()
*
Rows
;
//设置ViewPager适配器
//设置ViewPager适配器
rv_food_group
.
setLayoutParams
(
new
LinearLayout
.
LayoutParams
(
rv_food_group
.
setLayoutParams
(
new
LinearLayout
.
LayoutParams
(
...
@@ -794,7 +817,7 @@ public class MealStandActivity extends BaseFragmentActivity<MealStandPresenter>
...
@@ -794,7 +817,7 @@ public class MealStandActivity extends BaseFragmentActivity<MealStandPresenter>
public
void
onChronometerTick
(
Chronometer
chronometer
)
{
public
void
onChronometerTick
(
Chronometer
chronometer
)
{
// 执行一下看看是否按下了home键的线程
// 执行一下看看是否按下了home键的线程
// 如果开始计时到现在超过了autoQuitTime秒
// 如果开始计时到现在超过了autoQuitTime秒
if
(
SystemClock
.
elapsedRealtime
()
-
chronometer
.
getBase
()
>
GsaCloudApplication
.
androidSetting
.
getAutoQuitTime
()
*
1000
)
{
if
(
SystemClock
.
elapsedRealtime
()
-
chronometer
.
getBase
()
>
GsaCloudApplication
.
functionConfiguration
.
getAutoQuitTime
()
*
1000
)
{
// 停止计时
// 停止计时
chronometer
.
stop
();
chronometer
.
stop
();
returnBeforeActivity
(
true
);
returnBeforeActivity
(
true
);
...
@@ -967,14 +990,30 @@ public class MealStandActivity extends BaseFragmentActivity<MealStandPresenter>
...
@@ -967,14 +990,30 @@ public class MealStandActivity extends BaseFragmentActivity<MealStandPresenter>
@Override
@Override
public
void
setFoodGroupRecycleSpanCount
(
int
size
)
{
public
void
setFoodGroupRecycleSpanCount
(
int
size
)
{
DecimalFormat
df
=
new
DecimalFormat
(
"###.00"
);
String
span
=
df
.
format
((
double
)
size
/
foodGroupColumn
);
int
spanCount
=
(
int
)
Math
.
ceil
(
Double
.
parseDouble
(
span
));
//33.333
boolean
twoRow
=
spanCount
>
1
&&
spanCount
<
2
||
spanCount
==
2
;
// if (size <= foodGroupColumn) {
// setFoodGroupRecycleLayoutManager(GridLayoutManager.HORIZONTAL);
// foodGroupRecycleLayoutManager.setSpanCount(1);
// } else if (twoRow) {
// setFoodGroupRecycleLayoutManager(GridLayoutManager.VERTICAL);
// foodGroupRecycleLayoutManager.setSpanCount(foodGroupColumn);
// } else {
// setFoodGroupRecycleLayoutManager(GridLayoutManager.HORIZONTAL);
// foodGroupRecycleLayoutManager.setSpanCount(foodGroupColumn);
// }
}
}
@Override
@Override
public
void
setFoodRecycleSpanCount
(
int
size
)
{
public
void
setFoodRecycleSpanCount
(
int
size
)
{
if
(
size
>
0
)
{
if
(
size
>
0
)
{
if
(
size
>
GoldConstants
.
DetailColCount
)
{
if
(
size
>
foodColumn
)
{
setFoodRecycleLayoutManager
(
LinearLayoutManager
.
VERTICAL
);
setFoodRecycleLayoutManager
(
LinearLayoutManager
.
VERTICAL
);
foodRecycleLayoutManager
.
setSpanCount
(
GoldConstants
.
DetailColCount
);
foodRecycleLayoutManager
.
setSpanCount
(
foodColumn
);
}
else
{
}
else
{
//只有一行就使用水平显示以免不能占满
//只有一行就使用水平显示以免不能占满
setFoodRecycleLayoutManager
(
LinearLayoutManager
.
HORIZONTAL
);
setFoodRecycleLayoutManager
(
LinearLayoutManager
.
HORIZONTAL
);
...
@@ -985,9 +1024,9 @@ public class MealStandActivity extends BaseFragmentActivity<MealStandPresenter>
...
@@ -985,9 +1024,9 @@ public class MealStandActivity extends BaseFragmentActivity<MealStandPresenter>
@Override
@Override
public
void
setComboRecycleSpanCount
(
int
size
)
{
public
void
setComboRecycleSpanCount
(
int
size
)
{
if
(
size
>
0
)
{
if
(
size
>
0
)
{
// if (size >
ComboColCount
) {
// if (size >
comboRow
) {
setComboRecycleLayoutManager
(
LinearLayoutManager
.
VERTICAL
);
setComboRecycleLayoutManager
(
LinearLayoutManager
.
VERTICAL
);
comboRecycleLayoutManager
.
setSpanCount
(
ComboColCount
);
comboRecycleLayoutManager
.
setSpanCount
(
comboColumn
);
// } else if (size <= ComboColCount) {
// } else if (size <= ComboColCount) {
// } else {
// } else {
// //只有一行就使用水平显示以免不能占满
// //只有一行就使用水平显示以免不能占满
...
@@ -999,9 +1038,9 @@ public class MealStandActivity extends BaseFragmentActivity<MealStandPresenter>
...
@@ -999,9 +1038,9 @@ public class MealStandActivity extends BaseFragmentActivity<MealStandPresenter>
@Override
@Override
public
void
setModifierRecycleSpanCount
(
int
size
)
{
public
void
setModifierRecycleSpanCount
(
int
size
)
{
if
(
size
>
0
)
{
if
(
size
>
0
)
{
// if (size >
ComboColCount
) {
// if (size >
modRow
) {
setModifierRecycleLayoutManager
(
LinearLayoutManager
.
VERTICAL
);
setModifierRecycleLayoutManager
(
LinearLayoutManager
.
VERTICAL
);
modifierRecycleLayoutManager
.
setSpanCount
(
ComboColCount
);
modifierRecycleLayoutManager
.
setSpanCount
(
modColumn
);
// } else if (size <= ComboColCount) {
// } else if (size <= ComboColCount) {
// } else {
// } else {
// //只有一行就使用水平显示以免不能占满
// //只有一行就使用水平显示以免不能占满
...
@@ -1014,7 +1053,7 @@ public class MealStandActivity extends BaseFragmentActivity<MealStandPresenter>
...
@@ -1014,7 +1053,7 @@ public class MealStandActivity extends BaseFragmentActivity<MealStandPresenter>
public
void
setDiscountRecycleSpanCount
(
int
size
)
{
public
void
setDiscountRecycleSpanCount
(
int
size
)
{
if
(
size
>
0
)
{
if
(
size
>
0
)
{
setDiscountRecycleLayoutManager
(
LinearLayoutManager
.
VERTICAL
);
setDiscountRecycleLayoutManager
(
LinearLayoutManager
.
VERTICAL
);
discountRecycleLayoutManager
.
setSpanCount
(
DiscountCol
);
discountRecycleLayoutManager
.
setSpanCount
(
discountColumn
);
}
}
}
}
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/bean/mvp/ui/activity/OrderContentActivity.java
View file @
cc2bb8ac
...
@@ -445,7 +445,7 @@ public class OrderContentActivity extends BaseFragmentActivity<OrderContentPrese
...
@@ -445,7 +445,7 @@ public class OrderContentActivity extends BaseFragmentActivity<OrderContentPrese
public
void
onChronometerTick
(
Chronometer
chronometer
)
{
public
void
onChronometerTick
(
Chronometer
chronometer
)
{
// 执行一下看看是否按下了home键的线程
// 执行一下看看是否按下了home键的线程
// 如果开始计时到现在超过了autoQuitTime秒
// 如果开始计时到现在超过了autoQuitTime秒
if
(
SystemClock
.
elapsedRealtime
()
-
chronometer
.
getBase
()
>
GsaCloudApplication
.
androidSetting
.
getAutoQuitTime
()
*
1000
)
{
if
(
SystemClock
.
elapsedRealtime
()
-
chronometer
.
getBase
()
>
GsaCloudApplication
.
functionConfiguration
.
getAutoQuitTime
()
*
1000
)
{
// 停止计时
// 停止计时
chronometer
.
stop
();
chronometer
.
stop
();
returnTableActivity
(
true
);
returnTableActivity
(
true
);
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/bean/mvp/ui/activity/SoldoutCtrlActivity.java
View file @
cc2bb8ac
...
@@ -138,7 +138,6 @@ public class SoldoutCtrlActivity extends BaseFragmentActivity<SoldoutCtrlPresent
...
@@ -138,7 +138,6 @@ public class SoldoutCtrlActivity extends BaseFragmentActivity<SoldoutCtrlPresent
private
FineItemOneselfFragment
oneselfFineItemFragment
;
private
FineItemOneselfFragment
oneselfFineItemFragment
;
private
FineItemAllFragment
modMsgFineItemFragment
,
modSasteFineItemFragment
;
private
FineItemAllFragment
modMsgFineItemFragment
,
modSasteFineItemFragment
;
private
String
[]
mFineTabTitles
=
{
"子項"
,
"口味"
,
"特別信息"
};
private
String
[]
mFineTabTitles
=
{
"子項"
,
"口味"
,
"特別信息"
};
// private String[] mFineTabTitles = {"口味", "特別信息"};
private
int
mCurrentFinePageIndex
;
private
int
mCurrentFinePageIndex
;
private
boolean
mInitModData
=
false
;
private
boolean
mInitModData
=
false
;
...
@@ -149,10 +148,9 @@ public class SoldoutCtrlActivity extends BaseFragmentActivity<SoldoutCtrlPresent
...
@@ -149,10 +148,9 @@ public class SoldoutCtrlActivity extends BaseFragmentActivity<SoldoutCtrlPresent
private
FoodGroupAdapter
mFoodGroupAdapter
;
private
FoodGroupAdapter
mFoodGroupAdapter
;
private
PagerGridLayoutManager
mLayoutManager
;
private
PagerGridLayoutManager
mLayoutManager
;
private
int
mParentRowCount
;
private
int
foodGroupRow
=
2
;
private
int
mParentColCount
;
private
int
foodGroupColumn
=
6
;
private
int
mDetailColCount
=
1
;
private
int
foodColumn
=
4
;
@Override
@Override
public
void
setupActivityComponent
(
@NonNull
AppComponent
appComponent
)
{
public
void
setupActivityComponent
(
@NonNull
AppComponent
appComponent
)
{
...
@@ -225,9 +223,9 @@ public class SoldoutCtrlActivity extends BaseFragmentActivity<SoldoutCtrlPresent
...
@@ -225,9 +223,9 @@ public class SoldoutCtrlActivity extends BaseFragmentActivity<SoldoutCtrlPresent
para1
.
height
=
screenHeidth
*
33
/
100
;
para1
.
height
=
screenHeidth
*
33
/
100
;
recycle_current_soldout_food
.
setLayoutParams
(
para1
);
recycle_current_soldout_food
.
setLayoutParams
(
para1
);
mParentRowCount
=
GsaCloudApplication
.
androidSetting
.
getFoodTypeRow
();
foodGroupColumn
=
GsaCloudApplication
.
uiStyleConfiguration
.
getFoodGroupColumn
();
mParentColCount
=
GsaCloudApplication
.
androidSetting
.
getFoodTypeCol
();
foodGroupRow
=
GsaCloudApplication
.
uiStyleConfiguration
.
getFoodGroupRow
();
mDetailColCount
=
GsaCloudApplication
.
androidSetting
.
getFoodCol
();
foodColumn
=
GsaCloudApplication
.
uiStyleConfiguration
.
getFoodColumn
();
}
}
public
void
initFoodGroupView
(
List
<
Food
>
foodGroupList
)
{
public
void
initFoodGroupView
(
List
<
Food
>
foodGroupList
)
{
...
@@ -235,11 +233,12 @@ public class SoldoutCtrlActivity extends BaseFragmentActivity<SoldoutCtrlPresent
...
@@ -235,11 +233,12 @@ 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
=
GoldConstants
.
foodGriupRows
;
if
(
foodGroupList
.
size
()
<=
GoldConstants
.
foodGriupColumns
)
{
int
Rows
=
foodGroupRow
;
if
(
foodGroupList
.
size
()
<=
foodGroupColumn
)
{
Rows
=
1
;
Rows
=
1
;
}
}
mLayoutManager
=
new
PagerGridLayoutManager
(
Rows
,
GoldConstants
.
foodGriupColumns
,
PagerGridLayoutManager
.
HORIZONTAL
);
mLayoutManager
=
new
PagerGridLayoutManager
(
Rows
,
foodGroupColumn
,
PagerGridLayoutManager
.
HORIZONTAL
);
// 水平分页布局管理器
// 水平分页布局管理器
mLayoutManager
.
setPageListener
(
this
);
mLayoutManager
.
setPageListener
(
this
);
...
@@ -256,7 +255,6 @@ public class SoldoutCtrlActivity extends BaseFragmentActivity<SoldoutCtrlPresent
...
@@ -256,7 +255,6 @@ public class SoldoutCtrlActivity extends BaseFragmentActivity<SoldoutCtrlPresent
@Override
@Override
public
void
onChanged
()
{
public
void
onChanged
()
{
super
.
onChanged
();
super
.
onChanged
();
int
count
=
mFoodGroupAdapter
.
getItemCount
();
}
}
});
});
...
@@ -301,7 +299,7 @@ public class SoldoutCtrlActivity extends BaseFragmentActivity<SoldoutCtrlPresent
...
@@ -301,7 +299,7 @@ public class SoldoutCtrlActivity extends BaseFragmentActivity<SoldoutCtrlPresent
}
}
});
});
int
mParentColHeight
=
GsaCloudApplication
.
androidSetting
.
getLayoutFoodTypeHeight
()
/
GsaCloudApplication
.
androidSetting
.
getFoodType
Row
()
*
Rows
;
int
mParentColHeight
=
GsaCloudApplication
.
uiStyleConfiguration
.
getFoodGroupBtnHeight
()
/
GsaCloudApplication
.
uiStyleConfiguration
.
getFoodGroup
Row
()
*
Rows
;
//设置ViewPager适配器
//设置ViewPager适配器
recycle_food_group
.
setLayoutParams
(
new
LinearLayout
.
LayoutParams
(
ViewGroup
.
LayoutParams
.
MATCH_PARENT
,
mParentColHeight
));
recycle_food_group
.
setLayoutParams
(
new
LinearLayout
.
LayoutParams
(
ViewGroup
.
LayoutParams
.
MATCH_PARENT
,
mParentColHeight
));
...
@@ -639,10 +637,10 @@ public class SoldoutCtrlActivity extends BaseFragmentActivity<SoldoutCtrlPresent
...
@@ -639,10 +637,10 @@ public class SoldoutCtrlActivity extends BaseFragmentActivity<SoldoutCtrlPresent
@Override
@Override
public
void
setFoodRecycleSpanCount
(
int
size
)
{
public
void
setFoodRecycleSpanCount
(
int
size
)
{
if
(
size
>
0
)
{
if
(
size
>
0
)
{
if
(
size
>
mDetailColCount
)
{
if
(
size
>
foodColumn
)
{
initFoodLayoutManager
(
LinearLayoutManager
.
VERTICAL
);
initFoodLayoutManager
(
LinearLayoutManager
.
VERTICAL
);
foodRecycleLayoutManager
.
setSpanCount
(
mDetailColCount
);
foodRecycleLayoutManager
.
setSpanCount
(
foodColumn
);
}
else
if
(
size
<=
mDetailColCount
)
{
}
else
{
//只有一行就使用水平显示以免不能占满
//只有一行就使用水平显示以免不能占满
initFoodLayoutManager
(
LinearLayoutManager
.
HORIZONTAL
);
initFoodLayoutManager
(
LinearLayoutManager
.
HORIZONTAL
);
}
}
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/bean/mvp/ui/adapter/CurrentSlodoutFoodAdapter.java
View file @
cc2bb8ac
...
@@ -28,9 +28,8 @@ import butterknife.BindView;
...
@@ -28,9 +28,8 @@ import butterknife.BindView;
public
class
CurrentSlodoutFoodAdapter
extends
DefaultAdapter
<
SoldoutCtrFood
>
{
public
class
CurrentSlodoutFoodAdapter
extends
DefaultAdapter
<
SoldoutCtrFood
>
{
private
Context
mContext
;
private
Context
mContext
;
private
View
convertView
;
//字体大小
//字体大小
private
int
mFoodlList
FontSize
;
private
int
soldoutCtrlFood
FontSize
;
private
int
select_position
=
0
;
private
int
select_position
=
0
;
...
@@ -38,7 +37,7 @@ public class CurrentSlodoutFoodAdapter extends DefaultAdapter<SoldoutCtrFood> {
...
@@ -38,7 +37,7 @@ public class CurrentSlodoutFoodAdapter extends DefaultAdapter<SoldoutCtrFood> {
public
CurrentSlodoutFoodAdapter
(
Context
context
,
List
<
SoldoutCtrFood
>
infos
)
{
public
CurrentSlodoutFoodAdapter
(
Context
context
,
List
<
SoldoutCtrFood
>
infos
)
{
super
(
infos
);
super
(
infos
);
this
.
mContext
=
context
;
this
.
mContext
=
context
;
this
.
mFoodlListFontSize
=
GsaCloudApplication
.
androidSetting
.
getFoodlList
FontSize
();
this
.
soldoutCtrlFoodFontSize
=
GsaCloudApplication
.
uiStyleConfiguration
.
getSoldoutCtrlFood
FontSize
();
}
}
public
void
setSelectPosition
(
int
select_position
)
{
public
void
setSelectPosition
(
int
select_position
)
{
...
@@ -83,7 +82,6 @@ public class CurrentSlodoutFoodAdapter extends DefaultAdapter<SoldoutCtrFood> {
...
@@ -83,7 +82,6 @@ public class CurrentSlodoutFoodAdapter extends DefaultAdapter<SoldoutCtrFood> {
@Override
@Override
public
BaseHolder
<
SoldoutCtrFood
>
getHolder
(
View
v
,
int
viewType
)
{
public
BaseHolder
<
SoldoutCtrFood
>
getHolder
(
View
v
,
int
viewType
)
{
convertView
=
v
;
return
new
CurrentSlodoutItemHolder
(
v
);
return
new
CurrentSlodoutItemHolder
(
v
);
}
}
...
@@ -122,9 +120,9 @@ public class CurrentSlodoutFoodAdapter extends DefaultAdapter<SoldoutCtrFood> {
...
@@ -122,9 +120,9 @@ public class CurrentSlodoutFoodAdapter extends DefaultAdapter<SoldoutCtrFood> {
tv_value
.
setText
(
datasBean
.
getQtyName
());
tv_value
.
setText
(
datasBean
.
getQtyName
());
//设置字体
//设置字体
tv_value
.
setTextSize
(
mFoodlList
FontSize
);
tv_value
.
setTextSize
(
soldoutCtrlFood
FontSize
);
tv_name
.
setTextSize
(
mFoodlList
FontSize
);
tv_name
.
setTextSize
(
soldoutCtrlFood
FontSize
);
tv_number
.
setTextSize
(
mFoodlList
FontSize
);
tv_number
.
setTextSize
(
soldoutCtrlFood
FontSize
);
int
selected
=
datasBean
.
getSelected
();
int
selected
=
datasBean
.
getSelected
();
switch
(
selected
)
{
switch
(
selected
)
{
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/bean/mvp/ui/adapter/FineItemOneAdapter.java
View file @
cc2bb8ac
...
@@ -57,11 +57,11 @@ public class FineItemOneAdapter extends DefaultAdapter<Modifier> {
...
@@ -57,11 +57,11 @@ public class FineItemOneAdapter extends DefaultAdapter<Modifier> {
public
FineItemOneAdapter
(
Context
context
,
List
<
Modifier
>
infos
)
{
public
FineItemOneAdapter
(
Context
context
,
List
<
Modifier
>
infos
)
{
super
(
infos
);
super
(
infos
);
this
.
mContext
=
context
;
this
.
mContext
=
context
;
this
.
mOrderNumberShowSize
=
GsaCloudApplication
.
androidSetting
.
getOrderNumberChildShowSize
();
this
.
mOrderNumberShowSize
=
GsaCloudApplication
.
uiStyleConfiguration
.
getOrderNumberChildShowSize
();
this
.
mOrderNumberFontSize
=
GsaCloudApplication
.
androidSetting
.
getOrderNumberChildFontSize
();
this
.
mOrderNumberFontSize
=
GsaCloudApplication
.
uiStyleConfiguration
.
getOrderNumberChildFontSize
();
this
.
mModFontSize
=
GsaCloudApplication
.
androidSetting
.
getModFontSize
();
this
.
mModFontSize
=
GsaCloudApplication
.
uiStyleConfiguration
.
getModFontSize
();
this
.
mColHeight
=
GsaCloudApplication
.
androidSetting
.
getModBtnHeight
();
this
.
mColHeight
=
GsaCloudApplication
.
uiStyleConfiguration
.
getModBtnHeight
();
this
.
mColwidth
=
(
int
)
((
DeviceUtils
.
getScreenWidth
(
context
)
/
GsaCloudApplication
.
androidSetting
.
getModCol
()));
this
.
mColwidth
=
(
int
)
((
DeviceUtils
.
getScreenWidth
(
context
)
/
GsaCloudApplication
.
uiStyleConfiguration
.
getModColumn
()));
// Db_Color dc = new Db_Color(context);
// Db_Color dc = new Db_Color(context);
// mColorList = dc.query("");
// mColorList = dc.query("");
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/bean/mvp/ui/adapter/FineItemTwoAdapter.java
View file @
cc2bb8ac
...
@@ -58,11 +58,11 @@ public class FineItemTwoAdapter extends DefaultAdapter<Modifier> {
...
@@ -58,11 +58,11 @@ public class FineItemTwoAdapter extends DefaultAdapter<Modifier> {
public
FineItemTwoAdapter
(
Context
context
,
List
<
Modifier
>
infos
)
{
public
FineItemTwoAdapter
(
Context
context
,
List
<
Modifier
>
infos
)
{
super
(
infos
);
super
(
infos
);
this
.
mContext
=
context
;
this
.
mContext
=
context
;
this
.
mOrderNumberShowSize
=
GsaCloudApplication
.
androidSetting
.
getOrderNumberChildShowSize
();
this
.
mOrderNumberShowSize
=
GsaCloudApplication
.
uiStyleConfiguration
.
getOrderNumberChildShowSize
();
this
.
mOrderNumberFontSize
=
GsaCloudApplication
.
androidSetting
.
getOrderNumberChildFontSize
();
this
.
mOrderNumberFontSize
=
GsaCloudApplication
.
uiStyleConfiguration
.
getOrderNumberChildFontSize
();
this
.
mModFontSize
=
GsaCloudApplication
.
androidSetting
.
getModFontSize
();
this
.
mModFontSize
=
GsaCloudApplication
.
uiStyleConfiguration
.
getModFontSize
();
this
.
mColwidth
=
(
int
)
((
DeviceUtils
.
getScreenWidth
(
context
)
/
GsaCloudApplication
.
androidSetting
.
getModCol
()));
this
.
mColwidth
=
(
int
)
((
DeviceUtils
.
getScreenWidth
(
context
)
/
GsaCloudApplication
.
uiStyleConfiguration
.
getModColumn
()));
this
.
mColHeight
=
GsaCloudApplication
.
androidSetting
.
getModBtnHeight
();
this
.
mColHeight
=
GsaCloudApplication
.
uiStyleConfiguration
.
getModBtnHeight
();
// Db_Color dc = new Db_Color(context);
// Db_Color dc = new Db_Color(context);
// mColorList = dc.query("");
// mColorList = dc.query("");
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/bean/mvp/ui/adapter/meal/ComboAdapter.java
View file @
cc2bb8ac
...
@@ -52,10 +52,10 @@ public class ComboAdapter extends DefaultAdapter<ComboItem> {
...
@@ -52,10 +52,10 @@ public class ComboAdapter extends DefaultAdapter<ComboItem> {
int
ComboColCount
=
4
;
int
ComboColCount
=
4
;
int
screenWidth
=
(
int
)
DeviceUtils
.
getScreenWidth
(
context
);
int
screenWidth
=
(
int
)
DeviceUtils
.
getScreenWidth
(
context
);
ColWidth
=
((
screenWidth
-
ComboColCount
)
/
ComboColCount
);
ColWidth
=
((
screenWidth
-
ComboColCount
)
/
ComboColCount
);
ColHeight
=
GsaCloudApplication
.
androidSetting
.
getModBtnHeight
();
ColHeight
=
GsaCloudApplication
.
uiStyleConfiguration
.
getModBtnHeight
();
FontSize
=
GsaCloudApplication
.
androidSetting
.
getModFontSize
();
FontSize
=
GsaCloudApplication
.
uiStyleConfiguration
.
getModFontSize
();
OrderNumberChildShowSize
=
GsaCloudApplication
.
androidSetting
.
getOrderNumberChildShowSize
();
OrderNumberChildShowSize
=
GsaCloudApplication
.
uiStyleConfiguration
.
getOrderNumberChildShowSize
();
OrderNumberChildFontSize
=
GsaCloudApplication
.
androidSetting
.
getOrderNumberChildFontSize
();
OrderNumberChildFontSize
=
GsaCloudApplication
.
uiStyleConfiguration
.
getOrderNumberChildFontSize
();
}
}
@Override
@Override
...
@@ -252,7 +252,7 @@ public class ComboAdapter extends DefaultAdapter<ComboItem> {
...
@@ -252,7 +252,7 @@ public class ComboAdapter extends DefaultAdapter<ComboItem> {
private
void
initComboLayoutParams
()
{
private
void
initComboLayoutParams
()
{
ViewGroup
.
LayoutParams
layoutParams
=
tv_name
.
getLayoutParams
();
ViewGroup
.
LayoutParams
layoutParams
=
tv_name
.
getLayoutParams
();
//这里减2 减去分割线宽度
//这里减2 减去分割线宽度
layoutParams
.
width
=
ColWidth
-
4
;
//
layoutParams.width = ColWidth - 4;
layoutParams
.
height
=
ColHeight
;
layoutParams
.
height
=
ColHeight
;
tv_name
.
setLayoutParams
(
layoutParams
);
tv_name
.
setLayoutParams
(
layoutParams
);
}
}
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/bean/mvp/ui/adapter/meal/DiscountAdapter.java
View file @
cc2bb8ac
...
@@ -2,6 +2,7 @@ package com.gingersoft.gsa.cloud.bean.mvp.ui.adapter.meal;
...
@@ -2,6 +2,7 @@ package com.gingersoft.gsa.cloud.bean.mvp.ui.adapter.meal;
import
android.content.Context
;
import
android.content.Context
;
import
android.view.View
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.widget.TextView
;
import
android.widget.TextView
;
import
com.gingersoft.gsa.cloud.base.application.GsaCloudApplication
;
import
com.gingersoft.gsa.cloud.base.application.GsaCloudApplication
;
...
@@ -28,9 +29,7 @@ public class DiscountAdapter extends DefaultAdapter<Discount> {
...
@@ -28,9 +29,7 @@ public class DiscountAdapter extends DefaultAdapter<Discount> {
private
Context
mContext
;
private
Context
mContext
;
private
int
fontSize
;
private
int
fontSize
;
private
int
colWidth
;
private
int
colHeight
;
private
int
colHeight
;
private
int
currentSelectPosition
=
0
;
private
int
currentSelectPosition
=
0
;
...
@@ -39,10 +38,9 @@ public class DiscountAdapter extends DefaultAdapter<Discount> {
...
@@ -39,10 +38,9 @@ public class DiscountAdapter extends DefaultAdapter<Discount> {
super
(
infos
);
super
(
infos
);
this
.
mContext
=
context
;
this
.
mContext
=
context
;
fontSize
=
GsaCloudApplication
.
androidSetting
.
getModFontSize
();
fontSize
=
GsaCloudApplication
.
uiStyleConfiguration
.
getDiscountFontSize
();
// int DetailColCount = GSAApplication.androidSetting.getDiscountCol();
colHeight
=
GsaCloudApplication
.
uiStyleConfiguration
.
getDiscountHeight
();
// colWidth = (int) (DeviceUtils.getScreenWidth(mContext) / DetailColCount);
// colHeight = GSAApplication.androidSetting.getModBtnHeight();
}
}
@Override
@Override
...
@@ -72,6 +70,7 @@ public class DiscountAdapter extends DefaultAdapter<Discount> {
...
@@ -72,6 +70,7 @@ public class DiscountAdapter extends DefaultAdapter<Discount> {
@Override
@Override
public
void
setData
(
Discount
datasBean
,
int
position
)
{
public
void
setData
(
Discount
datasBean
,
int
position
)
{
initLayoutParams
();
initName
(
datasBean
);
initName
(
datasBean
);
setColor
(
datasBean
);
setColor
(
datasBean
);
}
}
...
@@ -80,10 +79,6 @@ public class DiscountAdapter extends DefaultAdapter<Discount> {
...
@@ -80,10 +79,6 @@ public class DiscountAdapter extends DefaultAdapter<Discount> {
String
desc
=
datasBean
.
getRemark
();
String
desc
=
datasBean
.
getRemark
();
tv_name
.
setText
(
desc
);
tv_name
.
setText
(
desc
);
tv_name
.
setTextSize
(
fontSize
);
tv_name
.
setTextSize
(
fontSize
);
// tv_name.setMaxWidth(colWidth);
// tv_name.setWidth(colWidth);
// tv_name.setHeight(colHeight);
}
}
private
void
setColor
(
Discount
datasBean
)
{
private
void
setColor
(
Discount
datasBean
)
{
...
@@ -94,6 +89,12 @@ public class DiscountAdapter extends DefaultAdapter<Discount> {
...
@@ -94,6 +89,12 @@ public class DiscountAdapter extends DefaultAdapter<Discount> {
tv_name
.
setBackgroundColor
(
color
);
tv_name
.
setBackgroundColor
(
color
);
tv_name
.
setTextColor
(
fontColor
);
tv_name
.
setTextColor
(
fontColor
);
}
}
private
void
initLayoutParams
()
{
ViewGroup
.
LayoutParams
layoutParams
=
tv_name
.
getLayoutParams
();
layoutParams
.
height
=
colHeight
;
tv_name
.
setLayoutParams
(
layoutParams
);
}
}
}
private
OnItemClickListener
mOnItemClickListener
;
private
OnItemClickListener
mOnItemClickListener
;
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/bean/mvp/ui/adapter/meal/FoodAdapter.java
View file @
cc2bb8ac
...
@@ -39,9 +39,6 @@ public class FoodAdapter extends DefaultAdapter<Food> {
...
@@ -39,9 +39,6 @@ public class FoodAdapter extends DefaultAdapter<Food> {
private
Context
mContext
;
private
Context
mContext
;
//所有沽清类型
private
List
<
SoldoutCtrFood
>
mCurrentSlodoutFoodList_Full
=
new
ArrayList
<>();
private
int
mOrderNumberShowSize
;
private
int
mOrderNumberShowSize
;
private
int
mOrderNumberFontSize
;
private
int
mOrderNumberFontSize
;
private
int
mFoodFontSize
;
private
int
mFoodFontSize
;
...
@@ -64,12 +61,12 @@ public class FoodAdapter extends DefaultAdapter<Food> {
...
@@ -64,12 +61,12 @@ public class FoodAdapter extends DefaultAdapter<Food> {
super
(
infos
);
super
(
infos
);
this
.
mContext
=
context
;
this
.
mContext
=
context
;
this
.
mFromType
=
fromType
;
this
.
mFromType
=
fromType
;
this
.
mOrderNumberShowSize
=
GsaCloudApplication
.
androidSetting
.
getOrderNumberChildShowSize
();
this
.
mOrderNumberShowSize
=
GsaCloudApplication
.
uiStyleConfiguration
.
getOrderNumberChildShowSize
();
this
.
mOrderNumberFontSize
=
GsaCloudApplication
.
androidSetting
.
getOrderNumberChildFontSize
();
this
.
mOrderNumberFontSize
=
GsaCloudApplication
.
uiStyleConfiguration
.
getOrderNumberChildFontSize
();
this
.
mFoodFontSize
=
GsaCloudApplication
.
androidSetting
.
getFoodFontSize
();
this
.
mFoodFontSize
=
GsaCloudApplication
.
uiStyleConfiguration
.
getFoodFontSize
();
this
.
mColwidth
=
(
int
)
((
DeviceUtils
.
getScreenWidth
(
context
)
/
GsaCloudApplication
.
androidSetting
.
getFoodCol
()));
this
.
mColwidth
=
(
int
)
((
DeviceUtils
.
getScreenWidth
(
context
)
/
GsaCloudApplication
.
uiStyleConfiguration
.
getFoodColumn
()));
this
.
mColHeight
=
GsaCloudApplication
.
androidSetting
.
getFoodBtnHeight
();
this
.
mColHeight
=
GsaCloudApplication
.
uiStyleConfiguration
.
getFoodBtnHeight
();
this
.
mLayoutQtyHeight
=
GsaCloudApplication
.
androidSetting
.
getLayoutQtyHeight
();
this
.
mLayoutQtyHeight
=
GsaCloudApplication
.
uiStyleConfiguration
.
getLayoutQtyHeight
();
}
}
@Override
@Override
...
@@ -250,16 +247,9 @@ public class FoodAdapter extends DefaultAdapter<Food> {
...
@@ -250,16 +247,9 @@ public class FoodAdapter extends DefaultAdapter<Food> {
currentSelectPosition
=
position
;
currentSelectPosition
=
position
;
}
}
if
(
mOnItemClickListener
!=
null
)
if
(
mOnItemClickListener
!=
null
)
{
mOnItemClickListener
.
onItemClick
(
mInfos
.
get
(
position
),
position
);
mOnItemClickListener
.
onItemClick
(
mInfos
.
get
(
position
),
position
);
}
}
public
List
<
SoldoutCtrFood
>
getCurrentSlodoutFoodList_Full
()
{
return
mCurrentSlodoutFoodList_Full
;
}
public
void
setCurrentSlodoutFoodList_Full
(
List
<
SoldoutCtrFood
>
mCurrentSlodoutFoodList_Full
)
{
this
.
mCurrentSlodoutFoodList_Full
=
mCurrentSlodoutFoodList_Full
;
}
}
public
int
getCurrentSelectPosition
()
{
public
int
getCurrentSelectPosition
()
{
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/bean/mvp/ui/adapter/meal/FoodGroupAdapter.java
View file @
cc2bb8ac
...
@@ -37,9 +37,6 @@ public class FoodGroupAdapter extends DefaultAdapter<Food> {
...
@@ -37,9 +37,6 @@ public class FoodGroupAdapter extends DefaultAdapter<Food> {
private
Context
mContext
;
private
Context
mContext
;
//所有沽清类型
private
List
<
SoldoutCtrFood
>
mCurrentSlodoutFoodList_Full
=
new
ArrayList
<>();
// private List<Color.DatasBean> mColorList;
private
int
mOrderNumberShowSize
;
private
int
mOrderNumberShowSize
;
private
int
mOrderNumberFontSize
;
private
int
mOrderNumberFontSize
;
private
int
FoodTypeFontSize
;
private
int
FoodTypeFontSize
;
...
@@ -59,14 +56,12 @@ public class FoodGroupAdapter extends DefaultAdapter<Food> {
...
@@ -59,14 +56,12 @@ public class FoodGroupAdapter extends DefaultAdapter<Food> {
this
.
mContext
=
context
;
this
.
mContext
=
context
;
this
.
mFromType
=
fromType
;
this
.
mFromType
=
fromType
;
this
.
mOrderNumberShowSize
=
GsaCloudApplication
.
androidSetting
.
getOrderNumberShowSize
();
this
.
mOrderNumberShowSize
=
GsaCloudApplication
.
uiStyleConfiguration
.
getOrderNumberShowSize
();
this
.
mOrderNumberFontSize
=
GsaCloudApplication
.
androidSetting
.
getOrderNumberFontSize
();
this
.
mOrderNumberFontSize
=
GsaCloudApplication
.
uiStyleConfiguration
.
getOrderNumberFontSize
();
this
.
FoodTypeFontSize
=
GsaCloudApplication
.
androidSetting
.
getFoodTypeFontSize
();
this
.
FoodTypeFontSize
=
GsaCloudApplication
.
uiStyleConfiguration
.
getFoodGroupFontSize
();
int
foodCol
=
GsaCloudApplication
.
androidSetting
.
getFoodTypeCol
();
this
.
mParentColWidth
=
(
int
)
(
DeviceUtils
.
getScreenWidth
(
context
)
/
GsaCloudApplication
.
uiStyleConfiguration
.
getFoodGroupColumn
());
this
.
mParentColWidth
=
(
int
)
(
DeviceUtils
.
getScreenWidth
(
context
)
/
foodCol
);
this
.
mParentColHeight
=
GsaCloudApplication
.
uiStyleConfiguration
.
getFoodGroupBtnHeight
();
this
.
mLayoutQtyHeight
=
GsaCloudApplication
.
uiStyleConfiguration
.
getLayoutQtyHeight
();
this
.
mParentColHeight
=
GsaCloudApplication
.
androidSetting
.
getLayoutFoodTypeHeight
()
/
GsaCloudApplication
.
androidSetting
.
getFoodTypeRow
();
this
.
mLayoutQtyHeight
=
GsaCloudApplication
.
androidSetting
.
getLayoutQtyHeight
();
}
}
...
@@ -206,7 +201,7 @@ public class FoodGroupAdapter extends DefaultAdapter<Food> {
...
@@ -206,7 +201,7 @@ public class FoodGroupAdapter extends DefaultAdapter<Food> {
tv_number
.
setTextSize
(
10
);
tv_number
.
setTextSize
(
10
);
tv_number
.
setHeight
(
mLayoutQtyHeight
);
tv_number
.
setHeight
(
mLayoutQtyHeight
);
ViewGroup
.
MarginLayoutParams
mp
=
new
ViewGroup
.
MarginLayoutParams
(
mOrderNumberShowSize
,
mOrderNumberShowSize
);
//item�Ŀ��
ViewGroup
.
MarginLayoutParams
mp
=
new
ViewGroup
.
MarginLayoutParams
(
mOrderNumberShowSize
,
mOrderNumberShowSize
);
mp
.
setMargins
(
0
,
0
,
0
,
0
);
mp
.
setMargins
(
0
,
0
,
0
,
0
);
RelativeLayout
.
LayoutParams
lp
=
new
RelativeLayout
.
LayoutParams
(
mp
);
RelativeLayout
.
LayoutParams
lp
=
new
RelativeLayout
.
LayoutParams
(
mp
);
lp
.
width
=
ArmsUtils
.
dip2px
(
mContext
,
16
);
lp
.
width
=
ArmsUtils
.
dip2px
(
mContext
,
16
);
...
@@ -240,9 +235,6 @@ public class FoodGroupAdapter extends DefaultAdapter<Food> {
...
@@ -240,9 +235,6 @@ public class FoodGroupAdapter extends DefaultAdapter<Food> {
}
}
}
}
public
void
setCurrentSlodoutFoodList_Full
(
List
<
SoldoutCtrFood
>
currentSlodoutFoodList_Full
)
{
this
.
mCurrentSlodoutFoodList_Full
=
currentSlodoutFoodList_Full
;
}
private
OnItemClickListener
mOnItemClickListener
;
private
OnItemClickListener
mOnItemClickListener
;
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/bean/mvp/ui/adapter/meal/ModifierAdapter.java
View file @
cc2bb8ac
...
@@ -33,7 +33,6 @@ public class ModifierAdapter extends DefaultAdapter<Modifier> {
...
@@ -33,7 +33,6 @@ public class ModifierAdapter extends DefaultAdapter<Modifier> {
private
Context
mContext
;
private
Context
mContext
;
private
int
ColWidth
;
private
int
ColHeight
;
private
int
ColHeight
;
private
int
FontSize
;
private
int
FontSize
;
...
@@ -45,13 +44,10 @@ public class ModifierAdapter extends DefaultAdapter<Modifier> {
...
@@ -45,13 +44,10 @@ public class ModifierAdapter extends DefaultAdapter<Modifier> {
super
(
infos
);
super
(
infos
);
this
.
mContext
=
context
;
this
.
mContext
=
context
;
int
ComboColCount
=
4
;
ColHeight
=
GsaCloudApplication
.
uiStyleConfiguration
.
getModBtnHeight
();
int
screenWidth
=
(
int
)
DeviceUtils
.
getScreenWidth
(
context
);
FontSize
=
GsaCloudApplication
.
uiStyleConfiguration
.
getModFontSize
();
ColWidth
=
((
screenWidth
-
ComboColCount
)
/
ComboColCount
);
OrderNumberChildShowSize
=
GsaCloudApplication
.
uiStyleConfiguration
.
getOrderNumberChildShowSize
();
ColHeight
=
GsaCloudApplication
.
androidSetting
.
getModBtnHeight
();
OrderNumberChildFontSize
=
GsaCloudApplication
.
uiStyleConfiguration
.
getOrderNumberChildFontSize
();
FontSize
=
GsaCloudApplication
.
androidSetting
.
getModFontSize
();
OrderNumberChildShowSize
=
GsaCloudApplication
.
androidSetting
.
getOrderNumberChildShowSize
();
OrderNumberChildFontSize
=
GsaCloudApplication
.
androidSetting
.
getOrderNumberChildFontSize
();
}
}
@Override
@Override
...
@@ -182,7 +178,7 @@ public class ModifierAdapter extends DefaultAdapter<Modifier> {
...
@@ -182,7 +178,7 @@ public class ModifierAdapter extends DefaultAdapter<Modifier> {
private
void
initModifierLayoutParams
()
{
private
void
initModifierLayoutParams
()
{
ViewGroup
.
LayoutParams
layoutParams
=
tv_name
.
getLayoutParams
();
ViewGroup
.
LayoutParams
layoutParams
=
tv_name
.
getLayoutParams
();
//这里减2 减去分割线宽度
//这里减2 减去分割线宽度
layoutParams
.
width
=
ColWidth
-
4
;
//
layoutParams.width = ColWidth - 4;
layoutParams
.
height
=
ColHeight
;
layoutParams
.
height
=
ColHeight
;
tv_name
.
setLayoutParams
(
layoutParams
);
tv_name
.
setLayoutParams
(
layoutParams
);
}
}
...
...
table-module/src/main/java/com/gingersoft/gsa/cloud/bean/mvp/ui/fragment/FineItemAllFragment.java
View file @
cc2bb8ac
...
@@ -80,7 +80,7 @@ public class FineItemAllFragment extends BaseFragment<FineItemAllPresenter> impl
...
@@ -80,7 +80,7 @@ public class FineItemAllFragment extends BaseFragment<FineItemAllPresenter> impl
@Override
@Override
public
void
initData
(
@Nullable
Bundle
savedInstanceState
)
{
public
void
initData
(
@Nullable
Bundle
savedInstanceState
)
{
modCol
=
GsaCloudApplication
.
androidSetting
.
getModCol
();
modCol
=
GsaCloudApplication
.
uiStyleConfiguration
.
getModColumn
();
mPresenter
.
initAdapter
();
mPresenter
.
initAdapter
();
mPresenter
.
initItemListener
(
mContext
);
mPresenter
.
initItemListener
(
mContext
);
...
...
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