From 089c487e1c04b24d749f977b73f6f85b47806d1a Mon Sep 17 00:00:00 2001 From: yang_shj <1069818635@QQ.com> Date: Fri, 16 Jun 2023 08:34:40 +0800 Subject: [PATCH] =?UTF-8?q?#=E5=AE=9A=E6=97=B6=E4=BB=BB=E5=8A=A1=E6=8A=BD?= =?UTF-8?q?=E7=A6=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hzims-service/hzims-scheduled/pom.xml | 77 +++++++++++++++------- .../hnac/hzims/scheduled/ScheduledApplication.java | 17 ++--- .../scheduled/RealTargetScheduledTask.java | 1 + .../service/equipment/impl/PlanServiceImpl.java | 1 - .../operation/impl/RealTargetServiceImpl.java | 3 +- .../hzims-scheduled/src/main/resources/banner.txt | 19 ++++++ .../main/resources/mapper/equipment/PlanMapper.xml | 2 +- 7 files changed, 79 insertions(+), 41 deletions(-) create mode 100644 hzims-service/hzims-scheduled/src/main/resources/banner.txt diff --git a/hzims-service/hzims-scheduled/pom.xml b/hzims-service/hzims-scheduled/pom.xml index 3bc836b..a904ab8 100644 --- a/hzims-service/hzims-scheduled/pom.xml +++ b/hzims-service/hzims-scheduled/pom.xml @@ -25,24 +25,11 @@ org.springblade blade-core-boot - - - org.springblade - blade-core-cloud - - org.springblade blade-core-cloud - - - io.github.openfeign - feign-okhttp - - - org.springblade blade-common @@ -52,11 +39,6 @@ blade-starter-swagger - com.baomidou - dynamic-datasource-spring-boot-starter - 2.5.6 - - com.hnac.hzims hzims-operational-api @@ -87,26 +69,48 @@ xxl-job-core + org.apache.poi + poi-ooxml-schemas + 3.15 + + + org.jfree + jcommon + 1.0.24 + + + org.jfree + jfreechart + 1.5.0 + + + com.hikvision.ga + artemis-http-client + + + org.apache.httpcomponents + httpclient + + + org.freemarker + freemarker + + com.hnac.hzims equipment-api - com.hnac.hzims message-api - com.hnac.hzims ticket-api - com.hnac.hzims assets-api - - com.google.zxing core @@ -124,6 +128,16 @@ commons-collections4 + org.springframework.boot + spring-boot-starter-websocket + + + org.springframework.boot + spring-boot-starter-tomcat + + + + cn.hutool hutool-http @@ -132,6 +146,10 @@ hutool-core + org.java-websocket + Java-WebSocket + + org.springblade blade-resource-api @@ -159,7 +177,16 @@ com.hnac.hzinfo.data hzinfo-data-sdk - + + com.github.xiaoymin + swagger-bootstrap-ui + ${swagger-bootstrap-ui.version} + + + com.baomidou + dynamic-datasource-spring-boot-starter + 2.5.6 + @@ -183,4 +210,4 @@ - + \ No newline at end of file diff --git a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/ScheduledApplication.java b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/ScheduledApplication.java index 15db15a..6b524df 100644 --- a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/ScheduledApplication.java +++ b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/ScheduledApplication.java @@ -1,30 +1,23 @@ package com.hnac.hzims.scheduled; -import com.hnac.hzims.operational.OperationalConstants; import org.mybatis.spring.annotation.MapperScan; import org.springblade.core.cloud.feign.EnableBladeFeign; import org.springblade.core.launch.BladeApplication; -import org.springframework.boot.Banner; -import org.springframework.boot.SpringApplication; import org.springframework.boot.builder.SpringApplicationBuilder; import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; import org.springframework.cloud.client.SpringCloudApplication; import org.springframework.context.annotation.ComponentScan; -import org.springframework.scheduling.annotation.EnableScheduling; import javax.annotation.Resource; + /** - * @Author dfy - * @Version v1.0 - * @Serial 1.0 - * @Date 2023/5/19 9:05 + * @author ysj */ -@EnableBladeFeign(basePackages = {"org.springblade","com.hnac"}) +@EnableBladeFeign @SpringCloudApplication -@MapperScan("com.hnac.hzims.scheduled.mapper.**.**") -@EnableScheduling -@ComponentScan(basePackages = {"com.hnac.hzims.scheduled.*","org.springblade.core"}) +@MapperScan("com.hnac.hzims.**.mapper.**") +@ComponentScan(basePackages = {"com.hnac.*"}) @Resource public class ScheduledApplication extends SpringBootServletInitializer { public static void main(String[] args) { diff --git a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/RealTargetScheduledTask.java b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/RealTargetScheduledTask.java index a0c235e..3834f1a 100644 --- a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/RealTargetScheduledTask.java +++ b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/RealTargetScheduledTask.java @@ -34,6 +34,7 @@ public class RealTargetScheduledTask { * @throws Exception */ @XxlJob(LOAD_EM_INFO) + //@Scheduled(cron = "0/40 * * * * ? ") public ReturnT loadEmInfo(String param) { service.loadEmInfo(); return new ReturnT<>("SUCCESS"); diff --git a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/equipment/impl/PlanServiceImpl.java b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/equipment/impl/PlanServiceImpl.java index 56c94bc..78e1ebe 100644 --- a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/equipment/impl/PlanServiceImpl.java +++ b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/equipment/impl/PlanServiceImpl.java @@ -20,7 +20,6 @@ import java.util.List; @DS("equipment") public class PlanServiceImpl extends BaseServiceImpl implements PlanService { - /** * 查询计划发电量 * @param stationIds diff --git a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/impl/RealTargetServiceImpl.java b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/impl/RealTargetServiceImpl.java index 88794fc..55fb6d7 100644 --- a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/impl/RealTargetServiceImpl.java +++ b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/impl/RealTargetServiceImpl.java @@ -30,7 +30,6 @@ import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.MapUtils; import org.springblade.core.log.exception.ServiceException; -import org.springblade.core.tool.api.R; import org.springblade.core.tool.utils.CollectionUtil; import org.springblade.core.tool.utils.DateUtil; import org.springblade.core.tool.utils.ObjectUtil; @@ -928,7 +927,7 @@ public class RealTargetServiceImpl implements RealTargetService { */ private Map getWaterLevelMap(String instanceCode, String signage) { String beginTime = DateUtil.format(new Date(), DateUtil.PATTERN_DATE) + " 00:00:00"; - String endTime = DateUtil.format(new Date(), DateUtil.PATTERN_DATE); + String endTime = DateUtil.format(new Date(), DateUtil.PATTERN_DATETIME); AnalyseCodeByAnalyseDataPO po = new AnalyseCodeByAnalyseDataPO(); List datas = dataService.periodTargetData(beginTime, endTime,2, 6,instanceCode,signage); if(CollectionUtil.isEmpty(datas)){ diff --git a/hzims-service/hzims-scheduled/src/main/resources/banner.txt b/hzims-service/hzims-scheduled/src/main/resources/banner.txt new file mode 100644 index 0000000..d85ea96 --- /dev/null +++ b/hzims-service/hzims-scheduled/src/main/resources/banner.txt @@ -0,0 +1,19 @@ + + .::::. + .::::::::. + ::::::::::: + ':::::::::::.. + :::::::::::::::' + ':::::::::::. + .::::::::::::::' + .:::::::::::... + ::::::::::::::'' + .:::. '::::::::'':::: + .::::::::. ':::::' ':::: + .::::':::::::. ::::: '::::. + .:::::' ':::::::::. ::::: ':::. + .:::::' ':::::::::.::::: '::. + .::::'' ':::::::::::::: '::. + .::'' ':::::::::::: :::... + ..:::: ':::::::::' .:' '''' + ..''''':' ':::::.' diff --git a/hzims-service/hzims-scheduled/src/main/resources/mapper/equipment/PlanMapper.xml b/hzims-service/hzims-scheduled/src/main/resources/mapper/equipment/PlanMapper.xml index 4cb6c9b..8303f27 100644 --- a/hzims-service/hzims-scheduled/src/main/resources/mapper/equipment/PlanMapper.xml +++ b/hzims-service/hzims-scheduled/src/main/resources/mapper/equipment/PlanMapper.xml @@ -16,7 +16,7 @@ - select * from hz_ims_plan_generation where IS_DELETED = 0