|
@@ -745,18 +745,19 @@ public class AdminMachineController {
|
|
|
WebApplicationContext webApplicationContext = ContextLoader.getCurrentWebApplicationContext();
|
|
|
ServletContext servletContext = webApplicationContext.getServletContext();
|
|
|
String realPath = servletContext.getRealPath(ResultInfo.QRCODE_TOOTH_IMAGE);
|
|
|
- boolean bl = false;
|
|
|
+
|
|
|
try {
|
|
|
- bl = QrCodeUtil.createQrCode(scanningQrCode+berQrcode+num,realPath+"/"+berQrcode+num+".",430,430);
|
|
|
+ QrCodeUtil.createQrCode(scanningQrCode+berQrcode+num,realPath+"/"+berQrcode+num+".",430,430);
|
|
|
+ StringBuffer url = request.getRequestURL();
|
|
|
+ //String tempContextUrl = url.delete(url.length() - request.getRequestURI().length(), url.length()).append(request.getContextPath()).append("/").toString();
|
|
|
+ String tempContextUrl = ResultInfo.ROOT_DIRECTORY;
|
|
|
+ qrCodeUrl = tempContextUrl +ResultInfo.QRCODE_TOOTH_IMAGE+ "/"+berQrcode+num+".png";
|
|
|
}catch (Exception e){
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
- if(bl){
|
|
|
- StringBuffer url = request.getRequestURL();
|
|
|
- //String tempContextUrl = url.delete(url.length() - request.getRequestURI().length(), url.length()).append(request.getContextPath()).append("/").toString();
|
|
|
- String tempContextUrl = ResultInfo.ROOT_DIRECTORY;
|
|
|
- qrCodeUrl = tempContextUrl +ResultInfo.QRCODE_TOOTH_IMAGE+ "/"+berQrcode+num+".png";
|
|
|
- }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
}else{
|
|
|
switch (String.valueOf(machineNumber).length()) {
|
|
|
case 0:
|