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
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
102 additions
and
80 deletions
+102
-80
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
+66
-66
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> {
...
@@ -198,6 +198,7 @@ public class OrderCenterAdapter extends DefaultAdapter<OrderManagerResponse> {
}
else
{
}
else
{
ll_pos_bottom
.
setVisibility
(
View
.
GONE
);
ll_pos_bottom
.
setVisibility
(
View
.
GONE
);
}
}
cb_order
.
setChecked
(
item
.
isChecked
());
}
}
int
orderType
=
item
.
getOrderType
();
int
orderType
=
item
.
getOrderType
();
if
(
orderType
==
OrderTypeConstans
.
order_type_2
||
orderType
==
OrderTypeConstans
.
order_type_7
)
{
if
(
orderType
==
OrderTypeConstans
.
order_type_2
||
orderType
==
OrderTypeConstans
.
order_type_7
)
{
...
@@ -258,7 +259,7 @@ public class OrderCenterAdapter extends DefaultAdapter<OrderManagerResponse> {
...
@@ -258,7 +259,7 @@ public class OrderCenterAdapter extends DefaultAdapter<OrderManagerResponse> {
OrderManagerResponse
item
=
mInfos
.
get
(
i
);
OrderManagerResponse
item
=
mInfos
.
get
(
i
);
item
.
setChecked
(
false
);
item
.
setChecked
(
false
);
}
}
mInfos
.
get
(
position
)
.
setChecked
(
isChecked
);
item
.
setChecked
(
isChecked
);
notifyDataSetChanged
();
notifyDataSetChanged
();
}
}
});
});
...
...
component-table/src/main/res/layout/meal_activity_soldout_ctrl.xml
View file @
c18e0afb
...
@@ -52,7 +52,7 @@
...
@@ -52,7 +52,7 @@
android:layout_weight=
"1"
android:layout_weight=
"1"
android:divider=
"@null"
android:divider=
"@null"
app:spanCount=
"1"
app:spanCount=
"1"
app:layoutManager=
"com.gingersoft.gsa.cloud.ui.
view
.RecyclerViewNoBugLinearLayoutManager"
/>
app:layoutManager=
"com.gingersoft.gsa.cloud.ui.
recylcler
.RecyclerViewNoBugLinearLayoutManager"
/>
<!-- </LinearLayout>-->
<!-- </LinearLayout>-->
</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;
...
@@ -5,6 +5,7 @@ import org.greenrobot.greendao.annotation.Entity;
import
org.greenrobot.greendao.annotation.Generated
;
import
org.greenrobot.greendao.annotation.Generated
;
import
org.greenrobot.greendao.annotation.Id
;
import
org.greenrobot.greendao.annotation.Id
;
import
org.greenrobot.greendao.annotation.Property
;
import
org.greenrobot.greendao.annotation.Property
;
import
org.greenrobot.greendao.annotation.ToOne
;
import
org.greenrobot.greendao.annotation.Transient
;
import
org.greenrobot.greendao.annotation.Transient
;
import
java.util.Date
;
import
java.util.Date
;
...
@@ -246,10 +247,6 @@ public class Food {
...
@@ -246,10 +247,6 @@ public class Food {
*/
*/
private
byte
serviceCharge
;
private
byte
serviceCharge
;
/**
/**
* 顏色ID
*/
private
long
colorId
;
/**
* 0:新增;1:修改;2:刪除
* 0:新增;1:修改;2:刪除
*/
*/
private
long
conditions
;
private
long
conditions
;
...
@@ -287,6 +284,13 @@ public class Food {
...
@@ -287,6 +284,13 @@ public class Food {
* 是否參與會員喜好統計 0 參與 1 不參與
* 是否參與會員喜好統計 0 參與 1 不參與
*/
*/
private
long
isStatistic
;
private
long
isStatistic
;
/**
* 顏色ID
*/
private
long
colorId
;
@Transient
@ToOne
(
joinProperty
=
"colorId"
)
//这个是注解绑定 hid就是上面一行的colorId
private
ColorBean
colorBean
;
/**
/**
* 自定義字段
* 自定義字段
...
@@ -301,6 +305,14 @@ public class Food {
...
@@ -301,6 +305,14 @@ public class Food {
/**背景顏色*/
/**背景顏色*/
@Transient
@Transient
private
int
bgColor
=
Color
.
parseColor
(
"#03a9f4"
);
private
int
bgColor
=
Color
.
parseColor
(
"#03a9f4"
);
@Transient
private
String
colorStart
;
@Transient
private
String
colorStop
;
@Transient
private
String
androidColor
;
@Transient
private
String
androidFontColor
;
/**字體顏色*/
/**字體顏色*/
@Transient
@Transient
private
int
fontColor
=
Color
.
parseColor
(
"#FFFFFF"
);
private
int
fontColor
=
Color
.
parseColor
(
"#FFFFFF"
);
...
@@ -317,7 +329,11 @@ public class Food {
...
@@ -317,7 +329,11 @@ public class Food {
@Transient
@Transient
private
boolean
isComboFood
=
false
;
private
boolean
isComboFood
=
false
;
@Generated
(
hash
=
1680701141
)
@Generated
(
hash
=
60268763
)
public
Food
(
Long
id
,
long
parentId
,
long
restaurantId
,
byte
isParent
,
public
Food
(
Long
id
,
long
parentId
,
long
restaurantId
,
byte
isParent
,
long
seqNo
,
String
foodName
,
String
foodName1
,
String
foodName2
,
long
seqNo
,
String
foodName
,
String
foodName1
,
String
foodName2
,
String
plu
,
String
posFid
,
String
foodDesc
,
long
limitAmount
,
String
plu
,
String
posFid
,
String
foodDesc
,
long
limitAmount
,
...
@@ -332,10 +348,10 @@ public class Food {
...
@@ -332,10 +348,10 @@ public class Food {
long
advPrice
,
long
printToBill
,
double
pointsAdd
,
long
pointsRatio
,
long
advPrice
,
long
printToBill
,
double
pointsAdd
,
long
pointsRatio
,
double
pointsRedeem
,
long
ktPrintMainItem
,
long
ktShowPrice
,
double
pointsRedeem
,
long
ktPrintMainItem
,
long
ktShowPrice
,
long
printTo
,
long
toPax
,
long
foodType
,
long
majorMainId
,
long
deptId
,
long
printTo
,
long
toPax
,
long
foodType
,
long
majorMainId
,
long
deptId
,
byte
serviceCharge
,
long
co
lorId
,
long
conditions
,
long
isRt
,
byte
serviceCharge
,
long
co
nditions
,
long
isRt
,
long
deletes
,
long
deletes
,
long
isTimingFood
,
long
minLongTime
,
long
unitTim
e
,
long
isTimingFood
,
long
minLongTime
,
long
unitTime
,
double
unitPric
e
,
double
unitPrice
,
long
freeLongTime
,
Date
freePeriodBegin
,
long
freeLongTime
,
Date
freePeriodBegin
,
long
isStatistic
,
long
isStatistic
)
{
long
colorId
)
{
this
.
id
=
id
;
this
.
id
=
id
;
this
.
parentId
=
parentId
;
this
.
parentId
=
parentId
;
this
.
restaurantId
=
restaurantId
;
this
.
restaurantId
=
restaurantId
;
...
@@ -392,7 +408,6 @@ public class Food {
...
@@ -392,7 +408,6 @@ public class Food {
this
.
majorMainId
=
majorMainId
;
this
.
majorMainId
=
majorMainId
;
this
.
deptId
=
deptId
;
this
.
deptId
=
deptId
;
this
.
serviceCharge
=
serviceCharge
;
this
.
serviceCharge
=
serviceCharge
;
this
.
colorId
=
colorId
;
this
.
conditions
=
conditions
;
this
.
conditions
=
conditions
;
this
.
isRt
=
isRt
;
this
.
isRt
=
isRt
;
this
.
deletes
=
deletes
;
this
.
deletes
=
deletes
;
...
@@ -403,6 +418,7 @@ public class Food {
...
@@ -403,6 +418,7 @@ public class Food {
this
.
freeLongTime
=
freeLongTime
;
this
.
freeLongTime
=
freeLongTime
;
this
.
freePeriodBegin
=
freePeriodBegin
;
this
.
freePeriodBegin
=
freePeriodBegin
;
this
.
isStatistic
=
isStatistic
;
this
.
isStatistic
=
isStatistic
;
this
.
colorId
=
colorId
;
}
}
@Generated
(
hash
=
866324199
)
@Generated
(
hash
=
866324199
)
...
@@ -412,6 +428,7 @@ public class Food {
...
@@ -412,6 +428,7 @@ public class Food {
public
Long
getId
()
{
public
Long
getId
()
{
return
id
;
return
id
;
}
}
...
...
library-database/src/main/java/com/gingersoft/gsa/cloud/database/greendao/FoodDao.java
View file @
c18e0afb
...
@@ -80,17 +80,17 @@ public class FoodDao extends AbstractDao<Food, Long> {
...
@@ -80,17 +80,17 @@ public class FoodDao extends AbstractDao<Food, Long> {
public
final
static
Property
MajorMainId
=
new
Property
(
53
,
long
.
class
,
"majorMainId"
,
false
,
"MAJOR_MAIN_ID"
);
public
final
static
Property
MajorMainId
=
new
Property
(
53
,
long
.
class
,
"majorMainId"
,
false
,
"MAJOR_MAIN_ID"
);
public
final
static
Property
DeptId
=
new
Property
(
54
,
long
.
class
,
"deptId"
,
false
,
"DEPT_ID"
);
public
final
static
Property
DeptId
=
new
Property
(
54
,
long
.
class
,
"deptId"
,
false
,
"DEPT_ID"
);
public
final
static
Property
ServiceCharge
=
new
Property
(
55
,
byte
.
class
,
"serviceCharge"
,
false
,
"SERVICE_CHARGE"
);
public
final
static
Property
ServiceCharge
=
new
Property
(
55
,
byte
.
class
,
"serviceCharge"
,
false
,
"SERVICE_CHARGE"
);
public
final
static
Property
Co
lorId
=
new
Property
(
56
,
long
.
class
,
"colorId"
,
false
,
"COLOR_ID
"
);
public
final
static
Property
Co
nditions
=
new
Property
(
56
,
long
.
class
,
"conditions"
,
false
,
"CONDITIONS
"
);
public
final
static
Property
Conditions
=
new
Property
(
57
,
long
.
class
,
"conditions"
,
false
,
"CONDITIONS
"
);
public
final
static
Property
IsRt
=
new
Property
(
57
,
long
.
class
,
"isRt"
,
false
,
"IS_RT
"
);
public
final
static
Property
IsRt
=
new
Property
(
58
,
long
.
class
,
"isRt"
,
false
,
"IS_RT
"
);
public
final
static
Property
Deletes
=
new
Property
(
58
,
long
.
class
,
"deletes"
,
false
,
"DELETES
"
);
public
final
static
Property
Deletes
=
new
Property
(
59
,
long
.
class
,
"deletes"
,
false
,
"DELETES
"
);
public
final
static
Property
IsTimingFood
=
new
Property
(
59
,
long
.
class
,
"isTimingFood"
,
false
,
"IS_TIMING_FOOD
"
);
public
final
static
Property
IsTimingFood
=
new
Property
(
60
,
long
.
class
,
"isTimingFood"
,
false
,
"IS_TIMING_FOOD
"
);
public
final
static
Property
MinLongTime
=
new
Property
(
60
,
long
.
class
,
"minLongTime"
,
false
,
"MIN_LONG_TIME
"
);
public
final
static
Property
MinLongTime
=
new
Property
(
61
,
long
.
class
,
"minLongTime"
,
false
,
"MIN_LONG
_TIME"
);
public
final
static
Property
UnitTime
=
new
Property
(
61
,
long
.
class
,
"unitTime"
,
false
,
"UNIT
_TIME"
);
public
final
static
Property
Unit
Time
=
new
Property
(
62
,
long
.
class
,
"unitTime"
,
false
,
"UNIT_TIM
E"
);
public
final
static
Property
Unit
Price
=
new
Property
(
62
,
double
.
class
,
"unitPrice"
,
false
,
"UNIT_PRIC
E"
);
public
final
static
Property
UnitPrice
=
new
Property
(
63
,
double
.
class
,
"unitPrice"
,
false
,
"UNIT_PRIC
E"
);
public
final
static
Property
FreeLongTime
=
new
Property
(
63
,
long
.
class
,
"freeLongTime"
,
false
,
"FREE_LONG_TIM
E"
);
public
final
static
Property
Free
LongTime
=
new
Property
(
64
,
long
.
class
,
"freeLongTime"
,
false
,
"FREE_LONG_TIME
"
);
public
final
static
Property
Free
PeriodBegin
=
new
Property
(
64
,
java
.
util
.
Date
.
class
,
"freePeriodBegin"
,
false
,
"FREE_PERIOD_BEGIN
"
);
public
final
static
Property
FreePeriodBegin
=
new
Property
(
65
,
java
.
util
.
Date
.
class
,
"freePeriodBegin"
,
false
,
"FREE_PERIOD_BEGIN
"
);
public
final
static
Property
IsStatistic
=
new
Property
(
65
,
long
.
class
,
"isStatistic"
,
false
,
"IS_STATISTIC
"
);
public
final
static
Property
IsStatistic
=
new
Property
(
66
,
long
.
class
,
"isStatistic"
,
false
,
"IS_STATISTIC
"
);
public
final
static
Property
ColorId
=
new
Property
(
66
,
long
.
class
,
"colorId"
,
false
,
"COLOR_ID
"
);
}
}
...
@@ -162,17 +162,17 @@ public class FoodDao extends AbstractDao<Food, Long> {
...
@@ -162,17 +162,17 @@ public class FoodDao extends AbstractDao<Food, Long> {
"\"MAJOR_MAIN_ID\" INTEGER NOT NULL ,"
+
// 53: majorMainId
"\"MAJOR_MAIN_ID\" INTEGER NOT NULL ,"
+
// 53: majorMainId
"\"DEPT_ID\" INTEGER NOT NULL ,"
+
// 54: deptId
"\"DEPT_ID\" INTEGER NOT NULL ,"
+
// 54: deptId
"\"SERVICE_CHARGE\" INTEGER NOT NULL ,"
+
// 55: serviceCharge
"\"SERVICE_CHARGE\" INTEGER NOT NULL ,"
+
// 55: serviceCharge
"\"CO
LOR_ID\" INTEGER NOT NULL ,"
+
// 56: colorId
"\"CO
NDITIONS\" INTEGER NOT NULL ,"
+
// 56: conditions
"\"
CONDITIONS\" INTEGER NOT NULL ,"
+
// 57: conditions
"\"
IS_RT\" INTEGER NOT NULL ,"
+
// 57: isRt
"\"
IS_RT\" INTEGER NOT NULL ,"
+
// 58: isRt
"\"
DELETES\" INTEGER NOT NULL ,"
+
// 58: deletes
"\"
DELETES\" INTEGER NOT NULL ,"
+
// 59: deletes
"\"
IS_TIMING_FOOD\" INTEGER NOT NULL ,"
+
// 59: isTimingFood
"\"
IS_TIMING_FOOD\" INTEGER NOT NULL ,"
+
// 60: isTimingFood
"\"
MIN_LONG_TIME\" INTEGER NOT NULL ,"
+
// 60: minLongTime
"\"
MIN_LONG_TIME\" INTEGER NOT NULL ,"
+
// 61: minLong
Time
"\"
UNIT_TIME\" INTEGER NOT NULL ,"
+
// 61: unit
Time
"\"UNIT_
TIME\" INTEGER NOT NULL ,"
+
// 62: unitTim
e
"\"UNIT_
PRICE\" REAL NOT NULL ,"
+
// 62: unitPric
e
"\"
UNIT_PRICE\" REAL NOT NULL ,"
+
// 63: unitPric
e
"\"
FREE_LONG_TIME\" INTEGER NOT NULL ,"
+
// 63: freeLongTim
e
"\"FREE_
LONG_TIME\" INTEGER NOT NULL ,"
+
// 64: freeLongTime
"\"FREE_
PERIOD_BEGIN\" INTEGER,"
+
// 64: freePeriodBegin
"\"
FREE_PERIOD_BEGIN\" INTEGER,"
+
// 65: freePeriodBegin
"\"
IS_STATISTIC\" INTEGER NOT NULL ,"
+
// 65: isStatistic
"\"
IS_STATISTIC\" INTEGER NOT NULL );"
);
// 66: isStatistic
"\"
COLOR_ID\" INTEGER NOT NULL );"
);
// 66: colorId
}
}
/** Drops the underlying database table. */
/** Drops the underlying database table. */
...
@@ -308,21 +308,21 @@ public class FoodDao extends AbstractDao<Food, Long> {
...
@@ -308,21 +308,21 @@ public class FoodDao extends AbstractDao<Food, Long> {
stmt
.
bindLong
(
54
,
entity
.
getMajorMainId
());
stmt
.
bindLong
(
54
,
entity
.
getMajorMainId
());
stmt
.
bindLong
(
55
,
entity
.
getDeptId
());
stmt
.
bindLong
(
55
,
entity
.
getDeptId
());
stmt
.
bindLong
(
56
,
entity
.
getServiceCharge
());
stmt
.
bindLong
(
56
,
entity
.
getServiceCharge
());
stmt
.
bindLong
(
57
,
entity
.
getColorId
());
stmt
.
bindLong
(
57
,
entity
.
getConditions
());
stmt
.
bindLong
(
58
,
entity
.
getConditions
());
stmt
.
bindLong
(
58
,
entity
.
getIsRt
());
stmt
.
bindLong
(
59
,
entity
.
getIsRt
());
stmt
.
bindLong
(
59
,
entity
.
getDeletes
());
stmt
.
bindLong
(
60
,
entity
.
getDeletes
());
stmt
.
bindLong
(
60
,
entity
.
getIsTimingFood
());
stmt
.
bindLong
(
61
,
entity
.
getIsTimingFood
());
stmt
.
bindLong
(
61
,
entity
.
getMinLongTime
());
stmt
.
bindLong
(
62
,
entity
.
getMinLongTime
());
stmt
.
bindLong
(
62
,
entity
.
getUnitTime
());
stmt
.
bindLong
(
63
,
entity
.
getUnitTime
());
stmt
.
bindDouble
(
63
,
entity
.
getUnitPrice
());
stmt
.
bindDouble
(
64
,
entity
.
getUnitPrice
());
stmt
.
bindLong
(
64
,
entity
.
getFreeLongTime
());
stmt
.
bindLong
(
65
,
entity
.
getFreeLongTime
());
java
.
util
.
Date
freePeriodBegin
=
entity
.
getFreePeriodBegin
();
java
.
util
.
Date
freePeriodBegin
=
entity
.
getFreePeriodBegin
();
if
(
freePeriodBegin
!=
null
)
{
if
(
freePeriodBegin
!=
null
)
{
stmt
.
bindLong
(
6
6
,
freePeriodBegin
.
getTime
());
stmt
.
bindLong
(
6
5
,
freePeriodBegin
.
getTime
());
}
}
stmt
.
bindLong
(
67
,
entity
.
getIsStatistic
());
stmt
.
bindLong
(
66
,
entity
.
getIsStatistic
());
stmt
.
bindLong
(
67
,
entity
.
getColorId
());
}
}
@Override
@Override
...
@@ -452,21 +452,21 @@ public class FoodDao extends AbstractDao<Food, Long> {
...
@@ -452,21 +452,21 @@ public class FoodDao extends AbstractDao<Food, Long> {
stmt
.
bindLong
(
54
,
entity
.
getMajorMainId
());
stmt
.
bindLong
(
54
,
entity
.
getMajorMainId
());
stmt
.
bindLong
(
55
,
entity
.
getDeptId
());
stmt
.
bindLong
(
55
,
entity
.
getDeptId
());
stmt
.
bindLong
(
56
,
entity
.
getServiceCharge
());
stmt
.
bindLong
(
56
,
entity
.
getServiceCharge
());
stmt
.
bindLong
(
57
,
entity
.
getColorId
());
stmt
.
bindLong
(
57
,
entity
.
getConditions
());
stmt
.
bindLong
(
58
,
entity
.
getConditions
());
stmt
.
bindLong
(
58
,
entity
.
getIsRt
());
stmt
.
bindLong
(
59
,
entity
.
getIsRt
());
stmt
.
bindLong
(
59
,
entity
.
getDeletes
());
stmt
.
bindLong
(
60
,
entity
.
getDeletes
());
stmt
.
bindLong
(
60
,
entity
.
getIsTimingFood
());
stmt
.
bindLong
(
61
,
entity
.
getIsTimingFood
());
stmt
.
bindLong
(
61
,
entity
.
getMinLongTime
());
stmt
.
bindLong
(
62
,
entity
.
getMinLongTime
());
stmt
.
bindLong
(
62
,
entity
.
getUnitTime
());
stmt
.
bindLong
(
63
,
entity
.
getUnitTime
());
stmt
.
bindDouble
(
63
,
entity
.
getUnitPrice
());
stmt
.
bindDouble
(
64
,
entity
.
getUnitPrice
());
stmt
.
bindLong
(
64
,
entity
.
getFreeLongTime
());
stmt
.
bindLong
(
65
,
entity
.
getFreeLongTime
());
java
.
util
.
Date
freePeriodBegin
=
entity
.
getFreePeriodBegin
();
java
.
util
.
Date
freePeriodBegin
=
entity
.
getFreePeriodBegin
();
if
(
freePeriodBegin
!=
null
)
{
if
(
freePeriodBegin
!=
null
)
{
stmt
.
bindLong
(
6
6
,
freePeriodBegin
.
getTime
());
stmt
.
bindLong
(
6
5
,
freePeriodBegin
.
getTime
());
}
}
stmt
.
bindLong
(
67
,
entity
.
getIsStatistic
());
stmt
.
bindLong
(
66
,
entity
.
getIsStatistic
());
stmt
.
bindLong
(
67
,
entity
.
getColorId
());
}
}
@Override
@Override
...
@@ -533,17 +533,17 @@ public class FoodDao extends AbstractDao<Food, Long> {
...
@@ -533,17 +533,17 @@ public class FoodDao extends AbstractDao<Food, Long> {
cursor
.
getLong
(
offset
+
53
),
// majorMainId
cursor
.
getLong
(
offset
+
53
),
// majorMainId
cursor
.
getLong
(
offset
+
54
),
// deptId
cursor
.
getLong
(
offset
+
54
),
// deptId
(
byte
)
cursor
.
getShort
(
offset
+
55
),
// serviceCharge
(
byte
)
cursor
.
getShort
(
offset
+
55
),
// serviceCharge
cursor
.
getLong
(
offset
+
56
),
// co
lorId
cursor
.
getLong
(
offset
+
56
),
// co
nditions
cursor
.
getLong
(
offset
+
57
),
//
conditions
cursor
.
getLong
(
offset
+
57
),
//
isRt
cursor
.
getLong
(
offset
+
58
),
//
isRt
cursor
.
getLong
(
offset
+
58
),
//
deletes
cursor
.
getLong
(
offset
+
59
),
//
deletes
cursor
.
getLong
(
offset
+
59
),
//
isTimingFood
cursor
.
getLong
(
offset
+
60
),
//
isTimingFood
cursor
.
getLong
(
offset
+
60
),
//
minLongTime
cursor
.
getLong
(
offset
+
61
),
//
minLong
Time
cursor
.
getLong
(
offset
+
61
),
//
unit
Time
cursor
.
get
Long
(
offset
+
62
),
// unitTim
e
cursor
.
get
Double
(
offset
+
62
),
// unitPric
e
cursor
.
get
Double
(
offset
+
63
),
// unitPric
e
cursor
.
get
Long
(
offset
+
63
),
// freeLongTim
e
cursor
.
getLong
(
offset
+
64
),
// freeLongTime
cursor
.
isNull
(
offset
+
64
)
?
null
:
new
java
.
util
.
Date
(
cursor
.
getLong
(
offset
+
64
)),
// freePeriodBegin
cursor
.
isNull
(
offset
+
65
)
?
null
:
new
java
.
util
.
Date
(
cursor
.
getLong
(
offset
+
65
)),
// freePeriodBegin
cursor
.
getLong
(
offset
+
65
),
// isStatistic
cursor
.
getLong
(
offset
+
66
)
//
isStatistic
cursor
.
getLong
(
offset
+
66
)
//
colorId
);
);
return
entity
;
return
entity
;
}
}
...
@@ -606,17 +606,17 @@ public class FoodDao extends AbstractDao<Food, Long> {
...
@@ -606,17 +606,17 @@ public class FoodDao extends AbstractDao<Food, Long> {
entity
.
setMajorMainId
(
cursor
.
getLong
(
offset
+
53
));
entity
.
setMajorMainId
(
cursor
.
getLong
(
offset
+
53
));
entity
.
setDeptId
(
cursor
.
getLong
(
offset
+
54
));
entity
.
setDeptId
(
cursor
.
getLong
(
offset
+
54
));
entity
.
setServiceCharge
((
byte
)
cursor
.
getShort
(
offset
+
55
));
entity
.
setServiceCharge
((
byte
)
cursor
.
getShort
(
offset
+
55
));
entity
.
setCo
lorId
(
cursor
.
getLong
(
offset
+
56
));
entity
.
setCo
nditions
(
cursor
.
getLong
(
offset
+
56
));
entity
.
set
Conditions
(
cursor
.
getLong
(
offset
+
57
));
entity
.
set
IsRt
(
cursor
.
getLong
(
offset
+
57
));
entity
.
set
IsRt
(
cursor
.
getLong
(
offset
+
58
));
entity
.
set
Deletes
(
cursor
.
getLong
(
offset
+
58
));
entity
.
set
Deletes
(
cursor
.
getLong
(
offset
+
59
));
entity
.
set
IsTimingFood
(
cursor
.
getLong
(
offset
+
59
));
entity
.
set
IsTimingFood
(
cursor
.
getLong
(
offset
+
60
));
entity
.
set
MinLongTime
(
cursor
.
getLong
(
offset
+
60
));
entity
.
set
MinLong
Time
(
cursor
.
getLong
(
offset
+
61
));
entity
.
set
Unit
Time
(
cursor
.
getLong
(
offset
+
61
));
entity
.
setUnit
Time
(
cursor
.
getLong
(
offset
+
62
));
entity
.
setUnit
Price
(
cursor
.
getDouble
(
offset
+
62
));
entity
.
set
UnitPrice
(
cursor
.
getDouble
(
offset
+
63
));
entity
.
set
FreeLongTime
(
cursor
.
getLong
(
offset
+
63
));
entity
.
setFree
LongTime
(
cursor
.
getLong
(
offset
+
64
));
entity
.
setFree
PeriodBegin
(
cursor
.
isNull
(
offset
+
64
)
?
null
:
new
java
.
util
.
Date
(
cursor
.
getLong
(
offset
+
64
)
));
entity
.
set
FreePeriodBegin
(
cursor
.
isNull
(
offset
+
65
)
?
null
:
new
java
.
util
.
Date
(
cursor
.
getLong
(
offset
+
65
)
));
entity
.
set
IsStatistic
(
cursor
.
getLong
(
offset
+
65
));
entity
.
set
IsStatistic
(
cursor
.
getLong
(
offset
+
66
));
entity
.
set
ColorId
(
cursor
.
getLong
(
offset
+
66
));
}
}
@Override
@Override
...
...
library-database/src/main/java/com/gingersoft/gsa/cloud/database/utils/FoodDaoUtils.java
View file @
c18e0afb
...
@@ -4,7 +4,9 @@ import android.content.Context;
...
@@ -4,7 +4,9 @@ import android.content.Context;
import
android.util.Log
;
import
android.util.Log
;
import
com.gingersoft.gsa.cloud.database.DaoManager
;
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.bean.Food
;
import
com.gingersoft.gsa.cloud.database.greendao.ColorBeanDao
;
import
com.gingersoft.gsa.cloud.database.greendao.FoodDao
;
import
com.gingersoft.gsa.cloud.database.greendao.FoodDao
;
import
org.greenrobot.greendao.query.QueryBuilder
;
import
org.greenrobot.greendao.query.QueryBuilder
;
...
@@ -161,10 +163,12 @@ public class FoodDaoUtils {
...
@@ -161,10 +163,12 @@ public class FoodDaoUtils {
public
List
<
Food
>
queryFoodGroupByQueryBuilder
()
{
public
List
<
Food
>
queryFoodGroupByQueryBuilder
()
{
QueryBuilder
<
Food
>
queryBuilder
=
mManager
.
getDaoSession
().
queryBuilder
(
Food
.
class
);
QueryBuilder
<
Food
>
queryBuilder
=
mManager
.
getDaoSession
().
queryBuilder
(
Food
.
class
);
long
currentTime
=
System
.
currentTimeMillis
();
long
currentTime
=
System
.
currentTimeMillis
();
return
queryBuilder
.
where
(
queryBuilder
.
and
(
queryBuilder
.
where
(
queryBuilder
.
and
(
FoodDao
.
Properties
.
ParentId
.
eq
(
0
),
FoodDao
.
Properties
.
ParentId
.
eq
(
0
),
FoodDao
.
Properties
.
StartDate
.
le
(
currentTime
),
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