Commit 3ce7eda1 by 王宇航

1、食品數量改為int型

2、新增訂單創建時間、去除打印狀態字段(不由客戶端上傳)
parent 8474b24c
...@@ -3,20 +3,7 @@ ...@@ -3,20 +3,7 @@
<component name="deploymentTargetDropDown"> <component name="deploymentTargetDropDown">
<value> <value>
<entry key="app"> <entry key="app">
<State> <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>
</entry> </entry>
</value> </value>
</component> </component>
......
...@@ -31,7 +31,7 @@ class MainActivity : Activity() { ...@@ -31,7 +31,7 @@ class MainActivity : Activity() {
tvConnect.isClickable = false tvConnect.isClickable = false
connect = GingerSoftConnect() connect = GingerSoftConnect()
msgSender = connect!!.connect( msgSender = connect!!.connect(
"192.168.1.12", "192.168.2.164",
12581, 12581,
object : GingerSoftConnect.SocketStateListener { object : GingerSoftConnect.SocketStateListener {
override fun onOpen() { override fun onOpen() {
...@@ -75,27 +75,166 @@ class MainActivity : Activity() { ...@@ -75,27 +75,166 @@ class MainActivity : Activity() {
senderId = 1965.toString() senderId = 1965.toString()
senderName = "Glen$count" senderName = "Glen$count"
tableName = "餐檯$count" tableName = "餐檯$count"
sendTime = SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(Date()) sendTime = "2023-05-31 12:31:31"
sendDeviceId = "6464646sdfs" sendDeviceId = "6464646sdfs"
sendDeviceName = "POS$count" sendDeviceName = "POS$count"
sendOrderCount = 4 + count sendOrderCount = 4 + count
isFirstSendOrder = true isFirstSendOrder = true
flyPrintInfo = "K1-L2"
foodInfoBeanList = mutableListOf<FoodInfoBean>().apply { foodInfoBeanList = mutableListOf<FoodInfoBean>().apply {
for (i in 0 until 50) {
add(FoodInfoBean().apply { add(FoodInfoBean().apply {
foodId = "${1 + i}" foodId = "1"
printId = "1166$i" printId = "11661"
orderId = 1111L + count orderId = 1111L + count
foodName = "這是一個名字超級長的食品$i" foodName = "經典雙人套餐"
quantity = count.toString() quantity = count
price = count * 1.1 price = count * 1.1
type = (i % 3) + 1 type = 1
parentId = "0" parentId = "0"
isPrintRedLetter = false 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) msgSender?.initSendData(Action.KitchenInfo, order)
......
...@@ -20,7 +20,7 @@ public class FoodInfoBean { ...@@ -20,7 +20,7 @@ public class FoodInfoBean {
/** /**
* 食品數量 * 食品數量
*/ */
private String quantity; private int quantity;
/** /**
* 食品金額 * 食品金額
*/ */
...@@ -71,11 +71,11 @@ public class FoodInfoBean { ...@@ -71,11 +71,11 @@ public class FoodInfoBean {
this.foodName = FoodName; this.foodName = FoodName;
} }
public String getQuantity() { public int getQuantity() {
return this.quantity; return this.quantity;
} }
public void setQuantity(String quantity) { public void setQuantity(int quantity) {
this.quantity = quantity; this.quantity = quantity;
} }
......
...@@ -35,6 +35,11 @@ public class OrderInfoBean implements SendMsgType { ...@@ -35,6 +35,11 @@ public class OrderInfoBean implements SendMsgType {
* 送單時間 * 送單時間
*/ */
private String sendTime; private String sendTime;
/**
* 訂單創建時間
*/
private String orderCreateTime;
/** /**
* 發送數據的設備id * 發送數據的設備id
*/ */
...@@ -56,10 +61,6 @@ public class OrderInfoBean implements SendMsgType { ...@@ -56,10 +61,6 @@ public class OrderInfoBean implements SendMsgType {
*/ */
private String flyPrintInfo; private String flyPrintInfo;
/** /**
* 打印狀態
*/
private int printStatus;
/**
* 食品信息 * 食品信息
*/ */
private List<FoodInfoBean> foodInfoBeanList; private List<FoodInfoBean> foodInfoBeanList;
...@@ -128,6 +129,14 @@ public class OrderInfoBean implements SendMsgType { ...@@ -128,6 +129,14 @@ public class OrderInfoBean implements SendMsgType {
this.sendTime = sendTime; this.sendTime = sendTime;
} }
public String getOrderCreateTime() {
return orderCreateTime;
}
public void setOrderCreateTime(String orderCreateTime) {
this.orderCreateTime = orderCreateTime;
}
public String getSendDeviceId() { public String getSendDeviceId() {
return this.sendDeviceId; return this.sendDeviceId;
} }
...@@ -167,15 +176,6 @@ public class OrderInfoBean implements SendMsgType { ...@@ -167,15 +176,6 @@ public class OrderInfoBean implements SendMsgType {
public void setFlyPrintInfo(String flyPrintInfo) { public void setFlyPrintInfo(String flyPrintInfo) {
this.flyPrintInfo = flyPrintInfo; this.flyPrintInfo = flyPrintInfo;
} }
public int getPrintStatus() {
return this.printStatus;
}
public void setPrintStatus(int printStatus) {
this.printStatus = printStatus;
}
public List<FoodInfoBean> getFoodInfoBeanList() { public List<FoodInfoBean> getFoodInfoBeanList() {
return foodInfoBeanList; return foodInfoBeanList;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment