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
80c5981f
Commit
80c5981f
authored
Dec 04, 2020
by
宁斌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.1.2,1.1.3正式版
parent
6597cebe
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
8 deletions
+25
-8
base-module/libs/jcifs-1.3.19.jar
+0
-0
print-module/src/main/java/com/joe/print/mvp/print/PrintTest.java
+25
-8
No files found.
base-module/libs/jcifs-1.3.19.jar
0 → 100644
View file @
80c5981f
File added
print-module/src/main/java/com/joe/print/mvp/print/PrintTest.java
View file @
80c5981f
...
...
@@ -7,10 +7,10 @@ import android.view.View;
import
android.widget.LinearLayout
;
import
android.widget.TextView
;
import
com.gingersoft.gsa.cloud.
base.order.bean
.OrderDetail
;
import
com.gingersoft.gsa.cloud.
base
.utils.time.TimeUtils
;
import
com.gingersoft.gsa.cloud.
common.core.order.commodity
.OrderDetail
;
import
com.gingersoft.gsa.cloud.
common
.utils.time.TimeUtils
;
import
com.gingersoft.gsa.cloud.database.bean.PrinterDeviceBean
;
import
com.gingersoft.gsa.cloud.print.bean.OrderDetails
;
import
com.gingersoft.gsa.cloud.
common.core.
print.bean.OrderDetails
;
import
com.joe.print.R
;
import
java.util.ArrayList
;
...
...
@@ -34,8 +34,25 @@ public class PrintTest extends PrinterRoot {
}
@Override
public
String
getPrintData
(
Context
mContext
,
PrinterDeviceBean
deviceBean
)
{
return
null
;
public
String
[]
getPrintDatas
(
Context
mContext
,
PrinterDeviceBean
deviceBean
)
{
String
stringBuilder
=
"<html><body>"
+
"<p>測試打印1<p/></br>"
+
"<p>測試打印2<p/></br>"
+
"<p>測試打印3<p/></br>"
+
"<p>測試打印4<p/></br>"
+
"<p>測試打印5<p/></br>"
+
"<row>"
+
" <column>This is an item with super long name</column>"
+
" <column offset=0.6>1</column>"
+
" <column offset=last>HKD 100</column>"
+
" </row>"
+
"</body></html>"
;
int
printCount
=
getPrintCount
(
mContext
);
String
[]
pritContent
=
new
String
[
printCount
];
for
(
int
i
=
0
;
i
<
printCount
;
i
++)
{
pritContent
[
i
]
=
stringBuilder
;
}
return
pritContent
;
}
@Override
...
...
@@ -58,7 +75,7 @@ public class PrintTest extends PrinterRoot {
}
public
Bitmap
getBitmap
(
Context
mContext
,
PrinterDeviceBean
deviceBean
){
public
Bitmap
getBitmap
(
Context
mContext
,
PrinterDeviceBean
deviceBean
)
{
LinearLayout
layout
=
new
LinearLayout
(
mContext
);
layout
.
setOrientation
(
LinearLayout
.
VERTICAL
);
layout
.
addView
(
getTextView
(
mContext
,
"炒爐打印測試"
,
Gravity
.
CENTER_HORIZONTAL
,
getDimensionPixelSize
(
mContext
,
R
.
dimen
.
dp_10
)));
...
...
@@ -66,12 +83,12 @@ public class PrintTest extends PrinterRoot {
layout
.
addView
(
getTextLine
(
mContext
,
"項目"
));
List
<
OrderDetails
.
DataBean
.
PRODUCTNAMEBean
>
productnameBeans
=
new
ArrayList
<>();
OrderDetails
.
DataBean
.
PRODUCTNAMEBean
productnameBean
=
new
OrderDetails
.
DataBean
.
PRODUCTNAMEBean
();
OrderDetails
.
DataBean
.
PRODUCTNAMEBean
productnameBean
=
new
OrderDetails
.
DataBean
.
PRODUCTNAMEBean
();
productnameBean
.
setPRODUCT_NAME
(
"測試食品"
);
productnameBean
.
setNum
(
"1"
);
productnameBean
.
setPRICE
(
"10.0"
);
List
<
OrderDetails
.
DataBean
.
PRODUCTNAMEBean
.
ChildBeanX
>
childBeanXES
=
new
ArrayList
<>();
List
<
OrderDetails
.
DataBean
.
PRODUCTNAMEBean
.
ChildBeanX
>
childBeanXES
=
new
ArrayList
<>();
OrderDetails
.
DataBean
.
PRODUCTNAMEBean
.
ChildBeanX
childBeanX
=
new
OrderDetails
.
DataBean
.
PRODUCTNAMEBean
.
ChildBeanX
();
childBeanX
.
setPRODUCT_NAME
(
"測試子食品"
);
childBeanX
.
setNum
(
"1"
);
...
...
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