feat:新增测试模板打印
This commit is contained in:
parent
0047b170a7
commit
96cbb788dd
@ -234,6 +234,7 @@ public class UserConstants
|
||||
public static final String BARCODE_TYPE_TOOL = "TOOL";
|
||||
public static final String BARCODE_TYPE_SN = "SN";
|
||||
public static final String BARCODE_TYPE_PROCARD ="PROCARD";
|
||||
public static final String TEST_TYPE_PRINTER = "TEST";
|
||||
|
||||
|
||||
/**
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -20,6 +20,7 @@ message Printer{
|
||||
Warehouse_Area=8;
|
||||
Equipment_=9;
|
||||
Workstation_=10;
|
||||
TestPrinter_=11;
|
||||
}
|
||||
|
||||
//用data_type来识别哪个枚举类型(DataType是People的第一个属性,属性名是data_type)
|
||||
@ -38,6 +39,7 @@ message Printer{
|
||||
WarehouseArea warehouseArea = 10;
|
||||
Equipment equipment = 11;
|
||||
Workstation workstation = 12;
|
||||
TestPrinter testPrinter = 13;
|
||||
}
|
||||
|
||||
message IQCPrintMessage {
|
||||
@ -113,6 +115,10 @@ message Printer{
|
||||
string belongingProcess = 3;
|
||||
string param = 4;
|
||||
}
|
||||
message TestPrinter{
|
||||
string title = 1;
|
||||
string text = 2;
|
||||
}
|
||||
|
||||
//打印机信息
|
||||
message PrintInfo {
|
||||
|
@ -387,6 +387,15 @@ public class PrintServiceImpl implements IPrintService {
|
||||
// 构造对应的消息对象
|
||||
// msg = PrintMessageProto.Printer.newBuilder().setIqcPrintMessage(iQCPrintMessage).setDataType(dataType).setPrintInfo(printClientInfoMessage).build();
|
||||
break;
|
||||
case UserConstants.TEST_TYPE_PRINTER:
|
||||
// 测试模板
|
||||
//封装模板数据
|
||||
String title =params.get("title");
|
||||
String text =params.get("text");
|
||||
PrintMessageProto.Printer.TestPrinter testPrinter = PrintMessageProto.Printer.TestPrinter.newBuilder().setTitle(title).setText(text).build();
|
||||
// 构造对应的消息对象
|
||||
msg = PrintMessageProto.Printer.newBuilder().setTestPrinter(testPrinter).setDataType(dataType).setPrintInfo(printInfo).build();
|
||||
break;
|
||||
default:
|
||||
result.put("data","打印机不支持当前模板:" + "(" + businessType + ")");
|
||||
return result;
|
||||
|
Loading…
Reference in New Issue
Block a user