Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
GingerSoftLANInterconnection
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
王宇航
GingerSoftLANInterconnection
Commits
3ce7eda1
Commit
3ce7eda1
authored
Jun 01, 2024
by
王宇航
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1、食品數量改為int型
2、新增訂單創建時間、去除打印狀態字段(不由客戶端上傳)
parent
8474b24c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
173 additions
and
47 deletions
+173
-47
.idea/deploymentTargetDropDown.xml
+1
-14
app/src/main/java/com/example/demo/MainActivity.kt
+156
-17
mylibrary/src/main/java/com/gingersoft/connect/bean/FoodInfoBean.java
+3
-3
mylibrary/src/main/java/com/gingersoft/connect/bean/OrderInfoBean.java
+13
-13
No files found.
.idea/deploymentTargetDropDown.xml
View file @
3ce7eda1
...
...
@@ -3,20 +3,7 @@
<component
name=
"deploymentTargetDropDown"
>
<value>
<entry
key=
"app"
>
<State>
<runningDeviceTargetSelectedWithDropDown>
<Target>
<type
value=
"RUNNING_DEVICE_TARGET"
/>
<deviceKey>
<Key>
<type
value=
"SERIAL_NUMBER"
/>
<value
value=
"9X4TRG5PSCEYZHZX"
/>
</Key>
</deviceKey>
</Target>
</runningDeviceTargetSelectedWithDropDown>
<timeTargetWasSelectedWithDropDown
value=
"2024-05-30T02:36:04.118903400Z"
/>
</State>
<State
/>
</entry>
</value>
</component>
...
...
app/src/main/java/com/example/demo/MainActivity.kt
View file @
3ce7eda1
...
...
@@ -31,7 +31,7 @@ class MainActivity : Activity() {
tvConnect
.
isClickable
=
false
connect
=
GingerSoftConnect
()
msgSender
=
connect
!!
.
connect
(
"192.168.
1.12
"
,
"192.168.
2.164
"
,
12581
,
object
:
GingerSoftConnect
.
SocketStateListener
{
override
fun
onOpen
()
{
...
...
@@ -75,27 +75,166 @@ class MainActivity : Activity() {
senderId
=
1965
.
toString
()
senderName
=
"Glen$count"
tableName
=
"餐檯$count"
sendTime
=
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
).
format
(
Date
())
sendTime
=
"2023-05-31 12:31:31"
sendDeviceId
=
"6464646sdfs"
sendDeviceName
=
"POS$count"
sendOrderCount
=
4
+
count
isFirstSendOrder
=
true
flyPrintInfo
=
"K1-L2"
foodInfoBeanList
=
mutableListOf
<
FoodInfoBean
>().
apply
{
for
(
i
in
0
until
50
)
{
add
(
FoodInfoBean
().
apply
{
foodId
=
"${1 + i}"
printId
=
"1166$i"
orderId
=
1111L
+
count
foodName
=
"這是一個名字超級長的食品$i"
quantity
=
count
.
toString
()
price
=
count
*
1.1
type
=
(
i
%
3
)
+
1
parentId
=
"0"
isPrintRedLetter
=
false
}
)
}
add
(
FoodInfoBean
().
apply
{
foodId
=
"1"
printId
=
"11661"
orderId
=
1111L
+
count
foodName
=
"經典雙人套餐"
quantity
=
count
price
=
count
*
1.1
type
=
1
parentId
=
"0"
isPrintRedLetter
=
false
})
add
(
FoodInfoBean
().
apply
{
foodId
=
"2"
printId
=
"11662"
orderId
=
1111L
+
count
foodName
=
"宮保雞丁"
quantity
=
count
price
=
count
*
1.1
type
=
2
parentId
=
"0"
isPrintRedLetter
=
false
})
add
(
FoodInfoBean
().
apply
{
foodId
=
"3"
printId
=
"11663"
orderId
=
1111L
+
count
foodName
=
"細項名稱、細項名稱"
quantity
=
count
price
=
count
*
1.1
type
=
3
parentId
=
"0"
isPrintRedLetter
=
false
})
add
(
FoodInfoBean
().
apply
{
foodId
=
"4"
printId
=
"11664"
orderId
=
1111L
+
count
foodName
=
"奶茶"
quantity
=
count
price
=
count
*
1.1
type
=
1
parentId
=
"0"
isPrintRedLetter
=
false
})
add
(
FoodInfoBean
().
apply
{
foodId
=
"5"
printId
=
"11665"
orderId
=
1111L
+
count
foodName
=
"珍珠、芋圓"
quantity
=
count
price
=
count
*
1.1
type
=
3
parentId
=
"0"
isPrintRedLetter
=
false
})
add
(
FoodInfoBean
().
apply
{
foodId
=
"6"
printId
=
"11666"
orderId
=
1111L
+
count
foodName
=
"酸辣粉"
quantity
=
count
price
=
count
*
1.1
type
=
1
parentId
=
"0"
isPrintRedLetter
=
false
})
add
(
FoodInfoBean
().
apply
{
foodId
=
"7"
printId
=
"11667"
orderId
=
1111L
+
count
foodName
=
"經典雙人套餐"
quantity
=
count
price
=
count
*
1.1
type
=
1
parentId
=
"0"
isPrintRedLetter
=
false
})
add
(
FoodInfoBean
().
apply
{
foodId
=
"8"
printId
=
"11668"
orderId
=
1111L
+
count
foodName
=
"宮保雞丁"
quantity
=
count
price
=
count
*
1.1
type
=
2
parentId
=
"0"
isPrintRedLetter
=
false
})
add
(
FoodInfoBean
().
apply
{
foodId
=
"9"
printId
=
"11669"
orderId
=
1111L
+
count
foodName
=
"細項名稱、細項名稱"
quantity
=
count
price
=
count
*
1.1
type
=
3
parentId
=
"0"
isPrintRedLetter
=
false
})
add
(
FoodInfoBean
().
apply
{
foodId
=
"10"
printId
=
"11670"
orderId
=
1111L
+
count
foodName
=
"奶茶"
quantity
=
count
price
=
count
*
1.1
type
=
1
parentId
=
"0"
isPrintRedLetter
=
false
})
add
(
FoodInfoBean
().
apply
{
foodId
=
"11"
printId
=
"11671"
orderId
=
1111L
+
count
foodName
=
"珍珠、芋圓"
quantity
=
count
price
=
count
*
1.1
type
=
3
parentId
=
"0"
isPrintRedLetter
=
false
})
add
(
FoodInfoBean
().
apply
{
foodId
=
"1"
printId
=
"11661"
orderId
=
1111L
+
count
foodName
=
"經典雙人套餐"
quantity
=
count
price
=
count
*
1.1
type
=
1
parentId
=
"0"
isPrintRedLetter
=
false
})
add
(
FoodInfoBean
().
apply
{
foodId
=
"1"
printId
=
"11661"
orderId
=
1111L
+
count
foodName
=
"經典雙人套餐"
quantity
=
count
price
=
count
*
1.1
type
=
1
parentId
=
"0"
isPrintRedLetter
=
false
})
add
(
FoodInfoBean
().
apply
{
foodId
=
"1"
printId
=
"11661"
orderId
=
1111L
+
count
foodName
=
"經典雙人套餐"
quantity
=
count
price
=
count
*
1.1
type
=
1
parentId
=
"0"
isPrintRedLetter
=
false
})
}
}
msgSender
?.
initSendData
(
Action
.
KitchenInfo
,
order
)
...
...
mylibrary/src/main/java/com/gingersoft/connect/bean/FoodInfoBean.java
View file @
3ce7eda1
...
...
@@ -20,7 +20,7 @@ public class FoodInfoBean {
/**
* 食品數量
*/
private
String
quantity
;
private
int
quantity
;
/**
* 食品金額
*/
...
...
@@ -71,11 +71,11 @@ public class FoodInfoBean {
this
.
foodName
=
FoodName
;
}
public
String
getQuantity
()
{
public
int
getQuantity
()
{
return
this
.
quantity
;
}
public
void
setQuantity
(
String
quantity
)
{
public
void
setQuantity
(
int
quantity
)
{
this
.
quantity
=
quantity
;
}
...
...
mylibrary/src/main/java/com/gingersoft/connect/bean/OrderInfoBean.java
View file @
3ce7eda1
...
...
@@ -35,6 +35,11 @@ public class OrderInfoBean implements SendMsgType {
* 送單時間
*/
private
String
sendTime
;
/**
* 訂單創建時間
*/
private
String
orderCreateTime
;
/**
* 發送數據的設備id
*/
...
...
@@ -56,10 +61,6 @@ public class OrderInfoBean implements SendMsgType {
*/
private
String
flyPrintInfo
;
/**
* 打印狀態
*/
private
int
printStatus
;
/**
* 食品信息
*/
private
List
<
FoodInfoBean
>
foodInfoBeanList
;
...
...
@@ -128,6 +129,14 @@ public class OrderInfoBean implements SendMsgType {
this
.
sendTime
=
sendTime
;
}
public
String
getOrderCreateTime
()
{
return
orderCreateTime
;
}
public
void
setOrderCreateTime
(
String
orderCreateTime
)
{
this
.
orderCreateTime
=
orderCreateTime
;
}
public
String
getSendDeviceId
()
{
return
this
.
sendDeviceId
;
}
...
...
@@ -167,15 +176,6 @@ public class OrderInfoBean implements SendMsgType {
public
void
setFlyPrintInfo
(
String
flyPrintInfo
)
{
this
.
flyPrintInfo
=
flyPrintInfo
;
}
public
int
getPrintStatus
()
{
return
this
.
printStatus
;
}
public
void
setPrintStatus
(
int
printStatus
)
{
this
.
printStatus
=
printStatus
;
}
public
List
<
FoodInfoBean
>
getFoodInfoBeanList
()
{
return
foodInfoBeanList
;
}
...
...
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