| 
					
				 | 
			
			
				@@ -474,7 +474,7 @@ public class SyShippingDetailsController extends JeecgController<SyShippingDetai 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   @AutoLog(value = "发运明细主表-导出") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   @ApiOperation(value="发运明细主表-导出", notes="发运明细主表-导出") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   @GetMapping(value = "/exportXls") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  public void exportXls(SyShippingDetailsVo syShippingDetails, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  public Result<String> exportXls(SyShippingDetailsVo syShippingDetails, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 								@RequestParam(name="pageNo", defaultValue="1") Integer pageNo, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 								@RequestParam(name="pageSize", defaultValue="10") Integer pageSize, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 								HttpServletResponse req) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -551,6 +551,12 @@ public class SyShippingDetailsController extends JeecgController<SyShippingDetai 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		  if(syShippingDetails.getFlourOrGarment().equals("0")){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			  List<SyShippingDetailsVo> itemList = syShippingDetailsMapper.excelItem(queryWrapper); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			  if(itemList.size()==0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				  result.setSuccess(false); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				  result.setResult("没有获取到数据,导出失败!"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				  result.setMessage("没有获取到数据,导出失败!"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				  return result; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			  } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			  org.jeecgframework.poi.excel.entity.TemplateExportParams params = new org.jeecgframework.poi.excel.entity.TemplateExportParams("D:\\单证模板\\出运面辅料数据.xlsx"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -626,6 +632,13 @@ public class SyShippingDetailsController extends JeecgController<SyShippingDetai 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		  }else{//成衣 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			  IPage<SyShippingDetailsVo> pageList = syShippingDetailsService.queryShippingDetails(page, queryWrapper); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			  if(pageList.getRecords().size()==0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				  result.setSuccess(false); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				  result.setResult("没有获取到数据,导出失败!"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				  result.setMessage("没有获取到数据,导出失败!"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				  return result; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			  } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			  for(SyShippingDetailsVo li:pageList.getRecords()){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 //				  if(oConvertUtils.isEmpty(li.getElementsId())){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 //					  result.setSuccess(false); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -700,6 +713,12 @@ public class SyShippingDetailsController extends JeecgController<SyShippingDetai 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				  builder1.deleteCharAt(builder1.length()-1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				  //创建列名放在第一行 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				  String[] params = null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				  if(oConvertUtils.isEmpty(syShippingDetails.getAccount())){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					  result.setSuccess(false); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					  result.setResult("导出失败!请选择账套号"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					  result.setMessage("导出失败!请选择账套号"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					  return result; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				  } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				  if(syShippingDetails.getAccount().equals("101")){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					  params = ("成衣工厂*STYLE*PO NO.*分销点*CTN NO. FROM*CTN NO. TO*item NO./SKU NO./UPC NO./PACKS CODE*PREACKSKU*" + builder + "COLOUR*计划装箱数量*N.W/CTN*G.W/CTN*L(CM)*W(CM)*H(CM)*BUYER*配码规格*TTL CTNS*TTL PCS*TTL N.W*TTL G.W*TTL CBM*发运明细子表ID*发运明细分组ID*发运明细主表ID*申报要素ID").split("\\*"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				  }else { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -808,7 +827,7 @@ public class SyShippingDetailsController extends JeecgController<SyShippingDetai 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	  result.setMessage("导出成功!"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	  result.setResult("导出成功!"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	 // return result; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	  return result; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1383,13 +1402,13 @@ public class SyShippingDetailsController extends JeecgController<SyShippingDetai 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	  * @return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	  */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	 @RequestMapping(value = "/exportXlsShipping") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	 public void exportXlsShipping(SyShippingDetailsVo syShippingDetails,String startTime,String endTime,String flourOrGarment, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	 public Result<String> exportXlsShipping(SyShippingDetailsVo syShippingDetails,String startTime,String endTime,String flourOrGarment, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 									   String refer,String preDeliveryDateB,String preDeliveryDateE,String supplier,String isElement, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 									   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 									   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 																HttpServletResponse req){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		 Result<List<SyShippingDetailsVo>> result = new Result<List<SyShippingDetailsVo>>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		 Result<String> result = new Result<String>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		 IPage<SyShippingDetailsVo> pageList = null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		 QueryWrapper<SyShippingDetailsVo> queryWrapper = new QueryWrapper<>(); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1462,14 +1481,20 @@ public class SyShippingDetailsController extends JeecgController<SyShippingDetai 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			 pageList = syShippingDetailsService.queryShippingDetails(page, queryWrapper); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		 org.jeecgframework.poi.excel.entity.TemplateExportParams params = new org.jeecgframework.poi.excel.entity.TemplateExportParams("D:\\单证模板\\出运明细列表.xlsx"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		 Map<String,Object> map = new HashMap<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		 List<Map<String,Object>> listMap = new ArrayList<Map<String,Object>>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		 BigDecimal orderQuantity = BigDecimal.ZERO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		 BigDecimal price = BigDecimal.ZERO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		 try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			 if(pageList.getRecords().size()==0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				 result.setSuccess(false); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				 result.setResult("没有获取到数据,导出失败!"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				 result.setMessage("没有获取到数据,导出失败!"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				 return result; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			 org.jeecgframework.poi.excel.entity.TemplateExportParams params = new org.jeecgframework.poi.excel.entity.TemplateExportParams("D:\\单证模板\\出运明细列表.xlsx"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			 //集合转map 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			 for (SyShippingDetailsVo li : pageList.getRecords()) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1502,14 +1527,15 @@ public class SyShippingDetailsController extends JeecgController<SyShippingDetai 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		 }catch (Exception ex){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			 ex.printStackTrace(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			 log.error("导出失败:" + ex.getMessage()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			 ex.printStackTrace(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			// ex.printStackTrace(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			 result.error500("异常:" + ex.getMessage()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		 result.setSuccess(true); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		 result.setMessage("导出成功!"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		 result.setResult(pageList.getRecords()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		 result.setResult("导出成功!"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		 //return result; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		 return result; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 |