代码更新
This commit is contained in:
@@ -45,7 +45,6 @@ public class PrintServiceImpl implements PrintService {
|
|||||||
public JSONObject customerPrint(JSONObject whereJson) {
|
public JSONObject customerPrint(JSONObject whereJson) {
|
||||||
JSONObject jo = new JSONObject();
|
JSONObject jo = new JSONObject();
|
||||||
|
|
||||||
try {
|
|
||||||
String box_no = whereJson.getString("box_no");
|
String box_no = whereJson.getString("box_no");
|
||||||
|
|
||||||
JSONObject box_jo = WQL.getWO("PDA_ST_01").addParam("flag", "5").addParam("box_no", box_no).process().uniqueResult(0);
|
JSONObject box_jo = WQL.getWO("PDA_ST_01").addParam("flag", "5").addParam("box_no", box_no).process().uniqueResult(0);
|
||||||
@@ -93,7 +92,7 @@ public class PrintServiceImpl implements PrintService {
|
|||||||
// 生成txt文件
|
// 生成txt文件
|
||||||
String filePath = "//10.1.3.21" + "/LMSPrinter" + "外包标签.txt";
|
String filePath = "//10.1.3.21" + "/LMSPrinter" + "外包标签.txt";
|
||||||
FileWriter fw = null;
|
FileWriter fw = null;
|
||||||
|
try {
|
||||||
File file = new File(filePath);
|
File file = new File(filePath);
|
||||||
if (!file.exists()) {
|
if (!file.exists()) {
|
||||||
file.createNewFile();
|
file.createNewFile();
|
||||||
@@ -121,6 +120,12 @@ public class PrintServiceImpl implements PrintService {
|
|||||||
bw.close();
|
bw.close();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
jo.put("message", "打印失败!"+e.getMessage());
|
jo.put("message", "打印失败!"+e.getMessage());
|
||||||
|
} finally {
|
||||||
|
try {
|
||||||
|
fw.close();
|
||||||
|
} catch (Exception e) {
|
||||||
|
jo.put("message", "打印失败!"+e.getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
jo.put("message", "打印成功!");
|
jo.put("message", "打印成功!");
|
||||||
return jo;
|
return jo;
|
||||||
|
|||||||
Reference in New Issue
Block a user