|
@@ -21,6 +21,7 @@ import org.apache.poi.hssf.util.HSSFColor;
|
|
|
import org.apache.poi.ss.usermodel.*;
|
|
|
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
|
|
import org.jeecg.common.constant.CommonConstant;
|
|
|
+import org.jeecg.common.exception.JeecgBootException;
|
|
|
import org.jeecg.common.system.util.JwtUtil;
|
|
|
import org.jeecg.common.system.vo.LoginUser;
|
|
|
import org.apache.shiro.SecurityUtils;
|
|
@@ -627,8 +628,6 @@ public class SyPackingListTailoringController {
|
|
|
System.out.println("文件类型--fileType\t"+file.getContentType());
|
|
|
System.out.println("文件大小--fileSize\t"+file.getSize()/1024+"KB");
|
|
|
InputStream inputStream=file.getInputStream();
|
|
|
- ImportParams params = new ImportParams();
|
|
|
- System.out.println("inputSream:\t"+inputStream);
|
|
|
Workbook workbook=new XSSFWorkbook(inputStream);
|
|
|
refreshSheet(workbook);
|
|
|
}
|
|
@@ -641,7 +640,9 @@ public class SyPackingListTailoringController {
|
|
|
|
|
|
List<SyPackingListTailoring> mains=new ArrayList<>();
|
|
|
Iterator sheets=workbook1.sheetIterator();
|
|
|
+ int num=0;
|
|
|
while (sheets.hasNext()){
|
|
|
+ num++;
|
|
|
SyPackingListTailoring main=new SyPackingListTailoring();
|
|
|
List<SyPackingListTailoringItem> items=new ArrayList<>();
|
|
|
Sheet sheet=(Sheet) sheets.next();
|
|
@@ -656,9 +657,10 @@ public class SyPackingListTailoringController {
|
|
|
}
|
|
|
for (int i=0;i<row.getLastCellNum();i++){
|
|
|
Cell cell=row.getCell(i);
|
|
|
- if(cell==null){
|
|
|
- break;
|
|
|
- }
|
|
|
+
|
|
|
+ throw new JeecgBootException("第"+num+"页的"+"第"+(x+1)+"行的"+
|
|
|
+ sheet.getRow(3).getCell(i).getStringCellValue()+"未填值!");
|
|
|
+ }*/
|
|
|
cell.setCellType(CellType.STRING);
|
|
|
System.out.print(cell.getStringCellValue()+"\t");
|
|
|
if(x==1&&i%2==1){
|
|
@@ -678,7 +680,10 @@ public class SyPackingListTailoringController {
|
|
|
|
|
|
}
|
|
|
}
|
|
|
- x=x<2?x++:x;
|
|
|
+ System.out.println("\nx为\t"+x);
|
|
|
+ x=x<2?++x:x;
|
|
|
+ System.out.println("3元运算符\t"+(x<2));
|
|
|
+ System.out.println("x为\t"+x);
|
|
|
if(x>3){
|
|
|
SyPackingListTailoringItem item=
|
|
|
new SyPackingListTailoringItem(str.substring(0,str.length()-1).split(","),
|