| 
					
				 | 
			
			
				@@ -111,36 +111,6 @@ public class TWhgenlegServiceImpl implements ITWhgenlegService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             "  <SDEPORT_DATA>\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             "    <StockRecordMessage>" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             );bw.newLine(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            // 账册号 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            String EMS_NO = "T4258W000197"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            // 账册序号 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            String EMS_SEQ_NO = "119000005430521"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            // 仓储物料号 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            String WMS_MTS_NO = "TEMU9296408"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            // 商品料号 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            String GOODS_MTS_NO = "TEMU9296408"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            // 商品编码 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            String CODE_TS = "02032200"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            // 商品名称 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            String GOODS_NAME = "冷冻带骨猪后腿0|3|冷冻|带骨|35.8千克/纸箱|P-20129"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            // 商品规格型号 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            String GOODS_MODEL_DESC = "75CL"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            // 申报计量单位 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            String WMS_DCL_UNIT = "吨"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            // 申报数量 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            String WMS_DCL_QTY = "154"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            // 法定单位 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            String WMS_LAW_UNIT = "吨"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            // 法定数量 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            String WMS_LAW_QTY = "154"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            // 库区号 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            String PLACE_IDS = "4"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            // 库位号 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            String LOCATION_IDS = "4-01-01-1"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            // 入库状态 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            String STOCK_STATUS = "0"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            // 货物类型 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            String GOODS_TYPE = "1"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             for (Map<String,Object> map : list) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 if ("保税".equals(map.get("fGoodsType"))) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     if (StringUtils.isNull(map.get("fEmsSeqNo"))) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -208,30 +178,6 @@ public class TWhgenlegServiceImpl implements ITWhgenlegService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             "       <TradeName>"+ TRADE_NAME +"</TradeName>\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             "       <ApplyDate>"+ APPLY_DATE +"</ApplyDate>" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             );bw.newLine(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            /*// 理论申报单位 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            String DCL_UNIT = "035"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            // 理论申报数量 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            String DCL_QTY = "154"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            // 理论法定单位 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            String LAW_UNIT = "035"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            // 理论法定数量 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            String LAW_QTY = "154"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            for (Map<String,Object> map : list) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                bw.write( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        "       <SasStockInfo>\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                "        <EmsNo>"+ EMS_NO +"</EmsNo>\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                "        <EmsSeqNo>"+ EMS_SEQ_NO +"</EmsSeqNo>\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                "        <CodeTs>"+ map.get("fGoodsno") +"</CodeTs>\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                "        <GoodsName>"+ map.get("fGoodsids") +"</GoodsName>\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                "        <GoodsModelDesc>"+ map.get("f_packagespecs") +"</GoodsModelDesc>\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                "        <DclUnit>"+ DCL_UNIT +"</DclUnit>\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                "        <DclQty>"+ map.get("fQtyC") +"</DclQty>\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                "        <LawUnit>"+ map.get("fCorpid") +"</LawUnit>\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                "        <LawQty>"+ map.get("fQtyC") +"</LawQty>\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                "      </SasStockInfo>" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                ); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                bw.newLine(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            }*/ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             bw.write( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     "   </StockRecordMessage>\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             "  </SDEPORT_DATA>\n" + 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -241,15 +187,13 @@ public class TWhgenlegServiceImpl implements ITWhgenlegService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             fw.close(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             String path = getAbsoluteFile(fileName); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             BufferedReader reader = new BufferedReader(new FileReader(path)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            String lineText = null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            PrintStream ps = null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            BufferedWriter bfw = new BufferedWriter(new FileWriter(fileName)); // 创建新的写入流 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            String lineText; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             while ((lineText = reader.readLine()) != null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 String newContent = lineText.replace("<FILE_SIZE>-1</FILE_SIZE>","<FILE_SIZE>"+ getFileSize(path) +"</FILE_SIZE>"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                File newFile = new File(fileName); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                ps = new PrintStream(new FileOutputStream(newFile,true)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                ps.println(newContent); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                ps.flush(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                bfw.write(newContent); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            bfw.close(); // 关闭写入流 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             return AjaxResult.success(fileName); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } catch (Exception e) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             e.printStackTrace(); 
			 |