单据报表打印代码提交

pro
郑明梁 2 years ago
parent fe4b0082e3
commit bd15235a99

@ -280,6 +280,7 @@ public class BasicOrderPrintController {
Map<String, Object> bizData = new HashMap<>(); Map<String, Object> bizData = new HashMap<>();
bizData.put("index", i); bizData.put("index", i);
bizData.put("nameCode", obj.getNameCode() == null ? ' ' : obj.getNameCode()); bizData.put("nameCode", obj.getNameCode() == null ? ' ' : obj.getNameCode());
bizData.put("udiCode", udiProductEntity.getUuid() == null ? ' ' : udiProductEntity.getUuid());
bizData.put("cpmctymc", udiProductEntity.getCpmctymc() == null ? ' ' : udiProductEntity.getCpmctymc()); bizData.put("cpmctymc", udiProductEntity.getCpmctymc() == null ? ' ' : udiProductEntity.getCpmctymc());
bizData.put("ggxh", udiProductEntity.getGgxh() == null ? ' ' : udiProductEntity.getGgxh()); bizData.put("ggxh", udiProductEntity.getGgxh() == null ? ' ' : udiProductEntity.getGgxh());
bizData.put("batchNo", obj.getBatchNo() == null ? ' ' : obj.getBatchNo()); bizData.put("batchNo", obj.getBatchNo() == null ? ' ' : obj.getBatchNo());
@ -289,7 +290,9 @@ public class BasicOrderPrintController {
list.add(bizData); list.add(bizData);
i++; i++;
} }
String param = JSON.toJSONString(list); Map<String, Object> data = new HashMap<>();
data.put("data", list);
String param = JSON.toJSONString(data);
JasperUtils.jasperReport(request, response, param, filePath + "/pdf/template/" + systemPDFTemplateEntity.getPath(), "pdf"); JasperUtils.jasperReport(request, response, param, filePath + "/pdf/template/" + systemPDFTemplateEntity.getPath(), "pdf");
return ResultVOUtils.success(); return ResultVOUtils.success();
} }

Loading…
Cancel
Save