Commit f6035433 authored by 竹天卫's avatar 竹天卫

扫码获取样品信息3

parent f243652d
...@@ -169,11 +169,11 @@ public class SampleController { ...@@ -169,11 +169,11 @@ public class SampleController {
SampleVo sampleVo = sampleService.getDetail(Integer.valueOf(sampleId)).getData(); SampleVo sampleVo = sampleService.getDetail(Integer.valueOf(sampleId)).getData();
String content = ""; String content = "";
if(sampleVo != null){ if(sampleVo != null){
content = "样品名称:"+sampleVo.getName()!= null?sampleVo.getName():"" +" \n "+ content = "样品名称:"+( sampleVo.getName()!= null?sampleVo.getName():"") +" \n "+
"本所编号:"+sampleVo.getCementCode()!= null?sampleVo.getCementCode():"" +" \n "+ "本所编号:"+( sampleVo.getCementCode()!= null?sampleVo.getCementCode():"") +" \n "+
"项目编号:"+sampleVo.getProjectCode()!= null?sampleVo.getProjectCode():"" +" \n "+ "项目编号:"+( sampleVo.getProjectCode()!= null?sampleVo.getProjectCode():"") +" \n "+
"项目名称:"+sampleVo.getProjectName()!= null?sampleVo.getProjectName():"" +" \n "+ "项目名称:"+( sampleVo.getProjectName()!= null?sampleVo.getProjectName():"") +" \n "+
"小样位置:"+sampleVo.getLittlePosition()!= null?sampleVo.getLittlePosition():"" ; "小样位置:"+( sampleVo.getLittlePosition()!= null?sampleVo.getLittlePosition():"") ;
} }
ByteArrayOutputStream stream = new ByteArrayOutputStream(); ByteArrayOutputStream stream = new ByteArrayOutputStream();
BufferedImage bufferedImage = QrCodeUtil.generate(content, 200, 200); BufferedImage bufferedImage = QrCodeUtil.generate(content, 200, 200);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment