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
51a1f96b
Commit
51a1f96b
authored
Jul 18, 2020
by
Wyh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
bdae41ef
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
175 additions
and
89 deletions
+175
-89
base-module/src/main/java/com/gingersoft/gsa/cloud/database/bean/PrintCurrencyBean.java
+12
-3
base-module/src/main/java/com/gingersoft/gsa/cloud/database/greendao/PrintCurrencyBeanDao.java
+72
-66
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/model/viewModel/PageViewModel.kt
+1
-1
print-module/src/main/java/com/joe/print/mvp/contract/LocalPrintContract.java
+2
-0
print-module/src/main/java/com/joe/print/mvp/contract/PrintAddCurrencyContract.java
+1
-1
print-module/src/main/java/com/joe/print/mvp/model/LocalPrintModel.java
+7
-0
print-module/src/main/java/com/joe/print/mvp/model/PrintAddCurrencyModel.java
+7
-2
print-module/src/main/java/com/joe/print/mvp/model/bean/PrintInfoBean.java
+1
-2
print-module/src/main/java/com/joe/print/mvp/model/bean/PrjBean.java
+9
-0
print-module/src/main/java/com/joe/print/mvp/model/server/PrintInfoService.java
+4
-0
print-module/src/main/java/com/joe/print/mvp/presenter/LocalPrintPresenter.java
+24
-0
print-module/src/main/java/com/joe/print/mvp/presenter/PrintAddCurrencyPresenter.java
+4
-2
print-module/src/main/java/com/joe/print/mvp/print/EpsonPrint.java
+6
-4
print-module/src/main/java/com/joe/print/mvp/print/PrintPrjKitchen.java
+1
-1
print-module/src/main/java/com/joe/print/mvp/print/service/PrjService.java
+1
-0
print-module/src/main/java/com/joe/print/mvp/ui/activity/PrintAddCurrencyActivity.java
+10
-6
print-module/src/main/java/com/joe/print/mvp/ui/fragment/LocalPrintFragment.java
+13
-1
No files found.
base-module/src/main/java/com/gingersoft/gsa/cloud/database/bean/PrintCurrencyBean.java
View file @
51a1f96b
...
@@ -21,6 +21,7 @@ public class PrintCurrencyBean implements Serializable {
...
@@ -21,6 +21,7 @@ public class PrintCurrencyBean implements Serializable {
private
int
type
;
//1堂食,2外賣
private
int
type
;
//1堂食,2外賣
private
int
foodComplexion
;
//食品顔色 0 黑色 2 紅色
private
int
foodComplexion
;
//食品顔色 0 黑色 2 紅色
private
int
modifierComplexion
;
//細項顔色 0 黑色 2 紅色
private
int
modifierComplexion
;
//細項顔色 0 黑色 2 紅色
private
int
deletes
;
//是否刪除 0 正常 1 刪除
private
Integer
uid
;
private
Integer
uid
;
private
Long
createTime
;
private
Long
createTime
;
private
Long
updateTime
;
private
Long
updateTime
;
...
@@ -57,9 +58,8 @@ public class PrintCurrencyBean implements Serializable {
...
@@ -57,9 +58,8 @@ public class PrintCurrencyBean implements Serializable {
this
.
numberIsFlip
=
numberIsFlip
;
this
.
numberIsFlip
=
numberIsFlip
;
}
}
@Generated
(
hash
=
2001960487
)
@Generated
(
hash
=
172703695
)
public
PrintCurrencyBean
(
Long
id
,
Long
dbid
,
String
name
,
Integer
restaurantId
,
int
type
,
int
foodComplexion
,
int
modifierComplexion
,
Integer
uid
,
Long
createTime
,
Long
updateTime
,
Long
fontId
,
int
foodIsBold
,
String
foodFont
,
int
foodIsItalic
,
int
modifierIsBold
,
String
modifierFont
,
int
modifierIsItalic
,
public
PrintCurrencyBean
(
Long
id
,
Long
dbid
,
String
name
,
Integer
restaurantId
,
int
type
,
int
foodComplexion
,
int
modifierComplexion
,
int
deletes
,
Integer
uid
,
Long
createTime
,
Long
updateTime
,
Long
fontId
,
int
foodIsBold
,
String
foodFont
,
int
foodIsItalic
,
int
modifierIsBold
,
String
modifierFont
,
int
modifierIsItalic
,
int
numberIsFlip
)
{
int
numberIsFlip
)
{
this
.
id
=
id
;
this
.
id
=
id
;
this
.
dbid
=
dbid
;
this
.
dbid
=
dbid
;
this
.
name
=
name
;
this
.
name
=
name
;
...
@@ -67,6 +67,7 @@ public class PrintCurrencyBean implements Serializable {
...
@@ -67,6 +67,7 @@ public class PrintCurrencyBean implements Serializable {
this
.
type
=
type
;
this
.
type
=
type
;
this
.
foodComplexion
=
foodComplexion
;
this
.
foodComplexion
=
foodComplexion
;
this
.
modifierComplexion
=
modifierComplexion
;
this
.
modifierComplexion
=
modifierComplexion
;
this
.
deletes
=
deletes
;
this
.
uid
=
uid
;
this
.
uid
=
uid
;
this
.
createTime
=
createTime
;
this
.
createTime
=
createTime
;
this
.
updateTime
=
updateTime
;
this
.
updateTime
=
updateTime
;
...
@@ -227,4 +228,12 @@ public class PrintCurrencyBean implements Serializable {
...
@@ -227,4 +228,12 @@ public class PrintCurrencyBean implements Serializable {
public
Long
getId
()
{
public
Long
getId
()
{
return
this
.
id
;
return
this
.
id
;
}
}
public
int
getDeletes
()
{
return
deletes
;
}
public
void
setDeletes
(
int
deletes
)
{
this
.
deletes
=
deletes
;
}
}
}
base-module/src/main/java/com/gingersoft/gsa/cloud/database/greendao/PrintCurrencyBeanDao.java
View file @
51a1f96b
...
@@ -31,17 +31,18 @@ public class PrintCurrencyBeanDao extends AbstractDao<PrintCurrencyBean, Long> {
...
@@ -31,17 +31,18 @@ public class PrintCurrencyBeanDao extends AbstractDao<PrintCurrencyBean, Long> {
public
final
static
Property
Type
=
new
Property
(
4
,
int
.
class
,
"type"
,
false
,
"TYPE"
);
public
final
static
Property
Type
=
new
Property
(
4
,
int
.
class
,
"type"
,
false
,
"TYPE"
);
public
final
static
Property
FoodComplexion
=
new
Property
(
5
,
int
.
class
,
"foodComplexion"
,
false
,
"FOOD_COMPLEXION"
);
public
final
static
Property
FoodComplexion
=
new
Property
(
5
,
int
.
class
,
"foodComplexion"
,
false
,
"FOOD_COMPLEXION"
);
public
final
static
Property
ModifierComplexion
=
new
Property
(
6
,
int
.
class
,
"modifierComplexion"
,
false
,
"MODIFIER_COMPLEXION"
);
public
final
static
Property
ModifierComplexion
=
new
Property
(
6
,
int
.
class
,
"modifierComplexion"
,
false
,
"MODIFIER_COMPLEXION"
);
public
final
static
Property
Uid
=
new
Property
(
7
,
Integer
.
class
,
"uid"
,
false
,
"UID"
);
public
final
static
Property
Deletes
=
new
Property
(
7
,
int
.
class
,
"deletes"
,
false
,
"DELETES"
);
public
final
static
Property
CreateTime
=
new
Property
(
8
,
Long
.
class
,
"createTime"
,
false
,
"CREATE_TIME"
);
public
final
static
Property
Uid
=
new
Property
(
8
,
Integer
.
class
,
"uid"
,
false
,
"UID"
);
public
final
static
Property
UpdateTime
=
new
Property
(
9
,
Long
.
class
,
"updateTime"
,
false
,
"UPDATE_TIME"
);
public
final
static
Property
CreateTime
=
new
Property
(
9
,
Long
.
class
,
"createTime"
,
false
,
"CREATE_TIME"
);
public
final
static
Property
FontId
=
new
Property
(
10
,
Long
.
class
,
"fontId"
,
false
,
"FONT_ID"
);
public
final
static
Property
UpdateTime
=
new
Property
(
10
,
Long
.
class
,
"updateTime"
,
false
,
"UPDATE_TIME"
);
public
final
static
Property
FoodIsBold
=
new
Property
(
11
,
int
.
class
,
"foodIsBold"
,
false
,
"FOOD_IS_BOLD"
);
public
final
static
Property
FontId
=
new
Property
(
11
,
Long
.
class
,
"fontId"
,
false
,
"FONT_ID"
);
public
final
static
Property
FoodFont
=
new
Property
(
12
,
String
.
class
,
"foodFont"
,
false
,
"FOOD_FONT"
);
public
final
static
Property
FoodIsBold
=
new
Property
(
12
,
int
.
class
,
"foodIsBold"
,
false
,
"FOOD_IS_BOLD"
);
public
final
static
Property
FoodIsItalic
=
new
Property
(
13
,
int
.
class
,
"foodIsItalic"
,
false
,
"FOOD_IS_ITALIC"
);
public
final
static
Property
FoodFont
=
new
Property
(
13
,
String
.
class
,
"foodFont"
,
false
,
"FOOD_FONT"
);
public
final
static
Property
ModifierIsBold
=
new
Property
(
14
,
int
.
class
,
"modifierIsBold"
,
false
,
"MODIFIER_IS_BOLD"
);
public
final
static
Property
FoodIsItalic
=
new
Property
(
14
,
int
.
class
,
"foodIsItalic"
,
false
,
"FOOD_IS_ITALIC"
);
public
final
static
Property
ModifierFont
=
new
Property
(
15
,
String
.
class
,
"modifierFont"
,
false
,
"MODIFIER_FONT"
);
public
final
static
Property
ModifierIsBold
=
new
Property
(
15
,
int
.
class
,
"modifierIsBold"
,
false
,
"MODIFIER_IS_BOLD"
);
public
final
static
Property
ModifierIsItalic
=
new
Property
(
16
,
int
.
class
,
"modifierIsItalic"
,
false
,
"MODIFIER_IS_ITALIC"
);
public
final
static
Property
ModifierFont
=
new
Property
(
16
,
String
.
class
,
"modifierFont"
,
false
,
"MODIFIER_FONT"
);
public
final
static
Property
NumberIsFlip
=
new
Property
(
17
,
int
.
class
,
"numberIsFlip"
,
false
,
"NUMBER_IS_FLIP"
);
public
final
static
Property
ModifierIsItalic
=
new
Property
(
17
,
int
.
class
,
"modifierIsItalic"
,
false
,
"MODIFIER_IS_ITALIC"
);
public
final
static
Property
NumberIsFlip
=
new
Property
(
18
,
int
.
class
,
"numberIsFlip"
,
false
,
"NUMBER_IS_FLIP"
);
}
}
...
@@ -64,17 +65,18 @@ public class PrintCurrencyBeanDao extends AbstractDao<PrintCurrencyBean, Long> {
...
@@ -64,17 +65,18 @@ public class PrintCurrencyBeanDao extends AbstractDao<PrintCurrencyBean, Long> {
"\"TYPE\" INTEGER NOT NULL ,"
+
// 4: type
"\"TYPE\" INTEGER NOT NULL ,"
+
// 4: type
"\"FOOD_COMPLEXION\" INTEGER NOT NULL ,"
+
// 5: foodComplexion
"\"FOOD_COMPLEXION\" INTEGER NOT NULL ,"
+
// 5: foodComplexion
"\"MODIFIER_COMPLEXION\" INTEGER NOT NULL ,"
+
// 6: modifierComplexion
"\"MODIFIER_COMPLEXION\" INTEGER NOT NULL ,"
+
// 6: modifierComplexion
"\"UID\" INTEGER,"
+
// 7: uid
"\"DELETES\" INTEGER NOT NULL ,"
+
// 7: deletes
"\"CREATE_TIME\" INTEGER,"
+
// 8: createTime
"\"UID\" INTEGER,"
+
// 8: uid
"\"UPDATE_TIME\" INTEGER,"
+
// 9: updateTime
"\"CREATE_TIME\" INTEGER,"
+
// 9: createTime
"\"FONT_ID\" INTEGER,"
+
// 10: fontId
"\"UPDATE_TIME\" INTEGER,"
+
// 10: updateTime
"\"FOOD_IS_BOLD\" INTEGER NOT NULL ,"
+
// 11: foodIsBold
"\"FONT_ID\" INTEGER,"
+
// 11: fontId
"\"FOOD_FONT\" TEXT,"
+
// 12: foodFont
"\"FOOD_IS_BOLD\" INTEGER NOT NULL ,"
+
// 12: foodIsBold
"\"FOOD_IS_ITALIC\" INTEGER NOT NULL ,"
+
// 13: foodIsItalic
"\"FOOD_FONT\" TEXT,"
+
// 13: foodFont
"\"MODIFIER_IS_BOLD\" INTEGER NOT NULL ,"
+
// 14: modifierIsBold
"\"FOOD_IS_ITALIC\" INTEGER NOT NULL ,"
+
// 14: foodIsItalic
"\"MODIFIER_FONT\" TEXT,"
+
// 15: modifierFont
"\"MODIFIER_IS_BOLD\" INTEGER NOT NULL ,"
+
// 15: modifierIsBold
"\"MODIFIER_IS_ITALIC\" INTEGER NOT NULL ,"
+
// 16: modifierIsItalic
"\"MODIFIER_FONT\" TEXT,"
+
// 16: modifierFont
"\"NUMBER_IS_FLIP\" INTEGER NOT NULL );"
);
// 17: numberIsFlip
"\"MODIFIER_IS_ITALIC\" INTEGER NOT NULL ,"
+
// 17: modifierIsItalic
"\"NUMBER_IS_FLIP\" INTEGER NOT NULL );"
);
// 18: numberIsFlip
}
}
/** Drops the underlying database table. */
/** Drops the underlying database table. */
...
@@ -109,41 +111,42 @@ public class PrintCurrencyBeanDao extends AbstractDao<PrintCurrencyBean, Long> {
...
@@ -109,41 +111,42 @@ public class PrintCurrencyBeanDao extends AbstractDao<PrintCurrencyBean, Long> {
stmt
.
bindLong
(
5
,
entity
.
getType
());
stmt
.
bindLong
(
5
,
entity
.
getType
());
stmt
.
bindLong
(
6
,
entity
.
getFoodComplexion
());
stmt
.
bindLong
(
6
,
entity
.
getFoodComplexion
());
stmt
.
bindLong
(
7
,
entity
.
getModifierComplexion
());
stmt
.
bindLong
(
7
,
entity
.
getModifierComplexion
());
stmt
.
bindLong
(
8
,
entity
.
getDeletes
());
Integer
uid
=
entity
.
getUid
();
Integer
uid
=
entity
.
getUid
();
if
(
uid
!=
null
)
{
if
(
uid
!=
null
)
{
stmt
.
bindLong
(
8
,
uid
);
stmt
.
bindLong
(
9
,
uid
);
}
}
Long
createTime
=
entity
.
getCreateTime
();
Long
createTime
=
entity
.
getCreateTime
();
if
(
createTime
!=
null
)
{
if
(
createTime
!=
null
)
{
stmt
.
bindLong
(
9
,
createTime
);
stmt
.
bindLong
(
10
,
createTime
);
}
}
Long
updateTime
=
entity
.
getUpdateTime
();
Long
updateTime
=
entity
.
getUpdateTime
();
if
(
updateTime
!=
null
)
{
if
(
updateTime
!=
null
)
{
stmt
.
bindLong
(
1
0
,
updateTime
);
stmt
.
bindLong
(
1
1
,
updateTime
);
}
}
Long
fontId
=
entity
.
getFontId
();
Long
fontId
=
entity
.
getFontId
();
if
(
fontId
!=
null
)
{
if
(
fontId
!=
null
)
{
stmt
.
bindLong
(
1
1
,
fontId
);
stmt
.
bindLong
(
1
2
,
fontId
);
}
}
stmt
.
bindLong
(
1
2
,
entity
.
getFoodIsBold
());
stmt
.
bindLong
(
1
3
,
entity
.
getFoodIsBold
());
String
foodFont
=
entity
.
getFoodFont
();
String
foodFont
=
entity
.
getFoodFont
();
if
(
foodFont
!=
null
)
{
if
(
foodFont
!=
null
)
{
stmt
.
bindString
(
1
3
,
foodFont
);
stmt
.
bindString
(
1
4
,
foodFont
);
}
}
stmt
.
bindLong
(
1
4
,
entity
.
getFoodIsItalic
());
stmt
.
bindLong
(
1
5
,
entity
.
getFoodIsItalic
());
stmt
.
bindLong
(
1
5
,
entity
.
getModifierIsBold
());
stmt
.
bindLong
(
1
6
,
entity
.
getModifierIsBold
());
String
modifierFont
=
entity
.
getModifierFont
();
String
modifierFont
=
entity
.
getModifierFont
();
if
(
modifierFont
!=
null
)
{
if
(
modifierFont
!=
null
)
{
stmt
.
bindString
(
1
6
,
modifierFont
);
stmt
.
bindString
(
1
7
,
modifierFont
);
}
}
stmt
.
bindLong
(
1
7
,
entity
.
getModifierIsItalic
());
stmt
.
bindLong
(
1
8
,
entity
.
getModifierIsItalic
());
stmt
.
bindLong
(
1
8
,
entity
.
getNumberIsFlip
());
stmt
.
bindLong
(
1
9
,
entity
.
getNumberIsFlip
());
}
}
@Override
@Override
...
@@ -172,41 +175,42 @@ public class PrintCurrencyBeanDao extends AbstractDao<PrintCurrencyBean, Long> {
...
@@ -172,41 +175,42 @@ public class PrintCurrencyBeanDao extends AbstractDao<PrintCurrencyBean, Long> {
stmt
.
bindLong
(
5
,
entity
.
getType
());
stmt
.
bindLong
(
5
,
entity
.
getType
());
stmt
.
bindLong
(
6
,
entity
.
getFoodComplexion
());
stmt
.
bindLong
(
6
,
entity
.
getFoodComplexion
());
stmt
.
bindLong
(
7
,
entity
.
getModifierComplexion
());
stmt
.
bindLong
(
7
,
entity
.
getModifierComplexion
());
stmt
.
bindLong
(
8
,
entity
.
getDeletes
());
Integer
uid
=
entity
.
getUid
();
Integer
uid
=
entity
.
getUid
();
if
(
uid
!=
null
)
{
if
(
uid
!=
null
)
{
stmt
.
bindLong
(
8
,
uid
);
stmt
.
bindLong
(
9
,
uid
);
}
}
Long
createTime
=
entity
.
getCreateTime
();
Long
createTime
=
entity
.
getCreateTime
();
if
(
createTime
!=
null
)
{
if
(
createTime
!=
null
)
{
stmt
.
bindLong
(
9
,
createTime
);
stmt
.
bindLong
(
10
,
createTime
);
}
}
Long
updateTime
=
entity
.
getUpdateTime
();
Long
updateTime
=
entity
.
getUpdateTime
();
if
(
updateTime
!=
null
)
{
if
(
updateTime
!=
null
)
{
stmt
.
bindLong
(
1
0
,
updateTime
);
stmt
.
bindLong
(
1
1
,
updateTime
);
}
}
Long
fontId
=
entity
.
getFontId
();
Long
fontId
=
entity
.
getFontId
();
if
(
fontId
!=
null
)
{
if
(
fontId
!=
null
)
{
stmt
.
bindLong
(
1
1
,
fontId
);
stmt
.
bindLong
(
1
2
,
fontId
);
}
}
stmt
.
bindLong
(
1
2
,
entity
.
getFoodIsBold
());
stmt
.
bindLong
(
1
3
,
entity
.
getFoodIsBold
());
String
foodFont
=
entity
.
getFoodFont
();
String
foodFont
=
entity
.
getFoodFont
();
if
(
foodFont
!=
null
)
{
if
(
foodFont
!=
null
)
{
stmt
.
bindString
(
1
3
,
foodFont
);
stmt
.
bindString
(
1
4
,
foodFont
);
}
}
stmt
.
bindLong
(
1
4
,
entity
.
getFoodIsItalic
());
stmt
.
bindLong
(
1
5
,
entity
.
getFoodIsItalic
());
stmt
.
bindLong
(
1
5
,
entity
.
getModifierIsBold
());
stmt
.
bindLong
(
1
6
,
entity
.
getModifierIsBold
());
String
modifierFont
=
entity
.
getModifierFont
();
String
modifierFont
=
entity
.
getModifierFont
();
if
(
modifierFont
!=
null
)
{
if
(
modifierFont
!=
null
)
{
stmt
.
bindString
(
1
6
,
modifierFont
);
stmt
.
bindString
(
1
7
,
modifierFont
);
}
}
stmt
.
bindLong
(
1
7
,
entity
.
getModifierIsItalic
());
stmt
.
bindLong
(
1
8
,
entity
.
getModifierIsItalic
());
stmt
.
bindLong
(
1
8
,
entity
.
getNumberIsFlip
());
stmt
.
bindLong
(
1
9
,
entity
.
getNumberIsFlip
());
}
}
@Override
@Override
...
@@ -224,17 +228,18 @@ public class PrintCurrencyBeanDao extends AbstractDao<PrintCurrencyBean, Long> {
...
@@ -224,17 +228,18 @@ public class PrintCurrencyBeanDao extends AbstractDao<PrintCurrencyBean, Long> {
cursor
.
getInt
(
offset
+
4
),
// type
cursor
.
getInt
(
offset
+
4
),
// type
cursor
.
getInt
(
offset
+
5
),
// foodComplexion
cursor
.
getInt
(
offset
+
5
),
// foodComplexion
cursor
.
getInt
(
offset
+
6
),
// modifierComplexion
cursor
.
getInt
(
offset
+
6
),
// modifierComplexion
cursor
.
isNull
(
offset
+
7
)
?
null
:
cursor
.
getInt
(
offset
+
7
),
// uid
cursor
.
getInt
(
offset
+
7
),
// deletes
cursor
.
isNull
(
offset
+
8
)
?
null
:
cursor
.
getLong
(
offset
+
8
),
// createTime
cursor
.
isNull
(
offset
+
8
)
?
null
:
cursor
.
getInt
(
offset
+
8
),
// uid
cursor
.
isNull
(
offset
+
9
)
?
null
:
cursor
.
getLong
(
offset
+
9
),
// updateTime
cursor
.
isNull
(
offset
+
9
)
?
null
:
cursor
.
getLong
(
offset
+
9
),
// createTime
cursor
.
isNull
(
offset
+
10
)
?
null
:
cursor
.
getLong
(
offset
+
10
),
// fontId
cursor
.
isNull
(
offset
+
10
)
?
null
:
cursor
.
getLong
(
offset
+
10
),
// updateTime
cursor
.
getInt
(
offset
+
11
),
// foodIsBold
cursor
.
isNull
(
offset
+
11
)
?
null
:
cursor
.
getLong
(
offset
+
11
),
// fontId
cursor
.
isNull
(
offset
+
12
)
?
null
:
cursor
.
getString
(
offset
+
12
),
// foodFont
cursor
.
getInt
(
offset
+
12
),
// foodIsBold
cursor
.
getInt
(
offset
+
13
),
// foodIsItalic
cursor
.
isNull
(
offset
+
13
)
?
null
:
cursor
.
getString
(
offset
+
13
),
// foodFont
cursor
.
getInt
(
offset
+
14
),
// modifierIsBold
cursor
.
getInt
(
offset
+
14
),
// foodIsItalic
cursor
.
isNull
(
offset
+
15
)
?
null
:
cursor
.
getString
(
offset
+
15
),
// modifierFont
cursor
.
getInt
(
offset
+
15
),
// modifierIsBold
cursor
.
getInt
(
offset
+
16
),
// modifierIsItalic
cursor
.
isNull
(
offset
+
16
)
?
null
:
cursor
.
getString
(
offset
+
16
),
// modifierFont
cursor
.
getInt
(
offset
+
17
)
// numberIsFlip
cursor
.
getInt
(
offset
+
17
),
// modifierIsItalic
cursor
.
getInt
(
offset
+
18
)
// numberIsFlip
);
);
return
entity
;
return
entity
;
}
}
...
@@ -248,17 +253,18 @@ public class PrintCurrencyBeanDao extends AbstractDao<PrintCurrencyBean, Long> {
...
@@ -248,17 +253,18 @@ public class PrintCurrencyBeanDao extends AbstractDao<PrintCurrencyBean, Long> {
entity
.
setType
(
cursor
.
getInt
(
offset
+
4
));
entity
.
setType
(
cursor
.
getInt
(
offset
+
4
));
entity
.
setFoodComplexion
(
cursor
.
getInt
(
offset
+
5
));
entity
.
setFoodComplexion
(
cursor
.
getInt
(
offset
+
5
));
entity
.
setModifierComplexion
(
cursor
.
getInt
(
offset
+
6
));
entity
.
setModifierComplexion
(
cursor
.
getInt
(
offset
+
6
));
entity
.
setUid
(
cursor
.
isNull
(
offset
+
7
)
?
null
:
cursor
.
getInt
(
offset
+
7
));
entity
.
setDeletes
(
cursor
.
getInt
(
offset
+
7
));
entity
.
setCreateTime
(
cursor
.
isNull
(
offset
+
8
)
?
null
:
cursor
.
getLong
(
offset
+
8
));
entity
.
setUid
(
cursor
.
isNull
(
offset
+
8
)
?
null
:
cursor
.
getInt
(
offset
+
8
));
entity
.
setUpdateTime
(
cursor
.
isNull
(
offset
+
9
)
?
null
:
cursor
.
getLong
(
offset
+
9
));
entity
.
setCreateTime
(
cursor
.
isNull
(
offset
+
9
)
?
null
:
cursor
.
getLong
(
offset
+
9
));
entity
.
setFontId
(
cursor
.
isNull
(
offset
+
10
)
?
null
:
cursor
.
getLong
(
offset
+
10
));
entity
.
setUpdateTime
(
cursor
.
isNull
(
offset
+
10
)
?
null
:
cursor
.
getLong
(
offset
+
10
));
entity
.
setFoodIsBold
(
cursor
.
getInt
(
offset
+
11
));
entity
.
setFontId
(
cursor
.
isNull
(
offset
+
11
)
?
null
:
cursor
.
getLong
(
offset
+
11
));
entity
.
setFoodFont
(
cursor
.
isNull
(
offset
+
12
)
?
null
:
cursor
.
getString
(
offset
+
12
));
entity
.
setFoodIsBold
(
cursor
.
getInt
(
offset
+
12
));
entity
.
setFoodIsItalic
(
cursor
.
getInt
(
offset
+
13
));
entity
.
setFoodFont
(
cursor
.
isNull
(
offset
+
13
)
?
null
:
cursor
.
getString
(
offset
+
13
));
entity
.
setModifierIsBold
(
cursor
.
getInt
(
offset
+
14
));
entity
.
setFoodIsItalic
(
cursor
.
getInt
(
offset
+
14
));
entity
.
setModifierFont
(
cursor
.
isNull
(
offset
+
15
)
?
null
:
cursor
.
getString
(
offset
+
15
));
entity
.
setModifierIsBold
(
cursor
.
getInt
(
offset
+
15
));
entity
.
setModifierIsItalic
(
cursor
.
getInt
(
offset
+
16
));
entity
.
setModifierFont
(
cursor
.
isNull
(
offset
+
16
)
?
null
:
cursor
.
getString
(
offset
+
16
));
entity
.
setNumberIsFlip
(
cursor
.
getInt
(
offset
+
17
));
entity
.
setModifierIsItalic
(
cursor
.
getInt
(
offset
+
17
));
entity
.
setNumberIsFlip
(
cursor
.
getInt
(
offset
+
18
));
}
}
@Override
@Override
...
...
other_order_mode/src/main/java/com/gingersoft/gsa/other_order_mode/model/viewModel/PageViewModel.kt
View file @
51a1f96b
...
@@ -436,7 +436,7 @@ class PageViewModel(private val repository: WeatherRepository) : ViewModel() {
...
@@ -436,7 +436,7 @@ class PageViewModel(private val repository: WeatherRepository) : ViewModel() {
fun
openCashBox
()
{
fun
openCashBox
()
{
// launch({
// launch({
// //單獨包起來,哪怕這接口報錯也不要影響到正常的邏輯
// //單獨包起來,哪怕這接口報錯也不要影響到正常的邏輯
// repository.addPrj("11112364", "153", "4886311
6,48863117,4886311
9")
// repository.addPrj("11112364", "153", "48863119")
// }, {
// }, {
// it.printStackTrace()
// it.printStackTrace()
// Log.e("eee", "錯誤信息222:" + it.message)
// Log.e("eee", "錯誤信息222:" + it.message)
...
...
print-module/src/main/java/com/joe/print/mvp/contract/LocalPrintContract.java
View file @
51a1f96b
...
@@ -8,6 +8,7 @@ import com.jess.arms.mvp.IModel;
...
@@ -8,6 +8,7 @@ import com.jess.arms.mvp.IModel;
import
java.util.List
;
import
java.util.List
;
import
io.reactivex.Observable
;
import
io.reactivex.Observable
;
import
okhttp3.RequestBody
;
public
interface
LocalPrintContract
{
public
interface
LocalPrintContract
{
...
@@ -19,6 +20,7 @@ public interface LocalPrintContract {
...
@@ -19,6 +20,7 @@ public interface LocalPrintContract {
//Model层定义接口,外部只需关心Model返回的数据,无需关心内部细节,即是否使用缓存
//Model层定义接口,外部只需关心Model返回的数据,无需关心内部细节,即是否使用缓存
interface
Model
extends
IModel
{
interface
Model
extends
IModel
{
Observable
<
PublicBean
>
getPrinterCurrencyList
(
String
restaurantId
);
Observable
<
PublicBean
>
getPrinterCurrencyList
(
String
restaurantId
);
Observable
<
PublicBean
>
deletePrinterCurrency
(
RequestBody
requestBody
);
}
}
}
}
print-module/src/main/java/com/joe/print/mvp/contract/PrintAddCurrencyContract.java
View file @
51a1f96b
...
@@ -19,7 +19,7 @@ public interface PrintAddCurrencyContract {
...
@@ -19,7 +19,7 @@ public interface PrintAddCurrencyContract {
Observable
<
PublicBean
>
getPrinterCurrencyList
(
String
restaurantId
);
Observable
<
PublicBean
>
getPrinterCurrencyList
(
String
restaurantId
);
Observable
<
PublicBean
>
addPrinterCurrency
(
RequestBody
requestBody
);
Observable
<
PublicBean
>
addPrinterCurrency
(
RequestBody
requestBody
,
boolean
isUpdate
);
}
}
}
}
print-module/src/main/java/com/joe/print/mvp/model/LocalPrintModel.java
View file @
51a1f96b
...
@@ -15,6 +15,7 @@ import com.joe.print.mvp.contract.LocalPrintContract;
...
@@ -15,6 +15,7 @@ import com.joe.print.mvp.contract.LocalPrintContract;
import
com.joe.print.mvp.model.server.PrintInfoService
;
import
com.joe.print.mvp.model.server.PrintInfoService
;
import
io.reactivex.Observable
;
import
io.reactivex.Observable
;
import
okhttp3.RequestBody
;
@FragmentScope
@FragmentScope
...
@@ -40,4 +41,9 @@ public class LocalPrintModel extends BaseModel implements LocalPrintContract.Mod
...
@@ -40,4 +41,9 @@ public class LocalPrintModel extends BaseModel implements LocalPrintContract.Mod
public
Observable
<
PublicBean
>
getPrinterCurrencyList
(
String
restaurantId
)
{
public
Observable
<
PublicBean
>
getPrinterCurrencyList
(
String
restaurantId
)
{
return
mRepositoryManager
.
obtainRetrofitService
(
PrintInfoService
.
class
).
getCurrencyPrenterList
(
restaurantId
);
return
mRepositoryManager
.
obtainRetrofitService
(
PrintInfoService
.
class
).
getCurrencyPrenterList
(
restaurantId
);
}
}
@Override
public
Observable
<
PublicBean
>
deletePrinterCurrency
(
RequestBody
requestBody
)
{
return
mRepositoryManager
.
obtainRetrofitService
(
PrintInfoService
.
class
).
updatePrinterCurrency
(
requestBody
);
}
}
}
\ No newline at end of file
print-module/src/main/java/com/joe/print/mvp/model/PrintAddCurrencyModel.java
View file @
51a1f96b
...
@@ -43,7 +43,11 @@ public class PrintAddCurrencyModel extends BaseModel implements PrintAddCurrency
...
@@ -43,7 +43,11 @@ public class PrintAddCurrencyModel extends BaseModel implements PrintAddCurrency
}
}
@Override
@Override
public
Observable
<
PublicBean
>
addPrinterCurrency
(
RequestBody
requestBody
)
{
public
Observable
<
PublicBean
>
addPrinterCurrency
(
RequestBody
requestBody
,
boolean
isUpdate
)
{
return
mRepositoryManager
.
obtainRetrofitService
(
PrintInfoService
.
class
).
addCurrencyPrenter
(
requestBody
);
if
(
isUpdate
)
{
return
mRepositoryManager
.
obtainRetrofitService
(
PrintInfoService
.
class
).
updatePrinterCurrency
(
requestBody
);
}
else
{
return
mRepositoryManager
.
obtainRetrofitService
(
PrintInfoService
.
class
).
addCurrencyPrenter
(
requestBody
);
}
}
}
}
}
\ No newline at end of file
print-module/src/main/java/com/joe/print/mvp/model/bean/PrintInfoBean.java
View file @
51a1f96b
...
@@ -242,7 +242,6 @@ public class PrintInfoBean {
...
@@ -242,7 +242,6 @@ public class PrintInfoBean {
numberIsFlip
=
printCurrencyBean
.
getNumberIsFlip
()
==
1
;
numberIsFlip
=
printCurrencyBean
.
getNumberIsFlip
()
==
1
;
}
}
if
(
prjBeans
==
null
||
prjBeans
.
size
()
<=
0
)
{
if
(
prjBeans
==
null
||
prjBeans
.
size
()
<=
0
)
{
return
null
;
return
null
;
}
}
...
@@ -274,7 +273,7 @@ public class PrintInfoBean {
...
@@ -274,7 +273,7 @@ public class PrintInfoBean {
printInfoBeans
.
add
(
new
PrintInfoBean
(
new
String
[]{
"落單時間:"
+
TimeUtils
.
getCurrentTimeInString
(
TimeUtils
.
DEFAULT_DATE_MDHM
)},
new
double
[]{
1
},
0
));
printInfoBeans
.
add
(
new
PrintInfoBean
(
new
String
[]{
"落單時間:"
+
TimeUtils
.
getCurrentTimeInString
(
TimeUtils
.
DEFAULT_DATE_MDHM
)},
new
double
[]{
1
},
0
));
//廚房位置
//廚房位置
if
(!
TextUtil
.
isEmptyOrNullOrUndefined
(
key
)
&&
!
key
.
equals
(
"-1"
))
{
if
(!
TextUtil
.
isEmptyOrNullOrUndefined
(
key
)
&&
!
key
.
equals
(
"-1"
))
{
printInfoBeans
.
add
(
new
PrintInfoBean
(
new
String
[]{
key
+
"廚房"
,
" "
+
GsaCloudApplication
.
getMemberName
(
GsaCloudApplication
.
getAppContext
()
)},
new
double
[]{
1
},
0
));
printInfoBeans
.
add
(
new
PrintInfoBean
(
new
String
[]{
key
+
"廚房"
,
" "
+
prjBean
.
getUserName
(
)},
new
double
[]{
1
},
0
));
}
}
//人數
//人數
if
(
prjBean
.
getPerson
()
!=
0
)
{
if
(
prjBean
.
getPerson
()
!=
0
)
{
...
...
print-module/src/main/java/com/joe/print/mvp/model/bean/PrjBean.java
View file @
51a1f96b
...
@@ -79,6 +79,7 @@ public class PrjBean {
...
@@ -79,6 +79,7 @@ public class PrjBean {
private
String
takeFoodCode
;
//取餐碼
private
String
takeFoodCode
;
//取餐碼
private
String
billNo
;
//訂單碼
private
String
billNo
;
//訂單碼
private
int
orderType
;
//訂單類型
private
int
orderType
;
//訂單類型
private
String
userName
;
/***
/***
* 層級
* 層級
* 1:主食品
* 1:主食品
...
@@ -282,6 +283,14 @@ public class PrjBean {
...
@@ -282,6 +283,14 @@ public class PrjBean {
public
void
setSender
(
String
sender
)
{
public
void
setSender
(
String
sender
)
{
this
.
sender
=
sender
;
this
.
sender
=
sender
;
}
}
public
String
getUserName
()
{
return
userName
;
}
public
void
setUserName
(
String
userName
)
{
this
.
userName
=
userName
;
}
}
}
public
Map
<
String
,
List
<
Bean
>>
getPrjMap
()
{
public
Map
<
String
,
List
<
Bean
>>
getPrjMap
()
{
...
...
print-module/src/main/java/com/joe/print/mvp/model/server/PrintInfoService.java
View file @
51a1f96b
...
@@ -40,4 +40,8 @@ public interface PrintInfoService {
...
@@ -40,4 +40,8 @@ public interface PrintInfoService {
@POST
(
"printerComplexionConfig/insert"
+
RetrofitUrlManager
.
IDENTIFICATION_PATH_SIZE
+
2
)
@POST
(
"printerComplexionConfig/insert"
+
RetrofitUrlManager
.
IDENTIFICATION_PATH_SIZE
+
2
)
Observable
<
PublicBean
>
addCurrencyPrenter
(
@Body
RequestBody
requestBody
);
Observable
<
PublicBean
>
addCurrencyPrenter
(
@Body
RequestBody
requestBody
);
@POST
(
"printerComplexionConfig/update"
+
RetrofitUrlManager
.
IDENTIFICATION_PATH_SIZE
+
2
)
Observable
<
PublicBean
>
updatePrinterCurrency
(
@Body
RequestBody
requestBody
);
}
}
print-module/src/main/java/com/joe/print/mvp/presenter/LocalPrintPresenter.java
View file @
51a1f96b
...
@@ -20,6 +20,8 @@ import io.reactivex.android.schedulers.AndroidSchedulers;
...
@@ -20,6 +20,8 @@ import io.reactivex.android.schedulers.AndroidSchedulers;
import
io.reactivex.schedulers.Schedulers
;
import
io.reactivex.schedulers.Schedulers
;
import
me.jessyan.rxerrorhandler.core.RxErrorHandler
;
import
me.jessyan.rxerrorhandler.core.RxErrorHandler
;
import
me.jessyan.rxerrorhandler.handler.ErrorHandleSubscriber
;
import
me.jessyan.rxerrorhandler.handler.ErrorHandleSubscriber
;
import
okhttp3.MediaType
;
import
okhttp3.RequestBody
;
@FragmentScope
@FragmentScope
...
@@ -67,6 +69,28 @@ public class LocalPrintPresenter extends BasePresenter<LocalPrintContract.Model,
...
@@ -67,6 +69,28 @@ public class LocalPrintPresenter extends BasePresenter<LocalPrintContract.Model,
}
}
}
}
});
});
}
public
void
deletePrinterCurrency
(
PrintCurrencyBean
printCurrencyBean
)
{
RequestBody
requestBody
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json"
),
JsonUtils
.
toJson
(
printCurrencyBean
));
mModel
.
deletePrinterCurrency
(
requestBody
)
.
subscribeOn
(
Schedulers
.
io
())
.
doOnSubscribe
(
disposable
->
mRootView
.
showLoading
(
""
))
.
subscribeOn
(
AndroidSchedulers
.
mainThread
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
doAfterTerminate
(()
->
mRootView
.
hideLoading
())
.
compose
(
RxLifecycleUtils
.
bindToLifecycle
(
mRootView
))
.
subscribe
(
new
ErrorHandleSubscriber
<
PublicBean
>(
mErrorHandler
)
{
@Override
public
void
onNext
(
PublicBean
s
)
{
if
(
s
!=
null
)
{
// mRootView.addSuccess(s.isSuccess());
// } else {
// mRootView.addSuccess(false);
}
}
});
}
}
}
}
print-module/src/main/java/com/joe/print/mvp/presenter/PrintAddCurrencyPresenter.java
View file @
51a1f96b
...
@@ -55,9 +55,9 @@ public class PrintAddCurrencyPresenter extends BasePresenter<PrintAddCurrencyCon
...
@@ -55,9 +55,9 @@ public class PrintAddCurrencyPresenter extends BasePresenter<PrintAddCurrencyCon
}
}
public
void
addCurrencyPresenter
(
PrintCurrencyBean
printCurrencyBean
)
{
public
void
addCurrencyPresenter
(
PrintCurrencyBean
printCurrencyBean
,
boolean
isUpdate
)
{
RequestBody
requestBody
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json"
),
JsonUtils
.
toJson
(
printCurrencyBean
));
RequestBody
requestBody
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json"
),
JsonUtils
.
toJson
(
printCurrencyBean
));
mModel
.
addPrinterCurrency
(
requestBody
)
mModel
.
addPrinterCurrency
(
requestBody
,
isUpdate
)
.
subscribeOn
(
Schedulers
.
io
())
.
subscribeOn
(
Schedulers
.
io
())
.
doOnSubscribe
(
disposable
->
mRootView
.
showLoading
(
""
))
.
doOnSubscribe
(
disposable
->
mRootView
.
showLoading
(
""
))
.
subscribeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribeOn
(
AndroidSchedulers
.
mainThread
())
...
@@ -92,4 +92,6 @@ public class PrintAddCurrencyPresenter extends BasePresenter<PrintAddCurrencyCon
...
@@ -92,4 +92,6 @@ public class PrintAddCurrencyPresenter extends BasePresenter<PrintAddCurrencyCon
.
add
(
"numberIsFlip"
,
printCurrencyBean
.
getNumberIsFlip
()
+
""
);
.
add
(
"numberIsFlip"
,
printCurrencyBean
.
getNumberIsFlip
()
+
""
);
return
builder
.
build
();
return
builder
.
build
();
}
}
}
}
print-module/src/main/java/com/joe/print/mvp/print/EpsonPrint.java
View file @
51a1f96b
...
@@ -293,17 +293,19 @@ public class EpsonPrint implements ReceiveListener {
...
@@ -293,17 +293,19 @@ public class EpsonPrint implements ReceiveListener {
}
else
{
}
else
{
isItalic
=
printInfoBean
.
getIsItalic
()[
i
]
?
1
:
0
;
isItalic
=
printInfoBean
.
getIsItalic
()[
i
]
?
1
:
0
;
}
}
mPrinter
.
addTextRotate
(
isItalic
);
if
(
printInfoBean
.
getIsBold
().
length
==
1
)
{
if
(
printInfoBean
.
getIsBold
().
length
==
1
)
{
mPrinter
.
addTextStyle
(
0
,
isItalic
,
printInfoBean
.
getIsBold
()[
0
]
?
1
:
0
,
color
);
//reverse取值0,1沒效果,ul下劃線,em加粗,
mPrinter
.
addTextStyle
(
1
,
0
,
printInfoBean
.
getIsBold
()[
0
]
?
1
:
0
,
color
);
}
else
{
}
else
{
if
(
printInfoBean
.
getIsBold
()[
i
])
{
if
(
printInfoBean
.
getIsBold
()[
i
])
{
mPrinter
.
addTextStyle
(
0
,
isItalic
,
0
,
color
);
mPrinter
.
addTextStyle
(
1
,
0
,
1
,
color
);
}
else
{
}
else
{
mPrinter
.
addTextStyle
(
0
,
isItalic
,
1
,
color
);
mPrinter
.
addTextStyle
(
1
,
0
,
0
,
color
);
}
}
}
}
StringBuilder
space
=
new
StringBuilder
();
StringBuilder
space
=
new
StringBuilder
();
if
(
printInfoBean
.
getSize
().
length
==
1
)
{
if
(
printInfoBean
.
getSize
().
length
==
1
)
{
for
(
int
j
=
0
;
j
<
location
/
printInfoBean
.
getSize
()[
0
];
j
++)
{
for
(
int
j
=
0
;
j
<
location
/
printInfoBean
.
getSize
()[
0
];
j
++)
{
...
...
print-module/src/main/java/com/joe/print/mvp/print/PrintPrjKitchen.java
View file @
51a1f96b
...
@@ -172,7 +172,7 @@ public class PrintPrjKitchen extends PrinterRoot {
...
@@ -172,7 +172,7 @@ public class PrintPrjKitchen extends PrinterRoot {
//落單時間,為當前時間
//落單時間,為當前時間
tvOrderTime
.
setText
(
TimeUtils
.
getCurrentTimeInString
(
TimeUtils
.
DEFAULT_DATE_MDHM
));
tvOrderTime
.
setText
(
TimeUtils
.
getCurrentTimeInString
(
TimeUtils
.
DEFAULT_DATE_MDHM
));
//操作人員
//操作人員
tvOperator
.
setText
(
GsaCloudApplication
.
getMemberName
(
context
));
tvOperator
.
setText
(
prjBean
.
getUserName
(
));
return
viewToBitmap
(
context
,
view
);
return
viewToBitmap
(
context
,
view
);
}
}
...
...
print-module/src/main/java/com/joe/print/mvp/print/service/PrjService.java
View file @
51a1f96b
...
@@ -190,6 +190,7 @@ public class PrjService extends Service implements PrintSocketHolder.OnStateChan
...
@@ -190,6 +190,7 @@ public class PrjService extends Service implements PrintSocketHolder.OnStateChan
private
PrinterRoot
printerInIt
;
private
PrinterRoot
printerInIt
;
private
String
json
=
"{\"success\":true,\"sysTime\":1595066909048,\"data\":{\"K1\":[{\"id\":2461,\"printerDeviceId\":87,\"status\":1,\"orderNo\":\"153201882821850443\",\"orderTime\":2020,\"sender\":\"\",\"person\":0,\"number\":1,\"orderDetailsTime\":\"Jul 10, 2020 11:59:29 AM\",\"orderDetailsId\":48863119,\"productName\":\"紅棗銀耳湯\",\"parentId\":48863115,\"type\":4,\"createTime\":1595066908689,\"productId\":5189,\"requests\":1,\"actualPrinterDeviceId\":87,\"takeFoodCode\":\"H462\",\"billNo\":\"0643\",\"orderType\":7,\"userName\":\"stefan001\"}]}}\n"
;
/**
/**
* 開始打印
* 開始打印
*/
*/
...
...
print-module/src/main/java/com/joe/print/mvp/ui/activity/PrintAddCurrencyActivity.java
View file @
51a1f96b
...
@@ -67,6 +67,8 @@ public class PrintAddCurrencyActivity extends BaseActivity<PrintAddCurrencyPrese
...
@@ -67,6 +67,8 @@ public class PrintAddCurrencyActivity extends BaseActivity<PrintAddCurrencyPrese
private
int
foodColorPosition
=
0
;
//食品顏色 0黑色,1紅色,3 綠色
private
int
foodColorPosition
=
0
;
//食品顏色 0黑色,1紅色,3 綠色
private
int
foodItemColorPosition
=
0
;
//細項顔色 0 黑色 1 紅色
private
int
foodItemColorPosition
=
0
;
//細項顔色 0 黑色 1 紅色
private
boolean
isUpdate
=
false
;
//true 為修改,false 為新增
@Override
@Override
public
void
setupActivityComponent
(
@NonNull
AppComponent
appComponent
)
{
public
void
setupActivityComponent
(
@NonNull
AppComponent
appComponent
)
{
DaggerPrintAddCurrencyComponent
//如找不到该类,请编译一下项目
DaggerPrintAddCurrencyComponent
//如找不到该类,请编译一下项目
...
@@ -85,6 +87,7 @@ public class PrintAddCurrencyActivity extends BaseActivity<PrintAddCurrencyPrese
...
@@ -85,6 +87,7 @@ public class PrintAddCurrencyActivity extends BaseActivity<PrintAddCurrencyPrese
@Override
@Override
public
void
initData
(
@Nullable
Bundle
savedInstanceState
)
{
public
void
initData
(
@Nullable
Bundle
savedInstanceState
)
{
if
(
printCurrencyBean
!=
null
)
{
if
(
printCurrencyBean
!=
null
)
{
isUpdate
=
true
;
typePosition
=
printCurrencyBean
.
getType
();
typePosition
=
printCurrencyBean
.
getType
();
foodColorPosition
=
printCurrencyBean
.
getFoodComplexion
();
foodColorPosition
=
printCurrencyBean
.
getFoodComplexion
();
foodItemColorPosition
=
printCurrencyBean
.
getModifierComplexion
();
foodItemColorPosition
=
printCurrencyBean
.
getModifierComplexion
();
...
@@ -100,6 +103,7 @@ public class PrintAddCurrencyActivity extends BaseActivity<PrintAddCurrencyPrese
...
@@ -100,6 +103,7 @@ public class PrintAddCurrencyActivity extends BaseActivity<PrintAddCurrencyPrese
switchFoodItemItalic
.
setChecked
(
printCurrencyBean
.
getModifierIsItalic
()
==
1
);
switchFoodItemItalic
.
setChecked
(
printCurrencyBean
.
getModifierIsItalic
()
==
1
);
switchColorFlip
.
setChecked
(
printCurrencyBean
.
getNumberIsFlip
()
==
1
);
switchColorFlip
.
setChecked
(
printCurrencyBean
.
getNumberIsFlip
()
==
1
);
}
else
{
}
else
{
isUpdate
=
false
;
//設置默認值
//設置默認值
setTableType
();
setTableType
();
setFoodColor
();
setFoodColor
();
...
@@ -108,11 +112,11 @@ public class PrintAddCurrencyActivity extends BaseActivity<PrintAddCurrencyPrese
...
@@ -108,11 +112,11 @@ public class PrintAddCurrencyActivity extends BaseActivity<PrintAddCurrencyPrese
}
}
private
void
setFoodItemColor
()
{
private
void
setFoodItemColor
()
{
if
(
foodItemColorPosition
==
0
)
{
if
(
foodItemColorPosition
==
0
)
{
tvFoodItemColor
.
setText
(
"黑色"
);
tvFoodItemColor
.
setText
(
"黑色"
);
}
else
if
(
foodItemColorPosition
==
1
)
{
}
else
if
(
foodItemColorPosition
==
1
)
{
tvFoodItemColor
.
setText
(
"綠色"
);
tvFoodItemColor
.
setText
(
"綠色"
);
}
else
if
(
foodItemColorPosition
==
2
)
{
}
else
if
(
foodItemColorPosition
==
2
)
{
tvFoodItemColor
.
setText
(
"紅色"
);
tvFoodItemColor
.
setText
(
"紅色"
);
}
}
}
}
...
@@ -201,15 +205,15 @@ public class PrintAddCurrencyActivity extends BaseActivity<PrintAddCurrencyPrese
...
@@ -201,15 +205,15 @@ public class PrintAddCurrencyActivity extends BaseActivity<PrintAddCurrencyPrese
printCurrencyBean
.
setFoodIsItalic
(
switchFoodItalic
.
isChecked
()
?
1
:
2
);
printCurrencyBean
.
setFoodIsItalic
(
switchFoodItalic
.
isChecked
()
?
1
:
2
);
printCurrencyBean
.
setModifierIsItalic
(
switchFoodItemItalic
.
isChecked
()
?
1
:
2
);
printCurrencyBean
.
setModifierIsItalic
(
switchFoodItemItalic
.
isChecked
()
?
1
:
2
);
printCurrencyBean
.
setNumberIsFlip
(
switchColorFlip
.
isChecked
()
?
1
:
2
);
printCurrencyBean
.
setNumberIsFlip
(
switchColorFlip
.
isChecked
()
?
1
:
2
);
mPresenter
.
addCurrencyPresenter
(
printCurrencyBean
);
mPresenter
.
addCurrencyPresenter
(
printCurrencyBean
,
isUpdate
);
}
}
private
void
showSelectType
()
{
private
void
showSelectType
()
{
List
<
String
>
types
=
new
ArrayList
<>();
List
<
String
>
types
=
new
ArrayList
<>();
types
.
add
(
"堂食"
);
types
.
add
(
"堂食"
);
types
.
add
(
"外
賣
"
);
types
.
add
(
"外
送
"
);
DialogUtils
.
showSelectPopop
(
this
,
types
,
"餐檯模式"
,
typePosition
,
i
->
{
DialogUtils
.
showSelectPopop
(
this
,
types
,
"餐檯模式"
,
typePosition
,
i
->
{
typePosition
=
i
;
typePosition
=
i
+
1
;
setTableType
();
setTableType
();
});
});
}
}
...
...
print-module/src/main/java/com/joe/print/mvp/ui/fragment/LocalPrintFragment.java
View file @
51a1f96b
...
@@ -18,6 +18,7 @@ import com.gingersoft.gsa.cloud.base.utils.other.SPUtils;
...
@@ -18,6 +18,7 @@ import com.gingersoft.gsa.cloud.base.utils.other.SPUtils;
import
com.gingersoft.gsa.cloud.constans.PrintConstans
;
import
com.gingersoft.gsa.cloud.constans.PrintConstans
;
import
com.gingersoft.gsa.cloud.database.bean.PrintCurrencyBean
;
import
com.gingersoft.gsa.cloud.database.bean.PrintCurrencyBean
;
import
com.gingersoft.gsa.cloud.database.utils.PrintCurrencyDaoUtils
;
import
com.gingersoft.gsa.cloud.database.utils.PrintCurrencyDaoUtils
;
import
com.gingersoft.gsa.cloud.ui.utils.AppDialog
;
import
com.jess.arms.base.BaseFragment
;
import
com.jess.arms.base.BaseFragment
;
import
com.jess.arms.di.component.AppComponent
;
import
com.jess.arms.di.component.AppComponent
;
import
com.jess.arms.utils.ArmsUtils
;
import
com.jess.arms.utils.ArmsUtils
;
...
@@ -192,12 +193,23 @@ public class LocalPrintFragment extends BaseFragment<LocalPrintPresenter> implem
...
@@ -192,12 +193,23 @@ public class LocalPrintFragment extends BaseFragment<LocalPrintPresenter> implem
tvFoodColor
.
setText
(
"綠色"
);
tvFoodColor
.
setText
(
"綠色"
);
}
}
tvFoodItemColor
.
setText
(
printCurrencyBeans
.
get
(
i
).
getModifierComplexion
()
==
0
?
"黑色"
:
"紅色"
);
tvFoodItemColor
.
setText
(
printCurrencyBeans
.
get
(
i
).
getModifierComplexion
()
==
0
?
"黑色"
:
"紅色"
);
int
finalI1
=
i
;
view
.
findViewById
(
R
.
id
.
iv_currency_print_delete
).
setOnClickListener
(
v
->
{
view
.
findViewById
(
R
.
id
.
iv_currency_print_delete
).
setOnClickListener
(
v
->
{
//刪除
//刪除
new
AppDialog
().
showWaringDialog
(
mContext
,
"是否確認刪除"
,
(
view1
,
dialog
)
->
{
//調用刪除接口
if
(
finalI1
<
printCurrencyBeans
.
size
())
{
printCurrencyBeans
.
get
(
finalI1
).
setDeletes
(
1
);
mPresenter
.
deletePrinterCurrency
(
printCurrencyBeans
.
get
(
finalI1
));
printCurrencyBeans
.
remove
(
finalI1
);
loadView
(
printCurrencyBeans
);
}
dialog
.
dismiss
();
});
});
});
int
finalI
=
i
;
int
finalI
=
i
;
view
.
setOnClickListener
(
v
->
{
view
.
setOnClickListener
(
v
->
{
//編輯
//編輯
Intent
intent
=
new
Intent
(
mContext
,
PrintAddCurrencyActivity
.
class
);
Intent
intent
=
new
Intent
(
mContext
,
PrintAddCurrencyActivity
.
class
);
intent
.
putExtra
(
"printCurrencyBean"
,
printCurrencyBeans
.
get
(
finalI
));
intent
.
putExtra
(
"printCurrencyBean"
,
printCurrencyBeans
.
get
(
finalI
));
...
...
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