浏览代码

面辅料调整箱数匹数

huxy 1 年之前
父节点
当前提交
33d1eb3bbd

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

@@ -1221,7 +1221,7 @@ public class SyPackingListFabricController implements Job {
 		 String str;
 		 StringBuilder exceptionStr=new StringBuilder();
 		 while ((str=fr.readLine())!=null){
-			 exceptionStr.append(str);
+			 exceptionStr.append(str+"\n");
 		 }
 		 //关闭流
 		 fr.close();

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

@@ -690,23 +690,27 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
 			queryWrapper.groupBy("inventory_code");
 			List<SyPackingListFabricItem> fabricItems=syPackingListFabricItemService.list(queryWrapper);
 			boolean bool=true;
+			BigDecimal rollsNum=new BigDecimal("0");
 			for (SyPackingListFabricItem fabricItem : fabricItems){
 				if(fabricItem.getNetWeight()==null||fabricItem.getNetWeight().doubleValue()==0){
-					message+="第"+num+"条提交失败,物料"+fabricItem.getInventoryCode()+"净重合计为0;\n";
+					message+="第"+num+"条提交失败,物料"+fabricItem.getInventoryCode()+"净重合计为0;";
 					bool=false;
 				}
 				else if(fabricItem.getGrossWeight()==null||fabricItem.getGrossWeight().doubleValue()==0){
-					message+="第"+num+"条提交失败,物料"+fabricItem.getInventoryCode()+"毛重合计为0;\n";
+					message+="第"+num+"条提交失败,物料"+fabricItem.getInventoryCode()+"毛重合计为0;";
 					bool=false;
 				}
-				else if(fabricItem.getRolls()==null||fabricItem.getRolls().doubleValue()==0){
-					message+="第"+num+"条提交失败,物料"+fabricItem.getInventoryCode()+"匹数(箱数)合计为0;\n";
-					bool=false;
+				else if(fabricItem.getRolls()!=null){
+					rollsNum.add(fabricItem.getRolls());
 				}
 				if (bool=false){
 					break;
 				}
 			}
+			if(rollsNum.doubleValue()==0){
+				message+="第"+num+"条提交失败,箱数(匹数)合计为0;";
+				bool=false;
+			}
 			if (bool){
 				SyPackingListFabric syPackingListFabric=syPackingListFabricMapper.selectById(id);
 				syPackingListFabric.setStatus("1");//提交

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/splt/controller/SyPackingListTailoringController.java

@@ -1642,7 +1642,7 @@ public class SyPackingListTailoringController implements Job {
 		 String str;
 		 StringBuilder exceptionStr=new StringBuilder();
 		 while ((str=fr.readLine())!=null){
-			 exceptionStr.append(str);
+			 exceptionStr.append(str+"\n");
 		 }
 		 //关闭流
 		 fr.close();