添加xml
This commit is contained in:
parent
1b1cc73faf
commit
f52ea0df3f
|
|
@ -11,6 +11,11 @@
|
|||
<option name="name" value="Maven Central repository" />
|
||||
<option name="url" value="https://repo1.maven.org/maven2" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Central Repository" />
|
||||
<option name="url" value="http://maven.aliyun.com/nexus/content/groups/public" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="jboss.community" />
|
||||
<option name="name" value="JBoss Community repository" />
|
||||
|
|
@ -21,5 +26,10 @@
|
|||
<option name="name" value="Central Repository" />
|
||||
<option name="url" value="https://maven.aliyun.com/repository/public" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="AsposeJavaAPI" />
|
||||
<option name="name" value="Aspose Java API" />
|
||||
<option name="url" value="https://repository.aspose.com/repo/" />
|
||||
</remote-repository>
|
||||
</component>
|
||||
</project>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -101,22 +101,26 @@
|
|||
<systemPath>${project.basedir}/lib/isc_sso_agent.jar</systemPath>
|
||||
</dependency>
|
||||
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>httpclient</groupId>-->
|
||||
<!-- <artifactId>httpclient</artifactId>-->
|
||||
<!-- <version>1.0</version>-->
|
||||
<!-- <scope>system</scope>-->
|
||||
<!-- <systemPath>${project.basedir}/lib/commons-httpclient-3.1.jar</systemPath>-->
|
||||
<!-- </dependency>-->
|
||||
<!-- -->
|
||||
<dependency>
|
||||
<groupId>httpclient</groupId>
|
||||
<artifactId>httpclient</artifactId>
|
||||
<version>1.0</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${project.basedir}/lib/commons-httpclient-3.1.jar</systemPath>
|
||||
<groupId>commons-httpclient</groupId>
|
||||
<artifactId>commons-httpclient</artifactId>
|
||||
<version>3.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>json-20220320</groupId>
|
||||
<artifactId>json-20220320</artifactId>
|
||||
<version>1.0</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${project.basedir}/lib/json-20220320.jar</systemPath>
|
||||
<groupId>org.json</groupId>
|
||||
<artifactId>json</artifactId>
|
||||
<version>20220320</version>
|
||||
</dependency>
|
||||
|
||||
<!-- <dependency>-->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>jackson-core-asl-1.9.13</groupId>-->
|
||||
<!-- <artifactId>jackson-core-asl-1.9.13</artifactId>-->
|
||||
<!-- <version>1.0</version>-->
|
||||
|
|
@ -157,13 +161,12 @@
|
|||
<systemPath>${project.basedir}/lib/com.sgcc.sgid.agent1.0.0-20200528.jar</systemPath>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>gson</groupId>
|
||||
<artifactId>gson-2.6.2</artifactId>
|
||||
<groupId>com.google.code.gson</groupId>
|
||||
<artifactId>gson</artifactId>
|
||||
<version>2.6.2</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${project.basedir}/lib/gson-2.6.2.jar</systemPath>
|
||||
</dependency>
|
||||
<!-- <dependency>-->
|
||||
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>bcprov-jdk15on</groupId>-->
|
||||
<!-- <artifactId>bcprov-jdk15on-1.55</artifactId>-->
|
||||
<!-- <version>1.55</version>-->
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# Tomcat
|
||||
server:
|
||||
port: 18081
|
||||
port: 38081
|
||||
management:
|
||||
server:
|
||||
port: -1
|
||||
|
|
@ -15,21 +15,13 @@ spring:
|
|||
cloud:
|
||||
nacos:
|
||||
username: nacos
|
||||
password: Jjsp@nacos2023
|
||||
password: nacos
|
||||
discovery:
|
||||
server-addr: 10.138.132.188:18848
|
||||
# server-addr: 10.145.34.32:18848
|
||||
# 服务注册地址
|
||||
# server-addr: 127.0.0.1:18848
|
||||
# server-addr: 10.145.34.32:18848
|
||||
server-addr: 192.168.0.14:8848
|
||||
namespace: gs-jjsp
|
||||
config:
|
||||
server-addr: 10.138.132.188:18848
|
||||
# server-addr: 10.145.34.32:8848
|
||||
# 配置中心地址
|
||||
# server-addr: 27.196.164.56:8848
|
||||
# server-addr: 10.145.34.32:18848
|
||||
# server-addr: 127.0.0.1:18848
|
||||
# server-addr: 10.145.34.32:18848
|
||||
server-addr: 192.168.0.14:8848
|
||||
namespace: gs-jjsp
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
# Tomcat
|
||||
server:
|
||||
port: 18080
|
||||
port: 38080
|
||||
servlet:
|
||||
context-path: basfs
|
||||
context-path: gsbasfs
|
||||
# Spring
|
||||
spring:
|
||||
main:
|
||||
|
|
@ -16,25 +16,20 @@ spring:
|
|||
cloud:
|
||||
nacos:
|
||||
username: nacos
|
||||
password: Jjsp@nacos2023
|
||||
password: nacos
|
||||
discovery:
|
||||
# 服务注册地址
|
||||
# server-addr: 10.138.132.187:18848
|
||||
# server-addr: 10.145.34.32:18848
|
||||
# server-addr: 27.50.91.13:18848
|
||||
server-addr: 127.0.0.1:18848
|
||||
server-addr: 192.168.0.14:8848
|
||||
namespace: gs-jjsp
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 127.0.0.1:18848
|
||||
# server-addr: 27.50.91.13:18848
|
||||
# server-addr: 10.138.132.187:18848
|
||||
server-addr: 192.168.0.14:8848
|
||||
namespace: gs-jjsp
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# server-addr: 10.145.34.32:18848
|
||||
# 共享配置
|
||||
shared-configs:
|
||||
- vsc-dev.yml
|
||||
# server-addr: 10.138.132.187:18848
|
||||
management:
|
||||
server:
|
||||
port: -1
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -168,18 +168,18 @@
|
|||
<artifactId>junit</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-test</artifactId>
|
||||
<version>5.3.14</version>
|
||||
<scope>test</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>org.springframework</groupId>-->
|
||||
<!-- <artifactId>spring-test</artifactId>-->
|
||||
<!-- <version>5.3.14</version>-->
|
||||
<!-- <scope>test</scope>-->
|
||||
<!-- <exclusions>-->
|
||||
<!-- <exclusion>-->
|
||||
<!-- <groupId>org.springframework</groupId>-->
|
||||
<!-- <artifactId>spring</artifactId>-->
|
||||
<!-- </exclusion>-->
|
||||
<!-- </exclusions>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
|
|
@ -226,11 +226,14 @@
|
|||
|
||||
<!--加密组件-->
|
||||
<dependency>
|
||||
<groupId>jasypt-1.9.3</groupId>
|
||||
<artifactId>jasypt-1.9.3</artifactId>
|
||||
<version>1.0</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${project.basedir}/libs/jasypt-1.9.3.jar</systemPath>
|
||||
<groupId>org.jasypt</groupId>
|
||||
<artifactId>jasypt</artifactId>
|
||||
<version>1.9.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.ulisesbocchio</groupId>
|
||||
<artifactId>jasypt-spring-boot-starter</artifactId>
|
||||
<version>3.0.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>aspose-slides-21.10-jdk16</groupId>
|
||||
|
|
@ -246,6 +249,7 @@
|
|||
<scope>system</scope>
|
||||
<systemPath>${project.basedir}/libs/aspose-words-15.8.0.jar</systemPath>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>ebuild-component-crypto</groupId>
|
||||
<artifactId>ebuild-component-crypto</artifactId>
|
||||
|
|
@ -255,80 +259,68 @@
|
|||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>jasypt-spring-boot-3.0.2</groupId>
|
||||
<artifactId>jasypt-spring-boot-3.0.2</artifactId>
|
||||
<version>1.0</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${project.basedir}/libs/jasypt-spring-boot-3.0.2.jar</systemPath>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>aliyun-sdk-oss-3.10.2</groupId>
|
||||
<artifactId>aliyun-sdk-oss-3.10.2</artifactId>
|
||||
<version>1.0</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${project.basedir}/libs/aliyun-sdk-oss-3.10.2.jar</systemPath>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jdom2-2.0.6.jar</groupId>
|
||||
<artifactId>jdom2-2.0.6.jar</artifactId>
|
||||
<version>1.0</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${project.basedir}/libs/jdom2-2.0.6.jar</systemPath>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>spring-boot-starter-web-2.7.3.jar</groupId>
|
||||
<artifactId>spring-boot-starter-web-2.7.3.jar</artifactId>
|
||||
<version>1.0</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${project.basedir}/libs/spring-boot-starter-web-2.7.3.jar</systemPath>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>spring-messaging-5.3.22.jar</groupId>
|
||||
<artifactId>spring-messaging-5.3.22.jar</artifactId>
|
||||
<version>1.0</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${project.basedir}/libs/spring-messaging-5.3.22.jar</systemPath>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>spring-websocket-5.3.22.jar</groupId>
|
||||
<artifactId>spring-websocket-5.3.22.jar</artifactId>
|
||||
<version>1.0</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${project.basedir}/libs/spring-websocket-5.3.22.jar</systemPath>
|
||||
</dependency>
|
||||
|
||||
<!--<dependency>
|
||||
<groupId>com.aliyun.oss</groupId>
|
||||
<artifactId>aliyun-sdk-oss</artifactId>
|
||||
<version>2.8.2</version>
|
||||
</dependency>-->
|
||||
<version>3.10.2</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.jdom</groupId>
|
||||
<artifactId>jdom2</artifactId>
|
||||
<version>2.0.6</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
<version>2.7.3</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-websocket</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>com.github.oshi</groupId>
|
||||
<artifactId>oshi-core</artifactId>
|
||||
<version>6.3.2</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.youotech.jjqgcapp</groupId>-->
|
||||
<!-- <artifactId>jjqgcapp-common</artifactId>-->
|
||||
<!-- <version>3.4.0</version>-->
|
||||
<!-- <groupId>jna-5.12.1.jar</groupId>-->
|
||||
<!-- <artifactId>jna-5.12.1.jar</artifactId>-->
|
||||
<!-- <version>1.0</version>-->
|
||||
<!-- <scope>system</scope>-->
|
||||
<!-- <systemPath>${project.basedir}/libs/jna-5.12.1.jar</systemPath>-->
|
||||
<!-- </dependency>-->
|
||||
<dependency>
|
||||
<groupId>oshi-core-6.3.2.jar</groupId>
|
||||
<artifactId>oshi-core-6.3.2.jar</artifactId>
|
||||
<version>1.0</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${project.basedir}/libs/oshi-core-6.3.2.jar</systemPath>
|
||||
<groupId>net.java.dev.jna</groupId>
|
||||
<artifactId>jna-platform</artifactId>
|
||||
<version>5.12.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jna-5.12.1.jar</groupId>
|
||||
<artifactId>jna-5.12.1.jar</artifactId>
|
||||
<version>1.0</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${project.basedir}/libs/jna-5.12.1.jar</systemPath>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jna-platform-5.12.1.jar</groupId>
|
||||
<artifactId>jna-platform-5.12.1.jar</artifactId>
|
||||
<version>1.0</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${project.basedir}/libs/jna-platform-5.12.1.jar</systemPath>
|
||||
<groupId>net.java.dev.jna</groupId>
|
||||
<artifactId>jna</artifactId>
|
||||
<version>5.12.1</version> <!-- 保持主版本一致 -->
|
||||
</dependency>
|
||||
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>jna-platform-5.12.1.jar</groupId>-->
|
||||
<!-- <artifactId>jna-platform-5.12.1.jar</artifactId>-->
|
||||
<!-- <version>1.0</version>-->
|
||||
<!-- <scope>system</scope>-->
|
||||
<!-- <systemPath>${project.basedir}/libs/jna-platform-5.12.1.jar</systemPath>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
<dependency>
|
||||
<groupId>sgjdbc_20230302.jar</groupId>
|
||||
<artifactId>sgjdbc_20230302.jar</artifactId>
|
||||
|
|
@ -357,6 +349,7 @@
|
|||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-test</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>aspose-words-15.8.0.jar</groupId>
|
||||
<artifactId>aspose-words-15.8.0.jar</artifactId>
|
||||
|
|
@ -365,14 +358,27 @@
|
|||
<systemPath>${project.basedir}/libs/aspose-words-15.8.0.jar</systemPath>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>aspose-slides-21.10-jdk16.jar</groupId>
|
||||
<artifactId>aspose-slides-21.10-jdk16.jar</artifactId>
|
||||
<version>1.0</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${project.basedir}/libs/aspose-slides-21.10-jdk16.jar</systemPath>
|
||||
<groupId>com.aspose</groupId>
|
||||
<artifactId>aspose-slides</artifactId>
|
||||
<version>21.10</version>
|
||||
<classifier>jdk16</classifier>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>aspose-slides-21.10-jdk16.jar</groupId>-->
|
||||
<!-- <artifactId>aspose-slides-21.10-jdk16.jar</artifactId>-->
|
||||
<!-- <version>1.0</version>-->
|
||||
<!-- <scope>system</scope>-->
|
||||
<!-- <systemPath>${project.basedir}/libs/aspose-slides-21.10-jdk16.jar</systemPath>-->
|
||||
<!-- </dependency>-->
|
||||
</dependencies>
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>AsposeJavaAPI</id>
|
||||
<name>Aspose Java API</name>
|
||||
<url>https://repository.aspose.com/repo/</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
<build>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<plugins>
|
||||
|
|
|
|||
|
|
@ -288,7 +288,7 @@ public class SuperStatisticsController extends BaseController {
|
|||
if (files != null) {
|
||||
for (MultipartFile item : files) {
|
||||
NoticeVioImgEntity imageEntity = new NoticeVioImgEntity();
|
||||
String imgId = ossUtil.fileUpload(item);
|
||||
// String imgId = ossUtil.fileUpload(item);
|
||||
// imageEntity.setImagePath(imgId);
|
||||
String imgPath = uploadImages(item);
|
||||
imageEntity.setImagePath(imgPath);
|
||||
|
|
|
|||
|
|
@ -1,47 +0,0 @@
|
|||
package com.sercurityControl.proteam.testdata.config;
|
||||
|
||||
import com.sercurityControl.proteam.dutyTask.service.TaskService;
|
||||
import com.sercurityControl.proteam.testdata.service.DataImportDataService;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.expression.spel.ast.NullLiteral;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 站班会进行管理 自动分配定时任务
|
||||
* @author HeiZi
|
||||
*/
|
||||
@Configuration
|
||||
@EnableScheduling
|
||||
public class DataImportDataConfig {
|
||||
|
||||
|
||||
@Resource
|
||||
private DataImportDataService service;
|
||||
// public static String tables="jj_ball@jj_bid_info@jj_bid_project@jj_bidding_project@jj_class_meeting_people@jj_class_meetting@jj_class_metting_info@jj_code@jj_data_code@jj_day_plan@jj_dept_gc_project@jj_gt@jj_on_duty@jj_person@jj_prj_enginnering_experience@jj_project@jj_risk@jj_risk_precaution@jj_single_info@jj_single_project@jj_team@jj_team_info@jj_team_people@jj_ticket@jj_ticket_info@jj_ticket_people@jj_unit@jj_user@jj_weeks_plan@t_device";
|
||||
|
||||
public static String tables="jj_class_meetting@jj_class_meeting_people@jj_class_metting_info@jj_day_plan@jj_dept_gc_project@jj_gt@jj_on_duty@jj_risk@jj_risk_precaution@jj_single_info@jj_single_project@jj_team@jj_team_people@jj_ticket@jj_ticket_info@jj_ticket_people@jj_unit@jj_user@jj_weeks_plan";
|
||||
|
||||
|
||||
public static String tabless="jj_class_meetting@jj_class_metting_info";
|
||||
/**
|
||||
* 全部球机定时更状态
|
||||
*/
|
||||
// @PostConstruct
|
||||
// @Scheduled(cron = "0 0 */8 * * ?")
|
||||
private void getDataInfo() throws InterruptedException {
|
||||
String token= service.login();
|
||||
List<String> table= Arrays.asList(tables.split("@"));
|
||||
for (String ta:table){
|
||||
service.getDataInfo(1,ta, null,token);
|
||||
}
|
||||
// service.getDataInfo(1,"jj_ball","2020-03-17");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1,82 +0,0 @@
|
|||
package com.sercurityControl.proteam.testdata.mapper;
|
||||
|
||||
import com.sercurityControl.proteam.export.vo.*;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author 黑子
|
||||
*/
|
||||
@Repository
|
||||
public interface DataImportDataMapper {
|
||||
|
||||
void addJjBall(@Param("list") List<JjBall> list);
|
||||
|
||||
void addJjBidInfo(@Param("list") List<JjBidInfo> list);
|
||||
|
||||
void addJjBidProject(@Param("list") List<JjBidProject> list);
|
||||
|
||||
void addJjBiddingProject(List<JjBiddingProject> list);
|
||||
|
||||
void addJjClassMeetingPeople(List<JjClassMeetingPeople> list);
|
||||
|
||||
void addJjClassMeetting(List<JjClassMeetting> list);
|
||||
|
||||
void addJjClassMettingInfo(List<JjClassMettingInfo> list);
|
||||
|
||||
void addJjCode(List<JjCode> list);
|
||||
|
||||
void addJjDataCode(List<JjDataCode> list);
|
||||
|
||||
void addJjDayPlan(List<JjDayPlan> list);
|
||||
|
||||
void addJjDeptGcProject(List<JjDeptGcProject> list);
|
||||
|
||||
void addJjGt(List<JjGt> list);
|
||||
|
||||
void addJjInfo(List<JjInfo> list);
|
||||
|
||||
void addJjOnDuty(List<JjOnDuty> list);
|
||||
|
||||
void addJjPerson(List<JjPerson> list);
|
||||
|
||||
void addJjPrjEnginneringExperience(List<JjPrjEnginneringExperience> list);
|
||||
|
||||
void addJjProject(List<JjProject> list);
|
||||
|
||||
void addJjRisk(List<JjRisk> list);
|
||||
|
||||
void addJjRiskPrecaution(List<JjRiskPrecaution> list);
|
||||
|
||||
void addJjSingleInfo(List<JjSingleInfo> list);
|
||||
|
||||
void addJjSingleProject(List<JjSingleProject> list);
|
||||
|
||||
void addJjTeam(List<JjTeam> list);
|
||||
|
||||
void addJjTeamInfo(List<JjTeamInfo> list);
|
||||
|
||||
void addJjTeamPeople(List<JjTeamPeople> list);
|
||||
|
||||
void addJjTicket(List<JjTicket> list);
|
||||
|
||||
void addJjTicketInfo(List<JjTicketInfo> list);
|
||||
|
||||
void addJjTicketPeople(List<JjTicketPeople> list);
|
||||
|
||||
void addJjUnit(List<JjUnit> list);
|
||||
|
||||
void addJjUser(List<JjUser> list);
|
||||
|
||||
void addJjWeeksPlan(List<JjWeeksPlan> list);
|
||||
|
||||
void addTDevice(List<TDevice> list);
|
||||
|
||||
void addJjContract(List<JjContract> list);
|
||||
|
||||
void addJjFile(List<JjFile> list);
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1,512 +0,0 @@
|
|||
package com.sercurityControl.proteam.testdata.service;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.securityControl.common.core.utils.aes.Aes;
|
||||
import com.securityControl.common.core.utils.aes.ListHelper;
|
||||
import com.securityControl.common.core.utils.aes.StringHelper;
|
||||
import com.sercurityControl.proteam.export.vo.*;
|
||||
import com.sercurityControl.proteam.testdata.mapper.DataImportDataMapper;
|
||||
import com.sercurityControl.proteam.util.AesEncryptUtils;
|
||||
import com.sercurityControl.proteam.util.DateTimeHelper;
|
||||
import com.sercurityControl.proteam.util.HttpClient;
|
||||
import com.sercurityControl.proteam.util.HttpHelp;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author 黑子
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class DataImportDataService {
|
||||
public int limit = 100;
|
||||
// public String url="http://127.0.0.1:18083/pot/export/getPageList";
|
||||
public String url = "http://sgwpdm.ah.sgcc.com.cn/basfs/proteam/pot/export/getPageList";
|
||||
// public String url="http://127.0.0.1:18080/proteam/pot/export/getPageList";
|
||||
public String loginUrl = "http://sgwpdm.ah.sgcc.com.cn/basfs/auth/getToken";
|
||||
@Autowired
|
||||
private DataImportDataMapper mapper;
|
||||
|
||||
String ak = "vMd/ALFLZ+0M4XI6V+PYRQ==";
|
||||
String key = "EM9EayiHnHZLXLI40+pKJA==";
|
||||
|
||||
//是否脱敏
|
||||
boolean isTm = true;
|
||||
|
||||
public String login() {
|
||||
System.err.println("开始登录----");
|
||||
try {
|
||||
Map<String, String> map = Maps.newHashMap();
|
||||
map.put("username", ak);
|
||||
map.put("password", key);
|
||||
String json = HttpHelp.doHttpPosts(loginUrl, JSON.toJSONString(map));
|
||||
JSONObject obj = JSON.parseObject(json);
|
||||
JSONObject data = obj.getJSONObject("data");
|
||||
String token = data.getString("access_token");
|
||||
System.err.println("开始登录结束----" + token);
|
||||
return token;
|
||||
} catch (Exception e) {
|
||||
log.error(e.toString(), e);
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
//查询数据
|
||||
public void getDataInfo(int page, String type, String startTime, String token) throws InterruptedException {
|
||||
System.err.println("----开始了----" + type);
|
||||
Map<String, String> map = Maps.newHashMap();
|
||||
map.put("type", type);
|
||||
map.put("page", page + "");
|
||||
map.put("limit", limit + "");
|
||||
String param = "type=" + type + "&page=" + page + "&limit=" + limit + "&token=" + token;
|
||||
if (StringHelper.isNotEmpty(startTime)) {
|
||||
String times = "&createStartTime=" + startTime + "&createEndTime=" + DateTimeHelper.getNowDate();
|
||||
param = param + times;
|
||||
}
|
||||
Thread.sleep(2000);
|
||||
String json = HttpHelp.sendGet(url, param);
|
||||
if (StringHelper.isNotEmpty(json)) {
|
||||
//数据不是空的
|
||||
JSONObject obj = JSON.parseObject(json);
|
||||
String data = obj.getString("data");
|
||||
JSONArray jsonArray = null;
|
||||
if (StringHelper.isNotEmpty(data)) {
|
||||
String datas = Aes.aesDecrypt(data);
|
||||
obj = JSON.parseObject(datas);
|
||||
jsonArray = obj.getJSONArray("data");
|
||||
}
|
||||
if (ObjectUtil.isEmpty(jsonArray)) {
|
||||
System.err.println("无数据");
|
||||
return;
|
||||
}
|
||||
if ("jj_ball".equals(type)) {
|
||||
List<JjBall> list = JSON.parseArray(jsonArray.toJSONString(), JjBall.class);
|
||||
if (ListHelper.isNotEmpty(list)) {
|
||||
if (isTm) {
|
||||
int i = 1;
|
||||
for (JjBall b : list) {
|
||||
i++;
|
||||
b.setCamera_name("布控球名称" + i);
|
||||
}
|
||||
}
|
||||
mapper.addJjBall(list);
|
||||
}
|
||||
} else if ("jj_bid_info".equals(type)) {
|
||||
List<JjBidInfo> list = JSON.parseArray(jsonArray.toJSONString(), JjBidInfo.class);
|
||||
if (ListHelper.isNotEmpty(list)) {
|
||||
if (isTm) {
|
||||
int i = 1;
|
||||
for (JjBidInfo b : list) {
|
||||
i++;
|
||||
b.setBidding_section_name("标段名称" + i);
|
||||
b.setBuild_unit_con_person("建设管理人名" + i);
|
||||
b.setBuild_unit_mobile("156****1631");
|
||||
}
|
||||
}
|
||||
mapper.addJjBidInfo(list);
|
||||
}
|
||||
} else if ("jj_bid_project".equals(type)) {
|
||||
List<JjBidProject> list = JSON.parseArray(jsonArray.toJSONString(), JjBidProject.class);
|
||||
if (ListHelper.isNotEmpty(list)) {
|
||||
if (isTm) {
|
||||
int i = 1;
|
||||
for (JjBidProject b : list) {
|
||||
i++;
|
||||
b.setSingle_name("单项名称" + i);
|
||||
b.setBid_name("标段名称" + i);
|
||||
b.setBuild_unit("建管单位" + i);
|
||||
b.setSg_dw("施工单位" + i);
|
||||
b.setJl_dw("监理单位" + i);
|
||||
b.setJl_phone("156****1631");
|
||||
}
|
||||
}
|
||||
mapper.addJjBidProject(list);
|
||||
}
|
||||
|
||||
} else if ("jj_bidding_project".equals(type)) {
|
||||
List<JjBiddingProject> list = JSON.parseArray(jsonArray.toJSONString(), JjBiddingProject.class);
|
||||
if (ListHelper.isNotEmpty(list)) {
|
||||
if (isTm) {
|
||||
int i = 1;
|
||||
for (JjBiddingProject b : list) {
|
||||
i++;
|
||||
b.setBIDDING_SECTION_NAME("标段名称" + i);
|
||||
}
|
||||
}
|
||||
mapper.addJjBiddingProject(list);
|
||||
}
|
||||
|
||||
} else if ("jj_class_meeting_people".equals(type)) {
|
||||
List<JjClassMeetingPeople> list = JSON.parseArray(jsonArray.toJSONString(), JjClassMeetingPeople.class);
|
||||
if (ListHelper.isNotEmpty(list)) {
|
||||
if (isTm) {
|
||||
int i = 1;
|
||||
for (JjClassMeetingPeople b : list) {
|
||||
i++;
|
||||
b.setReal_name("姓名" + i);
|
||||
b.setId_card("341***********0231");
|
||||
}
|
||||
}
|
||||
mapper.addJjClassMeetingPeople(list);
|
||||
}
|
||||
} else if ("jj_class_meetting".equals(type)) {
|
||||
List<JjClassMeetting> list = JSON.parseArray(jsonArray.toJSONString(), JjClassMeetting.class);
|
||||
if (ListHelper.isNotEmpty(list)) {
|
||||
if (isTm) {
|
||||
int i = 1;
|
||||
for (JjClassMeetting b : list) {
|
||||
i++;
|
||||
b.setBidding_section_name("标段名称" + i);
|
||||
b.setSingle_project_name("单项工程名称" + i);
|
||||
b.setSupervision_unit_name("监理单位名称" + i);
|
||||
b.setSupervision_social_credit_code("监理单位统一社会信用代码" + i);
|
||||
b.setPrj_name("项目名称" + i);
|
||||
b.setConstruction_unit_name("建设单位名称" + i);
|
||||
b.setTool_box_talk_address("站班会地址" + i);
|
||||
}
|
||||
}
|
||||
mapper.addJjClassMeetting(list);
|
||||
}
|
||||
|
||||
} else if ("jj_class_metting_info".equals(type)) {
|
||||
List<JjClassMettingInfo> list = JSON.parseArray(jsonArray.toJSONString(), JjClassMettingInfo.class);
|
||||
if (ListHelper.isNotEmpty(list)) {
|
||||
if (isTm) {
|
||||
int i = 1;
|
||||
for (JjClassMettingInfo b : list) {
|
||||
i++;
|
||||
b.setWork_manage("班组长名称" + i);
|
||||
b.setWork_manage_phone("156****1631");
|
||||
b.setWork_manage_num("341***********0231");
|
||||
b.setTeam_name("班组名称" + i);
|
||||
}
|
||||
}
|
||||
mapper.addJjClassMettingInfo(list);
|
||||
}
|
||||
} else if ("jj_code".equals(type)) {
|
||||
List<JjCode> list = JSON.parseArray(jsonArray.toJSONString(), JjCode.class);
|
||||
if (ListHelper.isNotEmpty(list)) {
|
||||
mapper.addJjCode(list);
|
||||
}
|
||||
} else if ("jj_data_code".equals(type)) {
|
||||
List<JjDataCode> list = JSON.parseArray(jsonArray.toJSONString(), JjDataCode.class);
|
||||
if (ListHelper.isNotEmpty(list)) {
|
||||
mapper.addJjDataCode(list);
|
||||
}
|
||||
} else if ("jj_day_plan".equals(type)) {
|
||||
List<JjDayPlan> list = JSON.parseArray(jsonArray.toJSONString(), JjDayPlan.class);
|
||||
if (ListHelper.isNotEmpty(list)) {
|
||||
if (isTm) {
|
||||
int i = 1;
|
||||
for (JjDayPlan b : list) {
|
||||
i++;
|
||||
b.setSub_section_project_name("分部工程名称" + i);
|
||||
b.setSub_entry_project_name("分项工程名称" + i);
|
||||
b.setBidding_section_name("标段工程名称" + i);
|
||||
}
|
||||
}
|
||||
mapper.addJjDayPlan(list);
|
||||
}
|
||||
} else if ("jj_dept_gc_project".equals(type)) {
|
||||
List<JjDeptGcProject> list = JSON.parseArray(jsonArray.toJSONString(), JjDeptGcProject.class);
|
||||
if (ListHelper.isNotEmpty(list)) {
|
||||
if (isTm) {
|
||||
int i = 1;
|
||||
for (JjDeptGcProject b : list) {
|
||||
i++;
|
||||
b.setContact_telephone("156****1631");
|
||||
b.setFax_no("传真号码" + i);
|
||||
b.setProject_department_name("项目部名称" + i);
|
||||
}
|
||||
}
|
||||
mapper.addJjDeptGcProject(list);
|
||||
}
|
||||
|
||||
} else if ("jj_gt".equals(type)) {
|
||||
List<JjGt> list = JSON.parseArray(jsonArray.toJSONString(), JjGt.class);
|
||||
if (ListHelper.isNotEmpty(list)) {
|
||||
if (isTm) {
|
||||
int i = 1;
|
||||
for (JjGt b : list) {
|
||||
i++;
|
||||
b.setLongitude("经度" + i);
|
||||
b.setLatitude("纬度" + i);
|
||||
}
|
||||
}
|
||||
mapper.addJjGt(list);
|
||||
}
|
||||
} else if ("jj_info".equals(type)) {
|
||||
List<JjInfo> list = JSON.parseArray(jsonArray.toJSONString(), JjInfo.class);
|
||||
if (ListHelper.isNotEmpty(list)) {
|
||||
mapper.addJjInfo(list);
|
||||
}
|
||||
} else if ("jj_on_duty".equals(type)) {
|
||||
List<JjOnDuty> list = JSON.parseArray(jsonArray.toJSONString(), JjOnDuty.class);
|
||||
if (ListHelper.isNotEmpty(list)) {
|
||||
if (isTm) {
|
||||
int i = 1;
|
||||
for (JjOnDuty b : list) {
|
||||
i++;
|
||||
b.setOnduty_longitude("到岗到位经度" + i);
|
||||
b.setOnduty_latitude("到岗到位纬度" + i);
|
||||
b.setReal_name("现场监督人员姓名" + i);
|
||||
b.setUnit_name("现场监督人员单位名" + i);
|
||||
b.setMobile("156****1631");
|
||||
b.setId_card("341***********0231");
|
||||
}
|
||||
}
|
||||
mapper.addJjOnDuty(list);
|
||||
}
|
||||
} else if ("jj_person".equals(type)) {
|
||||
List<JjPerson> list = JSON.parseArray(jsonArray.toJSONString(), JjPerson.class);
|
||||
if (ListHelper.isNotEmpty(list)) {
|
||||
if (isTm) {
|
||||
int i = 1;
|
||||
for (JjPerson b : list) {
|
||||
i++;
|
||||
b.setName("名称" + i);
|
||||
b.setBak_ic("身份证号" + i);
|
||||
b.setSingle_no("所属单项工程(工程名称)" + i);
|
||||
b.setPhone("156****1631");
|
||||
b.setTeam_name("班组名称" + i);
|
||||
b.setIc_card("341***********0231");
|
||||
}
|
||||
}
|
||||
mapper.addJjPerson(list);
|
||||
}
|
||||
|
||||
|
||||
} else if ("jj_prj_enginnering_experience".equals(type)) {
|
||||
List<JjPrjEnginneringExperience> list = JSON.parseArray(jsonArray.toJSONString(), JjPrjEnginneringExperience.class);
|
||||
if (ListHelper.isNotEmpty(list)) {
|
||||
mapper.addJjPrjEnginneringExperience(list);
|
||||
}
|
||||
} else if ("jj_project".equals(type)) {
|
||||
List<JjProject> list = JSON.parseArray(jsonArray.toJSONString(), JjProject.class);
|
||||
if (ListHelper.isNotEmpty(list)) {
|
||||
if (isTm) {
|
||||
int i = 1;
|
||||
for (JjProject b : list) {
|
||||
i++;
|
||||
b.setConstr_address("详细地址" + i);
|
||||
}
|
||||
}
|
||||
mapper.addJjProject(list);
|
||||
}
|
||||
} else if ("jj_risk".equals(type)) {
|
||||
List<JjRisk> list = JSON.parseArray(jsonArray.toJSONString(), JjRisk.class);
|
||||
if (ListHelper.isNotEmpty(list)) {
|
||||
mapper.addJjRisk(list);
|
||||
}
|
||||
} else if ("jj_risk_precaution".equals(type)) {
|
||||
List<JjRiskPrecaution> list = JSON.parseArray(jsonArray.toJSONString(), JjRiskPrecaution.class);
|
||||
if (ListHelper.isNotEmpty(list)) {
|
||||
mapper.addJjRiskPrecaution(list);
|
||||
}
|
||||
} else if ("jj_single_info".equals(type)) {
|
||||
List<JjSingleInfo> list = JSON.parseArray(jsonArray.toJSONString(), JjSingleInfo.class);
|
||||
if (ListHelper.isNotEmpty(list)) {
|
||||
if (isTm) {
|
||||
int i = 1;
|
||||
for (JjSingleInfo b : list) {
|
||||
i++;
|
||||
b.setSingle_project_name("单项工程名称" + i);
|
||||
b.setPrj_local("工程地点" + i);
|
||||
b.setBuild_unit_con_person("建设管理人名" + i);
|
||||
b.setBuild_unit_mobile("156****1621");
|
||||
b.setPrj_name("项目名称" + i);
|
||||
}
|
||||
}
|
||||
mapper.addJjSingleInfo(list);
|
||||
}
|
||||
} else if ("jj_single_project".equals(type)) {
|
||||
List<JjSingleProject> list = JSON.parseArray(jsonArray.toJSONString(), JjSingleProject.class);
|
||||
if (ListHelper.isNotEmpty(list)) {
|
||||
if (isTm) {
|
||||
int i = 1;
|
||||
for (JjSingleProject b : list) {
|
||||
i++;
|
||||
b.setSingle_project_name("单项工程名称" + i);
|
||||
b.setSgtssver_cost_file_name("造价文件名称" + i);
|
||||
b.setBUILD_UNIT_NAME("建设管理单位名称" + i);
|
||||
b.setSgtpfver_auxiliary_facilities_cost("辅助设施工程" + i);
|
||||
b.setSgtpfver_cost_file_name("造价文件名称" + i);
|
||||
}
|
||||
}
|
||||
mapper.addJjSingleProject(list);
|
||||
}
|
||||
|
||||
} else if ("jj_team".equals(type)) {
|
||||
List<JjTeam> list = JSON.parseArray(jsonArray.toJSONString(), JjTeam.class);
|
||||
if (ListHelper.isNotEmpty(list)) {
|
||||
if (isTm) {
|
||||
int i = 1;
|
||||
for (JjTeam b : list) {
|
||||
i++;
|
||||
b.setWorking_team_name("作业班组名称" + i);
|
||||
}
|
||||
}
|
||||
mapper.addJjTeam(list);
|
||||
}
|
||||
} else if ("jj_team_info".equals(type)) {
|
||||
List<JjTeamInfo> list = JSON.parseArray(jsonArray.toJSONString(), JjTeamInfo.class);
|
||||
if (ListHelper.isNotEmpty(list)) {
|
||||
if (isTm) {
|
||||
int i = 1;
|
||||
for (JjTeamInfo b : list) {
|
||||
i++;
|
||||
b.setImport_team("重点关注班组" + i);
|
||||
}
|
||||
}
|
||||
mapper.addJjTeamInfo(list);
|
||||
}
|
||||
} else if ("jj_team_people".equals(type)) {
|
||||
List<JjTeamPeople> list = JSON.parseArray(jsonArray.toJSONString(), JjTeamPeople.class);
|
||||
if (ListHelper.isNotEmpty(list)) {
|
||||
if (isTm) {
|
||||
int i = 1;
|
||||
for (JjTeamPeople b : list) {
|
||||
i++;
|
||||
b.setReal_name("姓名" + i);
|
||||
b.setId_card("341***********0231");
|
||||
}
|
||||
}
|
||||
mapper.addJjTeamPeople(list);
|
||||
}
|
||||
} else if ("jj_ticket".equals(type)) {
|
||||
List<JjTicket> list = JSON.parseArray(jsonArray.toJSONString(), JjTicket.class);
|
||||
if (ListHelper.isNotEmpty(list)) {
|
||||
if (isTm) {
|
||||
int i = 1;
|
||||
for (JjTicket b : list) {
|
||||
i++;
|
||||
b.setTicket_name("作业票名称" + i);
|
||||
b.setWorking_team_name("作业班组名称" + i);
|
||||
b.setSingle_project_name("单项工程名称" + i);
|
||||
b.setBidding_section_name("标段名称" + i);
|
||||
}
|
||||
}
|
||||
mapper.addJjTicket(list);
|
||||
}
|
||||
} else if ("jj_ticket_info".equals(type)) {
|
||||
List<JjTicketInfo> list = JSON.parseArray(jsonArray.toJSONString(), JjTicketInfo.class);
|
||||
if (ListHelper.isNotEmpty(list)) {
|
||||
mapper.addJjTicketInfo(list);
|
||||
}
|
||||
} else if ("jj_ticket_people".equals(type)) {
|
||||
List<JjTicketPeople> list = JSON.parseArray(jsonArray.toJSONString(), JjTicketPeople.class);
|
||||
if (ListHelper.isNotEmpty(list)) {
|
||||
if (isTm) {
|
||||
int i = 1;
|
||||
for (JjTicketPeople b : list) {
|
||||
i++;
|
||||
b.setReal_name("姓名" + i);
|
||||
b.setId_card("341***********0231");
|
||||
b.setMobile("156****1631");
|
||||
}
|
||||
}
|
||||
mapper.addJjTicketPeople(list);
|
||||
}
|
||||
} else if ("jj_unit".equals(type)) {
|
||||
List<JjUnit> list = JSON.parseArray(jsonArray.toJSONString(), JjUnit.class);
|
||||
if (ListHelper.isNotEmpty(list)) {
|
||||
if (isTm) {
|
||||
int i = 1;
|
||||
for (JjUnit b : list) {
|
||||
i++;
|
||||
b.setAddress("单位地址" + i);
|
||||
b.setWebsite("http://www.baidu.com");
|
||||
b.setContact_phone("156****1631");
|
||||
b.setLegal_repr_mobile("156****1631");
|
||||
b.setLegal_id_card("341***********0231");
|
||||
b.setUnit_name("单位全称" + i);
|
||||
b.setUnit_abbr_name("单位简称" + i);
|
||||
b.setUnified_social_credit_id("统一社会信用代码" + i);
|
||||
b.setLegal_repr("法定代表人" + i);
|
||||
}
|
||||
}
|
||||
mapper.addJjUnit(list);
|
||||
}
|
||||
} else if ("jj_user".equals(type)) {
|
||||
List<JjUser> list = JSON.parseArray(jsonArray.toJSONString(), JjUser.class);
|
||||
if (ListHelper.isNotEmpty(list)) {
|
||||
if (isTm) {
|
||||
int i = 1;
|
||||
for (JjUser b : list) {
|
||||
i++;
|
||||
b.setReal_name("姓名" + i);
|
||||
b.setDept_name("部门名称" + i);
|
||||
b.setId_card("341***********0231");
|
||||
b.setMobile("156****1631");
|
||||
}
|
||||
}
|
||||
mapper.addJjUser(list);
|
||||
}
|
||||
} else if ("jj_weeks_plan".equals(type)) {
|
||||
List<JjWeeksPlan> list = JSON.parseArray(jsonArray.toJSONString(), JjWeeksPlan.class);
|
||||
if (ListHelper.isNotEmpty(list)) {
|
||||
if (isTm) {
|
||||
int i = 1;
|
||||
for (JjWeeksPlan b : list) {
|
||||
i++;
|
||||
b.setBidding_section_name("标段工程名称" + i);
|
||||
}
|
||||
}
|
||||
mapper.addJjWeeksPlan(list);
|
||||
}
|
||||
} else if ("t_device".equals(type)) {
|
||||
List<TDevice> list = JSON.parseArray(jsonArray.toJSONString(), TDevice.class);
|
||||
if (ListHelper.isNotEmpty(list)) {
|
||||
if (isTm) {
|
||||
int i = 1;
|
||||
for (TDevice b : list) {
|
||||
i++;
|
||||
b.setDevice_name("设备名称" + i);
|
||||
b.setSs_dw("所属单位" + i);
|
||||
b.setT_name("统一视频名称" + i);
|
||||
}
|
||||
}
|
||||
mapper.addTDevice(list);
|
||||
}
|
||||
} else if ("jj_contract".equals(type)) {
|
||||
List<JjContract> list = JSON.parseArray(jsonArray.toJSONString(), JjContract.class);
|
||||
if (ListHelper.isNotEmpty(list)) {
|
||||
if (isTm) {
|
||||
int i = 1;
|
||||
for (JjContract b : list) {
|
||||
i++;
|
||||
b.setContract_name("合同名称" + i);
|
||||
b.setCompany_name("中标单位名称" + i);
|
||||
b.setBidpkg_name("标包名称" + i);
|
||||
b.setTendering_batch_name("招标批次名称" + i);
|
||||
}
|
||||
}
|
||||
mapper.addJjContract(list);
|
||||
}
|
||||
} else if ("jj_file".equals(type)) {
|
||||
List<JjFile> list = JSON.parseArray(jsonArray.toJSONString(), JjFile.class);
|
||||
if (ListHelper.isNotEmpty(list)) {
|
||||
mapper.addJjFile(list);
|
||||
}
|
||||
}
|
||||
|
||||
String pages = obj.getString("pages");
|
||||
int pa = Integer.parseInt(pages);
|
||||
if (page < pa) {
|
||||
page++;
|
||||
getDataInfo(page, type, startTime, token);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.sercurityControl.proteam;
|
||||
package com.sercurityControl.proteam.util;
|
||||
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
package com.sercurityControl.proteam.util;
|
||||
|
||||
import com.aliyun.oss.OSS;
|
||||
import com.aliyun.oss .OSS;
|
||||
import com.aliyun.oss.OSSClientBuilder;
|
||||
import com.aliyun.oss.model.OSSObject;
|
||||
import com.securityControl.common.core.utils.StringUtils;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# Tomcat
|
||||
server:
|
||||
port: 18083
|
||||
port: 38083
|
||||
# Spring
|
||||
spring:
|
||||
jpa:
|
||||
|
|
@ -18,40 +18,21 @@ spring:
|
|||
cloud:
|
||||
nacos:
|
||||
username: nacos
|
||||
password: Jjsp@nacos2023
|
||||
password: nacos
|
||||
# password: nacos
|
||||
discovery:
|
||||
# server-addr: 192.168.0.14:8848
|
||||
# 服务注册地址
|
||||
server-addr: 10.138.132.188:18848
|
||||
# server-addr: 127.0.0.1:18848
|
||||
# namespace: JJSP
|
||||
server-addr: 192.168.0.14:8848
|
||||
namespace: gs-jjsp
|
||||
config:
|
||||
# server-addr: 192.168.0.14:8848
|
||||
# namespace: JJSP
|
||||
# server-addr: 127.0.0.1:18848
|
||||
#namespace: JJSP
|
||||
# server-addr: 127.0.0.1:18848
|
||||
# server-addr: 10.145.34.32:18848
|
||||
server-addr: 10.138.132.188:18848
|
||||
server-addr: 192.168.0.14:8848
|
||||
namespace: gs-jjsp
|
||||
# 配置中心地址
|
||||
# server-addr: 27.196.164.56:8848
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
shared-configs:
|
||||
- vsc-dev.yml
|
||||
#mq
|
||||
# stream:
|
||||
# bindings:
|
||||
# UVPDEVICE_DEVICEBATTERY_CHANGED:
|
||||
# destination: UVPDEVICE_DEVICESTATUS_CHANGED
|
||||
# content-type: application/json
|
||||
# group: GID-PI6000-2
|
||||
# default-binder: rocketmq
|
||||
# rocketmq:
|
||||
# binder:
|
||||
# name-server: 10.138.225.113:9876
|
||||
|
||||
|
||||
#文件路径
|
||||
file:
|
||||
upload_path: /data/ahsbs/file
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -114,21 +114,17 @@
|
|||
<artifactId>logstash-logback-encoder</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.jasypt</groupId>
|
||||
<artifactId>jasypt</artifactId>
|
||||
<version>1.9.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.ulisesbocchio</groupId>
|
||||
<artifactId>jasypt-spring-boot-starter</artifactId>
|
||||
<version>3.0.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>jasypt-1.9.3</groupId>
|
||||
<artifactId>jasypt-1.9.3</artifactId>
|
||||
<version>1.0</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${project.basedir}/libs/jasypt-1.9.3.jar</systemPath>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jasypt-spring-boot-3.0.2</groupId>
|
||||
<artifactId>jasypt-spring-boot-3.0.2</artifactId>
|
||||
<version>1.0</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${project.basedir}/libs/jasypt-spring-boot-3.0.2.jar</systemPath>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# Tomcat
|
||||
server:
|
||||
port: 18084
|
||||
port: 38084
|
||||
management:
|
||||
server:
|
||||
port: -1
|
||||
|
|
@ -19,24 +19,13 @@ spring:
|
|||
cloud:
|
||||
nacos:
|
||||
username: nacos
|
||||
password: Jjsp@nacos2023
|
||||
# password: nacos
|
||||
password: nacos
|
||||
discovery:
|
||||
server-addr: 10.138.132.188:18848
|
||||
# server-addr: 127.0.0.1:18848
|
||||
# server-addr: 10.145.34.32:18848
|
||||
# server-addr: 127.0.0.1:8848
|
||||
# namespace: JJSP
|
||||
# 服务注册地址
|
||||
# server-addr: 10.145.34.32:8848
|
||||
server-addr: 192.168.0.14:8848
|
||||
namespace: gs-jjsp
|
||||
config:
|
||||
# server-addr: 127.0.0.1:18848
|
||||
# server-addr: 10.145.34.32:18848
|
||||
server-addr: 10.138.132.188:18848
|
||||
# server-addr: 127.0.0.1:8848
|
||||
# namespace: JJSP
|
||||
# 配置中心地址
|
||||
# server-addr: 27.196.164.56:8848
|
||||
server-addr: 192.168.0.14:8848
|
||||
namespace: gs-jjsp
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -98,13 +98,6 @@
|
|||
<version>1.6.1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>jasypt-1.9.3</groupId>
|
||||
<artifactId>jasypt-1.9.3</artifactId>
|
||||
<version>1.0</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${project.basedir}/libs/jasypt-1.9.3.jar</systemPath>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>sgjdbc_20230302.jar</groupId>
|
||||
<artifactId>sgjdbc_20230302.jar</artifactId>
|
||||
|
|
@ -112,13 +105,18 @@
|
|||
<scope>system</scope>
|
||||
<systemPath>${project.basedir}/libs/sgjdbc-20250604.6638.jar</systemPath>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>jasypt-spring-boot-3.0.2</groupId>
|
||||
<artifactId>jasypt-spring-boot-3.0.2</artifactId>
|
||||
<version>1.0</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${project.basedir}/libs/jasypt-spring-boot-3.0.2.jar</systemPath>
|
||||
<groupId>org.jasypt</groupId>
|
||||
<artifactId>jasypt</artifactId>
|
||||
<version>1.9.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.ulisesbocchio</groupId>
|
||||
<artifactId>jasypt-spring-boot-starter</artifactId>
|
||||
<version>3.0.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>commons-httpclient</groupId>
|
||||
<artifactId>commons-httpclient</artifactId>
|
||||
|
|
@ -129,13 +127,14 @@
|
|||
<groupId>com.squareup.okhttp3</groupId>
|
||||
<artifactId>okhttp</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>aliyun-sdk-oss-3.10.2</groupId>
|
||||
<artifactId>aliyun-sdk-oss-3.10.2</artifactId>
|
||||
<version>1.0</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${project.basedir}/libs/aliyun-sdk-oss-3.10.2.jar</systemPath>
|
||||
</dependency>
|
||||
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>aliyun-sdk-oss-3.10.2</groupId>-->
|
||||
<!-- <artifactId>aliyun-sdk-oss-3.10.2</artifactId>-->
|
||||
<!-- <version>1.0</version>-->
|
||||
<!-- <scope>system</scope>-->
|
||||
<!-- <systemPath>${project.basedir}/libs/aliyun-sdk-oss-3.10.2.jar</systemPath>-->
|
||||
<!-- </dependency>-->
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
|
|
|||
|
|
@ -1,36 +0,0 @@
|
|||
package com.securityControl.task.schedule;
|
||||
|
||||
import com.securityControl.common.core.utils.aes.DateTimeHelper;
|
||||
import com.securityControl.task.service.TaskService;
|
||||
import com.securityControl.task.service.ThirdVideoService;
|
||||
import com.securityControl.task.service.impl.CatchPictureService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.quartz.Job;
|
||||
import org.quartz.JobExecutionContext;
|
||||
import org.quartz.JobExecutionException;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Slf4j
|
||||
//@Component
|
||||
//@EnableScheduling
|
||||
public class ScheduledCatchPicture implements Job {
|
||||
|
||||
@Autowired
|
||||
private TaskService taskService;
|
||||
|
||||
@Autowired
|
||||
private CatchPictureService catchPictureService;
|
||||
|
||||
@Override
|
||||
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
|
||||
try {
|
||||
log.info("开始单次抓图>>>");
|
||||
taskService.updateTask("video_catch", "1", DateTimeHelper.getNowTime());
|
||||
log.info("结束单次抓图>>>");
|
||||
} catch (Exception e) {
|
||||
log.error(e.toString(), e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
package com.securityControl.task.schedule;
|
||||
|
||||
import com.securityControl.common.core.utils.aes.DateTimeHelper;
|
||||
import com.securityControl.task.service.TaskService;
|
||||
import com.securityControl.task.service.ThirdVideoService;
|
||||
import com.securityControl.task.service.impl.CatchPictureService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.quartz.Job;
|
||||
import org.quartz.JobExecutionContext;
|
||||
import org.quartz.JobExecutionException;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Slf4j
|
||||
//@Component
|
||||
//@EnableScheduling
|
||||
public class ScheduledDownloadPicture implements Job {
|
||||
|
||||
@Autowired
|
||||
private TaskService taskService;
|
||||
|
||||
@Autowired
|
||||
private CatchPictureService catchPictureService;
|
||||
|
||||
@Override
|
||||
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
|
||||
try {
|
||||
log.info("开始下载图片并交给人工智能平台处理>>>");
|
||||
taskService.updateTask("video_download", "1", DateTimeHelper.getNowTime());
|
||||
log.info("结束下载图片并交给人工智能平台处理>>>");
|
||||
} catch (Exception e) {
|
||||
log.error(e.toString(), e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,51 +0,0 @@
|
|||
package com.securityControl.task.schedule.task;
|
||||
|
||||
import com.securityControl.task.service.impl.CatchPictureService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.scheduling.Trigger;
|
||||
import org.springframework.scheduling.TriggerContext;
|
||||
import org.springframework.scheduling.annotation.SchedulingConfigurer;
|
||||
import org.springframework.scheduling.config.ScheduledTaskRegistrar;
|
||||
import org.springframework.scheduling.support.CronTrigger;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
|
||||
@Slf4j
|
||||
//@Component
|
||||
public class CatchPictureTask implements SchedulingConfigurer {
|
||||
|
||||
@Value("${jobs.cron.catchPicture}")
|
||||
private String cron;
|
||||
|
||||
@Autowired
|
||||
private CatchPictureService catchPictureService;
|
||||
|
||||
@Override
|
||||
public void configureTasks(ScheduledTaskRegistrar taskRegistrar) {
|
||||
|
||||
// 动态使用cron表达式设置循环间隔
|
||||
taskRegistrar.addTriggerTask(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
log.info("catch picture Current time: {}", LocalDateTime.now());
|
||||
|
||||
log.info("catch picture End time: {}", LocalDateTime.now());
|
||||
}
|
||||
}, new Trigger() {
|
||||
@Override
|
||||
public Date nextExecutionTime(@NotNull TriggerContext triggerContext) {
|
||||
// 使用CronTrigger触发器,可动态修改cron表达式来操作循环规则
|
||||
CronTrigger cronTrigger = new CronTrigger(cron);
|
||||
return cronTrigger.nextExecutionTime(triggerContext);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -1,50 +0,0 @@
|
|||
package com.securityControl.task.schedule.task;
|
||||
|
||||
import com.securityControl.task.service.impl.CatchPictureService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.scheduling.Trigger;
|
||||
import org.springframework.scheduling.TriggerContext;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
import org.springframework.scheduling.annotation.SchedulingConfigurer;
|
||||
import org.springframework.scheduling.config.ScheduledTaskRegistrar;
|
||||
import org.springframework.scheduling.support.CronTrigger;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
|
||||
@Slf4j
|
||||
//@Component
|
||||
//@EnableScheduling
|
||||
public class DownloadPictureTask implements SchedulingConfigurer {
|
||||
|
||||
@Value("${jobs.cron.downloadPicture}")
|
||||
private String cron;
|
||||
|
||||
@Autowired
|
||||
private CatchPictureService catchPictureService;
|
||||
|
||||
@Override
|
||||
public void configureTasks(ScheduledTaskRegistrar taskRegistrar) {
|
||||
|
||||
// 动态使用cron表达式设置循环间隔
|
||||
taskRegistrar.addTriggerTask(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
log.info("=======DownloadPicture Current time: {}", LocalDateTime.now());
|
||||
|
||||
log.info("=======DownloadPicture End time: {}", LocalDateTime.now());
|
||||
}
|
||||
}, new Trigger() {
|
||||
@Override
|
||||
public Date nextExecutionTime(@NotNull TriggerContext triggerContext) {
|
||||
// 使用CronTrigger触发器,可动态修改cron表达式来操作循环规则
|
||||
CronTrigger cronTrigger = new CronTrigger(cron);
|
||||
return cronTrigger.nextExecutionTime(triggerContext);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
package com.securityControl.task.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.http.HttpResponse;
|
||||
import cn.hutool.http.HttpUtil;
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.securityControl.common.core.constant.CacheConstants;
|
||||
import com.securityControl.common.core.utils.DateUtils;
|
||||
import com.securityControl.common.redis.service.RedisService;
|
||||
import com.securityControl.task.domain.vo.DeviceClassMeetingVo;
|
||||
import com.securityControl.task.domain.vo.DeviceVo;
|
||||
import com.securityControl.task.domain.vo.TImageLibraryVo;
|
||||
import com.securityControl.task.mapper.DeviceDao;
|
||||
import com.securityControl.task.util.OssUtils;
|
||||
import com.securityControl.task.util.StreamUtils;
|
||||
import com.securityControl.task.util.video.QxVideotape;
|
||||
import lombok.Data;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Slf4j
|
||||
@Service
|
||||
public class CatchPictureService {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1,95 +0,0 @@
|
|||
package com.securityControl.task.util;
|
||||
|
||||
import com.aliyun.oss.OSS;
|
||||
import com.aliyun.oss.OSSClientBuilder;
|
||||
import com.aliyun.oss.model.OSSObject;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
@Component
|
||||
public class OssUtils {
|
||||
@Value("${oss.endpoint}")
|
||||
private String endpoint;
|
||||
|
||||
@Value("${oss.accessKeyId}")
|
||||
private String accessKeyId;
|
||||
|
||||
@Value("${oss.accessKeySecret}")
|
||||
private String accessKeySecret;
|
||||
|
||||
@Value("${oss.bucketName}")
|
||||
private String bucketName;
|
||||
|
||||
|
||||
private static byte[] lock = new byte[0];
|
||||
|
||||
// 位数,默认是8位
|
||||
private final static long w = 100000000;
|
||||
|
||||
public static String createID() {
|
||||
long r = 0;
|
||||
synchronized (lock) {
|
||||
r = (long) ((Math.random() + 1) * w);
|
||||
}
|
||||
|
||||
return System.currentTimeMillis() + String.valueOf(r).substring(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* 上传图片
|
||||
*
|
||||
* @param inputStream
|
||||
* @return
|
||||
*/
|
||||
public String fileUpload(InputStream inputStream) {
|
||||
OSS ossClient = new OSSClientBuilder().build(endpoint, accessKeyId, accessKeySecret);
|
||||
String objectName = createID();
|
||||
try {
|
||||
ossClient.putObject(bucketName, objectName, inputStream);
|
||||
return objectName;
|
||||
} catch (Exception e) {
|
||||
System.err.println("文件上传失败");
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
} finally {
|
||||
ossClient.shutdown();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 下载图片
|
||||
*
|
||||
* @param objectName
|
||||
* @return
|
||||
*/
|
||||
public byte[] getFile(String objectName) {
|
||||
OSS ossClient = new OSSClientBuilder().build(endpoint, accessKeyId, accessKeySecret);
|
||||
byte[] bytes = null;
|
||||
InputStream inputStream = null;
|
||||
try {
|
||||
OSSObject ossObject = ossClient.getObject(bucketName, objectName);
|
||||
inputStream = ossObject.getObjectContent();
|
||||
bytes = IOUtils.toByteArray(inputStream);
|
||||
} catch (Exception e) {
|
||||
System.out.println("下载文件失败!");
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
} finally {
|
||||
ossClient.shutdown();
|
||||
if (!ObjectUtils.isEmpty(inputStream)) {
|
||||
try {
|
||||
inputStream.close();
|
||||
} catch (IOException e) {
|
||||
System.out.println("关闭流失败!");
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
return bytes;
|
||||
}
|
||||
}
|
||||
|
|
@ -18,22 +18,13 @@ spring:
|
|||
cloud:
|
||||
nacos:
|
||||
username: nacos
|
||||
password: Jjsp@nacos2023
|
||||
password: nacos
|
||||
discovery:
|
||||
# server-addr: 127.0.0.1:18848
|
||||
# server-addr: 10.145.34.32:18848
|
||||
server-addr: 10.138.132.187:18848
|
||||
# server-addr: 10.145.34.32:8848
|
||||
server-addr: 192.168.0.14:8848
|
||||
namespace: gs-jjsp
|
||||
config:
|
||||
# server-addr: 127.0.0.1:18848
|
||||
# server-addr: 127.0.0.1:18848
|
||||
# server-addr: 127.0.0.1:8848
|
||||
# server-addr: 10.145.34.32:18848
|
||||
server-addr: 10.138.132.187:18848
|
||||
# 配置中心地址
|
||||
# server-addr: 27.196.164.56:8848
|
||||
# server-addr: 127.0.0.1:8848
|
||||
# server-addr: 10.145.34.32:8848
|
||||
server-addr: 192.168.0.14:8848
|
||||
namespace: gs-jjsp
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
|
|
@ -46,7 +37,6 @@ video:
|
|||
name: bns4
|
||||
key: Bns@2023**
|
||||
url: http://10.138.219.3:29605/icvs/
|
||||
# url: http://220.248.250.31:29605/icvs/
|
||||
epid: system
|
||||
bfix: 1
|
||||
|
||||
|
|
@ -78,13 +68,7 @@ webDev:
|
|||
webPassword: 4acfc6a7ec0745bcdb794dc2026b918d
|
||||
url: http://10.138.219.3:29580/nmc
|
||||
|
||||
#oss配置
|
||||
oss:
|
||||
# endpoint: http://oss-ah-2-a.ops.sgmc.sgcc.com.cn/
|
||||
endpoint: https://10.138.109.50:18843/
|
||||
accessKeyId: iB7VN6px0yETnFgq
|
||||
accessKeySecret: LQgRWvo6jRrqB3Bs0Qjia5Z14oStPu
|
||||
bucketName: jjspaqzlgkah2oss-upload-production
|
||||
|
||||
|
||||
jobs:
|
||||
cron:
|
||||
|
|
|
|||
Loading…
Reference in New Issue