Browse Source

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	web/backmanagerconfig/pom.xml
#	web/backmanagerconfig/src/main/java/com/gyee/backconfig/controller/ProjectController.java
#	web/backmanagerconfig/src/main/java/com/gyee/backconfig/controller/test/XrpProjectplanServiceController.java
#	web/backmanagerconfig/src/main/java/com/gyee/backconfig/mapper/auto/XrpProjectplanMapper.java
#	web/backmanagerconfig/src/main/java/com/gyee/backconfig/service/BackConfigService.java
#	web/backmanagerconfig/src/main/java/com/gyee/backconfig/service/auto/IProjectService.java
#	web/backmanagerconfig/src/main/java/com/gyee/backconfig/service/auto/impl/ProjectServiceImpl.java
#	web/backmanagerconfig/src/main/resources/application-jn.yml
#	web/backmanagerconfig/src/test/java/BackConfigMainTests.java
#	web/backmanagerconfig/src/test/java/MyBatisPlusServiceTest.java
#	web/backmanagerconfig/src/test/java/MyBatisPlusWrapperTest.java
#	web/backmanagerconfig/src/test/java/MybatisPlusPluginsTest.java
xiruipeng 2 years ago
parent
commit
c77ff5243f
100 changed files with 13543 additions and 852 deletions
  1. 0 620
      web/analysis-hb/target/classes/static/admin/assets/js/blockUI/jquery.blockUI.js
  2. 0 18
      web/analysis-hb/target/classes/static/admin/assets/js/bootstrap/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.lt.js
  3. 0 188
      web/analysis-hb/target/classes/static/admin/bootstarp/ndesaintheme.com/themes/apricot/assets/js/footable/js/footable.sortcd98.js
  4. 1 1
      web/backmanagerconfig/src/main/java/com/gyee/backconfig/config/GeneratorCodeConfig.java
  5. 0 24
      web/backmanagerconfig/src/main/java/com/gyee/backconfig/controller/test/TestController.java
  6. 16 0
      web/backmanagerconfig/src/main/java/com/gyee/backconfig/mapper/auto/ProjectMapper.java
  7. 52 0
      web/backmanagerconfig/src/main/java/com/gyee/backconfig/model/auto/Project.java
  8. 5 1
      web/backmanagerconfig/src/main/java/com/gyee/backconfig/service/auto/impl/XrpProjectplanServiceImpl.java
  9. 26 0
      web/backmanagerconfig/src/main/java/com/gyee/backconfig/vo/Projectplanvo.java
  10. 13 0
      web/backmanagerconfig/src/main/resources/mapper/XrpProjectplanMapper.xml
  11. 1091 0
      web/monitor-hf/doc/springbootv2.sql
  12. BIN
      web/monitor-hf/lib/ueditor-1.1.2.jar
  13. 282 0
      web/monitor-hf/monitor-hf.iml
  14. 518 0
      web/monitor-hf/pom.xml
  15. 57 0
      web/monitor-hf/src/main/java/com/gyee/SpringbootStart.java
  16. 19 0
      web/monitor-hf/src/main/java/com/gyee/SpringbootWebInitializer.java
  17. 77 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/async/config/AsyncConfig.java
  18. 76 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/async/config/ThreadPoolConfig.java
  19. 133 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/async/controller/AsyncController.java
  20. 57 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/async/service/AsyncService.java
  21. 63 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/async/service/impl/AsyncServiceImpl.java
  22. 41 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/async/util/SmsUtil.java
  23. 166 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/base/BaseController.java
  24. 34 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/base/BaseService.java
  25. 268 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/base/PageInfo.java
  26. 419 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/cache/AppRedisCacheManager.java
  27. 46 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/cache/ApplicationContextHolder.java
  28. 383 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/cache/IGlobalCache.java
  29. 72 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/cache/MybatisRedisCache.java
  30. 105 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/cache/RedisConfig.java
  31. 115 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/cache/RedisSessionDao.java
  32. 31 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/cache/RedisUtils.java
  33. 13 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/conf/AjaxStatus.java
  34. 25 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/conf/ExportConfig.java
  35. 30 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/conf/FileConfig.java
  36. 85 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/conf/KaptchaConfig.java
  37. 99 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/conf/MybatisConfig.java
  38. 34 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/conf/PageHelperConf.java
  39. 83 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/conf/Swagger.java
  40. 79 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/conf/TemperatureConfig.java
  41. 56 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/conf/ThreadPoolTaskConfig.java
  42. 239 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/conf/V2Config.java
  43. 27 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/conf/ZmConfig.java
  44. 45 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/conf/monitor/LeaderConfig.java
  45. 45 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/conf/monitor/StatusConfig.java
  46. 27 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/conf/monitor/ZtConfig.java
  47. 21 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/dataSources/DataSource.java
  48. 77 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/dataSources/DataSourceAspect.java
  49. 50 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/dataSources/DataSourceContextHolder.java
  50. 13 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/dataSources/DataSourceType.java
  51. 27 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/dataSources/DynamicDataSource.java
  52. 104 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/domain/AjaxResult.java
  53. 80 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/druid/RemoveDruidAdConfig.java
  54. 141 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/exception/GlobalExceptionResolver.java
  55. 65 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/exception/QiNiuException.java
  56. 17 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/exception/demo/DemoModeException.java
  57. 55 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/exception/enums/QiNiuErrorEnum.java
  58. 41 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/exception/file/FileNameLengthLimitExceededException.java
  59. 73 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/exception/file/InvalidExtensionException.java
  60. 37 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/feign/IAdapterService.java
  61. 30 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/feign/RemoteServiceBuilder.java
  62. 83 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/file/ClassUtil.java
  63. 272 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/file/ExcelExport.java
  64. 179 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/file/FileUploadUtils.java
  65. 110 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/file/FileUtils.java
  66. 189 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/interceptor/MyInterceptor.java
  67. 108 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/interceptor/MyWebAppConfigurer.java
  68. 31 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/log/Log.java
  69. 186 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/log/LogAspect.java
  70. 100 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/quartz/AbstractQuartzJob.java
  71. 29 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/quartz/QuartzConfig.java
  72. 23 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/quartz/QuartzDisallowConcurrentExecution.java
  73. 22 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/quartz/QuartzJobExecution.java
  74. 410 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/quartz/QuartzSchedulerUtil.java
  75. 66 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/quartz/ScheduleConstants.java
  76. 191 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/quartz/utils/JobInvokeUtil.java
  77. 654 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/spring/Constant.java
  78. 397 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/spring/ConstantTR.java
  79. 377 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/spring/InitialRedis.java
  80. 730 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/spring/InitialRunner.java
  81. 116 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/spring/SpringUtils.java
  82. 20 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/spring/WpEnum.java
  83. 89 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/support/CharsetKit.java
  84. 1057 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/support/Convert.java
  85. 240 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/support/ConvertUtil.java
  86. 77 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/support/KaptchaTextCreator.java
  87. 148 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/websocket/ClientInboundChannelInterceptor.java
  88. 65 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/websocket/WebSocketCache.java
  89. 241 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/websocket/WebSocketConfig.java
  90. 68 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/websocket/WebSocketLoginOutEvent.java
  91. 30 0
      web/monitor-hf/src/main/java/com/gyee/frame/common/websocket/WebsocketMessageService.java
  92. 501 0
      web/monitor-hf/src/main/java/com/gyee/frame/controller/AdminController.java
  93. 67 0
      web/monitor-hf/src/main/java/com/gyee/frame/controller/IndexController.java
  94. 32 0
      web/monitor-hf/src/main/java/com/gyee/frame/controller/admin/ApiController.java
  95. 46 0
      web/monitor-hf/src/main/java/com/gyee/frame/controller/admin/ApiController2.java
  96. 212 0
      web/monitor-hf/src/main/java/com/gyee/frame/controller/admin/AutoCodeController.java
  97. 142 0
      web/monitor-hf/src/main/java/com/gyee/frame/controller/admin/CaptchaController.java
  98. 181 0
      web/monitor-hf/src/main/java/com/gyee/frame/controller/admin/DictDataController.java
  99. 170 0
      web/monitor-hf/src/main/java/com/gyee/frame/controller/admin/DictTypeController.java
  100. 0 0
      web/monitor-hf/src/main/java/com/gyee/frame/controller/admin/EmailController.java

+ 0 - 620
web/analysis-hb/target/classes/static/admin/assets/js/blockUI/jquery.blockUI.js

@@ -1,620 +0,0 @@
-/*!
- * jQuery blockUI plugin
- * Version 2.70.0-2014.11.23
- * Requires jQuery v1.7 or later
- *jQuery遮罩插件 jquery.blockUI.js
- * Examples at: http://malsup.com/jquery/block/
- * Copyright (c) 2007-2013 M. Alsup
- * Dual licensed under the MIT and GPL licenses:
- * http://www.opensource.org/licenses/mit-license.php
- * http://www.gnu.org/licenses/gpl.html
- *
- * Thanks to Amir-Hossein Sobhi for some excellent contributions!
- */
-
-;(function() {
-/*jshint eqeqeq:false curly:false latedef:false */
-"use strict";
-
-	function setup($) {
-		$.fn._fadeIn = $.fn.fadeIn;
-
-		var noOp = $.noop || function() {};
-
-		// this bit is to ensure we don't call setExpression when we shouldn't (with extra muscle to handle
-		// confusing userAgent strings on Vista)
-		var msie = /MSIE/.test(navigator.userAgent);
-		var ie6  = /MSIE 6.0/.test(navigator.userAgent) && ! /MSIE 8.0/.test(navigator.userAgent);
-		var mode = document.documentMode || 0;
-		var setExpr = $.isFunction( document.createElement('div').style.setExpression );
-
-		// global $ methods for blocking/unblocking the entire page
-		$.blockUI   = function(opts) { install(window, opts); };
-		$.unblockUI = function(opts) { remove(window, opts); };
-
-		// convenience method for quick growl-like notifications  (http://www.google.com/search?q=growl)
-		$.growlUI = function(title, message, timeout, onClose) {
-			var $m = $('<div class="growlUI"></div>');
-			if (title) $m.append('<h1>'+title+'</h1>');
-			if (message) $m.append('<h2>'+message+'</h2>');
-			if (timeout === undefined) timeout = 3000;
-
-			// Added by konapun: Set timeout to 30 seconds if this growl is moused over, like normal toast notifications
-			var callBlock = function(opts) {
-				opts = opts || {};
-
-				$.blockUI({
-					message: $m,
-					fadeIn : typeof opts.fadeIn  !== 'undefined' ? opts.fadeIn  : 700,
-					fadeOut: typeof opts.fadeOut !== 'undefined' ? opts.fadeOut : 1000,
-					timeout: typeof opts.timeout !== 'undefined' ? opts.timeout : timeout,
-					centerY: false,
-					showOverlay: false,
-					onUnblock: onClose,
-					css: $.blockUI.defaults.growlCSS
-				});
-			};
-
-			callBlock();
-			var nonmousedOpacity = $m.css('opacity');
-			$m.mouseover(function() {
-				callBlock({
-					fadeIn: 0,
-					timeout: 30000
-				});
-
-				var displayBlock = $('.blockMsg');
-				displayBlock.stop(); // cancel fadeout if it has started
-				displayBlock.fadeTo(300, 1); // make it easier to read the message by removing transparency
-			}).mouseout(function() {
-				$('.blockMsg').fadeOut(1000);
-			});
-			// End konapun additions
-		};
-
-		// plugin method for blocking element content
-		$.fn.block = function(opts) {
-			if ( this[0] === window ) {
-				$.blockUI( opts );
-				return this;
-			}
-			var fullOpts = $.extend({}, $.blockUI.defaults, opts || {});
-			this.each(function() {
-				var $el = $(this);
-				if (fullOpts.ignoreIfBlocked && $el.data('blockUI.isBlocked'))
-					return;
-				$el.unblock({ fadeOut: 0 });
-			});
-
-			return this.each(function() {
-				if ($.css(this,'position') == 'static') {
-					this.style.position = 'relative';
-					$(this).data('blockUI.static', true);
-				}
-				this.style.zoom = 1; // force 'hasLayout' in ie
-				install(this, opts);
-			});
-		};
-
-		// plugin method for unblocking element content
-		$.fn.unblock = function(opts) {
-			if ( this[0] === window ) {
-				$.unblockUI( opts );
-				return this;
-			}
-			return this.each(function() {
-				remove(this, opts);
-			});
-		};
-
-		$.blockUI.version = 2.70; // 2nd generation blocking at no extra cost!
-
-		// override these in your code to change the default behavior and style
-		$.blockUI.defaults = {
-			// message displayed when blocking (use null for no message)
-			message:  '<div class="loaderbox"><div class="loading-activity"></div> 加载中......</div>',
-
-			title: null,		// title string; only used when theme == true
-			draggable: true,	// only used when theme == true (requires jquery-ui.js to be loaded)
-
-			theme: false, // set to true to use with jQuery UI themes
-
-			// styles for the message when blocking; if you wish to disable
-			// these and use an external stylesheet then do this in your code:
-			// $.blockUI.defaults.css = {};
-			css: {
-				padding:	0,
-				margin:		0,
-				width:		'30%',
-				top:		'40%',
-				left:		'35%',
-				textAlign:	'center',
-				color:		'#000',
-				border:		'0px',
-				backgroundColor:'transparent',
-				cursor:		'wait'
-			},
-
-			// minimal style set used when themes are used
-			themedCSS: {
-				width:	'30%',
-				top:	'40%',
-				left:	'35%'
-			},
-
-			// styles for the overlay
-			overlayCSS:  {
-				backgroundColor:	'#000',
-				opacity:			0.6,
-				cursor:				'wait'
-			},
-
-			// style to replace wait cursor before unblocking to correct issue
-			// of lingering wait cursor
-			cursorReset: 'default',
-
-			// styles applied when using $.growlUI
-			growlCSS: {
-				width:		'350px',
-				top:		'10px',
-				left:		'',
-				right:		'10px',
-				border:		'none',
-				padding:	'5px',
-				opacity:	0.6,
-				cursor:		'default',
-				color:		'#fff',
-				backgroundColor: '#000',
-				'-webkit-border-radius':'10px',
-				'-moz-border-radius':	'10px',
-				'border-radius':		'10px'
-			},
-
-			// IE issues: 'about:blank' fails on HTTPS and javascript:false is s-l-o-w
-			// (hat tip to Jorge H. N. de Vasconcelos)
-			/*jshint scripturl:true */
-			iframeSrc: /^https/i.test(window.location.href || '') ? 'javascript:false' : 'about:blank',
-
-			// force usage of iframe in non-IE browsers (handy for blocking applets)
-			forceIframe: false,
-
-			// z-index for the blocking overlay
-			baseZ: 1000,
-
-			// set these to true to have the message automatically centered
-			centerX: true, // <-- only effects element blocking (page block controlled via css above)
-			centerY: true,
-
-			// allow body element to be stetched in ie6; this makes blocking look better
-			// on "short" pages.  disable if you wish to prevent changes to the body height
-			allowBodyStretch: true,
-
-			// enable if you want key and mouse events to be disabled for content that is blocked
-			bindEvents: true,
-
-			// be default blockUI will supress tab navigation from leaving blocking content
-			// (if bindEvents is true)
-			constrainTabKey: true,
-
-			// fadeIn time in millis; set to 0 to disable fadeIn on block
-			fadeIn:  200,
-
-			// fadeOut time in millis; set to 0 to disable fadeOut on unblock
-			fadeOut:  400,
-
-			// time in millis to wait before auto-unblocking; set to 0 to disable auto-unblock
-			timeout: 0,
-
-			// disable if you don't want to show the overlay
-			showOverlay: true,
-
-			// if true, focus will be placed in the first available input field when
-			// page blocking
-			focusInput: true,
-
-            // elements that can receive focus
-            focusableElements: ':input:enabled:visible',
-
-			// suppresses the use of overlay styles on FF/Linux (due to performance issues with opacity)
-			// no longer needed in 2012
-			// applyPlatformOpacityRules: true,
-
-			// callback method invoked when fadeIn has completed and blocking message is visible
-			onBlock: null,
-
-			// callback method invoked when unblocking has completed; the callback is
-			// passed the element that has been unblocked (which is the window object for page
-			// blocks) and the options that were passed to the unblock call:
-			//	onUnblock(element, options)
-			onUnblock: null,
-
-			// callback method invoked when the overlay area is clicked.
-			// setting this will turn the cursor to a pointer, otherwise cursor defined in overlayCss will be used.
-			onOverlayClick: null,
-
-			// don't ask; if you really must know: http://groups.google.com/group/jquery-en/browse_thread/thread/36640a8730503595/2f6a79a77a78e493#2f6a79a77a78e493
-			quirksmodeOffsetHack: 4,
-
-			// class name of the message block
-			blockMsgClass: 'blockMsg',
-
-			// if it is already blocked, then ignore it (don't unblock and reblock)
-			ignoreIfBlocked: false
-		};
-
-		// private data and functions follow...
-
-		var pageBlock = null;
-		var pageBlockEls = [];
-
-		function install(el, opts) {
-			var css, themedCSS;
-			var full = (el == window);
-			var msg = (opts && opts.message !== undefined ? opts.message : undefined);
-			opts = $.extend({}, $.blockUI.defaults, opts || {});
-
-			if (opts.ignoreIfBlocked && $(el).data('blockUI.isBlocked'))
-				return;
-
-			opts.overlayCSS = $.extend({}, $.blockUI.defaults.overlayCSS, opts.overlayCSS || {});
-			css = $.extend({}, $.blockUI.defaults.css, opts.css || {});
-			if (opts.onOverlayClick)
-				opts.overlayCSS.cursor = 'pointer';
-
-			themedCSS = $.extend({}, $.blockUI.defaults.themedCSS, opts.themedCSS || {});
-			msg = msg === undefined ? opts.message : msg;
-
-			// remove the current block (if there is one)
-			if (full && pageBlock)
-				remove(window, {fadeOut:0});
-
-			// if an existing element is being used as the blocking content then we capture
-			// its current place in the DOM (and current display style) so we can restore
-			// it when we unblock
-			if (msg && typeof msg != 'string' && (msg.parentNode || msg.jquery)) {
-				var node = msg.jquery ? msg[0] : msg;
-				var data = {};
-				$(el).data('blockUI.history', data);
-				data.el = node;
-				data.parent = node.parentNode;
-				data.display = node.style.display;
-				data.position = node.style.position;
-				if (data.parent)
-					data.parent.removeChild(node);
-			}
-
-			$(el).data('blockUI.onUnblock', opts.onUnblock);
-			var z = opts.baseZ;
-
-			// blockUI uses 3 layers for blocking, for simplicity they are all used on every platform;
-			// layer1 is the iframe layer which is used to supress bleed through of underlying content
-			// layer2 is the overlay layer which has opacity and a wait cursor (by default)
-			// layer3 is the message content that is displayed while blocking
-			var lyr1, lyr2, lyr3, s;
-			if (msie || opts.forceIframe)
-				lyr1 = $('<iframe class="blockUI" style="z-index:'+ (z++) +';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="'+opts.iframeSrc+'"></iframe>');
-			else
-				lyr1 = $('<div class="blockUI" style="display:none"></div>');
-
-			if (opts.theme)
-				lyr2 = $('<div class="blockUI blockOverlay ui-widget-overlay" style="z-index:'+ (z++) +';display:none"></div>');
-			else
-				lyr2 = $('<div class="blockUI blockOverlay" style="z-index:'+ (z++) +';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>');
-
-			if (opts.theme && full) {
-				s = '<div class="blockUI ' + opts.blockMsgClass + ' blockPage ui-dialog ui-widget ui-corner-all" style="z-index:'+(z+10)+';display:none;position:fixed">';
-				if ( opts.title ) {
-					s += '<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(opts.title || '&nbsp;')+'</div>';
-				}
-				s += '<div class="ui-widget-content ui-dialog-content"></div>';
-				s += '</div>';
-			}
-			else if (opts.theme) {
-				s = '<div class="blockUI ' + opts.blockMsgClass + ' blockElement ui-dialog ui-widget ui-corner-all" style="z-index:'+(z+10)+';display:none;position:absolute">';
-				if ( opts.title ) {
-					s += '<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(opts.title || '&nbsp;')+'</div>';
-				}
-				s += '<div class="ui-widget-content ui-dialog-content"></div>';
-				s += '</div>';
-			}
-			else if (full) {
-				s = '<div class="blockUI ' + opts.blockMsgClass + ' blockPage" style="z-index:'+(z+10)+';display:none;position:fixed"></div>';
-			}
-			else {
-				s = '<div class="blockUI ' + opts.blockMsgClass + ' blockElement" style="z-index:'+(z+10)+';display:none;position:absolute"></div>';
-			}
-			lyr3 = $(s);
-
-			// if we have a message, style it
-			if (msg) {
-				if (opts.theme) {
-					lyr3.css(themedCSS);
-					lyr3.addClass('ui-widget-content');
-				}
-				else
-					lyr3.css(css);
-			}
-
-			// style the overlay
-			if (!opts.theme /*&& (!opts.applyPlatformOpacityRules)*/)
-				lyr2.css(opts.overlayCSS);
-			lyr2.css('position', full ? 'fixed' : 'absolute');
-
-			// make iframe layer transparent in IE
-			if (msie || opts.forceIframe)
-				lyr1.css('opacity',0.0);
-
-			//$([lyr1[0],lyr2[0],lyr3[0]]).appendTo(full ? 'body' : el);
-			var layers = [lyr1,lyr2,lyr3], $par = full ? $('body') : $(el);
-			$.each(layers, function() {
-				this.appendTo($par);
-			});
-
-			if (opts.theme && opts.draggable && $.fn.draggable) {
-				lyr3.draggable({
-					handle: '.ui-dialog-titlebar',
-					cancel: 'li'
-				});
-			}
-
-			// ie7 must use absolute positioning in quirks mode and to account for activex issues (when scrolling)
-			var expr = setExpr && (!$.support.boxModel || $('object,embed', full ? null : el).length > 0);
-			if (ie6 || expr) {
-				// give body 100% height
-				if (full && opts.allowBodyStretch && $.support.boxModel)
-					$('html,body').css('height','100%');
-
-				// fix ie6 issue when blocked element has a border width
-				if ((ie6 || !$.support.boxModel) && !full) {
-					var t = sz(el,'borderTopWidth'), l = sz(el,'borderLeftWidth');
-					var fixT = t ? '(0 - '+t+')' : 0;
-					var fixL = l ? '(0 - '+l+')' : 0;
-				}
-
-				// simulate fixed position
-				$.each(layers, function(i,o) {
-					var s = o[0].style;
-					s.position = 'absolute';
-					if (i < 2) {
-						if (full)
-							s.setExpression('height','Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.support.boxModel?0:'+opts.quirksmodeOffsetHack+') + "px"');
-						else
-							s.setExpression('height','this.parentNode.offsetHeight + "px"');
-						if (full)
-							s.setExpression('width','jQuery.support.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"');
-						else
-							s.setExpression('width','this.parentNode.offsetWidth + "px"');
-						if (fixL) s.setExpression('left', fixL);
-						if (fixT) s.setExpression('top', fixT);
-					}
-					else if (opts.centerY) {
-						if (full) s.setExpression('top','(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"');
-						s.marginTop = 0;
-					}
-					else if (!opts.centerY && full) {
-						var top = (opts.css && opts.css.top) ? parseInt(opts.css.top, 10) : 0;
-						var expression = '((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + '+top+') + "px"';
-						s.setExpression('top',expression);
-					}
-				});
-			}
-
-			// show the message
-			if (msg) {
-				if (opts.theme)
-					lyr3.find('.ui-widget-content').append(msg);
-				else
-					lyr3.append(msg);
-				if (msg.jquery || msg.nodeType)
-					$(msg).show();
-			}
-
-			if ((msie || opts.forceIframe) && opts.showOverlay)
-				lyr1.show(); // opacity is zero
-			if (opts.fadeIn) {
-				var cb = opts.onBlock ? opts.onBlock : noOp;
-				var cb1 = (opts.showOverlay && !msg) ? cb : noOp;
-				var cb2 = msg ? cb : noOp;
-				if (opts.showOverlay)
-					lyr2._fadeIn(opts.fadeIn, cb1);
-				if (msg)
-					lyr3._fadeIn(opts.fadeIn, cb2);
-			}
-			else {
-				if (opts.showOverlay)
-					lyr2.show();
-				if (msg)
-					lyr3.show();
-				if (opts.onBlock)
-					opts.onBlock.bind(lyr3)();
-			}
-
-			// bind key and mouse events
-			bind(1, el, opts);
-
-			if (full) {
-				pageBlock = lyr3[0];
-				pageBlockEls = $(opts.focusableElements,pageBlock);
-				if (opts.focusInput)
-					setTimeout(focus, 20);
-			}
-			else
-				center(lyr3[0], opts.centerX, opts.centerY);
-
-			if (opts.timeout) {
-				// auto-unblock
-				var to = setTimeout(function() {
-					if (full)
-						$.unblockUI(opts);
-					else
-						$(el).unblock(opts);
-				}, opts.timeout);
-				$(el).data('blockUI.timeout', to);
-			}
-		}
-
-		// remove the block
-		function remove(el, opts) {
-			var count;
-			var full = (el == window);
-			var $el = $(el);
-			var data = $el.data('blockUI.history');
-			var to = $el.data('blockUI.timeout');
-			if (to) {
-				clearTimeout(to);
-				$el.removeData('blockUI.timeout');
-			}
-			opts = $.extend({}, $.blockUI.defaults, opts || {});
-			bind(0, el, opts); // unbind events
-
-			if (opts.onUnblock === null) {
-				opts.onUnblock = $el.data('blockUI.onUnblock');
-				$el.removeData('blockUI.onUnblock');
-			}
-
-			var els;
-			if (full) // crazy selector to handle odd field errors in ie6/7
-				els = $('body').children().filter('.blockUI').add('body > .blockUI');
-			else
-				els = $el.find('>.blockUI');
-
-			// fix cursor issue
-			if ( opts.cursorReset ) {
-				if ( els.length > 1 )
-					els[1].style.cursor = opts.cursorReset;
-				if ( els.length > 2 )
-					els[2].style.cursor = opts.cursorReset;
-			}
-
-			if (full)
-				pageBlock = pageBlockEls = null;
-
-			if (opts.fadeOut) {
-				count = els.length;
-				els.stop().fadeOut(opts.fadeOut, function() {
-					if ( --count === 0)
-						reset(els,data,opts,el);
-				});
-			}
-			else
-				reset(els, data, opts, el);
-		}
-
-		// move blocking element back into the DOM where it started
-		function reset(els,data,opts,el) {
-			var $el = $(el);
-			if ( $el.data('blockUI.isBlocked') )
-				return;
-
-			els.each(function(i,o) {
-				// remove via DOM calls so we don't lose event handlers
-				if (this.parentNode)
-					this.parentNode.removeChild(this);
-			});
-
-			if (data && data.el) {
-				data.el.style.display = data.display;
-				data.el.style.position = data.position;
-				data.el.style.cursor = 'default'; // #59
-				if (data.parent)
-					data.parent.appendChild(data.el);
-				$el.removeData('blockUI.history');
-			}
-
-			if ($el.data('blockUI.static')) {
-				$el.css('position', 'static'); // #22
-			}
-
-			if (typeof opts.onUnblock == 'function')
-				opts.onUnblock(el,opts);
-
-			// fix issue in Safari 6 where block artifacts remain until reflow
-			var body = $(document.body), w = body.width(), cssW = body[0].style.width;
-			body.width(w-1).width(w);
-			body[0].style.width = cssW;
-		}
-
-		// bind/unbind the handler
-		function bind(b, el, opts) {
-			var full = el == window, $el = $(el);
-
-			// don't bother unbinding if there is nothing to unbind
-			if (!b && (full && !pageBlock || !full && !$el.data('blockUI.isBlocked')))
-				return;
-
-			$el.data('blockUI.isBlocked', b);
-
-			// don't bind events when overlay is not in use or if bindEvents is false
-			if (!full || !opts.bindEvents || (b && !opts.showOverlay))
-				return;
-
-			// bind anchors and inputs for mouse and key events
-			var events = 'mousedown mouseup keydown keypress keyup touchstart touchend touchmove';
-			if (b)
-				$(document).bind(events, opts, handler);
-			else
-				$(document).unbind(events, handler);
-
-		// former impl...
-		//		var $e = $('a,:input');
-		//		b ? $e.bind(events, opts, handler) : $e.unbind(events, handler);
-		}
-
-		// event handler to suppress keyboard/mouse events when blocking
-		function handler(e) {
-			// allow tab navigation (conditionally)
-			if (e.type === 'keydown' && e.keyCode && e.keyCode == 9) {
-				if (pageBlock && e.data.constrainTabKey) {
-					var els = pageBlockEls;
-					var fwd = !e.shiftKey && e.target === els[els.length-1];
-					var back = e.shiftKey && e.target === els[0];
-					if (fwd || back) {
-						setTimeout(function(){focus(back);},10);
-						return false;
-					}
-				}
-			}
-			var opts = e.data;
-			var target = $(e.target);
-			if (target.hasClass('blockOverlay') && opts.onOverlayClick)
-				opts.onOverlayClick(e);
-
-			// allow events within the message content
-			if (target.parents('div.' + opts.blockMsgClass).length > 0)
-				return true;
-
-			// allow events for content that is not being blocked
-			return target.parents().children().filter('div.blockUI').length === 0;
-		}
-
-		function focus(back) {
-			if (!pageBlockEls)
-				return;
-			var e = pageBlockEls[back===true ? pageBlockEls.length-1 : 0];
-			if (e)
-				e.focus();
-		}
-
-		function center(el, x, y) {
-			var p = el.parentNode, s = el.style;
-			var l = ((p.offsetWidth - el.offsetWidth)/2) - sz(p,'borderLeftWidth');
-			var t = ((p.offsetHeight - el.offsetHeight)/2) - sz(p,'borderTopWidth');
-			if (x) s.left = l > 0 ? (l+'px') : '0';
-			if (y) s.top  = t > 0 ? (t+'px') : '0';
-		}
-
-		function sz(el, p) {
-			return parseInt($.css(el,p),10)||0;
-		}
-
-	}
-
-
-	/*global define:true */
-	if (typeof define === 'function' && define.amd && define.amd.jQuery) {
-		define(['jquery'], setup);
-	} else {
-		setup(jQuery);
-	}
-
-})();

+ 0 - 18
web/analysis-hb/target/classes/static/admin/assets/js/bootstrap/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.lt.js

@@ -1,18 +0,0 @@
-/**
- * Lithuanian translation for bootstrap-datetimepicker
- * Šarūnas Gliebus <ssharunas@yahoo.co.uk>
- */
-
-;(function($){
-    $.fn.datetimepicker.dates['lt'] = {
-        days: ["Sekmadienis", "Pirmadienis", "Antradienis", "Trečiadienis", "Ketvirtadienis", "Penktadienis", "Šeštadienis", "Sekmadienis"],
-        daysShort: ["S", "Pr", "A", "T", "K", "Pn", "Š", "S"],
-        daysMin: ["Sk", "Pr", "An", "Tr", "Ke", "Pn", "Št", "Sk"],
-        months: ["Sausis", "Vasaris", "Kovas", "Balandis", "Gegužė", "Birželis", "Liepa", "Rugpjūtis", "Rugsėjis", "Spalis", "Lapkritis", "Gruodis"],
-        monthsShort: ["Sau", "Vas", "Kov", "Bal", "Geg", "Bir", "Lie", "Rugp", "Rugs", "Spa", "Lap", "Gru"],
-        today: "Šiandien",
-		suffix: [],
-		meridiem: [],
-        weekStart: 1
-    };
-}(jQuery));

+ 0 - 188
web/analysis-hb/target/classes/static/admin/bootstarp/ndesaintheme.com/themes/apricot/assets/js/footable/js/footable.sortcd98.js

@@ -1,188 +0,0 @@
-(function ($, w, undefined) {
-    if (w.footable === undefined || w.footable === null)
-        throw new Error('Please check and make sure footable.js is included in the page and is loaded prior to this script.');
-
-    var defaults = {
-        sort: true,
-        sorters: {
-            alpha: function (a, b) {
-                if (a === b) return 0;
-                if (a < b) return -1;
-                return 1;
-            },
-            numeric: function (a, b) {
-                return a - b;
-            }
-        },
-        classes: {
-            sort: {
-                sortable: 'footable-sortable',
-                sorted: 'footable-sorted',
-                descending: 'footable-sorted-desc',
-                indicator: 'footable-sort-indicator'
-            }
-        },
-        events: {
-            sort: {
-                sorting: 'footable_sorting',
-                sorted: 'footable_sorted'
-            }
-        }
-    };
-
-    function Sort() {
-        var p = this;
-        p.name = 'Footable Sortable';
-        p.init = function (ft) {
-            p.footable = ft;
-            if (ft.options.sort === true) {
-                $(ft.table)
-                    .unbind('.sorting')
-                    .bind({
-                        'footable_initialized.sorting': function (e) {
-                            var $table = $(ft.table),
-                                $tbody = $table.find('> tbody'),
-                                cls = ft.options.classes.sort,
-                                column, $th;
-
-                            if ($table.data('sort') === false) return;
-
-                            $table.find('> thead > tr:last-child > th, > thead > tr:last-child > td').each(function (ec) {
-                                $th = $(this), column = ft.columns[$th.index()];
-                                if (column.sort.ignore !== true && !$th.hasClass(cls.sortable)) {
-                                    $th.addClass(cls.sortable);
-                                    $('<span />').addClass(cls.indicator).appendTo($th);
-                                }
-                            });
-
-                            $table.find('> thead > tr:last-child > th.' + cls.sortable + ', > thead > tr:last-child > td.' + cls.sortable).unbind('click.footable').bind('click.footable', function (ec) {
-                                ec.preventDefault();
-                                $th = $(this);
-                                var ascending = !$th.hasClass(cls.sorted);
-                                p.doSort($th.index(), ascending);
-                                return false;
-                            });
-
-                            var didSomeSorting = false;
-                            for (var c in ft.columns) {
-                                column = ft.columns[c];
-                                if (column.sort.initial) {
-                                    var ascending = (column.sort.initial !== 'descending');
-                                    p.doSort(column.index, ascending);
-                                    break;
-                                }
-                            }
-                            if (didSomeSorting) {
-                                ft.bindToggleSelectors();
-                            }
-                        },
-                        'footable_redrawn.sorting': function(e) {
-                            var $table = $(ft.table),
-                                cls = ft.options.classes.sort;
-                            if ($table.data('sorted') >= 0) {
-                                $table.find('> thead > tr:last-child > th').each(function(i){
-                                    var $th = $(this);
-                                    if ($th.hasClass(cls.sorted) || $th.hasClass(cls.descending)) {
-                                        p.doSort(i);
-                                        return;
-                                    }
-                                });
-                            }
-                        },
-                        'footable_column_data.sorting': function (e) {
-                            var $th = $(e.column.th);
-                            e.column.data.sort = e.column.data.sort || {};
-                            e.column.data.sort.initial = $th.data('sort-initial') || false;
-                            e.column.data.sort.ignore = $th.data('sort-ignore') || false;
-                            e.column.data.sort.selector = $th.data('sort-selector') || null;
-
-                            var match = $th.data('sort-match') || 0;
-                            if (match >= e.column.data.matches.length) match = 0;
-                            e.column.data.sort.match = e.column.data.matches[match];
-                        }
-                    })
-                //save the sort object onto the table so we can access it later
-                .data('footable-sort', p);
-            }
-        };
-
-        p.doSort = function(columnIndex, ascending) {
-            var ft = p.footable;
-            if ($(ft.table).data('sort') === false) return;
-
-            var $table = $(ft.table),
-                $tbody = $table.find('> tbody'),
-                column = ft.columns[columnIndex],
-                $th = $table.find('> thead > tr:last-child > th:eq(' + columnIndex + ')'),
-                cls = ft.options.classes.sort,
-                evt = ft.options.events.sort;
-
-            ascending = (ascending === undefined) ? $th.hasClass(cls.sorted) :
-                (ascending === 'toggle') ? !$th.hasClass(cls.sorted) : ascending;
-
-            if (column.sort.ignore === true) return true;
-
-            //raise a pre-sorting event so that we can cancel the sorting if needed
-            var event = ft.raise(evt.sorting, { column: column, direction: ascending ? 'ASC' : 'DESC' });
-            if (event && event.result === false) return;
-
-            $table.data('sorted', column.index);
-
-            $table.find('> thead > tr:last-child > th, > thead > tr:last-child > td').not($th).removeClass(cls.sorted + ' ' + cls.descending);
-
-            if (ascending === undefined) {
-                ascending = $th.hasClass(cls.sorted);
-            }
-
-            if (ascending) {
-                $th.removeClass(cls.descending).addClass(cls.sorted);
-            } else {
-                $th.removeClass(cls.sorted).addClass(cls.descending);
-            }
-
-            p.sort(ft, $tbody, column, ascending);
-
-            ft.bindToggleSelectors();
-            ft.raise(evt.sorted, { column: column, direction: ascending ? 'ASC' : 'DESC' });
-        };
-
-        p.rows = function (ft, tbody, column) {
-            var rows = [];
-            tbody.find('> tr').each(function () {
-                var $row = $(this), $next = null;
-                if ($row.hasClass(ft.options.classes.detail)) return true;
-                if ($row.next().hasClass(ft.options.classes.detail)) {
-                    $next = $row.next().get(0);
-                }
-                var row = { 'row': $row, 'detail': $next };
-                if (column !== undefined) {
-                    row.value = ft.parse(this.cells[column.sort.match], column);
-                }
-                rows.push(row);
-                return true;
-            }).detach();
-            return rows;
-        };
-
-        p.sort = function (ft, tbody, column, ascending) {
-            var rows = p.rows(ft, tbody, column);
-            var sorter = ft.options.sorters[column.type] || ft.options.sorters.alpha;
-            rows.sort(function (a, b) {
-                if (ascending) {
-                    return sorter(a.value, b.value);
-                } else {
-                    return sorter(b.value, a.value);
-                }
-            });
-            for (var j = 0; j < rows.length; j++) {
-                tbody.append(rows[j].row);
-                if (rows[j].detail !== null) {
-                    tbody.append(rows[j].detail);
-                }
-            }
-        };
-    }
-
-    w.footable.plugins.register(Sort, defaults);
-
-})(jQuery, window);

+ 1 - 1
web/backmanagerconfig/src/main/java/com/gyee/backconfig/config/GeneratorCodeConfig.java

@@ -41,7 +41,7 @@ public class GeneratorCodeConfig {
         GlobalConfig gc = new GlobalConfig();
         String projectPath = System.getProperty("user.dir");
         gc.setOutputDir(projectPath + "/src/main/java");
-        gc.setAuthor("郗瑞鹏");
+        gc.setAuthor("wang");
         gc.setOpen(false);
         //实体属性 Swagger2 注解
         gc.setSwagger2(false);

+ 0 - 24
web/backmanagerconfig/src/main/java/com/gyee/backconfig/controller/test/TestController.java

@@ -1,24 +0,0 @@
-package com.gyee.backconfig.controller.test;/*
-@author   谢生杰
-@date   2022/9/13-18:43
-*/
-
-import com.gyee.backconfig.config.R;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-@RestController
-@Slf4j
-public class TestController {
-
-    @RequestMapping(value = "/backconfig/test")
-    public R test(){
-        return R.ok().data("hello backconfig");
-    }
-
-    /*@RequestMapping(value="/backconfig/xrptest")
-    public R test2(){
-        return R.ok().data("hello xrp");
-    }*/
-}

+ 16 - 0
web/backmanagerconfig/src/main/java/com/gyee/backconfig/mapper/auto/ProjectMapper.java

@@ -0,0 +1,16 @@
+package com.gyee.backconfig.mapper.auto;
+
+import com.gyee.backconfig.model.auto.Project;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author wang
+ * @since 2022-09-19
+ */
+public interface ProjectMapper extends BaseMapper<Project> {
+
+}

+ 52 - 0
web/backmanagerconfig/src/main/java/com/gyee/backconfig/model/auto/Project.java

@@ -0,0 +1,52 @@
+package com.gyee.backconfig.model.auto;
+
+import java.math.BigDecimal;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import java.time.LocalDate;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author wang
+ * @since 2022-09-19
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class Project extends Model {
+
+    private static final long serialVersionUID = 1L;
+
+    private String id;
+
+    private String code;
+
+    private String name;
+
+    private String aname;
+
+    private String windpowerstationid;
+
+    private BigDecimal capacity;
+
+    private String capacityunit;
+
+    private BigDecimal quantity;
+
+    private String model;
+
+    private LocalDate commissiondate;
+
+    private String masterphone;
+
+    private String shiftforeman;
+
+    private String shiftforemanphone;
+
+    private BigDecimal ordernum;
+
+
+}

+ 5 - 1
web/backmanagerconfig/src/main/java/com/gyee/backconfig/service/auto/impl/XrpProjectplanServiceImpl.java

@@ -45,5 +45,9 @@ public class XrpProjectplanServiceImpl extends ServiceImpl<XrpProjectplanMapper,
 
     //删除
 
-
+    //分页
+    public void Page() {
+        Page<XrpProjectplan> page = new Page<XrpProjectplan>(1, 3);
+        xrpProjectplanMapper.selectPage(page, null);
+    }
 }

+ 26 - 0
web/backmanagerconfig/src/main/java/com/gyee/backconfig/vo/Projectplanvo.java

@@ -0,0 +1,26 @@
+package com.gyee.backconfig.vo;
+
+import lombok.Data;
+
+@Data
+public class Projectplanvo {
+    private String id;
+
+    private String projectid;
+
+    private String generatingcapacity;
+
+    private Double outagehours;
+
+    private String year;
+
+    private String month;
+
+    private String windpower;
+
+    private Integer isdeleted;
+
+    private Integer current;
+
+    private Integer pagesize;
+}

+ 13 - 0
web/backmanagerconfig/src/main/resources/mapper/XrpProjectplanMapper.xml

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.gyee.backconfig.mapper.auto.XrpProjectplanMapper">
+    <select id="selectMapById" resultType="map">
+        select ID,PROJECTID, GENERATINGCAPACITY, OUTAGEHOURS, YEAR, MONTH, WINDPOWER
+from xrp_projectplan where id=#{id}
+    </select>
+<!--    Page<XrpProjectplan> selectPageVo(@Param("page") Page<XrpProjectplan> page,@Param("id") Integer id);-->
+
+    <select id="selectPageVo" resultType="XrpProjectplan">
+        SELECT ID,PROJECTID,GENERATINGCAPACITY,OUTAGEHOURS,YEAR,MONTH,WINDPOWER FROM XRP_PROJECTPLAN where id > #{id}
+    </select>
+</mapper>

File diff suppressed because it is too large
+ 1091 - 0
web/monitor-hf/doc/springbootv2.sql


BIN
web/monitor-hf/lib/ueditor-1.1.2.jar


+ 282 - 0
web/monitor-hf/monitor-hf.iml

@@ -0,0 +1,282 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="JAVA_MODULE" version="4">
+  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
+    <output url="file://$MODULE_DIR$/target/classes" />
+    <output-test url="file://$MODULE_DIR$/target/test-classes" />
+    <content url="file://$MODULE_DIR$">
+      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
+      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
+      <sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
+      <excludeFolder url="file://$MODULE_DIR$/target" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.3.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.3.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.3.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.3" level="project" />
+    <orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.3" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-to-slf4j:2.13.3" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.13.3" level="project" />
+    <orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.30" level="project" />
+    <orderEntry type="library" name="Maven: jakarta.annotation:jakarta.annotation-api:1.3.5" level="project" />
+    <orderEntry type="library" name="Maven: org.yaml:snakeyaml:1.26" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-json:2.3.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.11.3" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.11.3" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-parameter-names:2.11.3" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-tomcat:2.3.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.glassfish:jakarta.el:3.0.3" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-web:5.2.12.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-beans:5.2.12.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-webmvc:5.2.12.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-context:5.2.12.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-expression:5.2.12.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-starter:1.3.2" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:2.3.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.zaxxer:HikariCP:3.4.5" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-jdbc:5.2.12.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-autoconfigure:1.3.2" level="project" />
+    <orderEntry type="library" name="Maven: org.mybatis:mybatis:3.4.6" level="project" />
+    <orderEntry type="library" name="Maven: org.mybatis:mybatis-spring:1.3.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-starter-test:2.3.7.RELEASE" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test:2.3.7.RELEASE" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test-autoconfigure:2.3.7.RELEASE" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: com.jayway.jsonpath:json-path:2.4.0" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: net.minidev:json-smart:2.3" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: net.minidev:accessors-smart:1.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: jakarta.xml.bind:jakarta.xml.bind-api:2.3.3" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: jakarta.activation:jakarta.activation-api:1.2.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.assertj:assertj-core:3.16.1" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest:2.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter:5.6.3" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-api:5.6.3" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.opentest4j:opentest4j:1.2.0" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-commons:1.6.3" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-params:5.6.3" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-engine:5.6.3" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.junit.vintage:junit-vintage-engine:5.6.3" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.apiguardian:apiguardian-api:1.1.0" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-engine:1.6.3" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.12" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-core:3.3.3" level="project" />
+    <orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy:1.10.18" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: net.bytebuddy:byte-buddy-agent:1.10.18" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.objenesis:objenesis:2.6" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-junit-jupiter:3.3.3" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.skyscreamer:jsonassert:1.5.0" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: com.vaadin.external.google:android-json:0.0.20131108.vaadin1" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-core:5.2.12.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.2.12.RELEASE" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.springframework:spring-test:5.2.12.RELEASE" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.xmlunit:xmlunit-core:2.7.0" level="project" />
+    <orderEntry type="library" name="Maven: io.springfox:springfox-swagger2:2.9.2" level="project" />
+    <orderEntry type="library" name="Maven: io.springfox:springfox-spi:2.9.2" level="project" />
+    <orderEntry type="library" name="Maven: io.springfox:springfox-core:2.9.2" level="project" />
+    <orderEntry type="library" name="Maven: io.springfox:springfox-schema:2.9.2" level="project" />
+    <orderEntry type="library" name="Maven: io.springfox:springfox-swagger-common:2.9.2" level="project" />
+    <orderEntry type="library" name="Maven: io.springfox:springfox-spring-web:2.9.2" level="project" />
+    <orderEntry type="library" name="Maven: com.google.guava:guava:29.0-android" level="project" />
+    <orderEntry type="library" name="Maven: com.google.guava:failureaccess:1.0.1" level="project" />
+    <orderEntry type="library" name="Maven: com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava" level="project" />
+    <orderEntry type="library" name="Maven: com.google.code.findbugs:jsr305:3.0.2" level="project" />
+    <orderEntry type="library" name="Maven: org.checkerframework:checker-compat-qual:2.5.5" level="project" />
+    <orderEntry type="library" name="Maven: com.google.errorprone:error_prone_annotations:2.3.4" level="project" />
+    <orderEntry type="library" name="Maven: com.google.j2objc:j2objc-annotations:1.3" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml:classmate:1.5.1" level="project" />
+    <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.30" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-core:1.2.0.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-metadata:1.2.0.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.mapstruct:mapstruct:1.2.0.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.springfox:springfox-swagger-ui:2.9.2" level="project" />
+    <orderEntry type="library" name="Maven: io.swagger:swagger-annotations:1.5.21" level="project" />
+    <orderEntry type="library" name="Maven: io.swagger:swagger-models:1.5.21" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.11.3" level="project" />
+    <orderEntry type="library" name="Maven: io.swagger:swagger-core:1.6.2" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.11.3" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.11.3" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.11.3" level="project" />
+    <orderEntry type="library" name="Maven: javax.validation:validation-api:2.0.1.Final" level="project" />
+    <orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.6" level="project" />
+    <orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper-spring-boot-starter:1.2.5" level="project" />
+    <orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper-spring-boot-autoconfigure:1.2.5" level="project" />
+    <orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper:5.1.4" level="project" />
+    <orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:1.0" level="project" />
+    <orderEntry type="library" name="Maven: mysql:mysql-connector-java:5.1.45" level="project" />
+    <orderEntry type="library" name="Maven: com.oracle:ojdbc6:11.2.0.3" level="project" />
+    <orderEntry type="library" name="Maven: com.microsoft.sqlserver:sqljdbc4:4.0" level="project" />
+    <orderEntry type="library" name="Maven: com.taosdata.jdbc:taos-jdbcdriver:2.0.30" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.5.13" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.4.14" level="project" />
+    <orderEntry type="library" name="Maven: com.alibaba:druid-spring-boot-starter:1.1.10" level="project" />
+    <orderEntry type="library" name="Maven: com.alibaba:druid:1.2.5" level="project" />
+    <orderEntry type="library" name="Maven: javax.annotation:javax.annotation-api:1.3.2" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.3.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.shiro:shiro-spring:1.4.0" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.shiro:shiro-core:1.4.0" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.shiro:shiro-lang:1.4.0" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.shiro:shiro-cache:1.4.0" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.shiro:shiro-crypto-hash:1.4.0" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.shiro:shiro-crypto-core:1.4.0" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.shiro:shiro-crypto-cipher:1.4.0" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.shiro:shiro-config-core:1.4.0" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.shiro:shiro-config-ogdl:1.4.0" level="project" />
+    <orderEntry type="library" name="Maven: commons-beanutils:commons-beanutils:1.9.3" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.shiro:shiro-event:1.4.0" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.shiro:shiro-web:1.4.0" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-aop:2.3.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-aop:5.2.12.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.9.6" level="project" />
+    <orderEntry type="library" name="Maven: com.github.theborakompanioni:thymeleaf-extras-shiro:2.0.0" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-thymeleaf:2.3.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.thymeleaf:thymeleaf-spring5:3.0.11.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.thymeleaf:thymeleaf:3.0.11.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.attoparser:attoparser:2.0.5.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.unbescape:unbescape:1.1.6.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.thymeleaf.extras:thymeleaf-extras-java8time:3.0.4.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.10" level="project" />
+    <orderEntry type="library" name="Maven: commons-lang:commons-lang:2.4" level="project" />
+    <orderEntry type="library" name="Maven: commons-io:commons-io:2.5" level="project" />
+    <orderEntry type="library" name="Maven: commons-fileupload:commons-fileupload:1.3.3" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-devtools:2.3.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.3.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: cn.hutool:hutool-all:4.1.12" level="project" />
+    <orderEntry type="library" name="Maven: com.github.penggle:kaptcha:2.3.2" level="project" />
+    <orderEntry type="library" name="Maven: javax.servlet:javax.servlet-api:4.0.1" level="project" />
+    <orderEntry type="library" name="Maven: com.jhlabs:filters:2.0.235-1" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.velocity:velocity:1.7" level="project" />
+    <orderEntry type="library" name="Maven: commons-collections:commons-collections:3.2.1" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-websocket:2.3.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-messaging:5.2.12.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-websocket:5.2.12.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: commons-configuration:commons-configuration:1.10" level="project" />
+    <orderEntry type="library" name="Maven: commons-logging:commons-logging:1.1.1" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-configuration-processor:2.3.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: javax.mail:mail:1.4.7" level="project" />
+    <orderEntry type="library" name="Maven: javax.activation:activation:1.1" level="project" />
+    <orderEntry type="library" name="Maven: org.json:json:20180813" level="project" />
+    <orderEntry type="module-library">
+      <library name="Maven: ueditor:1.4.3:1.8">
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/lib/ueditor-1.1.2.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-integration:2.3.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.integration:spring-integration-core:5.3.4.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-tx:5.2.12.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.retry:spring-retry:1.2.5.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: io.projectreactor:reactor-core:3.3.12.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.reactivestreams:reactive-streams:1.0.3" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.integration:spring-integration-ip:5.3.4.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.quartz-scheduler:quartz:2.3.2" level="project" />
+    <orderEntry type="library" name="Maven: com.mchange:mchange-commons-java:0.2.15" level="project" />
+    <orderEntry type="library" name="Maven: com.qiniu:qiniu-java-sdk:7.2.29" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.squareup.okhttp3:okhttp:3.12.0" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.squareup.okio:okio:1.15.0" level="project" />
+    <orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.17" level="project" />
+    <orderEntry type="library" name="Maven: org.projectlombok:lombok:1.18.12" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-juli:9.0.35" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-core:9.0.35" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-annotations-api:9.0.41" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-el:9.0.35" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-websocket:9.0.35" level="project" />
+    <orderEntry type="library" name="Maven: redis.clients:jedis:3.2.0" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.commons:commons-pool2:2.8.1" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-redis:2.3.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-redis:2.3.6.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-keyvalue:2.3.6.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:2.3.6.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-oxm:5.2.12.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-context-support:5.2.12.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: io.lettuce:lettuce-core:5.3.5.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-common:4.1.55.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-handler:4.1.55.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-resolver:4.1.55.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-buffer:4.1.55.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-codec:4.1.55.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-transport:4.1.55.Final" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml:4.0.1" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml-schemas:4.0.1" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.xmlbeans:xmlbeans:3.0.2" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.commons:commons-compress:1.18" level="project" />
+    <orderEntry type="library" name="Maven: com.github.virtuald:curvesapi:1.05" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.poi:poi:4.0.1" level="project" />
+    <orderEntry type="library" name="Maven: commons-codec:commons-codec:1.14" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.commons:commons-collections4:4.2" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.commons:commons-math3:3.6.1" level="project" />
+    <orderEntry type="library" name="Maven: org.pegdown:pegdown:1.4.2" level="project" />
+    <orderEntry type="library" name="Maven: org.parboiled:parboiled-java:1.1.6" level="project" />
+    <orderEntry type="library" name="Maven: org.parboiled:parboiled-core:1.1.6" level="project" />
+    <orderEntry type="library" name="Maven: org.ow2.asm:asm:4.1" level="project" />
+    <orderEntry type="library" name="Maven: org.ow2.asm:asm-tree:4.1" level="project" />
+    <orderEntry type="library" name="Maven: org.ow2.asm:asm-analysis:4.1" level="project" />
+    <orderEntry type="library" name="Maven: org.ow2.asm:asm-util:4.1" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.ws.commons.axiom:axiom-api:1.2.12" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.geronimo.specs:geronimo-activation_1.1_spec:1.0.2" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.geronimo.specs:geronimo-javamail_1.4_spec:1.6" level="project" />
+    <orderEntry type="library" name="Maven: jaxen:jaxen:1.2.0" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.geronimo.specs:geronimo-stax-api_1.0_spec:1.0.1" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.axis2:axis2-kernel:1.6.1" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.ws.commons.axiom:axiom-impl:1.2.12" level="project" />
+    <orderEntry type="library" name="Maven: org.codehaus.woodstox:wstx-asl:3.2.9" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.geronimo.specs:geronimo-ws-metadata_2.0_spec:1.1.2" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.geronimo.specs:geronimo-jta_1.1_spec:1.1" level="project" />
+    <orderEntry type="library" name="Maven: javax.servlet:servlet-api:2.3" level="project" />
+    <orderEntry type="library" name="Maven: commons-httpclient:commons-httpclient:3.1" level="project" />
+    <orderEntry type="library" name="Maven: wsdl4j:wsdl4j:1.6.3" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.ws.commons.schema:XmlSchema:1.4.7" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.neethi:neethi:3.0.1" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.woden:woden-api:1.0M9" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.woden:woden-impl-dom:1.0M9" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.woden:woden-impl-commons:1.0M9" level="project" />
+    <orderEntry type="library" name="Maven: javax.ws.rs:jsr311-api:1.0" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.axis2:axis2-adb:1.6.1" level="project" />
+    <orderEntry type="library" name="Maven: com.netflix.feign:feign-core:8.18.0" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: org.jvnet:animal-sniffer-annotation:1.0" level="project" />
+    <orderEntry type="library" name="Maven: com.netflix.feign:feign-jackson:8.18.0" level="project" />
+    <orderEntry type="library" name="Maven: com.alibaba.cloud:spring-cloud-starter-alibaba-nacos-discovery:2.2.5.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.alibaba.cloud:spring-cloud-alibaba-commons:2.2.5.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.alibaba.nacos:nacos-client:1.4.1" level="project" />
+    <orderEntry type="library" name="Maven: com.alibaba.nacos:nacos-common:1.4.1" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpasyncclient:4.1.4" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore-nio:4.4.14" level="project" />
+    <orderEntry type="library" name="Maven: com.alibaba.nacos:nacos-api:1.4.1" level="project" />
+    <orderEntry type="library" name="Maven: io.prometheus:simpleclient:0.5.0" level="project" />
+    <orderEntry type="library" name="Maven: com.alibaba.spring:spring-context-support:1.0.10" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-commons:2.2.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.security:spring-security-crypto:5.3.6.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-context:2.2.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-ribbon:2.2.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter:2.2.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.security:spring-security-rsa:1.0.9.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.bouncycastle:bcpkix-jdk15on:1.64" level="project" />
+    <orderEntry type="library" name="Maven: org.bouncycastle:bcprov-jdk15on:1.64" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-ribbon:2.2.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-archaius:2.2.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-archaius:2.2.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.netflix.archaius:archaius-core:0.7.6" level="project" />
+    <orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon:2.3.0" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.ribbon:ribbon-transport:2.3.0" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty-contexts:0.4.9" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty-servo:0.4.9" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.hystrix:hystrix-core:1.5.18" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: org.hdrhistogram:HdrHistogram:2.1.9" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: javax.inject:javax.inject:1" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty:0.4.9" level="project" />
+    <orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-core:2.3.0" level="project" />
+    <orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-httpclient:2.3.0" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey:jersey-client:1.19.1" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey:jersey-core:1.19.1" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey.contribs:jersey-apache-client4:1.19.1" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.servo:servo-core:0.12.21" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.netflix-commons:netflix-commons-util:0.3.0" level="project" />
+    <orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-loadbalancer:2.3.0" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.netflix-commons:netflix-statistics:0.1.1" level="project" />
+    <orderEntry type="library" name="Maven: io.reactivex:rxjava:1.3.8" level="project" />
+    <orderEntry type="library" name="Maven: org.postgresql:postgresql:42.2.5" level="project" />
+  </component>
+</module>

+ 518 - 0
web/monitor-hf/pom.xml

@@ -0,0 +1,518 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>web</artifactId>
+        <groupId>com.gyee</groupId>
+        <version>1.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>monitor-hf</artifactId>
+
+
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+        <java.version>1.8</java.version>
+        <commons.fileupload.version>1.3.3</commons.fileupload.version>
+        <commons.io.version>2.5</commons.io.version>
+        <tomcat.version>9.0.35</tomcat.version>
+        <spring-boot.version>2.3.7.RELEASE</spring-boot.version>
+        <spring-cloud-alibaba.version>2.2.5.RELEASE</spring-cloud-alibaba.version>
+        <pgsql.version>42.2.5</pgsql.version>
+    </properties>
+
+    <!-- https://mvnrepository.com/ 查找jar网站 -->
+    <dependencies>
+        <!-- SpringBoot Web容器 -->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+        </dependency>
+        <!-- SpringBoot集成mybatis框架 -->
+        <dependency>
+            <groupId>org.mybatis.spring.boot</groupId>
+            <artifactId>mybatis-spring-boot-starter</artifactId>
+            <version>1.3.2</version>
+        </dependency>
+        <!--		<dependency>-->
+        <!--			<groupId>org.mybatis.caches</groupId>-->
+        <!--			<artifactId>mybatis-ehcache</artifactId>-->
+        <!--			<version>1.2.1</version>-->
+        <!--		</dependency>-->
+        <!-- SpringBoot 测试 -->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-test</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <!-- 添加swagger2 -->
+        <dependency>
+            <groupId>io.springfox</groupId>
+            <artifactId>springfox-swagger2</artifactId>
+            <version>2.9.2</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>io.swagger</groupId>
+                    <artifactId>swagger-annotations</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>io.swagger</groupId>
+                    <artifactId>swagger-models</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>io.springfox</groupId>
+            <artifactId>springfox-swagger-ui</artifactId>
+            <version>2.9.2</version>
+        </dependency>
+        <dependency>
+            <groupId>io.swagger</groupId>
+            <artifactId>swagger-annotations</artifactId>
+            <version>1.5.21</version>
+        </dependency>
+        <dependency>
+            <groupId>io.swagger</groupId>
+            <artifactId>swagger-models</artifactId>
+            <version>1.5.21</version>
+        </dependency>
+
+        <!-- https://mvnrepository.com/artifact/io.github.swagger2markup/swagger2markup -->
+
+        <dependency>
+            <groupId>io.swagger</groupId>
+            <artifactId>swagger-core</artifactId>
+            <version>1.6.2</version>
+        </dependency>
+        <!--GSON -->
+        <dependency>
+            <groupId>com.google.code.gson</groupId>
+            <artifactId>gson</artifactId>
+        </dependency>
+        <!-- pageHelper -->
+        <dependency>
+            <groupId>com.github.pagehelper</groupId>
+            <artifactId>pagehelper-spring-boot-starter</artifactId>
+            <version>1.2.5</version>
+        </dependency>
+        <!-- mysql驱动7.0-->
+        <dependency>
+            <groupId>mysql</groupId>
+            <artifactId>mysql-connector-java</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.oracle</groupId>
+            <artifactId>ojdbc6</artifactId>
+            <version>11.2.0.3</version>
+        </dependency>
+        <dependency>
+            <groupId>com.microsoft.sqlserver</groupId>
+            <artifactId>sqljdbc4</artifactId>
+            <version>4.0</version>
+        </dependency>
+        <dependency>
+            <groupId>com.taosdata.jdbc</groupId>
+            <artifactId>taos-jdbcdriver</artifactId>
+            <version>2.0.30</version>
+        </dependency>
+        <!-- mysql驱动8.0
+         <dependency>
+             <groupId>mysql</groupId>
+             <artifactId>mysql-connector-java</artifactId>
+            <version>8.0.11</version>
+         </dependency>
+         -->
+        <!--druid 数据源监控-->
+        <!-- https://mvnrepository.com/artifact/com.alibaba/druid-spring-boot-starter -->
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>druid-spring-boot-starter</artifactId>
+            <version>1.1.10</version>
+        </dependency>
+        <!-- shiro权限 -->
+        <dependency>
+            <groupId>org.apache.shiro</groupId>
+            <artifactId>shiro-spring</artifactId>
+            <version>1.4.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-aop</artifactId>
+        </dependency>
+        <!-- shiro权限支持thymeleaf -->
+        <dependency>
+            <groupId>com.github.theborakompanioni</groupId>
+            <artifactId>thymeleaf-extras-shiro</artifactId>
+            <version>2.0.0</version>
+        </dependency>
+
+        <!-- thymeleaf模版 -->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-thymeleaf</artifactId>
+        </dependency>
+
+        <!--常用工具类 -->
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-lang3</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>commons-lang</groupId>
+            <artifactId>commons-lang</artifactId>
+            <version>2.4</version>
+        </dependency>
+
+        <!--io常用工具类 -->
+        <dependency>
+            <groupId>commons-io</groupId>
+            <artifactId>commons-io</artifactId>
+            <version>${commons.io.version}</version>
+        </dependency>
+
+        <!--文件上传工具类 -->
+        <dependency>
+            <groupId>commons-fileupload</groupId>
+            <artifactId>commons-fileupload</artifactId>
+            <version>${commons.fileupload.version}</version>
+        </dependency>
+
+
+        <!-- 热部署 -->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-devtools</artifactId>
+            <optional>false</optional>
+        </dependency>
+
+        <!-- Hutool是一个Java工具包 http://hutool.cn/ -->
+        <dependency>
+            <groupId>cn.hutool</groupId>
+            <artifactId>hutool-all</artifactId>
+            <version>4.1.12</version>
+        </dependency>
+        <!-- google验证码 -->
+        <dependency>
+            <groupId>com.github.penggle</groupId>
+            <artifactId>kaptcha</artifactId>
+            <version>2.3.2</version>
+        </dependency>
+        <!-- https://mvnrepository.com/artifact/org.apache.velocity/velocity -->
+        <dependency>
+            <groupId>org.apache.velocity</groupId>
+            <artifactId>velocity</artifactId>
+            <version>1.7</version>
+        </dependency>
+        <!-- websocket -->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-websocket</artifactId>
+        </dependency>
+        <!-- 配置文件读取 -->
+        <dependency>
+            <groupId>commons-configuration</groupId>
+            <artifactId>commons-configuration</artifactId>
+            <version>1.10</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-configuration-processor</artifactId>
+            <optional>true</optional>
+        </dependency>
+
+        <!-- mail -->
+        <dependency>
+            <groupId>javax.mail</groupId>
+            <artifactId>mail</artifactId>
+            <version>1.4.7</version>
+        </dependency>
+
+        <!--百度UEditor依赖的jar包 -->
+        <dependency>
+            <groupId>org.json</groupId>
+            <artifactId>json</artifactId>
+            <version>20180813</version>
+        </dependency>
+        <dependency>
+            <groupId>ueditor</groupId>
+            <artifactId>1.4.3</artifactId>
+            <version>1.8</version>
+            <scope>system</scope>
+            <systemPath>${basedir}/lib/ueditor-1.1.2.jar</systemPath>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-integration</artifactId>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.springframework.boot</groupId>
+                    <artifactId>spring-boot-starter-logging</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.integration</groupId>
+            <artifactId>spring-integration-ip</artifactId>
+        </dependency>
+        <!--quartz依赖-->
+        <dependency>
+            <groupId>org.quartz-scheduler</groupId>
+            <artifactId>quartz</artifactId>
+        </dependency>
+        <!-- 七牛云 -->
+        <dependency>
+            <groupId>com.qiniu</groupId>
+            <artifactId>qiniu-java-sdk</artifactId>
+            <version>[7.2.0, 7.2.99]</version>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>fastjson</artifactId>
+            <version>1.2.17</version>
+        </dependency>
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+            <version>1.18.12</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tomcat</groupId>
+            <artifactId>tomcat-juli</artifactId>
+            <version>${tomcat.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.tomcat.embed</groupId>
+            <artifactId>tomcat-embed-core</artifactId>
+            <version>${tomcat.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.tomcat.embed</groupId>
+            <artifactId>tomcat-embed-el</artifactId>
+            <version>${tomcat.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.tomcat.embed</groupId>
+            <artifactId>tomcat-embed-websocket</artifactId>
+            <version>${tomcat.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>redis.clients</groupId>
+            <artifactId>jedis</artifactId>
+            <version>3.2.0</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-data-redis</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.poi</groupId>
+            <artifactId>poi-ooxml</artifactId>
+            <version>4.0.1</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.poi</groupId>
+            <artifactId>poi</artifactId>
+            <version>4.0.1</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.pegdown</groupId>
+            <artifactId>pegdown</artifactId>
+            <version>1.4.2</version>
+        </dependency>
+        <!-- webservice-->
+        <dependency>
+            <groupId>org.apache.ws.commons.axiom</groupId>
+            <artifactId>axiom-api</artifactId>
+            <version>1.2.12</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.axis2</groupId>
+            <artifactId>axis2</artifactId>
+            <version>1.6.1</version>
+            <type>pom</type>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.axis2</groupId>
+            <artifactId>axis2-kernel</artifactId>
+            <version>1.6.1</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.axis2</groupId>
+            <artifactId>axis2-adb</artifactId>
+            <version>1.6.1</version>
+        </dependency>
+        <!-- webservice-->
+
+        <!--http请求-->
+        <dependency>
+            <groupId>com.netflix.feign</groupId>
+            <artifactId>feign-core</artifactId>
+            <version>8.18.0</version>
+        </dependency>
+        <dependency>
+            <groupId>com.netflix.feign</groupId>
+            <artifactId>feign-jackson</artifactId>
+            <version>8.18.0</version>
+        </dependency>
+        <!--http请求-->
+
+        <dependency>
+            <groupId>com.alibaba.cloud</groupId>
+            <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.postgresql</groupId>
+            <artifactId>postgresql</artifactId>
+            <version>${pgsql.version}</version>
+        </dependency>
+    </dependencies>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>com.alibaba.cloud</groupId>
+                <artifactId>spring-cloud-alibaba-dependencies</artifactId>
+                <version>${spring-cloud-alibaba.version}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+            <!-- spring-cloud-dependencies -->
+            <dependency>
+                <groupId>org.springframework.cloud</groupId>
+                <artifactId>spring-cloud-dependencies</artifactId>
+                <version>Hoxton.SR5</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+            <dependency>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-dependencies</artifactId>
+                <version>${spring-boot.version}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
+    <build>
+
+
+        <!-- 打包不带版本号 -->
+        <!-- <finalName>Gyee_Frame_HF</finalName> -->
+        <plugins>
+            <!-- JUnit 配置 -->
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <!--忽略测试启动类 -->
+                <configuration>
+                    <skip>true</skip>
+                </configuration>
+            </plugin>
+
+
+
+
+            <!-- generator 配置-->
+            <plugin>
+                <groupId>org.mybatis.generator</groupId>
+                <artifactId>mybatis-generator-maven-plugin</artifactId>
+                <version>1.3.7</version>
+                <configuration>
+                    <!--允许移动生成的文件 -->
+                    <verbose>false</verbose>
+                    <!--允许覆盖生成的文件 -->
+                    <overwrite>false</overwrite>
+                    <!--配置文件的路径 -->
+                    <configurationFile>src/main/resources/mybatis-generator.xml</configurationFile>
+                </configuration>
+                <dependencies>
+                    <!--					<dependency>-->
+                    <!--						<groupId>mysql</groupId>-->
+                    <!--						<artifactId>mysql-connector-java</artifactId>-->
+                    <!--						<version>${mysql.version}</version>-->
+                    <!--					</dependency>-->
+                    <dependency>
+                        <groupId>com.oracle</groupId>
+                        <artifactId>ojdbc6</artifactId>
+                        <version>11.2.0.3</version>
+                    </dependency>
+
+                    <!--					<dependency>-->
+                    <!--					<groupId>com.microsoft.sqlserver</groupId>-->
+                    <!--					<artifactId>sqljdbc4</artifactId>-->
+                    <!--					<version>4.0</version>-->
+                    <!--				    </dependency>-->
+
+                </dependencies>
+            </plugin>
+            <!-- jar运行配置 -->
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <source>1.8</source>
+                    <target>1.8</target>
+                    <encoding>UTF-8</encoding>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>repackage</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <configuration>
+                    <mainClass>com.gyee.SpringbootStart</mainClass>
+                </configuration>
+
+            </plugin>
+
+
+
+        </plugins>
+    </build>
+
+    <!-- 阿里云maven仓库 -->
+    <repositories>
+        <repository>
+            <id>public</id>
+            <name>aliyun nexus</name>
+            <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
+            <releases>
+                <enabled>true</enabled>
+            </releases>
+        </repository>
+    </repositories>
+
+    <pluginRepositories>
+        <pluginRepository>
+            <id>public</id>
+            <name>aliyun nexus</name>
+            <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
+            <releases>
+                <enabled>true</enabled>
+            </releases>
+            <snapshots>
+                <enabled>false</enabled>
+            </snapshots>
+        </pluginRepository>
+    </pluginRepositories>
+
+
+</project>

+ 57 - 0
web/monitor-hf/src/main/java/com/gyee/SpringbootStart.java

@@ -0,0 +1,57 @@
+package com.gyee;
+
+import com.gyee.frame.common.spring.SpringUtils;
+import com.gyee.frame.service.initialpoint.InitialPointEdosService;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
+import org.springframework.cache.annotation.EnableCaching;
+import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
+
+
+/**
+ * 项目启动方法
+ * @author gyee
+ *
+ */
+@EnableDiscoveryClient //开启服务注册与发现功能: classpath: META-INF/spring.factories文件
+@EnableCaching
+@SpringBootApplication(exclude = DataSourceAutoConfiguration.class)
+public class SpringbootStart {
+
+    public static void main(String[] args) throws Exception {
+
+        SpringApplication.run(SpringbootStart.class, args);
+
+
+
+
+        InitialPointEdosService initialPointEdosService= SpringUtils.getBean("initialPointEdosService");
+
+
+
+//        InitialRedis initialRedis=new InitialRedis();
+//        System.out.println("初始化开始!");
+//        initialRedis.intialWindturbinepowercurvefitting();
+//        initialRedis.intialWpScatter();
+//        initialRedis.intialPjScatter();
+//        initialRedis.intialLnScatter();
+//        initialRedis.intialWtScatter();
+//        System.out.println("初始化完成!");
+
+//        System.out.println("开始导出风机测点。。。。。。");
+//        initialPointEdosService.initalFj();
+//        System.out.println("结束导出风机测点。。。。。。");
+//
+//        System.out.println("开始导出风场测点。。。。。。");
+//        initialPointEdosService.initalFc(false);
+//        System.out.println("结束导出风场测点。。。。。。");
+//
+//
+//        System.out.println("开始导出风功率测点。。。。。。");
+//        initialPointEdosService.initalFgl();
+//        System.out.println("结束导出风功率测点。。。。。。");
+
+        System.out.println("初始化结束!");
+    }
+}

+ 19 - 0
web/monitor-hf/src/main/java/com/gyee/SpringbootWebInitializer.java

@@ -0,0 +1,19 @@
+package com.gyee;
+
+import org.springframework.boot.builder.SpringApplicationBuilder;
+import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
+
+/**
+* @ClassName: SpringbootWebInitializer
+* @Description: web容器中进行部署
+* @author gyee
+* @date 2018年8月18日
+*
+*/
+public class SpringbootWebInitializer  extends SpringBootServletInitializer{
+	@Override
+    protected SpringApplicationBuilder configure(SpringApplicationBuilder application)
+    {
+        return application.sources(SpringbootStart.class);
+    }
+}

+ 77 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/async/config/AsyncConfig.java

@@ -0,0 +1,77 @@
+//package com.gyee.frame.common.async.config;
+//
+//import org.slf4j.Logger;
+//import org.slf4j.LoggerFactory;
+//import org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler;
+//import org.springframework.context.annotation.Configuration;
+//import org.springframework.scheduling.annotation.AsyncConfigurer;
+//import org.springframework.scheduling.annotation.EnableAsync;
+//
+//import java.lang.reflect.Method;
+//import java.util.Arrays;
+//
+///**
+// * AsyncConfig
+// *
+// * @author wliduo[i@dolyw.com]
+// * @date 2020/5/19 17:58
+// */
+//@Configuration
+//@EnableAsync
+//public class AsyncConfig implements AsyncConfigurer {
+//
+//    /**
+//     * logger
+//     */
+//    private static final Logger logger = LoggerFactory.getLogger(AsyncConfig.class);
+//
+//    /**
+//     * 这里不实现了,使用 ThreadPoolConfig 里的线程池即可
+//     *
+//     * @param
+//     * @return java.util.concurrent.Executor
+//     * @throws
+//     * @author wliduo[i@dolyw.com]
+//     * @date 2020/5/19 18:00
+//     */
+//    /*@Override
+//    public Executor getAsyncExecutor() {
+//        return null;
+//    }*/
+//
+//    /**
+//     * 只能捕获无返回值的异步方法,有返回值的被主线程处理
+//     *
+//     * @param
+//     * @return org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler
+//     * @throws
+//     * @author wliduo[i@dolyw.com]
+//     * @date 2020/5/20 10:16
+//     */
+//    @Override
+//    public AsyncUncaughtExceptionHandler getAsyncUncaughtExceptionHandler() {
+//        return new CustomAsyncExceptionHandler();
+//    }
+//
+//    /***
+//     * 处理异步方法中未捕获的异常
+//     *
+//     * @author wliduo[i@dolyw.com]
+//     * @date 2020/5/19 19:16
+//     */
+//    class CustomAsyncExceptionHandler implements AsyncUncaughtExceptionHandler {
+//
+//        @Override
+//        public void handleUncaughtException(Throwable throwable, Method method, Object... obj) {
+//            logger.info("Exception message - {}", throwable.getMessage());
+//            logger.info("Method name - {}", method.getName());
+//            logger.info("Parameter values - {}", Arrays.toString(obj));
+//            if (throwable instanceof Exception) {
+//                Exception exception = (Exception) throwable;
+//                logger.info("exception:{}", exception.getMessage());
+//            }
+//            throwable.printStackTrace();
+//        }
+//
+//    }
+//}

+ 76 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/async/config/ThreadPoolConfig.java

@@ -0,0 +1,76 @@
+package com.gyee.frame.common.async.config;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
+
+import java.util.concurrent.*;
+
+/**
+ * 线程池配置
+ *
+ * @author wliduo
+ * @date 2019/2/15 14:36
+ */
+@Configuration
+public class ThreadPoolConfig {
+
+    /**
+     * logger
+     */
+    private final static Logger logger = LoggerFactory.getLogger(ThreadPoolConfig.class);
+
+    @Value("${asyncThreadPool.corePoolSize}")
+    private int corePoolSize;
+
+    @Value("${asyncThreadPool.maxPoolSize}")
+    private int maxPoolSize;
+
+    @Value("${asyncThreadPool.queueCapacity}")
+    private int queueCapacity;
+
+    @Value("${asyncThreadPool.keepAliveSeconds}")
+    private int keepAliveSeconds;
+
+    @Value("${asyncThreadPool.awaitTerminationSeconds}")
+    private int awaitTerminationSeconds;
+
+    @Value("${asyncThreadPool.threadNamePrefix}")
+    private String threadNamePrefix;
+
+    /**
+     * 线程池配置
+     * @param
+     * @return java.util.concurrent.Executor
+     * @author wliduo
+     * @date 2019/2/15 14:44
+     */
+    @Bean(name = "threadPoolTaskExecutor")
+    public ThreadPoolTaskExecutor threadPoolTaskExecutor() {
+        logger.info("---------- 线程池开始加载 ----------");
+        ThreadPoolTaskExecutor threadPoolTaskExecutor = new ThreadPoolTaskExecutor();
+        // 核心线程池大小
+        threadPoolTaskExecutor.setCorePoolSize(corePoolSize);
+        // 最大线程数
+        threadPoolTaskExecutor.setMaxPoolSize(maxPoolSize);
+        // 队列容量
+        threadPoolTaskExecutor.setQueueCapacity(keepAliveSeconds);
+        // 活跃时间
+        threadPoolTaskExecutor.setKeepAliveSeconds(queueCapacity);
+        // 主线程等待子线程执行时间
+        threadPoolTaskExecutor.setAwaitTerminationSeconds(awaitTerminationSeconds);
+        // 线程名字前缀
+        threadPoolTaskExecutor.setThreadNamePrefix(threadNamePrefix);
+        // RejectedExecutionHandler:当pool已经达到max-size的时候,如何处理新任务
+        // CallerRunsPolicy:不在新线程中执行任务,而是由调用者所在的线程来执行
+        threadPoolTaskExecutor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy());
+        // 初始化
+        threadPoolTaskExecutor.initialize();
+        logger.info("---------- 线程池加载完成 ----------");
+        return threadPoolTaskExecutor;
+    }
+
+}

+ 133 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/async/controller/AsyncController.java

@@ -0,0 +1,133 @@
+package com.gyee.frame.common.async.controller;
+
+
+import com.gyee.frame.common.async.service.AsyncService;
+import com.gyee.frame.common.async.util.SmsUtil;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+import java.util.concurrent.Future;
+
+/**
+ * AsyncController
+ *
+ * @author wliduo[i@dolyw.com]
+ * @date 2020/5/19 14:46
+ */
+@RestController
+@RequestMapping("/async")
+public class AsyncController {
+
+    /**
+     * logger
+     */
+    private final static Logger logger = LoggerFactory.getLogger(AsyncController.class);
+
+    @Resource
+    private AsyncService asyncService;
+
+    @Autowired
+    private SmsUtil smsUtil;
+
+    /**
+     * 可以看到无返回值异步方法出现异常,主线程还是继续执行完成
+     *
+     * @param
+     * @return void
+     * @throws
+     * @author wliduo[i@dolyw.com]
+     * @date 2020/5/20 9:53
+     */
+    @GetMapping("/run1")
+    public String run1() throws Exception {
+        asyncService.task1();
+        logger.info("run1开始执行");
+        Thread.sleep(5000);
+        logger.info("run1执行完成");
+        return "run1 success";
+    }
+
+    /**
+     * 可以看到有返回值异步方法出现异常,异常抛给主线程处理,导致主线程也被中断执行
+     *
+     * @param
+     * @return java.lang.String
+     * @throws
+     * @author wliduo[i@dolyw.com]
+     * @date 2020/5/20 10:15
+     */
+    @GetMapping("/run2")
+    public String run2() throws Exception {
+        Future<String> future = asyncService.task2();
+        // get()方法阻塞主线程,直到执行完成
+        String result = future.get();
+        logger.info("run2开始执行");
+        Thread.sleep(5000);
+        logger.info("run2执行完成");
+        return result;
+    }
+
+    /**
+     * 多个异步执行
+     *
+     * @param
+     * @return java.lang.String
+     * @throws
+     * @author wliduo[i@dolyw.com]
+     * @date 2020/5/20 10:26
+     */
+    @GetMapping("/run3")
+    public String run3() throws Exception {
+        logger.info("run3开始执行");
+        long start = System.currentTimeMillis();
+        Future<String> future3 = asyncService.task3();
+        Future<String> future4 = asyncService.task4();
+        // 这样与下面是一样的
+        logger.info(future3.get());
+        logger.info(future4.get());
+        // 先判断是否执行完成
+        boolean run3Done = Boolean.FALSE;
+        while (true) {
+            if (future3.isDone() && future4.isDone()) {
+                // 执行完成
+                run3Done = Boolean.TRUE;
+                break;
+            }
+            if (future3.isCancelled() || future4.isCancelled()) {
+                // 取消情况
+                break;
+            }
+        }
+        if (run3Done) {
+            logger.info(future3.get());
+            logger.info(future4.get());
+        } else {
+            // 其他异常情况
+        }
+        long end = System.currentTimeMillis();
+        logger.info("run3执行完成,执行时间: {}", end - start);
+        return "run3 success";
+    }
+
+    /**
+     * 工具类异步
+     *
+     * @param
+     * @return java.lang.String
+     * @throws
+     * @author wliduo[i@dolyw.com]
+     * @date 2020/5/20 10:59
+     */
+    @GetMapping("/sms")
+    public String sms() throws Exception {
+        logger.info("run1开始执行");
+        smsUtil.sendCode("15912347896", "135333");
+        logger.info("run1执行完成");
+        return "send sms success";
+    }
+}

+ 57 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/async/service/AsyncService.java

@@ -0,0 +1,57 @@
+package com.gyee.frame.common.async.service;
+
+import java.util.concurrent.Future;
+
+/**
+ * AsyncService
+ *
+ * @author wliduo[i@dolyw.com]
+ * @date 2020/5/19 14:18
+ */
+public interface AsyncService {
+
+    /**
+     * 任务1
+     *
+     * @param
+     * @return void
+     * @throws Exception e
+     * @author wliduo[i@dolyw.com]
+     * @date 2020/5/19 14:45
+     */
+    void task1() throws Exception;
+
+    /**
+     * 任务2
+     *
+     * @param
+     * @return java.util.concurrent.Future<java.lang.String>
+     * @throws Exception e
+     * @author wliduo[i@dolyw.com]
+     * @date 2020/5/20 10:04
+     */
+    Future<String> task2() throws Exception;
+
+    /**
+     * 任务3
+     *
+     * @param
+     * @return java.util.concurrent.Future<java.lang.String>
+     * @throws Exception e
+     * @author wliduo[i@dolyw.com]
+     * @date 2020/5/20 10:20
+     */
+    Future<String> task3() throws Exception;
+
+    /**
+     * 任务4
+     *
+     * @param
+     * @return java.util.concurrent.Future<java.lang.String>
+     * @throws Exception e
+     * @author wliduo[i@dolyw.com]
+     * @date 2020/5/20 10:20
+     */
+    Future<String> task4() throws Exception;
+
+}

+ 63 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/async/service/impl/AsyncServiceImpl.java

@@ -0,0 +1,63 @@
+package com.gyee.frame.common.async.service.impl;
+
+
+import com.gyee.frame.common.async.service.AsyncService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.scheduling.annotation.Async;
+import org.springframework.scheduling.annotation.AsyncResult;
+import org.springframework.stereotype.Service;
+
+import java.util.concurrent.Future;
+
+/**
+ * AsyncServiceImpl
+ *
+ * @author wliduo[i@dolyw.com]
+ * @date 2020/5/19 14:24
+ */
+@Service
+public class AsyncServiceImpl implements AsyncService {
+
+    /**
+     * logger
+     */
+    private final static Logger logger = LoggerFactory.getLogger(AsyncServiceImpl.class);
+
+    @Override
+    @Async("threadPoolTaskExecutor")
+    public void task1() throws Exception {
+        logger.info("task1开始执行");
+        Thread.sleep(3000);
+        logger.info("task1执行结束");
+        throw new RuntimeException("出现异常");
+    }
+
+    @Override
+    @Async("threadPoolTaskExecutor")
+    public Future<String> task2() throws Exception {
+        logger.info("task2开始执行");
+        Thread.sleep(3000);
+        logger.info("task2执行结束");
+        throw new RuntimeException("出现异常");
+        // return new AsyncResult<String>("task2 success");
+    }
+
+    @Override
+    @Async("threadPoolTaskExecutor")
+    public Future<String> task3() throws Exception {
+        logger.info("task3开始执行");
+        Thread.sleep(3000);
+        logger.info("task3执行结束");
+        return new AsyncResult<String>("task3 success");
+    }
+
+    @Override
+    @Async("threadPoolTaskExecutor")
+    public Future<String> task4() throws Exception {
+        logger.info("task4开始执行");
+        Thread.sleep(3000);
+        logger.info("task4执行结束");
+        return new AsyncResult<String>("task4 success");
+    }
+}

+ 41 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/async/util/SmsUtil.java

@@ -0,0 +1,41 @@
+package com.gyee.frame.common.async.util;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.scheduling.annotation.Async;
+import org.springframework.stereotype.Component;
+
+/**
+ * SmsUtil
+ *
+ * @author wliduo[i@dolyw.com]
+ * @date 2020/5/20 10:50
+ */
+@Component
+public class SmsUtil {
+
+    private static final Logger logger = LoggerFactory.getLogger(SmsUtil.class);
+
+    /**
+     * 异步发送短信
+     *
+     * @param phone
+	 * @param code
+     * @return void
+     * @throws
+     * @author wliduo[i@dolyw.com]
+     * @date 2020/5/20 10:53
+     */
+    @Async
+    public void sendCode(String phone, String code) {
+        logger.info("开始发送验证码...");
+        // 模拟调用接口发验证码的耗时
+        try {
+            Thread.sleep(3000);
+        } catch (InterruptedException e) {
+            e.printStackTrace();
+        }
+        logger.info("发送成功: {}", phone);
+    }
+
+}

+ 166 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/base/BaseController.java

@@ -0,0 +1,166 @@
+package com.gyee.frame.common.base;
+
+import cn.hutool.core.util.StrUtil;
+import com.gyee.frame.common.domain.AjaxResult;
+import com.gyee.frame.model.custom.TitleVo;
+import com.gyee.frame.service.*;
+import org.springframework.beans.propertyeditors.CustomDateEditor;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.WebDataBinder;
+import org.springframework.web.bind.annotation.InitBinder;
+
+import javax.annotation.Resource;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+/**
+ * web层通用数据处理
+* @ClassName: BaseController
+* @author gyee
+* @date 2018年8月18日
+*
+ */
+@Controller
+public class BaseController
+{
+	//系统用户
+	@Resource
+	public SysUserService sysUserService; 
+	
+	//系统角色
+	@Resource
+	public SysRoleService sysRoleService; 
+	
+	//权限
+	@Resource
+	public SysPermissionService sysPermissionService;
+
+    //VUE系统用户
+    @Resource
+    public VueUserService vueUserService;
+    //VUE系统角色
+    @Resource
+    public VueRoleService vueRoleService;
+
+    //VUE权限
+    @Resource
+    public VuePermissionService vuePermissionService;
+	//文件上传
+	@Resource
+	public SysFileService sysFileService;
+	
+	//文件存储
+	@Resource
+	public SysDatasService sysDatasService;
+	
+	//文件存储管理表
+	@Resource
+	public SysFileDatasService sysFileDatasService;
+	
+	//日志操作
+	@Resource
+	public SysOperLogService sysOperLogService;
+	//公告
+	@Resource
+	public SysNoticeService sysNoticeService;
+
+    /**
+     * 将前台传递过来的日期格式的字符串,自动转化为Date类型
+     */
+    @InitBinder
+    public void initBinder(WebDataBinder binder)
+    {
+        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        dateFormat.setLenient(false);
+        binder.registerCustomEditor(Date.class, new CustomDateEditor(dateFormat, true));
+    }
+
+
+    /**
+     * 响应返回结果
+     * 
+     * @param rows 影响行数
+     * @return 操作结果
+     */
+    protected AjaxResult toAjax(int rows)
+    {
+        return rows > 0 ? success() : error();
+    }
+
+    /**
+     * 返回成功
+     */
+    public AjaxResult success()
+    {
+        return AjaxResult.success();
+    }
+
+    /**
+     * 返回失败消息
+     */
+    public AjaxResult error()
+    {
+        return AjaxResult.error();
+    }
+
+    /**
+     * 返回成功消息
+     */
+    public AjaxResult success(String message)
+    {
+        return AjaxResult.success(message);
+    }
+    
+
+    /**
+     * 返回失败消息
+     */
+    public AjaxResult error(String message)
+    {
+        return AjaxResult.error(message);
+    }
+
+    /**
+     * 返回错误码消息
+     */
+    public AjaxResult error(int code, String message)
+    {
+        return AjaxResult.error(code, message);
+    }
+    
+    /**
+     * 返回object数据
+     */
+    public AjaxResult retobject(int code, Object  data)
+    {
+        return AjaxResult.successData(code, data);
+    }
+
+    /**
+     * 页面跳转
+     */
+    public String redirect(String url)
+    {
+    	return StrUtil.format("redirect:{}", url);
+    }
+    
+    
+    /**
+     * 设置标题通用方法
+     */
+    public void setTitle(ModelMap map,TitleVo titleVo){
+    	//标题
+    	map.put("title",titleVo.getTitle());
+    	map.put("parenttitle",titleVo.getParenttitle());
+		//是否打开欢迎语
+    	map.put("isMsg",titleVo.isMsg());
+		//欢迎语
+    	map.put("msgHTML",titleVo.getMsgHtml());
+		//小控件
+    	map.put("isControl",titleVo.isControl());
+		map.put("isribbon", titleVo.isIsribbon());
+    }
+
+   
+}

+ 34 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/base/BaseService.java

@@ -0,0 +1,34 @@
+package com.gyee.frame.common.base;
+
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+/**
+ * 抽象类BaseService
+* @ClassName: BaseService
+* @Description: Service实现这个
+* @author gyee
+* @date 2018年6月3日
+*
+ */
+public interface BaseService<T,T2> {
+	
+    int deleteByPrimaryKey(String id);
+
+    int insertSelective(T record);
+
+    T selectByPrimaryKey(String id);
+   
+    int updateByPrimaryKeySelective(T record);
+    
+    int updateByExampleSelective(@Param("record") T record, @Param("example") T2 example);
+
+    int updateByExample(@Param("record") T record, @Param("example") T2 example);
+    
+    List<T> selectByExample(T2 example);
+
+    long countByExample(T2 example);
+
+    int deleteByExample(T2 example);
+
+}

+ 268 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/base/PageInfo.java

@@ -0,0 +1,268 @@
+package com.gyee.frame.common.base;
+
+import java.io.Serializable;
+import java.util.List;
+
+import com.github.pagehelper.Page;
+
+@SuppressWarnings({"rawtypes", "unchecked"})
+public class PageInfo<T> implements Serializable {
+    private static final long serialVersionUID = 1L;
+    //当前页
+    private int pageNum;
+    //每页的数量
+    private int pageSize;
+    //当前页的数量
+    private int size;
+    //由于startRow和endRow不常用,这里说个具体的用法
+    //可以在页面中"显示startRow到endRow 共size条数据"
+
+    //当前页面第一个元素在数据库中的行号
+    private int startRow;
+    //当前页面最后一个元素在数据库中的行号
+    private int endRow;
+    //总记录数
+    private long total;
+    //总页数
+    private int pages;
+    //结果集
+    private List<T> list;
+
+    //第一页
+    private int firstPage;
+    //前一页
+    private int prePage;
+    //下一页
+    private int nextPage;
+    //最后一页
+    private int lastPage;
+
+    //是否为第一页
+    private boolean isFirstPage = false;
+    //是否为最后一页
+    private boolean isLastPage = false;
+    //是否有前一页
+    private boolean hasPreviousPage = false;
+    //是否有下一页
+    private boolean hasNextPage = false;
+    //导航页码数
+    private int navigatePages;
+    //所有导航页号
+    private int[] navigatepageNums;
+
+    /**
+     * 包装Page对象
+     *
+     * @param list
+     */
+    public PageInfo(List<T> list) {
+        this(list, 8);
+    }
+
+    /**
+     * 包装Page对象
+     *
+     * @param list          page结果
+     * @param navigatePages 页码数量
+     */
+    public PageInfo(List<T> list, int navigatePages) {
+        if (list instanceof Page) {
+            Page page = (Page) list;
+            this.pageNum = page.getPageNum();
+            this.pageSize = page.getPageSize();
+
+            this.total = page.getTotal();
+            this.pages = page.getPages();
+            this.list = page;
+            this.size = page.size();
+            //由于结果是>startRow的,所以实际的需要+1
+            if (this.size == 0) {
+                this.startRow = 0;
+                this.endRow = 0;
+            } else {
+                this.startRow = page.getStartRow() + 1;
+                //计算实际的endRow(最后一页的时候特殊)
+                this.endRow = this.startRow - 1 + this.size;
+            }
+            this.navigatePages = navigatePages;
+            //计算导航页
+            calcNavigatepageNums();
+            //计算前后页,第一页,最后一页
+            calcPage();
+            //判断页面边界
+            judgePageBoudary();
+        }
+    }
+
+    /**
+     * 计算导航页
+     */
+    private void calcNavigatepageNums() {
+        //当总页数小于或等于导航页码数时
+        if (pages <= navigatePages) {
+            navigatepageNums = new int[pages];
+            for (int i = 0; i < pages; i++) {
+                navigatepageNums[i] = i + 1;
+            }
+        } else { //当总页数大于导航页码数时
+            navigatepageNums = new int[navigatePages];
+            int startNum = pageNum - navigatePages / 2;
+            int endNum = pageNum + navigatePages / 2;
+
+            if (startNum < 1) {
+                startNum = 1;
+                //(最前navigatePages页
+                for (int i = 0; i < navigatePages; i++) {
+                    navigatepageNums[i] = startNum++;
+                }
+            } else if (endNum > pages) {
+                endNum = pages;
+                //最后navigatePages页
+                for (int i = navigatePages - 1; i >= 0; i--) {
+                    navigatepageNums[i] = endNum--;
+                }
+            } else {
+                //所有中间页
+                for (int i = 0; i < navigatePages; i++) {
+                    navigatepageNums[i] = startNum++;
+                }
+            }
+        }
+    }
+
+    /**
+     * 计算前后页,第一页,最后一页
+     */
+    private void calcPage() {
+        if (navigatepageNums != null && navigatepageNums.length > 0) {
+            firstPage = navigatepageNums[0];
+            lastPage = navigatepageNums[navigatepageNums.length - 1];
+            if (pageNum > 1) {
+                prePage = pageNum - 1;
+            }
+            if (pageNum < pages) {
+                nextPage = pageNum + 1;
+            }
+        }
+    }
+
+    /**
+     * 判定页面边界
+     */
+    private void judgePageBoudary() {
+        isFirstPage = pageNum == 1;
+        isLastPage = pageNum == pages;
+        hasPreviousPage = pageNum > 1;
+        hasNextPage = pageNum < pages;
+    }
+
+    public void setPageNum(int pageNum) {
+        this.pageNum = pageNum;
+    }
+
+    public int getPageNum() {
+        return pageNum;
+    }
+
+    public int getPageSize() {
+        return pageSize;
+    }
+
+    public int getSize() {
+        return size;
+    }
+
+    public int getStartRow() {
+        return startRow;
+    }
+
+    public int getEndRow() {
+        return endRow;
+    }
+
+    public long getTotal() {
+        return total;
+    }
+
+    public int getPages() {
+        return pages;
+    }
+
+    public List<T> getList() {
+        return list;
+    }
+
+    public int getFirstPage() {
+        return firstPage;
+    }
+
+    public int getPrePage() {
+        return prePage;
+    }
+
+    public int getNextPage() {
+        return nextPage;
+    }
+
+    public int getLastPage() {
+        return lastPage;
+    }
+
+    public boolean isIsFirstPage() {
+        return isFirstPage;
+    }
+
+    public boolean isIsLastPage() {
+        return isLastPage;
+    }
+
+    public boolean isHasPreviousPage() {
+        return hasPreviousPage;
+    }
+
+    public boolean isHasNextPage() {
+        return hasNextPage;
+    }
+
+    public int getNavigatePages() {
+        return navigatePages;
+    }
+
+    public int[] getNavigatepageNums() {
+        return navigatepageNums;
+    }
+
+    @Override
+    public String toString() {
+        final StringBuffer sb = new StringBuffer("PageInfo{");
+        sb.append("pageNum=").append(pageNum);
+        sb.append(", pageSize=").append(pageSize);
+        sb.append(", size=").append(size);
+        sb.append(", startRow=").append(startRow);
+        sb.append(", endRow=").append(endRow);
+        sb.append(", total=").append(total);
+        sb.append(", pages=").append(pages);
+        sb.append(", list=").append(list);
+        sb.append(", firstPage=").append(firstPage);
+        sb.append(", prePage=").append(prePage);
+        sb.append(", nextPage=").append(nextPage);
+        sb.append(", lastPage=").append(lastPage);
+        sb.append(", isFirstPage=").append(isFirstPage);
+        sb.append(", isLastPage=").append(isLastPage);
+        sb.append(", hasPreviousPage=").append(hasPreviousPage);
+        sb.append(", hasNextPage=").append(hasNextPage);
+        sb.append(", navigatePages=").append(navigatePages);
+        sb.append(", navigatepageNums=");
+        if (navigatepageNums == null){
+        	sb.append("null");
+        }else {
+            sb.append('[');
+            for (int i = 0; i < navigatepageNums.length; ++i){
+            	sb.append(i == 0 ? "" : ", ").append(navigatepageNums[i]);
+            }
+            sb.append(']');
+        }
+        sb.append('}');
+        return sb.toString();
+    }
+}

+ 419 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/cache/AppRedisCacheManager.java

@@ -0,0 +1,419 @@
+package com.gyee.frame.common.cache;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.util.CollectionUtils;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * @description: 移动端Redis缓存实现类
+ * @author: YuXD
+ * @create: 2021-01-05 10:40
+ **/
+@Getter
+@AllArgsConstructor
+public final class AppRedisCacheManager implements IGlobalCache {
+
+    private RedisTemplate<String, Object> redisTemplate;
+
+    @Override
+    public boolean expire(String key, long time) {
+        try {
+            if (time > 0) {
+                redisTemplate.expire(key, time, TimeUnit.SECONDS);
+            }
+
+            return true;
+        } catch (Exception e) {
+            e.printStackTrace();
+            return false;
+        }
+    }
+
+    @Override
+    public long getExpire(String key) {
+        return redisTemplate.getExpire(key, TimeUnit.SECONDS);
+    }
+
+    @Override
+    public boolean hasKey(String key) {
+        try {
+            return redisTemplate.hasKey(key);
+        } catch (Exception e) {
+            e.printStackTrace();
+            return false;
+        }
+    }
+
+    @Override
+    @SuppressWarnings("unchecked")
+    public void del(String... key) {
+        if (key != null && key.length > 0) {
+            if (key.length == 1) {
+                redisTemplate.delete(key[0]);
+            } else {
+                redisTemplate.delete(CollectionUtils.arrayToList(key));
+            }
+        }
+    }
+
+    @Override
+    public Object get(String key) {
+        return key == null ? null : redisTemplate.opsForValue().get(key);
+    }
+
+    @Override
+    public boolean set(String key, Object value) {
+        try {
+            redisTemplate.opsForValue().set(key, value);
+            return true;
+        } catch (Exception e) {
+            e.printStackTrace();
+            return false;
+        }
+    }
+
+    @Override
+    public boolean set(String key, Object value, long time) {
+        try {
+            if (time > 0) {
+                redisTemplate.opsForValue().set(key, value, time, TimeUnit.SECONDS);
+            } else {
+                set(key, value);
+            }
+            return true;
+        } catch (Exception e) {
+            e.printStackTrace();
+            return false;
+        }
+    }
+
+    @Override
+    public long incr(String key, long delta) {
+        if (delta < 0) {
+            throw new RuntimeException("递增因子必须大于0");
+        }
+        return redisTemplate.opsForValue().increment(key, delta);
+    }
+
+    @Override
+    public long decr(String key, long delta) {
+        if (delta < 0) {
+            throw new RuntimeException("递减因子必须大于0");
+        }
+        return redisTemplate.opsForValue().increment(key, -delta);
+    }
+
+    @Override
+    public Object hget(String key, String item) {
+        return redisTemplate.opsForHash().get(key, item);
+    }
+
+    @Override
+    public Map<Object, Object> hmget(String key) {
+        return redisTemplate.opsForHash().entries(key);
+    }
+
+    @Override
+    public boolean hmset(String key, Map<String, Object> map) {
+        try {
+            redisTemplate.opsForHash().putAll(key, map);
+            return true;
+        } catch (Exception e) {
+            e.printStackTrace();
+            return false;
+        }
+    }
+
+    @Override
+    public boolean hmset(String key, Map<String, Object> map, long time) {
+        try {
+            redisTemplate.opsForHash().putAll(key, map);
+            if (time > 0) {
+                expire(key, time);
+            }
+            return true;
+        } catch (Exception e) {
+            e.printStackTrace();
+            return false;
+        }
+    }
+
+    @Override
+    public boolean hset(String key, String item, Object value) {
+        try {
+            redisTemplate.opsForHash().put(key, item, value);
+            return true;
+        } catch (Exception e) {
+            e.printStackTrace();
+            return false;
+        }
+    }
+
+    @Override
+    public boolean hset(String key, String item, Object value, long time) {
+        try {
+            redisTemplate.opsForHash().put(key, item, value);
+            if (time > 0) {
+                expire(key, time);
+            }
+            return true;
+        } catch (Exception e) {
+            e.printStackTrace();
+            return false;
+        }
+    }
+
+    @Override
+    public void hdel(String key, Object... item) {
+        redisTemplate.opsForHash().delete(key, item);
+    }
+
+    @Override
+    public boolean hHasKey(String key, String item) {
+        return redisTemplate.opsForHash().hasKey(key, item);
+    }
+
+    @Override
+    public double hincr(String key, String item, double by) {
+        return redisTemplate.opsForHash().increment(key, item, by);
+    }
+
+    @Override
+    public double hdecr(String key, String item, double by) {
+        return redisTemplate.opsForHash().increment(key, item, -by);
+    }
+
+    @Override
+    public Set<Object> sGet(String key) {
+        try {
+            return redisTemplate.opsForSet().members(key);
+        } catch (Exception e) {
+            e.printStackTrace();
+            return null;
+        }
+    }
+
+    @Override
+    public boolean sHasKey(String key, Object value) {
+        try {
+            return redisTemplate.opsForSet().isMember(key, value);
+        } catch (Exception e) {
+            e.printStackTrace();
+            return false;
+        }
+    }
+
+    @Override
+    public long sSet(String key, Object... values) {
+        try {
+            return redisTemplate.opsForSet().add(key, values);
+        } catch (Exception e) {
+            e.printStackTrace();
+            return 0;
+        }
+    }
+
+    @Override
+    public long sSetAndTime(String key, long time, Object... values) {
+        try {
+            Long count = redisTemplate.opsForSet().add(key, values);
+            if (time > 0) {
+                expire(key, time);
+            }
+            return count;
+        } catch (Exception e) {
+            e.printStackTrace();
+            return 0;
+        }
+    }
+
+    @Override
+    public long sGetSetSize(String key) {
+        try {
+            return redisTemplate.opsForSet().size(key);
+        } catch (Exception e) {
+            e.printStackTrace();
+            return 0;
+        }
+    }
+
+    @Override
+    public long setRemove(String key, Object... values) {
+        try {
+            Long count = redisTemplate.opsForSet().remove(key, values);
+            return count;
+        } catch (Exception e) {
+            e.printStackTrace();
+            return 0;
+        }
+    }
+
+    @Override
+    public List<Object> lGet(String key, long start, long end) {
+        try {
+            return redisTemplate.opsForList().range(key, start, end);
+        } catch (Exception e) {
+            e.printStackTrace();
+            return null;
+        }
+    }
+
+    @Override
+    public long lGetListSize(String key) {
+        try {
+            return redisTemplate.opsForList().size(key);
+        } catch (Exception e) {
+            e.printStackTrace();
+            return 0;
+        }
+    }
+
+    @Override
+    public Object lGetIndex(String key, long index) {
+        try {
+            return redisTemplate.opsForList().index(key, index);
+        } catch (Exception e) {
+            e.printStackTrace();
+            return null;
+        }
+    }
+
+    @Override
+    public boolean lSetAll(String key, List<Object> value) {
+        try {
+            redisTemplate.opsForList().leftPushAll(key, value);
+            return true;
+        } catch (Exception e) {
+            e.printStackTrace();
+            return false;
+        }
+    }
+
+    @Override
+    public boolean lSet(String key, Object value) {
+        try {
+            redisTemplate.opsForList().leftPushIfPresent(key, value);
+            return true;
+        } catch (Exception e) {
+            e.printStackTrace();
+            return false;
+        }
+    }
+
+    @Override
+    public boolean lSet(String key, Object value, long time) {
+        try {
+            redisTemplate.opsForList().leftPush(key, value);
+            if (time > 0) {
+                expire(key, time);
+            }
+            return true;
+        } catch (Exception e) {
+            e.printStackTrace();
+            return false;
+        }
+
+    }
+
+    @Override
+    public boolean lSetAll(String key, List<Object> value, long time) {
+        try {
+            redisTemplate.opsForList().leftPushAll(key, value);
+            if (time > 0)
+                expire(key, time);
+            return true;
+        } catch (Exception e) {
+            e.printStackTrace();
+            return false;
+        }
+    }
+
+    @Override
+    public boolean rSet(String key, Object value) {
+        try {
+            redisTemplate.opsForList().rightPush(key, value);
+            return true;
+        } catch (Exception e) {
+            e.printStackTrace();
+            return false;
+        }
+    }
+
+    @Override
+    public boolean rSet(String key, Object value, long time) {
+        try {
+            redisTemplate.opsForList().rightPush(key, value);
+            if (time > 0) {
+                expire(key, time);
+            }
+            return true;
+        } catch (Exception e) {
+            e.printStackTrace();
+            return false;
+        }
+
+    }
+
+    @Override
+    public boolean rSetAll(String key, List<Object> value) {
+        try {
+            redisTemplate.opsForList().rightPushAll(key, value);
+            return true;
+        } catch (Exception e) {
+            e.printStackTrace();
+            return false;
+        }
+
+    }
+
+    @Override
+    public boolean rSetAll(String key, List<Object> value, long time) {
+        try {
+            redisTemplate.opsForList().rightPushAll(key, value);
+            if (time > 0)
+                expire(key, time);
+            return true;
+        } catch (Exception e) {
+            e.printStackTrace();
+            return false;
+        }
+    }
+
+    @Override
+    public boolean lUpdateIndex(String key, long index, Object value) {
+        try {
+            redisTemplate.opsForList().set(key, index, value);
+            return true;
+        } catch (Exception e) {
+            e.printStackTrace();
+            return false;
+        }
+    }
+
+    @Override
+    public long lRemove(String key, long count, Object value) {
+        try {
+            Long remove = redisTemplate.opsForList().remove(key, count, value);
+            return remove;
+        } catch (Exception e) {
+            e.printStackTrace();
+            return 0;
+        }
+    }
+
+    @Override
+    public void rangeRemove(String key, Long stard, Long end) {
+        try {
+            redisTemplate.opsForList().trim(key, stard, end);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+}

+ 46 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/cache/ApplicationContextHolder.java

@@ -0,0 +1,46 @@
+package com.gyee.frame.common.cache;
+import org.springframework.beans.BeansException;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.ApplicationContextAware;
+import org.springframework.stereotype.Component;
+
+@Component
+public class ApplicationContextHolder implements ApplicationContextAware {
+    private static ApplicationContext applicationContext;
+
+    @Override
+    public void setApplicationContext(ApplicationContext ctx) throws BeansException {
+        applicationContext = ctx;
+    }
+
+    /**
+     * Get application context from everywhere
+     *
+     * @return
+     */
+    public static ApplicationContext getApplicationContext() {
+        return applicationContext;
+    }
+
+    /**
+     * Get bean by class
+     *
+     * @param clazz
+     * @param <T>
+     * @return
+     */
+    public static <T> T getBean(Class<T> clazz) {
+        return applicationContext.getBean(clazz);
+    }
+
+    /**
+     * Get bean by class name
+     *
+     * @param name
+     * @param <T>
+     * @return
+     */
+    public static <T> T getBean(String name) {
+        return (T) applicationContext.getBean(name);
+    }
+}

+ 383 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/cache/IGlobalCache.java

@@ -0,0 +1,383 @@
+package com.gyee.frame.common.cache;
+
+import org.springframework.data.redis.core.RedisTemplate;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * 系统全局Cache接口,具体缓存方式需要实现该接口
+ *
+ * @author YuXD
+ * @date 2021-01-05 10:38
+ * @since v1.0
+ */
+public interface IGlobalCache {
+
+    /**
+     * 指定缓存失效时间
+     *
+     * @param key  键
+     * @param time 时间(秒)
+     * @return
+     */
+    boolean expire(String key, long time);
+
+    /**
+     * @param key 键 不能为null
+     * @return 时间(秒) 返回0代表为永久有效
+     */
+    long getExpire(String key);
+
+    /**
+     * 判断key是否存在
+     *
+     * @param key 键
+     * @return true 存在 false不存在
+     */
+    boolean hasKey(String key);
+
+    /**
+     * 删除缓存
+     *
+     * @param key 可以传一个值 或多个
+     */
+    void del(String... key);
+// ============================String=============================
+
+    /**
+     * 普通缓存获取
+     *
+     * @param key 键
+     * @return 值
+     */
+    Object get(String key);
+
+    /**
+     * 普通缓存放入
+     *
+     * @param key   键
+     * @param value 值
+     * @return true成功 false失败
+     */
+    boolean set(String key, Object value);
+
+    /**
+     * 普通缓存放入并设置时间
+     *
+     * @param key   键
+     * @param value 值
+     * @param time  时间(秒) time要大于0 如果time小于等于0 将设置无限期
+     * @return true成功 false 失败
+     */
+    boolean set(String key, Object value, long time);
+
+    /**
+     * 递增
+     *
+     * @param key   键
+     * @param delta 要增加几(大于0)
+     * @return
+     */
+    long incr(String key, long delta);
+
+    /**
+     * 递减
+     *
+     * @param key   键
+     * @param delta 要减少几(小于0)
+     * @return
+     */
+    long decr(String key, long delta);
+
+    /**
+     * HashGet
+     *
+     * @param key  键 不能为null
+     * @param item 项 不能为null
+     * @return 值
+     */
+    Object hget(String key, String item);
+
+    /**
+     * 获取hashKey对应的所有键值
+     *
+     * @param key 键
+     * @return 对应的多个键值
+     */
+    Map<Object, Object> hmget(String key);
+
+    /**
+     * HashSet
+     *
+     * @param key 键
+     * @param map 对应多个键值
+     * @return true 成功 false 失败
+     */
+    boolean hmset(String key, Map<String, Object> map);
+
+    /**
+     * HashSet 并设置时间
+     *
+     * @param key  键
+     * @param map  对应多个键值
+     * @param time 时间(秒)
+     * @return true成功 false失败
+     */
+    boolean hmset(String key, Map<String, Object> map, long time);
+
+    /**
+     * 向一张hash表中放入数据,如果不存在将创建
+     *
+     * @param key   键
+     * @param item  项
+     * @param value 值
+     * @return true 成功 false失败
+     */
+    boolean hset(String key, String item, Object value);
+
+    /**
+     * 向一张hash表中放入数据,如果不存在将创建
+     *
+     * @param key   键
+     * @param item  项
+     * @param value 值
+     * @param time  时间(秒) 注意:如果已存在的hash表有时间,这里将会替换原有的时间
+     * @return true 成功 false失败
+     */
+    boolean hset(String key, String item, Object value, long time);
+
+    /**
+     * 删除hash表中的值
+     *
+     * @param key  键 不能为null
+     * @param item 项 可以使多个 不能为null
+     */
+    void hdel(String key, Object... item);
+
+    /**
+     * 判断hash表中是否有该项的值
+     *
+     * @param key  键 不能为null
+     * @param item 项 不能为null
+     * @return true 存在 false不存在
+     */
+    boolean hHasKey(String key, String item);
+
+    /**
+     * hash递增 如果不存在,就会创建一个 并把新增后的值返回
+     *
+     * @param key  键
+     * @param item 项
+     * @param by   要增加几(大于0)
+     * @return
+     */
+    double hincr(String key, String item, double by);
+
+    /**
+     * hash递减
+     *
+     * @param key  键
+     * @param item 项
+     * @param by   要减少记(小于0)
+     * @return
+     */
+    double hdecr(String key, String item, double by);
+
+    /**
+     * 根据key获取Set中的所有值
+     *
+     * @param key 键
+     * @return
+     */
+    Set<Object> sGet(String key);
+
+    /**
+     * 根据value从一个set中查询,是否存在
+     *
+     * @param key   键
+     * @param value 值
+     * @return true 存在 false不存在
+     */
+    boolean sHasKey(String key, Object value);
+
+    /**
+     * 将数据放入set缓存
+     *
+     * @param key    键
+     * @param values 值 可以是多个
+     * @return 成功个数
+     */
+    long sSet(String key, Object... values);
+
+    /**
+     * 将set数据放入缓存
+     *
+     * @param key    键
+     * @param time   时间(秒)
+     * @param values 值 可以是多个
+     * @return 成功个数
+     */
+    long sSetAndTime(String key, long time, Object... values);
+
+
+    /**
+     * 获取set缓存的长度
+     *
+     * @param key 键
+     * @return
+     */
+    long sGetSetSize(String key);
+
+    /**
+     * 移除值为value的
+     *
+     * @param key    键
+     * @param values 值 可以是多个
+     * @return 移除的个数
+     */
+    long setRemove(String key, Object... values);
+
+    /**
+     * 获取list缓存的内容
+     *
+     * @param key   键
+     * @param start 开始
+     * @param end   结束 0 到 -1代表所有值
+     * @return
+     */
+    List<Object> lGet(String key, long start, long end);
+
+    /**
+     * 获取list缓存的长度
+     *
+     * @param key 键
+     * @return
+     */
+    long lGetListSize(String key);
+
+    /**
+     * 通过索引 获取list中的值
+     *
+     * @param key   键
+     * @param index 索引 index>=0时, 0 表头,1 第二个元素,依次类推;index<0时,-1,表尾,-2倒数第二个元素,依次类推
+     * @return
+     */
+    Object lGetIndex(String key, long index);
+
+    /**
+     * 将list放入缓存
+     *
+     * @param key   键
+     * @param value 值
+     * @return
+     */
+    boolean lSet(String key, Object value);
+
+    /**
+     * 将list放入缓存
+     *
+     * @param key   键
+     * @param value 值
+     * @return
+     */
+    boolean lSet(String key, Object value, long time);
+
+    /**
+     * 将list放入缓存
+     *
+     * @param key   键
+     * @param value 值
+     * @return
+     */
+    boolean lSetAll(String key, List<Object> value);
+
+
+    /**
+     * 将list放入缓存
+     *
+     * @param key   键
+     * @param value 值
+     * @param time  时间(秒)
+     * @return
+     */
+    boolean lSetAll(String key, List<Object> value, long time);
+
+    /**
+     * 将list放入缓存
+     *
+     * @param key   键
+     * @param value 值
+     * @return
+     */
+
+    boolean rSet(String key, Object value);
+
+    /**
+     * 将list放入缓存
+     *
+     * @param key   键
+     * @param value 值
+     * @param time  时间(秒)
+     * @return
+     */
+
+    boolean rSet(String key, Object value, long time);
+
+    /**
+     * 将list放入缓存
+     *
+     * @param key   键
+     * @param value 值
+     * @return
+     */
+    boolean rSetAll(String key, List<Object> value);
+
+    /**
+     * 将list放入缓存
+     *
+     * @param key   键
+     * @param value 值
+     * @param time  时间(秒)
+     * @return
+     */
+    boolean rSetAll(String key, List<Object> value, long time);
+
+    /**
+     * 根据索引修改list中的某条数据
+     *
+     * @param key   键
+     * @param index 索引
+     * @param value 值
+     * @return
+     */
+    boolean lUpdateIndex(String key, long index, Object value);
+
+    /**
+     * 移除N个值为value
+     *
+     * @param key   键
+     * @param count 移除多少个
+     * @param value 值
+     * @return 移除的个数
+     */
+    long lRemove(String key, long count, Object value);
+
+    /**
+     * 从redis集合中移除[start,end]之间的元素
+     *
+     * @param key
+     * @param stard
+     * @param end
+     * @return
+     */
+    void rangeRemove(String key, Long stard, Long end);
+
+    /**
+     * 返回当前redisTemplate
+     *
+     * @return
+     */
+    RedisTemplate getRedisTemplate();
+}

+ 72 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/cache/MybatisRedisCache.java

@@ -0,0 +1,72 @@
+//package com.gyee.frame.common.cache;
+//
+//import org.slf4j.Logger;
+//import org.slf4j.LoggerFactory;
+//import org.springframework.data.redis.core.RedisTemplate;
+//import org.apache.ibatis.cache.Cache;
+//import java.util.concurrent.locks.ReadWriteLock;
+//import java.util.concurrent.locks.ReentrantReadWriteLock;
+//
+//public class MybatisRedisCache implements Cache {
+//    private static final Logger log = LoggerFactory.getLogger(MybatisRedisCache.class);
+//    private String id;
+//    private final ReadWriteLock readWriteLock = new ReentrantReadWriteLock();
+//    //private static final long EXPIRE_TIME_IN_MINUTES = 30; // redis过期时间
+//
+//
+//    public MybatisRedisCache(String id) {
+//        this.id = id;
+//    }
+//
+//    private RedisTemplate<Object, Object> getRedisTemplate(){
+//        return ApplicationContextHolder.getBean("redisTemplate");
+//    }
+//
+//    @Override
+//    public String getId() {
+//        return id;
+//    }
+//
+//    @Override
+//    public void putObject(Object key, Object value) {
+//        RedisTemplate redisTemplate = getRedisTemplate();
+//        redisTemplate.boundHashOps(getId()).put(key, value);
+//        log.info("[结果放入到缓存中: " + key + "=" + value+" ]");
+//
+//    }
+//
+//    @Override
+//    public Object getObject(Object key) {
+//        RedisTemplate redisTemplate = getRedisTemplate();
+//        Object value = redisTemplate.boundHashOps(getId()).get(key);
+//        log.info("[从缓存中获取了: " + key + "=" + value+" ]");
+//        return value;
+//    }
+//
+//    @Override
+//    public Object removeObject(Object key) {
+//        RedisTemplate redisTemplate = getRedisTemplate();
+//        Object value = redisTemplate.boundHashOps(getId()).delete(key);
+//        log.info("[从缓存删除了: " + key + "=" + value+" ]");
+//        return value;
+//    }
+//
+//    @Override
+//    public void clear() {
+//        RedisTemplate redisTemplate = getRedisTemplate();
+//        redisTemplate.delete(getId());
+//        log.info("清空缓存!!!");
+//    }
+//
+//    @Override
+//    public int getSize() {
+//        RedisTemplate redisTemplate = getRedisTemplate();
+//        Long size = redisTemplate.boundHashOps(getId()).size();
+//        return size == null ? 0 : size.intValue();
+//    }
+//
+//    @Override
+//    public ReadWriteLock getReadWriteLock() {
+//        return readWriteLock;
+//    }
+//}

+ 105 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/cache/RedisConfig.java

@@ -0,0 +1,105 @@
+package com.gyee.frame.common.cache;
+
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.cache.annotation.EnableCaching;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Primary;
+import org.springframework.data.redis.connection.RedisConnectionFactory;
+import org.springframework.data.redis.connection.RedisStandaloneConfiguration;
+import org.springframework.data.redis.connection.jedis.JedisClientConfiguration;
+import org.springframework.data.redis.connection.jedis.JedisConnectionFactory;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer;
+import org.springframework.data.redis.serializer.StringRedisSerializer;
+import redis.clients.jedis.JedisPool;
+import redis.clients.jedis.JedisPoolConfig;
+
+@EnableCaching
+@Configuration
+public class RedisConfig {
+
+    @Value("${spring.redis.host}")
+    private String host;
+    @Value("${spring.redis.database}")
+    private Integer database;
+    @Value("${spring.redis.port}")
+    private Integer port;
+    @Value("${spring.redis.password}")
+    private String pwd;
+
+    @Value("${spring.redis.pool.maxTotal}")
+    private Integer maxTotal;
+    @Value("${spring.redis.pool.maxIdle}")
+    private Integer maxIdle;
+    @Value("${spring.redis.pool.minIdle}")
+    private Integer minIdle;
+    @Value("${spring.redis.pool.maxwait}")
+    private Integer maxwait;
+
+    @Primary
+    @Bean(name = "jedisPoolConfig")
+    @ConfigurationProperties(prefix = "spring.redis.pool")
+    public JedisPoolConfig jedisPoolConfig() {
+        JedisPoolConfig jedisPoolConfig = new JedisPoolConfig();
+        jedisPoolConfig.setMaxTotal(maxTotal);
+        jedisPoolConfig.setMaxIdle(maxIdle);
+        jedisPoolConfig.setMinIdle(minIdle);
+        jedisPoolConfig.setMaxWaitMillis(maxwait);
+        return jedisPoolConfig;
+    }
+
+    @Primary
+    @Bean(name = "jedisPool")
+    public JedisPool redisPoolFactory(JedisPoolConfig jedisPoolConfig){
+
+        JedisPool jedisPool = new JedisPool(jedisPoolConfig,host,port,maxwait,pwd);
+
+        return  jedisPool;
+    }
+
+
+    @Bean
+    public RedisConnectionFactory redisConnectionFactory(JedisPoolConfig jedisPoolConfig) {
+        RedisStandaloneConfiguration redisStandaloneConfiguration = new RedisStandaloneConfiguration();
+        redisStandaloneConfiguration.setHostName(host);
+        redisStandaloneConfiguration.setDatabase(database);
+        redisStandaloneConfiguration.setPassword(pwd);
+        redisStandaloneConfiguration.setPort(port);
+        redisStandaloneConfiguration.setDatabase(database);
+
+        JedisClientConfiguration.JedisPoolingClientConfigurationBuilder jpcb = (JedisClientConfiguration.JedisPoolingClientConfigurationBuilder) JedisClientConfiguration.builder();
+        jpcb.poolConfig(jedisPoolConfig);
+        JedisClientConfiguration jedisClientConfiguration = jpcb.build();
+        return new JedisConnectionFactory(redisStandaloneConfiguration, jedisClientConfiguration);
+    }
+
+    /**
+     * 配置redisTemplate针对不同key和value场景下不同序列化的方式
+     *
+     * @param factory Redis连接工厂
+     * @return
+     */
+    @Primary
+    @Bean(name = "redisTemplate")
+    public RedisTemplate<String, Object> redisTemplate(RedisConnectionFactory factory) {
+        RedisTemplate<String, Object> template = new RedisTemplate<>();
+        template.setConnectionFactory(factory);
+        StringRedisSerializer stringRedisSerializer = new StringRedisSerializer();
+        template.setKeySerializer(stringRedisSerializer);
+        template.setHashKeySerializer(stringRedisSerializer);
+        Jackson2JsonRedisSerializer redisSerializer = new Jackson2JsonRedisSerializer(Object.class);
+        template.setValueSerializer(redisSerializer);
+        template.setHashValueSerializer(redisSerializer);
+        template.afterPropertiesSet();
+
+        return template;
+    }
+
+    @Bean(name = "globalCache")
+    IGlobalCache cache(RedisTemplate redisTemplate) {
+        return new AppRedisCacheManager(redisTemplate);
+    }
+
+}

+ 115 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/cache/RedisSessionDao.java

@@ -0,0 +1,115 @@
+package com.gyee.frame.common.cache;
+
+import org.apache.shiro.session.Session;
+import org.apache.shiro.session.UnknownSessionException;
+import org.apache.shiro.session.mgt.eis.EnterpriseCacheSessionDAO;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.io.Serializable;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.Set;
+import java.util.concurrent.TimeUnit;
+import java.util.stream.Collectors;
+
+/**
+ * Created by Administrator on 2018/7/31.
+ */
+@Service
+public class RedisSessionDao extends EnterpriseCacheSessionDAO {
+    // Session超时时间,单位为毫秒
+    private long expireTime = 120000;
+
+    private String prefix="session_";
+  @Resource
+  private RedisTemplate<String,Object>  redisTemplate;// Redis操作类,对这个使用不熟悉的,可以参考前面的博客
+
+    public RedisSessionDao() {
+        super();
+    }
+
+    public RedisSessionDao(long expireTime, RedisTemplate redisTemplate) {
+        super();
+        this.expireTime = expireTime;
+        this.redisTemplate = redisTemplate;
+    }
+
+    @Override // 更新session
+    public void update(Session session) throws UnknownSessionException {
+        System.out.println("===============update================");
+        if (session == null || session.getId() == null) {
+            return;
+        }
+        session.setTimeout(expireTime);
+        redisTemplate.opsForValue().set(prefix+session.getId(), session, expireTime, TimeUnit.MILLISECONDS);
+    }
+
+    @Override // 删除session
+    public void delete(Session session) {
+        System.out.println("===============delete================");
+        if (null == session) {
+            return;
+        }
+        redisTemplate.opsForValue().getOperations().delete(prefix+session.getId());
+    }
+
+    @Override
+// 获取活跃的session,可以用来统计在线人数,如果要实现这个功能,可以在将session加入redis时指定一个session前缀,统计的时候则使用keys("session-prefix*")的方式来模糊查找redis中所有的session集合
+    public Collection<Session> getActiveSessions() {
+        Set<String> keys = this.redisTemplate.keys(this.prefix + "*");
+
+        if (keys != null && !keys.isEmpty()) {
+            List<Object> sessions = this.redisTemplate.opsForValue().multiGet(keys);
+            if (sessions != null) {
+                return sessions.stream().map(o -> (Session) o).collect(Collectors.toList());
+            }
+        }
+        return Collections.emptySet();
+    }
+
+    @Override// 加入session
+    protected Serializable doCreate(Session session) {
+        System.out.println("===============doCreate================");
+        Serializable sessionId = this.generateSessionId(session);
+        this.assignSessionId(session, sessionId);
+
+        redisTemplate.opsForValue().set(prefix+session.getId(), session, expireTime, TimeUnit.MILLISECONDS);
+        return sessionId;
+    }
+
+    @Override// 读取session
+    protected Session doReadSession(Serializable sessionId) {
+        System.out.println("==============doReadSession=================");
+        if (sessionId == null) {
+            return null;
+        }
+        Session session=null;
+        try {
+            return (Session) redisTemplate.opsForValue().get(prefix+sessionId);
+        }catch (ClassCastException e)
+        {
+            System.out.println("系统初始化中,请稍等。。。。。");
+        }
+      return session;
+    }
+
+    public long getExpireTime() {
+        return expireTime;
+    }
+
+    public void setExpireTime(long expireTime) {
+        this.expireTime = expireTime;
+    }
+
+    public RedisTemplate getRedisTemplate() {
+        return redisTemplate;
+    }
+
+    public void setRedisTemplate(RedisTemplate redisTemplate) {
+        this.redisTemplate = redisTemplate;
+
+    }
+}

+ 31 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/cache/RedisUtils.java

@@ -0,0 +1,31 @@
+package com.gyee.frame.common.cache;
+
+import org.springframework.stereotype.Service;
+import redis.clients.jedis.Jedis;
+import redis.clients.jedis.JedisPool;
+
+import javax.annotation.Resource;
+@Service
+public class RedisUtils {
+
+    @Resource
+    private  JedisPool jedisPool;
+
+
+
+    public  String get(String key, int indexdb) {
+        Jedis jedis = null;
+        String value = null;
+
+        try {
+            jedis = jedisPool.getResource();//获取一个jedis实例
+            jedis.select(indexdb);
+            value = jedis.get(key);
+        } catch (Exception e) {
+        System.out.println(e.getMessage());
+        } finally {
+            jedis.close();
+        }
+        return value;
+    }
+}

+ 13 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/conf/AjaxStatus.java

@@ -0,0 +1,13 @@
+package com.gyee.frame.common.conf;
+
+public enum  AjaxStatus {
+    success(200),
+    error(500),
+    logineroor(501),
+    loginexpire(502);
+
+    public int code;
+    AjaxStatus(int c) {
+        code = c;
+    }
+}

+ 25 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/conf/ExportConfig.java

@@ -0,0 +1,25 @@
+package com.gyee.frame.common.conf;
+
+import lombok.Data;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 庚顿数据导出配置
+ */
+@Data
+@Component
+@ConfigurationProperties(prefix = "exportcode")
+public class ExportConfig {
+
+    private List<String> template1;
+
+    private Map<String, String> template2swdl;
+
+    private Map<String, String> template2swgl;
+
+    private Map<String, String> template2cft;
+}

+ 30 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/conf/FileConfig.java

@@ -0,0 +1,30 @@
+package com.gyee.frame.common.conf;
+
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.stereotype.Component;
+
+/**
+ * 读取项目相关配置
+ * 
+ * @author gyee
+ */
+@Component
+@ConfigurationProperties(prefix = "spring.servlet.multipart")
+public class FileConfig
+{
+    /**单个文件大小*/
+    private static String maxFileSize;
+
+	public static String getMaxFileSize() {
+		maxFileSize=maxFileSize.replace("MB", "");
+		return maxFileSize;
+	}
+
+	public void setMaxFileSize(String maxFileSize) {
+		FileConfig.maxFileSize = maxFileSize;
+	}
+   
+	
+	
+	
+}

+ 85 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/conf/KaptchaConfig.java

@@ -0,0 +1,85 @@
+package com.gyee.frame.common.conf;
+
+import java.util.Properties;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import com.google.code.kaptcha.impl.DefaultKaptcha;
+import com.google.code.kaptcha.util.Config;
+
+/**
+ * 谷歌验证码配置文件
+ * @author gyee
+ * @date: 2018年9月12日 上午11:02:13
+ */
+@Configuration
+public class KaptchaConfig {
+	 @Bean(name = "captchaProducer")
+	    public DefaultKaptcha getKaptchaBean()
+	    {
+	        DefaultKaptcha defaultKaptcha = new DefaultKaptcha();
+	        Properties properties = new Properties();
+	        //是否有边框  默认为true  我们可以自己设置yes,no  
+	        properties.setProperty("kaptcha.border", "yes");
+	        //边框颜色   默认为Color.BLACK  
+	        properties.setProperty("kaptcha.border.color", "105,179,90");
+	        //验证码文本字符颜色  默认为Color.BLACK  
+	        properties.setProperty("kaptcha.textproducer.font.color", "blue");
+	        //验证码图片宽度  默认为200
+	        properties.setProperty("kaptcha.image.width", "200");
+	        //验证码图片高度  默认为50
+	        properties.setProperty("kaptcha.image.height", "50");
+	        // 验证码文本字符大小  默认为40
+	        properties.setProperty("kaptcha.textproducer.font.size", "40");
+	        //session key
+	        properties.setProperty("kaptcha.session.key", "kaptchaCode");
+	        // 验证码文本字符间距  默认为2  
+	        properties.setProperty("kaptcha.textproducer.char.spac", "35");
+	        //验证码文本字符长度  默认为5  
+	        properties.setProperty("kaptcha.textproducer.char.length", "4");
+	        //验证码文本字体样式  默认为new Font("Arial", 1, fontSize), new Font("Courier", 1, fontSize) 
+	        properties.setProperty("kaptcha.textproducer.font.names", "Arial,Courier");
+	        //验证码噪点颜色   默认为Color.BLACK  
+	        properties.setProperty("kaptcha.noise.color", "white");
+	        Config config = new Config(properties);
+	        defaultKaptcha.setConfig(config);
+	        return defaultKaptcha;
+	    }
+
+	    @Bean(name = "captchaProducerMath")
+	    public DefaultKaptcha getKaptchaBeanMath()
+	    {
+	        DefaultKaptcha defaultKaptcha = new DefaultKaptcha();
+	        Properties properties = new Properties();
+	        //是否有边框 默认为true 我们可以自己设置yes,no
+	        properties.setProperty("kaptcha.border", "yes");
+	        //边框颜色 默认为Color.BLACK
+	        properties.setProperty("kaptcha.border.color", "158,167,179");
+	        //验证码文本字符颜色 默认为Color.BLACK
+	        properties.setProperty("kaptcha.textproducer.font.color", "blue");
+	        //验证码图片宽度 默认为200
+	        properties.setProperty("kaptcha.image.width", "100");
+	        //验证码图片高度 默认为50
+	        properties.setProperty("kaptcha.image.height", "30");
+	        //验证码文本字符大小 默认为40
+	        properties.setProperty("kaptcha.textproducer.font.size", "30");
+	        //KAPTCHA_SESSION_KEY
+	        properties.setProperty("kaptcha.session.key", "kaptchaCodeMath");
+	        //验证码文本生成器
+	        properties.setProperty("kaptcha.textproducer.impl", "com.gyee.frame.common.support.KaptchaTextCreator");
+	        //验证码文本字符间距 默认为2
+	        properties.setProperty("kaptcha.textproducer.char.spac", "5");
+	        //验证码文本字符长度 默认为5
+	        properties.setProperty("kaptcha.textproducer.char.length", "6");
+	        //验证码文本字体样式 默认为new Font("Arial", 1, fontSize), new Font("Courier", 1, fontSize)
+	        properties.setProperty("kaptcha.textproducer.font.names", "Arial,Courier");
+	        //验证码噪点颜色 默认为Color.BLACK
+	        properties.setProperty("kaptcha.noise.color", "white");
+	        //干扰实现类
+	        properties.setProperty("kaptcha.noise.impl", "com.google.code.kaptcha.impl.NoNoise");
+	        //图片样式 水纹com.google.code.kaptcha.impl.WaterRipple 鱼眼com.google.code.kaptcha.impl.FishEyeGimpy 阴影com.google.code.kaptcha.impl.ShadowGimpy
+	        properties.setProperty("kaptcha.obscurificator.impl", "com.google.code.kaptcha.impl.ShadowGimpy");
+	        Config config = new Config(properties);
+	        defaultKaptcha.setConfig(config);
+	        return defaultKaptcha;
+	    }
+}

+ 99 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/conf/MybatisConfig.java

@@ -0,0 +1,99 @@
+package com.gyee.frame.common.conf;
+
+import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceBuilder;
+import com.gyee.frame.common.dataSources.DataSourceType;
+import com.gyee.frame.common.dataSources.DynamicDataSource;
+import org.apache.ibatis.session.SqlSessionFactory;
+import org.mybatis.spring.SqlSessionFactoryBean;
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Primary;
+import org.springframework.core.io.Resource;
+import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
+import org.springframework.jdbc.datasource.DataSourceTransactionManager;
+import org.springframework.transaction.PlatformTransactionManager;
+
+import javax.sql.DataSource;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Mybatis多数据源配置
+ * 参考文章:https://www.cnblogs.com/geekdc/p/10963476.html
+ * @ClassName: MybatisConfig
+ * @author gyee
+ * @date 2019-12-06 21:11
+ */
+@Configuration
+@MapperScan(basePackages = "com.gyee.frame.mapper")
+public class MybatisConfig {
+
+    @Bean(name = "master")
+    @ConfigurationProperties("spring.datasource.druid.master")
+    public DataSource masterDataSource()
+    {
+        return DruidDataSourceBuilder.create().build();
+    }
+
+    @Bean(name = "slave")
+    @ConfigurationProperties("spring.datasource.druid.slave")
+//    @ConditionalOnProperty(prefix = "spring.datasource.druid.slave", name = "enabled", havingValue = "true")
+    public DataSource slaveDataSource()
+    {
+        return DruidDataSourceBuilder.create().build();
+    }
+
+    @Bean(name = "ticket")
+    @ConfigurationProperties("spring.datasource.druid.ticket")
+//    @ConditionalOnProperty(prefix = "spring.datasource.druid.ticket", name = "enabled", havingValue = "true")
+    public DataSource ticketDataSource()
+    {
+        return DruidDataSourceBuilder.create().build();
+    }
+    @Bean(name = "dynamicDataSource")
+    @Primary
+    public DynamicDataSource dataSource(@Qualifier("master")DataSource masterDataSource, @Qualifier("slave")DataSource slaveDataSource)
+    {
+        Map<Object, Object> targetDataSources = new HashMap<>();
+        targetDataSources.put(DataSourceType.MASTER.name(), masterDataSource);
+    	targetDataSources.put(DataSourceType.SLAVE.name(),slaveDataSource);
+        return new DynamicDataSource(masterDataSource(), targetDataSources);
+    }
+
+    @Bean(name = "dynamicDataSource")
+    @Primary
+    public DynamicDataSource dataSource(@Qualifier("master")DataSource masterDataSource, @Qualifier("slave")DataSource slaveDataSource, @Qualifier("ticket")DataSource ticketDataSource)
+    {
+        Map<Object, Object> targetDataSources = new HashMap<>();
+        targetDataSources.put(DataSourceType.MASTER.name(), masterDataSource);
+        targetDataSources.put(DataSourceType.SLAVE.name(),slaveDataSource);
+        targetDataSources.put(DataSourceType.TICKET.name(),ticketDataSource);
+        return new DynamicDataSource(masterDataSource(), targetDataSources);
+    }
+
+    @Bean
+    public SqlSessionFactory sqlSessionFactory(DynamicDataSource dynamicDataSource) throws Exception {
+        SqlSessionFactoryBean factoryBean = new SqlSessionFactoryBean();
+        factoryBean.setDataSource(dynamicDataSource);
+//        factoryBean.setTypeAliasesPackage();
+        // 设置mapper.xml的位置路径
+        Resource[] resources = new PathMatchingResourcePatternResolver().getResources("classpath*:mybatis/*/*.xml");
+        factoryBean.setMapperLocations(resources);
+        return factoryBean.getObject();
+    }
+    
+    /**
+     * 配置@Transactional注解事务
+     * @param dynamicDataSource
+     * @return
+     * @author gyee
+     * @Date 2019年12月7日 上午11:31:33
+     */
+    @Bean
+    public PlatformTransactionManager transactionManager(DynamicDataSource dynamicDataSource){
+        return new DataSourceTransactionManager(dynamicDataSource);
+    }
+}

+ 34 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/conf/PageHelperConf.java

@@ -0,0 +1,34 @@
+package com.gyee.frame.common.conf;
+
+import java.util.Properties;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import com.github.pagehelper.PageHelper;
+
+/**
+* 分页插件配置类
+* @ClassName: PageHelperConf
+* @Description: 这里用一句话描述这个类的作用
+* @author gyee
+* @date 2018年6月3日
+*
+ */
+@Configuration
+public class PageHelperConf {
+
+    /**
+     * 分页插件处理
+     * @return
+     */
+    @Bean
+    public PageHelper pageHelper() {
+        PageHelper pageHelper = new PageHelper();
+        Properties properties = new Properties();
+        properties.setProperty("offsetAsPageNum", "true");
+        properties.setProperty("rowBoundsWithCount", "true");
+        properties.setProperty("reasonable", "true");
+        properties.setProperty("dialect", "mysql");    //配置mysql数据库的方言
+        pageHelper.setProperties(properties);
+        return pageHelper;
+    }
+}

+ 83 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/conf/Swagger.java

@@ -0,0 +1,83 @@
+package com.gyee.frame.common.conf;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
+import springfox.documentation.builders.ApiInfoBuilder;
+import springfox.documentation.builders.PathSelectors;
+import springfox.documentation.builders.RequestHandlerSelectors;
+import springfox.documentation.service.ApiInfo;
+import springfox.documentation.spi.DocumentationType;
+import springfox.documentation.spring.web.plugins.Docket;
+import springfox.documentation.swagger2.annotations.EnableSwagger2;
+
+import javax.annotation.Resource;
+
+/**
+* Swagger 配置文件
+* @ClassName: Swagger
+* @Description: 配置文件
+* @author gyee
+* @date 2018年6月3日
+*
+ */
+@Configuration(value="true")
+@EnableSwagger2 //启动swagger注解 启动服务,浏览器输入"http://localhost:8080/swagger-ui.html"
+public class Swagger  implements WebMvcConfigurer {
+
+
+	@Resource
+	private V2Config v2Config;
+
+	@Bean
+	public Docket createRestApi() {
+		return new Docket(DocumentationType.SWAGGER_2)
+				.host(v2Config.getSwaggerip())
+				// 用来创建该API的基本信息,展示在文档的页面中(自定义展示的信息)
+				.apiInfo(apiInfo())
+				// 设置哪些接口暴露给Swagger展示
+				.select()
+				 // 扫描所有有注解的api,用这种方式更灵活
+				.apis(RequestHandlerSelectors.basePackage("com.gyee.frame"))
+				// 扫描指定包中的swagger注解
+				//.apis(RequestHandlerSelectors.basePackage("com.gyee.frame.controller"))
+				// 扫描所有 .apis(RequestHandlerSelectors.any())
+				.paths(PathSelectors.any())
+				.build();
+	}
+	
+	private ApiInfo apiInfo() {
+		return new ApiInfoBuilder()
+				//设置标题
+				.title("Gyee_Frame_HF API文档")
+				//描述
+				.description("Gyee_Frame_NX项目")
+				 //作者信息
+                //.contact(new Contact(v2Config.getName(), null, V2Config.getEmail_account()))
+                //服务条款URL
+				.termsOfServiceUrl("")
+				//版本
+				.version("版本号:"+v2Config.getVersion())
+				.build();
+	}
+
+	@Override
+
+	public void addResourceHandlers(ResourceHandlerRegistry registry) {
+
+		// 解决静态资源无法访问
+
+		registry.addResourceHandler("/**").addResourceLocations("classpath:/static/");
+
+		// 解决swagger无法访问
+
+		registry.addResourceHandler("/swagger-ui.html").addResourceLocations("classpath:/META-INF/resources/");
+
+		// 解决swagger的js文件无法访问
+
+		registry.addResourceHandler("/webjars/**").addResourceLocations("classpath:/META-INF/resources/webjars/");
+
+	}
+
+}

+ 79 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/conf/TemperatureConfig.java

@@ -0,0 +1,79 @@
+package com.gyee.frame.common.conf;
+
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+
+/**
+ * 预警配置
+ */
+@Component
+@ConfigurationProperties(prefix = "temperature")
+public class TemperatureConfig {
+
+
+    private static List<String> yyz;
+    private static List<String> clx;
+    private static List<String> fdj;
+    private static List<String> bj;
+    private static List<String> qt;
+    private static List<String> zz;
+    private static List<String> zd;
+
+    public static List<String> getYyz() {
+        return yyz;
+    }
+
+    public  void setYyz(List<String> yyz) {
+        this.yyz = yyz;
+    }
+
+    public static List<String> getClx() {
+        return clx;
+    }
+
+    public  void setClx(List<String> clx) {
+        this.clx = clx;
+    }
+
+    public static List<String> getFdj() {
+        return fdj;
+    }
+
+    public  void setFdj(List<String> fdj) {
+        this.fdj = fdj;
+    }
+
+    public static List<String> getBj() {
+        return bj;
+    }
+
+    public  void setBj(List<String> bj) {
+        this.bj = bj;
+    }
+
+    public static List<String> getQt() {
+        return qt;
+    }
+
+    public  void setQt(List<String> qt) {
+        this.qt = qt;
+    }
+
+    public static List<String> getZz() {
+        return zz;
+    }
+
+    public  void setZz(List<String> zz) {
+        this.zz = zz;
+    }
+
+    public  static List<String> getZd() {
+        return zd;
+    }
+
+    public  void setZd(List<String> zd) {
+        this.zd = zd;
+    }
+}

+ 56 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/conf/ThreadPoolTaskConfig.java

@@ -0,0 +1,56 @@
+package com.gyee.frame.common.conf;
+
+import org.springframework.context.annotation.Configuration;
+import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
+
+import java.util.concurrent.ThreadPoolExecutor;
+
+@Configuration
+public class ThreadPoolTaskConfig {
+    /**
+     *   默认情况下,在创建了线程池后,线程池中的线程数为0,当有任务来之后,就会创建一个线程去执行任务,
+     *	当线程池中的线程数目达到corePoolSize后,就会把到达的任务放到缓存队列当中;
+     *  当队列满了,就继续创建线程,当线程数量大于等于maxPoolSize后,开始使用拒绝策略拒绝
+     */
+
+    /** 核心线程数(默认线程数) */
+    private static final int corePoolSize = 100;
+    /** 最大线程数 */
+    private static final int maxPoolSize = 500;
+    /** 允许线程空闲时间(单位:默认为秒) */
+    private static final int keepAliveTime = 60;
+    /** 缓冲队列大小 */
+    private static final int queueCapacity = 500;
+    /** 允许等待最长时间 */
+    private static final int awaitTime = 10;
+    /** 线程池名前缀 */
+    private static final String threadNamePrefix = "GYEE-Thread-";
+
+    private ThreadPoolTaskExecutor executor;
+
+    public ThreadPoolTaskExecutor getExecutor(){
+        if (executor == null)
+            executor = taskExecutor();
+
+        return executor;
+    }
+
+
+    private ThreadPoolTaskExecutor taskExecutor(){
+        ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
+        executor.setCorePoolSize(corePoolSize);
+        executor.setMaxPoolSize(maxPoolSize);
+        executor.setQueueCapacity(queueCapacity);
+        executor.setKeepAliveSeconds(keepAliveTime);
+        executor.setThreadNamePrefix(threadNamePrefix);
+        executor.setAwaitTerminationSeconds(awaitTime);
+
+        // 线程池对拒绝任务的处理策略
+        // CallerRunsPolicy:由调用线程(提交任务的线程)处理该任务
+        executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy());
+        // 初始化
+        executor.initialize();
+        return executor;
+    }
+
+}

+ 239 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/conf/V2Config.java

@@ -0,0 +1,239 @@
+package com.gyee.frame.common.conf;
+
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.stereotype.Component;
+
+import java.util.Map;
+
+/**
+ * 读取项目相关配置
+ * 
+ * @author gyee
+ */
+@Component
+@ConfigurationProperties(prefix = "gyee")
+public class V2Config
+{
+    /** 项目名称 */
+    private String name;
+    /** 版本 */
+    private String version;
+    /** 版权年份 */
+    private String copyrightYear;
+    /** 上传路径 */
+    private static String defaultBaseDir;
+    /** 是否开启 上传static **/
+    private static String isstatic;
+    /** 开启存放静态文件夹后目录 **/
+    private static String isroot_dir;
+    /** 邮箱发送smtp */
+    private static String email_smtp;
+    /** 发送邮箱端口 */
+    private static String email_port;
+    /** 发送邮箱登录账号 */
+    private static String email_account;
+    /** 发送邮箱登录密码 */
+    private static String email_password;
+    /** 演示模式 **/
+    private static String demoEnabled;
+    /** 滚动验证码 **/
+    private static Boolean rollVerification;
+    /** 实时数据库 **/
+    private  static String realtimedataBase;
+    /**数据适配器网址 **/
+    private static String baseurl;
+    /** swaggerip指定IP **/
+    private  static  String swaggerip;
+    /** 小数位数 **/
+    private  static  Integer digit;
+    /** 气象采集指定IP **/
+    private  static  String weatherurl;
+    /** 区域公司key指定IP **/
+    private  static  String weatherqygs;
+    /** 海拔信息配置 **/
+    private static Map<String,Double> hbmaps;
+
+    /**测点初始码**/
+    private  static  String initialcode;
+    /**健康管理数据适配器网址 **/
+    private static String healthurl;
+
+    public static String getHealthurl() {
+        return healthurl;
+    }
+
+    public  void setHealthurl(String healthurl) {
+        V2Config.healthurl = healthurl;
+    }
+
+    public static String getInitialcode() {
+        return initialcode;
+    }
+
+    public  void setInitialcode(String initialcode) {
+        V2Config.initialcode = initialcode;
+    }
+
+    public static Map<String, Double> getHbmaps() {
+        return hbmaps;
+    }
+
+    public  void setHbmaps(Map<String, Double> hbmaps) {
+        V2Config.hbmaps = hbmaps;
+    }
+
+    public static String getWeatherurl() {
+        return weatherurl;
+    }
+
+    public  void setWeatherurl(String weatherurl) {
+        V2Config.weatherurl = weatherurl;
+    }
+
+    public static String getWeatherqygs() {
+        return weatherqygs;
+    }
+
+    public  void setWeatherqygs(String weatherqygs) {
+        V2Config.weatherqygs = weatherqygs;
+    }
+
+    public static  Integer getDigit() {
+        return digit;
+    }
+
+    public  void setDigit(Integer digit) {
+        this.digit = digit;
+    }
+
+    public  static String getSwaggerip() {
+        return swaggerip;
+    }
+
+    public  void setSwaggerip(String swaggerip) {
+        this.swaggerip = swaggerip;
+    }
+
+    public String getName()
+    {
+        return name;
+    }
+
+    public void setName(String name)
+    {
+        this.name = name;
+    }
+
+    public String getVersion()
+    {
+        return version;
+    }
+
+    public void setVersion(String version)
+    {
+        this.version = version;
+    }
+
+    public String getCopyrightYear()
+    {
+        return copyrightYear;
+    }
+
+    public void setCopyrightYear(String copyrightYear)
+    {
+        this.copyrightYear = copyrightYear;
+    }
+
+
+	public static String getDefaultBaseDir() {
+		return defaultBaseDir;
+	}
+
+	public  void setDefaultBaseDir(String defaultBaseDir) {
+		V2Config.defaultBaseDir = defaultBaseDir;
+	}
+
+	public static String getIsstatic() {
+		return isstatic;
+	}
+
+	public  void setIsstatic(String isstatic) {
+
+        V2Config.isstatic = isstatic;
+	}
+
+	public static String getIsroot_dir() {
+		return isroot_dir;
+	}
+
+	public void setIsroot_dir(String isroot_dir) {
+
+        V2Config.isroot_dir = isroot_dir;
+	}
+
+	public static String getEmail_smtp() {
+		return email_smtp;
+	}
+
+	public void setEmail_smtp(String email_smtp) {
+		V2Config.email_smtp = email_smtp;
+	}
+
+	public static String getEmail_port() {
+		return email_port;
+	}
+
+	public void setEmail_port(String email_port) {
+		V2Config.email_port = email_port;
+	}
+
+	public static String getEmail_account() {
+		return email_account;
+	}
+
+	public void setEmail_account(String email_account) {
+		V2Config.email_account = email_account;
+	}
+
+	public static String getEmail_password() {
+		return email_password;
+	}
+
+	public void setEmail_password(String email_password) {
+		V2Config.email_password = email_password;
+	}
+
+	public static String getDemoEnabled() {
+		return demoEnabled;
+	}
+
+	public void setDemoEnabled(String demoEnabled) {
+		V2Config.demoEnabled = demoEnabled;
+	}
+
+	public static Boolean getRollVerification() {
+		return rollVerification;
+	}
+
+	public void setRollVerification(Boolean rollVerification) {
+		V2Config.rollVerification = rollVerification;
+	}
+
+
+
+
+    public static String getRealtimedataBase() {
+        return realtimedataBase;
+    }
+
+    public  void setRealtimedataBase(String realtimedataBase) {
+        V2Config.realtimedataBase = realtimedataBase;
+    }
+    public static String getBaseurl() {
+        return baseurl;
+    }
+
+    public  void setBaseurl(String baseurl) {
+        V2Config.baseurl = baseurl;
+    }
+}

+ 27 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/conf/ZmConfig.java

@@ -0,0 +1,27 @@
+package com.gyee.frame.common.conf;
+
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 预警配置
+ */
+@Component
+@ConfigurationProperties(prefix = "zmconfig")
+public class ZmConfig {
+
+
+    private static Map<String,List<String>> maps;
+
+
+    public static Map<String, List<String>> getMaps() {
+        return maps;
+    }
+
+    public void setMaps(Map<String, List<String>> maps) {
+        this.maps = maps;
+    }
+}

+ 45 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/conf/monitor/LeaderConfig.java

@@ -0,0 +1,45 @@
+package com.gyee.frame.common.conf.monitor;
+
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.PropertySource;
+import org.springframework.context.annotation.PropertySources;
+import org.springframework.stereotype.Component;
+
+
+@Component
+@PropertySources({
+        @PropertySource("classpath:config/leader.properties"),
+})
+public class LeaderConfig {
+
+    @Value("${Leader.FDL}")
+    private String FDL;
+    @Value("${Leader.FS}")
+    private String FS;
+    @Value("${Leader.GL}")
+
+    private String GL;
+    public String getFDL() {
+        return FDL;
+    }
+
+    public void setFDL(String FDL) {
+        this.FDL = FDL;
+    }
+
+    public String getFS() {
+        return FS;
+    }
+
+    public void setFS(String FS) {
+        this.FS = FS;
+    }
+
+    public String getGL() {
+        return GL;
+    }
+
+    public void setGL(String GL) {
+        this.GL = GL;
+    }
+}

+ 45 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/conf/monitor/StatusConfig.java

@@ -0,0 +1,45 @@
+package com.gyee.frame.common.conf.monitor;
+
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.PropertySource;
+import org.springframework.context.annotation.PropertySources;
+import org.springframework.stereotype.Component;
+
+
+@Component
+@PropertySources({
+        @PropertySource("classpath:config/status.properties"),
+})
+public class StatusConfig {
+
+    @Value("${Status.FDL}")
+    private String FDL;
+    @Value("${Status.FS}")
+    private String FS;
+    @Value("${Status.GL}")
+
+    private String GL;
+    public String getFDL() {
+        return FDL;
+    }
+
+    public void setFDL(String FDL) {
+        this.FDL = FDL;
+    }
+
+    public String getFS() {
+        return FS;
+    }
+
+    public void setFS(String FS) {
+        this.FS = FS;
+    }
+
+    public String getGL() {
+        return GL;
+    }
+
+    public void setGL(String GL) {
+        this.GL = GL;
+    }
+}

+ 27 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/conf/monitor/ZtConfig.java

@@ -0,0 +1,27 @@
+package com.gyee.frame.common.conf.monitor;
+
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 预警配置
+ */
+@Component
+@ConfigurationProperties(prefix = "ztconfig")
+public class ZtConfig {
+
+
+    private static Map<String,List<String>> maps;
+
+
+    public static Map<String, List<String>> getMaps() {
+        return maps;
+    }
+
+    public void setMaps(Map<String, List<String>> maps) {
+        this.maps = maps;
+    }
+}

+ 21 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/dataSources/DataSource.java

@@ -0,0 +1,21 @@
+package com.gyee.frame.common.dataSources;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * 自定义注解,用于类或方法上,优先级:方法>类
+ * @ClassName: DataSource
+ * @author gyee
+ * @date 2019-12-06 21:15
+ */
+@Target({ElementType.METHOD})
+@Retention(RetentionPolicy.RUNTIME)
+public @interface DataSource {
+	/**
+     * 切换数据源名称
+     */
+	DataSourceType value() default DataSourceType.MASTER;
+}

+ 77 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/dataSources/DataSourceAspect.java

@@ -0,0 +1,77 @@
+package com.gyee.frame.common.dataSources;
+
+import org.aspectj.lang.ProceedingJoinPoint;
+import org.aspectj.lang.annotation.Around;
+import org.aspectj.lang.annotation.Aspect;
+import org.aspectj.lang.annotation.Pointcut;
+import org.aspectj.lang.reflect.MethodSignature;
+import org.springframework.core.annotation.Order;
+import org.springframework.stereotype.Component;
+
+import com.gyee.frame.util.StringUtils;
+
+import java.lang.reflect.Method;
+/**
+ * 多数据源处理
+ * @ClassName: DataSourceAspect
+ * @author gyee
+ * @date 2019-12-07 18:40
+ */
+@Aspect
+@Component
+@Order(1)
+//@EnableAsync
+public class DataSourceAspect {
+	//private static final Logger log = LoggerFactory.getLogger(DataSourceAspect.class);
+
+	@Pointcut("@annotation(com.gyee.frame.common.dataSources.DataSource)")
+    public void dsPointCut()
+    {
+
+    }
+
+	@Around("dsPointCut()")
+    public Object around(ProceedingJoinPoint point) throws Throwable
+    {
+        MethodSignature signature = (MethodSignature) point.getSignature();
+
+        Method method = signature.getMethod();
+
+        DataSource dataSource = method.getAnnotation(DataSource.class);
+
+        if (null!=dataSource)
+        {
+            DataSourceContextHolder.setDataSource(dataSource.value().name());
+        }
+
+        try
+        {
+            return point.proceed();
+        }
+        finally
+        {
+            // 销毁数据源 在执行方法之后
+        	DataSourceContextHolder.clearDataSource();
+        }
+    }
+
+	 /**
+     * 获取需要切换的数据源
+     */
+    public DataSource getDataSource(ProceedingJoinPoint point)
+    {
+        MethodSignature signature = (MethodSignature) point.getSignature();
+        Class<? extends Object> targetClass = point.getTarget().getClass();
+        DataSource targetDataSource = targetClass.getAnnotation(DataSource.class);
+        if (StringUtils.isNotNull(targetDataSource))
+        {
+            return targetDataSource;
+        }
+        else
+        {
+            Method method = signature.getMethod();
+            DataSource dataSource = method.getAnnotation(DataSource.class);
+            return dataSource;
+        }
+    }
+}

+ 50 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/dataSources/DataSourceContextHolder.java

@@ -0,0 +1,50 @@
+package com.gyee.frame.common.dataSources;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * 动态数据源上下文管理:设置数据源,获取数据源,清除数据源
+ * @ClassName: DataSourceContextHolder
+ * @author gyee
+ * @date 2019-12-06 21:08
+ */
+public class DataSourceContextHolder {
+	private static final Logger log = LoggerFactory.getLogger(DataSourceContextHolder.class);
+   /**
+    * 使用ThreadLocal维护变量,ThreadLocal为每个使用该变量的线程提供独立的变量副本,
+    * 所以每一个线程都可以独立地改变自己的副本,而不会影响其它线程所对应的副本。
+    */
+    private static final ThreadLocal<String> CONTEXT_HOLDER = new ThreadLocal<>();
+
+    /**
+     * 设置数据源
+     * @param type
+     * @author gyee
+     * @Date 2019年12月7日 下午6:38:55
+     */
+    public static void setDataSource(String type){
+
+        log.info("当前使用的数据源为:{}", type);
+    	CONTEXT_HOLDER.set(type);
+    }
+
+    /**
+     * 获得数据源的变量
+     * @return
+     * @author gyee
+     * @Date 2019年12月7日 下午6:39:00
+     */
+    public static String getDataSource(){
+        return CONTEXT_HOLDER.get();
+    }
+
+    /**
+     * 清除数据源
+     * @author gyee
+     * @Date 2019年12月7日 下午6:39:06
+     */
+    public static void clearDataSource(){
+    	CONTEXT_HOLDER.remove();
+    }
+}

+ 13 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/dataSources/DataSourceType.java

@@ -0,0 +1,13 @@
+package com.gyee.frame.common.dataSources;
+
+/**
+ * 列出所有数据源
+ * @ClassName: DataSourceType
+ * @author gyee
+ * @date 2019-12-06 21:02
+ */
+public enum DataSourceType {
+	MASTER,
+	SLAVE,
+	TICKET
+}

+ 27 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/dataSources/DynamicDataSource.java

@@ -0,0 +1,27 @@
+package com.gyee.frame.common.dataSources;
+
+import java.util.Map;
+import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;
+
+/**
+ * 动态数据源
+ * @ClassName: DynamicDataSource
+ * @author gyee
+ * @date 2019-12-07 18:39
+ */
+public class DynamicDataSource extends AbstractRoutingDataSource {
+	
+	public DynamicDataSource(javax.sql.DataSource dataSource, Map<Object, Object> targetDataSources)
+    {
+        super.setDefaultTargetDataSource(dataSource);
+        super.setTargetDataSources(targetDataSources);
+        super.afterPropertiesSet();
+    }
+
+	@Override
+	protected Object determineCurrentLookupKey() {
+		
+		return DataSourceContextHolder.getDataSource();
+	}
+
+}

+ 104 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/domain/AjaxResult.java

@@ -0,0 +1,104 @@
+package com.gyee.frame.common.domain;
+
+import java.util.HashMap;
+
+/**
+* @ClassName: AjaxResult
+* @Description: ajax操作消息提醒
+* @author gyee
+* @date 2018年8月18日
+*
+ */
+public class AjaxResult extends HashMap<String, Object>
+{
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 初始化一个新创建的 Message 对象
+     */
+    public AjaxResult()
+    {
+    }
+
+    /**
+     * 返回错误消息
+     * 
+     * @return 错误消息
+     */
+    public static AjaxResult error()
+    {
+        return error(1, "操作失败");
+    }
+
+    /**
+     * 返回错误消息
+     * 
+     * @param msg 内容
+     * @return 错误消息
+     */
+    public static AjaxResult error(String msg)
+    {
+        return error(500, msg);
+    }
+
+    /**
+     * 返回错误消息
+     * 
+     * @param code 错误码
+     * @param msg 内容
+     * @return 错误消息
+     */
+    public static AjaxResult error(int code, String msg)
+    {
+        AjaxResult json = new AjaxResult();
+        json.put("code", code);
+        json.put("msg", msg);
+        return json;
+    }
+
+    /**
+     * 返回成功消息
+     * 
+     * @param msg 内容
+     * @return 成功消息
+     */
+    public static AjaxResult success(String msg)
+    {
+        AjaxResult json = new AjaxResult();
+        json.put("msg", msg);
+        json.put("code", 200);
+        return json;
+    }
+    
+    /**
+     * 返回成功消息
+     * 
+     * @return 成功消息
+     */
+    public static AjaxResult success()
+    {
+        return AjaxResult.success("操作成功");
+    }
+    
+    public static AjaxResult successData(int code, Object value){
+    	 AjaxResult json = new AjaxResult();
+    	 json.put("code", code);
+         json.put("data", value);
+         return json;
+    }
+   
+    
+    /**
+     * 返回成功消息
+     * 
+     * @param key 键值
+     * @param value 内容
+     * @return 成功消息
+     */
+    @Override
+    public AjaxResult put(String key, Object value)
+    {
+        super.put(key, value);
+        return this;
+    }
+}

+ 80 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/druid/RemoveDruidAdConfig.java

@@ -0,0 +1,80 @@
+package com.gyee.frame.common.druid;
+
+import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure;
+import com.alibaba.druid.spring.boot.autoconfigure.properties.DruidStatProperties;
+import com.alibaba.druid.util.Utils;
+import org.springframework.boot.autoconfigure.AutoConfigureAfter;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
+import org.springframework.boot.web.servlet.FilterRegistrationBean;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+import javax.servlet.*;
+import java.io.IOException;
+
+
+/**
+ * 类名称:RemoveDruidAdConfig
+ * 类描述: 去除druid底部的广告配置类
+ *
+ * @author: taohongchao
+ * 创建时间:2019/2/15 13:14
+ * Version 1.0
+ */
+
+@Configuration
+@ConditionalOnWebApplication
+@AutoConfigureAfter(DruidDataSourceAutoConfigure.class)
+@ConditionalOnProperty(name = "spring.datasource.druid.stat-view-servlet.enabled", havingValue = "true", matchIfMissing = true)
+public class RemoveDruidAdConfig {
+
+
+    /**
+     * 方法名: removeDruidAdFilterRegistrationBean
+     * 方法描述:  除去页面底部的广告
+     * @param properties
+     * @return org.springframework.boot.web.servlet.FilterRegistrationBean
+     * @throws
+     */
+    @SuppressWarnings("rawtypes")
+	@Bean
+    public FilterRegistrationBean removeDruidAdFilterRegistrationBean(DruidStatProperties properties) {
+        // 获取web监控页面的参数
+        DruidStatProperties.StatViewServlet config = properties.getStatViewServlet();
+        // 提取common.js的配置路径
+        String pattern = config.getUrlPattern() != null ? config.getUrlPattern() : "/druid/*";
+        String commonJsPattern = pattern.replaceAll("\\*", "js/common.js");
+
+        final String filePath = "support/http/resources/js/common.js";
+
+        //创建filter进行过滤
+        Filter filter = new Filter() {
+            @Override
+            public void init(FilterConfig filterConfig) throws ServletException {
+            }
+
+            @Override
+            public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
+                chain.doFilter(request, response);
+                // 重置缓冲区,响应头不会被重置
+                response.resetBuffer();
+                // 获取common.js
+                String text = Utils.readFromResource(filePath);
+                // 正则替换banner, 除去底部的广告信息
+                text = text.replaceAll("<a.*?banner\"></a><br/>", "");
+                text = text.replaceAll("powered.*?shrek.wang</a>", "");
+                response.getWriter().write(text);
+            }
+
+            @Override
+            public void destroy() {
+            }
+        };
+        FilterRegistrationBean<Filter> registrationBean = new FilterRegistrationBean<Filter>();
+        registrationBean.setFilter(filter);
+        registrationBean.addUrlPatterns(commonJsPattern);
+        return registrationBean;
+    }
+}
+

+ 141 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/exception/GlobalExceptionResolver.java

@@ -0,0 +1,141 @@
+package com.gyee.frame.common.exception;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.apache.shiro.authz.AuthorizationException;
+import org.apache.shiro.authz.UnauthenticatedException;
+import org.apache.shiro.authz.UnauthorizedException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.validation.BindException;
+import org.springframework.web.HttpRequestMethodNotSupportedException;
+import org.springframework.web.bind.annotation.ExceptionHandler;
+import org.springframework.web.bind.annotation.RestControllerAdvice;
+import org.springframework.web.servlet.ModelAndView;
+import com.gyee.frame.common.domain.AjaxResult;
+import com.gyee.frame.common.exception.demo.DemoModeException;
+import com.gyee.frame.util.ServletUtils;
+import org.thymeleaf.exceptions.TemplateInputException;
+
+/**
+ * 全局异常处理
+ * @author gyee
+ * @date: 2018年9月9日 下午10:52:55
+ */
+@RestControllerAdvice
+public class GlobalExceptionResolver{
+	private static Logger logger = LoggerFactory.getLogger(GlobalExceptionResolver.class);
+	
+	
+	
+	 /**
+     * 权限校验失败 如果请求为ajax返回json,普通请求跳转页面
+     */
+    @ExceptionHandler(AuthorizationException.class)
+    public Object handleAuthorizationException(HttpServletRequest request, AuthorizationException e)
+    {
+		//开发环境打印异常,正式环境请注销
+    	logger.error(" 权限校验异常》》"+e.getMessage(), e);
+        if (ServletUtils.isAjaxRequest(request))
+        {
+            return AjaxResult.error(e.getMessage());
+        }
+        else
+        {
+        	ModelAndView mv;
+        	//shiro异常拦截 
+          if(e instanceof UnauthorizedException){
+          	//未授权异常
+              mv = new ModelAndView("/error/403");
+              return mv;
+          }else if(e instanceof UnauthenticatedException){
+          	//未认证异常
+              mv = new ModelAndView("/error/403");
+              return mv;
+          }
+          else {
+              mv = new ModelAndView();
+              return mv;
+  
+          }
+        }
+    }
+	
+	
+   
+    
+    /**
+     * 自定义验证异常
+     */
+    @ExceptionHandler(BindException.class)
+    public AjaxResult validatedBindException(BindException e)
+    {
+    	logger.error("自定义验证异常", e);
+        String message = e.getAllErrors().get(0).getDefaultMessage();
+        return AjaxResult.error(message);
+    }
+    
+    
+    /**
+     * 请求方式不支持
+     */
+    @ExceptionHandler({ HttpRequestMethodNotSupportedException.class })
+    public AjaxResult handleException(HttpRequestMethodNotSupportedException e)
+    {
+    	logger.error("请求方式不支持异常:", e);
+        return AjaxResult.error("不支持' " + e.getMethod() + "'请求");
+    }
+  
+    
+    
+
+    /**
+     * 系统异常
+     */
+    @ExceptionHandler(Exception.class) 
+    public ModelAndView handle(Exception e){ 
+    	logger.error("系统异常:", e);
+	    ModelAndView mv = new ModelAndView(); 
+	    mv.addObject("message", e.getMessage()); 
+	    mv.setViewName("/error/999"); 
+	    return mv; 
+    }
+    
+    /**
+     * 演示模式异常
+     */
+    @ExceptionHandler(DemoModeException.class)
+    public AjaxResult demoModeException(DemoModeException e)
+    {
+        return AjaxResult.error("演示模式,不允许操作");
+    }
+    
+    /**
+     * 拦截未知的运行时异常
+     */
+    @ExceptionHandler(RuntimeException.class)
+    public AjaxResult notFount(RuntimeException e)
+    {
+    	logger.error("运行时异常:", e);
+        return AjaxResult.error("运行时异常:" + e.getMessage());
+    }
+
+    /**
+     * 拦截自定义异常
+     */
+    @ExceptionHandler(QiNiuException.class)
+    public AjaxResult qiniuException(QiNiuException e)
+    {
+        logger.error(e.getMessage());
+        return AjaxResult.error(e.getCode(), e.getMessage());
+    }
+
+
+    @ExceptionHandler(TemplateInputException.class)
+    public AjaxResult templateException(TemplateInputException e)
+    {
+        logger.error(e.getMessage());
+        return AjaxResult.error(e.getMessage());
+    }
+
+}

+ 65 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/exception/QiNiuException.java

@@ -0,0 +1,65 @@
+package com.gyee.frame.common.exception;
+
+import com.gyee.frame.common.exception.enums.QiNiuErrorEnum;
+
+/**
+ * QiNiuException
+ *
+ * @author bobbi
+ * @date 2018/10/07 13:54
+ * @email 571002217@qq.com
+ * @description 自定义异常
+ */
+public class QiNiuException extends RuntimeException{
+	private static final long serialVersionUID = 1L;
+	private String msg;
+    private int code = 500;
+
+    public QiNiuException(){
+        super(QiNiuErrorEnum.UNKNOWN.getMsg());
+        this.msg= QiNiuErrorEnum.UNKNOWN.getMsg();
+    }
+
+
+    public QiNiuException(QiNiuErrorEnum eEnum, Throwable e){
+        super(eEnum.getMsg(),e);
+        this.msg=eEnum.getMsg();
+        this.code=eEnum.getCode();
+    }
+
+    public QiNiuException(QiNiuErrorEnum eEnum){
+        this.msg=eEnum.getMsg();
+        this.code=eEnum.getCode();
+    }
+
+    public QiNiuException(String exception){
+       this.msg=exception;
+    }
+
+
+	public String getMsg() {
+		return msg;
+	}
+
+
+	public void setMsg(String msg) {
+		this.msg = msg;
+	}
+
+
+	public int getCode() {
+		return code;
+	}
+
+
+	public void setCode(int code) {
+		this.code = code;
+	}
+
+	public QiNiuException(String msg, int code) {
+		super();
+		this.msg = msg;
+		this.code = code;
+	}
+    
+}

+ 17 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/exception/demo/DemoModeException.java

@@ -0,0 +1,17 @@
+package com.gyee.frame.common.exception.demo;
+
+/**
+ * 演示模式异常
+* @ClassName: DemoModeException
+* @author gyee
+* @date 2019-11-08 15:45
+*
+ */
+public class DemoModeException extends RuntimeException
+{
+    private static final long serialVersionUID = 1L;
+
+    public DemoModeException()
+    {
+    }
+}

+ 55 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/exception/enums/QiNiuErrorEnum.java

@@ -0,0 +1,55 @@
+package com.gyee.frame.common.exception.enums;
+
+/**
+ * QiNiuErrorEnum
+ * @description error类型枚举类
+ */
+public enum QiNiuErrorEnum {
+
+    // 系统错误
+    UNKNOWN(500,"系统内部错误,请联系管理员"),
+    PATH_NOT_FOUND(404,"路径不存在,请检查路径"),
+    NO_AUTH(403,"没有权限,请联系管理员"),
+    DUPLICATE_KEY(501,"数据库中已存在该记录"),
+    TOKEN_GENERATOR_ERROR(502,"token生成失败"),
+    NO_UUID(503,"uuid为空"),
+    SQL_ILLEGAL(504,"sql非法"),
+	TEMPLATE_NO_SUPPORT(505,"模板不支持"),
+
+    //用户权限错误
+    INVALID_TOKEN(1001,"token不合法"),
+
+    //七牛OSS错误
+    OSS_CONFIG_ERROR(10050,"七牛配置信息错误"),
+    OSS_UPLOAD_ERROR(10051,"OSSBookNote上传失败"),
+
+	//数据库错误
+	ERROR_CONNECT(4005, "数据库连接异常"),
+	ERROR_DATA(4006, "数据查询失败");
+
+    private int code;
+    private String msg;
+	public int getCode() {
+		return code;
+	}
+	public void setCode(int code) {
+		this.code = code;
+	}
+	public String getMsg() {
+		return msg;
+	}
+	public void setMsg(String msg) {
+		this.msg = msg;
+	}
+	/**
+	 * @param code
+	 * @param msg
+	 * @author gyee
+	 * @Date 2019年11月20日 下午9:28:34
+	 */
+	private QiNiuErrorEnum(int code, String msg) {
+		this.code = code;
+		this.msg = msg;
+	}
+	
+}

+ 41 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/exception/file/FileNameLengthLimitExceededException.java

@@ -0,0 +1,41 @@
+package com.gyee.frame.common.exception.file;
+
+import org.apache.commons.fileupload.FileUploadException;
+
+/**
+ * 文件名超长 误异常类
+ * 
+ * @author gyee
+ */
+public class FileNameLengthLimitExceededException extends FileUploadException
+{
+
+    private static final long serialVersionUID = 1L;
+    private int length;
+    private int maxLength;
+    private String filename;
+
+    public FileNameLengthLimitExceededException(String filename, int length, int maxLength)
+    {
+        super("file name : [" + filename + "], length : [" + length + "], max length : [" + maxLength + "]");
+        this.length = length;
+        this.maxLength = maxLength;
+        this.filename = filename;
+    }
+
+    public String getFilename()
+    {
+        return filename;
+    }
+
+    public int getLength()
+    {
+        return length;
+    }
+
+    public int getMaxLength()
+    {
+        return maxLength;
+    }
+
+}

+ 73 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/exception/file/InvalidExtensionException.java

@@ -0,0 +1,73 @@
+package com.gyee.frame.common.exception.file;
+
+import java.util.Arrays;
+import org.apache.commons.fileupload.FileUploadException;
+
+/**
+ * 文件上传 误异常类
+ * 
+ * @author gyee
+ */
+public class InvalidExtensionException extends FileUploadException
+{
+
+    private static final long serialVersionUID = 1L;
+
+    private String[] allowedExtension;
+    private String extension;
+    private String filename;
+
+    public InvalidExtensionException(String[] allowedExtension, String extension, String filename)
+    {
+        super("filename : [" + filename + "], extension : [" + extension + "], allowed extension : [" + Arrays.toString(allowedExtension) + "]");
+        this.allowedExtension = allowedExtension;
+        this.extension = extension;
+        this.filename = filename;
+    }
+
+    public String[] getAllowedExtension()
+    {
+        return allowedExtension;
+    }
+
+    public String getExtension()
+    {
+        return extension;
+    }
+
+    public String getFilename()
+    {
+        return filename;
+    }
+
+    public static class InvalidImageExtensionException extends InvalidExtensionException
+    {
+        private static final long serialVersionUID = 1L;
+
+        public InvalidImageExtensionException(String[] allowedExtension, String extension, String filename)
+        {
+            super(allowedExtension, extension, filename);
+        }
+    }
+
+    public static class InvalidFlashExtensionException extends InvalidExtensionException
+    {
+        private static final long serialVersionUID = 1L;
+
+        public InvalidFlashExtensionException(String[] allowedExtension, String extension, String filename)
+        {
+            super(allowedExtension, extension, filename);
+        }
+    }
+
+    public static class InvalidMediaExtensionException extends InvalidExtensionException
+    {
+        private static final long serialVersionUID = 1L;
+
+        public InvalidMediaExtensionException(String[] allowedExtension, String extension, String filename)
+        {
+            super(allowedExtension, extension, filename);
+        }
+    }
+
+}

+ 37 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/feign/IAdapterService.java

@@ -0,0 +1,37 @@
+package com.gyee.frame.common.feign;
+
+import com.alibaba.fastjson.JSONObject;
+import com.gyee.frame.model.custom.export.TsPointData;
+import com.gyee.frame.util.golden.timeseries.TsData;
+import feign.Headers;
+import feign.Param;
+import feign.RequestLine;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+
+import java.util.List;
+
+
+public interface IAdapterService {
+
+
+    @Headers({"Content-Type: application/json", "Accept: application/json"})
+    @RequestLine("GET /ts/latest?keys={points}")
+    JSONObject getLatest(@Param(value = "points") String points);
+
+
+    @Headers({"Content-Type: application/json", "Accept: application/json"})
+    @RequestLine("GET /ts/history/snap?tagName={tagName}&startTs={startTs}&endTs={endTs}&interval={interval}")
+    List<TsPointData> getHistorySnap(@Param(value = "tagName") String tagName, @Param(value = "startTs") long startTs,
+                                     @Param(value = "endTs") long endTs, @Param(value = "interval") Integer interval);
+
+    @Headers({"Content-Type: application/json", "Accept: application/json"})
+    @RequestLine("GET /ts/history/raw?tagName={tagName}&startTs={startTs}&endTs={endTs}")
+    List<TsPointData> getHistoryRaw(@Param(value = "tagName") String tagName, @Param(value = "startTs") long startTs,
+                                     @Param(value = "endTs") long endTs);
+
+    @Headers({"Content-Type: application/json", "Accept: application/json"})
+    @RequestLine("GET /ts/history/section?tagNames={tagNames}&ts={ts}")
+    List<TsPointData> getHistorySection(@Param(value = "tagNames") String tagNames, @Param(value = "ts") long ts);
+
+}

+ 30 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/feign/RemoteServiceBuilder.java

@@ -0,0 +1,30 @@
+package com.gyee.frame.common.feign;
+
+import feign.Feign;
+import feign.Request;
+import feign.Retryer;
+import feign.jackson.JacksonDecoder;
+import feign.jackson.JacksonEncoder;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+
+@Slf4j
+@Configuration
+public class RemoteServiceBuilder {
+
+    @Value("${goldenUrl:http://10.155.32.4:8011}")
+    private String shardingUrlString;
+
+    @Bean
+    public IAdapterService ShardingService() {
+        return Feign.builder()
+                .encoder(new JacksonEncoder())
+                .decoder(new JacksonDecoder())
+                .options(new Request.Options(5000, 600000))
+                .retryer(new Retryer.Default(10000, 10000, 3))
+                .target(IAdapterService.class, shardingUrlString);
+    }
+}

+ 83 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/file/ClassUtil.java

@@ -0,0 +1,83 @@
+package com.gyee.frame.common.file;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @Author:
+ * @Date:
+ * @Description:关于类的操作的工具类
+ */
+public final class ClassUtil {
+
+    private ClassUtil() {
+        throw new Error("工具类不允许实例化!");
+    }
+
+    /**
+     * 获取类属性
+     * @param targetObj 要获取属性的类
+     * @return 含有类属性的集合
+     */
+    public static Field[] getClassAttribute(Object targetObj){
+
+        Class<?> objectClass = targetObj.getClass();
+        return objectClass.getDeclaredFields();
+
+    }
+
+    /**
+     * 获取对象的所有get或set方法
+     * @param targetObj 要获取属性的类
+     * @param methodKeyword get或者set关键字
+     * @return 含有类get或set方法的集合
+     */
+    public static List<Method> getMethod(Object targetObj,String methodKeyword){
+        List<Method> methodList = new ArrayList<>();
+
+        Class<?> objectClass = targetObj.getClass();
+
+        Field[] field = objectClass.getDeclaredFields();
+        for (int i = 0;i<field.length;i++){
+
+            if(!field[i].getName().equals("serialVersionUID"))
+            {
+
+                //获取属性名并组装方法名
+                String fieldName = field[i].getName();
+                String getMethodName = methodKeyword
+                        + fieldName.substring(0, 1).toUpperCase()
+                        + fieldName.substring(1);
+
+                try {
+                    Method method = objectClass.getMethod(getMethodName,new Class[]{});
+                    methodList.add(method);
+                } catch (NoSuchMethodException e) {
+                    e.printStackTrace();
+                }
+
+            }
+        }
+        return methodList;
+    }
+
+    /**
+     * 获取对象的所有get方法
+     * @param targetObj 要获取属性的类
+     * @return 含有类方法的集合
+     */
+    public static List<Method> getMethodGet(Object targetObj){
+        return getMethod(targetObj,"get");
+    }
+
+    /**
+     * 获取对象的所有set方法
+     * @param targetObj 要获取属性的类
+     * @return 含有类方法的集合
+     */
+    public static List<Method> getMethodSet(Object targetObj){
+        return getMethod(targetObj,"set");
+    }
+}

+ 272 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/file/ExcelExport.java

@@ -0,0 +1,272 @@
+package com.gyee.frame.common.file;
+
+import com.gyee.frame.util.StringUtils;
+import org.apache.poi.hssf.usermodel.HSSFCellStyle;
+import org.apache.poi.hssf.usermodel.HSSFFont;
+import org.apache.poi.hssf.usermodel.HSSFSheet;
+import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.Cell;
+import org.apache.poi.ss.usermodel.CellType;
+import org.apache.poi.ss.usermodel.HorizontalAlignment;
+import org.apache.poi.ss.usermodel.Row;
+import org.apache.poi.ss.util.CellRangeAddress;
+
+import javax.servlet.http.HttpServletResponse;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.lang.reflect.Field;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @Author:
+ * @Date:
+ * @Description:Excel导出工具类,依赖于ClassUtil工具类
+ */
+public final class ExcelExport {
+
+    /**
+     * 将传入的数据导出excel表并下载
+     * @param response 返回的HttpServletResponse
+     * @param importlist 要导出的对象的集合
+     * @param attributeNames 含有每个对象属性在excel表中对应的标题字符串的数组(请按对象中属性排序调整字符串在数组中的位置)
+     * @param heardName 导出文件 标题名称
+     * @param cnt 合并单元格数 (一般标题字符串的数组长度-1)
+     */
+    public static void export(HttpServletResponse response, List<?> importlist, String[] attributeNames,
+                              String heardName, int cnt ) {
+        //获取数据集
+        List<?> datalist = importlist;
+
+        //声明一个工作薄
+        HSSFWorkbook workbook = new HSSFWorkbook();
+        //生成一个表格
+        HSSFSheet sheet = workbook.createSheet();
+        //设置表格默认列宽度为15个字节
+        sheet.setDefaultColumnWidth((short) 18);
+        //用于设置表格字体
+        HSSFCellStyle style = workbook.createCellStyle();
+
+        //获取字段名数组
+        String[] tableAttributeName = attributeNames;
+        //获取对象属性
+        Field[] fields = ClassUtil.getClassAttribute(importlist.get(0));
+        //获取对象get方法
+        List<Method> methodList = ClassUtil.getMethodGet(importlist.get(0));
+
+        //设置标题样式
+        HSSFCellStyle headerStyle = workbook.createCellStyle();
+        HSSFFont headerFont = workbook.createFont();
+        headerFont.setFontHeightInPoints((short) 14);
+        headerFont.setBold(true);
+        headerStyle.setAlignment(HorizontalAlignment.CENTER);
+        headerStyle.setFont(headerFont);
+        CellRangeAddress cra0 = new CellRangeAddress(0, 1, 0, cnt);// 合并单元格
+        sheet.addMergedRegion(cra0);
+        //创建标标题题
+        Row row = sheet.createRow(0);
+        Cell cell1 = row.createCell(0);
+        cell1.setCellValue(heardName);
+        cell1.setCellStyle(headerStyle);
+
+        // 设置字体样式
+        HSSFFont titleFont = workbook.createFont();
+        titleFont.setBold(true);
+        titleFont.setFontHeightInPoints((short) 10);
+
+        style.setFont(titleFont);
+        style.setAlignment(HorizontalAlignment.CENTER);
+        //循环字段名数组,创建标题行
+        row = sheet.createRow(2);
+        for (int j = 0; j< tableAttributeName.length; j++){
+            //创建列
+            Cell cell = row.createCell(j);
+            cell.setCellStyle(style);
+            //设置单元类型为String
+            cell.setCellType(CellType.STRING);
+            cell.setCellValue(transCellType(tableAttributeName[j]));
+        }
+        //创建普通行
+        for (int i = 0;i<datalist.size();i++){
+            //因为第一行已经用于创建标题行,故从第二行开始创建
+            row = sheet.createRow(i+3);
+            //如果是第一行就让其为标题行
+            Object targetObj = datalist.get(i);
+            for (int j = 0;j<fields.length;j++){
+                //创建列
+                Cell cell = row.createCell(j);
+                cell.setCellType(CellType.STRING);
+                //
+                try {
+                    Object value = methodList.get(j).invoke(targetObj, new Object[]{});
+                    cell.setCellValue(transCellType(value));
+                } catch (IllegalAccessException e) {
+                    e.printStackTrace();
+                } catch (InvocationTargetException e) {
+                    e.printStackTrace();
+                }
+            }
+        }
+        response.setContentType("application/octet-stream");
+        //默认Excel名称
+        response.setHeader("Content-Disposition", "attachment;fileName="+"test.xls");
+        try {
+            OutputStream outputStream = response.getOutputStream();
+            workbook.write(outputStream);
+            outputStream.flush();
+            outputStream.close();
+
+//            response.flushBuffer();
+//            workbook.write(response.getOutputStream());
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+
+    }
+
+
+
+    /**
+     * 将传入的数据导出excel表并下载
+     * @param importlist 要导出的对象的集合
+     * @param attributeNames 含有每个对象属性在excel表中对应的标题字符串的数组(请按对象中属性排序调整字符串在数组中的位置)
+     * @param heardName 导出文件 标题名称
+     * @param cnt 合并单元格数 (一般标题字符串的数组长度-1)
+     * @param filename 文件名称
+     */
+    public static void exportToPath( List<?> importlist, String[] attributeNames,
+                              String heardName, int cnt,String filename ) throws IOException {
+        //获取数据集
+        List<?> datalist = importlist;
+
+        //声明一个工作薄
+        HSSFWorkbook workbook = new HSSFWorkbook();
+        //生成一个表格
+        HSSFSheet sheet = workbook.createSheet();
+        //设置表格默认列宽度为15个字节
+        sheet.setDefaultColumnWidth((short) 18*2);
+        //用于设置表格字体
+        HSSFCellStyle style = workbook.createCellStyle();
+
+        //获取字段名数组
+        String[] tableAttributeName = attributeNames;
+        //获取对象属性
+        Field[] fields = ClassUtil.getClassAttribute(importlist.get(0));
+        //获取对象get方法
+        List<Method> methodList = ClassUtil.getMethodGet(importlist.get(0));
+
+        //设置标题样式
+        HSSFCellStyle headerStyle = workbook.createCellStyle();
+        HSSFFont headerFont = workbook.createFont();
+        headerFont.setFontHeightInPoints((short) 14);
+        headerFont.setBold(true);
+        headerStyle.setAlignment(HorizontalAlignment.CENTER);
+        headerStyle.setFont(headerFont);
+//        CellRangeAddress cra0 = new CellRangeAddress(0, 1, 0, cnt);// 合并单元格
+//        sheet.addMergedRegion(cra0);
+//        //创建标标题题
+//        Row row = sheet.createRow(0);
+//        Cell cell1 = row.createCell(0);
+//        cell1.setCellValue(heardName);
+//        cell1.setCellStyle(headerStyle);
+
+        // 设置字体样式
+        HSSFFont titleFont = workbook.createFont();
+        titleFont.setBold(true);
+        titleFont.setFontHeightInPoints((short) 10);
+
+        style.setFont(titleFont);
+        style.setAlignment(HorizontalAlignment.CENTER);
+        //循环字段名数组,创建标题行
+        Row row = sheet.createRow(0);
+        for (int j = 0; j< tableAttributeName.length; j++){
+            //创建列
+            Cell cell = row.createCell(j);
+            cell.setCellStyle(style);
+            //设置单元类型为String
+            cell.setCellType(CellType.STRING);
+            cell.setCellValue(transCellType(tableAttributeName[j]));
+        }
+
+        int index = 0;
+        //创建普通行
+        for (int i = 0;i<datalist.size();i++){
+            //因为第一行已经用于创建标题行,故从第二行开始创建
+
+
+            if ((i + 1) % 65535 == 0) {
+                sheet = workbook.createSheet("sheet" + (index+1));
+                row = sheet.createRow(0);
+                for (int j = 0; j< tableAttributeName.length; j++){
+                    //创建列
+                    Cell cell = row.createCell(j);
+                    cell.setCellStyle(style);
+                    //设置单元类型为String
+                    cell.setCellType(CellType.STRING);
+                    cell.setCellValue(transCellType(tableAttributeName[j]));
+                }
+                index++;
+            }
+            row = sheet.createRow((i + 1) - (index * 65535));
+
+            //如果是第一行就让其为标题行
+            Object targetObj = datalist.get(i);
+            for (int j = 0;j<fields.length;j++){
+
+                if(!fields[j].getName().equals("serialVersionUID"))
+                {
+                    //创建列
+                    Cell cell = row.createCell(j);
+                    cell.setCellType(CellType.STRING);
+                    //
+                    try {
+                        Object value = methodList.get(j).invoke(targetObj, new Object[]{});
+                        cell.setCellValue(transCellType(value));
+                    } catch (IllegalAccessException e) {
+                        e.printStackTrace();
+                    } catch (InvocationTargetException e) {
+                        e.printStackTrace();
+                    }
+                }
+
+            }
+        }
+
+        if(StringUtils.notEmp(filename))
+        {
+            StringBuilder sb=new StringBuilder("/usr/local/gyee/monitor/");
+            sb.append(filename);
+            sb.append(".xls");
+
+            FileUtils.deleteFile(String.valueOf(sb));
+
+            FileOutputStream fileOutputStream = new FileOutputStream(String.valueOf(sb));
+
+            workbook.write(fileOutputStream);
+            fileOutputStream.close();
+
+        }
+
+    }
+    private static String transCellType(Object value){
+        String str = null;
+        if (value instanceof Date){
+            Date date = (Date) value;
+            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+            str = sdf.format(date);
+        }else{
+            str = String.valueOf(value);
+            if (str == "null"){
+                str = "";
+            }
+        }
+
+        return str;
+    }
+
+
+}

+ 179 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/file/FileUploadUtils.java

@@ -0,0 +1,179 @@
+package com.gyee.frame.common.file;
+
+import java.io.File;
+import java.io.IOException;
+import org.apache.commons.fileupload.FileUploadBase.FileSizeLimitExceededException;
+import org.apache.shiro.crypto.hash.Md5Hash;
+import org.springframework.util.ClassUtils;
+import org.springframework.web.multipart.MultipartFile;
+import com.gyee.frame.common.conf.FileConfig;
+import com.gyee.frame.common.conf.V2Config;
+import com.gyee.frame.common.exception.file.FileNameLengthLimitExceededException;
+import com.gyee.frame.util.StringUtils;
+
+/**
+ * 文件上传工具类
+ * @author gyee
+ * @date: 2018年9月22日 下午10:33:23
+ */
+public class FileUploadUtils {
+
+    private FileUploadUtils(){}
+    
+    /**
+     * spring.servlet.multipart.maxFileSize
+     */
+    public static  long DEFAULT_MAX_SIZE=Long.valueOf(FileConfig.getMaxFileSize())*1024*1024;
+    /**
+     * 默认上传的地址
+     */
+    private static String defaultBaseDir = V2Config.getDefaultBaseDir();
+    
+    /**
+     * 是否上传到static
+     */
+    private static String isstatic=V2Config.getIsstatic();
+    
+    /**
+     * 默认的文件名最大长度
+     */
+    public static final int DEFAULT_FILE_NAME_LENGTH = 100;
+    /**
+     * 默认文件类型jpg
+     */
+    public static final String IMAGE_JPG_EXTENSION = ".jpg";
+
+    private static int counter = 0;
+
+    public static void setDefaultBaseDir(String defaultBaseDir)
+    {
+        FileUploadUtils.defaultBaseDir = defaultBaseDir;
+    }
+
+    public static String getDefaultBaseDir()
+    {
+        return defaultBaseDir;
+    }
+
+    public static String getIsstatic() {
+		return isstatic;
+	}
+
+	public static void setIsstatic(String isstatic) {
+		FileUploadUtils.isstatic = isstatic;
+	}
+	
+	/**
+	 * 静态文件上传后存放的目录
+	 */
+	public static String getRoot_dir() {
+		String url=ClassUtils.getDefaultClassLoader().getResource("").getPath()+V2Config.getIsroot_dir();
+		return url;
+	}
+
+
+	/**
+     * 以默认配置进行文件上传
+     *
+     * @param file 上传的文件
+     * @return 文件名称
+     * @throws Exception
+     */
+    public static final String upload(MultipartFile file) throws IOException
+    {
+        try
+        {
+        	if("Y".equals(getIsstatic())) {//获取根目录
+        		
+        		 return upload(getRoot_dir(), file);
+        	}else {//自定义目录
+        		 return upload(getDefaultBaseDir(), file);
+        	}
+        }
+        catch (Exception e)
+        {
+            throw new IOException(e);
+        }
+    }
+
+    /**
+     * 文件上传
+     *
+     * @param baseDir 相对应用的基目录
+     * @param file 上传的文件
+     * @param needDatePathAndRandomName 是否需要日期目录和随机文件名前缀
+     * @param extension 上传文件类型
+     * @return 返回上传成功的文件名
+     * @throws FileSizeLimitExceededException 如果超出最大大小
+     * @throws FileNameLengthLimitExceededException 文件名太长
+     * @throws IOException 比如读写文件出错时
+     */
+    public static final String upload(String baseDir, MultipartFile file)
+            throws FileSizeLimitExceededException, IOException, FileNameLengthLimitExceededException
+    {
+    	String fileName=file.getOriginalFilename();
+    	// 获得文件后缀名称
+    	String suffixName = fileName.substring(fileName.lastIndexOf(".")).toLowerCase();
+    	if(StringUtils.isEmpty(suffixName)) {
+    		//如果没有后缀默认后缀
+    		suffixName=FileUploadUtils.IMAGE_JPG_EXTENSION;
+    	}
+    	
+        int fileNamelength = fileName.length();
+        if (fileNamelength > FileUploadUtils.DEFAULT_FILE_NAME_LENGTH)
+        {
+            throw new FileNameLengthLimitExceededException(fileName, fileNamelength,
+                    FileUploadUtils.DEFAULT_FILE_NAME_LENGTH);
+        }
+
+        assertAllowed(file);
+
+        String new_fileName = encodingFilename(fileName, suffixName);
+
+        File desc = getAbsoluteFile(baseDir, baseDir + new_fileName);
+        file.transferTo(desc);
+        return new_fileName;
+    }
+
+    private static final File getAbsoluteFile(String uploadDir, String filename) throws IOException
+    {
+        File desc = new File(File.separator + filename);
+
+        if (!desc.getParentFile().exists())
+        {
+            desc.getParentFile().mkdirs();
+        }
+        if (!desc.exists())
+        {
+            desc.createNewFile();
+        }
+        return desc;
+    }
+
+    /**
+     * 编码文件名
+     */
+    private static final String encodingFilename(String filename, String extension)
+    {
+        filename = filename.replace("_", " ");
+        filename = new Md5Hash(filename + System.nanoTime() + counter++).toHex().toString() + extension;
+        return filename;
+    }
+
+    /**
+     * 文件大小校验
+     *
+     * @param file 上传的文件
+     * @return
+     * @throws FileSizeLimitExceededException 如果超出最大大小
+     */
+    public static final void assertAllowed(MultipartFile file) throws FileSizeLimitExceededException
+    {
+        long size = file.getSize();
+        if (DEFAULT_MAX_SIZE != -1 && size > DEFAULT_MAX_SIZE)
+        {
+            throw new FileSizeLimitExceededException("超过默认大小", size, DEFAULT_MAX_SIZE);
+        }
+    }
+
+}

+ 110 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/file/FileUtils.java

@@ -0,0 +1,110 @@
+package com.gyee.frame.common.file;
+
+import org.apache.poi.ss.usermodel.Workbook;
+import org.apache.poi.ss.usermodel.WorkbookFactory;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.util.ClassUtils;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.*;
+
+/**
+ * 文件处理工具类
+ *
+ * @author gyee
+ * @date: 2018年9月22日 下午10:33:31
+ */
+public class FileUtils {
+
+    // 设置目标文件的映射路径
+    @Value("classpath:static/syz")
+    private Resource syz;
+
+    private FileUtils() {
+    }
+
+    /**
+     * 输出指定文件的byte数组
+     *
+     * @return
+     */
+    public static void writeBytes(String filePath, OutputStream os) throws IOException {
+        FileInputStream fis = null;
+        try {
+            File file = new File(filePath);
+            if (!file.exists()) {
+                throw new FileNotFoundException(filePath);
+            }
+            fis = new FileInputStream(file);
+            byte[] b = new byte[1024];
+            int length;
+            while ((length = fis.read(b)) > 0) {
+                os.write(b, 0, length);
+            }
+        } catch (IOException e) {
+            throw e;
+        } finally {
+            if (os != null) {
+                try {
+                    os.close();
+                } catch (IOException e1) {
+                    e1.printStackTrace();
+                }
+            }
+            if (fis != null) {
+                try {
+                    fis.close();
+                } catch (IOException e1) {
+                    e1.printStackTrace();
+                }
+            }
+        }
+    }
+
+    /**
+     * 删除文件
+     *
+     * @param filePath 文件
+     * @return
+     */
+    public static boolean deleteFile(String filePath) {
+        boolean flag = false;
+        File file = new File(filePath);
+        // 路径为文件且不为空则进行删除
+        if (file.isFile() && file.exists()) {
+            file.delete();
+            flag = true;
+        }
+        return flag;
+    }
+
+    /**
+     * 读取图片地址 输出到页面
+     *
+     * @param request
+     * @param response
+     * @param fileurl
+     * @throws IOException
+     */
+    public static void readIMGTohtml(HttpServletRequest request, HttpServletResponse response, String fileurl) throws IOException {
+        //设置发送到客户端的响应内容类型
+        response.setContentType("image/*");
+        //读取本地图片输入流
+        try (FileInputStream inputStream = new FileInputStream(fileurl); OutputStream out = response.getOutputStream()) {
+            int i = inputStream.available();
+            //byte数组用于存放图片字节数据
+            byte[] buff = new byte[i];
+            inputStream.read(buff);
+            out.write(buff);
+        }
+    }
+
+
+
+
+
+
+
+}

+ 189 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/interceptor/MyInterceptor.java

@@ -0,0 +1,189 @@
+package com.gyee.frame.common.interceptor;
+
+import cn.hutool.core.util.StrUtil;
+import com.gyee.frame.common.spring.SpringUtils;
+import com.gyee.frame.model.auto.SysInterUrl;
+import com.gyee.frame.model.auto.SysInterUrlExample;
+import com.gyee.frame.service.SysInterUrlService;
+import org.springframework.web.servlet.HandlerInterceptor;
+import org.springframework.web.servlet.ModelAndView;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.ArrayList;
+import java.util.List;
+/**
+ * 自定义拦截器
+ * @author fc
+ *
+ */
+public class MyInterceptor  implements HandlerInterceptor {
+
+    /*************演示模式需要 start*************/
+    /**需要被拦截的post请求url**/
+    public static List<SysInterUrl> posturllist=new ArrayList<SysInterUrl>();
+    /**需要被拦截的get请求url**/
+    public static List<SysInterUrl> geturllist=new ArrayList<SysInterUrl>();
+
+    public static SysInterUrlService interUrlService= SpringUtils.getBean(SysInterUrlService.class);
+    /**
+     * 初始化静态块,避免多次创建调用
+     * 需要拦截的请求集合
+     */
+    static {
+
+        SysInterUrlExample example_post= new SysInterUrlExample();
+        geturllist=interUrlService.selectByExample(example_post);
+//		//用户POST请求
+//		posturllist.add("/UserController/add");
+//		posturllist.add("/UserController/remove");
+//		posturllist.add("/UserController/edit");
+//		posturllist.add("/UserController/editPwd");
+//		//自动生成POST请求
+//		posturllist.add("/autoCodeController/addGlobal");
+//		posturllist.add("/autoCodeController/saveOne");
+//		//字典表POST请求
+//		posturllist.add("/DictDataController/add");
+//		posturllist.add("/DictDataController/remove");
+//		posturllist.add("/DictDataController/edit");
+//		posturllist.add("/DictTypeController/add");
+//		posturllist.add("/DictTypeController/remove");
+//		posturllist.add("/DictTypeController/edit");
+//		//邮箱POST请求
+//		posturllist.add("/EmailController/add");
+//		posturllist.add("/EmailController/edit");
+//		//文件上传POST请求
+//		posturllist.add("/FileController/upload");
+//		posturllist.add("/FileController/add");
+//		posturllist.add("/FileController/remove");
+//		posturllist.add("/FileController/del_file");
+//		posturllist.add("/FileController/edit");
+//		//日志POST请求
+//		posturllist.add("/LogController/remove");
+//		//权限POST请求
+//		posturllist.add("/PermissionController/add");
+//		posturllist.add("/PermissionController/remove");
+//		posturllist.add("/PermissionController/edit");
+//		//定时器POST请求
+//		posturllist.add("/SysQuartzJobController/add");
+//		posturllist.add("/SysQuartzJobController/remove");
+//		posturllist.add("/SysQuartzJobController/edit");
+//		posturllist.add("/SysQuartzJobController/changeStatus");
+//		posturllist.add("/SysQuartzJobController/run");
+//		posturllist.add("/SysQuartzJobLogController/remove");
+//		//角色POST请求
+//		posturllist.add("/RoleController/add");
+//		posturllist.add("/RoleController/remove");
+//		posturllist.add("/RoleController/edit");
+//		//公告POST请求
+//		posturllist.add("/SysNoticeController/add");
+//		posturllist.add("/SysNoticeController/remove");
+//		posturllist.add("/SysNoticeController/viewinfo");
+//		posturllist.add("/SysNoticeController/edit");
+//		//省份POST请求
+//		posturllist.add("/SysProvinceController/add");
+//		posturllist.add("/SysProvinceController/remove");
+//		posturllist.add("/SysProvinceController/edit");
+//		//地区POST请求
+//		posturllist.add("/SysAreaController/add");
+//		posturllist.add("/SysAreaController/remove");
+//		posturllist.add("/SysAreaController/edit");
+//		//城市POST请求
+//		posturllist.add("/SysCityController/add");
+//		posturllist.add("/SysCityController/remove");
+//		posturllist.add("/SysCityController/edit");
+//		//街道POST请求
+//		posturllist.add("/SysStreetController/add");
+//		posturllist.add("/SysStreetController/remove");
+//		posturllist.add("/SysStreetController/edit");
+//		//百度编辑器POST请求
+//		posturllist.add("/UeditorController/ueditor");
+//		posturllist.add("/UeditorController/");
+//		posturllist.add("/UeditorController/imgUpload");
+//		//七牛POST请求
+//		posturllist.add("/QiNiuCloudController/uploadToQiNiu");
+//		//定时器GET请求
+//		geturllist.add("/quartz/stop");
+//		geturllist.add("/quartz/resume");
+//		geturllist.add("/quartz/update");
+//		geturllist.add("/quartz/delete");
+
+    }
+    /*************演示模式需要 end*************/
+    @Override
+    public void afterCompletion(HttpServletRequest arg0, HttpServletResponse arg1, Object arg2, Exception arg3)throws Exception {
+        // //System.out.println(">>>MyInterceptor1>>>>>>>在整个请求结束之后被调用,也就是在DispatcherServlet 渲染了对应的视图之后执行(主要是用于进行资源清理工作)");
+    }
+
+    @Override
+    public void postHandle(HttpServletRequest arg0, HttpServletResponse arg1, Object arg2, ModelAndView arg3)throws Exception {
+        // //System.out.println(">>>MyInterceptor1>>>>>>>请求处理之后进行调用,但是在视图被渲染之前(Controller方法调用之后)");
+    }
+
+    @Override
+    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object arg2) throws Exception {
+        //String url2=request.getScheme()+"://"+ request.getServerName();
+        ////System.out.println("xxxxxxxxx==="+"http://localhost:8081/");
+        ////System.out.println(">>>MyInterceptor1>>>>>>>在请求处理之前进行调用(Controller方法调用之前)");
+        //设置前端的全局 地址,如果前端网页错乱请修改这儿
+
+        // by Wang Jiawen 2020-01-07 临时补丁  调试需要暂时取消shiro大管家的登入限制
+//		TsysUser user = new TsysUser("1","admin","admin","管理员");
+//		Subject currentUser = SecurityUtils.getSubject();
+//		UsernamePasswordToken token =new UsernamePasswordToken("admin",user.getPassword());
+//		token.setRememberMe(true);
+//		currentUser.login(token);
+        //结束
+
+
+//		request.setAttribute("rootPath", request.getContextPath());
+//		if(V2Config.getDemoEnabled().equals("true")) {
+//			Boolean b = ifurl(request, response);
+//			if(b) {
+//				throw new DemoModeException();
+//			}
+//		}
+//		return true;// 只有返回true才会继续向下执行,返回false取消当前请求
+
+        request.setAttribute("rootPath", request.getContextPath());
+        //开启与关闭url过滤
+        if(ifurl(request, response)) {
+          return false;
+        }
+        return true;// 只有返回true才会继续向下执行,返回false取消当前请求
+    }
+
+    /**
+     * 判断是否需要拦截的用于展示演示模式
+     * @param request
+     * @param response
+     * @return
+     * @author gyee
+     * @Date 2019年11月11日 下午5:17:30
+     */
+    public Boolean ifurl(HttpServletRequest request, HttpServletResponse response) {
+        //当前请求
+        String requesturl=request.getRemoteAddr();
+
+        String url="http://" + request.getRemoteAddr() //服务器地址
+                + ":"
+                + request.getServerPort()           //端口号
+                + request.getRequestURI();
+
+        if(request.getMethod().equals("POST")) {
+            for (SysInterUrl sysInterUrl : posturllist) {
+                if(StrUtil.containsAnyIgnoreCase(url, sysInterUrl.getUrl())) {
+                    return true;
+                }
+            }
+        }else if(request.getMethod().equals("GET")){
+            for (SysInterUrl sysInterUrl : geturllist) {
+                if(StrUtil.containsAnyIgnoreCase(url, sysInterUrl.getUrl())) {
+                    return true;
+                }
+            }
+        }
+
+        return false;
+    }
+}

+ 108 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/interceptor/MyWebAppConfigurer.java

@@ -0,0 +1,108 @@
+package com.gyee.frame.common.interceptor;
+
+import com.gyee.frame.common.conf.V2Config;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.web.servlet.config.annotation.*;
+
+/**
+ * 拦截器
+* @ClassName: MyWebAppConfigurer
+* @author gyee
+* @date 2018年6月3日
+*
+ */
+@Configuration
+public class MyWebAppConfigurer  extends  WebMvcConfigurationSupport  {
+	
+	private static Logger logger=LoggerFactory.getLogger(WebMvcConfigurationSupport.class);
+	/**
+     * 默认上传的地址
+     */
+    private  String defaultBaseDir = V2Config.getDefaultBaseDir();
+    
+    /**
+     * 静态文件夹后目录
+     */
+    private  String isrootDir=V2Config.getIsroot_dir();
+    
+    /**
+     * 是否上传到static
+     */
+    private   String isstatic=V2Config.getIsstatic();
+	
+	
+	/** 解决跨域问题 **/
+	@Override
+	public void addCorsMappings(CorsRegistry registry){
+
+
+        registry.addMapping("/**")
+			// 设置允许跨域请求的域名
+			.allowedOrigins("*")
+			// 是否允许证书
+			.allowCredentials(true)
+			// 设置允许的方法
+			.allowedMethods("GET", "POST", "DELETE", "PUT")
+			// 设置允许的header属性
+			.allowedHeaders("*")
+				// 跨域允许时间
+			.maxAge(3600);
+			super.addCorsMappings(registry);
+
+	}
+	
+	/** 添加拦截器 **/
+	@Override
+	protected void addInterceptors(InterceptorRegistry registry){
+		registry.addInterceptor(new MyInterceptor());
+		super.addInterceptors(registry);
+	}
+	
+	/** 这里配置视图解析器 **/
+	@Override
+	protected void configureViewResolvers(ViewResolverRegistry registry){
+		super.configureViewResolvers(registry);
+	}
+	
+	/** 配置内容裁决的一些选项 **/
+	@Override
+	protected void configureContentNegotiation(ContentNegotiationConfigurer configurer){
+		super.configureContentNegotiation(configurer);
+	}
+	
+	/** 视图跳转控制器 **/
+	@Override
+	protected void addViewControllers(ViewControllerRegistry registry) {
+		
+		super.addViewControllers(registry);
+	}
+	
+	
+	/** 静态资源处理 **/
+	@Override
+    protected void addResourceHandlers(ResourceHandlerRegistry registry) {
+		//配置虚拟路径为项目得static下面
+        registry.addResourceHandler("/static/**").addResourceLocations("classpath:/static/");
+        if(!"Y".equals(isstatic)) {
+        	 //配置上传路径为D盘
+            registry.addResourceHandler("/static/file_upload/**").addResourceLocations("file:"+defaultBaseDir);
+            logger.info("初始化文件上传路径为项目【"+defaultBaseDir+"】路径");
+        }else {
+        	logger.info("初始化文件上传路径为项目【"+isrootDir+"】路径");
+        }
+       
+    }
+	/** 默认静态资源处理器 **/
+	
+	protected void configureDefaultServletHandling(DefaultServletHandlerConfigurer configurer) {
+		//super.configureDefaultServletHandling(configurer);
+		//configurer.enable("stati");
+		configurer.enable();
+	}
+	
+	
+	
+	
+}

+ 31 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/log/Log.java

@@ -0,0 +1,31 @@
+package com.gyee.frame.common.log;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * 自定义操作日志记录注解
+ * @author gyee
+ * @date: 2018年9月30日 下午3:36:05
+ */
+@Target({ ElementType.PARAMETER, ElementType.METHOD })
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+public @interface Log
+{
+    /** 模块 */
+    String title() default "";
+
+    /** 功能 */
+    String action() default "";
+
+    /** 渠道 */
+    String channel() default "1";//1后台
+
+    /** 是否保存请求的参数 */
+    boolean isSaveRequestData() default true;
+
+}

+ 186 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/log/LogAspect.java

@@ -0,0 +1,186 @@
+package com.gyee.frame.common.log;
+
+import java.lang.reflect.Method;
+import java.util.Date;
+import java.util.Map;
+import org.aspectj.lang.JoinPoint;
+import org.aspectj.lang.Signature;
+import org.aspectj.lang.annotation.AfterReturning;
+import org.aspectj.lang.annotation.AfterThrowing;
+import org.aspectj.lang.annotation.Aspect;
+import org.aspectj.lang.annotation.Pointcut;
+import org.aspectj.lang.reflect.MethodSignature;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import javax.annotation.Resource;
+import org.springframework.scheduling.annotation.Async;
+import org.springframework.scheduling.annotation.EnableAsync;
+import org.springframework.stereotype.Component;
+import com.gyee.frame.model.auto.TsysOperLog;
+import com.gyee.frame.model.auto.TsysUser;
+import com.gyee.frame.service.SysOperLogService;
+import com.gyee.frame.shiro.util.ShiroUtils;
+import com.gyee.frame.util.ServletUtils;
+import com.gyee.frame.util.StringUtils;
+import com.google.gson.Gson;
+
+/**
+ * 操作日志记录处理
+ * @author gyee
+ * @date: 2018年9月30日 下午1:40:33
+ */
+@Aspect
+@Component
+@EnableAsync
+public class LogAspect
+{
+    private static final Logger log = LoggerFactory.getLogger(LogAspect.class);
+
+    @Resource
+    private SysOperLogService operLogService;
+
+    // 配置织入点
+    @Pointcut("@annotation(com.gyee.frame.common.log.Log)")
+    public void logPointCut()
+    {
+    }
+
+    /**
+     * 前置通知 用于拦截操作
+     *
+     * @param joinPoint 切点
+     */
+    @AfterReturning(pointcut = "logPointCut()")
+    public void doBefore(JoinPoint joinPoint)
+    {
+        handleLog(joinPoint, null);
+    }
+
+    /**
+     * 拦截异常操作
+     * 
+     * @param joinPoint
+     * @param e
+     */
+    @AfterThrowing(value = "logPointCut()", throwing = "e")
+    public void doAfter(JoinPoint joinPoint, Exception e)
+    {
+        handleLog(joinPoint, e);
+    }
+
+    @Async
+    protected void handleLog(final JoinPoint joinPoint, final Exception e)
+    {
+        try
+        {
+            // 获得注解
+            Log controllerLog = getAnnotationLog(joinPoint);
+            if (controllerLog == null)
+            {
+                return;
+            }
+
+            // 获取当前的用户
+            TsysUser currentUser = ShiroUtils.getUser();
+
+            // *========数据库日志=========*//
+            TsysOperLog operLog = new TsysOperLog();
+           
+            //赋值操作
+            /*String ip = ShiroUtils.getIp();
+            operLog.setOperIp(ip);*/
+            // 操作地点
+            //operLog.setOperLocation(AddressUtils.getRealAddressByIP(ip));
+            // 请求的地址
+            operLog.setOperUrl(ServletUtils.getRequest().getRequestURI());
+            if (currentUser != null)
+            {
+//            	//操作人
+                operLog.setOperName(currentUser.getUsername());
+//                if (StringUtils.isNotNull(currentUser.getDept())
+//                        && StringUtils.isNotEmpty(currentUser.getDept().getDeptName()))
+//                {
+//                    operLog.setDeptName(currentUser.getDept().getDeptName());
+//                }
+            }
+
+            if (e != null)
+            {
+            	//错误日志
+            	operLog.setErrorMsg(StringUtils.substring(e.getMessage(), 0, 2000));
+            }
+            // 设置方法名称
+            String className = joinPoint.getTarget().getClass().getName();
+            String methodName = joinPoint.getSignature().getName();
+            operLog.setMethod(className + "." + methodName + "()");
+            operLog.setOperTime(new Date());
+            // 处理设置注解上的参数
+            getControllerMethodDescription(controllerLog, operLog);
+            // 保存数据库
+            //System.out.println("-----------------");
+            //System.out.println(new Gson().toJson(operLog));
+            //System.out.println("-----------------");
+            operLogService.insertSelective(operLog);
+        }
+        catch (Exception exp)
+        {
+            // 记录本地异常日志
+            log.error("==前置通知异常==");
+            log.error("异常信息:{}", exp.getMessage());
+            exp.printStackTrace();
+        }
+    }
+
+    /**
+     * 获取注解中对方法的描述信息 用于Controller层注解
+     * 
+     * @param joinPoint 切点
+     * @return 方法描述
+     * @throws Exception
+     */
+    public void getControllerMethodDescription(Log log, TsysOperLog operLog) throws Exception
+    {
+        // 设置action动作
+       // operLog.setAction(log.action());
+        // 设置标题
+        operLog.setTitle(log.title());
+        // 设置channel
+        //operLog.setChannel(log.channel());
+        // 是否需要保存request,参数和值
+        if (log.isSaveRequestData())
+        {
+            // 获取参数的信息,传入到数据库中。
+            setRequestValue(operLog);
+        }
+    }
+
+    /**
+     * 获取请求的参数,放到log中
+     * 
+     * @param operLog
+     * @param request
+     */
+    private void setRequestValue(TsysOperLog operLog)
+    {
+        Map<String, String[]> map = ServletUtils.getRequest().getParameterMap();
+        Gson gson=new Gson();
+        String params = gson.toJson(map);
+        operLog.setOperParam(StringUtils.substring(params, 0, 255));
+    }
+
+    /**
+     * 是否存在注解,如果存在就获取
+     */
+    private Log getAnnotationLog(JoinPoint joinPoint) throws Exception
+    {
+        Signature signature = joinPoint.getSignature();
+        MethodSignature methodSignature = (MethodSignature) signature;
+        Method method = methodSignature.getMethod();
+
+        if (method != null)
+        {
+            return method.getAnnotation(Log.class);
+        }
+        return null;
+    }
+}

+ 100 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/quartz/AbstractQuartzJob.java

@@ -0,0 +1,100 @@
+package com.gyee.frame.common.quartz;
+
+import com.gyee.frame.model.auto.SysQuartzJob;
+import org.quartz.Job;
+import org.quartz.JobExecutionContext;
+import org.quartz.JobExecutionException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.BeanUtils;
+
+import java.util.Date;
+
+/**
+ * @CLASSNAME AbstractQuartzJob
+ * @Description
+ * @Auther Jan  橙寂
+ * @DATE 2019/9/5 0005 15:05
+ */
+
+public abstract class AbstractQuartzJob implements Job {
+
+    private static final Logger log = LoggerFactory.getLogger(AbstractQuartzJob.class);
+
+    /**
+     * 线程本地变量
+     */
+    private static ThreadLocal<Date> threadLocal = new ThreadLocal<>();
+
+    @Override
+    public void execute(JobExecutionContext context) throws JobExecutionException
+    {
+    	SysQuartzJob sysJob = new SysQuartzJob();
+        BeanUtils.copyProperties(context.getMergedJobDataMap().get(ScheduleConstants.TASK_PROPERTIES),sysJob);
+        try
+        {
+            before(context, sysJob);
+            if (sysJob != null)
+            {
+                doExecute(context, sysJob);
+            }
+            after(context, sysJob, null);
+        }
+        catch (Exception e)
+        {
+            log.error("任务执行异常  - :", e);
+            after(context, sysJob, e);
+        }
+    }
+
+    /**
+     * 执行前
+     *
+     * @param context 工作执行上下文对象
+     * @param sysJob 系统计划任务
+     */
+    protected void before(JobExecutionContext context, SysQuartzJob sysJob)
+    {
+        threadLocal.set(new Date());
+    }
+
+    /**
+     * 执行后
+     *
+     * @param context 工作执行上下文对象
+     * @param sysJob 系统计划任务
+     */
+    protected void after(JobExecutionContext context, SysQuartzJob sysJob, Exception e)
+    {
+        Date startTime = threadLocal.get();
+        threadLocal.remove();
+
+//        final SysQuartzJobLog sysJobLog = new SysQuartzJobLog();
+//        sysJobLog.setJobName(sysJob.getJobName());
+//        sysJobLog.setJobGroup(sysJob.getJobGroup());
+//        sysJobLog.setInvokeTarget(sysJob.getInvokeTarget());
+//        sysJobLog.setStartTime(startTime);
+//        sysJobLog.setEndTime(new Date());
+//        long runMs = sysJobLog.getEndTime().getTime() - sysJobLog.getStartTime().getTime();
+//        sysJobLog.setJobMessage(sysJobLog.getJobName() + " 总共耗时:" + runMs + "毫秒");
+//        if (e != null)
+//        {
+//            sysJobLog.setStatus(ScheduleConstants.FAIL_STATUS);
+//            String errorMsg = StringUtils.substring(ExceptionUtil.getMessage(e), 0, 2000);
+//            sysJobLog.setExceptionInfo(errorMsg);
+//        }
+//        else
+//        {
+//            sysJobLog.setStatus(ScheduleConstants.SUCCESS_STATUS);
+//        }
+//        //  这里获取service然后插入库中
+//        SpringUtils.getBean(SysQuartzJobLogService.class).insertSelective(sysJobLog);
+    }
+
+    /**
+     * 子类去实现
+     * @param jobExecutionContext
+     * @param sysJob
+     */
+    protected abstract void doExecute(JobExecutionContext jobExecutionContext, SysQuartzJob sysJob) throws Exception;
+}

+ 29 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/quartz/QuartzConfig.java

@@ -0,0 +1,29 @@
+package com.gyee.frame.common.quartz;
+
+import org.quartz.Scheduler;
+import org.quartz.SchedulerException;
+import org.quartz.SchedulerFactory;
+import org.quartz.impl.StdSchedulerFactory;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * @CLASSNAME QuartzConfig
+ * @Description  Quartz配置类
+ * @Auther Jan  橙寂
+ * @DATE 2019/9/2 0002 15:21
+ */
+@Configuration
+public class QuartzConfig {
+
+    /**
+     * 初始注入scheduler
+     * @return
+     * @throws SchedulerException
+     */
+    @Bean
+    public Scheduler scheduler() throws SchedulerException{
+        SchedulerFactory schedulerFactoryBean = new StdSchedulerFactory();
+        return schedulerFactoryBean.getScheduler();
+    }
+}

+ 23 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/quartz/QuartzDisallowConcurrentExecution.java

@@ -0,0 +1,23 @@
+package com.gyee.frame.common.quartz;
+
+import com.gyee.frame.common.quartz.utils.JobInvokeUtil;
+import com.gyee.frame.model.auto.SysQuartzJob;
+
+import org.quartz.DisallowConcurrentExecution;
+import org.quartz.JobExecutionContext;
+
+/**
+ * 定时任务处理(禁止并发执行)
+ * 
+ * @author jan 橙寂
+ *
+ */
+@DisallowConcurrentExecution
+public class QuartzDisallowConcurrentExecution extends AbstractQuartzJob
+{
+    @Override
+    protected void doExecute(JobExecutionContext context, SysQuartzJob sysJob) throws Exception
+    {
+        JobInvokeUtil.invokeMethod(sysJob);
+    }
+}

+ 22 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/quartz/QuartzJobExecution.java

@@ -0,0 +1,22 @@
+package com.gyee.frame.common.quartz;
+
+import com.gyee.frame.common.quartz.utils.JobInvokeUtil;
+import com.gyee.frame.model.auto.SysQuartzJob;
+
+import org.quartz.JobExecutionContext;
+
+/**
+ * 定时任务处理(允许并发执行)
+ * 
+ * @author  jan  橙寂
+ *
+ */
+public class QuartzJobExecution extends AbstractQuartzJob
+{
+    @Override
+    protected void doExecute(JobExecutionContext context, SysQuartzJob sysJob) throws Exception {
+        JobInvokeUtil.invokeMethod(sysJob);
+    }
+
+
+}

+ 410 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/quartz/QuartzSchedulerUtil.java

@@ -0,0 +1,410 @@
+package com.gyee.frame.common.quartz;
+
+import com.gyee.frame.common.spring.SpringUtils;
+import com.gyee.frame.model.auto.SysQuartzJob;
+import com.gyee.frame.model.auto.SysQuartzJobExample;
+import com.gyee.frame.service.SysQuartzJobService;
+import com.gyee.frame.util.StringUtils;
+import org.quartz.*;
+import org.quartz.impl.JobDetailImpl;
+import org.quartz.impl.matchers.GroupMatcher;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Configuration;
+
+import javax.annotation.PostConstruct;
+import java.util.List;
+import java.util.Set;
+
+/**
+ * @CLASSNAME QuartzConfig
+ * @Description  Quartz配置类
+ * @Auther Jan  橙寂
+ * @DATE 2019/9/2 0002 15:21
+ */
+@Configuration
+public class QuartzSchedulerUtil {
+
+    @Autowired
+    private  Scheduler scheduler;
+    @Autowired
+    private SysQuartzJobService sysQuartzJobService; 
+
+    //这个东西可以放在配置文件中
+    //cron表达式 一分钟执行一次
+    private final  String TEST_CRON="0 0/1 * * * ?";
+
+    /**
+     * 容器初始化时执行此方法
+     * 也就是类初始化的时候
+     */
+    @PostConstruct
+    public void init() throws SchedulerException {
+    	
+    	List<SysQuartzJob> quartzJobs=sysQuartzJobService.selectByExample(new SysQuartzJobExample());
+    	for (SysQuartzJob job : quartzJobs) {
+    		try {
+    		    if(job.getId().indexOf("/topic/")!=-1)
+                {
+                    //防止因为数据问题重复创建
+                    if(checkJobExists(job))
+                    {
+                        deleteJob(job);
+                    }
+                    createSchedule(job);
+                }
+
+	        } catch (SchedulerException e) {
+	            e.printStackTrace();
+	        }
+		}
+        //这一块可以从数据库中查
+//        for (int i=1;i<=1;i++)
+//        {
+//            SysQuartzJob job=new SysQuartzJob();
+//            job.setId("332182389491109888");
+//            job.setJobName("v2Task2");
+//            job.setJobGroup("SYSTEM");
+//            job.setCronExpression("*/6 * * * * ?");
+//            //并发执行
+//            job.setConcurrent("0");
+//            //0启用
+//            job.setStatus(1);
+//            //执行的job类
+//            job.setInvokeTarget("v2Task.runTask2(1,2l,'asa',true,2D)");
+//            try {
+//                //防止因为数据问题重复创建
+//                if(checkJobExists(job))
+//                {
+//                    deleteJob(job);
+//                }
+//                createSchedule(job);
+//	        } catch (SchedulerException e) {
+//	            e.printStackTrace();
+//	        }
+//        }
+
+        start();
+
+    }
+
+    /**
+     * 启动定时器
+     */
+    public void start()
+{
+    try {
+        scheduler.start();
+    } catch (SchedulerException e) {
+        e.printStackTrace();
+        System.out.println("定时任务执行失败");
+    }
+}
+
+
+    /**
+     * 创建一个定时任务
+     * @param job
+     * @throws SchedulerException
+     */
+    public void createSchedule(SysQuartzJob job) throws SchedulerException {
+        if (!checkJobExists(job)) {
+            //获取指定的job工作类
+            Class<? extends Job> jobClass = getQuartzJobClass(job);
+            // 通过JobBuilder构建JobDetail实例,JobDetail规定只能是实现Job接口的实例
+            // JobDetail 是具体Job实例
+            JobDetail jobDetail = JobBuilder.newJob((Class<? extends Job>) jobClass).withIdentity(ScheduleConstants.TASK_CLASS_NAME+job.getId(),job.getJobGroup()).build();
+            // 基于表达式构建触发器
+            CronScheduleBuilder cronScheduleBuilder =null;
+            if(StringUtils.isNotEmpty(job.getCronExpression())) {
+            	cronScheduleBuilder = CronScheduleBuilder.cronSchedule(job.getCronExpression());
+            }else {
+            	cronScheduleBuilder = CronScheduleBuilder.cronSchedule(TEST_CRON);
+            }
+           
+            // CronTrigger表达式触发器 继承于Trigger  //cronScheduleBuilder.withMisfireHandlingInstructionDoNothing()错过60分钟后不在补偿 拉下的执行次数
+            // TriggerBuilder 用于构建触发器实例
+            CronTrigger cronTrigger = TriggerBuilder.newTrigger().withIdentity(ScheduleConstants.TASK_CLASS_NAME+job.getId(),job.getJobGroup())
+              .withSchedule(cronScheduleBuilder.withMisfireHandlingInstructionDoNothing()).build();
+            //放入参数,运行时的方法可以获取
+            jobDetail.getJobDataMap().put(ScheduleConstants.TASK_PROPERTIES, job);
+            scheduler.scheduleJob(jobDetail, cronTrigger);
+            
+            //如果这个工作的状态为1
+            if (job.getStatus().equals(1))
+            {
+                pauseJob(job);
+            }
+        }
+    }
+
+
+
+
+    /**
+     * 修改定时任务
+     * @param job
+     * @return
+     * @throws SchedulerException
+     */
+    public boolean modifyJob(SysQuartzJob job) {
+
+        try {
+            //先删除
+            if(checkJobExists(job))
+            {
+                deleteJob(job);
+            }
+            createSchedule(job);
+        } catch (SchedulerException e) {
+            e.printStackTrace();
+            return  false;
+        }
+        return  true;
+    }
+
+
+    /**
+     *  继续执行定时任务
+     * @param job
+     * @return
+     */
+    public boolean resumeJob(SysQuartzJob job) {
+        boolean bl = false;
+        try {
+            //JobKey定义了job的名称和组别
+            JobKey jobKey = JobKey.jobKey(ScheduleConstants.TASK_CLASS_NAME+job.getId(), job.getJobGroup());
+            if (jobKey != null) {
+                //继续任务
+                scheduler.resumeJob(jobKey);
+                bl = true;
+            }
+        } catch (SchedulerException e) {
+            System.out.println("继续调度任务异常:" + e);
+        } catch (Exception e) {
+            System.out.println("继续调度任务异常:" + e);
+        }
+        return bl;
+    }
+
+    /**
+     *  删除定时任务
+     * @param job
+     * @return
+     */
+    public boolean deleteJob(SysQuartzJob job) {
+        boolean bl = false;
+        try {
+            //JobKey定义了job的名称和组别
+            JobKey jobKey = JobKey.jobKey(ScheduleConstants.TASK_CLASS_NAME+job.getId(), job.getJobGroup());
+            if (jobKey != null) {
+                //删除定时任务
+                scheduler.deleteJob(jobKey);
+                bl = true;
+            }
+        } catch (SchedulerException e) {
+            System.out.println("删除调度任务异常:" + e);
+        } catch (Exception e) {
+            System.out.println("删除调度任务异常:" + e);
+        }
+        return bl;
+    }
+    
+    /**
+     * 获取jobKey
+     */
+    public  JobKey getJobKey(SysQuartzJob job)
+    {
+        return JobKey.jobKey(ScheduleConstants.TASK_CLASS_NAME + job.getId(),job.getJobGroup());
+    }
+    
+    /**
+     * 立即执行任务
+     */
+    public  void run(SysQuartzJob job) throws SchedulerException
+    {
+        // 参数
+        JobDataMap dataMap = new JobDataMap();
+        dataMap.put(ScheduleConstants.TASK_PROPERTIES, job);
+        scheduler.triggerJob(getJobKey(job), dataMap);
+    }
+    /**
+     * 暂停任务
+     * @param job
+     * @return
+     */
+    public boolean pauseJob(SysQuartzJob job) {
+        boolean bl = false;
+        try {
+            //JobKey定义了job的名称和组别
+            JobKey jobKey = JobKey.jobKey(ScheduleConstants.TASK_CLASS_NAME+job.getId(), job.getJobGroup());
+            //暂停任务
+            if (jobKey != null) {
+                scheduler.pauseJob(jobKey);
+                bl = true;
+            }
+        } catch (SchedulerException e) {
+             System.out.println("暂停调度任务异常:" + e);
+        } catch (Exception e) {
+        	 System.out.println("暂停调度任务异常:"+ e);
+        }
+        return bl;
+    }
+
+    /**
+     * 判断定时任务是否已经存在
+     * @param job
+     * @return
+     * @throws SchedulerException
+     */
+    public boolean checkJobExists(SysQuartzJob job) throws SchedulerException {
+        TriggerKey triggerKey = TriggerKey.triggerKey(ScheduleConstants.TASK_CLASS_NAME+job.getId(), job.getJobGroup());
+        return scheduler.checkExists(triggerKey);
+    }
+
+
+    /**
+     * 获取定时任务的具体执行类
+     * @param sysJob
+     * @return
+     */
+    private static Class<? extends Job> getQuartzJobClass(SysQuartzJob sysJob)
+    {
+        boolean isConcurrent = "0".equals(sysJob.getConcurrent());
+        return isConcurrent ? QuartzJobExecution.class : QuartzDisallowConcurrentExecution.class;
+    }
+    
+    
+    @SuppressWarnings({ "unchecked", "rawtypes" })
+	public void getquartzList() throws SchedulerException {
+
+        List<String> triggerGroupNames = scheduler.getTriggerGroupNames();
+        for (String groupName : triggerGroupNames) {
+        	 //组装group的匹配,为了模糊获取所有的triggerKey或者jobKey 
+        	GroupMatcher groupMatcher = GroupMatcher.groupEquals(groupName);
+        	//获取所有的triggerKey
+        	 Set<TriggerKey> triggerKeySet = scheduler.getTriggerKeys(groupMatcher);
+        	 for (TriggerKey triggerKey : triggerKeySet) {
+        		 //通过triggerKey在scheduler中获取trigger对象
+                 CronTrigger trigger = (CronTrigger) scheduler.getTrigger(triggerKey);
+                 //获取trigger拥有的Job
+                 JobKey jobKey =trigger.getJobKey();
+                 JobDetailImpl jobDetail2 = (JobDetailImpl) scheduler.getJobDetail(jobKey);
+                 System.out.println(groupName);
+                 System.out.println(jobDetail2.getName());
+                 System.out.println(trigger.getCronExpression());
+        	 }
+        }
+    }
+
+    /**
+     * @purpose 根据socket 对一些job任务进行管制
+     */
+    @Configuration
+    public static class SocketTaskUtil {
+        private QuartzSchedulerUtil quartzSchedulerUtil = SpringUtils.getBean(QuartzSchedulerUtil.class);
+        private SysQuartzJobService sysQuartzJobService = SpringUtils.getBean(SysQuartzJobService.class);
+
+        String template="*";
+
+        public void pauseJob(SysQuartzJob sysQuartzJob){
+            quartzSchedulerUtil.pauseJob(sysQuartzJob);
+        }
+        public void startJob(SysQuartzJob sysQuartzJob){
+
+            try {
+                quartzSchedulerUtil.run(sysQuartzJob);
+            } catch (SchedulerException e) {
+                e.printStackTrace();
+            }
+        }
+        public void deleteJob(SysQuartzJob sysQuartzJob){
+            quartzSchedulerUtil.deleteJob(sysQuartzJob);
+        }
+        /**
+         *
+         *@description: 该方法通过计算jobid来找到job,通过job的对象来进一步控制job任务,用来重启某一具体的任务
+         *
+         *@param:[jobid] job的编码
+         *
+         *@return:void
+         *
+         *@createTime:2020/1/9
+         *
+         */
+        public void restartJob(String jobid){
+
+            List<SysQuartzJob> quartzJobs=sysQuartzJobService.selectByExample(new SysQuartzJobExample());
+            SysQuartzJob sysQuartzJob1 = null;
+            //找到具体的任务
+            for(SysQuartzJob sysQuartzJob:quartzJobs){
+                if(sysQuartzJob.getId().equalsIgnoreCase(jobid)){
+                    sysQuartzJob1=sysQuartzJob;
+                    break;
+                }
+            }
+            this.deleteJob(sysQuartzJob1);//符合标准步骤删除-创建-启动流程
+            try {
+               // //System.out.println(sysQuartzJob1.getJobName());
+
+                sysQuartzJob1.setStatus(0);//开启任务
+
+                quartzSchedulerUtil.createSchedule(sysQuartzJob1);
+
+                //startJob(sysQuartzJob1);
+            } catch (SchedulerException e) {
+                e.printStackTrace();
+            }
+            //this.startJob(sysQuartzJob1);
+        }
+
+
+        public void restartJob(String jobid,String params){
+
+            List<SysQuartzJob> quartzJobs=sysQuartzJobService.selectByExample(new SysQuartzJobExample());
+            SysQuartzJob sysQuartzJob1 = null;
+            //找到具体的任务
+            for(SysQuartzJob sysQuartzJob:quartzJobs){
+                if(sysQuartzJob.getId().equalsIgnoreCase(jobid)){
+                    sysQuartzJob1=sysQuartzJob;
+                    break;
+                }
+            }
+            this.deleteJob(sysQuartzJob1);//符合标准步骤删除-创建-启动流程
+            try {
+                // //System.out.println(sysQuartzJob1.getJobName());
+
+                sysQuartzJob1.setStatus(0);//开启任务
+
+                if(StringUtils.notEmp(params))
+                {
+                    String temp=sysQuartzJob1.getInvokeTarget().replace(template,params);
+                    sysQuartzJob1.setInvokeTarget(temp);
+                }
+
+                quartzSchedulerUtil.createSchedule(sysQuartzJob1);
+
+                //startJob(sysQuartzJob1);
+            } catch (SchedulerException e) {
+                e.printStackTrace();
+            }
+            //this.startJob(sysQuartzJob1);
+        }
+        public void deleteJob(String jobid){
+
+            List<SysQuartzJob> quartzJobs=sysQuartzJobService.selectByExample(new SysQuartzJobExample());
+            SysQuartzJob sysQuartzJob1 = null;
+            //找到具体的任务
+            for(SysQuartzJob sysQuartzJob:quartzJobs){
+                if(sysQuartzJob.getId().equalsIgnoreCase(jobid)){
+                    sysQuartzJob1=sysQuartzJob;
+                    break;
+                }
+            }
+            if(sysQuartzJob1!=null)
+            {
+                this.deleteJob(sysQuartzJob1);
+            }
+
+        }
+    }
+}

+ 66 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/quartz/ScheduleConstants.java

@@ -0,0 +1,66 @@
+package com.gyee.frame.common.quartz;
+
+/**
+ * 任务调度通用常量
+ * 
+ * @author jan 橙寂
+ */
+public interface ScheduleConstants
+{
+    public static final String TASK_CLASS_NAME = "TASK_CLASS_NAME";
+
+    /** 执行目标key */
+    public static final String TASK_PROPERTIES = "TASK_PROPERTIES";
+
+    /** 默认 */
+    public static final Integer MISFIRE_DEFAULT = 0;
+
+    /** 立即触发执行 */
+    public static final Integer MISFIRE_IGNORE_MISFIRES = 1;
+
+    /** 触发一次执行 */
+    public static final Integer MISFIRE_FIRE_AND_PROCEED = 2;
+
+    /** 不触发立即执行 */
+    public static final Integer MISFIRE_DO_NOTHING = 3;
+
+    /**
+     * 失败状态
+     */
+    public static final Integer FAIL_STATUS = 1;
+
+    /**
+     * 成功状态
+     */
+    public static final Integer SUCCESS_STATUS = 0;
+
+
+    /**
+     * 任务的关闭的状态
+     */
+    public static final Integer STOP_STATUS = 2;
+
+    public enum Status
+    {
+        /**
+         * 正常
+         */
+        NORMAL(0),
+        /**
+         * 暂停
+         */
+        PAUSE(1);
+
+        private Integer value;
+
+        private Status(Integer value)
+        {
+            this.value = value;
+        }
+
+        public Integer getValue()
+        {
+            return value;
+        }
+    }
+}

+ 191 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/quartz/utils/JobInvokeUtil.java

@@ -0,0 +1,191 @@
+package com.gyee.frame.common.quartz.utils;
+
+import com.gyee.frame.common.spring.SpringUtils;
+import com.gyee.frame.model.auto.SysQuartzJob;
+import com.gyee.frame.util.StringUtils;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.LinkedList;
+import java.util.List;
+
+/**
+ * 任务执行工具
+ *
+ * @author ruoyi
+ */
+public class JobInvokeUtil
+{
+    /**
+     * 执行方法
+     *
+     * @param sysJob 系统任务
+     */
+    public static void invokeMethod(SysQuartzJob sysJob) throws Exception
+    {
+        String invokeTarget = sysJob.getInvokeTarget();
+        String beanName = getBeanName(invokeTarget);
+        String methodName = getMethodName(invokeTarget);
+        List<Object[]> methodParams = getMethodParams(invokeTarget);
+
+        if (!isValidClassName(beanName))
+        {
+            Object bean = SpringUtils.getBean(beanName);
+            if (null != bean) {
+                invokeMethod(bean, methodName, methodParams);
+            }else {
+                System.out.println("找不到class["+ beanName +"]");
+            }
+        }
+        else
+        {
+            Object bean = Class.forName(beanName).newInstance();
+            if (null != bean) {
+                invokeMethod(bean, methodName, methodParams);
+            }else {
+                System.out.println("找不到class["+ beanName +"]");
+            }
+        }
+    }
+
+    /**
+     * 调用任务方法
+     *
+     * @param bean 目标对象
+     * @param methodName 方法名称
+     * @param methodParams 方法参数
+     */
+    private static void invokeMethod(Object bean, String methodName, List<Object[]> methodParams)
+            throws NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException,
+            InvocationTargetException
+    {
+        if (StringUtils.isNotNull(methodParams) && methodParams.size() > 0)
+        {
+            Method method = bean.getClass().getDeclaredMethod(methodName, getMethodParamsType(methodParams));
+            method.invoke(bean, getMethodParamsValue(methodParams));
+        }
+        else
+        {
+            Method method = bean.getClass().getDeclaredMethod(methodName);
+            method.invoke(bean);
+        }
+    }
+
+    /**
+     * 校验是否为为class包名
+     * 
+     * @param str 名称
+     * @return true是 false否
+     */
+    public static boolean isValidClassName(String invokeTarget)
+    {
+        return StringUtils.countMatches(invokeTarget, ".") > 1;
+    }
+
+    /**
+     * 获取bean名称
+     * 
+     * @param invokeTarget 目标字符串
+     * @return bean名称
+     */
+    public static String getBeanName(String invokeTarget)
+    {
+        String beanName = StringUtils.substringBefore(invokeTarget, "(");
+        return StringUtils.substringBeforeLast(beanName, ".");
+    }
+
+    /**
+     * 获取bean方法
+     * 
+     * @param invokeTarget 目标字符串
+     * @return method方法
+     */
+    public static String getMethodName(String invokeTarget)
+    {
+        String methodName = StringUtils.substringBefore(invokeTarget, "(");
+        return StringUtils.substringAfterLast(methodName, ".");
+    }
+
+    /**
+     * 获取method方法参数相关列表
+     * 
+     * @param invokeTarget 目标字符串
+     * @return method方法相关参数列表
+     */
+    public static List<Object[]> getMethodParams(String invokeTarget)
+    {
+        String methodStr = StringUtils.substringBetween(invokeTarget, "(", ")");
+        if (StringUtils.isEmpty(methodStr))
+        {
+            return null;
+        }
+        String[] methodParams = methodStr.split(",");
+        List<Object[]> classs = new LinkedList<>();
+        for (int i = 0; i < methodParams.length; i++)
+        {
+            String str = StringUtils.trimToEmpty(methodParams[i]);
+            // String字符串类型,包含'
+            if (StringUtils.contains(str, "'"))
+            {
+                classs.add(new Object[] { StringUtils.replace(str, "'", ""), String.class });
+            }
+            // boolean布尔类型,等于true或者false
+            else if (StringUtils.equals(str, "true") || StringUtils.equalsIgnoreCase(str, "false"))
+            {
+                classs.add(new Object[] { Boolean.valueOf(str), Boolean.class });
+            }
+            // long长整形,包含L
+            else if (StringUtils.containsIgnoreCase(str, "L"))
+            {
+                classs.add(new Object[] { Long.valueOf(StringUtils.replaceIgnoreCase(str, "L", "")), Long.class });
+            }
+            // double浮点类型,包含D
+            else if (StringUtils.containsIgnoreCase(str, "D"))
+            {
+                classs.add(new Object[] { Double.valueOf(StringUtils.replaceIgnoreCase(str, "D", "")), Double.class });
+            }
+            // 其他类型归类为整形
+            else
+            {
+                classs.add(new Object[] { Integer.valueOf(str), Integer.class });
+            }
+        }
+        return classs;
+    }
+
+    /**
+     * 获取参数类型
+     * 
+     * @param methodParams 参数相关列表
+     * @return 参数类型列表
+     */
+    public static Class<?>[] getMethodParamsType(List<Object[]> methodParams)
+    {
+        Class<?>[] classs = new Class<?>[methodParams.size()];
+        int index = 0;
+        for (Object[] os : methodParams)
+        {
+            classs[index] = (Class<?>) os[1];
+            index++;
+        }
+        return classs;
+    }
+
+    /**
+     * 获取参数值
+     * 
+     * @param methodParams 参数相关列表
+     * @return 参数值列表
+     */
+    public static Object[] getMethodParamsValue(List<Object[]> methodParams)
+    {
+        Object[] classs = new Object[methodParams.size()];
+        int index = 0;
+        for (Object[] os : methodParams)
+        {
+            classs[index] = (Object) os[0];
+            index++;
+        }
+        return classs;
+    }
+}

File diff suppressed because it is too large
+ 654 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/spring/Constant.java


+ 397 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/spring/ConstantTR.java

@@ -0,0 +1,397 @@
+package com.gyee.frame.common.spring;
+
+/**
+ * 
+ * 
+ * 项目名称:nxfd 类名称:Constant 类描述: 创建人:石林 创建时间:2014-3-4 上午10:07:03 修改人:shilinno1
+ * 修改时间:2014-3-4 上午10:07:03 修改备注:
+ * 
+ * @version
+ * 
+ */
+public class ConstantTR {
+
+	public static final String QSZSWDL = "JSFW.NX_GD_XXX_XX_XX_XXX_XXX_CI0136"; // 全省上网电量
+	public static final String AQTS = "HB_GD_QYG_JS_XX_XX_XXX_CI0182"; // 全省安全天数
+	public static final String QSZZGL = "JSFW.NX_GD_XXX_XX_XX_XXX_XXX_CI0135"; // 全省总功率
+	public static final String QSZRFDL = "JSFW.NX_GD_XXX_XX_XX_XXX_XXX_CI0088"; // 全省日累计发电量
+	public static final String QSZYFDL = "JSFW.NX_GD_XXX_XX_XX_XXX_XXX_CI0146"; // 全省月累计发电量
+	public static final String QSZNFDL = "JSFW.NX_GD_XXX_XX_XX_XXX_XXX_CI0037"; // 全省年累计发电量
+
+	public static final String FCRFDL = "JSFW.NX_GD_FDC_XX_XX_XXX_XXX_CI0088"; // 风场日累计发电量
+	public static final String FCYFDL = "JSFW.NX_GD_FDC_XX_XX_XXX_XXX_CI0146"; // 风场月累计发电量
+	public static final String FCNFDL = "JSFW.NX_GD_FDC_XX_XX_XXX_XXX_CI0037"; // 风场年累计发电量
+	public static final String GFRFDL = "JSFW.NX_GD_GDC_XX_XX_XXX_XXX_CI0088"; // 光伏日累计发电量
+	public static final String GFYFDL = "JSFW.NX_GD_GDC_XX_XX_XXX_XXX_CI0146"; // 光伏月累计发电量
+	public static final String GFNFDL = "JSFW.NX_GD_GDC_XX_XX_XXX_XXX_CI0037"; // 光伏年累计发电量
+	public static final String JPEYHT = "JSFW.NX_GD_XXX_XX_XX_XXX_XXX_CI0216"; // 减排二氧化碳
+	public static final String JYBM = "JSFW.NX_GD_XXX_XX_XX_XXX_XXX_CI0217"; // 节约标煤
+	public static final String JPEYHL = "JSFW.NX_GD_XXX_XX_XX_XXX_XXX_CI0218"; // 减排二氧化硫
+	public static final String JYS = "JSFW.NX_GD_XXX_XX_XX_XXX_XXX_CI0219"; // 节约水
+	public static final String FCSWDL = "JSFW.NX_GD_FDC_XX_XX_XXX_XXX_CI0136"; // 风场上网电量
+	public static final String FCZGL = "JSFW.NX_GD_FDC_XX_XX_XXX_XXX_CI0135"; // 风场总功率
+	public static final String FCFS = "JSFW.NX_GD_FDC_XX_XX_XXX_XXX_CI0134"; // 风场风速
+	public static final String GFSWDL = "JSFW.NX_GD_GDC_XX_XX_XXX_XXX_CI0136"; // 光伏上网电量
+	public static final String GFZGL = "JSFW.NX_GD_GDC_XX_XX_XXX_XXX_CI0135"; // 光伏总功率
+	public static final String FCQFDL = "JSFW.NX_GD_FDC_XX_XX_XXX_XXX_CI0110"; // 风电日欠发损失电
+
+	
+	
+	/******************************************** 麻黄山风电场 *****************************************/
+	public static final String JSFW_MHSFJZD ="MHSFCJSFW.NX_GD_MHSF_XX_XX_XXX_XXX_CI0215"; //麻黄山风机是否中断
+	public static final String JSFW_MHSDQZD ="MHSFCJSFW.NX_GD_MHSF_XX_XX_XXX_XXX_CI0216";//麻黄山电气是否中断
+	public static final String JSFW_MHSCFTZD ="MHSFCJSFW.NX_GD_MHSF_XX_XX_XXX_XXX_CI0218";//麻黄山测风塔是否中断
+	public static final String JSFW_MHSDJLZD ="MHSFCJSFW.NX_GD_MHSF_XX_XX_XXX_XXX_CI0217";//麻黄山电计量是否中断
+	public static final String JSFW_MHSAGCZD ="MHSFCJSFW.NX_GD_MHSF_XX_XX_XXX_XXX_CI0219";//麻黄山AGC是否中断
+	
+	
+	
+	
+	
+	
+	public static final String JSFW_MHRFDLB = "MHSFCJSFW.NX_GD_MHSF_XX_XX_XXX_XXX_CI0088"; // 麻黄山日发电量
+	public static final String JSFW_MHYFDLB = "MHSFCJSFW.NX_GD_MHSF_XX_XX_XXX_XXX_CI0146"; // 麻黄山月发电量
+	public static final String JSFW_MHNFDLB = "MHSFCJSFW.NX_GD_MHSF_XX_XX_XXX_XXX_CI0037"; // 麻黄山年发电量
+	public static final String JSFW_MHSWDLB = "MHSFCJSFW.NX_GD_MHSF_XX_XX_XXX_XXX_CI0136"; // 麻黄山上网电量
+	public static final String JSFW_MHSSZGL = "MHSFCJSFW.NX_GD_MHSF_XX_XX_XXX_XXX_CI0135"; // 麻黄山总功率
+	public static final String JSFW_MHSSFS = "MHSFCJSFW.NX_GD_MHSF_XX_XX_XXX_XXX_CI0134"; // 麻黄山风速
+	public static final String JSFW_MHRQFSS = "MHSFCJSFW.NX_GD_MHSF_XX_XX_XXX_XXX_CI0110"; // 麻黄山日欠发损失电量
+	public static final String MHSFGL_AI000305 = "MHSFGL.NX_GD_MHSF_YC_P1_L1_001_FGLTEM"; // 麻黄山测风塔温度
+	public static final String MHSFGL_AI000306 = "MHSFGL.NX_GD_MHSF_YC_P1_L1_001_FGLHUM"; // 麻黄山测风塔湿度
+	public static final String MHSFGL_AI000307 = "MHSFGL.NX_GD_MHSF_YC_P1_L1_001_FGLPRE"; // 麻黄山测风塔压强
+	public static final String MHSDQ_DI000006 = "MHSDQ.NX_GD_MHSF_DQ_P1_L1_001_DI0006"; // 111断路器位置
+	public static final String MHSDQ_DI000141 = "MHSDQ.NX_GD_MHSF_DQ_P1_L1_001_DI0141"; // 301断路器合闸位置
+	public static final String MHSDQ_DI000363 = "MHSDQ.NX_GD_MHSF_DQ_P1_L1_001_DI0363"; // [风场Ⅰ线9611CS]断路器位置
+	public static final String MHSDQ_DI000423 = "MHSDQ.NX_GD_MHSF_DQ_P1_L1_001_DI0423"; // [风场Ⅱ线9611CS]断路器位置
+	public static final String MHSDQ_DI000483 = "MHSDQ.NX_GD_MHSF_DQ_P1_L1_001_DI0483"; // [风场Ⅲ线9611CS]断路器位置
+
+	public static final String MHSDQ_101DLQ = "MHSDQ.NX_GD_MHSF_DQ_P1_L1_001_DI0006"; // 101断路器位置
+	public static final String MHSDQ_102DLQ = "MHSDQ.NX_GD_MHSF_DQ_P1_L1_001_DI0006"; // 102断路器位置
+	public static final String MHSDQ_302DLQ = "MHSDQ.NX_GD_MHSF_DQ_P1_L1_001_DI0141"; // 302断路器合闸位置
+	public static final String MHSDQ_321DLQ = "MHSDQ.NX_GD_MHSF_DQ_P1_L1_001_DI0985"; // 321断路器合闸位置
+
+	public static final String MHSFGL_AI000314 = "MHSFGL.NX_GD_MHSF_YC_P1_L1_001_FGLS70";// 麻黄山70m风速
+	public static final String MHSFGL_AI000315 = "MHSFGL.NX_GD_MHSF_YC_P1_L1_001_FGLD70";// 麻黄山70m风向
+	/******************************************** 麻黄山风电场 *****************************************/
+
+	/******************************************** 石板泉风电场 *****************************************/
+	public static final String JSFW_SBQFJZD ="SBQFCJSFW.NX_GD_SBQF_XX_XX_XXX_XXX_CI0215"; //石板泉风机是否中断
+	public static final String JSFW_SBQDQZD ="SBQFCJSFW.NX_GD_SBQF_XX_XX_XXX_XXX_CI0216";//石板泉电气是否中断
+	public static final String JSFW_SBQCFTZD ="SBQFCJSFW.NX_GD_SBQF_XX_XX_XXX_XXX_CI0218";//石板泉测风塔是否中断
+	public static final String JSFW_SBQDJLZD ="SBQFCJSFW.NX_GD_SBQF_XX_XX_XXX_XXX_CI0217";//石板泉电计量是否中断
+	public static final String JSFW_SBQAGCZD ="SBQFCJSFW.NX_GD_SBQF_XX_XX_XXX_XXX_CI0219";//石板泉AGC是否中断
+
+	
+	
+	
+	
+	
+	
+	public static final String JSFW_SBRFDLB = "SBQFCJSFW.NX_GD_SBQF_XX_XX_XXX_XXX_CI0088"; // 石板泉日发电量
+	public static final String JSFW_SBYFDLB = "SBQFCJSFW.NX_GD_SBQF_XX_XX_XXX_XXX_CI0146"; // 石板泉月发电量
+	public static final String JSFW_SBNFDLB = "SBQFCJSFW.NX_GD_SBQF_XX_XX_XXX_XXX_CI0037"; // 石板泉年发电量
+	public static final String JSFW_SBSWDLB = "SBQFCJSFW.NX_GD_SBQF_XX_XX_XXX_XXX_CI0136"; // 石板泉上网电量
+	public static final String JSFW_SBSSZGL = "SBQFCJSFW.NX_GD_SBQF_XX_XX_XXX_XXX_CI0135"; // 石板泉总功率
+	public static final String JSFW_SBSSFS = "SBQFCJSFW.NX_GD_SBQF_XX_XX_XXX_XXX_CI0134"; // 石板泉风速
+	public static final String JSFW_SBRQFSS = "SBQFCJSFW.NX_GD_SBQF_XX_XX_XXX_XXX_CI0110"; // 石板泉日欠发损失电量
+	public static final String SBQFGL_AI000305 = "SBQFJ.NX_GD_SBQF_FJ_P4_L9_100_AI0165"; // 石板泉测风塔温度
+	
+//	public static final String SBQFGL_AI000305 = "SBQFGL.NX_GD_SBQF_YC_P1_L1_001_FGLTEM"; // 石板泉测风塔温度
+
+	public static final String SBQFGL_AI000319 = "SBQFGL.NX_GD_SBQF_YC_P1_L1_001_FGLHUM"; // 石板泉测风塔湿度
+	public static final String SBQFGL_AI000320 = "SBQFGL.NX_GD_SBQF_YC_P1_L1_001_FGLPRE"; // 石板泉测风塔压强
+
+	public static final String SBQDQ_DI000001 = "SBQXLDQ.NX_GD_SBQF_DQ_P1_L1_001_DI0001"; // 1#进线路测控装置断路器111
+	public static final String SBQDQ_DI000161 = "SBQXLDQ.NX_GD_SBQF_DQ_P1_L1_001_DI0161"; // 1号主变测控装置高压侧断路器101
+	public static final String SBQDQ_DI000175 = "SBQXLDQ.NX_GD_SBQF_DQ_P1_L1_001_DI0175"; // 1号主变测控装置低压侧断路器301
+	public static final String SBQDQ_DI000966 = "SBQXLDQ.NX_GD_SBQF_DQ_P1_L1_001_DI0966"; // 35kV1A出线保护断路器312
+	public static final String SBQDQ_DI001030 = "SBQXLDQ.NX_GD_SBQF_DQ_P1_L1_001_DI1030"; // 35kV1B出线保护断路器313
+	public static final String SBQDQ_DI001158 = "SBQXLDQ.NX_GD_SBQF_DQ_P1_L1_001_DI1158"; // 35kV1C出线保护断路器314
+
+	public static final String SBQDQ_DI000081 = "SBQNWDQ.NX_GD_SBQF_DQ_P1_L1_001_DI0081"; // 2#进线路测控装置断路器121合闸
+	public static final String SBQDQ_DI000241 = "SBQNWDQ.NX_GD_SBQF_DQ_P1_L1_001_DI0241"; // 2号主变测控装置高压侧断路器102合闸
+	public static final String SBQDQ_DI000255 = "SBQNWDQ.NX_GD_SBQF_DQ_P1_L1_001_DI0255"; // 2号主变测控装置低压侧断路器302合位
+	public static final String SBQDQ_DI001419 = "SBQNWDQ.NX_GD_SBQF_DQ_P1_L1_001_DI1419"; // 35kV2A出线保护321断路器合位
+	public static final String SBQDQ_DI001483 = "SBQNWDQ.NX_GD_SBQF_DQ_P1_L1_001_DI1483"; // 35kV2B出线保护322断路器合位
+	public static final String SBQDQ_DI001611 = "SBQNWDQ.NX_GD_SBQF_DQ_P1_L1_001_DI1611"; // 35kV2C出线保护323断路器合位
+
+	public static final String SBQDQ_DI002536 = "SBQNWDQ.NX_GD_SBQF_DQ_P1_L1_001_DI2569"; // 35kV1A出线保护断路器331
+	public static final String SBQDQ_DI002600 = "SBQNWDQ.NX_GD_SBQF_DQ_P1_L1_001_DI2633"; // 35kV1B出线保护断路器332
+	public static final String SBQDQ_DI002915 = "SBQNWDQ.NX_GD_SBQF_DQ_P1_L1_001_DI2915"; // 2#进线路测控装置断路器151合闸
+	public static final String SBQDQ_DI000425 = "SBQNWDQ.NX_GD_SBQF_DQ_P1_L1_001_DI0425"; // 2号主变测控装置高压侧断路器105合闸
+	// public static final String SBQDQ_DI000255="SBQDQ_DI000255";
+	// //2号主变测控装置低压侧断路器305合位
+	public static final String SBQDQ_DI003272 = "SBQNWDQ.NX_GD_SBQF_DQ_P1_L1_001_DI3305"; // 35kV2A出线保护351断路器合位
+	public static final String SBQDQ_DI003336 = "SBQNWDQ.NX_GD_SBQF_DQ_P1_L1_001_DI3369"; // 35kV2B出线保护352断路器合位
+	public static final String SBQDQ_DI003400 = "SBQNWDQ.NX_GD_SBQF_DQ_P1_L1_001_DI3433"; // 35kV2C出线保护353断路器合位
+
+	public static final String SBQFGL_AI000327 = "SBQFGL.NX_GD_SBQF_YC_P1_L1_001_FGLS70";// 石板泉70m风速
+	public static final String SBQFGL_AI000328 = "SBQFGL.NX_GD_SBQF_YC_P1_L1_001_FGLD70";// 石板泉70m风向
+	/******************************************* 石板泉风电场 *****************************************/
+
+	/******************************************** 青山风电场 *****************************************/
+	public static final String JSFW_QSFJZD ="SBQFCJSFW.NX_GD_SBQF_XX_XX_XXX_XXX_CI0215"; //石板泉风机是否中断
+	public static final String JSFW_QSDQZD ="SBQFCJSFW.NX_GD_SBQF_XX_XX_XXX_XXX_CI0216";//石板泉电气是否中断
+	public static final String JSFW_QSCFTZD ="SBQFCJSFW.NX_GD_SBQF_XX_XX_XXX_XXX_CI0218";//石板泉测风塔是否中断
+	public static final String JSFW_QSDJLZD ="SBQFCJSFW.NX_GD_SBQF_XX_XX_XXX_XXX_CI0217";//石板泉电计量是否中断
+	public static final String JSFW_QSAGCZD ="SBQFCJSFW.NX_GD_SBQF_XX_XX_XXX_XXX_CI0219";//石板泉AGC是否中断
+
+	
+	
+	
+	
+	
+	
+	
+	public static final String QSRFDL = "QSFCJSFW.NX_GD_QSF_XX_XX_XXX_XXX_CI0088"; // 青山日发电量
+	public static final String QSYFDL = "QSFCJSFW.NX_GD_QSF_XX_XX_XXX_XXX_CI0146"; // 青山月发电量
+	public static final String QSNFDL = "QSFCJSFW.NX_GD_QSF_XX_XX_XXX_XXX_CI0037"; // 青山年发电量
+	public static final String QSSWDL = "QSFCJSFW.NX_GD_QSF_XX_XX_XXX_XXX_CI0136"; // 青山上网电量
+	public static final String QSZGL = "QSFCJSFW.NX_GD_QSF_XX_XX_XXX_XXX_CI0135"; // 青山总功率
+	public static final String QSFS = "QSFCJSFW.NX_GD_QSF_XX_XX_XXX_XXX_CI0134"; // 青山风速
+	public static final String QSQFDL = "QSFCJSFW.NX_GD_QSF_XX_XX_XXX_XXX_CI0110"; // 青山日欠发损失电量
+	public static final String QSWD = "QSFGL.NX_GD_QSF_YC_P1_L1_001_CFT019"; // 青山测风塔温度
+	// public static final String QSWD = "QSFGL_AI000323"; // 青山测风塔湿度
+	public static final String QSFGL_AI000324 = "QSFGL.NX_GD_QSF_YC_P1_L1_001_CFT020"; // 青山测风塔压强
+	public static final String QSPJFS = "QSFCJSFW.NX_GD_QSF_XX_XX_XXX_XXX_CI0134"; // 青山平均风速
+
+	public static final String QSDQ_DI000377 = "QSDQ.NX_GD_QSF_DQ_P1_L1_001_DI0377"; // 110kV线路测控隔刀111-1分位
+	public static final String QSDQ_DI000530 = "QSDQ.NX_GD_QSF_DQ_P1_L1_001_DI0530"; // 1#主变测控断路器101分
+	public static final String QSDQ_DI000858 = "QSDQ.NX_GD_QSF_DQ_P1_L1_001_DI0858"; // 2#主变测控断路器102
+	public static final String QSDQ_DI000193 = "QSDQ.NX_GD_QSF_DQ_P1_L1_001_DI0193"; // 35kV公用测控1#主变35KV手车分
+	public static final String QSDQ_DI000195 = "QSDQ.NX_GD_QSF_DQ_P1_L1_001_DI0195"; // 35kV公用测控2#主变35KV手车分
+	public static final String QSDQ_DI001186 = "QSDQ.NX_GD_QSF_DQ_P1_L1_001_DI1186"; // 35kVI段集线线路1A311断路器
+	public static final String QSDQ_DI001232 = "QSDQ.NX_GD_QSF_DQ_P1_L1_001_DI1232"; // 35kVI段集线线路1B312断路器
+	public static final String QSDQ_DI001278 = "QSDQ.NX_GD_QSF_DQ_P1_L1_001_DI1278"; // 35kVI段集线线路1C313断路器
+	public static final String QSDQ_DI001416 = "QSDQ.NX_GD_QSF_DQ_P1_L1_001_DI1416"; // 35kV分段300断路器
+	public static final String QSDQ_DI001462 = "QSDQ.NX_GD_QSF_DQ_P1_L1_001_DI1462"; // 35kVII段集线线路2A323断路器
+	public static final String QSDQ_DI001508 = "QSDQ.NX_GD_QSF_DQ_P1_L1_001_DI1508"; // 35kVII段集线线路2B324断路器
+	public static final String QSDQ_DI001554 = "QSDQ.NX_GD_QSF_DQ_P1_L1_001_DI1554"; // 35kVII段集线线路2C325断路器
+
+	public static final String SLDQ_DI000103 = "SLDQ.NX_GD_QSF_DQ_P1_L1_001_DI0071";
+	public static final String SLDQ_DI000303 = "SLDQ.NX_GD_QSF_DQ_P1_L1_001_DI0123";
+	public static final String SLDQ_DI000331 = "SLDQ.NX_GD_QSF_DQ_P1_L1_001_DI1615";
+	public static final String SLDQ_DI000332 = "SLDQ.NX_GD_QSF_DQ_P1_L1_001_DI1701";
+
+	public static final String QSFGL_AI000313 = "QSFGL.NX_GD_QSF_YC_P1_L1_001_CFT009";// 青山70m风速
+	public static final String QSFGL_AI000314 = "QSFGL.NX_GD_QSF_YC_P1_L1_001_CFT010";// 青山70m风向
+	/******************************************** 青山风电场 *****************************************/
+
+	/******************************************** 牛首山风电场 *****************************************/
+	public static final String NSSRFDL = "NSSFCJSFW.NX_GD_NSSF_XX_XX_XXX_XXX_CI0088"; // 牛首山日发电量
+	public static final String NSSYFDL = "NSSFCJSFW.NX_GD_NSSF_XX_XX_XXX_XXX_CI0146"; // 牛首山月发电量
+	public static final String NSSNFDL = "NSSFCJSFW.NX_GD_NSSF_XX_XX_XXX_XXX_CI0037"; // 牛首山年发电量
+	public static final String NSSSWDL = "NSSFCJSFW.NX_GD_NSSF_XX_XX_XXX_XXX_CI0136"; // 牛首山上网电量
+	public static final String NSSZGL = "NSSFCJSFW.NX_GD_NSSF_XX_XX_XXX_XXX_CI0135"; // 牛首山总功率
+	public static final String NSSFS = "NSSFCJSFW.NX_GD_NSSF_XX_XX_XXX_XXX_CI0134"; // 牛首山风速
+	public static final String NSSQFDL = "NSSFCJSFW.NX_GD_NSSF_XX_XX_XXX_XXX_CI0110"; // 牛首山日欠发损失电量
+	//public static final String NSSWD = "NSSFGL.NX_GD_NSSF_YC_P1_L1_001_FGLTEM"; // 牛首山测风塔温度
+	public static final String NSSWD = "NSSFJ.NX_GD_NSSF_FJ_P1_L2_013_AI0056"; // 牛首山测风塔温度
+	
+	public static final String NSSFGL_AI000306 = "NSSFGL.NX_GD_NSSF_YC_P1_L1_001_FGLHUM"; // 牛首山测风塔湿度
+	public static final String NSSFGL_AI000307 = "NSSFGL.NX_GD_NSSF_YC_P1_L1_001_FGLPRE"; // 牛首山测风塔压强
+	public static final String NSSPJFS = "NSSFCJSFW.NX_GD_NSSF_XX_XX_XXX_XXX_CI0134"; // 牛首山平均风速
+
+	public static final String NSSZ111 = "NSSDQN.NX_GD_NSSF_DQ_P1_L1_001_DI0003"; // 首风II甲线111开关位置
+	public static final String NSSZ101 = "NSSDQN.NX_GD_NSSF_DQ_P1_L1_001_DI0019"; // 101开关位置
+	public static final String NSSZ102 = "NSSDQN.NX_GD_NSSF_DQ_P1_L1_001_DI0034"; // 102开关位置
+	public static final String NSSZ301 = "NSSDQN.NX_GD_NSSF_DQ_P1_L1_001_DI0025"; // 301开关位置
+	public static final String NSSZ302 = "NSSDQN.NX_GD_NSSF_DQ_P1_L1_001_DI0040"; // 302开关位置
+	public static final String NSSZ312 = "NSSDQN.NX_GD_NSSF_DQ_P1_L1_001_DI0070"; // 集电线路一312开关位置
+	public static final String NSSZ313 = "NSSDQN.NX_GD_NSSF_DQ_P1_L1_001_DI0076"; // 集电线路二313开关位置
+	public static final String NSSZ314 = "NSSDQN.NX_GD_NSSF_DQ_P1_L1_001_DI0082"; // 集电线路三314开关位置
+	public static final String NSSZ321 = "NSSDQN.NX_GD_NSSF_DQ_P1_L1_001_DI0098"; // 集电线路四321开关位置
+	public static final String NSSZ322 = "NSSDQN.NX_GD_NSSF_DQ_P1_L1_001_DI0104"; // 集电线路五322开关位置
+	public static final String NSSZ323 = "NSSDQN.NX_GD_NSSF_DQ_P1_L1_001_DI0110"; // 集电线路六323开关位置
+	public static final String NSSZ121 = "NSSDQN.NX_GD_NSSF_DQ_P1_L1_001_DI0011"; // 首风II乙线121开关位置
+	public static final String NSSZ103 = "NSSDQN.NX_GD_NSSF_DQ_P1_L1_001_DI0049"; // 103开关位置
+	public static final String NSSZ303 = "NSSDQN.NX_GD_NSSF_DQ_P1_L1_001_DI0055"; // 303开关位置
+	public static final String NSSZ351 = "NSSDQN.NX_GD_NSSF_DQ_P1_L1_001_DI0126"; // 集电线路七351开关位置
+	public static final String NSSZ353 = "NSSDQN.NX_GD_NSSF_DQ_P1_L1_001_DI0132"; // 集电线路八353开关位置
+	public static final String NSSZ354 = "NSSDQN.NX_GD_NSSF_DQ_P1_L1_001_DI0138"; // 集电线路九354开关位置
+
+	public static final String NSSDQ_AI000703 = "NSSFGL.NX_GD_NSSF_YC_P1_L1_001_FGLS70";// 牛首山70m风速
+	public static final String NSSDQ_AI000704 = "NSSFGL.NX_GD_NSSF_YC_P1_L1_001_FGLD70";// 牛首山70m风向
+	/******************************************** 牛首山风电场 *****************************************/
+
+	/******************************************** 大武口风电场 *****************************************/
+	public static final String DWKRFDL = "DWKGDCJSFW.NX_GD_DWKG_XX_XX_XXX_XXX_CI0088"; // 大武口日发电量
+	public static final String DWKYFDL = "DWKGDCJSFW.NX_GD_DWKG_XX_XX_XXX_XXX_CI0146"; // 大武口月发电量
+	public static final String DWKNFDL = "DWKGDCJSFW.NX_GD_DWKG_XX_XX_XXX_XXX_CI0037"; // 大武口年发电量
+	public static final String DWKSWDL = "DWKGDCJSFW.NX_GD_DWKG_XX_XX_XXX_XXX_CI0136"; // 大武口上网电量
+	public static final String DWKZGL = "DWKDQ.NX_GD_DWKG_DQ_P1_L1_001_AI0002"; // 大武口总功率
+	public static final String DWKFS = "DWKGDCJSFW.NX_GD_DWKG_XX_XX_XXX_XXX_CI0134";// 大武口日照强度;
+	// public static final String DWKFS =
+	// "DWKGF.NX_GD_DWKG_GF_P1_L2_010_AI0672";// "JSFW_DWSSFS";
+	// //
+	// 大武口日照强度
+	//public static final String DWKWD = "DWKGGL.NX_GD_DWKG_YC_P1_L1_001_QXZ004"; // 大武口测风塔温度
+	public static final String DWKWD = "DWKGF.NX_GD_DWKG_GF_P1_L2_010_AI0663"; // 大武口测风塔温度
+	
+	public static final String DWKPJFS = "DWKGDCJSFW.NX_GD_DWKG_XX_XX_XXX_XXX_CI0134"; // 大武口平均风速
+
+	public static final String DWKZ310 = "DWKDQ.NX_GD_DWKG_DQ_P1_L1_001_DI0024"; // 35kV出线柜310开关位置
+	public static final String DWKZ314 = "DWKDQ.NX_GD_DWKG_DQ_P1_L1_001_DI0027"; // 35kV#1光伏进线柜314开关位置
+	public static final String DWKZ315 = "DWKDQ.NX_GD_DWKG_DQ_P1_L1_001_DI0028"; // 35kV#2光伏进线柜315开关位置
+	/******************************************** 大武口风电场 *****************************************/
+
+	/******************************************** 平罗电场 *****************************************/
+	public static final String PLRFDL = "PLGDCJSFW.NX_GD_PLG_XX_XX_XXX_XXX_CI0088"; // 平罗日发电量
+	public static final String PLYFDL = "PLGDCJSFW.NX_GD_PLG_XX_XX_XXX_XXX_CI0146"; // 平罗月发电量
+	public static final String PLNFDL = "PLGDCJSFW.NX_GD_PLG_XX_XX_XXX_XXX_CI0037"; // 平罗年发电量
+	public static final String PLSWDL = "PLGDCJSFW.NX_GD_PLG_XX_XX_XXX_XXX_CI0136"; // 平罗上网电量
+	public static final String PLZGL = "PLGDCJSFW.NX_GD_PLG_XX_XX_XXX_XXX_CI0135"; // 平罗总功率
+	public static final String PLFS = "PLGGL.NX_GD_PLG_YC_P1_L1_001_QXZ0001"; // 平罗日照强度
+	public static final String PLWD = "PLGGL.NX_GD_PLG_YC_P1_L1_001_QXZ004"; // 平罗测风塔温度
+	public static final String PLPJFS = "PLGGL.NX_GD_PLG_YC_P1_L1_001_QXZ0001"; // 平罗平均风速
+
+	// 平罗1
+	public static final String PLZ1310 = "PLSJ1.NX_GD_PLG_DQ_P1_L1_001_DI0001"; // 35kV出线柜310开关位置
+	public static final String PLZ1313 = "PLSJ1.NX_GD_PLG_DQ_P1_L1_001_DI0005"; // I期313开关断路器合位
+	public static final String PLZ1314 = "PLSJ1.NX_GD_PLG_DQ_P1_L1_001_DI0007"; // I期314开关断路器合位
+	public static final String PLZ1315 = "PLSJ1.NX_GD_PLG_DQ_P1_L1_001_DI0009"; // I期315开关断路器合位
+	public static final String PLZ1316 = "PLSJ1.NX_GD_PLG_DQ_P1_L1_001_DI0011"; // I期316开关断路器合位
+	public static final String PLZ1317 = "PLSJ1.NX_GD_PLG_DQ_P1_L1_001_DI0013"; // I期317开关断路器合位
+	// 平罗2
+	public static final String PLZ2310 = "PLSJ2.NX_GD_PLG_DD_P1_L1_001_DI0001"; // 20#逆变器电网交流过压
+	public static final String PLZ2322 = "PLSJ2.NX_GD_PLG_DD_P1_L1_001_DI0017"; // 20#逆变器防雷器故障
+	public static final String PLZ2323 = "PLSJ2.NX_GD_PLG_DD_P1_L1_001_DI0019"; // 20#逆变器防反放电保护
+	/******************************************** 平罗电场 *****************************************/
+
+	/******************************************** 马场湖风电场 *****************************************/
+
+	public static final String MCHRFDL = "JSFW_MCRFDLB"; // 马场湖日发电量
+	public static final String MCHYFDL = "JSFW_MCYFDLB"; // 马场湖月发电量
+	public static final String MCHNFDL = "JSFW_MCNFDLB"; // 马场湖年发电量
+	public static final String MCHSWDL = "JSFW_MCSWDLB"; // 马场湖上网电量
+	public static final String MCHZGL = "JSFW_MCSSZGL"; // 马场湖总功率
+	public static final String MCHFS = "JSFW_MCSSFSX"; // 马场湖日照强度
+	public static final String MCHWD = "MCHGGL_AI000308"; // 马场湖测风塔温度
+	public static final String MCHPJFS = "JSFW_MCSSFS"; // 马场湖平均风速
+
+	public static final String MCHZ511 = "MCHDQ_DI110749"; // 马场湖光伏开关站xj-断路器位置
+	public static final String MCHZ510 = "MCHDQ_DI110027"; // 马场湖光伏开关站10ah-3
+	// 1#进线柜-断路器位置
+	public static final String MCHZ512 = "MCHDQ_DI110317"; // 马场湖光伏开关站10ah-4
+	// 2#进线-断路器位置
+	public static final String MCHZ513 = "MCHDQ_DI110197"; // 马场湖光伏开关站10ah-5
+	// 3#进线-断路器位置
+	public static final String MCHZ514 = "MCHDQ_DI110080"; // 马场湖光伏开关站10ah-14
+	// 电容器-断路器位置
+	public static final String MCHZ515 = "MCHDQ_DI110137"; // 马场湖光伏开关站10ah-7
+	// 5#进线-断路器位置
+	public static final String MCHZ516 = "MCHDQ_DI110377"; // 马场湖光伏开关站10ah-8
+	// 6#进线-断路器位置
+	public static final String MCHZ517 = "MCHDQ_DI110437"; // 马场湖光伏开关站10ah-9
+	// 7#进线-断路器位置
+	public static final String MCHZ518 = "MCHDQ_DI110497"; // 马场湖光伏开关站10ah-10
+	// 8#进线-断路器位置
+	public static final String MCHZ519 = "MCHDQ_DI110557"; // 马场湖光伏开关站10ah-11
+	// 9#进线-断路器位置
+	public static final String MCHZ520 = "MCHDQ_DI110617"; // 马场湖光伏开关站10ah-12
+	// 10#进线-断路器位置
+	/******************************************** 马场湖风电场 *****************************************/
+
+	/******************************************** 宣和风电场 *****************************************/
+	public static final String XHRFDL = "XHGDCJSFW.NX_GD_XHG_XX_XX_XXX_XXX_CI0088"; // 宣和日发电量
+	public static final String XHYFDL = "XHGDCJSFW.NX_GD_XHG_XX_XX_XXX_XXX_CI0146"; // 宣和月发电量
+	public static final String XHNFDL = "XHGDCJSFW.NX_GD_XHG_XX_XX_XXX_XXX_CI0037"; // 宣和年发电量
+	public static final String XHSWDL = "XHGDCJSFW.NX_GD_XHG_XX_XX_XXX_XXX_CI0136"; // 宣和上网电量
+	public static final String XHZGL = "XHDQ.NX_GD_XHG_DQ_P1_L1_001_AI0002"; // 宣和总功率
+	public static final String XHFS = "XHGGL.NX_GD_XHG_YC_P1_L1_001_QXZ001"; // 宣和日照强度
+																				// XHDQ.NX_GD_XHG_DQ_P1_L1_001_AI0192
+	// public static final String XHFS =
+	// "XHGDCJSFW.NX_GD_XHG_XX_XX_XXX_XXX_CI0134"; // 宣和日照强度
+	public static final String XHWD = "XHGDCJSFW.NX_GD_XHG_XX_XX_XXX_XXX_CI0134"; // 宣和测风塔温度
+	public static final String XHPJFS = "XHGDCJSFW.NX_GD_XHG_XX_XX_XXX_XXX_CI0134"; // 宣和平均风速
+
+	public static final String XHZ311 = "XHDQ.NX_GD_XHG_DQ_P1_L1_001_DI0001"; // 35kV草光I线开关位置
+	public static final String XHZ313 = "XHDQ.NX_GD_XHG_DQ_P1_L1_001_DI0025"; // 35kV1#进线313开关位置
+	public static final String XHZ314 = "XHDQ.NX_GD_XHG_DQ_P1_L1_001_DI0027"; // 35kV2#进线314开关位置
+	public static final String XHZ316 = "XHDQ.NX_GD_XHG_DQ_P1_L1_001_DI0031"; // 35kV4#进线316开关位置
+	public static final String XHZ315 = "XHDQ.NX_GD_XHG_DQ_P1_L1_001_DI0029"; // 35kV3#进线315开关位置
+	/******************************************** 宣和风电场 *****************************************/
+
+	/******************************************** 海子井风电场 *****************************************/
+	public static final String HZJWD = "HZJGDCJSFW.NX_GD_HZJG_XX_XX_XXX_XXX_CI0134"; // 宣和测风塔温度
+	public static final String HZJPJFS = "HZJGDCJSFW.NX_GD_HZJG_XX_XX_XXX_XXX_CI0134"; // 宣和平均风速
+	/******************************************** 海子井风电场 *****************************************/
+
+	/******************************************** 香山风电场 *****************************************/
+	public static final String XSRFDL = "XSFCJSFW.NX_GD_XSF_XX_XX_XXX_XXX_CI0088"; // 香山日发电量
+	public static final String XSYFDL = "XSFCJSFW.NX_GD_XSF_XX_XX_XXX_XXX_CI0146"; // 香山月发电量
+	public static final String XSNFDL = "XSFCJSFW.NX_GD_XSF_XX_XX_XXX_XXX_CI0037"; // 香山年发电量
+	public static final String XSSWDL = "XSFCJSFW.NX_GD_XSF_XX_XX_XXX_XXX_CI0136"; // 香山上网电量
+	public static final String XSZGL = "XSFCJSFW.NX_GD_XSF_XX_XX_XXX_XXX_CI0135"; // 香山总功率
+	public static final String XSFS = "XSFCJSFW.NX_GD_XSF_XX_XX_XXX_XXX_CI0134"; // 香山风速
+	public static final String XSQFDL = "XSFCJSFW.NX_GD_XSF_XX_XX_XXX_XXX_CI0110"; // 香山日欠发损失电量
+
+	public static final String XSWD = "XSFGL.NX_GD_XSF_YC_P1_L1_001_FGLTEM"; // 香山测风塔温度
+	public static final String XSFGL_AI000007 = "XSFGL.NX_GD_XSF_YC_P1_L1_001_FGLHUM"; // 香山测风塔湿度
+	public static final String XSFGL_AI000008 = "XSFGL.NX_GD_XSF_YC_P1_L1_001_FGLPRE"; // 香山测风塔压强
+	public static final String XSPJFS = "XSFCJSFW.NX_GD_XSF_XX_XX_XXX_XXX_CI0134"; // 香山平均风速
+
+	public static final String XSDQ_DI000034 = "XSDQ.NX_GD_XSF_DQ_P1_L1_001_DI0034"; // #111断路器
+	public static final String XSDQ_DI000169 = "XSDQ.NX_GD_XSF_DQ_P1_L1_001_DI0169"; // 101断路器
+	public static final String XSDQ_DI000308 = "XSDQ.NX_GD_XSF_DQ_P1_L1_001_DI0308"; // 102断路器
+	public static final String XSDQ_DI000192 = "XSDQ.NX_GD_XSF_DQ_P1_L1_001_DI0192"; // 301断路器
+	public static final String XSDQ_DI000331 = "XSDQ.NX_GD_XSF_DQ_P1_L1_001_DI0331"; // 302断路器
+	// 香山电气点没有,采用类似点,目前不一定准确
+	public static final String XSDQ_DI000850 = "XSDQ.NX_GD_XSF_DQ_P1_L1_001_DI1368"; // 311断路器
+	public static final String XSDQ_DI000915 = "XSDQ.NX_GD_XSF_DQ_P1_L1_001_DI1629"; // 312断路器
+	public static final String XSDQ_DI001210 = "XSDQ.NX_GD_XSF_DQ_P1_L1_001_DI1501"; // 323断路器
+	public static final String XSDQ_DI001145 = "XSDQ.NX_GD_XSF_DQ_P1_L1_001_DI1501"; // 322断路器
+
+	public static final String XSFGL_AI000003 = "XSFGL.NX_GD_XSF_YC_P1_L1_001_FGLS70";// 香山70m风速
+	public static final String XSFGL_AI000005 = "XSFGL.NX_GD_XSF_YC_P1_L1_001_FGLD70";// 香山70m风向
+	/******************************************** 香山风电场 *****************************************/
+
+	public static final String DWKGDCJSFW_CI0195 = "DWKGDCJSFW.NX_GD_DWKG_XX_XX_XXX_XXX_CI0195"; // 风机设备在线状态
+	public static final String DWKGDCJSFW_CI0196 = "DWKGDCJSFW.NX_GD_DWKG_XX_XX_XXX_XXX_CI0196"; // 升压站在线状态
+	public static final String DWKGDCJSFW_CI0197 = "DWKGDCJSFW.NX_GD_DWKG_XX_XX_XXX_XXX_CI0197"; // 电计量在线状态
+	public static final String DWKGDCJSFW_CI0198 = "DWKGDCJSFW.NX_GD_DWKG_XX_XX_XXX_XXX_CI0198"; // 测风塔在线状态
+	public static final String DWKGDCJSFW_CI0199 = "DWKGDCJSFW.NX_GD_DWKG_XX_XX_XXX_XXX_CI0199"; // agc在线状态
+
+	public static final String MHSFCJSFW_CI0215 = "MHSFCJSFW.NX_GD_MHSF_XX_XX_XXX_XXX_CI0215"; // 风机设备在线状态
+	public static final String MHSFCJSFW_CI0216 = "MHSFCJSFW.NX_GD_MHSF_XX_XX_XXX_XXX_CI0216"; // 升压站在线状态
+	public static final String MHSFCJSFW_CI0217 = "MHSFCJSFW.NX_GD_MHSF_XX_XX_XXX_XXX_CI0217"; // 电计量在线状态
+	public static final String MHSFCJSFW_CI0218 = "MHSFCJSFW.NX_GD_MHSF_XX_XX_XXX_XXX_CI0218"; // 测风塔在线状态
+	public static final String MHSFCJSFW_CI0219 = "MHSFCJSFW.NX_GD_MHSF_XX_XX_XXX_XXX_CI0219"; // agc在线状态
+
+	public static final String NSSFCJSFW_CI0215 = "NSSFCJSFW_NX_GD_NSSF_XX_XX_XXX_XXX_CI0215"; // 风机设备在线状态
+	public static final String NSSFCJSFW_CI0216 = "NSSFCJSFW_NX_GD_NSSF_XX_XX_XXX_XXX_CI0216"; // 升压站在线状态
+	public static final String NSSFCJSFW_CI0217 = "NSSFCJSFW_NX_GD_NSSF_XX_XX_XXX_XXX_CI0217"; // 电计量在线状态
+	public static final String NSSFCJSFW_CI0218 = "NSSFCJSFW_NX_GD_NSSF_XX_XX_XXX_XXX_CI0218"; // 测风塔在线状态
+	public static final String NSSFCJSFW_CI0219 = "NSSFCJSFW_NX_GD_NSSF_XX_XX_XXX_XXX_CI0219"; // agc在线状态
+
+	public static final String PLGDCJSFW_CI0195 = "PLGDCJSFW.NX_GD_PLG_XX_XX_XXX_XXX_CI0195"; // 风机设备在线状态
+	public static final String PLGDCJSFW_CI0196 = "PLGDCJSFW.NX_GD_PLG_XX_XX_XXX_XXX_CI0196"; // 升压站在线状态
+	public static final String PLGDCJSFW_CI0197 = "PLGDCJSFW.NX_GD_PLG_XX_XX_XXX_XXX_CI0197"; // 电计量在线状态
+	public static final String PLGDCJSFW_CI0198 = "PLGDCJSFW.NX_GD_PLG_XX_XX_XXX_XXX_CI0198"; // 测风塔在线状态
+	public static final String PLGDCJSFW_CI0199 = "PLGDCJSFW.NX_GD_PLG_XX_XX_XXX_XXX_CI0199"; // agc在线状态
+
+	public static final String QSFCJSFW_CI0215 = "QSFCJSFW.NX_GD_QSF_XX_XX_XXX_XXX_CI0215"; // 风机设备在线状态
+	public static final String QSFCJSFW_CI0216 = "QSFCJSFW.NX_GD_QSF_XX_XX_XXX_XXX_CI0216"; // 升压站在线状态
+	public static final String QSFCJSFW_CI0217 = "QSFCJSFW.NX_GD_QSF_XX_XX_XXX_XXX_CI0217"; // 电计量在线状态
+	public static final String QSFCJSFW_CI0218 = "QSFCJSFW.NX_GD_QSF_XX_XX_XXX_XXX_CI0218"; // 测风塔在线状态
+	public static final String QSFCJSFW_CI0219 = "QSFCJSFW.NX_GD_QSF_XX_XX_XXX_XXX_CI0219"; // agc在线状态
+
+	public static final String SBQFCJSFW_CI0215 = "SBQFCJSFW.NX_GD_SBQF_XX_XX_XXX_XXX_CI0215"; // 风机设备在线状态
+	public static final String SBQFCJSFW_CI0216 = "SBQFCJSFW.NX_GD_SBQF_XX_XX_XXX_XXX_CI0216"; // 升压站在线状态
+	public static final String SBQFCJSFW_CI0217 = "SBQFCJSFW.NX_GD_SBQF_XX_XX_XXX_XXX_CI0217"; // 电计量在线状态
+	public static final String SBQFCJSFW_CI0218 = "SBQFCJSFW.NX_GD_SBQF_XX_XX_XXX_XXX_CI0218"; // 测风塔在线状态
+	public static final String SBQFCJSFW_CI0219 = "SBQFCJSFW.NX_GD_SBQF_XX_XX_XXX_XXX_CI0219"; // agc在线状态
+
+	public static final String XHGDCJSFW_CI0195 = "XHGDCJSFW.NX_GD_XHG_XX_XX_XXX_XXX_CI0195"; // 风机设备在线状态
+	public static final String XHGDCJSFW_CI0196 = "XHGDCJSFW.NX_GD_XHG_XX_XX_XXX_XXX_CI0196"; // 升压站在线状态
+	public static final String XHGDCJSFW_CI0197 = "XHGDCJSFW.NX_GD_XHG_XX_XX_XXX_XXX_CI0197"; // 电计量在线状态
+	public static final String XHGDCJSFW_CI0198 = "XHGDCJSFW.NX_GD_XHG_XX_XX_XXX_XXX_CI0198"; // 测风塔在线状态
+	public static final String XHGDCJSFW_CI0199 = "XHGDCJSFW.NX_GD_XHG_XX_XX_XXX_XXX_CI0199"; // agc在线状态
+
+	public static final String XSFCJSFW_CI0215 = "XSFCJSFW.NX_GD_XSF_XX_XX_XXX_XXX_CI0215"; // 风机设备在线状态
+	public static final String XSFCJSFW_CI0216 = "XSFCJSFW.NX_GD_XSF_XX_XX_XXX_XXX_CI0216"; // 升压站在线状态
+	public static final String XSFCJSFW_CI0217 = "XSFCJSFW.NX_GD_XSF_XX_XX_XXX_XXX_CI0217"; // 电计量在线状态
+	public static final String XSFCJSFW_CI0218 = "XSFCJSFW.NX_GD_XSF_XX_XX_XXX_XXX_CI0218"; // 测风塔在线状态
+	public static final String XSFCJSFW_CI0219 = "XSFCJSFW.NX_GD_XSF_XX_XX_XXX_XXX_CI0219"; // agc在线状态
+
+}

+ 377 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/spring/InitialRedis.java

@@ -0,0 +1,377 @@
+package com.gyee.frame.common.spring;
+
+import com.alibaba.fastjson.JSON;
+import com.gyee.frame.common.cache.IGlobalCache;
+import com.gyee.frame.model.auto.*;
+import com.gyee.frame.model.custom.PointData;
+import com.gyee.frame.service.WindPowerstationTestingPoint2Service;
+import com.gyee.frame.service.WindTurbineTestingPointAiService;
+import com.gyee.frame.service.WindturbinepowercurvefittingService;
+import com.gyee.frame.util.DateUtils;
+import com.gyee.frame.util.IRealTimeDataBaseUtil;
+import com.gyee.frame.util.RealTimeDataBaseFactory;
+
+import java.text.DecimalFormat;
+import java.util.*;
+
+
+public  class InitialRedis {
+
+    public static Map<String, Map<Double, Windturbinepowercurvefitting>> wpcmap = new HashMap<String, Map<Double, Windturbinepowercurvefitting>>();
+
+
+    IRealTimeDataBaseUtil realApiUtil = RealTimeDataBaseFactory.createRealTimeDataBase();
+
+    public  void intialWindturbinepowercurvefitting() throws Exception {
+
+
+        WindturbinepowercurvefittingService windturbinepowercurvefittingService= SpringUtils.getBean("windturbinepowercurvefittingService");
+        IGlobalCache globalCache= SpringUtils.getBean("globalCache");
+
+        WindturbinepowercurvefittingExample windturbinepowercurvefittingExample = new WindturbinepowercurvefittingExample();
+        windturbinepowercurvefittingExample.setOrderByClause("WINDTURBINEID ASC,speed ASC");
+        List<Windturbinepowercurvefitting> wpclist = windturbinepowercurvefittingService.selectByExample(windturbinepowercurvefittingExample);
+
+        if (!wpclist.isEmpty()) {
+            for (Windturbinepowercurvefitting wc : wpclist) {
+                if (wpcmap.containsKey(wc.getWindturbineid())) {
+                    Map<Double, Windturbinepowercurvefitting> map = wpcmap.get(wc.getWindturbineid());
+                    map.put(wc.getSpeed(), wc);
+                } else {
+                    Map<Double, Windturbinepowercurvefitting> map = new HashMap<Double, Windturbinepowercurvefitting>();
+                    map.put(wc.getSpeed(), wc);
+                    wpcmap.put(wc.getWindturbineid(), map);
+                }
+            }
+        }
+
+        globalCache.set("wpcmap", JSON.toJSONString(wpcmap));
+    }
+
+
+    public  void intialWpScatter() throws Exception {
+
+
+
+        WindPowerstationTestingPoint2Service windPowerstationTestingPoint2Service= SpringUtils.getBean("windPowerstationTestingPoint2Service");
+        WindTurbineTestingPointAiService windTurbineTestingPointAiService= SpringUtils.getBean("windTurbineTestingPointAiService");
+        IGlobalCache globalCache= SpringUtils.getBean("globalCache");
+
+
+        Calendar cal = Calendar.getInstance();
+        cal.set(Calendar.HOUR_OF_DAY, 0);
+        cal.set(Calendar.MINUTE, 0);
+        cal.set(Calendar.SECOND, 0);
+
+        int month=cal.get(Calendar.MONTH)+1;
+
+
+        cal.set(Calendar.MONTH, 0);
+
+        for(int j=0;j<month;j++)
+        {
+            List<List<Double>> vos = new ArrayList<List<Double>>();
+            cal.set(Calendar.DAY_OF_MONTH, cal.getActualMinimum(Calendar.DAY_OF_MONTH));
+            Date beginDate = cal.getTime();
+            Date endDate =null;
+            if(month-1==cal.get(Calendar.MONTH))
+            {
+                cal = Calendar.getInstance();
+               //cal.set(Calendar.DAY_OF_MONTH, cal.getActualMaximum(Calendar.DAY_OF_MONTH));
+                endDate = cal.getTime();
+            }else
+            {
+                cal.add(Calendar.MONTH,1);;
+                endDate = cal.getTime();
+            }
+
+
+            for(Windpowerstation wp:InitialRunner.wpls)
+            {
+                String wpId=wp.getId();
+                Windpowerstationpointnew gl = windPowerstationTestingPoint2Service.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_SJGL);
+                Windpowerstationpointnew fs = windPowerstationTestingPoint2Service.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_SSFS);
+
+                int daynum = DateUtils.daysDiff(beginDate, endDate);
+                long pried = 600 ;
+                long count = 6 * 24 * daynum;
+
+                DecimalFormat dcmFmt = new DecimalFormat("0.00");
+                List<PointData> gls = realApiUtil.getHistoryDatasSnap(gl, beginDate.getTime() / 1000, endDate.getTime() / 1000, count, pried);
+
+                List<PointData> fss = realApiUtil.getHistoryDatasSnap(fs, beginDate.getTime() / 1000, endDate.getTime() / 1000, count, pried);
+
+
+                if (!gls.isEmpty() && !fss.isEmpty()) {
+                    for (int i = 0; i < fss.size(); i++) {
+
+                        List<Double> ds = new ArrayList<Double>();
+
+                        double f = fss.get(i).getPointValueInDouble();
+                        ds.add(Double.valueOf(dcmFmt.format(f)));
+                        f = gls.get(i).getPointValueInDouble();
+                        ds.add(Double.valueOf(dcmFmt.format(f)));
+                        vos.add(ds);
+                    }
+                }
+
+               // cal.add(Calendar.MONTH,1);
+                StringBuilder sb=new StringBuilder();
+                sb.append("scatter_").append(wpId).append("_").append(j+1);
+                globalCache.set(String.valueOf(sb), JSON.toJSONString(vos));
+                System.out.println(String.valueOf(sb.append("完成")));
+            }
+        }
+
+
+
+    }
+
+
+
+    public  void intialPjScatter() throws Exception {
+
+
+
+        WindPowerstationTestingPoint2Service windPowerstationTestingPoint2Service= SpringUtils.getBean("windPowerstationTestingPoint2Service");
+        WindTurbineTestingPointAiService windTurbineTestingPointAiService= SpringUtils.getBean("windTurbineTestingPointAiService");
+        IGlobalCache globalCache= SpringUtils.getBean("globalCache");
+
+
+        Calendar cal = Calendar.getInstance();
+        cal.set(Calendar.HOUR_OF_DAY, 0);
+        cal.set(Calendar.MINUTE, 0);
+        cal.set(Calendar.SECOND, 0);
+
+        int month=cal.get(Calendar.MONTH)+1;
+
+
+        cal.set(Calendar.MONTH, 0);
+
+        for(int j=0;j<month;j++)
+        {
+            List<List<Double>> vos = new ArrayList<List<Double>>();
+            cal.set(Calendar.DAY_OF_MONTH, cal.getActualMinimum(Calendar.DAY_OF_MONTH));
+            Date beginDate = cal.getTime();
+            Date endDate =null;
+            if(month-1==cal.get(Calendar.MONTH))
+            {
+                cal = Calendar.getInstance();
+                //cal.set(Calendar.DAY_OF_MONTH, cal.getActualMaximum(Calendar.DAY_OF_MONTH));
+                endDate = cal.getTime();
+            }else
+            {
+                cal.add(Calendar.MONTH,1);;
+                endDate = cal.getTime();
+            }
+
+
+            for(Project pj:InitialRunner.pjls)
+            {
+                String wpId=pj.getId();
+                Windpowerstationpointnew gl = windPowerstationTestingPoint2Service.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_SJGL);
+                Windpowerstationpointnew fs = windPowerstationTestingPoint2Service.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_SSFS);
+
+                int daynum = DateUtils.daysDiff(beginDate, endDate);
+                long pried = 600 ;
+                long count = 6 * 24 * daynum;
+
+                DecimalFormat dcmFmt = new DecimalFormat("0.00");
+                List<PointData> gls = realApiUtil.getHistoryDatasSnap(gl, beginDate.getTime() / 1000, endDate.getTime() / 1000, count, pried);
+
+                List<PointData> fss = realApiUtil.getHistoryDatasSnap(fs, beginDate.getTime() / 1000, endDate.getTime() / 1000, count, pried);
+
+
+                if (!gls.isEmpty() && !fss.isEmpty()) {
+                    for (int i = 0; i < fss.size(); i++) {
+
+                        List<Double> ds = new ArrayList<Double>();
+
+                        double f = fss.get(i).getPointValueInDouble();
+                        ds.add(Double.valueOf(dcmFmt.format(f)));
+                        f = gls.get(i).getPointValueInDouble();
+                        ds.add(Double.valueOf(dcmFmt.format(f)));
+                        vos.add(ds);
+                    }
+                }
+
+                // cal.add(Calendar.MONTH,1);
+                StringBuilder sb=new StringBuilder();
+                sb.append("scatter_").append(wpId).append("_").append(j+1);
+                globalCache.set(String.valueOf(sb), JSON.toJSONString(vos));
+                System.out.println(String.valueOf(sb.append("完成")));
+            }
+        }
+
+
+
+    }
+
+
+
+    public  void intialLnScatter() throws Exception {
+
+
+
+        WindPowerstationTestingPoint2Service windPowerstationTestingPoint2Service= SpringUtils.getBean("windPowerstationTestingPoint2Service");
+        WindTurbineTestingPointAiService windTurbineTestingPointAiService= SpringUtils.getBean("windTurbineTestingPointAiService");
+        IGlobalCache globalCache= SpringUtils.getBean("globalCache");
+
+
+        Calendar cal = Calendar.getInstance();
+        cal.set(Calendar.HOUR_OF_DAY, 0);
+        cal.set(Calendar.MINUTE, 0);
+        cal.set(Calendar.SECOND, 0);
+
+        int month=cal.get(Calendar.MONTH)+1;
+
+
+        cal.set(Calendar.MONTH, 0);
+
+        for(int j=0;j<month;j++)
+        {
+            List<List<Double>> vos = new ArrayList<List<Double>>();
+            cal.set(Calendar.DAY_OF_MONTH, cal.getActualMinimum(Calendar.DAY_OF_MONTH));
+            Date beginDate = cal.getTime();
+            Date endDate =null;
+            if(month-1==cal.get(Calendar.MONTH))
+            {
+                cal = Calendar.getInstance();
+                //cal.set(Calendar.DAY_OF_MONTH, cal.getActualMaximum(Calendar.DAY_OF_MONTH));
+                endDate = cal.getTime();
+            }else
+            {
+                cal.add(Calendar.MONTH,1);;
+                endDate = cal.getTime();
+            }
+
+
+            for(Line wp:InitialRunner.linels)
+            {
+                String wpId=wp.getId();
+                Windpowerstationpointnew gl = windPowerstationTestingPoint2Service.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_SJGL);
+                Windpowerstationpointnew fs = windPowerstationTestingPoint2Service.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_SSFS);
+
+                int daynum = DateUtils.daysDiff(beginDate, endDate);
+                long pried = 600 ;
+                long count = 6 * 24 * daynum;
+
+                DecimalFormat dcmFmt = new DecimalFormat("0.00");
+                List<PointData> gls = realApiUtil.getHistoryDatasSnap(gl, beginDate.getTime() / 1000, endDate.getTime() / 1000, count, pried);
+
+                List<PointData> fss = realApiUtil.getHistoryDatasSnap(fs, beginDate.getTime() / 1000, endDate.getTime() / 1000, count, pried);
+
+
+                if (!gls.isEmpty() && !fss.isEmpty()) {
+                    for (int i = 0; i < fss.size(); i++) {
+
+                        List<Double> ds = new ArrayList<Double>();
+
+                        double f = fss.get(i).getPointValueInDouble();
+                        ds.add(Double.valueOf(dcmFmt.format(f)));
+                        f = gls.get(i).getPointValueInDouble();
+                        ds.add(Double.valueOf(dcmFmt.format(f)));
+                        vos.add(ds);
+                    }
+                }
+
+                // cal.add(Calendar.MONTH,1);
+                StringBuilder sb=new StringBuilder();
+                sb.append("scatter_").append(wpId).append("_").append(j+1);
+                globalCache.set(String.valueOf(sb), JSON.toJSONString(vos));
+                System.out.println(String.valueOf(sb.append("完成")));
+            }
+        }
+
+
+
+    }
+
+
+    public  void intialWtScatter() throws Exception {
+
+
+        WindTurbineTestingPointAiService windTurbineTestingPointAiService= SpringUtils.getBean("windTurbineTestingPointAiService");
+        IGlobalCache globalCache= SpringUtils.getBean("globalCache");
+
+
+        Calendar cal = Calendar.getInstance();
+        cal.set(Calendar.HOUR_OF_DAY, 0);
+        cal.set(Calendar.MINUTE, 0);
+        cal.set(Calendar.SECOND, 0);
+
+        int month=cal.get(Calendar.MONTH)+1;
+
+
+        cal.set(Calendar.MONTH, 0);
+
+
+            List<List<Double>> vos = new ArrayList<List<Double>>();
+            cal.set(Calendar.DAY_OF_MONTH, cal.getActualMinimum(Calendar.DAY_OF_MONTH));
+            Date beginDate = cal.getTime();
+            Date endDate =null;
+            if(month-1==cal.get(Calendar.MONTH))
+            {
+                cal = Calendar.getInstance();
+                //cal.set(Calendar.DAY_OF_MONTH, cal.getActualMaximum(Calendar.DAY_OF_MONTH));
+                endDate = cal.getTime();
+            }else
+            {
+                cal.add(Calendar.MONTH,1);;
+                endDate = cal.getTime();
+            }
+
+
+            for(Windturbine wt:InitialRunner.wtls)
+            {
+                String wpId=wt.getId();
+                Windturbinetestingpointnew gl = windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wpId, Constant.TPOINT_WT_FJGL);
+                Windturbinetestingpointnew fs = windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wpId, Constant.TPOINT_WT_FJSSFS);
+
+                int daynum = DateUtils.daysDiff(beginDate, endDate);
+                long pried = 600 ;
+                long count = 6 * 24 * daynum;
+
+                DecimalFormat dcmFmt = new DecimalFormat("0.00");
+                List<PointData> gls = realApiUtil.getHistoryDatasSnap(gl, beginDate.getTime() / 1000, endDate.getTime() / 1000, count, pried);
+
+                List<PointData> fss = realApiUtil.getHistoryDatasSnap(fs, beginDate.getTime() / 1000, endDate.getTime() / 1000, count, pried);
+
+
+                if (!gls.isEmpty() && !fss.isEmpty()) {
+                    for (int i = 0; i < fss.size(); i++) {
+
+                        List<Double> ds = new ArrayList<Double>();
+
+                        double f = fss.get(i).getPointValueInDouble();
+                        ds.add(Double.valueOf(dcmFmt.format(f)));
+                        f = gls.get(i).getPointValueInDouble();
+                        ds.add(Double.valueOf(dcmFmt.format(f)));
+                        vos.add(ds);
+                    }
+                }
+
+                // cal.add(Calendar.MONTH,1);
+                StringBuilder sb=new StringBuilder();
+                sb.append("scatter_").append(wpId).append("_").append(month);
+                globalCache.set(String.valueOf(sb), JSON.toJSONString(vos));
+                System.out.println(String.valueOf(sb.append("完成")));
+            }
+
+
+
+
+    }
+
+    public static void main(String[]args) throws Exception {
+
+//        SpringApplication.run(SpringbootStart.class, args);
+//
+//        InitialRedis initialRedis=new InitialRedis();
+//        //初始化风机拟合功率
+//      // initialRedis.intialWindturbinepowercurvefitting();
+//
+//        //初始化场站没有散点图
+//        initialRedis.intialWpScatter();
+    }
+}

+ 730 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/spring/InitialRunner.java

@@ -0,0 +1,730 @@
+package com.gyee.frame.common.spring;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import com.alibaba.fastjson.TypeReference;
+import com.gyee.frame.common.cache.IGlobalCache;
+import com.gyee.frame.model.auto.*;
+import com.gyee.frame.service.*;
+import com.gyee.frame.service.photovolatic.*;
+import org.springframework.boot.CommandLineRunner;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.Resource;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 服务启动前执行,进行全局变量初始化
+ */
+@Component
+public class InitialRunner implements CommandLineRunner {
+
+
+    @Resource
+    private SysQuartzJobService sysQuartzJobService;
+    @Resource
+    private WindpowerstationService windpowerstationService;
+    @Resource
+    private ProjectService projectService;
+    @Resource
+    private LineService lineService;
+    @Resource
+    private WindturbineService windturbineService;
+    @Resource
+    private WindPowerstationTestingPoint2Service windPowerstationTestingPoint2Service;
+    @Resource
+    private WindTurbineTestingPointAiService windTurbineTestingPointAiService;
+    @Resource
+    private WindturbinepowercurvefittingService windturbinepowercurvefittingService;
+    @Resource
+    private WarningService warningService;
+    @Resource
+    private ModelpowerRdService modelpowerRdService;
+    @Resource
+    private EquipmentmodelService equipmentmodelService;
+    @Resource
+    private WarningClassifyService warningClassifyService;
+    @Resource
+    private ManufacturerService manufacturerService;
+    @Resource
+    private ModelPowerService modelPowerService;
+    @Resource
+    private IGlobalCache globalCache;
+    @Resource
+    private StoptypeService stoptypeService;
+//    @Resource
+//    private TaosMapService taosMapService;
+    @Resource
+    private WindTurbineTestingPointaiyjService windTurbineTestingPointaiyjService;
+    @Resource
+    private Alertrule2ervice alertrule2ervice;
+    @Resource
+    private WindturbinepartsService windturbinepartsService;
+    @Resource
+    private SquareService squareService;
+    @Resource
+    private InverterService inverterService;
+    @Resource
+    private BoxChangeService boxChangeService;
+    @Resource
+    private JunctionboxService junctionboxService;
+    @Resource
+    private PhotovoltaicTestingPointNewService photovoltaicTestingPointNewService;
+    public static List<Windpowerstation> wpallls = new ArrayList<Windpowerstation>(); // 风电场LIST集合(包含光电电)
+    public static List<Project> pjallls = new ArrayList<Project>(); //项目LIST集合(包含光电电)
+    public static List<Line> lineallls = new ArrayList<Line>(); // 线路LIST集合(包含光电电)
+    public static List<Windturbine> wtallls = new ArrayList<Windturbine>(); // 风电机LIST集合(包含光电电)
+
+    public static List<Windpowerstation> wpls = new ArrayList<Windpowerstation>(); // 风电场LIST集合
+    public static List<Windpowerstation> spls = new ArrayList<Windpowerstation>(); // 光伏场LIST集合
+    
+    public static List<Project> pjls = new ArrayList<Project>(); // 项目LIST集合
+    public static List<Line> linels = new ArrayList<Line>(); // 线路LIST集合
+    public static List<Windturbine> wtls = new ArrayList<Windturbine>(); // 风电机LIST集合
+
+    public static List< Alertrule2> alertrulels = new ArrayList< Alertrule2>(); // 自定义报警规则LIST集合
+
+
+    public static Map<String,  Alertrule2> alertrulemap = new HashMap<String,  Alertrule2>();//自定义报警规则MAP
+
+    public static Map<String, Windpowerstation> wpmap = new HashMap<String, Windpowerstation>();//风场(包含光电电)
+    public static Map<String, Project> pjmap = new HashMap<String, Project>(); // 项目MAP(包含光电电)
+    public static Map<String, Line> lnmap = new HashMap<String, Line>(); // 线路(包含光电电)
+    public static Map<String, Windturbine> wtmap = new HashMap<String, Windturbine>();//风机(包含光电电)
+    public static Map<String, List<Windpowerstation>> re_wpmap = new HashMap<String, List<Windpowerstation>>();
+    public static Map<String, Stoptype> stoptypemap = new HashMap<String, Stoptype>();//停机类型
+    public static List<Warning2> warnls = new ArrayList<Warning2>(); // 报警LIST集合
+    public static Map<String, Warning2> warningmap = new HashMap<String, Warning2>();// 报警MAP集合
+    public static List<Windturbineparts> windturbinepartsls = new ArrayList<Windturbineparts>();
+    public static Map<String, Windturbineparts> windturbinepartsmap = new HashMap<String, Windturbineparts>();
+    public static Map<String, Map<String, List<Warning2>>> warnmodelmap = new HashMap<>();
+    public static Map<String, List<Warning2>> warnmap = new HashMap<>();// 按照型号划分报警MAP集合 <型号,报警集合>
+    public static List<WarningClassify> warningClassls = new ArrayList<WarningClassify>(); //报警类型列表
+    public static Map<String, WarningClassify> warningClassifymap = new HashMap<String, WarningClassify>();
+    public static Map<String, Manufacturer> manufacturermap = new HashMap<String, Manufacturer>();
+
+    public static Map<String, List<Windturbine>> wp_wtmap = new HashMap<String, List<Windturbine>>();
+    public static Map<String, List<Windturbine>> pj_wtmap = new HashMap<String, List<Windturbine>>();
+    public static Map<String, List<Windturbine>> ln_wtmap = new HashMap<String, List<Windturbine>>();
+    public static Map<String, List<Project>> pjsmap = new HashMap<String, List<Project>>(); // 通过风场编号获得所属项目
+    public static Map<String, List<Line>> lnsmap = new HashMap<String, List<Line>>(); // 通过项目编号获得所属线路
+    public static Map<String, Map<Double, ModelpowerRd>> mprdMap = new HashMap<String, Map<Double, ModelpowerRd>>();
+    public static Map<String, Map<String, Windturbinetestingpointnew>> wtPointmap = new HashMap<String, Map<String, Windturbinetestingpointnew>>();// 风电机测点AI表
+   // public static Map<String, Map<String, Windturbinetestingpointnew>> wtPointmap = new HashMap<String, Map<String, Windturbinetestingpointnew>>();// 风电机测点AI表
+    public static Map<String, Map<String, Windpowerstationpointnew>> wpPointmap = new HashMap<String, Map<String, Windpowerstationpointnew>>();//场站测点
+    public static Map<String, Map<String, Windpowerstationpointnew>> pjPointmap = new HashMap<String, Map<String, Windpowerstationpointnew>>();//项目测点
+    public static Map<String, Map<String, Windpowerstationpointnew>> lnPointmap = new HashMap<String, Map<String, Windpowerstationpointnew>>();//线路测点
+    public static Map<String, SysQuartzJob> jobsmap = new HashMap<String, SysQuartzJob>();
+    public static Map<String, Map<Double, Windturbinepowercurvefitting>> wpcmap = new HashMap<String, Map<Double, Windturbinepowercurvefitting>>();
+    public static Map<String, Equipmentmodel> mlmap = new HashMap<String, Equipmentmodel>();// 风电机模型
+    public static Map<String, Map<String, ModelPower>> modelPowermap = new HashMap<String, Map<String, ModelPower>>();// 风电机类型对应功率表
+    public static Map<String, String> taosmap = new HashMap<String, String>(); // Taos映射
+    public static Map<String, Map<String, WindTurbineTestingPointaiyj>> wtpAiyjmap = new HashMap<String, Map<String, WindTurbineTestingPointaiyj>>();// 风电机测点AI表--针对风机预警
+    public static Map<String, Map<String, Object>> appendYcglMap = new HashMap<String, Map<String, Object>>();// 预测功率追加
+
+
+    public static Map<String,Integer> wppointnummap=new HashMap<>();
+    Map<String, Object> ycmap = new HashMap<>();
+
+    private final String QS = "0";
+    private final String FD = "-1";
+    private final String GF = "-2";
+
+
+    /***********************************************光伏初始化*************************************************************/
+    public static Map<String,Square> sqmap = new HashMap<String, Square>();
+
+
+    public static Map<String, List<BoxChange>> gp_xbmap = new HashMap<String, List<BoxChange>>();
+    public static Map<String,BoxChange> xbmap = new HashMap<String, BoxChange>();
+    public static Map<String, List<Inverter>> gp_nbqmap = new HashMap<String, List<Inverter>>();
+    public static Map<String, List<Inverter>> pj_nbqmap = new HashMap<String, List<Inverter>>();
+    public static Map<String, List<Inverter>> ln_nbqmap = new HashMap<String, List<Inverter>>();
+    public static Map<String, List<Inverter>> sq_nbqmap = new HashMap<String, List<Inverter>>();
+    public static Map<String,Inverter> nbqmap = new HashMap<String, Inverter>();
+    public static Map<String, List<Junctionbox>> gp_hlxmap = new HashMap<String, List<Junctionbox>>();
+    public static Map<String,Junctionbox> hlxmap = new HashMap<String, Junctionbox>();
+    public static Map<String, Map<String, PhotovoltaicTestingPointNew>> phPointmap = new HashMap<String, Map<String, PhotovoltaicTestingPointNew>>();// 逆变器测点
+    /***********************************************光伏初始化*************************************************************/
+
+    @Override
+    public void run(String... args) throws Exception {
+        System.out.println(">>>>>>>>>>>>>>>服务启动执行,换成测点关联数据 <<<<<<<<<<<<<");
+
+//        List<Square> sqqls=squareService.selectAll();
+//        if(!sqqls.isEmpty())
+//        {
+//            for (Square sq : sqqls) {
+//                sqmap.put(sq.getId(),sq);
+//            }
+//        }
+//
+//        List<Inverter> nbqls=inverterService.selectAll();
+//
+//        if(!nbqls.isEmpty())
+//        {
+//            for (Inverter it : nbqls) {
+//                if (gp_nbqmap.containsKey(it.getWindpowerstationid())) {
+//                    List<Inverter> ls=gp_nbqmap.get(it.getWindpowerstationid());
+//                    ls.add(it);
+//                    gp_nbqmap.put(it.getWindpowerstationid(),ls);
+//                }else
+//                {
+//                    List<Inverter> ls=new ArrayList<>();
+//                    ls.add(it);
+//                    gp_nbqmap.put(it.getWindpowerstationid(),ls);
+//                }
+//                if (sq_nbqmap.containsKey(it.getSquareid())) {
+//                    List<Inverter> ls=sq_nbqmap.get(it.getSquareid());
+//                    ls.add(it);
+//                    sq_nbqmap.put(it.getSquareid(),ls);
+//                }else
+//                {
+//                    List<Inverter> ls=new ArrayList<>();
+//                    ls.add(it);
+//                    sq_nbqmap.put(it.getSquareid(),ls);
+//                }
+//
+//                if (pj_nbqmap.containsKey(it.getProjectid())) {
+//                    List<Inverter> ls = pj_nbqmap.get(it.getProjectid());
+//                    ls.add(it);
+//                    pj_nbqmap.put(it.getProjectid(), ls);
+//                } else {
+//                    List<Inverter> ls = new ArrayList();
+//                    ls.add(it);
+//                    pj_nbqmap.put(it.getProjectid(), ls);
+//                }
+//
+//
+//                if (ln_nbqmap.containsKey(it.getLineid())) {
+//                    List<Inverter> ls = ln_nbqmap.get(it.getLineid());
+//                    ls.add(it);
+//                    ln_nbqmap.put(it.getLineid(), ls);
+//                } else {
+//                    List<Inverter> ls = new ArrayList();
+//                    ls.add(it);
+//                    ln_nbqmap.put(it.getLineid(), ls);
+//                }
+//
+//                nbqmap.put(it.getId(),it);
+//            }
+//        }
+//
+//
+//        List<BoxChange> xbls=boxChangeService.selectAll();
+//
+//        if(!xbls.isEmpty())
+//        {
+//            for (BoxChange it : xbls) {
+//                if (gp_xbmap.containsKey(it.getWindpowerstationid())) {
+//                    List<BoxChange> ls=gp_xbmap.get(it.getWindpowerstationid());
+//                    ls.add(it);
+//                    gp_xbmap.put(it.getWindpowerstationid(),ls);
+//                }else
+//                {
+//                    List<BoxChange> ls=new ArrayList<>();
+//                    ls.add(it);
+//                    gp_xbmap.put(it.getWindpowerstationid(),ls);
+//                }
+//
+//                xbmap.put(it.getId(),it);
+//            }
+//        }
+//
+//        List<Junctionbox> hlxls=junctionboxService.selectAll();
+//
+//        if(!hlxls.isEmpty())
+//        {
+//            for (Junctionbox it : hlxls) {
+//                if (gp_hlxmap.containsKey(it.getWindpowerstationid())) {
+//                    List<Junctionbox> ls=gp_hlxmap.get(it.getWindpowerstationid());
+//                    ls.add(it);
+//                    gp_hlxmap.put(it.getWindpowerstationid(),ls);
+//                }else
+//                {
+//                    List<Junctionbox> ls=new ArrayList<>();
+//                    ls.add(it);
+//                    gp_hlxmap.put(it.getWindpowerstationid(),ls);
+//                }
+//                hlxmap.put(it.getId(),it);
+//            }
+//        }
+//
+//        List<PhotovoltaicTestingPointNew> phls=photovoltaicTestingPointNewService.selectAll();
+//
+//        if(!phls.isEmpty())
+//        {
+//            for(PhotovoltaicTestingPointNew mp : phls){
+//
+//                if(mp.getTypes().equals(PhotoVolaticType.XB))
+//                {
+//
+//                    if(phPointmap.containsKey(mp.getBoxchangeid())){
+//                        Map<String, PhotovoltaicTestingPointNew> map = phPointmap.get(mp.getBoxchangeid());
+//                        map.put(mp.getUniformcode(), mp);
+//                        phPointmap.put(mp.getBoxchangeid(), map);
+//                    }else{
+//                        Map<String, PhotovoltaicTestingPointNew> map = new HashMap<String, PhotovoltaicTestingPointNew>();
+//                        map.put(mp.getUniformcode(), mp);
+//                        phPointmap.put(mp.getBoxchangeid(), map);
+//                    }
+//                }else if(mp.getTypes().equals(PhotoVolaticType.NBQ))
+//                {
+//
+//                    if(phPointmap.containsKey(mp.getInverterid())){
+//                        Map<String, PhotovoltaicTestingPointNew> map = phPointmap.get(mp.getInverterid());
+//                        map.put(mp.getUniformcode(), mp);
+//                        phPointmap.put(mp.getInverterid(), map);
+//                    }else{
+//                        Map<String, PhotovoltaicTestingPointNew> map = new HashMap<String, PhotovoltaicTestingPointNew>();
+//                        map.put(mp.getUniformcode(), mp);
+//                        phPointmap.put(mp.getInverterid(), map);
+//                    }
+//                }else if(mp.getTypes().equals(PhotoVolaticType.HLX))
+//                {
+//
+//                    if(phPointmap.containsKey(mp.getJunctionboxid())){
+//                        Map<String, PhotovoltaicTestingPointNew> map = phPointmap.get(mp.getJunctionboxid());
+//                        map.put(mp.getUniformcode(), mp);
+//                        phPointmap.put(mp.getJunctionboxid(), map);
+//                    }else{
+//                        Map<String, PhotovoltaicTestingPointNew> map = new HashMap<String, PhotovoltaicTestingPointNew>();
+//                        map.put(mp.getUniformcode(), mp);
+//                        phPointmap.put(mp.getJunctionboxid(), map);
+//                    }
+//                }
+//
+//            }
+//        }
+        //配置追加功率曲线测点
+        Map<String, Object> ycmap = new HashMap<>();
+
+        String[] ycPoints4 = Constant.TPOINT_QS3_YGCL4.split(",");
+        String[] ycPoints24 = Constant.TPOINT_QS3_YGCL24.split(",");
+        //添加预测风速第一个点,存储到当前的历史值
+        ycmap.put("cdq1", "SLFGL.NX_GD_QSF_YC_P1_L1_001_CDQ001");
+        ycmap.put("dq1","SLFGL.NX_GD_QSF_YC_P1_L1_001_DQ0001");
+        //添加预测功率后续预测点字符串数组,实时数据
+        ycmap.put("cdq2", ycPoints4);
+        ycmap.put("dq2", ycPoints24);
+
+        appendYcglMap.put("QS_FDC", ycmap);
+
+        List< Alertrule2> alertrulels =alertrule2ervice.getAlertruleAllList();
+        if(!alertrulels.isEmpty())
+        {
+            for(Alertrule2 ar:alertrulels)
+            {
+                alertrulemap.put(ar.getName(),ar);
+            }
+        }
+
+        windturbinepartsls=windturbinepartsService.findAll();
+        if(!windturbinepartsls.isEmpty())
+        {
+            for(Windturbineparts wp:windturbinepartsls)
+            {
+                windturbinepartsmap.put(wp.getId(),wp);
+            }
+
+        }
+
+
+
+
+        List<SysQuartzJob> quartzJobs=sysQuartzJobService.selectByExample(new SysQuartzJobExample());
+
+        if(!quartzJobs.isEmpty())
+        {
+            for(SysQuartzJob sysQuartzJob:quartzJobs){
+
+                jobsmap.put(sysQuartzJob.getId(),sysQuartzJob);
+            }
+
+        }
+
+
+        List<WindTurbineTestingPointaiyj> list = windTurbineTestingPointaiyjService.findAll();
+
+        Map<String, WindTurbineTestingPointaiyj> yjmap = null;
+
+        if (list != null && !list.isEmpty()) {
+            for (WindTurbineTestingPointaiyj mp : list) {
+                if (wtpAiyjmap.containsKey(mp.getWindturbineid())) {
+                    yjmap = wtpAiyjmap.get(mp.getWindturbineid());
+                    yjmap.put(mp.getUniformcode(), mp);
+                } else {
+                    yjmap = new HashMap<String, WindTurbineTestingPointaiyj>();
+                    yjmap.put(mp.getUniformcode(), mp);
+                    wtpAiyjmap.put(mp.getWindturbineid(), yjmap);
+                }
+            }
+        }
+
+        String wpString = JSON.toJSONString(globalCache.get("PRODUCT-WP"));
+        wpPointmap = JSONObject.parseObject(wpString, new TypeReference<Map<String, Map<String, Windpowerstationpointnew>>>() {
+        });
+        String pjString = JSON.toJSONString(globalCache.get("PRODUCT-PJ"));
+        pjPointmap = JSONObject.parseObject(pjString, new TypeReference<Map<String, Map<String, Windpowerstationpointnew>>>() {
+        });
+        String lnString = JSON.toJSONString(globalCache.get("PRODUCT-LN"));
+        lnPointmap = JSONObject.parseObject(lnString, new TypeReference<Map<String, Map<String, Windpowerstationpointnew>>>() {
+        });
+
+        String wtString = JSON.toJSONString(globalCache.get("PRODUCT-WT"));
+        wtPointmap = JSONObject.parseObject(wtString, new TypeReference<Map<String, Map<String, Windturbinetestingpointnew>>>() {
+        });
+        String wpcmapString = (String)(globalCache.get("wpcmap"));
+        wpcmap = JSONObject.parseObject(wpcmapString, new TypeReference<Map<String, Map<Double, Windturbinepowercurvefitting>>>() {
+        });
+
+        WindpowerstationExample windpowerstationExample = new WindpowerstationExample();
+        windpowerstationExample.setOrderByClause("ordernum ASC");
+//        windpowerstationExample.createCriteria().andIdNotLike("%SY_FDC%");
+        wpallls = windpowerstationService.selectByExample(windpowerstationExample);
+//        if (!wpallls.isEmpty()) {
+//            for (Windpowerstation wp : wpallls) {
+//                if (wp.getId().endsWith("FDC")) {
+//                    wpls.add(wp);
+//                }
+//                if (wp.getId().endsWith("GDC")) {
+//                	spls.add(wp);
+//                }
+//                wpmap.put(wp.getId(), wp);
+//            }
+//        }
+
+
+        if (!wpallls.isEmpty()) {
+            for (Windpowerstation wp : wpallls) {
+                if (wp.getId().endsWith("FDC")) {
+                    wpls.add(wp);
+                }
+                if (wp.getId().endsWith("GDC")) {
+                    spls.add(wp);
+                }
+
+                if(re_wpmap.containsKey(wp.getCompanyid()+QS))
+                {
+                    List<Windpowerstation> ls=re_wpmap.get(wp.getCompanyid()+QS);
+                    ls.add(wp);
+                    re_wpmap.put(wp.getCompanyid()+QS,ls);
+                }else {
+                    List<Windpowerstation> ls=new ArrayList<>();
+                    ls.add(wp);
+                    re_wpmap.put(wp.getCompanyid()+QS,ls);
+                }
+
+
+                if(re_wpmap.containsKey(wp.getCompanyid()+FD))
+                {
+                    List<Windpowerstation> ls=re_wpmap.get(wp.getCompanyid()+FD);
+                    if(wp.getId().endsWith("FDC"))
+                    {
+                        ls.add(wp);
+                        re_wpmap.put(wp.getCompanyid()+FD,ls);
+                    }
+                }else {
+                    List<Windpowerstation> ls=new ArrayList<>();
+                    if(wp.getId().endsWith("FDC"))
+                    {
+                        ls.add(wp);
+                        re_wpmap.put(wp.getCompanyid()+FD,ls);
+                    }
+                }
+
+                if(re_wpmap.containsKey(wp.getCompanyid()+GF))
+                {
+                    List<Windpowerstation> ls=re_wpmap.get(wp.getCompanyid()+GF);
+                    if(wp.getId().endsWith("GDC"))
+                    {
+                        ls.add(wp);
+                        re_wpmap.put(wp.getCompanyid()+GF,ls);
+                    }
+                }else {
+                    List<Windpowerstation> ls=new ArrayList<>();
+                    if(wp.getId().endsWith("GDC"))
+                    {
+                        ls.add(wp);
+                        re_wpmap.put(wp.getCompanyid()+GF,ls);
+                    }
+                }
+                wpmap.put(wp.getId(), wp);
+            }
+        }
+
+
+        ProjectExample projectExample = new ProjectExample();
+        projectExample.setOrderByClause("ordernum ASC");
+//        projectExample.createCriteria().andWindpowerstationidNotLike("%SY_FDC%");
+        pjallls = projectService.selectByExample(projectExample);
+
+        if (!pjallls.isEmpty()) {
+            for (Project pj : pjallls) {
+                pjmap.put(pj.getId(), pj);
+                if (pj.getWindpowerstationid().endsWith("FDC")) {
+                    pjls.add(pj);
+                }
+                if (pjsmap.containsKey(pj.getWindpowerstationid())) {
+                    List<Project> pjls = pjsmap.get(pj.getWindpowerstationid());
+                    pjls.add(pj);
+                    pjsmap.put(pj.getWindpowerstationid(), pjls);
+                } else {
+                    List<Project> pjls = new ArrayList<Project>();
+                    pjls.add(pj);
+                    pjsmap.put(pj.getWindpowerstationid(), pjls);
+                }
+            }
+        }
+
+        LineExample lineExample = new LineExample();
+        lineExample.setOrderByClause("ordernum ASC");
+        lineExample.createCriteria().getAllCriteria();
+        lineallls = lineService.selectByExample(lineExample);
+
+        if (!lineallls.isEmpty()) {
+            for (Line ln : lineallls) {
+                lnmap.put(ln.getId(), ln);
+                if (pjmap.containsKey(ln.getProjectid())) {
+                    Project pj = pjmap.get(ln.getProjectid());
+                    if (pj.getWindpowerstationid().endsWith("FDC")) {
+                        linels.add(ln);
+                    }
+                }
+                if (lnsmap.containsKey(ln.getProjectid())) {
+                    List<Line> lnls = lnsmap.get(ln.getProjectid());
+                    lnls.add(ln);
+                    lnsmap.put(ln.getProjectid(), lnls);
+                } else {
+                    List<Line> lnls = new ArrayList<Line>();
+                    lnls.add(ln);
+                    lnsmap.put(ln.getProjectid(), lnls);
+                }
+            }
+        }
+
+        WindturbineExample windturbineExample = new WindturbineExample();
+        windturbineExample.setOrderByClause("ID ASC");
+
+        wtallls = windturbineService.selectByExample(windturbineExample);
+
+        if (!wtallls.isEmpty()) {
+            for (Windturbine wt : wtallls) {
+                if (wpmap.containsKey(wt.getWindpowerstationid())) {
+                    if (wt.getWindpowerstationid().endsWith("FDC")) {
+                        wtls.add(wt);
+                    }
+                }
+
+                wtmap.put(wt.getId(), wt);
+            }
+        }
+
+        mprdMap = modelpowerRdService.getModelpowerRdAllMap();
+
+        StoptypeExample stoptypeExample = new StoptypeExample();
+        stoptypeExample.setOrderByClause("name ASC");
+
+        List<Stoptype> stoptypels = stoptypeService.selectByExample(stoptypeExample);
+        if (stoptypels != null && !stoptypels.isEmpty()) {
+            for (int i = 0; i < stoptypels.size(); i++) {
+                stoptypemap.put(stoptypels.get(i).getId(),stoptypels.get(i));
+            }
+        }
+
+//        WindturbinepowercurvefittingExample windturbinepowercurvefittingExample=new WindturbinepowercurvefittingExample();
+//        windturbinepowercurvefittingExample.setOrderByClause("WINDTURBINEID ASC,speed ASC");
+//        List<Windturbinepowercurvefitting> wpclist= windturbinepowercurvefittingService.selectByExample(windturbinepowercurvefittingExample);
+//
+//        if (!wpclist.isEmpty()) {
+//            for (Windturbinepowercurvefitting wc : wpclist) {
+//                if (wpcmap.containsKey(wc.getWindturbineid())) {
+//                    Map<Double, Windturbinepowercurvefitting> map = wpcmap.get(wc.getWindturbineid());
+//                    map.put(wc.getSpeed(), wc);
+//                } else {
+//                    Map<Double, Windturbinepowercurvefitting> map = new HashMap<Double, Windturbinepowercurvefitting>();
+//                    map.put(wc.getSpeed(), wc);
+//                    wpcmap.put(wc.getWindturbineid(), map);
+//                }
+//            }
+//        }
+
+        Warning2Example warningExample = new Warning2Example();
+        warningExample.setOrderByClause("id ASC");
+
+        Warning2Example.Criteria criteria = warningExample.createCriteria();
+        criteria.andEdnavalueNotEqualTo(0);
+        criteria.andWarningclassifyidIsNotNull();
+        warnls = warningService.selectByExample(warningExample);
+
+        if (warnls != null && !warnls.isEmpty()) {
+            for (int i = 0; i < warnls.size(); i++) {
+                Warning2 warning = warnls.get(i);
+
+                if (warnmodelmap.containsKey(warning.getModelid())) {
+                    Map<String, List<Warning2>> map = warnmodelmap.get(warning.getModelid());
+                    if(map.containsKey(warning.getWarningclassifyid()))
+                    {
+                        List<Warning2> ls =map.get(warning.getWarningclassifyid());
+                        ls.add(warning);
+                        map.put(warning.getWarningclassifyid(), ls);
+                    }else
+                    {
+                        List<Warning2> ls = new ArrayList<>();
+                        ls.add(warning);
+                        map.put(warning.getWarningclassifyid(), ls);
+                    }
+                    warnmodelmap.put(warning.getModelid(),map);
+                } else {
+                    Map<String, List<Warning2>> map = new HashMap<>();
+                    List<Warning2> ls = new ArrayList<>();
+                    ls.add(warning);
+                    map.put(warning.getWarningclassifyid(), ls);
+                    warnmodelmap.put(warning.getModelid(),map);
+                }
+
+                if (warnmap.containsKey(warning.getModelid())) {
+                    List<Warning2> ls =warnmap.get(warning.getModelid());
+                    ls.add(warning);
+                    warnmap.put(warning.getModelid(),ls);
+                } else {
+                    List<Warning2> ls =new ArrayList<>();
+                    ls.add(warning);
+                    warnmap.put(warning.getModelid(),ls);
+                }
+
+                warningmap.put(warning.getId(), warning);
+            }
+        }
+        if (wtallls != null && !wtallls.isEmpty()) {
+
+            for (int i = 0; i < wtallls.size(); i++) {
+
+                Windturbine point = wtallls.get(i);
+                if (wp_wtmap.containsKey(point.getWindpowerstationid())) {
+                    List<Windturbine> ls = wp_wtmap.get(point.getWindpowerstationid());
+                    ls.add(point);
+                    wp_wtmap.put(point.getWindpowerstationid(), ls);
+                } else {
+                    List<Windturbine> ls = new ArrayList();
+                    ls.add(point);
+                    wp_wtmap.put(point.getWindpowerstationid(), ls);
+                }
+
+                if (pj_wtmap.containsKey(point.getProjectid())) {
+                    List<Windturbine> ls = pj_wtmap.get(point.getProjectid());
+                    ls.add(point);
+                    pj_wtmap.put(point.getProjectid(), ls);
+                } else {
+                    List<Windturbine> ls = new ArrayList();
+                    ls.add(point);
+                    pj_wtmap.put(point.getProjectid(), ls);
+                }
+
+
+                if (ln_wtmap.containsKey(point.getLineid())) {
+                    List<Windturbine> ls = ln_wtmap.get(point.getLineid());
+                    ls.add(point);
+                    ln_wtmap.put(point.getLineid(), ls);
+                } else {
+                    List<Windturbine> ls = new ArrayList();
+                    ls.add(point);
+                    ln_wtmap.put(point.getLineid(), ls);
+                }
+
+            }
+
+
+        }
+//
+
+//        WindPowerStationTestingPoint2Example windPowerstationTestingPointExample=new WindPowerStationTestingPoint2Example();
+//        windPowerstationTestingPointExample.createCriteria().getAllCriteria();
+//        List<WindPowerStationTestingPoint2> wpPointlist= windPowerstationTestingPoint2Service.selectByExample(windPowerstationTestingPointExample);
+//
+//        Map<String,WindPowerStationTestingPoint2> items=null;
+//        if(wpPointlist!=null && !wpPointlist.isEmpty()){
+//            for(int i=0;i<wpPointlist.size();i++){
+//                WindPowerStationTestingPoint2 point=wpPointlist.get(i);
+//                if(stationPointmap.containsKey(point.getWindpowerstationid())){
+//                    items=stationPointmap.get(point.getWindpowerstationid());
+//                    items.put(point.getUniformcode(), point);
+//                }
+//                else{
+//                    items=new HashMap<String,WindPowerStationTestingPoint2>();
+//                    stationPointmap.put(point.getWindpowerstationid(), items);
+//                    items.put(point.getUniformcode(), point);
+//                }
+//
+//            }
+//        }
+//
+//        WindTurbineTestingPointAi2Example windTurbineTestingPointAiExample=new WindTurbineTestingPointAi2Example();
+//        windTurbineTestingPointAiExample.createCriteria().getAllCriteria();
+//        List<WindTurbineTestingPointAi2> wtAilist= windTurbineTestingPointAiService.selectByExample(windTurbineTestingPointAiExample);
+//
+//        Map<String, WindTurbineTestingPointAi2> map = null;
+//
+//        if(wtAilist != null && !wtAilist.isEmpty()){
+//            for(WindTurbineTestingPointAi2 mp : wtAilist){
+//                if(wtpAimap.containsKey(mp.getWindturbineid())){
+//                    map = wtpAimap.get(mp.getWindturbineid());
+//                    map.put(mp.getUniformcode(), mp);
+//                }else{
+//                    map = new HashMap<String, WindTurbineTestingPointAi2>();
+//                    map.put(mp.getUniformcode(), mp);
+//                    wtpAimap.put(mp.getWindturbineid(), map);
+//                }
+//            }
+//        }
+
+        EquipmentmodelExample example = new EquipmentmodelExample();
+        List<Equipmentmodel> mlls = equipmentmodelService.selectByExample(example);
+        if (!mlls.isEmpty()) {
+            for (Equipmentmodel model : mlls) {
+                mlmap.put(model.getId(), model);
+            }
+        }
+
+        WarningClassifyExample wcexample = new WarningClassifyExample();
+        warningClassls = warningClassifyService.selectByExample(wcexample);
+        if (!warningClassls.isEmpty()) {
+            for (WarningClassify model : warningClassls) {
+                warningClassifymap.put(model.getId(), model);
+            }
+        }
+
+        ManufacturerExample mfexample = new ManufacturerExample();
+        List<Manufacturer> mfls = manufacturerService.selectByExample(mfexample);
+        if (!mfls.isEmpty()) {
+            for (Manufacturer model : mfls) {
+                manufacturermap.put(model.getId(), model);
+            }
+        }
+
+        ModelPowerExample mpexample = new ModelPowerExample();
+        List<ModelPower> mpls = modelPowerService.selectByExample(mpexample);
+        if (!mpls.isEmpty()) {
+
+            Map<String, ModelPower> mpmap = null;
+
+            if (mpls != null && !mpls.isEmpty()) {
+                for (ModelPower mp : mpls) {
+                    if (modelPowermap.containsKey(mp.getModelid())) {
+                        mpmap = modelPowermap.get(mp.getModelid());
+                        mpmap.put(String.valueOf(mp.getSpeed().doubleValue()), mp);
+                    } else {
+                        mpmap = new HashMap<String, ModelPower>();
+                        mpmap.put(String.valueOf(mp.getSpeed().doubleValue()), mp);
+                        modelPowermap.put(mp.getModelid(), mpmap);
+                    }
+                }
+            }
+        }
+        wppointnummap= windPowerstationTestingPoint2Service.getWpPointTotal();
+    }
+
+}

+ 116 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/spring/SpringUtils.java

@@ -0,0 +1,116 @@
+package com.gyee.frame.common.spring;
+
+import org.springframework.aop.framework.AopContext;
+import org.springframework.beans.BeansException;
+import org.springframework.beans.factory.NoSuchBeanDefinitionException;
+import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
+import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
+import org.springframework.stereotype.Component;
+
+/**
+* spring工具类 方便在非spring管理环境中获取bean
+* @ClassName: SpringUtils
+* @author gyee
+* @date 2019-09-11 11:28
+*
+ */
+@Component
+public final class SpringUtils implements BeanFactoryPostProcessor
+{
+    /** Spring应用上下文环境 */
+    private static ConfigurableListableBeanFactory beanFactory;
+
+    @Override
+    public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException
+    {
+        SpringUtils.beanFactory = beanFactory;
+    }
+
+    /**
+     * 获取对象
+     *
+     * @param name
+     * @return Object 一个以所给名字注册的bean的实例
+     * @throws org.springframework.beans.BeansException
+     *
+     */
+    @SuppressWarnings("unchecked")
+    public static <T> T getBean(String name) throws BeansException
+    {
+        return (T) beanFactory.getBean(name);
+    }
+
+    /**
+     * 获取类型为requiredType的对象
+     *
+     * @param clz
+     * @return
+     * @throws org.springframework.beans.BeansException
+     *
+     */
+    public static <T> T getBean(Class<T> clz) throws BeansException
+    {
+        T result = (T) beanFactory.getBean(clz);
+        return result;
+    }
+
+    /**
+     * 如果BeanFactory包含一个与所给名称匹配的bean定义,则返回true
+     *
+     * @param name
+     * @return boolean
+     */
+    public static boolean containsBean(String name)
+    {
+        return beanFactory.containsBean(name);
+    }
+
+    /**
+     * 判断以给定名字注册的bean定义是一个singleton还是一个prototype。 如果与给定名字相应的bean定义没有被找到,将会抛出一个异常(NoSuchBeanDefinitionException)
+     *
+     * @param name
+     * @return boolean
+     * @throws org.springframework.beans.factory.NoSuchBeanDefinitionException
+     *
+     */
+    public static boolean isSingleton(String name) throws NoSuchBeanDefinitionException
+    {
+        return beanFactory.isSingleton(name);
+    }
+
+    /**
+     * @param name
+     * @return Class 注册对象的类型
+     * @throws org.springframework.beans.factory.NoSuchBeanDefinitionException
+     *
+     */
+    public static Class<?> getType(String name) throws NoSuchBeanDefinitionException
+    {
+        return beanFactory.getType(name);
+    }
+
+    /**
+     * 如果给定的bean名字在bean定义中有别名,则返回这些别名
+     *
+     * @param name
+     * @return
+     * @throws org.springframework.beans.factory.NoSuchBeanDefinitionException
+     *
+     */
+    public static String[] getAliases(String name) throws NoSuchBeanDefinitionException
+    {
+        return beanFactory.getAliases(name);
+    }
+
+    /**
+     * 获取aop代理对象
+     * 
+     * @param invoker
+     * @return
+     */
+    @SuppressWarnings("unchecked")
+    public static <T> T getAopProxy(T invoker)
+    {
+        return (T) AopContext.currentProxy();
+    }
+}

+ 20 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/spring/WpEnum.java

@@ -0,0 +1,20 @@
+package com.gyee.frame.common.spring;
+
+public  enum  WpEnum {
+
+    MHS_FDC("MHS_FDC"),
+    NSS_FDC("NSS_FDC"),
+    QS_FDC("QS_FDC"),
+    SBQ_FDC("SBQ_FDC"),
+    XS_FDC("XS_FDC"),
+    DWK_GDC("DWK_GDC"),
+    PL_GDC("PL_GDC"),
+    XH_GDC("XH_GDC"),
+    MCH_GDC("MCH_GDC"),
+    HZJ_GDC("HZJ_GDC");
+
+    public String id;
+    WpEnum(final  String c) {
+        id = c;
+    }
+}

+ 89 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/support/CharsetKit.java

@@ -0,0 +1,89 @@
+package com.gyee.frame.common.support;
+
+import com.gyee.frame.util.StringUtils;
+
+import java.nio.charset.Charset;
+import java.nio.charset.StandardCharsets;
+
+/**
+ * 字符集工具类
+ * 
+ * @author fc
+ *
+ */
+public class CharsetKit
+{
+    /** ISO-8859-1 */
+    public static final String ISO_8859_1 = "ISO-8859-1";
+    /** UTF-8 */
+    public static final String UTF_8 = "UTF-8";
+    /** GBK */
+    public static final String GBK = "GBK";
+
+    /** ISO-8859-1 */
+    public static final Charset CHARSET_ISO_8859_1 = Charset.forName(ISO_8859_1);
+    /** UTF-8 */
+    public static final Charset CHARSET_UTF_8 = Charset.forName(UTF_8);
+    /** GBK */
+    public static final Charset CHARSET_GBK = Charset.forName(GBK);
+
+    /**
+     * 转换为Charset对象
+     * 
+     * @param charset 字符集,为空则返回默认字符集
+     * @return Charset
+     */
+    public static Charset charset(String charset)
+    {
+        return StringUtils.isEmpty(charset) ? Charset.defaultCharset() : Charset.forName(charset);
+    }
+
+    /**
+     * 转换字符串的字符集编码
+     * 
+     * @param source 字符串
+     * @param srcCharset 源字符集,默认ISO-8859-1
+     * @param destCharset 目标字符集,默认UTF-8
+     * @return 转换后的字符集
+     */
+    public static String convert(String source, String srcCharset, String destCharset)
+    {
+        return convert(source, Charset.forName(srcCharset), Charset.forName(destCharset));
+    }
+
+    /**
+     * 转换字符串的字符集编码
+     * 
+     * @param source 字符串
+     * @param srcCharset 源字符集,默认ISO-8859-1
+     * @param destCharset 目标字符集,默认UTF-8
+     * @return 转换后的字符集
+     */
+    public static String convert(String source, Charset srcCharset, Charset destCharset)
+    {
+        if (null == srcCharset)
+        {
+            srcCharset = StandardCharsets.ISO_8859_1;
+        }
+
+        if (null == destCharset)
+        {
+            srcCharset = StandardCharsets.UTF_8;
+        }
+
+        if (StringUtils.isEmpty(source) || srcCharset.equals(destCharset))
+        {
+            return source;
+        }
+        return new String(source.getBytes(srcCharset), destCharset);
+    }
+
+    /**
+     * @return 系统字符集编码
+     */
+    public static String systemCharset()
+    {
+        return Charset.defaultCharset().name();
+    }
+
+}

File diff suppressed because it is too large
+ 1057 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/support/Convert.java


+ 240 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/support/ConvertUtil.java

@@ -0,0 +1,240 @@
+package com.gyee.frame.common.support;
+
+import java.math.BigDecimal;
+import java.util.Arrays;
+import java.util.List;
+import com.gyee.frame.util.StringUtils;
+
+import cn.hutool.core.util.StrUtil;
+
+/**
+ * 类型转换器
+ * 
+ * @author fc
+ * 
+ */
+public class ConvertUtil {
+
+	/**
+	 * 转换为字符串<br>
+	 * 如果给定的值为null,或者转换失败,返回默认值<br>
+	 * 转换失败不会报错
+	 * 
+	 * @param value 被转换的值
+	 * @param defaultValue 转换错误时的默认值
+	 * @return 结果
+	 */
+	public static String toStr(Object value, String defaultValue) {
+		if (null == value) {
+			return defaultValue;
+		}
+		if (value instanceof String) {
+			return (String) value;
+		}
+		return value.toString();
+	}
+
+	/**
+	 * 转换为Integer数组<br>
+	 * @param split 被转换的值
+	 * @return 结果
+	 */
+	public static Integer[] toIntArray(String str) {
+		return toIntArray(",", str);
+	}
+
+	/**
+	 * 转换为Integer数组<br>
+	 * @param split 分隔符
+	 * @param split 被转换的值
+	 * @return 结果
+	 */
+	public static Integer[] toIntArray(String split, String str) {
+		if (StrUtil.isEmpty(str)) {
+			return new Integer[] {};
+		}
+		String[] strings = str.split(split);
+		final Integer[] ints = new Integer[strings.length];
+		for (int i = 0; i < strings.length; i++) {
+			final Integer v = toInt(strings[i], 0);
+			ints[i] = v;
+		}
+		return ints;
+	}
+
+	/**
+	 * 转换为int<br>
+	 * 如果给定的值为空,或者转换失败,返回默认值<br>
+	 * 转换失败不会报错
+	 * @param value 被转换的值
+	 * @param defaultValue 转换错误时的默认值
+	 * @return 结果
+	 */
+	public static Integer toInt(Object value, Integer defaultValue) {
+		if (value == null) {
+			return defaultValue;
+		}
+		if (value instanceof Integer) {
+			return (Integer) value;
+		}
+		if (value instanceof Number) {
+			return ((Number) value).intValue();
+		}
+		final String valueStr = toStr(value, null);
+		if (StringUtils.isEmpty(valueStr)) {
+			return defaultValue;
+		}
+		try {
+			return Integer.parseInt(valueStr.trim());
+		} catch (Exception e) {
+			return defaultValue;
+		}
+	}
+
+	/**
+	 * 转换为List<String>数组<br>
+	 * @param split 被转换的值
+	 * @return 结果
+	 */
+	public static List<String> toListStrArray(String str) {
+		String[] stringArray = toStrArray(str);
+		List<String> stringB = Arrays.asList(stringArray);
+		return stringB;
+	}
+
+	/**
+	 * 转换为String数组<br> 
+	 * @param split 被转换的值
+	 * @return 结果
+	 */
+	public static String[] toStrArray(String str) {
+		return toStrArray(",", str);
+	}
+
+	/**
+	 * 转换为String数组<br>
+	 * 
+	 * @param split 分隔符
+	 * @param split 被转换的值
+	 * @return 结果
+	 */
+	public static String[] toStrArray(String split, String str) {
+		return str.split(split);
+	}
+	/**
+     * 转换为Long数组<br>
+     * 
+     * @param split 被转换的值
+     * @return 结果
+     */
+    public static Long[] toLongArray(String str)
+    {
+        return toLongArray(",", str);
+    }
+    /**
+     * 转换为Long数组<br>
+     * 
+     * @param isIgnoreConvertError 是否忽略转换错误,忽略则给值null
+     * @param values 被转换的值
+     * @return 结果
+     */
+    public static Long[] toLongArray(String split, String str)
+    {
+        if (StringUtils.isEmpty(str))
+        {
+            return new Long[] {};
+        }
+        String[] arr = str.split(split);
+        final Long[] longs = new Long[arr.length];
+        for (int i = 0; i < arr.length; i++)
+        {
+            final Long v = toLong(arr[i], null);
+            longs[i] = v;
+        }
+        return longs;
+    }
+    /**
+     * 转换为long<br>
+     * 如果给定的值为空,或者转换失败,返回默认值<br>
+     * 转换失败不会报错
+     * 
+     * @param value 被转换的值
+     * @param defaultValue 转换错误时的默认值
+     * @return 结果
+     */
+    public static Long toLong(Object value, Long defaultValue)
+    {
+        if (value == null)
+        {
+            return defaultValue;
+        }
+        if (value instanceof Long)
+        {
+            return (Long) value;
+        }
+        if (value instanceof Number)
+        {
+            return ((Number) value).longValue();
+        }
+        final String valueStr = toStr(value, null);
+        if (StringUtils.isEmpty(valueStr))
+        {
+            return defaultValue;
+        }
+        try
+        {
+            // 支持科学计数法
+            return new BigDecimal(valueStr.trim()).longValue();
+        }
+        catch (Exception e)
+        {
+            return defaultValue;
+        }
+    }
+    
+    /**
+     * 转换为BigDecimal<br>
+     * 如果给定的值为空,或者转换失败,返回默认值<br>
+     * 转换失败不会报错
+     * 
+     * @param value 被转换的值
+     * @param defaultValue 转换错误时的默认值
+     * @return 结果
+     */
+    public static BigDecimal toBigDecimal(Object value, BigDecimal defaultValue)
+    {
+        if (value == null)
+        {
+            return defaultValue;
+        }
+        if (value instanceof BigDecimal)
+        {
+            return (BigDecimal) value;
+        }
+        if (value instanceof Long)
+        {
+            return new BigDecimal((Long) value);
+        }
+        if (value instanceof Double)
+        {
+            return new BigDecimal((Double) value);
+        }
+        if (value instanceof Integer)
+        {
+            return new BigDecimal((Integer) value);
+        }
+        final String valueStr = toStr(value, null);
+        if (StringUtils.isEmpty(valueStr))
+        {
+            return defaultValue;
+        }
+        try
+        {
+            return new BigDecimal(valueStr);
+        }
+        catch (Exception e)
+        {
+            return defaultValue;
+        }
+    }
+}

+ 77 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/support/KaptchaTextCreator.java

@@ -0,0 +1,77 @@
+package com.gyee.frame.common.support;
+
+import java.security.SecureRandom;
+import java.util.Random;
+import com.google.code.kaptcha.text.impl.DefaultTextCreator;
+
+/**
+ * 验证码实现类
+ * @author cs
+ */
+public class KaptchaTextCreator extends DefaultTextCreator
+{
+
+    private static final String[] CNUMBERS = {"0","1","2","3","4","5","6","7","8","9","10"};
+
+    @Override
+    public String getText()
+    {
+        Integer result = 0;
+        Random random = new SecureRandom();
+        int x = random.nextInt(10);
+        int y = random.nextInt(10);
+        StringBuilder suChinese = new StringBuilder();
+        int randomoperands = (int) Math.round(Math.random() * 2);
+        if (randomoperands == 0)
+        {
+            result = x * y;
+            suChinese.append(CNUMBERS[x]);
+            suChinese.append("*");
+            suChinese.append(CNUMBERS[y]);
+        }
+        else if (randomoperands == 1)
+        {
+            if (!(x == 0) && y % x == 0)
+            {
+                result = y / x;
+                suChinese.append(CNUMBERS[y]);
+                suChinese.append("/");
+                suChinese.append(CNUMBERS[x]);
+            }
+            else
+            {
+                result = x + y;
+                suChinese.append(CNUMBERS[x]);
+                suChinese.append("+");
+                suChinese.append(CNUMBERS[y]);
+            }
+        }
+        else if (randomoperands == 2)
+        {
+            if (x >= y)
+            {
+                result = x - y;
+                suChinese.append(CNUMBERS[x]);
+                suChinese.append("-");
+                suChinese.append(CNUMBERS[y]);
+            }
+            else
+            {
+                result = y - x;
+                suChinese.append(CNUMBERS[y]);
+                suChinese.append("-");
+                suChinese.append(CNUMBERS[x]);
+            }
+        }
+        else
+        {
+            result = x + y;
+            suChinese.append(CNUMBERS[x]);
+            suChinese.append("+");
+            suChinese.append(CNUMBERS[y]);
+        }
+        suChinese.append("=?@" + result);
+        return suChinese.toString();
+    }
+
+}

+ 148 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/websocket/ClientInboundChannelInterceptor.java

@@ -0,0 +1,148 @@
+package com.gyee.frame.common.websocket;
+
+import com.gyee.frame.common.quartz.QuartzSchedulerUtil;
+import com.gyee.frame.util.StringUtils;
+import org.springframework.messaging.Message;
+import org.springframework.messaging.MessageChannel;
+import org.springframework.messaging.simp.SimpMessageHeaderAccessor;
+import org.springframework.messaging.simp.stomp.StompCommand;
+import org.springframework.messaging.simp.stomp.StompHeaderAccessor;
+import org.springframework.messaging.support.ChannelInterceptor;
+import org.springframework.messaging.support.MessageHeaderAccessor;
+import org.springframework.stereotype.Component;
+
+import java.util.LinkedList;
+import java.util.Map;
+import java.util.concurrent.CopyOnWriteArraySet;
+
+/**
+ * websocket建立链接的时候获取headeri里认证的参数拦截器。
+ */
+@Component
+public class ClientInboundChannelInterceptor extends QuartzSchedulerUtil.SocketTaskUtil implements ChannelInterceptor {
+
+
+    private String AUTHTOKEN="authToken";
+    @Override
+    public Message<?> preSend(Message<?> message, MessageChannel channel) {
+        StompHeaderAccessor accessor = MessageHeaderAccessor.getAccessor(message, StompHeaderAccessor.class);
+        if (StompCommand.CONNECT.equals(accessor.getCommand())) {
+            Object raw = message.getHeaders().get(SimpMessageHeaderAccessor.NATIVE_HEADERS);
+
+            String topic=null;
+            String authToken=null;
+            if (raw instanceof Map) {
+                Object name = ((Map) raw).get("topic");
+                LinkedList<String> temp=(LinkedList<String>) name;
+                topic=temp.get(0);
+                Object authTokenobj = ((Map) raw).get("authToken");
+                 temp=(LinkedList<String>) authTokenobj;
+                authToken=temp.get(0);
+            }
+            //String authToken =String.valueOf(message.getHeaders().get(SimpMessageHeaderAccessor.SESSION_ID_HEADER));
+
+           // String authToken =String.valueOf(message.getHeaders().get(AUTHTOKEN));
+            if(StringUtils.notEmp(topic) && !topic.equals("undefined") && StringUtils.notEmp(authToken) && !authToken.equals("undefined")) {
+
+
+                //判断是否为带参操作
+                if(topic.indexOf(WebSocketConfig.PARAM)!=-1)
+                {
+                    if (StringUtils.notEmp(authToken)) {
+                        //判断带参sessionMAP中是否包含authToken
+                        if (WebSocketConfig.sessionparamcacheMap.containsKey(authToken)) {
+                            //通过sessionId获得topicSET集合
+                            CopyOnWriteArraySet<String> set = WebSocketConfig.sessionparamcacheMap.get(authToken);
+                            //截取topic/****/中的功能描述
+                            String temptoptic=topic.substring(topic.indexOf("/")+1);
+                            temptoptic=temptoptic.substring(0,temptoptic.indexOf("/"));
+                            //遍历SET中的主体
+                            for(String str:set)
+                            {
+                                //截取str/****/中的功能描述
+                                String tempstr=str.substring(str.indexOf("/")+1);
+                                tempstr=tempstr.substring(0,tempstr.indexOf("/"));
+                                //判断str的功能描述和topic的功能描述是否一致
+                                if(temptoptic.equals(tempstr))
+                                {
+                                    //功能描述一致,移除相同功能的主题,保证每个sessionid相同功能只能通过传参订阅一个主题
+                                    set.remove(str);
+                                    //提供过str主题获得sessionidSET集合
+                                    CopyOnWriteArraySet<String> sessionIdset = WebSocketConfig.websocketparamcacheMap.get(str);
+                                    //移除主题中的sessionId
+                                    sessionIdset.remove(authToken);
+                                    //如果sessionIdset记录为空,移除websocketparamcacheMap的主题
+                                    if(sessionIdset.size()==0)
+                                    {
+                                        WebSocketConfig.websocketparamcacheMap.remove(str);
+                                    }
+
+                                }
+                            }
+                            //添加新的主题
+                            set.add(topic);
+                            WebSocketConfig.sessionparamcacheMap.put(authToken, set);
+                        } else {
+                            CopyOnWriteArraySet<String> set = new CopyOnWriteArraySet<String>();
+                            set.add(topic);
+                            WebSocketConfig.sessionparamcacheMap.put(authToken, set);
+                        }
+
+
+                    }
+
+                    if (WebSocketConfig.websocketparamcacheMap.containsKey(topic)) {
+                        CopyOnWriteArraySet<String> set = WebSocketConfig.websocketparamcacheMap.get(topic);
+                        set.add(authToken);
+                        WebSocketConfig.websocketparamcacheMap.put(topic, set);
+                    } else {
+                        CopyOnWriteArraySet<String> set = new CopyOnWriteArraySet<String>();
+                        set.add(authToken);
+                        WebSocketConfig.websocketparamcacheMap.put(topic, set);
+                    }
+                }else
+                {
+                    if (WebSocketConfig.websocketcacheMap.containsKey(topic)) {
+                        CopyOnWriteArraySet<String> set = WebSocketConfig.websocketcacheMap.get(topic);
+                        set.add(authToken);
+                        WebSocketConfig.websocketcacheMap.put(topic, set);
+                    } else {
+                        CopyOnWriteArraySet<String> set = new CopyOnWriteArraySet<String>();
+                        set.add(authToken);
+                        WebSocketConfig.websocketcacheMap.put(topic, set);
+                    }
+
+
+                    if (StringUtils.notEmp(authToken)) {
+                        if (WebSocketConfig.sessioncacheMap.containsKey(authToken)) {
+                            CopyOnWriteArraySet<String> set = WebSocketConfig.sessioncacheMap.get(authToken);
+                            set.add(topic);
+                            WebSocketConfig.sessioncacheMap.put(authToken, set);
+                        } else {
+                            CopyOnWriteArraySet<String> set = new CopyOnWriteArraySet<String>();
+                            set.add(topic);
+                            WebSocketConfig.sessioncacheMap.put(authToken, set);
+                        }
+
+
+                    }
+                }
+
+
+                if(topic.indexOf(WebSocketConfig.PARAM)!=-1)
+                {
+
+//                    String wtid=topic.substring(topic.indexOf(PARAM)+6);
+                    topic=topic.substring(0,topic.indexOf("_"));
+                    this.restartJob(topic);
+                }else
+                {
+                    this.restartJob(topic);
+                }
+
+            }
+
+        }
+        return message;
+    }
+}

+ 65 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/websocket/WebSocketCache.java

@@ -0,0 +1,65 @@
+package com.gyee.frame.common.websocket;
+
+import com.gyee.frame.common.quartz.QuartzSchedulerUtil;
+import org.springframework.context.event.EventListener;
+import org.springframework.stereotype.Component;
+import org.springframework.web.socket.messaging.SessionDisconnectEvent;
+
+import javax.annotation.Resource;
+
+@Component
+public class WebSocketCache  extends QuartzSchedulerUtil.SocketTaskUtil {
+
+    @Resource
+    private WebSocketLoginOutEvent webSocketLoginOutEvent;
+//    public static ConcurrentHashMap<String, CopyOnWriteArraySet<String>> websocketcacheMap = new ConcurrentHashMap();
+//
+//    @EventListener(SessionConnectEvent.class)
+//    public void onSessionConnectEvent(SessionConnectEvent event) {
+//
+//        //获取Session连接信息
+//        StompHeaderAccessor sha = StompHeaderAccessor.wrap(event.getMessage());
+//
+//        sha
+//        List<String> topics=sha.getNativeHeader("topic");
+//        //获取SessionId
+//        String authToken = sha.getSessionId();
+//
+//       if(StringUtils.isNotEmpty(topics))
+//       {
+//
+//           String topic=topics.get(0);
+//
+//           if(websocketcacheMap.containsKey(topic))
+//           {
+//               CopyOnWriteArraySet<String> set=websocketcacheMap.get(topic);
+//               set.add(authToken);
+//               websocketcacheMap.put(topic,set);
+//           }else
+//           {
+//               CopyOnWriteArraySet<String> set= new CopyOnWriteArraySet<String>();
+//               set.add(authToken);
+//               websocketcacheMap.put(topic,set);
+//           }
+//           if(InitialRunner.jobsmap.containsKey(topic))
+//           {
+//               this.restartJob(topic);
+//           }
+//       }
+//
+//
+//    }
+//
+//
+    @EventListener(SessionDisconnectEvent.class)
+    public void onDisconnectEvent(SessionDisconnectEvent event) {
+//        //获取Session连接信息
+//        StompHeaderAccessor sha = StompHeaderAccessor.wrap(event.getMessage());
+//        String authToken=String.valueOf(sha.getHeader("authToken"));
+//
+//        webSocketLoginOutEvent.loginOut(authToken);
+
+
+    }
+
+}

+ 241 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/websocket/WebSocketConfig.java

@@ -0,0 +1,241 @@
+package com.gyee.frame.common.websocket;
+
+import org.springframework.context.annotation.Configuration;
+import org.springframework.messaging.converter.MessageConverter;
+import org.springframework.messaging.simp.config.ChannelRegistration;
+import org.springframework.messaging.simp.config.MessageBrokerRegistry;
+import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;
+import org.springframework.web.socket.config.annotation.EnableWebSocketMessageBroker;
+import org.springframework.web.socket.config.annotation.StompEndpointRegistry;
+import org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer;
+import org.springframework.web.socket.config.annotation.WebSocketTransportRegistration;
+
+import javax.annotation.Resource;
+import java.util.List;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.CopyOnWriteArraySet;
+
+/**
+ * @descrition: 前台测试代码在 test/resources/websockettest.html
+ */
+
+@Configuration
+@EnableWebSocketMessageBroker
+public class WebSocketConfig implements WebSocketMessageBrokerConfigurer {
+
+    public static final String PARAM="param_";
+    public static ConcurrentHashMap<String, CopyOnWriteArraySet<String>> websocketcacheMap = new ConcurrentHashMap();
+    public static ConcurrentHashMap<String, CopyOnWriteArraySet<String>> sessioncacheMap = new ConcurrentHashMap();
+
+    public static ConcurrentHashMap<String, CopyOnWriteArraySet<String>> websocketparamcacheMap = new ConcurrentHashMap();
+    public static ConcurrentHashMap<String, CopyOnWriteArraySet<String>> sessionparamcacheMap = new ConcurrentHashMap();
+    //
+    @Resource
+    private ClientInboundChannelInterceptor clientInboundChannelInterceptor;
+
+    /**
+     * 注册stomp端点,主要是起到连接作用
+     *
+     * @param stompEndpointRegistry
+     */
+    @Override
+    public void registerStompEndpoints(StompEndpointRegistry stompEndpointRegistry) {
+        stompEndpointRegistry
+                .addEndpoint("/gyee-websocket")  //端点名称
+                //.setHandshakeHandler() 握手处理,主要是连接的时候认证获取其他数据验证等
+                //.addInterceptors() 拦截处理,和http拦截类似
+                .setAllowedOrigins("*");//跨域
+     //  .withSockJS(); //使用sockJS1启用该行代码,使用VUE注释该行代码
+
+    }
+//    /**
+//     * 采用自定义拦截器,获取connect时候传递的参数
+//     *
+//     * @param registration
+//     */
+//    @Override
+//    public void configureClientInboundChannel(ChannelRegistration registration) {
+//        registration.interceptors(clientInboundChannelInterceptor);
+//    }
+
+
+//    /**
+//     * 注册相关服务
+//     *
+//     * @param registry
+//     */
+//    @Override
+//    public void configureMessageBroker(MessageBrokerRegistry registry) {
+//
+//        registry.enableSimpleBroker("/topic", "/queue");
+//        //客户端名称前缀
+//        registry.setApplicationDestinationPrefixes("/app");
+//        //用户名称前
+//        registry.setUserDestinationPrefix("/userDataSet");
+//    }
+
+    /**
+     * 配置消息代理
+     * @param registry
+     */
+    @Override
+    public void configureMessageBroker(MessageBrokerRegistry registry)
+    {
+        /*
+         *  enableStompBrokerRelay 配置外部的STOMP服务,需要安装额外的支持 比如rabbitmq或activemq
+         * 1. 配置代理域,可以配置多个,此段代码配置代理目的地的前缀为 /topicTest 或者 /userTest
+         *    我们就可以在配置的域上向客户端推送消息
+         * 3. 可以通过 setRelayHost 配置代理监听的host,默认为localhost
+         * 4. 可以通过 setRelayPort 配置代理监听的端口,默认为61613
+         * 5. 可以通过 setClientLogin 和 setClientPasscode 配置账号和密码
+         * 6. setxxx这种设置方法是可选的,根据业务需要自行配置,也可以使用默认配置
+         */
+        //registry.enableStompBrokerRelay("/topicTest","/userTest")
+        //.setRelayHost("rabbit.someotherserver")
+        //.setRelayPort(62623);
+        //.setClientLogin("userName")
+        //.setClientPasscode("password")
+        //;
+
+        // 自定义调度器,用于控制心跳线程
+        ThreadPoolTaskScheduler taskScheduler = new ThreadPoolTaskScheduler();
+        // 线程池线程数,心跳连接开线程
+        taskScheduler.setPoolSize(1);
+        // 线程名前缀
+        taskScheduler.setThreadNamePrefix("websocket-heartbeat-thread-");
+        // 初始化
+        taskScheduler.initialize();
+
+        /*
+         * spring 内置broker对象
+         * 1. 配置代理域,可以配置多个,此段代码配置代理目的地的前缀为 /topicTest 或者 /userTest
+         *    我们就可以在配置的域上向客户端推送消息
+         * 2,进行心跳设置,第一值表示server最小能保证发的心跳间隔毫秒数, 第二个值代码server希望client发的心跳间隔毫秒数
+         * 3. 可以配置心跳线程调度器 setHeartbeatValue这个不能单独设置,不然不起作用,要配合setTaskScheduler才可以生效
+         *    调度器我们可以自己写一个,也可以自己使用默认的调度器 new DefaultManagedTaskScheduler()
+         */
+        registry.enableSimpleBroker("/topic","/queue")
+                .setHeartbeatValue(new long[]{10000,10000})
+                .setTaskScheduler(taskScheduler);
+        /*
+         *  "/app" 为配置应用服务器的地址前缀,表示所有以/app 开头的客户端消息或请求
+         *  都会路由到带有@MessageMapping 注解的方法中
+         */
+        registry.setApplicationDestinationPrefixes("/app");
+
+        /*
+         *  1. 配置一对一消息前缀, 客户端接收一对一消息需要配置的前缀 如“'/user/'+userid + '/message'”,
+         *     是客户端订阅一对一消息的地址 stompClient.subscribe js方法调用的地址
+         *  2. 使用@SendToUser发送私信的规则不是这个参数设定,在框架内部是用UserDestinationMessageHandler处理,
+         *     而不是而不是 AnnotationMethodMessageHandler 或  SimpleBrokerMessageHandler
+         *     or StompBrokerRelayMessageHandler,是在@SendToUser的URL前加“user+sessionId"组成
+         */
+        registry.setUserDestinationPrefix("/user");
+
+        /*
+         * 自定义路径分割符
+         * 注释掉的这段代码添加的分割符为. 分割是类级别的@messageMapping和方法级别的@messageMapping的路径
+         * 例如类注解路径为 “topic”,方法注解路径为“hello”,那么客户端JS stompClient.send 方法调用的路径为“/app/topic.hello”
+         * 注释掉此段代码后,类注解路径“/topic”,方法注解路径“/hello”,JS调用的路径为“/app/topic/hello”
+         */
+        //registry.setPathMatcher(new AntPathMatcher("."));
+
+    }
+
+
+    /**
+     * 配置发送与接收的消息参数,可以指定消息字节大小,缓存大小,发送超时时间
+     * @param registration
+     */
+    @Override
+    public void configureWebSocketTransport(WebSocketTransportRegistration registration) {
+        /*
+         * 1. setMessageSizeLimit 设置消息缓存的字节数大小 字节
+         * 2. setSendBufferSizeLimit 设置websocket会话时,缓存的大小 字节
+         * 3. setSendTimeLimit 设置消息发送会话超时时间,毫秒
+         */
+        registration.setMessageSizeLimit(1024*10)
+                .setSendBufferSizeLimit(1024*10)
+                .setSendTimeLimit(10000);
+    }
+
+    /**
+     * 设置输入消息通道的线程数,默认线程为1,可以自己自定义线程数,最大线程数,线程存活时间
+     * @param registration
+     */
+    @Override
+    public void configureClientInboundChannel(ChannelRegistration registration) {
+
+        /*
+         * 配置消息线程池
+         * 1. corePoolSize 配置核心线程池,当线程数小于此配置时,不管线程中有无空闲的线程,都会产生新线程处理任务
+         * 2. maxPoolSize 配置线程池最大数,当线程池数等于此配置时,不会产生新线程
+         * 3. keepAliveSeconds 线程池维护线程所允许的空闲时间,单位秒
+         */
+        registration.taskExecutor().corePoolSize(10)
+                .maxPoolSize(20)
+                .keepAliveSeconds(60);
+        /*
+         * 添加stomp自定义拦截器,可以根据业务做一些处理
+         * springframework 4.3.12 之后版本此方法废弃,代替方法 interceptors(ChannelInterceptor... interceptors)
+         * 消息拦截器,实现ChannelInterceptor接口
+         */
+        registration.interceptors(clientInboundChannelInterceptor);
+    }
+
+    /**
+     *设置输出消息通道的线程数,默认线程为1,可以自己自定义线程数,最大线程数,线程存活时间
+     * @param registration
+     */
+    @Override
+    public void configureClientOutboundChannel(ChannelRegistration registration) {
+        registration.taskExecutor().corePoolSize(100)
+                .maxPoolSize(1000)
+                .keepAliveSeconds(60);
+        //registration.setInterceptors(new WebSocketChannelInterceptor());
+    }
+
+    /**
+     * 添加自定义的消息转换器,spring 提供多种默认的消息转换器,
+     * 返回false,不会添加消息转换器,返回true,会添加默认的消息转换器,当然也可以把自己写的消息转换器添加到转换链中
+     * @param list
+     * @return
+     */
+    @Override
+    public boolean configureMessageConverters(List<MessageConverter> list) {
+        return true;
+    }
+
+//    /**
+//     * 自定义控制器方法的参数类型,有兴趣可以百度google HandlerMethodArgumentResolver这个的用法
+//     * @param list
+//     */
+//    @Override
+//    public void addArgumentResolvers(List<HandlerMethodArgumentResolver> list) {
+//
+//    }
+//
+//    /**
+//     * 自定义控制器方法返回值类型,有兴趣可以百度google HandlerMethodReturnValueHandler这个的用法
+//     * @param list
+//     */
+//    @Override
+//    public void addReturnValueHandlers(List<HandlerMethodReturnValueHandler> list) {
+//
+//    }
+//
+//    /**
+//     * 拦截器加入 spring ioc容器
+//     * @return
+//     */
+//    @Bean
+//    public WebSocketChannelInterceptor webSocketChannelInterceptor()
+//    {
+//        return new WebSocketChannelInterceptor();
+//    }
+
+
+
+}
+
+

+ 68 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/websocket/WebSocketLoginOutEvent.java

@@ -0,0 +1,68 @@
+package com.gyee.frame.common.websocket;
+
+import com.gyee.frame.common.quartz.QuartzSchedulerUtil;
+import com.gyee.frame.util.StringUtils;
+import org.springframework.stereotype.Component;
+
+import java.util.concurrent.CopyOnWriteArraySet;
+
+@Component
+public class WebSocketLoginOutEvent extends QuartzSchedulerUtil.SocketTaskUtil {
+
+    public void loginOut(String authToken) {
+
+        if(StringUtils.notEmp(authToken) && !authToken.equals("null"))
+        {
+            if(WebSocketConfig.sessioncacheMap.containsKey(authToken))
+            {
+                CopyOnWriteArraySet<String> sessionIdset=WebSocketConfig.sessioncacheMap.get(authToken);
+
+                for(String topic:sessionIdset)
+                {
+                    if(WebSocketConfig.websocketcacheMap.containsKey(topic))
+                    {
+                        CopyOnWriteArraySet<String> set=WebSocketConfig.websocketcacheMap.get(topic);
+                        set.remove(authToken);
+                        WebSocketConfig.websocketcacheMap.put(topic,set);
+
+                        if(set.size()==0)
+                        {
+                            WebSocketConfig.websocketcacheMap.remove(topic);
+                            this.deleteJob(topic);
+                        }
+                    }
+
+                    sessionIdset.remove(topic);
+                }
+                WebSocketConfig.sessioncacheMap.remove(authToken);
+            }
+
+
+            if(WebSocketConfig.sessionparamcacheMap.containsKey(authToken))
+            {
+                CopyOnWriteArraySet<String> sessionIdset=WebSocketConfig.sessionparamcacheMap.get(authToken);
+
+                for(String topic:sessionIdset)
+                {
+                    if(WebSocketConfig.websocketparamcacheMap.containsKey(topic))
+                    {
+                        CopyOnWriteArraySet<String> set=WebSocketConfig.websocketparamcacheMap.get(topic);
+                        set.remove(authToken);
+                        WebSocketConfig.websocketparamcacheMap.put(topic,set);
+
+                        if(set.size()==0)
+                        {
+                            WebSocketConfig.websocketparamcacheMap.remove(topic);
+                            this.deleteJob(topic);
+                        }
+                    }
+
+                    sessionIdset.remove(topic);
+                }
+                WebSocketConfig.sessionparamcacheMap.remove(authToken);
+            }
+        }
+
+    }
+
+}

+ 30 - 0
web/monitor-hf/src/main/java/com/gyee/frame/common/websocket/WebsocketMessageService.java

@@ -0,0 +1,30 @@
+package com.gyee.frame.common.websocket;
+
+import com.alibaba.fastjson.JSON;
+import com.gyee.frame.common.conf.AjaxStatus;
+import com.gyee.frame.common.domain.AjaxResult;
+import com.gyee.frame.util.StringUtils;
+import org.springframework.messaging.simp.SimpMessagingTemplate;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.Resource;
+
+
+@Component
+public class WebsocketMessageService
+{
+
+    @Resource
+    private SimpMessagingTemplate simpMessagingTemplate;
+
+
+    public void SendAlertToAll(String destination, Object sendData)
+    {
+        if (StringUtils.notEmp(sendData)) {
+            simpMessagingTemplate.convertAndSend(destination, AjaxResult.successData(AjaxStatus.success.code, JSON.toJSONString(sendData)));
+        } else {
+            simpMessagingTemplate.convertAndSend(destination, AjaxResult.successData(AjaxStatus.error.code, "数据传输错误"));
+        }
+
+    }
+}

+ 501 - 0
web/monitor-hf/src/main/java/com/gyee/frame/controller/AdminController.java

@@ -0,0 +1,501 @@
+package com.gyee.frame.controller;
+
+import com.google.code.kaptcha.Constants;
+import com.gyee.frame.common.base.BaseController;
+import com.gyee.frame.common.conf.AjaxStatus;
+import com.gyee.frame.common.conf.V2Config;
+import com.gyee.frame.common.domain.AjaxResult;
+import com.gyee.frame.common.websocket.WebSocketLoginOutEvent;
+import com.gyee.frame.model.auto.SysNotice;
+import com.gyee.frame.model.auto.TsysUser;
+import com.gyee.frame.model.custom.BootstrapTree;
+import com.gyee.frame.model.custom.ElementNode;
+import com.gyee.frame.model.custom.TitleVo;
+import com.gyee.frame.model.custom.TokenUser;
+import com.gyee.frame.shiro.config.ShiroService;
+import com.gyee.frame.shiro.util.ShiroUtils;
+import com.gyee.frame.util.StringUtils;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.apache.shiro.SecurityUtils;
+import org.apache.shiro.authc.*;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.apache.shiro.subject.Subject;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.servlet.mvc.support.RedirectAttributes;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 后台方法
+ * 
+ * @ClassName: HomeController
+ * @author gyee
+ * @date 2019-10-21 00:10
+ *
+ */
+@Controller
+@RequestMapping("/admin")
+@CrossOrigin
+@Api(value = "后台管理接口" ,tags="后台管理接口")
+public class AdminController extends BaseController {
+	private static Logger logger = LoggerFactory.getLogger(AdminController.class);
+
+	private String prefix = "admin";
+	private String AUTHTOKEN="authToken";
+	@Resource
+	private ShiroService shiroService;
+	@Resource
+	private WebSocketLoginOutEvent webSocketLoginOutEvent;
+
+	@ApiOperation(value = "首页", notes = "首页")
+	@GetMapping("/index")
+	public String index(HttpServletRequest request) {
+		// 获取菜单栏
+		BootstrapTree bootstrapTree = sysPermissionService.getbooBootstrapTreePerm(ShiroUtils.getUserId());
+		request.getSession().setAttribute("bootstrapTree", bootstrapTree);
+		request.getSession().setAttribute("sessionUserName", ShiroUtils.getUser().getNickname());
+		// 获取公告信息
+		List<SysNotice> notices = sysNoticeService.getuserNoticeNotRead(ShiroUtils.getUser(), 0);
+		request.getSession().setAttribute("notices", notices);
+		return prefix + "/index";
+	}
+
+	@ApiOperation(value = "局部刷新区域", notes = "局部刷新区域")
+	@GetMapping("/main")
+	public String main(ModelMap map) {
+		setTitle(map, new TitleVo("首页", "首页", true, "欢迎进入", true, false));
+		return prefix + "/main";
+	}
+
+	/**
+	 * 请求到登陆界面
+	 * 
+	 * @return
+	 */
+	@ApiOperation(value = "请求到登陆界面", notes = "请求到登陆界面")
+	@GetMapping("/login")
+	public String login(ModelMap modelMap) {
+		try {
+			if ((null != SecurityUtils.getSubject() && SecurityUtils.getSubject().isAuthenticated())
+					|| SecurityUtils.getSubject().isRemembered()) {
+				return "redirect:/" + prefix + "/index";
+			} else {
+				System.out.println("--进行登录验证..验证开始");
+
+				modelMap.put("RollVerification", V2Config.getRollVerification());
+				System.out.println("V2Config.getRollVerification()>>>" + V2Config.getRollVerification());
+				return "login";
+			}
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+		return "login";
+	}
+
+	/**
+	 * 用户登陆验证
+	 * 
+	 * @param user
+	 * @param redirectAttributes
+	 * @param rememberMe
+	 * @param request
+	 * @return
+	 */
+//	@ApiOperation(value = "用户登陆验证", notes = "用户登陆验证")
+	@PostMapping("/login")
+	@ResponseBody
+	public AjaxResult login(TsysUser user, String code, RedirectAttributes redirectAttributes, boolean rememberMe,
+			HttpServletRequest request) {
+		// ModelAndView view =new ModelAndView();
+		Boolean yz = false;
+		if (V2Config.getRollVerification()) {// 滚动验证
+			yz = true;
+		} else {// 图片验证
+			String scode = (String) request.getSession().getAttribute(Constants.KAPTCHA_SESSION_KEY);
+			yz = StringUtils.isNotEmpty(scode) && StringUtils.isNotEmpty(code) && scode.equals(code);
+		}
+		// 判断验证码
+		if (yz) {
+			String userName = user.getUsername();
+			Subject currentUser = SecurityUtils.getSubject();
+
+			// 是否验证通过
+			if (!currentUser.isAuthenticated()) {
+				UsernamePasswordToken token = new UsernamePasswordToken(userName, user.getPassword());
+				try {
+//					if (rememberMe) {
+					if (true) {
+						token.setRememberMe(true);
+					}
+					// 存入用户
+					currentUser.login(token);
+					if (StringUtils.isNotNull(ShiroUtils.getUser())) {
+						// 若为前后端分离版本,则可把sessionId返回,作为分离版本的请求头authToken
+						// String authToken = ShiroUtils.getSessionId();
+						// return AjaxResult.successData(200, authToken);
+						return AjaxResult.success();
+					} else {
+						return AjaxResult.error(500, "未知账户");
+					}
+				} catch (UnknownAccountException uae) {
+					logger.info("对用户[" + userName + "]进行登录验证..验证未通过,未知账户");
+					return AjaxResult.error(500, "未知账户");
+				} catch (IncorrectCredentialsException ice) {
+					logger.info("对用户[" + userName + "]进行登录验证..验证未通过,错误的凭证");
+					return AjaxResult.error(500, "用户名或密码不正确");
+				} catch (LockedAccountException lae) {
+					logger.info("对用户[" + userName + "]进行登录验证..验证未通过,账户已锁定");
+					return AjaxResult.error(500, "账户已锁定");
+				} catch (ExcessiveAttemptsException eae) {
+					logger.info("对用户[" + userName + "]进行登录验证..验证未通过,错误次数过多");
+					return AjaxResult.error(500, "用户名或密码错误次数过多");
+				} catch (AuthenticationException ae) {
+					// 通过处理Shiro的运行时AuthenticationException就可以控制用户登录失败或密码错误时的情景
+					logger.info("对用户[" + userName + "]进行登录验证..验证未通过,堆栈轨迹如下");
+					ae.printStackTrace();
+					return AjaxResult.error(500, "用户名或密码不正确");
+				}
+			} else {
+				if (StringUtils.isNotNull(ShiroUtils.getUser())) {
+					// 跳转到 get请求的登陆方法
+					// view.setViewName("redirect:/"+prefix+"/index");
+					return AjaxResult.success();
+				} else {
+					return AjaxResult.error(500, "未知账户");
+				}
+			}
+		} else {
+			return AjaxResult.error(500, "验证码不正确!");
+		}
+
+	}
+
+
+	/**
+	 * 用户登陆验证
+	 *
+	 * @param user
+	 * @param request
+	 * @return
+	 */
+	@ApiOperation(value = "用户登陆验证", notes = "用户登陆验证")
+	@PostMapping("/loginvue")
+	@ResponseBody
+	public AjaxResult loginvue(TsysUser user,
+							HttpServletRequest request) {
+		// ModelAndView view =new ModelAndView();
+
+			String userName = user.getUsername();
+			Subject currentUser = SecurityUtils.getSubject();
+			String customtoken = request.getHeader(AUTHTOKEN);
+
+				if(StringUtils.notEmp(customtoken))
+				{
+					TokenUser customuser = shiroService.findToken(customtoken);
+					/**
+					 * user == null 表示第一次登录
+					 */
+					if (customuser == null)
+					{
+						return initialLogin(user, userName, currentUser);
+					}else
+					{
+						long expireTime = customuser.getExpireTime();
+						long nowTime = new Date().getTime();
+						/**
+						 * 判断登录是否过期
+						 */
+						if (nowTime - expireTime > shiroService.EXPIRE)
+						{
+							return AjaxResult.error(AjaxStatus.loginexpire.code, "账号已过期请重新登录");
+						}else
+						{
+							Map<String, Object> result = new HashMap<>();
+							result.put(AUTHTOKEN, customtoken);
+							result.put("user", customuser);
+							return AjaxResult.successData(AjaxStatus.success.code, result);
+						}
+
+					}
+				}else
+				{
+					return initialLogin(user, userName, currentUser);
+				}
+
+
+	}
+
+	private AjaxResult initialLogin(TsysUser user, String userName, Subject currentUser) {
+		// 是否验证通过
+		if (!currentUser.isAuthenticated()) {
+			UsernamePasswordToken token = new UsernamePasswordToken(userName, user.getPassword());
+			try {
+				token.setRememberMe(true);
+				// 存入用户
+				currentUser.login(token);
+
+				Map<String, Object> authToken = shiroService.createToken(ShiroUtils.getUser());
+
+				if(authToken.containsKey(AUTHTOKEN))
+				{
+					return AjaxResult.successData(AjaxStatus.success.code, authToken);
+				}else
+				{
+					return AjaxResult.error(AjaxStatus.logineroor.code, "未知账户");
+				}
+
+//							if (StringUtils.isNotNull(ShiroUtils.getUser())) {
+//
+//								// 若为前后端分离版本,则可把sessionId返回,作为分离版本的请求头authToken
+//								String sessionId = ShiroUtils.getSessionId();
+//								return AjaxResult.successData(AjaxStatus.success.code, sessionId);
+////
+//							} else {
+//								return AjaxResult.error(AjaxStatus.logineroor.code, "未知账户");
+//							}
+			} catch (UnknownAccountException uae) {
+				logger.info("对用户[" + userName + "]进行登录验证..验证未通过,未知账户");
+				return AjaxResult.error(AjaxStatus.logineroor.code, "未知账户");
+			} catch (IncorrectCredentialsException ice) {
+				logger.info("对用户[" + userName + "]进行登录验证..验证未通过,错误的凭证");
+				return AjaxResult.error(AjaxStatus.logineroor.code, "用户名或密码不正确");
+			} catch (LockedAccountException lae) {
+				logger.info("对用户[" + userName + "]进行登录验证..验证未通过,账户已锁定");
+				return AjaxResult.error(AjaxStatus.logineroor.code, "账户已锁定");
+			} catch (ExcessiveAttemptsException eae) {
+				logger.info("对用户[" + userName + "]进行登录验证..验证未通过,错误次数过多");
+				return AjaxResult.error(AjaxStatus.logineroor.code, "用户名或密码错误次数过多");
+			} catch (AuthenticationException ae) {
+				// 通过处理Shiro的运行时AuthenticationException就可以控制用户登录失败或密码错误时的情景
+				logger.info("对用户[" + userName + "]进行登录验证..验证未通过,堆栈轨迹如下");
+				ae.printStackTrace();
+				return AjaxResult.error(AjaxStatus.logineroor.code, "用户名或密码不正确");
+			}
+		} else {
+			if (StringUtils.isNotNull(ShiroUtils.getUser())) {
+				// 跳转到 get请求的登陆方法
+				// view.setViewName("redirect:/"+prefix+"/index");
+				Map<String, Object> authToken = shiroService.createToken(ShiroUtils.getUser());
+
+				if(authToken.containsKey(AUTHTOKEN))
+				{
+					return AjaxResult.successData(AjaxStatus.success.code, authToken);
+				}else
+				{
+					return AjaxResult.error(AjaxStatus.logineroor.code, "未知账户");
+				}
+			} else {
+				return AjaxResult.error(AjaxStatus.logineroor.code, "未知账户");
+			}
+		}
+	}
+
+
+	@ApiOperation(value = "获取用户菜单", notes = "获取用户菜单")
+	@PostMapping("/usermenu")
+	@ResponseBody
+	public AjaxResult usermenu(HttpServletRequest request) {
+
+		//String authToken=request.getParameter(AUTHTOKEN);
+		String customtoken = request.getHeader(AUTHTOKEN);
+
+		if(StringUtils.notEmp(customtoken))
+		{
+			TokenUser customuser = shiroService.findToken(customtoken);
+
+			if(customuser ==null)
+			{
+				return AjaxResult.error(AjaxStatus.logineroor.code, "未知账户");
+			}else
+			{
+				// 获取菜单栏
+				List<ElementNode> menuTree = sysPermissionService.getTreePerm(customuser.getLaborNum());
+
+				return AjaxResult.successData(200, menuTree);
+			}
+
+		}else {
+			return AjaxResult.error(AjaxStatus.logineroor.code, "未知账户");
+		}
+
+	}
+	/**
+	 * 手机登录
+	 * @param user
+	 * @param rememberMe
+	 * @param request
+	 * @return
+	 * @author gyee
+	 * @Date 2020年12月7日 上午12:54:28
+	 */
+	@ApiOperation(value = "手机登录", notes = "手机登录")
+	@PostMapping("/API/login")
+	@ResponseBody
+	public AjaxResult APIlogin(TsysUser user,boolean rememberMe,HttpServletRequest request) {
+		// ModelAndView view =new ModelAndView();
+		Boolean yz = true;
+//		if (V2Config.getRollVerification()) {// 滚动验证
+//			yz = true;
+//		} else {// 图片验证
+//			String scode = (String) request.getSession().getAttribute(Constants.KAPTCHA_SESSION_KEY);
+//			yz = StringUtils.isNotEmpty(scode) && StringUtils.isNotEmpty(code) && scode.equals(code);
+//		}
+		System.out.println("/API/login手机请求");
+		// 判断验证码
+		if (yz) {
+			String userName = user.getUsername();
+			Subject currentUser = SecurityUtils.getSubject();
+			// 是否验证通过
+			if (!currentUser.isAuthenticated()) {
+				UsernamePasswordToken token = new UsernamePasswordToken(userName, user.getPassword());
+				try {
+					if (rememberMe) {
+						token.setRememberMe(true);
+					}
+					// 存入用户
+					currentUser.login(token);
+					if (StringUtils.isNotNull(ShiroUtils.getUser())) {
+						// 若为前后端分离版本,则可把sessionId返回,作为分离版本的请求头authToken
+						 String authToken = ShiroUtils.getSessionId();
+						 return AjaxResult.successData(200, authToken);
+						//return AjaxResult.success();
+					} else {
+						return AjaxResult.error(500, "未知账户");
+					}
+				} catch (UnknownAccountException uae) {
+					logger.info("对用户[" + userName + "]进行登录验证..验证未通过,未知账户");
+					return AjaxResult.error(500, "未知账户");
+				} catch (IncorrectCredentialsException ice) {
+					logger.info("对用户[" + userName + "]进行登录验证..验证未通过,错误的凭证");
+					return AjaxResult.error(500, "用户名或密码不正确");
+				} catch (LockedAccountException lae) {
+					logger.info("对用户[" + userName + "]进行登录验证..验证未通过,账户已锁定");
+					return AjaxResult.error(500, "账户已锁定");
+				} catch (ExcessiveAttemptsException eae) {
+					logger.info("对用户[" + userName + "]进行登录验证..验证未通过,错误次数过多");
+					return AjaxResult.error(500, "用户名或密码错误次数过多");
+				} catch (AuthenticationException ae) {
+					// 通过处理Shiro的运行时AuthenticationException就可以控制用户登录失败或密码错误时的情景
+					logger.info("对用户[" + userName + "]进行登录验证..验证未通过,堆栈轨迹如下");
+					ae.printStackTrace();
+					return AjaxResult.error(500, "用户名或密码不正确");
+				}
+			} else {
+				if (StringUtils.isNotNull(ShiroUtils.getUser())) {
+					// 跳转到 get请求的登陆方法
+					// view.setViewName("redirect:/"+prefix+"/index");
+					 String authToken = ShiroUtils.getSessionId();
+					 return AjaxResult.successData(200, authToken);
+				} else {
+					return AjaxResult.error(500, "未知账户");
+				}
+			}
+		} else {
+			return AjaxResult.error(500, "验证码不正确!");
+		}
+
+	}
+
+	/**
+	 * 退出登陆
+	 * 
+	 * @return
+	 */
+//	@ApiOperation(value = "退出登陆", notes = "退出登陆")
+	@GetMapping("/Loginout")
+
+	public String LoginOut(HttpServletRequest request, HttpServletResponse response) {
+		// 在这里执行退出系统前需要清空的数据
+		Subject subject = SecurityUtils.getSubject();
+		// 注销
+		subject.logout();
+		return "redirect:/" + prefix + "/login";
+	}
+
+	@ApiOperation(value = "退出登陆", notes = "退出登陆")
+	@PostMapping("/Loginoutvue")
+	@ResponseBody
+	public AjaxResult Loginoutvue(HttpServletRequest request, HttpServletResponse response) {
+		// 在这里执行退出系统前需要清空的数据
+		Subject subject = SecurityUtils.getSubject();
+		// shiro注销
+		subject.logout();
+
+		String authToken = request.getHeader(AUTHTOKEN);
+		if(StringUtils.notEmp(authToken))
+		{
+			//websocekt退出
+			webSocketLoginOutEvent.loginOut(authToken);
+			//令牌退出
+			shiroService.logout(authToken);
+		}
+
+		return AjaxResult.success();
+	}
+
+
+	@ApiOperation(value = "WEBSOCKET缓存", notes = "WEBSOCKET缓存")
+	@PostMapping("/websocketdisconnect")
+	@ResponseBody
+	public AjaxResult websocketdisconnect(HttpServletRequest request, HttpServletResponse response) {
+
+
+		String authToken = request.getHeader(AUTHTOKEN);
+		if(StringUtils.notEmp(authToken))
+		{
+			//websocekt退出
+			webSocketLoginOutEvent.loginOut(authToken);
+		}
+
+		return AjaxResult.success();
+	}
+
+	/**** 页面测试 ****/
+	@ApiOperation(value = "404页面", notes = "404页面")
+	@GetMapping("Out404")
+	public String Out404(HttpServletRequest request, HttpServletResponse response) {
+
+		return "redirect:/error/404";
+	}
+
+	@GetMapping("Out403")
+	@ApiOperation(value = "403页面", notes = "403页面")
+	public String Out403(HttpServletRequest request, HttpServletResponse response) {
+
+		return "redirect:/error/403";
+	}
+
+	@ApiOperation(value = "500页面", notes = "500页面")
+	@GetMapping("Out500")
+	public String Out500(HttpServletRequest request, HttpServletResponse response) {
+
+		return "redirect:/error/500";
+	}
+
+	/**
+	 * 权限测试跳转页面
+	 * 
+	 * @param request
+	 * @param response
+	 * @return
+	 */
+	@ApiOperation(value = "权限测试跳转页面", notes = "权限测试跳转页面")
+	@GetMapping("Outqx")
+	@RequiresPermissions("system:user:asd")
+	public String Outqx(HttpServletRequest request, HttpServletResponse response) {
+
+		return "redirect:/error/500";
+	}
+	/**** 页面测试EDN ****/
+}

+ 67 - 0
web/monitor-hf/src/main/java/com/gyee/frame/controller/IndexController.java

@@ -0,0 +1,67 @@
+package com.gyee.frame.controller;
+
+import com.gyee.frame.common.base.BaseController;
+import com.gyee.frame.common.conf.V2Config;
+import com.gyee.frame.model.custom.TitleVo;
+import io.swagger.annotations.ApiOperation;
+import org.apache.shiro.SecurityUtils;
+import org.apache.shiro.subject.Subject;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.GetMapping;
+
+/**
+ * 如果有前台这儿写前台访问方法
+ * @ClassName: IndexController
+ * @author gyee
+ * @date 2019-10-21 00:15
+ */
+@Controller
+public class IndexController extends BaseController{
+	
+	/**
+	 * 前台访问 域名:端口 例如:localhost:80的get请求
+	 * @param map
+	 * @return
+	 * @author gyee
+	 * @Date 2019年11月20日 下午10:55:13
+	 */
+	@ApiOperation(value="前台",notes="前台")
+	@GetMapping("/")
+	public String index(ModelMap modelMap) {
+		String str="前台";
+		setTitle(modelMap, new TitleVo("列表", str+"管理", true,"欢迎进入"+str+"页面", true, false));
+		Subject currentUser = SecurityUtils.getSubject();
+
+
+		try {
+			if ((null != SecurityUtils.getSubject() && SecurityUtils.getSubject().isAuthenticated())
+					|| SecurityUtils.getSubject().isRemembered()) {
+				return "redirect:/admin/index";
+			} else {
+				System.out.println("--进行登录验证..验证开始");
+
+				modelMap.put("RollVerification", V2Config.getRollVerification());
+				System.out.println("V2Config.getRollVerification()>>>" + V2Config.getRollVerification());
+				return "login";
+			}
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+		return "login";
+	}
+	/**
+	 * 前台访问/index的get请求
+	 * @param map
+	 * @return
+	 * @author gyee
+	 * @Date 2019年11月20日 下午10:54:56
+	 */
+	@ApiOperation(value="前台",notes="前台")
+	@GetMapping("/index")
+	public String index2(ModelMap map) {
+		String str="前台";
+		setTitle(map, new TitleVo("列表", str+"管理", true,"欢迎进入"+str+"页面", true, false));
+		return "index";
+	}
+}

+ 32 - 0
web/monitor-hf/src/main/java/com/gyee/frame/controller/admin/ApiController.java

@@ -0,0 +1,32 @@
+package com.gyee.frame.controller.admin;
+
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import com.gyee.frame.common.domain.AjaxResult;
+import com.gyee.frame.shiro.util.ShiroUtils;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+
+/**
+ * 该接口为了前后端分离or手机端服务不用登录的接口  访问地址:localhot:8080/ApiController/test
+ * 如何还需要其他 接口不登陆就能访问:ShiroFilterMapFactory.java里面配置开放自己的controller
+ * @ClassName: ApiController
+ * @author gyee
+ * @date 2020-04-15 22:59
+ */
+@Api(value = "接口API")
+@Controller
+@RequestMapping("/ApiController")
+public class ApiController {
+	
+	//@Log(title = "${TsysTables.tableComment}集合查询", action = "111")
+	@ApiOperation(value = "测试方法", notes = "测试方法")
+	@GetMapping("/test")
+	@ResponseBody
+	public AjaxResult test() {
+		return AjaxResult.successData(200, ShiroUtils.getLoginName());
+	}
+}

+ 46 - 0
web/monitor-hf/src/main/java/com/gyee/frame/controller/admin/ApiController2.java

@@ -0,0 +1,46 @@
+package com.gyee.frame.controller.admin;
+
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import com.gyee.frame.common.domain.AjaxResult;
+import com.gyee.frame.shiro.util.ShiroUtils;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+
+/**
+ * token测试   
+ * 
+ * head 参数
+ * authToken:4acf8612-d66c-4770-a775-c9418c65bacd
+ * @ClassName: ApiController2
+ * @author gyee
+ * @date 2020-12-07 00:56
+ */
+@Api(value = "iphoneAPI")
+@Controller
+@RequestMapping("/api")
+public class ApiController2 {
+	/**
+	 * 第一步:token获取
+	 * post:http://localhost:8080/admin/API/loginvue
+	 * body参数:
+	 * username:admin
+	 * password:admin
+	 * 返回 {"code":200,"data":"1487913f-5a64-488d-9fc7-243d004faae2"}
+	 * 第二步:请求测试
+	 * get:请求地址:http://localhost:8080/api/test
+	 * head参数:
+	 * authToken:1487913f-5a64-488d-9fc7-243d004faae2
+	 * 返回信息
+	 * {"code":200,"data":"admin"}
+	 */
+	@ApiOperation(value = "token测试方法", notes = "token测试方法")
+	@GetMapping("/test")
+	@ResponseBody
+	public AjaxResult test() {
+		return AjaxResult.successData(200, ShiroUtils.getLoginName());
+	}
+}

+ 212 - 0
web/monitor-hf/src/main/java/com/gyee/frame/controller/admin/AutoCodeController.java

@@ -0,0 +1,212 @@
+package com.gyee.frame.controller.admin;
+
+import java.util.List;
+import javax.servlet.http.HttpServletRequest;
+import cn.hutool.json.JSONUtil;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import com.gyee.frame.common.base.BaseController;
+import com.gyee.frame.common.domain.AjaxResult;
+import com.gyee.frame.model.auto.TsysPermission;
+import com.gyee.frame.model.custom.TitleVo;
+import com.gyee.frame.model.custom.TsysTables;
+import com.gyee.frame.model.custom.autocode.AutoCodeConfig;
+import com.gyee.frame.model.custom.autocode.BeanColumn;
+import com.gyee.frame.model.custom.autocode.GlobalConfig;
+import com.gyee.frame.service.GeneratorService;
+import com.gyee.frame.service.SysPermissionService;
+import com.gyee.frame.service.SysUtilService;
+import com.gyee.frame.util.AutoCode.AutoCodeUtil;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import javax.annotation.Resource;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+/**
+ * 代码自动生成
+ * 
+ * @ClassName: AutoCodeController
+ * @author gyee
+ * @date 2019-08-13 00:34
+ */
+@Api(value = "代码自动生成")
+@Controller
+@RequestMapping("/autoCodeController")
+public class AutoCodeController extends BaseController {
+
+	private String prefix = "admin/auto_code";
+	@Resource
+	private GeneratorService generatorService;
+	@Resource
+	private SysUtilService sysUtilService;
+	@Resource
+	private SysPermissionService sysPermissionService;
+
+	/**
+	 * 代码自动生成展示首页
+	 * 
+	 * @param model
+	 * @return
+	 * @author gyee
+	 * @Date 2019年8月13日 上午12:35:23
+	 */
+	@ApiOperation(value = " 代码自动生成展示首页", notes = " 代码自动生成展示首页")
+	@GetMapping("/one")
+	@RequiresPermissions("system:autocode:one")
+	public String one(ModelMap model) {
+		String str = "单表代码生成";
+		setTitle(model, new TitleVo("生成", str + "管理", true, "欢迎进入" + str + "页面", true, false));
+		List<TsysTables> tables = generatorService.queryList(null);
+		List<TsysPermission> permissions = sysPermissionService.list2(null);
+		model.addAttribute("tables", tables);
+		model.addAttribute("permissions", permissions);
+		return prefix + "/one";
+	}
+
+	/**
+	 * 代码自动生成全局配置
+	 * 
+	 * @param model
+	 * @return
+	 * @author gyee
+	 * @Date 2019年8月13日 上午12:34:30
+	 */
+	@ApiOperation(value = " 代码自动生成全局配置", notes = "代码自动生成全局配置")
+	@GetMapping("/global")
+	@RequiresPermissions("system:autocode:global")
+	public String global(ModelMap modelMap) {
+		String str = "全局配置";
+		setTitle(modelMap, new TitleVo("配置", str + "管理", true, "欢迎进入" + str + "页面", true, false));
+
+		modelMap.put("autoConfig", AutoCodeConfig.getGlobalConfig());
+		System.out.println(JSONUtil.toJsonStr(AutoCodeConfig.getGlobalConfig()));
+		return prefix + "/global";
+	}
+
+	/**
+	 * 根据表名查询表信息
+	 * @param tableName
+	 * @return
+	 * @author gyee
+	 * @Date 2019年8月15日 上午1:09:36
+	 */
+	@ApiOperation(value = "根据表名查询表信息", notes = "根据表名查询表信息")
+	@PostMapping("/queryTable")
+	@ResponseBody
+	public AjaxResult queryTable(String tableName) {
+		List<TsysTables> list = generatorService.queryList(tableName);
+		if (list.size() > 0) {
+			return AjaxResult.successData(200, list);
+		}
+		return AjaxResult.error();
+	}
+
+	/**
+	 * 根据表查询表字段详情
+	 * 
+	 * @param tableName
+	 * @return
+	 * @author gyee
+	 * @Date 2019年8月15日 上午1:10:42
+	 */
+	@ApiOperation(value = "根据表查询表字段详情", notes = "根据表查询表字段详情")
+	@PostMapping("/queryTableInfo")
+	@ResponseBody
+	public AjaxResult queryTableInfo(String tableName) {
+		List<BeanColumn> list = generatorService.queryColumns2(tableName);
+		System.out.println(JSONUtil.toJsonStr(list));
+		if (list.size() > 0) {
+			return AjaxResult.successData(200, list);
+		}
+		return AjaxResult.error();
+	}
+
+	/**
+	 * 保存配置文件
+	 * 
+	 * @param globalConfig
+	 * @param model
+	 * @param request
+	 * @return
+	 * @throws Exception
+	 * @author gyee
+	 * @Date 2019年8月24日 下午3:25:41
+	 */
+	//@Log(title = "保存配置文件", action = "1")
+	@ApiOperation(value = "保存配置文件", notes = "保存配置文件")
+	@PostMapping("/addGlobal")
+	@ResponseBody
+	public AjaxResult addGlobal(GlobalConfig globalConfig, Model model, HttpServletRequest request) throws Exception {
+		AutoCodeConfig.setGlobalConfig(globalConfig);
+		if (globalConfig != null) {
+			return success();
+		} else {
+			return error();
+		}
+	}
+
+	/**
+	 * 保存单表信息
+	 * 
+	 * @param allColumnss  字段列表字符串
+	 * @param tableName 表名
+	 * @param conditionQueryField  条件查询字段
+	 * @param pid 父id
+	 * @param sqlcheck 是否录入数据
+	 * @param vhtml 生成html
+	 * @param vController 生成controller
+	 * @param vservice 生成service
+	 * @param vMapperORdao 生成mapper or dao
+	 * @return
+	 * @throws Exception
+	 * @author gyee
+	 * @Date 2019年8月31日 上午2:49:18
+	 */
+	//@Log(title = "保存单表信息", action = "1")
+	@ApiOperation(value = "保存单表信息", notes = "保存单表信息")
+	@PostMapping("/saveOne")
+	@ResponseBody
+	public AjaxResult saveOne(String allColumnss, String tableName, String conditionQueryField, String pid,
+			int sqlcheck,Boolean vhtml,Boolean vController,Boolean vService,Boolean vMapperORdao) throws Exception {
+		//JSONArray array = JSONUtil.parseArray(allColumnss);
+		// 遗留可用前端修改传入的字段等信息(未完善)
+		//List<BeanColumn> beanColumns2 = JSONUtil.toList(array, BeanColumn.class);
+		List<TsysTables> list = generatorService.queryList(tableName);
+		if (list.size() > 0) {
+			TsysTables tables = list.get(0);
+			List<BeanColumn> beanColumns = generatorService.queryColumns2(tableName);
+			AutoCodeUtil.autoCodeOneModel(sysUtilService, tables, beanColumns, conditionQueryField, pid, sqlcheck, vhtml, vController, vService, vMapperORdao);
+		}
+		return AjaxResult.success();
+	}
+
+	/**
+	 * 根据权限字段查询是否存在
+	 * 
+	 * @param perms
+	 * @return
+	 * @author gyee
+	 * @Date 2019年9月1日 上午2:06:31
+	 */
+	@ApiOperation(value = "根据权限字段查询是否存在", notes = "根据权限字段查询是否存在")
+	@PostMapping("/queryLikePerms")
+	@ResponseBody
+	public AjaxResult queryLikePerms(String tableName) {
+		List<TsysTables> list = generatorService.queryList(tableName);
+		if (list.size() > 0) {
+			TsysTables tables = list.get(0);
+			Boolean boolean1 = sysPermissionService.queryLikePerms(tables.getTableModel_a());
+			if (boolean1) {
+				return AjaxResult.error("数据库已有权限");
+			} else {
+				return AjaxResult.success("ok");
+			}
+		}
+		return AjaxResult.error("请选择表");
+	}
+}

+ 142 - 0
web/monitor-hf/src/main/java/com/gyee/frame/controller/admin/CaptchaController.java

@@ -0,0 +1,142 @@
+package com.gyee.frame.controller.admin;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+
+import java.awt.image.BufferedImage;
+import java.io.IOException;
+import java.util.List;
+
+import javax.imageio.ImageIO;
+import javax.servlet.ServletOutputStream;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+
+import javax.annotation.Resource;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.servlet.ModelAndView;
+
+import com.gyee.frame.common.base.BaseController;
+import com.google.code.kaptcha.Constants;
+import com.google.code.kaptcha.Producer;
+
+/**
+ * 图片验证码
+ * @author fc
+ */
+@Api(value = "验证码")
+@Controller
+@RequestMapping("/captcha")
+public class CaptchaController extends BaseController
+{
+	@Resource
+    private Producer captchaProducer;
+    
+    @Resource
+    private Producer captchaProducerMath;
+
+    /**
+     * 生成验证码
+     * @param request
+     * @param response
+     * @param type
+     * @return
+     * @author gyee
+     * @Date 2020年5月22日 上午12:17:03
+     */
+    @ApiOperation(value = "验证码生成", notes = "验证码生成")
+    @GetMapping("/captchaImage")
+    public ModelAndView getKaptchaImage(HttpServletRequest request, HttpServletResponse response,String type)
+    {
+        ServletOutputStream out = null;
+        try
+        {
+            HttpSession session = request.getSession();
+            response.setDateHeader("Expires", 0);
+            //Set standard HTTP/1.1 no-cache headers. 
+            response.setHeader("Cache-Control", "no-store, no-cache, must-revalidate");
+            //Set IE extended HTTP/1.1 no-cache headers (use addHeader). 
+            response.addHeader("Cache-Control", "post-check=0, pre-check=0");
+            //Set standard HTTP/1.0 no-cache header. 
+            response.setHeader("Pragma", "no-cache");
+            //return a jpeg 
+            response.setContentType("image/jpeg");
+            ///验证码字符串
+            String captStr = null;
+            //答案
+            String answer = null;
+            BufferedImage images = null;
+            if ("math".equals(type))//验证码为算数 8*9 类型
+            {
+            	//验证码加答案8-3=?@5
+                String captText = captchaProducerMath.createText();
+                //验证码8-3=?
+                captStr = captText.substring(0, captText.lastIndexOf("@"));
+                answer = captText.substring(captText.lastIndexOf("@") + 1);
+                //生成图片
+                images = captchaProducerMath.createImage(captStr);
+            }
+            else if ("char".equals(type))//验证码为 abcd类型
+            {
+            	captStr = answer = captchaProducer.createText();
+                images = captchaProducer.createImage(captStr);
+            }
+            session.setAttribute(Constants.KAPTCHA_SESSION_KEY, answer);
+            out = response.getOutputStream();
+            ImageIO.write(images, "jpg", out);
+            out.flush();
+        }
+        catch (Exception e)
+        {
+            e.printStackTrace();
+        }
+        finally
+        {
+            try
+            {
+                if (out != null)
+                {
+                    out.close();
+                }
+            }
+            catch (IOException e)
+            {
+                e.printStackTrace();
+            }
+        }
+        return null;
+    }
+    
+    /**
+     * 滚动条验证码
+     * @param datas
+     * @return
+     * @author gyee
+     * @Date 2019年11月23日 下午6:12:27
+     */
+    @ApiOperation(value = "滚动条验证码", notes = "滚动条验证码")
+    @PostMapping("/isVerify")
+    @ResponseBody
+	public boolean isVerify(@RequestBody List<Integer> datas) {
+		int sum = 0;  
+		for (Integer data : datas) {
+			sum += data;
+		}
+		double avg = sum * 1.0 / datas.size();
+		
+		double sum2 = 0.0;
+		for (Integer data : datas) {
+			sum2 += Math.pow(data - avg, 2);
+		}
+		
+		double stddev = sum2 / datas.size();
+		return stddev != 0;
+	}
+	
+}

+ 181 - 0
web/monitor-hf/src/main/java/com/gyee/frame/controller/admin/DictDataController.java

@@ -0,0 +1,181 @@
+package com.gyee.frame.controller.admin;
+
+import com.gyee.frame.model.auto.TSysDictData;
+import com.gyee.frame.service.SysDictDataService;
+import com.gyee.frame.service.SysDictTypeService;
+
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import javax.annotation.Resource;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import com.github.pagehelper.PageInfo;
+import com.gyee.frame.common.base.BaseController;
+import com.gyee.frame.common.domain.AjaxResult;
+import com.gyee.frame.model.custom.TableSplitResult;
+import com.gyee.frame.model.custom.Tablepar;
+import com.gyee.frame.model.custom.TitleVo;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+
+/**
+ * 字典表Controller
+ * @ClassName: DictDataController
+ * @author gyee
+ * @date 2019-11-20 22:46
+ */
+@Api(value = "字典数据表")
+@Controller
+@RequestMapping("/DictDataController")
+public class DictDataController extends BaseController{
+	
+	private String prefix = "admin/dict_data";
+	@Resource
+	private SysDictDataService tSysDictDataService;
+	@Resource
+	private SysDictTypeService sysDictTypeService;
+	
+	/**
+	 * 分页list页面
+	 * @param model
+	 * @param dictId
+	 * @return
+	 */
+	@ApiOperation(value = "分页跳转", notes = "分页跳转")
+	@GetMapping("/view")
+	@RequiresPermissions("system:dictData:view")
+    public String view(ModelMap model,String dictId)
+    {
+    	model.addAttribute("dictId",dictId);
+		String str="字典数据表";
+		setTitle(model, new TitleVo("列表", str+"管理", true,"欢迎进入"+str+"页面", true, false));
+        return prefix + "/list";
+    }
+	
+	/**
+	 * 字典数据表集合查询
+	 * @param tablepar
+	 * @param searchText
+	 * @param dictId
+	 * @return
+	 */
+	//@Log(title = "字典数据表集合查询", action = "1")
+	@ApiOperation(value = "分页查询", notes = "分页查询")
+	@PostMapping("/list")
+	@RequiresPermissions("system:dictData:list")
+	@ResponseBody
+	public Object list(Tablepar tablepar,String searchText,String dictId){
+		PageInfo<TSysDictData> page=tSysDictDataService.list(tablepar,searchText,dictId) ;
+		TableSplitResult<TSysDictData> result=new TableSplitResult<TSysDictData>(page.getPageNum(), page.getTotal(), page.getList()); 
+		return  result;
+	}
+	
+	/**
+	 * 新增跳转
+	 * @param modelMap
+	 * @param dictId
+	 * @return
+	 */
+	@ApiOperation(value = "新增跳转", notes = "新增跳转")
+    @GetMapping("/add")
+    public String add(ModelMap modelMap,String dictId)
+    {
+		modelMap.addAttribute("dictType",sysDictTypeService.selectByPrimaryKey(dictId).getDictType());
+        return prefix + "/add";
+    }
+	
+    /**
+     * 新增保存
+     * @param tSysDictData
+     * @param model
+     * @return
+     */
+	//@Log(title = "字典数据表新增", action = "1")
+	@ApiOperation(value = "新增", notes = "新增")
+	@PostMapping("/add")
+	@RequiresPermissions("system:dictData:add")
+	@ResponseBody
+	public AjaxResult add(TSysDictData tSysDictData, Model model){
+		int b=tSysDictDataService.insertSelective(tSysDictData);
+		if(b>0){
+			return success();
+		}else{
+			return error();
+		}
+	}
+	
+	/**
+	 * 删除
+	 * @param ids
+	 * @return
+	 */
+	//@Log(title = "字典数据表删除", action = "1")
+	@ApiOperation(value = "删除", notes = "删除")
+	@PostMapping("/remove")
+	@RequiresPermissions("system:dictData:remove")
+	@ResponseBody
+	public AjaxResult remove(String ids){
+		int b=tSysDictDataService.deleteByPrimaryKey(ids);
+		if(b>0){
+			return success();
+		}else{
+			return error();
+		}
+	}
+	
+	/**
+	 * 检查
+	 * @param tsysUser
+	 * @return
+	 */
+	@ApiOperation(value = "检查Name唯一", notes = "检查Name唯一")
+	@PostMapping("/checkNameUnique")
+	@ResponseBody
+	public int checkNameUnique(TSysDictData tSysDictData){
+		int b=tSysDictDataService.checkNameUnique(tSysDictData);
+		if(b>0){
+			return 1;
+		}else{
+			return 0;
+		}
+	}
+	
+	
+	/**
+	 * 修改跳转
+	 * @param id
+	 * @param mmap
+	 * @return
+	 */
+	@ApiOperation(value = "修改跳转", notes = "修改跳转")
+	@GetMapping("/edit/{id}")
+    public String edit(@PathVariable("id") String id, ModelMap mmap)
+    {
+		TSysDictData sysDictData= tSysDictDataService.selectByPrimaryKey(id);
+        mmap.put("TSysDictData", sysDictData);
+        return prefix + "/edit";
+    }
+	
+	/**
+     * 修改保存
+     */
+    //@Log(title = "字典数据表修改", action = "1")
+	@ApiOperation(value = "修改保存", notes = "修改保存")
+    @RequiresPermissions("system:dictData:edit")
+    @PostMapping("/edit")
+    @ResponseBody
+    public AjaxResult editSave(TSysDictData record)
+    {
+        return toAjax(tSysDictDataService.updateByPrimaryKeySelective(record));
+    }
+
+    
+    
+
+	
+}

+ 170 - 0
web/monitor-hf/src/main/java/com/gyee/frame/controller/admin/DictTypeController.java

@@ -0,0 +1,170 @@
+package com.gyee.frame.controller.admin;
+
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import javax.annotation.Resource;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import com.github.pagehelper.PageInfo;
+import com.gyee.frame.common.base.BaseController;
+import com.gyee.frame.common.domain.AjaxResult;
+import com.gyee.frame.model.auto.TSysDictType;
+import com.gyee.frame.model.custom.TableSplitResult;
+import com.gyee.frame.model.custom.Tablepar;
+import com.gyee.frame.model.custom.TitleVo;
+import com.gyee.frame.service.SysDictTypeService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+
+/**
+ * 字典类型Controller
+ * @ClassName: DictTypeController
+ * @author gyee
+ * @date 2019-11-20 22:45
+ */
+@Api(value = "字典类型表")
+@Controller
+@RequestMapping("/DictTypeController")
+public class DictTypeController extends BaseController{
+	
+	private String prefix = "admin/dict_type";
+	@Resource
+	private SysDictTypeService tSysDictTypeService;
+	
+	/**
+	 * 分页list页面
+	 * @param model
+	 * @param dictId
+	 * @return
+	 */
+	@ApiOperation(value = "分页跳转", notes = "分页跳转")
+	@GetMapping("/view")
+	@RequiresPermissions("system:dictType:view")
+    public String view(ModelMap model)
+    {	
+		String str="字典类型表";
+		setTitle(model, new TitleVo("列表", str+"管理", true,"欢迎进入"+str+"页面", true, false));
+        return prefix + "/list";
+    }
+	
+	/**
+	 * 字典类型表集合查询
+	 * @param tablepar
+	 * @param searchText
+	 * @return
+	 */
+	//@Log(title = "字典类型表集合查询", action = "111")
+	@ApiOperation(value = "分页查询", notes = "分页查询")
+	@PostMapping("/list")
+	@RequiresPermissions("system:dictType:list")
+	@ResponseBody
+	public Object list(Tablepar tablepar,String searchText){
+		PageInfo<TSysDictType> page=tSysDictTypeService.list(tablepar,searchText) ; 
+		TableSplitResult<TSysDictType> result=new TableSplitResult<TSysDictType>(page.getPageNum(), page.getTotal(), page.getList()); 
+		return  result;
+	}
+	
+	/**
+	 * 新增跳转
+	 * @param modelMap
+	 * @return
+	 */
+	@ApiOperation(value = "新增跳转", notes = "新增跳转")
+    @GetMapping("/add")
+    public String add(ModelMap modelMap)
+    {
+        return prefix + "/add";
+    }
+	
+    /**
+     * 新增保存
+     * @param tSysDictType
+     * @param model
+     * @return
+     */
+	//@Log(title = "字典类型表新增", action = "111")
+	@ApiOperation(value = "新增", notes = "新增")
+	@PostMapping("/add")
+	@RequiresPermissions("system:dictType:add")
+	@ResponseBody
+	public AjaxResult add(TSysDictType tSysDictType,Model model){
+		int b=tSysDictTypeService.insertSelective(tSysDictType);
+		if(b>0){
+			return success();
+		}else{
+			return error();
+		}
+	}
+	
+	/**
+	 * 删除字典类型
+	 * @param ids
+	 * @return
+	 */
+	//@Log(title = "字典类型表删除", action = "111")
+	@ApiOperation(value = "删除", notes = "删除")
+	@PostMapping("/remove")
+	@RequiresPermissions("system:dictType:remove")
+	@ResponseBody
+	public AjaxResult remove(String ids){
+		int b=tSysDictTypeService.deleteByPrimaryKey(ids);
+		if(b>0){
+			return success();
+		}else{
+			return error();
+		}
+	}
+	
+	/**
+	 * 检查字典类型名字相同
+	 * @param tsysUser
+	 * @return
+	 */
+	@ApiOperation(value = "检查Name唯一", notes = "检查Name唯一")
+	@PostMapping("/checkNameUnique")
+	@ResponseBody
+	public int checkNameUnique(TSysDictType tSysDictType){
+		int b=tSysDictTypeService.checkNameUnique(tSysDictType);
+		if(b>0){
+			return 1;
+		}else{
+			return 0;
+		}
+	}
+	
+	
+	/**
+	 * 修改跳转
+	 * @param id
+	 * @param mmap
+	 * @return
+	 */
+	@ApiOperation(value = "修改跳转", notes = "修改跳转")
+	@GetMapping("/edit/{id}")
+    public String edit(@PathVariable("id") String id, ModelMap mmap)
+    {
+        mmap.put("TSysDictType", tSysDictTypeService.selectByPrimaryKey(id));
+
+        return prefix + "/edit";
+    }
+	
+	/**
+     * 修改保存
+     */
+    //@Log(title = "字典类型表修改", action = "111")
+	@ApiOperation(value = "修改保存", notes = "修改保存")
+    @RequiresPermissions("system:dictType:edit")
+    @PostMapping("/edit")
+    @ResponseBody
+    public AjaxResult editSave(TSysDictType record)
+    {
+        return toAjax(tSysDictTypeService.updateByPrimaryKeySelective(record));
+    }
+
+	
+}

+ 0 - 0
web/monitor-hf/src/main/java/com/gyee/frame/controller/admin/EmailController.java


Some files were not shown because too many files changed in this diff