| 
					
				 | 
			
			
				@@ -88,6 +88,7 @@ import kd.imc.rim.common.constant.FpzsConstant; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import kd.imc.rim.common.constant.InputInvoiceTypeEnum; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import kd.imc.rim.common.helper.ExcelHelper; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import kd.imc.rim.common.helper.ImcSaveServiceHelper; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import kd.imc.rim.common.invoice.collector.ScannerServiceEx; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import kd.imc.rim.common.invoice.collector.ScannerService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import kd.imc.rim.common.invoice.fpzs.FpzsAwsService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import kd.imc.rim.common.invoice.fpzs.FpzsMainService; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -380,7 +381,7 @@ public class FpzsMainEXPlugin extends LicenseFormPlugin implements RowClickEvent 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.getView().setVisible(Boolean.FALSE, new String[]{"attach_panel"}); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.progressBarVisible(false, (String[])null); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         CustomControl scannerControl = (CustomControl)this.getControl("custom_scanner"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        ScannerService.init(scannerControl, this.getView().getPageId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        ScannerServiceEx.init(scannerControl, this.getView().getPageId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         JSONObject customParam = FpzsMainService.cacheCustomParam(this); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         String billType = customParam.getString("billType"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (StringUtils.isEmpty(billType)) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -467,7 +468,7 @@ public class FpzsMainEXPlugin extends LicenseFormPlugin implements RowClickEvent 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if ("scanner_fail".equals(eventName)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (ScannerService.scannerFail(this, eventArgs)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (ScannerServiceEx.scannerFail(this, eventArgs)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 this.scannerProcess("uploadFinish",""); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } else { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -489,8 +490,8 @@ public class FpzsMainEXPlugin extends LicenseFormPlugin implements RowClickEvent 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     if (!"operate_attach_scanner".equals(description)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         url = this.getView().getPageId(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         businessParam = FpzsMainService.getBusinessParam(url, CollectTypeEnum.PC_SCANNER.getCode()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        businessParam.put("uploadIndex", ScannerService.getUploadIndex(data)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        ScannerService.recognitionInvoice("fpzs", this.getView().getPageId(), name, cache, businessParam, FpzsMainService.getCustomParam(this)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        businessParam.put("uploadIndex", ScannerServiceEx.getUploadIndex(data)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        ScannerServiceEx.recognitionInvoice("fpzs", this.getView().getPageId(), name, cache, businessParam, FpzsMainService.getCustomParam(this)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         url = null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -550,7 +551,7 @@ public class FpzsMainEXPlugin extends LicenseFormPlugin implements RowClickEvent 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } else if ("scanner_uploadFinish".equals(e.getEventName())) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                if (!ScannerService.uploadFinish(eventArgs)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (!ScannerServiceEx.uploadFinish(eventArgs)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     String operateType = this.getView().getPageCache().get("operate_type"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     logger.info("扫描仪上传结束:" + operateType); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     if (!"operate_attach_scanner".equals(operateType)) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -600,8 +601,8 @@ public class FpzsMainEXPlugin extends LicenseFormPlugin implements RowClickEvent 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         String pageId = this.getView().getPageId(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         logger.info("uploadfile_upload{},{}", pageId, RequestContext.get().getTraceId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         businessParam = FpzsMainService.getBusinessParam(pageId, CollectTypeEnum.PC_UPLOAD.getCode()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        businessParam.put("uploadIndex", ScannerService.getUploadIndex(json)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        ScannerService.recognitionInvoice("fpzs", this.getView().getPageId(), url, name, businessParam, FpzsMainService.getCustomParam(this)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        businessParam.put("uploadIndex", ScannerServiceEx.getUploadIndex(json)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        ScannerServiceEx.recognitionInvoice("fpzs", this.getView().getPageId(), url, name, businessParam, FpzsMainService.getCustomParam(this)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         traceId = RequestContext.get().getTraceId(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         if (this.traceMap == null || this.traceMap.get(traceId) == null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             this.scannerProcess("upload",FileType); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -697,8 +698,8 @@ public class FpzsMainEXPlugin extends LicenseFormPlugin implements RowClickEvent 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                     String status; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                     do { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         if(!"pdf".equals(FileType) && !"jpg".equals(FileType) && !"png".equals(FileType)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                        if (!it2.hasNext()) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                            if (!retryArray.isEmpty()) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                            if (!it2.hasNext()) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                                if (!retryArray.isEmpty()) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 //                                                Map<String, Object> customParams = new HashMap(4); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 //                                                customParams.put("retryArray", retryArray); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 //                                                invoiceInfo = FpzsMainService.getBusinessParam(pageId, CollectTypeEnum.PC_UPLOAD.getCode()); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -706,12 +707,12 @@ public class FpzsMainEXPlugin extends LicenseFormPlugin implements RowClickEvent 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 //                                                FormShowParameter showParameter = this.newPage("rim_inv_recognition_retry", customParams, "retryCallback"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 //                                                showParameter.setCaption("识别失败重试列表"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 //                                                this.getView().showForm(showParameter); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                                break label537; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                            break label537; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                              url = (String)it2.next(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                           status = result.getString(url); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                        url = (String)it2.next(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                        status = result.getString(url); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                     } while(!"fail".equals(status)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                     attachJson = new JSONObject(); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -747,7 +748,7 @@ public class FpzsMainEXPlugin extends LicenseFormPlugin implements RowClickEvent 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         JSONObject data = FpzsMainService.getInvoiceDataCache(pageId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            FpzsMainService.updateInvoiceGrid(this, data); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        FpzsMainService.updateInvoiceGrid(this, data); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         this.updateInvoiceCard(data); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         Map<String, String> attIdSerialMap = Maps.newLinkedHashMap(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         Iterator var54 = data.entrySet().iterator(); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1000,16 +1001,16 @@ public class FpzsMainEXPlugin extends LicenseFormPlugin implements RowClickEvent 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             String title; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             if (allowOverseaUpload && tab.equalsIgnoreCase("tab_oversea")) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 title = ""; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                ScannerService.initUpload(uploadControl, true, title); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                ScannerServiceEx.initUpload(uploadControl, true, title); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } else if (!allowOverseaUpload && tab.equalsIgnoreCase("tab_oversea")) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                ScannerService.removeUpload(uploadControl); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                ScannerServiceEx.removeUpload(uploadControl); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             if (allowInvoiceUpload && tab.equalsIgnoreCase("tab_invoice")) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 title = ""; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                ScannerService.initUpload(uploadControl, true, title); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                ScannerServiceEx.initUpload(uploadControl, true, title); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } else if (!allowInvoiceUpload && tab.equalsIgnoreCase("tab_invoice")) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                ScannerService.removeUpload(uploadControl); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                ScannerServiceEx.removeUpload(uploadControl); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1150,7 +1151,7 @@ public class FpzsMainEXPlugin extends LicenseFormPlugin implements RowClickEvent 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         String callBackId = messageBoxClosedEvent.getCallBackId(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if ("downJsScanner".equals(callBackId)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             if (MessageBoxResult.Yes.equals(messageBoxClosedEvent.getResult())) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                ScannerService.downJsScanner(this); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                ScannerServiceEx.downJsScanner(this); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } else if ("del_attach".equals(callBackId)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             if (MessageBoxResult.Yes.equals(messageBoxClosedEvent.getResult())) { 
			 |