|
@@ -316,7 +316,6 @@ public class WorkController {
|
|
|
|
|
|
Map<String, Object> accMap = new HashMap<>();
|
|
Map<String, Object> accMap = new HashMap<>();
|
|
accMap.put("sort", i+1);
|
|
accMap.put("sort", i+1);
|
|
- accMap.put("number", stock.getStockNumber());
|
|
|
|
accMap.put("length", stock.getLength());
|
|
accMap.put("length", stock.getLength());
|
|
mapList.add(accMap);
|
|
mapList.add(accMap);
|
|
}
|
|
}
|
|
@@ -377,19 +376,17 @@ public class WorkController {
|
|
Map item = list.get(i);
|
|
Map item = list.get(i);
|
|
|
|
|
|
Row row = null;
|
|
Row row = null;
|
|
- int remainder = i % 4;
|
|
|
|
|
|
+ int remainder = i % 6;
|
|
if(remainder == 0) {
|
|
if(remainder == 0) {
|
|
row = sheet.createRow(++rowNum);
|
|
row = sheet.createRow(++rowNum);
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
row = sheet.getRow(rowNum);
|
|
row = sheet.getRow(rowNum);
|
|
}
|
|
}
|
|
- row.createCell(remainder * 3).setCellValue(item.get("sort").toString());
|
|
|
|
- row.getCell(remainder * 3).setCellStyle(style);
|
|
|
|
- row.createCell(remainder * 3 + 1).setCellValue(item.get("number").toString());
|
|
|
|
- row.getCell(remainder * 3 + 1).setCellStyle(style);
|
|
|
|
- row.createCell(remainder * 3 + 2).setCellValue(item.get("length").toString());
|
|
|
|
- row.getCell(remainder * 3 + 2).setCellStyle(style);
|
|
|
|
|
|
+ row.createCell(remainder * 2).setCellValue(item.get("sort").toString());
|
|
|
|
+ row.getCell(remainder * 2).setCellStyle(style);
|
|
|
|
+ row.createCell(remainder * 2 + 1).setCellValue(item.get("length").toString());
|
|
|
|
+ row.getCell(remainder * 2 + 1).setCellStyle(style);
|
|
}
|
|
}
|
|
|
|
|
|
rowNum++;
|
|
rowNum++;
|
|
@@ -427,6 +424,7 @@ public class WorkController {
|
|
ByteArrayOutputStream output = new ByteArrayOutputStream();
|
|
ByteArrayOutputStream output = new ByteArrayOutputStream();
|
|
wb.write(output);
|
|
wb.write(output);
|
|
String fileName = "细码单(" + sdf.format(new Date()) + ").xls";
|
|
String fileName = "细码单(" + sdf.format(new Date()) + ").xls";
|
|
|
|
+// String name = "D:\\" + fileName;//调试
|
|
String name = "D:\\JpSoft\\Tomcat 8.5\\webapps\\printing-portal\\xls\\" + fileName;
|
|
String name = "D:\\JpSoft\\Tomcat 8.5\\webapps\\printing-portal\\xls\\" + fileName;
|
|
File file = new File(name);
|
|
File file = new File(name);
|
|
FileOutputStream file1 = new FileOutputStream(file);
|
|
FileOutputStream file1 = new FileOutputStream(file);
|