| | |
| | | <tobato.version>1.27.2</tobato.version> |
| | | <kaptcha.version>2.3.3</kaptcha.version> |
| | | <pagehelper.boot.version>2.0.0</pagehelper.boot.version> |
| | | <druid.version>1.2.23</druid.version> |
| | | <!-- <druid.version>1.2.23</druid.version>--> |
| | | <dynamic-ds.version>4.3.1</dynamic-ds.version> |
| | | <commons.io.version>2.19.0</commons.io.version> |
| | | <velocity.version>2.3</velocity.version> |
| | |
| | | <groupId>org.apache.tomcat.embed</groupId> |
| | | <artifactId>tomcat-embed-websocket</artifactId> |
| | | <version>${tomcat.version}</version> |
| | | </dependency> |
| | | |
| | | <!-- Springdoc webmvc ä¾èµé
ç½® --> |
| | | <dependency> |
| | | <groupId>org.springdoc</groupId> |
| | | <artifactId>springdoc-openapi-ui</artifactId> |
| | | <version>${springdoc.version}</version> |
| | | </dependency> |
| | | |
| | | <!-- pagehelper å页æä»¶ --> |
| | |
| | | <artifactId>spring-boot-starter-data-redis</artifactId> |
| | | </dependency> |
| | | |
| | | <!-- SpringDoc webmvc --> |
| | | <dependency> |
| | | <groupId>org.springdoc</groupId> |
| | | <artifactId>springdoc-openapi-ui</artifactId> |
| | | </dependency> |
| | | </dependencies> |
| | | |
| | | </project> |
| | |
| | | com.terra.common.utils.SpringUtils |
| | | com.terra.common.service.RedisService |
| | | com.terra.common.configure.RedisConfig |
| | | com.terra.common.configure.SpringDocAutoConfiguration |
| | | com.terra.common.configure.RedisConfig |
| | |
| | | <artifactId>sentinel-datasource-nacos</artifactId> |
| | | </dependency> |
| | | |
| | | <!-- SpringBoot Actuator --> |
| | | <dependency> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-starter-actuator</artifactId> |
| | | </dependency> |
| | | |
| | | <!-- SpringCloud Loadbalancer --> |
| | | <dependency> |
| | | <groupId>org.springframework.cloud</groupId> |
| | | <artifactId>spring-cloud-loadbalancer</artifactId> |
| | | </dependency> |
| | | |
| | | <!-- Springdoc --> |
| | | <dependency> |
| | | <groupId>org.springdoc</groupId> |
| | | <artifactId>springdoc-openapi-webflux-ui</artifactId> |
| | | <version>${springdoc.version}</version> |
| | | </dependency> |
| | | |
| | | <!-- se-common --> |
| | |
| | | <groupId>com.alibaba.cloud</groupId> |
| | | <artifactId>spring-cloud-starter-alibaba-sentinel</artifactId> |
| | | </dependency> |
| | | |
| | | <!-- SpringBoot Actuator --> |
| | | <dependency> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-starter-actuator</artifactId> |
| | | </dependency> |
| | | |
| | | |
| | | |
| | |
| | | <dependency> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-starter-web</artifactId> |
| | | </dependency> |
| | | |
| | | <!--thymeleaf--> |
| | | <dependency> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-starter-thymeleaf</artifactId> |
| | | <!-- <version>2.2.2.RELEASE</version>--> |
| | | </dependency> |
| | | |
| | | <!--lombok--> |
| | |
| | | <artifactId>springfox-swagger-ui</artifactId> |
| | | <version>2.9.2</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.google.guava</groupId> |
| | | <artifactId>guava</artifactId> |
| | | <version>27.0-jre</version> |
| | | </dependency> |
| | | |
| | | <!--httpclient--> |
| | | <dependency> |
| | |
| | | <dependency> |
| | | <groupId>com.github.oshi</groupId> |
| | | <artifactId>oshi-core</artifactId> |
| | | <version>4.4.2</version> |
| | | <version>6.8.0</version> |
| | | </dependency> |
| | | |
| | | <!--hutool--> |
| | | <dependency> |
| | | <groupId>cn.hutool</groupId> |
| | | <artifactId>hutool-all</artifactId> |
| | | <version>5.7.20</version> |
| | | </dependency> |
| | | |
| | | <!--commons-fileupload--> |
| | |
| | | <version>1.19.0</version> |
| | | </dependency> |
| | | |
| | | <!-- se-common --> |
| | | <!--dependency> |
| | | <groupId>com.terra</groupId> |
| | | <artifactId>se-common</artifactId> |
| | | <version>1.0.2</version> |
| | | <scope>compile</scope> |
| | | </dependency--> |
| | | |
| | | </dependencies> |
| | | |
| | | <build> |
| | |
| | | |
| | | import org.springframework.boot.SpringApplication; |
| | | import org.springframework.boot.autoconfigure.SpringBootApplication; |
| | | import org.springframework.context.annotation.EnableAspectJAutoProxy; |
| | | import org.springframework.scheduling.annotation.EnableAsync; |
| | | import springfox.documentation.swagger2.annotations.EnableSwagger2; |
| | | |
| | | /** |
| | |
| | | * |
| | | * @author admin |
| | | */ |
| | | @EnableAsync |
| | | @EnableSwagger2 |
| | | @EnableAspectJAutoProxy(exposeProxy = true) |
| | | @SpringBootApplication(scanBasePackages = {"com.terra.system.*"}) |
| | | public class SeSystemApplication |
| | | { |
| | |
| | | argsService.initSettingData(); |
| | | |
| | | log.info("***************** ç³»ç»å¯å¨å®æ¯ *****************" + "\n"); |
| | | log.info("APIææ¡£ï¼http://localhost:" + serverPort + contextPath + "/swagger-ui.html"); |
| | | log.info("APIææ¡£ï¼http://localhost:" + serverPort + "/swagger-ui.html"); |
| | | |
| | | String autoQuery = env.getProperty("sys.autoQuery"); |
| | | if (StaticData.S1.equals(autoQuery)) { |
| | |
| | | @Value("${sys.path.temp}") |
| | | private String tempPath; |
| | | |
| | | // @Value("${spring.datasource.druid.stat-view-servlet.login-username}") |
| | | @Value("${spring.datasource.druid.stat-view-servlet.login-username}") |
| | | private String druidUser; |
| | | |
| | | // @Value("${spring.datasource.druid.stat-view-servlet.login-password}") |
| | | @Value("${spring.datasource.druid.stat-view-servlet.login-password}") |
| | | private String druidPwd; |
| | | |
| | | @Value("${sys.tile_path}") |
| | |
| | | log.error(ex.getMessage(), ex); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 忥éä»¶ |
| | | */ |
| | | @Scheduled(fixedRate = 30 * 1000) |
| | | public void syncAttaches() { |
| | | try { |
| | | List<FmeLogEntity> list = attachService.selectFmeLogs(); |
| | | if (isBusy || null == list || list.isEmpty()) { |
| | | return; |
| | | } |
| | | |
| | | isBusy = true; |
| | | for (FmeLogEntity entity : list) { |
| | | attachService.syncAttaches(entity); |
| | | attachService.updateFmeLog(entity.getId()); |
| | | } |
| | | isBusy = false; |
| | | } catch (Exception ex) { |
| | | isBusy = false; |
| | | log.error(ex.getMessage(), ex); |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | import org.springframework.core.env.Environment; |
| | | import springfox.documentation.builders.ApiInfoBuilder; |
| | | import springfox.documentation.builders.PathSelectors; |
| | | import springfox.documentation.builders.RequestHandlerSelectors; |
| | |
| | | import springfox.documentation.spring.web.plugins.Docket; |
| | | import springfox.documentation.swagger2.annotations.EnableSwagger2; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | |
| | | @Configuration |
| | | @EnableSwagger2 |
| | | public class SwaggerConfig { |
| | | @Resource |
| | | Environment env; |
| | | |
| | | private List<ApiKey> securitySchemes() { |
| | | List<ApiKey> apiKeys = new ArrayList<ApiKey>(); |
| | | apiKeys.add(new ApiKey("Authorization", "token", "header")); |
| | |
| | | |
| | | @Bean |
| | | public Docket createRestApi() { |
| | | String swaggerEnable = env.getProperty("sys.swaggerEnable"); |
| | | boolean enable = "true".equals(swaggerEnable); |
| | | |
| | | return new Docket(DocumentationType.SWAGGER_2) |
| | | .apiInfo(apiInfo()).select() |
| | | .enable(enable) |
| | | .apiInfo(apiInfo()) |
| | | .select() |
| | | .apis(RequestHandlerSelectors.basePackage("com.terra.system.controller")) |
| | | //.securitySchemes(securitySchemes()) |
| | | //.securityContexts(securityContexts()) |
| | |
| | | |
| | | private ApiInfo apiInfo() { |
| | | return new ApiInfoBuilder() |
| | | .title("Spring Bootæ¥å£API") |
| | | .description("Spring Bootæ¥å£APIæ¥ç") |
| | | .title("æ¥å£API") |
| | | .description("æ¥å£API") |
| | | .version("1.0").build(); |
| | | } |
| | | } |
| | |
| | | import org.springframework.web.servlet.config.annotation.*; |
| | | |
| | | import java.nio.charset.Charset; |
| | | import java.nio.charset.StandardCharsets; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | /** |
| | | * è·¨åè¯·æ± |
| | | */ |
| | | @Override |
| | | /*@Override |
| | | protected void addCorsMappings(CorsRegistry registry) { |
| | | registry.addMapping("/**") |
| | | .allowCredentials(true) |
| | |
| | | .allowedMethods("GET", "POST", "PUT", "DELETE", "OPTIONS") |
| | | .allowedHeaders("*") |
| | | .maxAge(3600); |
| | | } |
| | | }*/ |
| | | |
| | | /** |
| | | * æ·»å ç»ä¸çæ¦æªå¨ |
| | |
| | | //SerializerFeature.PrettyFormat); |
| | | |
| | | converter.setFastJsonConfig(config); |
| | | converter.setDefaultCharset(Charset.forName("UTF-8")); |
| | | converter.setDefaultCharset(StandardCharsets.UTF_8); |
| | | converters.add(converter); |
| | | } |
| | | } |
| | |
| | | |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | if (ue != null) { |
| | | mv.addObject("msg", "Hello " + ue.getUname() + " !"); |
| | | mv.addObject("msg", "Helloï¼" + ue.getUname() + " ï¼"); |
| | | } |
| | | |
| | | return mv; |
| | |
| | | public Integer updates(List<AttachEntity> list); |
| | | |
| | | /** |
| | | * æ¥è¯¢FMEæ¥å¿ |
| | | * |
| | | * @param tabs |
| | | * @return |
| | | */ |
| | | public List<FmeLogEntity> selectFmeLogs(String tabs); |
| | | |
| | | /** |
| | | * æ´æ°FMEæ¥å¿ |
| | | * |
| | | * @param id ID |
| | | * @return |
| | | */ |
| | | public Integer updateFmeLog(Integer id); |
| | | |
| | | /** |
| | | * æ ¹æ®å
æ°æ®åç§°æå
¥éä»¶ |
| | | * |
| | | * @param tab |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<FmeLogEntity> selectFmeLogs(String tabs) { |
| | | return attachMapper.selectFmeLogs(tabs); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢FMEæ¥å¿ |
| | | */ |
| | | public List<FmeLogEntity> selectFmeLogs() { |
| | | if (StringHelper.isEmpty(tabs)) { |
| | | tabs = UploadAttachService.getTabs().replace("'", ""); |
| | | } |
| | | |
| | | return attachMapper.selectFmeLogs(tabs); |
| | | } |
| | | |
| | | @Override |
| | | public Integer updateFmeLog(Integer id) { |
| | | return attachMapper.updateFmeLog(id); |
| | | } |
| | | |
| | | @Override |
| | | public Integer insertAttachByMeta(String tab, String tabGuid, String metaName, String dirid) { |
| | | return attachMapper.insertAttachByMeta(tab, tabGuid, metaName, dirid); |
| | | } |
| | |
| | | context-path: / |
| | | |
| | | spring: |
| | | application: |
| | | name: se-system |
| | | # redis |
| | | redis: |
| | | database: 0 |
| | |
| | | |
| | | # ç³»ç»é
ç½® |
| | | sys: |
| | | # å¯ç¨swagger |
| | | swaggerEnable: true |
| | | # èªå¨æ¥è¯¢ |
| | | autoQuery: 0 |
| | | # 管çåID |
| | |
| | | exePath: C:/360/MxDrawCloudServer1.0TryVersion/MxDrawCloudServer/Bin/MxCAD/Release/mxcadassembly.exe |
| | | targetPath: C:/360/MxDrawCloudServer1.0TryVersion/MxDrawCloudServer/SRC/TsWeb/public/data |
| | | # ä¸ä¼ é件表 |
| | | attachTabs: bd.b_pac_hydrogeology,bd.b_pac_frozensoil,bd.b_pac_geologic_hazard,bd.b_pac_marine_meteorological,bd.b_pac_meteorological,bs.m_equipment_nameplate,bs.m_hydraulic_protection,bs.m_marker,bs.s_explorationpoint,bs.u_sectionline |
| | | attachTabs: bd.b_pac_hydrogeology,bd.b_pac_frozensoil |
| | |
| | | <select id="selectProject" resultType="com.terra.system.entity.data.DirEntity"> |
| | | select * from lf.sys_dir where pid = 0 and id > 1 order by order_num, code; |
| | | </select> |
| | | |
| | | <select id="selectFmeLog" resultType="com.terra.system.entity.data.FmeLogEntity"> |
| | | select * from lf.sys_fme_log where parentid = #{parentid}; |
| | | </select> |
| | | </mapper> |
| | |
| | | </foreach> |
| | | </update> |
| | | |
| | | <!-- where count > 0 and update_time is null and create_time > now()::timestamp + '-5 min' and position(tcdm in '${tabs}') > 0; --> |
| | | <select id="selectFmeLogs" resultType="com.terra.system.entity.data.FmeLogEntity"> |
| | | select * from lf.sys_fme_log |
| | | where count > 0 and update_time is null and position(tcdm in '${tabs}') > 0; |
| | | </select> |
| | | |
| | | <update id="updateFmeLog"> |
| | | update lf.sys_fme_log set update_time = now() where id = #{id}; |
| | | </update> |
| | | |
| | | <!-- and create_time > now()::timestamp + '-15 min' --> |
| | | <insert id="insertAttachByMeta"> |
| | | insert into lf.sys_attach (name, guid, path, sizes, create_user, tab, tab_guid) |
| | |
| | | <!DOCTYPE> |
| | | <html> |
| | | <head> |
| | | <title>管éåºç¡å¤§æ°æ®å¹³å°æå¡-ç»å½</title> |
| | | <title>ç³»ç»æå¡-ç»å½</title> |
| | | <meta http-equiv="Expires" content="0" /> |
| | | <meta http-equiv="Cache" content="no-cache" /> |
| | | <meta http-equiv="Pragma" content="no-cache" /> |
| | |
| | | <html> |
| | | <head> |
| | | <meta charset="UTF-8"> |
| | | <title>管éåºç¡å¤§æ°æ®å¹³å°æå¡-æ°æ®åºçæ§</title> |
| | | <title>ç³»ç»æå¡-æ°æ®åºçæ§</title> |
| | | <script> |
| | | location.href = "../druid/index.html"; |
| | | </script> |
| | |
| | | <html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"> |
| | | <head> |
| | | <meta charset="UTF-8"> |
| | | <title>管éåºç¡å¤§æ°æ®å¹³å°æå¡-é¦é¡µ</title> |
| | | <title>ç³»ç»æå¡-é¦é¡µ</title> |
| | | <script src="../js/jquery.min.js"></script> |
| | | <script> |
| | | window.onload = function () { |
| | |
| | | <!DOCTYPE> |
| | | <html> |
| | | <head> |
| | | <title>管éåºç¡å¤§æ°æ®å¹³å°æå¡-ç»å½</title> |
| | | <title>ç³»ç»æå¡-ç»å½</title> |
| | | <meta http-equiv="Expires" content="0" /> |
| | | <meta http-equiv="Cache" content="no-cache" /> |
| | | <meta http-equiv="Pragma" content="no-cache" /> |
| | |
| | | </form> |
| | | </div> |
| | | |
| | | <div class="title"> |
| | | <!--<div class="title"> |
| | | <img src="../images/login/lg_03.png" alt=""/> |
| | | </div> |
| | | </div>--> |
| | | |
| | | <script src='../js/earth/dat.gui.min.js'></script> |
| | | <script src='../js/earth/Stats.js'></script> |
| | |
| | | <head> |
| | | <meta charset="UTF-8"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| | | <title>è¿ç»´çæ§</title> |
| | | <title>ç³»ç»æå¡-è¿ç»´çæ§</title> |
| | | |
| | | <link rel="stylesheet" href="./css/main/main1.css"> |
| | | <link rel="stylesheet" href="./css/main/jquery-ui.min.css"> |