|  |  |  | @ -10,10 +10,10 @@ import com.glxp.mipsdl.req.base.UdiwmsQueryUdiInvProductsRequest; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.mipsdl.res.BaseResponse; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.mipsdl.thirddao.njxyy.TestDataMapper; | 
			
		
	
		
			
				
					|  |  |  |  | import com.glxp.mipsdl.util.ResultVOUtils; | 
			
		
	
		
			
				
					|  |  |  |  | import com.jacob.activeX.ActiveXComponent; | 
			
		
	
		
			
				
					|  |  |  |  | import com.jacob.com.ComThread; | 
			
		
	
		
			
				
					|  |  |  |  | import com.jacob.com.Dispatch; | 
			
		
	
		
			
				
					|  |  |  |  | import com.jacob.com.Variant; | 
			
		
	
		
			
				
					|  |  |  |  | //import com.jacob.activeX.ActiveXComponent;
 | 
			
		
	
		
			
				
					|  |  |  |  | //import com.jacob.com.ComThread;
 | 
			
		
	
		
			
				
					|  |  |  |  | //import com.jacob.com.Dispatch;
 | 
			
		
	
		
			
				
					|  |  |  |  | //import com.jacob.com.Variant;
 | 
			
		
	
		
			
				
					|  |  |  |  | import lombok.extern.slf4j.Slf4j; | 
			
		
	
		
			
				
					|  |  |  |  | import org.springframework.web.bind.annotation.GetMapping; | 
			
		
	
		
			
				
					|  |  |  |  | import org.springframework.web.bind.annotation.PostMapping; | 
			
		
	
	
		
			
				
					|  |  |  | @ -52,31 +52,31 @@ public class TestController { | 
			
		
	
		
			
				
					|  |  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     @GetMapping("/test/yh") | 
			
		
	
		
			
				
					|  |  |  |  |     public BaseResponse yh() { | 
			
		
	
		
			
				
					|  |  |  |  |         Variant result = this.yhHttp(); | 
			
		
	
		
			
				
					|  |  |  |  |         return ResultVOUtils.success(result.toString()) ; | 
			
		
	
		
			
				
					|  |  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     public Variant yhHttp() { | 
			
		
	
		
			
				
					|  |  |  |  |         ComThread.InitSTA(false); | 
			
		
	
		
			
				
					|  |  |  |  |         ActiveXComponent component = new ActiveXComponent("YinHai.CHS.InterfaceSCS"); | 
			
		
	
		
			
				
					|  |  |  |  | //        ActiveXComponent component = new ActiveXComponent("Excel.Application");
 | 
			
		
	
		
			
				
					|  |  |  |  |         Variant result = null; | 
			
		
	
		
			
				
					|  |  |  |  |         try { | 
			
		
	
		
			
				
					|  |  |  |  |             // 获取 COM 组件的 Dispatch 对象
 | 
			
		
	
		
			
				
					|  |  |  |  |             Dispatch dispatch = (Dispatch) component.getObject(); | 
			
		
	
		
			
				
					|  |  |  |  |             String rest = null; | 
			
		
	
		
			
				
					|  |  |  |  |             String input = "{}"; | 
			
		
	
		
			
				
					|  |  |  |  |             // 直接调用方法
 | 
			
		
	
		
			
				
					|  |  |  |  |             result = Dispatch.invoke(dispatch, "yh_CHS_init", Dispatch.Method, | 
			
		
	
		
			
				
					|  |  |  |  |                     new Object[]{"1101", input, rest}, new int[1]); | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         } finally { | 
			
		
	
		
			
				
					|  |  |  |  |             // 关闭 COM 组件,释放资源
 | 
			
		
	
		
			
				
					|  |  |  |  |             component.safeRelease(); | 
			
		
	
		
			
				
					|  |  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |  |         return result; | 
			
		
	
		
			
				
					|  |  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  |  | //    @GetMapping("/test/yh")
 | 
			
		
	
		
			
				
					|  |  |  |  | //    public BaseResponse yh() {
 | 
			
		
	
		
			
				
					|  |  |  |  | //        Variant result = this.yhHttp();
 | 
			
		
	
		
			
				
					|  |  |  |  | //        return ResultVOUtils.success(result.toString()) ;
 | 
			
		
	
		
			
				
					|  |  |  |  | //    }
 | 
			
		
	
		
			
				
					|  |  |  |  | //
 | 
			
		
	
		
			
				
					|  |  |  |  | //    public Variant yhHttp() {
 | 
			
		
	
		
			
				
					|  |  |  |  | //        ComThread.InitSTA(false);
 | 
			
		
	
		
			
				
					|  |  |  |  | //        ActiveXComponent component = new ActiveXComponent("YinHai.CHS.InterfaceSCS");
 | 
			
		
	
		
			
				
					|  |  |  |  | ////        ActiveXComponent component = new ActiveXComponent("Excel.Application");
 | 
			
		
	
		
			
				
					|  |  |  |  | //        Variant result = null;
 | 
			
		
	
		
			
				
					|  |  |  |  | //        try {
 | 
			
		
	
		
			
				
					|  |  |  |  | //            // 获取 COM 组件的 Dispatch 对象
 | 
			
		
	
		
			
				
					|  |  |  |  | //            Dispatch dispatch = (Dispatch) component.getObject();
 | 
			
		
	
		
			
				
					|  |  |  |  | //            String rest = null;
 | 
			
		
	
		
			
				
					|  |  |  |  | //            String input = "{}";
 | 
			
		
	
		
			
				
					|  |  |  |  | //            // 直接调用方法
 | 
			
		
	
		
			
				
					|  |  |  |  | //            result = Dispatch.invoke(dispatch, "yh_CHS_init", Dispatch.Method,
 | 
			
		
	
		
			
				
					|  |  |  |  | //                    new Object[]{"1101", input, rest}, new int[1]);
 | 
			
		
	
		
			
				
					|  |  |  |  | //
 | 
			
		
	
		
			
				
					|  |  |  |  | //        } finally {
 | 
			
		
	
		
			
				
					|  |  |  |  | //            // 关闭 COM 组件,释放资源
 | 
			
		
	
		
			
				
					|  |  |  |  | //            component.safeRelease();
 | 
			
		
	
		
			
				
					|  |  |  |  | //        }
 | 
			
		
	
		
			
				
					|  |  |  |  | //        return result;
 | 
			
		
	
		
			
				
					|  |  |  |  | //    }
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | } | 
			
		
	
	
		
			
				
					|  |  |  | 
 |