Ver código fonte

导入修改

huxy 2 anos atrás
pai
commit
cd72d24819

+ 3 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/spapl/controller/SyPreAssembledPackingListController.java

@@ -1021,7 +1021,9 @@ public class SyPreAssembledPackingListController extends JeecgController<SyPreAs
             }
             maps.put(0,listMap);
             templateExcelConstants.setColForEach(true);
-            Workbook workbook = ExcelExportUtil.exportExcelClone(maps,templateExcelConstants);
+           // TemplateExportParams params = new TemplateExportParams(load);
+            Workbook workbook = ExcelExportUtil.exportExcel(templateExcelConstants, new HashMap<>());
+           // Workbook workbook = ExcelExportUtil.exportExcelClone(maps,templateExcelConstants);
             refreshSheet3(workbook,temps);//配置某列数据
             ServletOutputStream outputStream = response.getOutputStream();
             workbook.write(outputStream);

+ 6 - 16
jeecg-boot-module-system/src/main/java/org/jeecg/modules/splfi/controller/SyPackingListFabricController.java

@@ -572,24 +572,14 @@ public class SyPackingListFabricController {
 								 throw new JeecgBootException("请填写第"+(x+1)+"行里的"+sheet.getRow(3).getCell(i));
 							 }
 						 }
-						 cell.setCellType(CellType.STRING);//获取的都转换成String
-						 FormulaEvaluator formulaEvaluator = new XSSFFormulaEvaluator((XSSFWorkbook) workbook1);
-						 //获取单元格内容的类型
-						 CellType cellType = cell.getCellType();
-						 //判断是否存储的为公式,此处本可以不加判断
-						 if (cellType.equals(CellType.FORMULA)){
-							 //获取公式,可以理解为已String类型获取cell的值输出
-							 String cellFormula = cell.getCellFormula();
-							 //System.out.println(cellFormula);
-							 //执行公式,此处cell的值就是公式
-							 CellValue evaluate = formulaEvaluator.evaluate(cell);
-							 //System.out.println(evaluate.formatAsString());
-							 itemStrs.add(evaluate.formatAsString());
-						 }else{
+						 if(cell!=null){
+							 cell.setCellType(CellType.STRING);//获取的都转换成String
 							 itemStrs.add(cell.toString());
+						 }else{
+							 itemStrs.add("");
 						 }
 					 }
-					 SyPackingListFabricItem syPackingListFabricItem=new SyPackingListFabricItem(itemStrs.toArray(new String[itemStrs.size()]),x+5);
+					 SyPackingListFabricItem syPackingListFabricItem=new SyPackingListFabricItem(itemStrs.toArray(new String[itemStrs.size()]),x+1);
 					 items.add(syPackingListFabricItem);
 				 }
 			 }
@@ -657,7 +647,7 @@ public class SyPackingListFabricController {
 
 						 }*/
 					 }
-					 SyPackingListFabricItem syPackingListFabricItem=new SyPackingListFabricItem(itemStrs.toArray(new String[itemStrs.size()]),x+5);
+					 SyPackingListFabricItem syPackingListFabricItem=new SyPackingListFabricItem(itemStrs.toArray(new String[itemStrs.size()]),x+1);
 					 items.add(syPackingListFabricItem);
 				 }
 			 }

+ 1 - 2
jeecg-boot-module-system/src/main/java/org/jeecg/modules/splfi/service/impl/SyPackingListFabricServiceImpl.java

@@ -1237,7 +1237,7 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
 			return null;
 		}*/
 		String isSucceed=null;
-		/*if(mapList2!=null&&mapList2.size()>0&&main.getIsSucceed()!=null){//印花
+		if(mapList2!=null&&mapList2.size()>0&&main.getIsSucceed()!=null){//印花
 			JSONArray resturn2 = InterfaceConnUtils.doPost(mapList2,"materialout_import");//采购入库单
 			isSucceed=result(main,resturn2,"材料出库单",((Map) mapList2.get(0)).get("CACCID").toString(),"2");//采购入库单
 			isSucceed(main,isSucceed);
@@ -1253,7 +1253,6 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
 			isSucceed(main,isSucceed);
 			this.purchaseWarehousingMapper.updateVoucherHistoryCNumber(org.jeecg.modules.system.util.oConvertUtils.maxNumber(resturn2.getJSONObject(0).get("U8ReceiptNo").toString()),"107");
 		}
-*/
 		String recording=null;
 		if(main.getRecording()!=null){
 			String[] recordings=main.getRecording().split(",");

+ 4 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/splt/service/impl/SyPackingListTailoringServiceImpl.java

@@ -877,13 +877,16 @@ public class SyPackingListTailoringServiceImpl extends ServiceImpl<SyPackingList
 				map5.put("CPAYCODE",orderData.get("cPayCode"));//付款条件编码(如果传空,取来源单据)
 			}
 			for (SyPackingListTailoringItem item : main.getSyPackingListTailoringItemList()){
+
+				if(item.getTotal()==null||item.getTotal().doubleValue()==0){
+					continue;
+				}
 				JSONObject mapItem=new JSONObject();
 				JSONObject mapItem3=new JSONObject();
 				JSONObject mapItem4=new JSONObject();
 				JSONObject mapItem5=new JSONObject();
 				JSONObject mapItem6=new JSONObject();
 
-
 				map.put("CACCID",mapt.get("account"));//账套号
 				map3.put("CACCID",mapt.get("account"));//账套号
 				map4.put("CACCID",mapt.get("account"));//账套号