liuchaohui 2 anni fa
parent
commit
df1a62251d

+ 13 - 12
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/controller/SyCarryController.java

@@ -218,7 +218,7 @@ public class SyCarryController {
               return Result.ok(syCarryPage);
           } catch (Exception e) {
               log.error(e.getMessage(),e);
-              return Result.error("文件导入失败:"+e.getMessage());
+              return Result.error("导入文件有误!!!");
           } finally {
               try {
                   file.getInputStream().close();
@@ -249,15 +249,16 @@ public class SyCarryController {
 					break;
 				}
 				syCarryB.setOrderDate(row.getCell(0).getDateCellValue());
-			 	syCarryB.setInvoiceNo(row.getCell(1).getStringCellValue());
-			 	syCarryB.setAllNum(row.getCell(2).getNumericCellValue());
-			 	syCarryB.setCabinets(row.getCell(3).getNumericCellValue());
-			 	syCarryB.setDetailedNum(row.getCell(4).getNumericCellValue());
-			 	syCarryB.setCoatHanger(row.getCell(5)==null?0:row.getCell(5).getNumericCellValue());
-			 	syCarryB.setContainerNo(row.getCell(6).getStringCellValue());
-				syCarryB.setPrice(row.getCell(7).getNumericCellValue());
-			 	syCarryB.setTotalPrice(row.getCell(8).getNumericCellValue());
-			 	syCarryB.setJhyNameData(row.getCell(9).getStringCellValue());
+			 	syCarryB.setInvoiceNo(row.getCell(1)==null?"":row.getCell(1).getStringCellValue());
+			 	syCarryB.setSaleInvoiceNo(row.getCell(2)==null?"":row.getCell(2).getStringCellValue());
+			 	syCarryB.setAllNum(row.getCell(3)==null?0:row.getCell(3).getNumericCellValue());
+			 	syCarryB.setCabinets(row.getCell(4)==null?0:row.getCell(4).getNumericCellValue());
+			 	syCarryB.setDetailedNum(row.getCell(5)==null?0:row.getCell(5).getNumericCellValue());
+			 	syCarryB.setCoatHanger(row.getCell(6)==null?0:row.getCell(6).getNumericCellValue());
+			 	syCarryB.setContainerNo(row.getCell(7).getStringCellValue());
+				syCarryB.setPrice(row.getCell(8).getNumericCellValue());
+			 	syCarryB.setTotalPrice(row.getCell(9).getNumericCellValue());
+			 	syCarryB.setJhyNameData(row.getCell(10).getStringCellValue());
 				 if(StringUtils.isNotBlank(syCarryB.getJhyNameData())){
 					 String[] names = syCarryB.getJhyNameData().split("/");
 					 StringBuffer sb = new StringBuffer();
@@ -277,8 +278,8 @@ public class SyCarryController {
 					 }
 					 syCarryB.setJhyByData(sb.toString());
 				 }
-			 	syCarryB.setReason(row.getCell(10)==null?"":row.getCell(10).getStringCellValue());
-			 	syCarryB.setDemo(row.getCell(11)==null?"":row.getCell(11).getStringCellValue());
+			 	syCarryB.setReason(row.getCell(11)==null?"":row.getCell(11).getStringCellValue());
+			 	syCarryB.setDemo(row.getCell(12)==null?"":row.getCell(12).getStringCellValue());
 			 	syCarryBList.add(syCarryB);
 			 }
 		 }

+ 3 - 0
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/oa/entity/SyCarryB.java

@@ -83,6 +83,9 @@ public class SyCarryB implements Serializable {
 	/**发票号*/
     @Excel(name = "发票号", width = 15)
 	private String invoiceNo;
+	/**发票号*/
+	@Excel(name = "外销发票号", width = 15)
+	private String saleInvoiceNo;
 	/**备注*/
     @Excel(name = "备注", width = 15)
 	private String demo;