opt:优化打印功能,添加打印日志
This commit is contained in:
@@ -423,6 +423,11 @@ public class LashManageServiceImpl implements LashManageService {
|
||||
int times = Integer.parseInt(labelingTemplateNum);
|
||||
for(int i=0;i<times;i++){
|
||||
new PrintServiceImpl().customerPrintBY2(print_jo);
|
||||
try {
|
||||
Thread.sleep(1000);
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
//更新打印机设备
|
||||
result.put("printDevice", print_info.getString("print_code"));
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package org.nl.wms.pda.st.service.impl;
|
||||
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
@@ -442,8 +443,10 @@ public class PrintServiceImpl implements PrintService {
|
||||
|
||||
bw.close();
|
||||
jo.put("message", "打印成功!");
|
||||
log.info(DateUtil.now()+"打印成功!");
|
||||
} catch (Exception e) {
|
||||
jo.put("message", "打印失败!" + e.getMessage());
|
||||
log.info(DateUtil.now()+"1打印失败!");
|
||||
} finally {
|
||||
try {
|
||||
if(fw != null){
|
||||
@@ -451,6 +454,7 @@ public class PrintServiceImpl implements PrintService {
|
||||
}
|
||||
} catch (Exception e) {
|
||||
jo.put("message", "打印失败!" + e.getMessage());
|
||||
log.info(DateUtil.now()+"2打印失败!");
|
||||
}
|
||||
}
|
||||
return jo;
|
||||
|
||||
Reference in New Issue
Block a user