打印bug修改

master
zpl 3 years ago
parent 080abd7242
commit cc4fd3e7bd

@ -76,7 +76,8 @@ public class PrintLogServiceImpl extends ServiceImpl<PrintLogMapper, PrintLog> i
* {"msg":"打印成功","code":0} * {"msg":"打印成功","code":0}
* {"msg":"打印失败","code":500} * {"msg":"打印失败","code":500}
* -printNameisPrint * -printNameisPrint
*/ * */
JSONObject jsonObject = JSONObject.parseObject(post); JSONObject jsonObject = JSONObject.parseObject(post);
Integer code = jsonObject.getInteger("code"); Integer code = jsonObject.getInteger("code");
String msg = jsonObject.getString("msg"); String msg = jsonObject.getString("msg");
@ -89,7 +90,12 @@ public class PrintLogServiceImpl extends ServiceImpl<PrintLogMapper, PrintLog> i
PrintLog printLogOne = new PrintLog(); PrintLog printLogOne = new PrintLog();
printLogOne.setHandle(printLog.getHandle()); printLogOne.setHandle(printLog.getHandle());
printLogOne.setIsPrint("true"); printLogOne.setIsPrint("true");
printLogOne.setPrintNum(printLog.getPrintNum()+1); Integer printNum = printLog.getPrintNum();
if (printNum == null){
printLogOne.setPrintNum(1);
}else {
printLogOne.setPrintNum(printNum+1);
}
if (!printLog.getCategory().equals(Constants.PRINT_TYPE_SFC)){ if (!printLog.getCategory().equals(Constants.PRINT_TYPE_SFC)){
printLogOne.setPrintName(printLog.getPrintName()); printLogOne.setPrintName(printLog.getPrintName());
} }

Loading…
Cancel
Save