|
|
|
@ -28,7 +28,7 @@ public class QrCodeServiceImpl implements QrCodeService { |
|
|
|
QRCodeUtil qrCodeUtil = new QRCodeUtil(); |
|
|
|
String qrCodeStr = ""; |
|
|
|
//String qrCodeStr = "https://wab.hxgk.group/#/form_table/taskListPage? id=112&key=287135214646333440&formid=116&formKey=287145907965661184&title=t2&state=1";
|
|
|
|
String prefixLocal = "http://localhost:9998/form_table/taskListPage?"; |
|
|
|
String prefixLocal = "http://localhost:9998/#/form_table/taskListPage?"; |
|
|
|
String prefixout = "https://wab.hxgk.group/#/form_table/taskListPage?"; |
|
|
|
//获取参数
|
|
|
|
/* |
|
|
|
@ -42,10 +42,14 @@ public class QrCodeServiceImpl implements QrCodeService { |
|
|
|
* */ |
|
|
|
CustomerFormView c = customerFormViewService.getCustomerFormViewByCfid(cfid); |
|
|
|
//上线修改
|
|
|
|
qrCodeStr = prefixout+"id="+c.getCfid()+"&key="+c.getGroupid()+"&formid="+c.getId()+"&formKey="+c.getSignCode()+"&title="+c.getName()+"&state="+c.getStates(); |
|
|
|
qrCodeStr = prefixLocal+"id="+c.getCfid()+"&key="+c.getGroupid()+"&formid="+c.getId()+"&formKey="+c.getSignCode()+"&title="+c.getName()+"&state="+c.getStates(); |
|
|
|
Map<String,String> appAndGroupNameMap = customerFormViewService.getAppNameAndGroupNameByCfid(cfid); |
|
|
|
String groupName = appAndGroupNameMap.get("groupName"); |
|
|
|
String appName = appAndGroupNameMap.get("appName"); |
|
|
|
String formName = appAndGroupNameMap.get("formName"); |
|
|
|
//System.out.println(qrCodeStr);
|
|
|
|
try { |
|
|
|
BufferedImage bufferedImage = qrCodeUtil.getQRCodeImage(qrCodeStr, "生成的二维码"); |
|
|
|
BufferedImage bufferedImage = qrCodeUtil.getQRCodeImage(qrCodeStr, "扫码填写: "+groupName+"-"+appName+"-"+formName); |
|
|
|
String base64 = qrCodeUtil.bufferedImageToBase64(bufferedImage); |
|
|
|
return base64; |
|
|
|
} catch (Exception e) { |
|
|
|
@ -61,11 +65,11 @@ public class QrCodeServiceImpl implements QrCodeService { |
|
|
|
QRCodeUtil qrCodeUtil = new QRCodeUtil(); |
|
|
|
String basicQrCodeStr = ""; |
|
|
|
//String basicQrCodeStr = "https://wab.hxgk.group/#/form_table/taskListPage? id=112&key=287135214646333440&formid=116&formKey=287145907965661184&title=t2&state=1";
|
|
|
|
String prefixLocal = "http://localhost:9998/form_table/taskListPage?"; |
|
|
|
String prefixLocal = "http://localhost:9998/#/form_table/taskListPage?"; |
|
|
|
String prefixout = "https://wab.hxgk.group/#/form_table/taskListPage?"; |
|
|
|
CustomerFormView c = customerFormViewService.getCustomerFormViewByCfid(cfid); |
|
|
|
//上线修改
|
|
|
|
basicQrCodeStr = prefixout+"id="+c.getCfid()+"&key="+c.getGroupid()+"&formid="+c.getId()+"&formKey="+c.getSignCode()+"&title="+c.getName()+"&state="+c.getStates(); |
|
|
|
basicQrCodeStr = prefixLocal+"id="+c.getCfid()+"&key="+c.getGroupid()+"&formid="+c.getId()+"&formKey="+c.getSignCode()+"&title="+c.getName()+"&state="+c.getStates(); |
|
|
|
//查询要展示在表格中的信息
|
|
|
|
ArrayList<String> qrCodeShowFields = new ArrayList<>(); |
|
|
|
Object qrCodePrintStyle = settings.get("qrCodePrintStyle"); |
|
|
|
@ -94,7 +98,7 @@ public class QrCodeServiceImpl implements QrCodeService { |
|
|
|
String currentQrCodeStr = basicQrCodeStr+"&qrDetailId="+id; |
|
|
|
BufferedImage currentBufferedImage = null; |
|
|
|
try { |
|
|
|
currentBufferedImage = qrCodeUtil.getQRCodeImage(currentQrCodeStr, "生成的单条信息详情二维码"); |
|
|
|
currentBufferedImage = qrCodeUtil.getQRCodeImage(currentQrCodeStr); |
|
|
|
} catch (Exception e) { |
|
|
|
e.printStackTrace(); |
|
|
|
} |
|
|
|
@ -123,7 +127,7 @@ public class QrCodeServiceImpl implements QrCodeService { |
|
|
|
String currentQrCodeStr = basicQrCodeStr+"&qrDetailId="+id; |
|
|
|
BufferedImage currentBufferedImage = null; |
|
|
|
try { |
|
|
|
currentBufferedImage = qrCodeUtil.getQRCodeImage(currentQrCodeStr, "生成的单条信息详情二维码"); |
|
|
|
currentBufferedImage = qrCodeUtil.getQRCodeImage(currentQrCodeStr); |
|
|
|
} catch (Exception e) { |
|
|
|
e.printStackTrace(); |
|
|
|
} |
|
|
|
|