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
c18e0afb
Commit
c18e0afb
authored
Jan 14, 2021
by
宁斌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
设置食品颜色
parent
1f6e49aa
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
14 deletions
+36
-14
component-table/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/adapter/OrderCenterAdapter.java
+2
-1
component-table/src/main/res/layout/meal_activity_soldout_ctrl.xml
+1
-1
library-database/src/main/java/com/gingersoft/gsa/cloud/database/bean/Food.java
+27
-10
library-database/src/main/java/com/gingersoft/gsa/cloud/database/greendao/FoodDao.java
+0
-0
library-database/src/main/java/com/gingersoft/gsa/cloud/database/utils/FoodDaoUtils.java
+6
-2
No files found.
component-table/src/main/java/com/gingersoft/gsa/cloud/table/mvp/ui/adapter/OrderCenterAdapter.java
View file @
c18e0afb
...
...
@@ -198,6 +198,7 @@ public class OrderCenterAdapter extends DefaultAdapter<OrderManagerResponse> {
}
else
{
ll_pos_bottom
.
setVisibility
(
View
.
GONE
);
}
cb_order
.
setChecked
(
item
.
isChecked
());
}
int
orderType
=
item
.
getOrderType
();
if
(
orderType
==
OrderTypeConstans
.
order_type_2
||
orderType
==
OrderTypeConstans
.
order_type_7
)
{
...
...
@@ -258,7 +259,7 @@ public class OrderCenterAdapter extends DefaultAdapter<OrderManagerResponse> {
OrderManagerResponse
item
=
mInfos
.
get
(
i
);
item
.
setChecked
(
false
);
}
mInfos
.
get
(
position
)
.
setChecked
(
isChecked
);
item
.
setChecked
(
isChecked
);
notifyDataSetChanged
();
}
});
...
...
component-table/src/main/res/layout/meal_activity_soldout_ctrl.xml
View file @
c18e0afb
...
...
@@ -52,7 +52,7 @@
android:layout_weight=
"1"
android:divider=
"@null"
app:spanCount=
"1"
app:layoutManager=
"com.gingersoft.gsa.cloud.ui.
view
.RecyclerViewNoBugLinearLayoutManager"
/>
app:layoutManager=
"com.gingersoft.gsa.cloud.ui.
recylcler
.RecyclerViewNoBugLinearLayoutManager"
/>
<!-- </LinearLayout>-->
</LinearLayout>
...
...
library-database/src/main/java/com/gingersoft/gsa/cloud/database/bean/Food.java
View file @
c18e0afb
...
...
@@ -5,6 +5,7 @@ import org.greenrobot.greendao.annotation.Entity;
import
org.greenrobot.greendao.annotation.Generated
;
import
org.greenrobot.greendao.annotation.Id
;
import
org.greenrobot.greendao.annotation.Property
;
import
org.greenrobot.greendao.annotation.ToOne
;
import
org.greenrobot.greendao.annotation.Transient
;
import
java.util.Date
;
...
...
@@ -246,10 +247,6 @@ public class Food {
*/
private
byte
serviceCharge
;
/**
* 顏色ID
*/
private
long
colorId
;
/**
* 0:新增;1:修改;2:刪除
*/
private
long
conditions
;
...
...
@@ -287,6 +284,13 @@ public class Food {
* 是否參與會員喜好統計 0 參與 1 不參與
*/
private
long
isStatistic
;
/**
* 顏色ID
*/
private
long
colorId
;
@Transient
@ToOne
(
joinProperty
=
"colorId"
)
//这个是注解绑定 hid就是上面一行的colorId
private
ColorBean
colorBean
;
/**
* 自定義字段
...
...
@@ -301,6 +305,14 @@ public class Food {
/**背景顏色*/
@Transient
private
int
bgColor
=
Color
.
parseColor
(
"#03a9f4"
);
@Transient
private
String
colorStart
;
@Transient
private
String
colorStop
;
@Transient
private
String
androidColor
;
@Transient
private
String
androidFontColor
;
/**字體顏色*/
@Transient
private
int
fontColor
=
Color
.
parseColor
(
"#FFFFFF"
);
...
...
@@ -317,7 +329,11 @@ public class Food {
@Transient
private
boolean
isComboFood
=
false
;
@Generated
(
hash
=
1680701141
)
@Generated
(
hash
=
60268763
)
public
Food
(
Long
id
,
long
parentId
,
long
restaurantId
,
byte
isParent
,
long
seqNo
,
String
foodName
,
String
foodName1
,
String
foodName2
,
String
plu
,
String
posFid
,
String
foodDesc
,
long
limitAmount
,
...
...
@@ -332,10 +348,10 @@ public class Food {
long
advPrice
,
long
printToBill
,
double
pointsAdd
,
long
pointsRatio
,
double
pointsRedeem
,
long
ktPrintMainItem
,
long
ktShowPrice
,
long
printTo
,
long
toPax
,
long
foodType
,
long
majorMainId
,
long
deptId
,
byte
serviceCharge
,
long
co
lorId
,
long
conditions
,
long
isRt
,
long
deletes
,
long
isTimingFood
,
long
minLongTime
,
long
unitTim
e
,
double
unitPrice
,
long
freeLongTime
,
Date
freePeriodBegin
,
long
isStatistic
)
{
byte
serviceCharge
,
long
co
nditions
,
long
isRt
,
long
deletes
,
long
isTimingFood
,
long
minLongTime
,
long
unitTime
,
double
unitPric
e
,
long
freeLongTime
,
Date
freePeriodBegin
,
long
isStatistic
,
long
colorId
)
{
this
.
id
=
id
;
this
.
parentId
=
parentId
;
this
.
restaurantId
=
restaurantId
;
...
...
@@ -392,7 +408,6 @@ public class Food {
this
.
majorMainId
=
majorMainId
;
this
.
deptId
=
deptId
;
this
.
serviceCharge
=
serviceCharge
;
this
.
colorId
=
colorId
;
this
.
conditions
=
conditions
;
this
.
isRt
=
isRt
;
this
.
deletes
=
deletes
;
...
...
@@ -403,6 +418,7 @@ public class Food {
this
.
freeLongTime
=
freeLongTime
;
this
.
freePeriodBegin
=
freePeriodBegin
;
this
.
isStatistic
=
isStatistic
;
this
.
colorId
=
colorId
;
}
@Generated
(
hash
=
866324199
)
...
...
@@ -412,6 +428,7 @@ public class Food {
public
Long
getId
()
{
return
id
;
}
...
...
library-database/src/main/java/com/gingersoft/gsa/cloud/database/greendao/FoodDao.java
View file @
c18e0afb
This diff is collapsed.
Click to expand it.
library-database/src/main/java/com/gingersoft/gsa/cloud/database/utils/FoodDaoUtils.java
View file @
c18e0afb
...
...
@@ -4,7 +4,9 @@ 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.bean.Food
;
import
com.gingersoft.gsa.cloud.database.greendao.ColorBeanDao
;
import
com.gingersoft.gsa.cloud.database.greendao.FoodDao
;
import
org.greenrobot.greendao.query.QueryBuilder
;
...
...
@@ -161,10 +163,12 @@ public class FoodDaoUtils {
public
List
<
Food
>
queryFoodGroupByQueryBuilder
()
{
QueryBuilder
<
Food
>
queryBuilder
=
mManager
.
getDaoSession
().
queryBuilder
(
Food
.
class
);
long
currentTime
=
System
.
currentTimeMillis
();
return
queryBuilder
.
where
(
queryBuilder
.
and
(
queryBuilder
.
where
(
queryBuilder
.
and
(
FoodDao
.
Properties
.
ParentId
.
eq
(
0
),
FoodDao
.
Properties
.
StartDate
.
le
(
currentTime
),
FoodDao
.
Properties
.
EndDate
.
ge
(
currentTime
))).
orderAsc
(
FoodDao
.
Properties
.
SeqNo
).
list
();
FoodDao
.
Properties
.
EndDate
.
ge
(
currentTime
)))
.
join
(
ColorBean
.
class
,
ColorBeanDao
.
Properties
.
ColorId
);
return
queryBuilder
.
orderAsc
(
FoodDao
.
Properties
.
SeqNo
).
list
();
}
/**
...
...
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