¶Ô±ÈÐÂÎļþ |
| | |
| | | /* |
| | | * Copyright 2007-present the original author or authors. |
| | | * |
| | | * Licensed under the Apache License, Version 2.0 (the "License"); |
| | | * you may not use this file except in compliance with the License. |
| | | * You may obtain a copy of the License at |
| | | * |
| | | * https://www.apache.org/licenses/LICENSE-2.0 |
| | | * |
| | | * Unless required by applicable law or agreed to in writing, software |
| | | * distributed under the License is distributed on an "AS IS" BASIS, |
| | | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| | | * See the License for the specific language governing permissions and |
| | | * limitations under the License. |
| | | */ |
| | | |
| | | import java.net.*; |
| | | import java.io.*; |
| | | import java.nio.channels.*; |
| | | import java.util.Properties; |
| | | |
| | | public class MavenWrapperDownloader { |
| | | |
| | | private static final String WRAPPER_VERSION = "0.5.6"; |
| | | /** |
| | | * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided. |
| | | */ |
| | | private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/" |
| | | + WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar"; |
| | | |
| | | /** |
| | | * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to |
| | | * use instead of the default one. |
| | | */ |
| | | private static final String MAVEN_WRAPPER_PROPERTIES_PATH = |
| | | ".mvn/wrapper/maven-wrapper.properties"; |
| | | |
| | | /** |
| | | * Path where the maven-wrapper.jar will be saved to. |
| | | */ |
| | | private static final String MAVEN_WRAPPER_JAR_PATH = |
| | | ".mvn/wrapper/maven-wrapper.jar"; |
| | | |
| | | /** |
| | | * Name of the property which should be used to override the default download url for the wrapper. |
| | | */ |
| | | private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl"; |
| | | |
| | | public static void main(String args[]) { |
| | | System.out.println("- Downloader started"); |
| | | File baseDirectory = new File(args[0]); |
| | | System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); |
| | | |
| | | // If the maven-wrapper.properties exists, read it and check if it contains a custom |
| | | // wrapperUrl parameter. |
| | | File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); |
| | | String url = DEFAULT_DOWNLOAD_URL; |
| | | if (mavenWrapperPropertyFile.exists()) { |
| | | FileInputStream mavenWrapperPropertyFileInputStream = null; |
| | | try { |
| | | mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); |
| | | Properties mavenWrapperProperties = new Properties(); |
| | | mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); |
| | | url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); |
| | | } catch (IOException e) { |
| | | System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); |
| | | } finally { |
| | | try { |
| | | if (mavenWrapperPropertyFileInputStream != null) { |
| | | mavenWrapperPropertyFileInputStream.close(); |
| | | } |
| | | } catch (IOException e) { |
| | | // Ignore ... |
| | | } |
| | | } |
| | | } |
| | | System.out.println("- Downloading from: " + url); |
| | | |
| | | File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); |
| | | if (!outputFile.getParentFile().exists()) { |
| | | if (!outputFile.getParentFile().mkdirs()) { |
| | | System.out.println( |
| | | "- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'"); |
| | | } |
| | | } |
| | | System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); |
| | | try { |
| | | downloadFileFromURL(url, outputFile); |
| | | System.out.println("Done"); |
| | | System.exit(0); |
| | | } catch (Throwable e) { |
| | | System.out.println("- Error downloading"); |
| | | e.printStackTrace(); |
| | | System.exit(1); |
| | | } |
| | | } |
| | | |
| | | private static void downloadFileFromURL(String urlString, File destination) throws Exception { |
| | | if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) { |
| | | String username = System.getenv("MVNW_USERNAME"); |
| | | char[] password = System.getenv("MVNW_PASSWORD").toCharArray(); |
| | | Authenticator.setDefault(new Authenticator() { |
| | | @Override |
| | | protected PasswordAuthentication getPasswordAuthentication() { |
| | | return new PasswordAuthentication(username, password); |
| | | } |
| | | }); |
| | | } |
| | | URL website = new URL(urlString); |
| | | ReadableByteChannel rbc; |
| | | rbc = Channels.newChannel(website.openStream()); |
| | | FileOutputStream fos = new FileOutputStream(destination); |
| | | fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE); |
| | | fos.close(); |
| | | rbc.close(); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip |
| | | wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.http; |
| | | |
| | | /** |
| | | * HTTPç»æå°è£
|
| | | * @author Louis |
| | | * @date Oct 29, 2018 |
| | | */ |
| | | public class HttpResult { |
| | | |
| | | private int code = 200; |
| | | private String msg; |
| | | private Object data; |
| | | |
| | | public static HttpResult error() { |
| | | return error(HttpStatus.SC_INTERNAL_SERVER_ERROR, "æªç¥å¼å¸¸ï¼è¯·è系管çå"); |
| | | } |
| | | |
| | | public static HttpResult error(String msg) { |
| | | return error(HttpStatus.SC_INTERNAL_SERVER_ERROR, msg); |
| | | } |
| | | |
| | | public static HttpResult error(int code, String msg) { |
| | | HttpResult r = new HttpResult(); |
| | | r.setCode(code); |
| | | r.setMsg(msg); |
| | | return r; |
| | | } |
| | | |
| | | public static HttpResult ok(String msg) { |
| | | HttpResult r = new HttpResult(); |
| | | r.setMsg(msg); |
| | | return r; |
| | | } |
| | | |
| | | public static HttpResult ok(Object data) { |
| | | HttpResult r = new HttpResult(); |
| | | r.setData(data); |
| | | return r; |
| | | } |
| | | |
| | | public static HttpResult ok() { |
| | | return new HttpResult(); |
| | | } |
| | | |
| | | 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; |
| | | } |
| | | |
| | | public Object getData() { |
| | | return data; |
| | | } |
| | | |
| | | public void setData(Object data) { |
| | | this.data = data; |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.http; |
| | | |
| | | /** |
| | | * Constants enumerating the HTTP status codes. |
| | | * All status codes defined in RFC1945 (HTTP/1.0), RFC2616 (HTTP/1.1), and |
| | | * RFC2518 (WebDAV) are listed. |
| | | * |
| | | * @see StatusLine |
| | | * |
| | | * @since 4.0 |
| | | */ |
| | | public interface HttpStatus { |
| | | |
| | | // --- 1xx Informational --- |
| | | |
| | | /** {@code 100 Continue} (HTTP/1.1 - RFC 2616) */ |
| | | public static final int SC_CONTINUE = 100; |
| | | /** {@code 101 Switching Protocols} (HTTP/1.1 - RFC 2616)*/ |
| | | public static final int SC_SWITCHING_PROTOCOLS = 101; |
| | | /** {@code 102 Processing} (WebDAV - RFC 2518) */ |
| | | public static final int SC_PROCESSING = 102; |
| | | |
| | | // --- 2xx Success --- |
| | | |
| | | /** {@code 200 OK} (HTTP/1.0 - RFC 1945) */ |
| | | public static final int SC_OK = 200; |
| | | /** {@code 201 Created} (HTTP/1.0 - RFC 1945) */ |
| | | public static final int SC_CREATED = 201; |
| | | /** {@code 202 Accepted} (HTTP/1.0 - RFC 1945) */ |
| | | public static final int SC_ACCEPTED = 202; |
| | | /** {@code 203 Non Authoritative Information} (HTTP/1.1 - RFC 2616) */ |
| | | public static final int SC_NON_AUTHORITATIVE_INFORMATION = 203; |
| | | /** {@code 204 No Content} (HTTP/1.0 - RFC 1945) */ |
| | | public static final int SC_NO_CONTENT = 204; |
| | | /** {@code 205 Reset Content} (HTTP/1.1 - RFC 2616) */ |
| | | public static final int SC_RESET_CONTENT = 205; |
| | | /** {@code 206 Partial Content} (HTTP/1.1 - RFC 2616) */ |
| | | public static final int SC_PARTIAL_CONTENT = 206; |
| | | /** |
| | | * {@code 207 Multi-Status} (WebDAV - RFC 2518) |
| | | * or |
| | | * {@code 207 Partial Update OK} (HTTP/1.1 - draft-ietf-http-v11-spec-rev-01?) |
| | | */ |
| | | public static final int SC_MULTI_STATUS = 207; |
| | | |
| | | // --- 3xx Redirection --- |
| | | |
| | | /** {@code 300 Mutliple Choices} (HTTP/1.1 - RFC 2616) */ |
| | | public static final int SC_MULTIPLE_CHOICES = 300; |
| | | /** {@code 301 Moved Permanently} (HTTP/1.0 - RFC 1945) */ |
| | | public static final int SC_MOVED_PERMANENTLY = 301; |
| | | /** {@code 302 Moved Temporarily} (Sometimes {@code Found}) (HTTP/1.0 - RFC 1945) */ |
| | | public static final int SC_MOVED_TEMPORARILY = 302; |
| | | /** {@code 303 See Other} (HTTP/1.1 - RFC 2616) */ |
| | | public static final int SC_SEE_OTHER = 303; |
| | | /** {@code 304 Not Modified} (HTTP/1.0 - RFC 1945) */ |
| | | public static final int SC_NOT_MODIFIED = 304; |
| | | /** {@code 305 Use Proxy} (HTTP/1.1 - RFC 2616) */ |
| | | public static final int SC_USE_PROXY = 305; |
| | | /** {@code 307 Temporary Redirect} (HTTP/1.1 - RFC 2616) */ |
| | | public static final int SC_TEMPORARY_REDIRECT = 307; |
| | | |
| | | // --- 4xx Client Error --- |
| | | |
| | | /** {@code 400 Bad Request} (HTTP/1.1 - RFC 2616) */ |
| | | public static final int SC_BAD_REQUEST = 400; |
| | | /** {@code 401 Unauthorized} (HTTP/1.0 - RFC 1945) */ |
| | | public static final int SC_UNAUTHORIZED = 401; |
| | | /** {@code 402 Payment Required} (HTTP/1.1 - RFC 2616) */ |
| | | public static final int SC_PAYMENT_REQUIRED = 402; |
| | | /** {@code 403 Forbidden} (HTTP/1.0 - RFC 1945) */ |
| | | public static final int SC_FORBIDDEN = 403; |
| | | /** {@code 404 Not Found} (HTTP/1.0 - RFC 1945) */ |
| | | public static final int SC_NOT_FOUND = 404; |
| | | /** {@code 405 Method Not Allowed} (HTTP/1.1 - RFC 2616) */ |
| | | public static final int SC_METHOD_NOT_ALLOWED = 405; |
| | | /** {@code 406 Not Acceptable} (HTTP/1.1 - RFC 2616) */ |
| | | public static final int SC_NOT_ACCEPTABLE = 406; |
| | | /** {@code 407 Proxy Authentication Required} (HTTP/1.1 - RFC 2616)*/ |
| | | public static final int SC_PROXY_AUTHENTICATION_REQUIRED = 407; |
| | | /** {@code 408 Request Timeout} (HTTP/1.1 - RFC 2616) */ |
| | | public static final int SC_REQUEST_TIMEOUT = 408; |
| | | /** {@code 409 Conflict} (HTTP/1.1 - RFC 2616) */ |
| | | public static final int SC_CONFLICT = 409; |
| | | /** {@code 410 Gone} (HTTP/1.1 - RFC 2616) */ |
| | | public static final int SC_GONE = 410; |
| | | /** {@code 411 Length Required} (HTTP/1.1 - RFC 2616) */ |
| | | public static final int SC_LENGTH_REQUIRED = 411; |
| | | /** {@code 412 Precondition Failed} (HTTP/1.1 - RFC 2616) */ |
| | | public static final int SC_PRECONDITION_FAILED = 412; |
| | | /** {@code 413 Request Entity Too Large} (HTTP/1.1 - RFC 2616) */ |
| | | public static final int SC_REQUEST_TOO_LONG = 413; |
| | | /** {@code 414 Request-URI Too Long} (HTTP/1.1 - RFC 2616) */ |
| | | public static final int SC_REQUEST_URI_TOO_LONG = 414; |
| | | /** {@code 415 Unsupported Media Type} (HTTP/1.1 - RFC 2616) */ |
| | | public static final int SC_UNSUPPORTED_MEDIA_TYPE = 415; |
| | | /** {@code 416 Requested Range Not Satisfiable} (HTTP/1.1 - RFC 2616) */ |
| | | public static final int SC_REQUESTED_RANGE_NOT_SATISFIABLE = 416; |
| | | /** {@code 417 Expectation Failed} (HTTP/1.1 - RFC 2616) */ |
| | | public static final int SC_EXPECTATION_FAILED = 417; |
| | | |
| | | /** |
| | | * Static constant for a 418 error. |
| | | * {@code 418 Unprocessable Entity} (WebDAV drafts?) |
| | | * or {@code 418 Reauthentication Required} (HTTP/1.1 drafts?) |
| | | */ |
| | | // not used |
| | | // public static final int SC_UNPROCESSABLE_ENTITY = 418; |
| | | |
| | | /** |
| | | * Static constant for a 419 error. |
| | | * {@code 419 Insufficient Space on Resource} |
| | | * (WebDAV - draft-ietf-webdav-protocol-05?) |
| | | * or {@code 419 Proxy Reauthentication Required} |
| | | * (HTTP/1.1 drafts?) |
| | | */ |
| | | public static final int SC_INSUFFICIENT_SPACE_ON_RESOURCE = 419; |
| | | /** |
| | | * Static constant for a 420 error. |
| | | * {@code 420 Method Failure} |
| | | * (WebDAV - draft-ietf-webdav-protocol-05?) |
| | | */ |
| | | public static final int SC_METHOD_FAILURE = 420; |
| | | /** {@code 422 Unprocessable Entity} (WebDAV - RFC 2518) */ |
| | | public static final int SC_UNPROCESSABLE_ENTITY = 422; |
| | | /** {@code 423 Locked} (WebDAV - RFC 2518) */ |
| | | public static final int SC_LOCKED = 423; |
| | | /** {@code 424 Failed Dependency} (WebDAV - RFC 2518) */ |
| | | public static final int SC_FAILED_DEPENDENCY = 424; |
| | | |
| | | // --- 5xx Server Error --- |
| | | |
| | | /** {@code 500 Server Error} (HTTP/1.0 - RFC 1945) */ |
| | | public static final int SC_INTERNAL_SERVER_ERROR = 500; |
| | | /** {@code 501 Not Implemented} (HTTP/1.0 - RFC 1945) */ |
| | | public static final int SC_NOT_IMPLEMENTED = 501; |
| | | /** {@code 502 Bad Gateway} (HTTP/1.0 - RFC 1945) */ |
| | | public static final int SC_BAD_GATEWAY = 502; |
| | | /** {@code 503 Service Unavailable} (HTTP/1.0 - RFC 1945) */ |
| | | public static final int SC_SERVICE_UNAVAILABLE = 503; |
| | | /** {@code 504 Gateway Timeout} (HTTP/1.1 - RFC 2616) */ |
| | | public static final int SC_GATEWAY_TIMEOUT = 504; |
| | | /** {@code 505 HTTP Version Not Supported} (HTTP/1.1 - RFC 2616) */ |
| | | public static final int SC_HTTP_VERSION_NOT_SUPPORTED = 505; |
| | | |
| | | /** {@code 507 Insufficient Storage} (WebDAV - RFC 2518) */ |
| | | public static final int SC_INSUFFICIENT_STORAGE = 507; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.http; |
| | | |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | 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; |
| | | |
| | | @Configuration |
| | | |
| | | public class Swagger3Config { |
| | | |
| | | @Bean |
| | | public Docket buildDocket() { |
| | | return new Docket(DocumentationType.SWAGGER_2) |
| | | .apiInfo(apiInfo())//è°ç¨ä¸é¢apiInfo()æ¹æ³ |
| | | .select() |
| | | //Controlleræå¨è·¯å¾ |
| | | .apis(RequestHandlerSelectors.basePackage("com.cim.controller")) |
| | | .paths(PathSelectors.any()) |
| | | .build(); |
| | | |
| | | } |
| | | |
| | | public ApiInfo apiInfo() { |
| | | return new ApiInfoBuilder() |
| | | .title("springbootç»åswagger2æå»ºRestful API") |
| | | .description("è¿æ¯ä¸ä¸ªswagger2å°ådemo") |
| | | .termsOfServiceUrl("www.baidu.com") |
| | | .version("0.0.1") |
| | | .build(); |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.tairui.app; |
| | | |
| | | import org.springframework.boot.SpringApplication; |
| | | import org.springframework.boot.autoconfigure.SpringBootApplication; |
| | | import springfox.documentation.swagger2.annotations.EnableSwagger2; |
| | | |
| | | |
| | | @SpringBootApplication |
| | | @EnableSwagger2 |
| | | public class DemoApplication { |
| | | |
| | | public static void main(String[] args) { |
| | | SpringApplication.run(DemoApplication.class, args); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.tairui.app.cim.config; |
| | | |
| | | import com.github.pagehelper.PageHelper; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | |
| | | @Configuration |
| | | public class MyBatisPlusConfig { |
| | | |
| | | @Bean |
| | | public PageHelper pageHelper() { |
| | | PageHelper pageHelper = new PageHelper(); |
| | | |
| | | return pageHelper; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.tairui.app.cim.controller; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.tairui.app.cim.dao.model.BusDeviceMain; |
| | | import com.tairui.app.cim.mapper.BusDeviceMainMapper; |
| | | import com.tairui.app.cim.service.IBusDeviceMainService; |
| | | import com.github.pagehelper.PageHelper; |
| | | import com.github.pagehelper.PageInfo; |
| | | import com.http.HttpResult; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | |
| | | /** |
| | | * <p> |
| | | * å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author yw |
| | | * @since 2022-05-21 |
| | | */ |
| | | |
| | | |
| | | @RestController |
| | | @RequestMapping("/cim/busDeviceMain") |
| | | public class BusDeviceMainController { |
| | | |
| | | @Autowired |
| | | private BusDeviceMainMapper busDeviceMainMapper; |
| | | |
| | | @Autowired |
| | | IBusDeviceMainService iBusDeviceMainService ; |
| | | |
| | | |
| | | |
| | | @GetMapping("/queryByID") |
| | | public HttpResult queryByID(long id ){ |
| | | |
| | | return HttpResult.ok(busDeviceMainMapper.selectById(id)); |
| | | } |
| | | |
| | | @GetMapping("/queryByModelID") |
| | | public HttpResult queryByModelID(String model_id ){ |
| | | QueryWrapper queryWrapper = new QueryWrapper(); |
| | | queryWrapper.eq("model_id",model_id); |
| | | return HttpResult.ok(iBusDeviceMainService.list(queryWrapper)); |
| | | } |
| | | |
| | | @GetMapping("/list") |
| | | @ApiOperation(value = "å表",notes = "å页ååºææ") |
| | | public HttpResult list(@RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
| | | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize){ |
| | | |
| | | PageHelper.startPage(pageNo,pageSize); |
| | | List<BusDeviceMain> list = busDeviceMainMapper.listPage(); |
| | | PageInfo<BusDeviceMain> page = new PageInfo<>(list); |
| | | |
| | | |
| | | return HttpResult.ok(page); |
| | | } |
| | | |
| | | @GetMapping("/listPage") |
| | | public HttpResult listPage(String status,String name, @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
| | | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize){ |
| | | |
| | | LambdaQueryWrapper<BusDeviceMain> query = new LambdaQueryWrapper<>(); |
| | | |
| | | //å¢å kindæ¡ä»¶æ¥è¯¢ |
| | | if( status != null ){ |
| | | if( !status.equals("2")) |
| | | query.eq(BusDeviceMain::getStatus,Integer.parseInt(status)); |
| | | } |
| | | //else æ¥è¯¢å
¨é¨ |
| | | if( name != null && name.length() > 0) |
| | | query.like(BusDeviceMain::getUnitArea,name); |
| | | |
| | | |
| | | Page<BusDeviceMain> page = new Page<BusDeviceMain>(pageNo, pageSize); |
| | | IPage<BusDeviceMain> p = busDeviceMainMapper.selectPage(page, query); |
| | | |
| | | return HttpResult.ok(p); |
| | | } |
| | | |
| | | @PostMapping("/add") |
| | | public HttpResult add(@RequestBody BusDeviceMain busDeviceMain){ |
| | | return HttpResult.ok(busDeviceMainMapper.insert(busDeviceMain)); |
| | | } |
| | | |
| | | @PostMapping("/update") |
| | | public HttpResult update(@RequestBody BusDeviceMain busDeviceMain){ |
| | | return HttpResult.ok(busDeviceMainMapper.updateById(busDeviceMain)); |
| | | } |
| | | |
| | | @GetMapping("/delete") |
| | | public HttpResult delet(@RequestBody BusDeviceMain busDeviceMain){ |
| | | |
| | | return HttpResult.ok(busDeviceMainMapper.deleteById(busDeviceMain.getBdmId())); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.tairui.app.cim.controller; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.tairui.app.cim.dao.model.BusProductionDevice; |
| | | import com.tairui.app.cim.mapper.BusProductionDeviceMapper; |
| | | import com.github.pagehelper.PageHelper; |
| | | import com.github.pagehelper.PageInfo; |
| | | import com.http.HttpResult; |
| | | import com.tairui.app.cim.service.IBusDeviceMainService; |
| | | import com.tairui.app.cim.service.IBusProductionDeviceService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | |
| | | /** |
| | | * <p> |
| | | * å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author yw |
| | | * @since 2022-05-21 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/cim/busProductionDevice") |
| | | |
| | | public class BusProductionDeviceController { |
| | | @Autowired |
| | | private BusProductionDeviceMapper busProductionDeviceMapper; |
| | | |
| | | @Autowired |
| | | private IBusProductionDeviceService iBusProductionDeviceService; |
| | | @GetMapping("/queryByID") |
| | | public HttpResult queryByID(long id ){ |
| | | |
| | | return HttpResult.ok(busProductionDeviceMapper.selectById(id)); |
| | | } |
| | | |
| | | @GetMapping("/queryByModelID") |
| | | public HttpResult queryByModelID(String model_id ){ |
| | | QueryWrapper queryWrapper = new QueryWrapper(); |
| | | queryWrapper.eq("model_id",model_id); |
| | | return HttpResult.ok(iBusProductionDeviceService.list(queryWrapper)); |
| | | } |
| | | @GetMapping("/list") |
| | | public HttpResult list(@RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
| | | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize){ |
| | | PageHelper.startPage(pageNo,pageSize); |
| | | List<BusProductionDevice> list = busProductionDeviceMapper.listPage(); |
| | | PageInfo<BusProductionDevice> page = new PageInfo<>(list); |
| | | |
| | | |
| | | return HttpResult.ok(page); |
| | | } |
| | | |
| | | @GetMapping("/listPage") |
| | | public HttpResult listPage(String status, @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
| | | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize){ |
| | | |
| | | LambdaQueryWrapper<BusProductionDevice> query = new LambdaQueryWrapper<>(); |
| | | |
| | | //å¢å kindæ¡ä»¶æ¥è¯¢ |
| | | if( status != null ){ |
| | | if( !status.equals("2")) |
| | | query.eq(BusProductionDevice::getStatus,Integer.parseInt(status)); |
| | | } |
| | | |
| | | Page<BusProductionDevice> page = new Page<BusProductionDevice>(pageNo, pageSize); |
| | | IPage<BusProductionDevice> p = busProductionDeviceMapper.selectPage(page, query); |
| | | |
| | | return HttpResult.ok(p); |
| | | } |
| | | |
| | | @PostMapping("/add") |
| | | public HttpResult add(@RequestBody BusProductionDevice busDeviceMain){ |
| | | return HttpResult.ok(busProductionDeviceMapper.insert(busDeviceMain)); |
| | | } |
| | | |
| | | @PostMapping("/update") |
| | | public HttpResult update(@RequestBody BusProductionDevice busDeviceMain){ |
| | | |
| | | return HttpResult.ok(busProductionDeviceMapper.updateById(busDeviceMain)); |
| | | } |
| | | |
| | | @GetMapping("/delete") |
| | | public HttpResult delet(@RequestBody BusProductionDevice busDeviceMain){ |
| | | |
| | | return HttpResult.ok(busProductionDeviceMapper.deleteById(busDeviceMain.getId())); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.tairui.app.cim.controller; |
| | | |
| | | import com.tairui.app.cim.dao.model.*; |
| | | import com.tairui.app.cim.mapper.*; |
| | | import com.http.HttpResult; |
| | | import com.vividsolutions.jts.geom.Coordinate; |
| | | import com.vividsolutions.jts.geom.Geometry; |
| | | import com.vividsolutions.jts.geom.GeometryFactory; |
| | | import com.vividsolutions.jts.geom.Point; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.ibatis.annotations.Param; |
| | | 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 java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | @RestController |
| | | @RequestMapping("/cim/geom") |
| | | public class GeomController { |
| | | |
| | | @Autowired |
| | | AlarmPointMapper alarmPointMapper ; |
| | | @Autowired |
| | | CameraMapper cameraMapper ; |
| | | @Autowired |
| | | PersonnelPointMapper personnelPointMapper ; |
| | | @Autowired |
| | | ProductionAreaMapper productionAreaMapper ; |
| | | @Autowired |
| | | ProductionUnitAreaMapper productionUnitAreaMapper ; |
| | | @Autowired |
| | | OperationAreaMapper operationAreaMapper ; |
| | | @Autowired |
| | | InspectionMapper inspectionMapper ; |
| | | |
| | | @Autowired |
| | | ElevationMapper elevationMapper ; |
| | | |
| | | |
| | | @Autowired |
| | | EmergencySuppliesPointMapper emergencySuppliesPointMapper; |
| | | @Autowired |
| | | EntranceGuardPointMapper entranceGuardPointMapper; |
| | | @Autowired |
| | | EvacuationPointMapper evacuationPointMapper ; |
| | | @Autowired |
| | | MajorHazardsPointMapper majorHazardsPointMapper ; |
| | | @Autowired |
| | | ToxicGasPointMapper toxicGasPointMapper; |
| | | @Autowired |
| | | FireEquipmentPointMapper fireEquipmentPointMapper; |
| | | @GetMapping("/queryByID") |
| | | @ApiOperation("table_name:alarm,camera,inspection,production,production_unit,operation," + |
| | | "toxic_gas_point,emergency_supplies_point,major_hazards_point,entrance_guard_point," + |
| | | "evacuation_point,fire_equipment_point") |
| | | public HttpResult queryByID(int gid ,String table_name ){ |
| | | |
| | | if( table_name.toLowerCase().equals("alarm")) return HttpResult.ok(alarmPointMapper.query(gid)); |
| | | if( table_name.toLowerCase().equals("camera")) return HttpResult.ok(cameraMapper.query(gid)); |
| | | if( table_name.toLowerCase().equals("personnel")) return HttpResult.ok(personnelPointMapper.query(gid)); |
| | | if( table_name.toLowerCase().equals("inspection")) return HttpResult.ok(inspectionMapper.query(gid)); |
| | | |
| | | if( table_name.toLowerCase().equals("production")) return HttpResult.ok(productionAreaMapper.query(gid)); |
| | | if( table_name.toLowerCase().equals("production_unit"))return HttpResult.ok(productionUnitAreaMapper.query(gid)); |
| | | if( table_name.toLowerCase().equals("operation")) return HttpResult.ok(operationAreaMapper.query(gid)); |
| | | |
| | | if( table_name.toLowerCase().equals("toxic_gas_point")) return HttpResult.ok(toxicGasPointMapper.query(gid)); |
| | | if( table_name.toLowerCase().equals("emergency_supplies_point")) return HttpResult.ok(emergencySuppliesPointMapper.query(gid)); |
| | | |
| | | if( table_name.toLowerCase().equals("major_hazards_point")) return HttpResult.ok(majorHazardsPointMapper.query(gid)); |
| | | if( table_name.toLowerCase().equals("entrance_guard_point"))return HttpResult.ok(entranceGuardPointMapper.query(gid)); |
| | | if( table_name.toLowerCase().equals("evacuation_point")) return HttpResult.ok(evacuationPointMapper.query(gid)); |
| | | if( table_name.toLowerCase().equals("fire_equipment_point")) return HttpResult.ok(fireEquipmentPointMapper.query(gid)); |
| | | |
| | | return HttpResult.error("åæ°é误"); |
| | | } |
| | | |
| | | @GetMapping("/update") |
| | | public HttpResult update(int gid , String geom,String table_name){ |
| | | if( table_name.toLowerCase().equals("alarm")) { |
| | | AlarmPoint alarmPoint = alarmPointMapper.selectById(gid) ; |
| | | if( alarmPoint == null ) return HttpResult.error("è®°å½ä¸åå¨ï¼"); |
| | | alarmPoint.setGeom(geom); |
| | | int ret = alarmPointMapper.updateById(alarmPoint); |
| | | return HttpResult.ok(ret); |
| | | } |
| | | if( table_name.toLowerCase().equals("camera")) { |
| | | CameraPoint alarmPoint = cameraMapper.selectById(gid) ; |
| | | if( alarmPoint == null ) return HttpResult.error("è®°å½ä¸åå¨ï¼"); |
| | | alarmPoint.setGeom(geom); |
| | | int ret = cameraMapper.updateById(alarmPoint); |
| | | return HttpResult.ok(ret); |
| | | } |
| | | if( table_name.toLowerCase().equals("inspection")) { |
| | | Inspection alarmPoint =inspectionMapper .selectById(gid) ; |
| | | if( alarmPoint == null ) return HttpResult.error("è®°å½ä¸åå¨ï¼"); |
| | | alarmPoint.setGeom(geom); |
| | | int ret = inspectionMapper.updateById(alarmPoint); |
| | | return HttpResult.ok(ret); |
| | | } |
| | | if( table_name.toLowerCase().equals("production")) { |
| | | ProductionArea alarmPoint =productionAreaMapper .selectById(gid) ; |
| | | if( alarmPoint == null ) return HttpResult.error("è®°å½ä¸åå¨ï¼"); |
| | | alarmPoint.setGeom(geom); |
| | | int ret = productionAreaMapper.updateById(alarmPoint); |
| | | return HttpResult.ok(ret); |
| | | } |
| | | if( table_name.toLowerCase().equals("production_unit")){ |
| | | ProductionUnitArea alarmPoint =productionUnitAreaMapper .selectById(gid) ; |
| | | if( alarmPoint == null ) return HttpResult.error("è®°å½ä¸åå¨ï¼"); |
| | | alarmPoint.setGeom(geom); |
| | | int ret = productionUnitAreaMapper.updateById(alarmPoint); |
| | | return HttpResult.ok(ret); |
| | | } |
| | | if( table_name.toLowerCase().equals("operation")) { |
| | | OperationArea alarmPoint =operationAreaMapper .selectById(gid) ; |
| | | if( alarmPoint == null ) return HttpResult.error("è®°å½ä¸åå¨ï¼"); |
| | | alarmPoint.setGeom(geom); |
| | | int ret = operationAreaMapper.updateById(alarmPoint); |
| | | return HttpResult.ok(ret); |
| | | } |
| | | |
| | | |
| | | |
| | | if( table_name.toLowerCase().equals("toxic_gas_point")){ |
| | | ToxicGasPoint alarmPoint =toxicGasPointMapper.selectById(gid) ; |
| | | if( alarmPoint == null ) return HttpResult.error("è®°å½ä¸åå¨ï¼"); |
| | | alarmPoint.setGeom(geom); |
| | | int ret = toxicGasPointMapper.updateById(alarmPoint); |
| | | return HttpResult.ok(ret); |
| | | } |
| | | if( table_name.toLowerCase().equals("emergency_supplies_point")) { |
| | | EmergencySuppliesPoint alarmPoint =emergencySuppliesPointMapper .selectById(gid) ; |
| | | if( alarmPoint == null ) return HttpResult.error("è®°å½ä¸åå¨ï¼"); |
| | | alarmPoint.setGeom(geom); |
| | | int ret = emergencySuppliesPointMapper.updateById(alarmPoint); |
| | | return HttpResult.ok(ret); |
| | | } |
| | | if( table_name.toLowerCase().equals("major_hazards_point")){ |
| | | MajorHazardsPoint alarmPoint =majorHazardsPointMapper .selectById(gid) ; |
| | | if( alarmPoint == null ) return HttpResult.error("è®°å½ä¸åå¨ï¼"); |
| | | alarmPoint.setGeom(geom); |
| | | int ret = majorHazardsPointMapper.updateById(alarmPoint); |
| | | return HttpResult.ok(ret); |
| | | } |
| | | if( table_name.toLowerCase().equals("entrance_guard_point")) { |
| | | EntranceGuardPoint alarmPoint =entranceGuardPointMapper .selectById(gid) ; |
| | | if( alarmPoint == null ) return HttpResult.error("è®°å½ä¸åå¨ï¼"); |
| | | alarmPoint.setGeom(geom); |
| | | int ret = entranceGuardPointMapper.updateById(alarmPoint); |
| | | return HttpResult.ok(ret); |
| | | } |
| | | if( table_name.toLowerCase().equals("evacuation_point")){ |
| | | EvacuationPoint alarmPoint =evacuationPointMapper .selectById(gid) ; |
| | | if( alarmPoint == null ) return HttpResult.error("è®°å½ä¸åå¨ï¼"); |
| | | alarmPoint.setGeom(geom); |
| | | int ret = evacuationPointMapper.updateById(alarmPoint); |
| | | return HttpResult.ok(ret); |
| | | } |
| | | if( table_name.toLowerCase().equals("fire_equipment_point")){ |
| | | FireEquipmentPoint alarmPoint =fireEquipmentPointMapper .selectById(gid) ; |
| | | if( alarmPoint == null ) return HttpResult.error("è®°å½ä¸åå¨ï¼"); |
| | | alarmPoint.setGeom(geom); |
| | | int ret = fireEquipmentPointMapper.updateById(alarmPoint); |
| | | return HttpResult.ok(ret); |
| | | } |
| | | |
| | | return HttpResult.error("åæ°é误"); |
| | | } |
| | | |
| | | /** |
| | | * å¤çè¿ç¨ï¼æ ¹æ®æ¥¼å±å¾å°é¢æ°æ®ï¼å¤æç¹æ¯å¦å¨é¢ä¸ï¼å¦æå¨ï¼è¿å x,y ï¼coor_z |
| | | * 妿ä¸å¨é¢ä¸ï¼è·å¾æè¿çé¢ï¼è¿å cen_x cen_y coor_z |
| | | * @param x |
| | | * @param y |
| | | * @param |
| | | * @return |
| | | */ |
| | | @GetMapping("/queryElevation") |
| | | public HttpResult queryElevation(String floor_num,double x , double y){ |
| | | List<Elevation> list = new ArrayList<>(); |
| | | //ä¸å±ä¸æ¥è¯¢ |
| | | if( floor_num.equals("1")){ |
| | | Elevation e = new Elevation(); |
| | | e.setCenx(x); |
| | | e.setCeny(y); |
| | | e.setHigh("0"); |
| | | list.add(e); |
| | | return HttpResult.ok(list ); |
| | | |
| | | } |
| | | list = elevationMapper.queryFloor(x,y,floor_num) ; |
| | | if( list == null || list.size() == 0 ){ |
| | | list = elevationMapper.queryMinDistance(x,y,floor_num); |
| | | return (HttpResult.ok(list));//.stream().filter(p->{System.out.println(p.getCentX());p.setCen_x(p.getCenx());p.setCen_y(p.getCeny());return true;}).collect(Collectors.toList()))); |
| | | }else{ |
| | | return HttpResult.ok( list.stream().filter(p->{p.setCenx(x);p.setCeny(y);return true;}).collect(Collectors.toList())); |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.tairui.app.cim.controller; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.tairui.app.cim.dao.model.ProductionArea; |
| | | import com.tairui.app.cim.mapper.ProductionAreaMapper; |
| | | import com.tairui.app.cim.service.IProductionAreaService; |
| | | import com.tairui.app.cim.util.GeoJsonUtil; |
| | | import com.github.pagehelper.PageHelper; |
| | | import com.github.pagehelper.PageInfo; |
| | | import com.http.HttpResult; |
| | | import com.vividsolutions.jts.geom.Geometry; |
| | | import com.vividsolutions.jts.geom.GeometryFactory; |
| | | import com.vividsolutions.jts.io.ParseException; |
| | | import com.vividsolutions.jts.io.WKTReader; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.geotools.geometry.jts.JTSFactoryFinder; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | @RestController |
| | | @RequestMapping("/cim/productionArea") |
| | | public class ProductionAreaController { |
| | | |
| | | @Autowired |
| | | IProductionAreaService iProductionAreaService; |
| | | @Autowired |
| | | ProductionAreaMapper productionAreaMapper; |
| | | |
| | | private GeometryFactory geometryFactory = JTSFactoryFinder.getGeometryFactory( null ); |
| | | private WKTReader reader = new WKTReader( geometryFactory ); |
| | | @GetMapping("/list") |
| | | @ApiOperation(value = "å表",notes = "å页ååºææ") |
| | | public HttpResult list(@RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
| | | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize){ |
| | | |
| | | PageHelper.startPage(pageNo,pageSize); |
| | | List<ProductionArea> list = productionAreaMapper.listPage(); |
| | | PageInfo<ProductionArea> page = new PageInfo<>(list); |
| | | |
| | | |
| | | return HttpResult.ok(page); |
| | | } |
| | | |
| | | @GetMapping("/listArea") |
| | | @ApiOperation(value = "å表åºååç§°",notes = "å页ååºææ") |
| | | public HttpResult listArea(@RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
| | | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize){ |
| | | |
| | | PageHelper.startPage(pageNo,pageSize); |
| | | List<String> list = productionAreaMapper.listAreaName(); |
| | | PageInfo<String> page = new PageInfo<>(list); |
| | | |
| | | |
| | | return HttpResult.ok(page); |
| | | } |
| | | @PostMapping("/add") |
| | | @ApiOperation(value = "å表",notes = "å页ååºææ") |
| | | public HttpResult add(@RequestBody String json) throws ParseException { |
| | | |
| | | JSONArray jsonArray = JSON.parseArray(json); |
| | | |
| | | for(Object obj:jsonArray){ |
| | | JSON jsonObject = (JSON)obj; |
| | | |
| | | String geom =((JSONObject)obj).getString("geometry"); |
| | | Geometry geometry = GeoJsonUtil.getGeometryFromGeoJSON(geom); |
| | | JSONObject jsonObject1 = JSON.parseObject(((JSONObject)obj).getString("properties")); |
| | | |
| | | ProductionArea productionArea = JSON.parseObject(jsonObject.toString(),ProductionArea.class); |
| | | productionArea.setGeom(geometry.toText()); |
| | | |
| | | productionAreaMapper.insert(productionArea); |
| | | } |
| | | |
| | | |
| | | return HttpResult.ok(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.tairui.app.cim.dao.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.tairui.app.cim.util.MyGeometryHandler; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @Accessors(chain = true) |
| | | @TableName("alarm_point") |
| | | public class AlarmPoint { |
| | | @TableField("gid") |
| | | @TableId |
| | | private long gid; |
| | | |
| | | @TableField(typeHandler = MyGeometryHandler.class) |
| | | private String geom; |
| | | |
| | | @TableField(exist=false) |
| | | private String gwkt; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.tairui.app.cim.dao.model; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import java.io.Serializable; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | /** |
| | | * <p> |
| | | * |
| | | * </p> |
| | | * |
| | | * @author yw |
| | | * @since 2022-05-21 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @Accessors(chain = true) |
| | | public class BusDeviceMain implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | @TableId |
| | | @TableField("bdm_id") |
| | | private Long bdmId; |
| | | |
| | | @TableField("device_no") |
| | | private String deviceNo; |
| | | |
| | | @TableField("device_name") |
| | | private String bdmDeviceName; |
| | | |
| | | @TableField("bdm_type_first") |
| | | private Integer bdmTypeFirst; |
| | | |
| | | @TableField("bdm_type_second") |
| | | private Integer bdmTypeSecond; |
| | | |
| | | @TableField("bdm_type_third") |
| | | private Integer bdmTypeThird; |
| | | |
| | | @TableField("bdm_area") |
| | | private Long bdmArea; |
| | | |
| | | @TableField("unit_area") |
| | | private String unitArea; |
| | | |
| | | @TableField("bdm_location") |
| | | private String bdmLocation; |
| | | |
| | | @TableField("bdm_department") |
| | | private String bdmDepartment; |
| | | |
| | | @TableField("bdm_purpose") |
| | | private String bdmPurpose; |
| | | |
| | | @TableField("bdm_specification") |
| | | private String bdmSpecification; |
| | | |
| | | @TableField("bdm_manufacturer") |
| | | private String bdmManufacturer; |
| | | |
| | | @TableField("bdm_production_date") |
| | | private String bdmProductionDate; |
| | | |
| | | @TableField("bdm_first_use_date") |
| | | private String bdmFirstUseDate; |
| | | |
| | | @TableField("bdm_newest_use_date") |
| | | private String bdmNewestUseDate; |
| | | |
| | | @TableField("bdm_newest_valid_date") |
| | | private String bdmNewestValidDate; |
| | | |
| | | @TableField("bdm_use_state") |
| | | private String bdmUseState; |
| | | |
| | | @TableField("bdm_device_state") |
| | | private String bdmDeviceState; |
| | | |
| | | @TableField("bdm_remark") |
| | | private String bdmRemark; |
| | | |
| | | @TableField("bdm_map_point_flag") |
| | | private Integer bdmMapPointFlag; |
| | | |
| | | @TableField("bdm_deleted_flag") |
| | | private Integer bdmDeletedFlag; |
| | | |
| | | @TableField("create_time") |
| | | private LocalDateTime createTime; |
| | | |
| | | @TableField("create_user") |
| | | private String createUser; |
| | | |
| | | @TableField("update_time") |
| | | private LocalDateTime updateTime; |
| | | |
| | | @TableField("update_user") |
| | | private String updateUser; |
| | | |
| | | @TableField("bdm_type") |
| | | private String bdmType; |
| | | |
| | | @TableField("model_id") |
| | | private String modelId; |
| | | |
| | | @TableField("status") |
| | | private Integer status; |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.tairui.app.cim.dao.model; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import java.io.Serializable; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | /** |
| | | * <p> |
| | | * |
| | | * </p> |
| | | * |
| | | * @author yw |
| | | * @since 2022-05-21 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @Accessors(chain = true) |
| | | public class BusProductionDevice implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId() |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private long id; |
| | | |
| | | @TableField("device_no") |
| | | private String deviceNo; |
| | | |
| | | @TableField("device_name") |
| | | private String deviceName; |
| | | |
| | | @TableField("dept_id") |
| | | private long deptId; |
| | | |
| | | @TableField("deivce_type") |
| | | private int deivceType; |
| | | |
| | | @TableField("sub_device_type") |
| | | private long subDeviceType; |
| | | |
| | | @TableField("device_trand") |
| | | private int deviceTrand; |
| | | |
| | | @TableField("region_id") |
| | | private long regionId; |
| | | |
| | | @TableField("tag_number") |
| | | private String tagNumber; |
| | | |
| | | @TableField("state") |
| | | private int state; |
| | | |
| | | @TableField("factory_no") |
| | | private String factoryNo; |
| | | |
| | | @TableField("special") |
| | | private int special; |
| | | |
| | | @TableField("equipment") |
| | | private Long equipment; |
| | | |
| | | @TableField("responsibility_by") |
| | | private long responsibilityBy; |
| | | |
| | | @TableField("model_id") |
| | | private String modelId; |
| | | |
| | | @TableField("video_coding") |
| | | private int videoCoding; |
| | | |
| | | @TableField("device_channel") |
| | | private String deviceChannel; |
| | | |
| | | @TableField("bitstream_type") |
| | | private int bitstreamType; |
| | | |
| | | @TableField("monitor_type") |
| | | private int monitorType; |
| | | |
| | | @TableField("videotape_type") |
| | | private int videotapeType; |
| | | |
| | | @TableField("in_out_type") |
| | | private int inOutType; |
| | | |
| | | @TableField("device_model") |
| | | private String deviceModel; |
| | | |
| | | @TableField("location") |
| | | private String location; |
| | | |
| | | @TableField("purpose") |
| | | private String purpose; |
| | | |
| | | @TableField("device_account") |
| | | private String deviceAccount; |
| | | |
| | | @TableField("device_password") |
| | | private String devicePassword; |
| | | |
| | | @TableField("ip") |
| | | private String ip; |
| | | |
| | | @TableField("prot") |
| | | private int prot; |
| | | |
| | | @TableField("del_flag") |
| | | private int delFlag; |
| | | |
| | | @TableField("create_time") |
| | | private LocalDateTime createTime; |
| | | |
| | | @TableField("update_time") |
| | | private LocalDateTime updateTime; |
| | | |
| | | @TableField("bind_location") |
| | | private String bindLocation; |
| | | |
| | | @TableField("bind_state") |
| | | private int bindState; |
| | | |
| | | @TableField("channel_state") |
| | | private int channelState; |
| | | |
| | | @TableField("video_address") |
| | | private String videoAddress; |
| | | |
| | | @TableField("unit") |
| | | private String unit; |
| | | |
| | | @TableField("infra_red_channel") |
| | | private String infraRedChannel; |
| | | |
| | | @TableField("status") |
| | | private int status; |
| | | |
| | | @TableField("unit_area") |
| | | private String unitArea; |
| | | |
| | | @TableField("create_user") |
| | | private String createUser; |
| | | |
| | | @TableField("update_user") |
| | | private String updateUser; |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.tairui.app.cim.dao.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.tairui.app.cim.util.MyGeometryHandler; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @Accessors(chain = true) |
| | | @TableName("camera_point") |
| | | public class CameraPoint { |
| | | @TableField("gid") |
| | | @TableId |
| | | private long gid; |
| | | |
| | | @TableField(typeHandler = MyGeometryHandler.class) |
| | | private String geom; |
| | | |
| | | @TableField(exist=false) |
| | | private String gwkt; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.tairui.app.cim.dao.model; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.tairui.app.cim.util.MyGeometryHandler; |
| | | import com.vividsolutions.jts.geom.Geometry; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @Accessors(chain = true) |
| | | @TableName("elevation_correction") |
| | | public class Elevation { |
| | | @TableField("gid") |
| | | @TableId |
| | | private long gid; |
| | | |
| | | @TableField(typeHandler = MyGeometryHandler.class) |
| | | private String geom; |
| | | |
| | | @TableField(exist=false) |
| | | private String gwkt; |
| | | //ä¸å¨é¢å
ç¹å¤ç |
| | | @TableField(exist=false) |
| | | private double cenx ; |
| | | @TableField(exist=false) |
| | | private double ceny ; |
| | | private String coor_z ; |
| | | private String name ; |
| | | private String floor_num ; |
| | | @TableField(exist=false) |
| | | private String high; |
| | | |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.tairui.app.cim.dao.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.tairui.app.cim.util.MyGeometryHandler; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * <p> |
| | | * |
| | | * </p> |
| | | * |
| | | * @author hyy |
| | | * @since 2022-08-22 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @ApiModel(value="EmergencySuppliesPoint对象", description="") |
| | | public class EmergencySuppliesPoint implements Serializable { |
| | | |
| | | private static final long serialVersionUID=1L; |
| | | |
| | | @TableId(value = "gid", type = IdType.ASSIGN_ID) |
| | | private Integer gid; |
| | | |
| | | private String pointId; |
| | | |
| | | private String pointType; |
| | | |
| | | private String orgCode; |
| | | |
| | | private String pointName; |
| | | |
| | | private String createuser; |
| | | |
| | | private Date createtime; |
| | | |
| | | private String updateuser; |
| | | |
| | | private Date updatetime; |
| | | |
| | | private BigDecimal coorZ; |
| | | |
| | | private Integer status; |
| | | |
| | | private String remarks; |
| | | |
| | | @TableField(typeHandler = MyGeometryHandler.class) |
| | | private String geom; |
| | | |
| | | @TableField(exist=false) |
| | | private String gwkt; |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.tairui.app.cim.dao.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.tairui.app.cim.util.MyGeometryHandler; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * <p> |
| | | * |
| | | * </p> |
| | | * |
| | | * @author hyy |
| | | * @since 2022-08-22 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @ApiModel(value="EntranceGuardPoint对象", description="") |
| | | public class EntranceGuardPoint implements Serializable { |
| | | |
| | | private static final long serialVersionUID=1L; |
| | | |
| | | @TableId(value = "gid", type = IdType.ASSIGN_ID) |
| | | private Integer gid; |
| | | |
| | | private String pointId; |
| | | |
| | | private String pointType; |
| | | |
| | | private String orgCode; |
| | | |
| | | private String pointName; |
| | | |
| | | private String createuser; |
| | | |
| | | private Date createtime; |
| | | |
| | | private String updateuser; |
| | | |
| | | private Date updatetime; |
| | | |
| | | private BigDecimal coorZ; |
| | | |
| | | private BigDecimal status; |
| | | |
| | | private String remarks; |
| | | |
| | | private String bindKey; |
| | | |
| | | @TableField(typeHandler = MyGeometryHandler.class) |
| | | private String geom; |
| | | |
| | | @TableField(exist=false) |
| | | private String gwkt; |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.tairui.app.cim.dao.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.tairui.app.cim.util.MyGeometryHandler; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * <p> |
| | | * |
| | | * </p> |
| | | * |
| | | * @author hyy |
| | | * @since 2022-08-22 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @ApiModel(value="EvacuationPoint对象", description="") |
| | | public class EvacuationPoint implements Serializable { |
| | | |
| | | private static final long serialVersionUID=1L; |
| | | |
| | | @TableId(value = "gid", type = IdType.ASSIGN_ID) |
| | | private Integer gid; |
| | | |
| | | private String pointId; |
| | | |
| | | private String pointType; |
| | | |
| | | private String orgCode; |
| | | |
| | | private String pointName; |
| | | |
| | | private String createuser; |
| | | |
| | | private Date createtime; |
| | | |
| | | private String updateuser; |
| | | |
| | | private Date updatetime; |
| | | |
| | | private BigDecimal coorZ; |
| | | |
| | | private BigDecimal status; |
| | | |
| | | private String remarks; |
| | | |
| | | private String bindKey; |
| | | |
| | | @TableField(typeHandler = MyGeometryHandler.class) |
| | | private String geom; |
| | | |
| | | @TableField(exist=false) |
| | | private String gwkt; |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.tairui.app.cim.dao.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.tairui.app.cim.util.MyGeometryHandler; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * <p> |
| | | * |
| | | * </p> |
| | | * |
| | | * @author hyy |
| | | * @since 2022-08-23 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @ApiModel(value="FireEquipmentPoint对象", description="") |
| | | public class FireEquipmentPoint implements Serializable { |
| | | |
| | | private static final long serialVersionUID=1L; |
| | | |
| | | @TableId(value = "gid", type = IdType.ASSIGN_ID) |
| | | private Integer gid; |
| | | |
| | | private String pointId; |
| | | |
| | | private String pointType; |
| | | |
| | | private String orgCode; |
| | | |
| | | private String pointName; |
| | | |
| | | private String createuser; |
| | | |
| | | private Date createtime; |
| | | |
| | | private String updateuser; |
| | | |
| | | private Date updatetime; |
| | | |
| | | private BigDecimal coorZ; |
| | | |
| | | private Integer status; |
| | | |
| | | private String remarks; |
| | | |
| | | @TableField(typeHandler = MyGeometryHandler.class) |
| | | private String geom; |
| | | |
| | | @TableField(exist=false) |
| | | private String gwkt; |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.tairui.app.cim.dao.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.tairui.app.cim.util.MyGeometryHandler; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @Accessors(chain = true) |
| | | @TableName("onsite_inspection_point") |
| | | public class Inspection { |
| | | @TableField("gid") |
| | | @TableId |
| | | private long gid; |
| | | |
| | | @TableField(typeHandler = MyGeometryHandler.class) |
| | | private String geom; |
| | | |
| | | @TableField(exist=false) |
| | | private String gwkt; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.tairui.app.cim.dao.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.tairui.app.cim.util.MyGeometryHandler; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * <p> |
| | | * |
| | | * </p> |
| | | * |
| | | * @author hyy |
| | | * @since 2022-08-22 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @ApiModel(value="MajorHazardsPoint对象", description="") |
| | | public class MajorHazardsPoint implements Serializable { |
| | | |
| | | private static final long serialVersionUID=1L; |
| | | |
| | | @TableId(value = "gid", type = IdType.ASSIGN_ID) |
| | | private Integer gid; |
| | | |
| | | private String pointId; |
| | | |
| | | private String pointType; |
| | | |
| | | private String orgCode; |
| | | |
| | | private String pointName; |
| | | |
| | | private String createuser; |
| | | |
| | | private Date createtime; |
| | | |
| | | private String updateuser; |
| | | |
| | | private Date updatetime; |
| | | |
| | | private BigDecimal coorZ; |
| | | |
| | | private Integer status; |
| | | |
| | | private String remarks; |
| | | |
| | | |
| | | @TableField(typeHandler = MyGeometryHandler.class) |
| | | private String geom; |
| | | |
| | | @TableField(exist=false) |
| | | private String gwkt; |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.tairui.app.cim.dao.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.tairui.app.cim.util.MyGeometryHandler; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @Accessors(chain = true) |
| | | @TableName("operation_area") |
| | | public class OperationArea implements Serializable { |
| | | |
| | | @TableField("gid") |
| | | @TableId |
| | | private long gid; |
| | | |
| | | @TableField(typeHandler = MyGeometryHandler.class) |
| | | private String geom; |
| | | |
| | | @TableField(exist=false) |
| | | private String gwkt; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.tairui.app.cim.dao.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.tairui.app.cim.util.MyGeometryHandler; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @Accessors(chain = true) |
| | | @TableName("personnel_point") |
| | | public class PersonnelPoint { |
| | | @TableField("gid") |
| | | @TableId |
| | | private long gid; |
| | | |
| | | @TableField(typeHandler = MyGeometryHandler.class) |
| | | private String geom; |
| | | |
| | | @TableField(exist=false) |
| | | private String gwkt; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.tairui.app.cim.dao.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.tairui.app.cim.util.MyGeometryHandler; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @Accessors(chain = true) |
| | | @TableName("production_area") |
| | | public class ProductionArea implements Serializable { |
| | | |
| | | @TableField("gid") |
| | | @TableId |
| | | private long gid; |
| | | |
| | | @TableField(typeHandler = MyGeometryHandler.class) |
| | | private String geom; |
| | | |
| | | @TableField(exist=false) |
| | | private String gwkt; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.tairui.app.cim.dao.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.tairui.app.cim.util.MyGeometryHandler; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @Accessors(chain = true) |
| | | @TableName("production_unit_area") |
| | | public class ProductionUnitArea implements Serializable { |
| | | |
| | | @TableField("gid") |
| | | @TableId |
| | | private long gid; |
| | | |
| | | @TableField(typeHandler = MyGeometryHandler.class) |
| | | private String geom; |
| | | |
| | | @TableField(exist=false) |
| | | private String gwkt; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.tairui.app.cim.dao.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.tairui.app.cim.util.MyGeometryHandler; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | |
| | | /** |
| | | * <p> |
| | | * |
| | | * </p> |
| | | * |
| | | * @author hyy |
| | | * @since 2022-08-22 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @ApiModel(value="ToxicGasPoint对象", description="") |
| | | public class ToxicGasPoint implements Serializable { |
| | | |
| | | private static final long serialVersionUID=1L; |
| | | |
| | | @TableId(value = "gid", type = IdType.ASSIGN_ID) |
| | | private Integer gid; |
| | | |
| | | private String pointId; |
| | | |
| | | private String pointType; |
| | | |
| | | private String orgCode; |
| | | |
| | | private String pointName; |
| | | |
| | | private String createuser; |
| | | |
| | | private String createtime; |
| | | |
| | | private String updateuser; |
| | | |
| | | private String updatetime; |
| | | |
| | | private BigDecimal coorZ; |
| | | |
| | | private BigDecimal status; |
| | | |
| | | private String remarks; |
| | | |
| | | private String bindKey; |
| | | |
| | | |
| | | |
| | | @TableField(typeHandler = MyGeometryHandler.class) |
| | | private String geom; |
| | | |
| | | @TableField(exist=false) |
| | | private String gwkt; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.tairui.app.cim.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.tairui.app.cim.dao.model.AlarmPoint; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Select; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author yw |
| | | * @since 2022-05-21 |
| | | */ |
| | | @Mapper |
| | | @Repository |
| | | public interface AlarmPointMapper extends BaseMapper<AlarmPoint> { |
| | | |
| | | @Select("select gid,geom ,ST_AsText(geom) as gwkt from alarm_point ") |
| | | public List<AlarmPoint> listPage(); |
| | | |
| | | @Select("select gid,geom ,ST_AsText(geom) as gwkt from alarm_point where gid=#{gid} ") |
| | | public List<AlarmPoint> query(int gid); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.tairui.app.cim.mapper; |
| | | |
| | | import com.tairui.app.cim.dao.model.BusDeviceMain; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Select; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author yw |
| | | * @since 2022-05-21 |
| | | */ |
| | | @Mapper |
| | | @Repository |
| | | public interface BusDeviceMainMapper extends BaseMapper<BusDeviceMain> { |
| | | |
| | | @Select("select * from bus_device_main ") |
| | | public List<BusDeviceMain> listPage(); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.tairui.app.cim.mapper; |
| | | |
| | | import com.tairui.app.cim.dao.model.BusProductionDevice; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Select; |
| | | import org.apache.ibatis.annotations.Update; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author yw |
| | | * @since 2022-05-21 |
| | | */ |
| | | @Mapper |
| | | @Repository |
| | | public interface BusProductionDeviceMapper extends BaseMapper<BusProductionDevice> { |
| | | @Select("select * from bus_production_device ") |
| | | public List<BusProductionDevice> listPage(); |
| | | |
| | | @Update("update bus_production_device set status=#{status} where id= #{id}") |
| | | public int updateStatus(int status,long id); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.tairui.app.cim.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.tairui.app.cim.dao.model.CameraPoint; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Select; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author yw |
| | | * @since 2022-05-21 |
| | | */ |
| | | @Mapper |
| | | @Repository |
| | | public interface CameraMapper extends BaseMapper<CameraPoint> { |
| | | |
| | | @Select("select gid,geom ,ST_AsText(geom) as gwkt from camera_point ") |
| | | public List<CameraPoint> listPage(); |
| | | @Select("select gid,geom ,ST_AsText(geom) as gwkt from camera_point where gid=#{gid} ") |
| | | public List<CameraPoint> query(int gid); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.tairui.app.cim.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.tairui.app.cim.dao.model.AlarmPoint; |
| | | import com.tairui.app.cim.dao.model.Elevation; |
| | | import com.vividsolutions.jts.geom.Point; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author yw |
| | | * @since 2022-05-21 |
| | | */ |
| | | @Mapper |
| | | @Repository |
| | | public interface ElevationMapper extends BaseMapper<Elevation> { |
| | | |
| | | /** |
| | | * å
å«é¢ |
| | | * select * from (select gid,geom,coor_z,cen_x,cen_y,name from elevation_correction where floor_num='Floor5') |
| | | * as xx where ST_Within(st_geomfromtext('Point(124.041948 41.840189)',4326),xx.geom) |
| | | * |
| | | * @param x |
| | | * @param y |
| | | * @param floor |
| | | * @return |
| | | */ |
| | | @Select("select gid,to_char(coor_z,'999.999') as high ,name from elevation_correction " + |
| | | "where floor_num='${floor_num}' and ST_Within(st_geomfromtext('Point(${x} ${y})',4326),geom) ") |
| | | public List<Elevation> queryFloor(@Param("x") double x, @Param("y") double y, @Param("floor_num") String floor_num); |
| | | |
| | | |
| | | /** |
| | | * æ¥è¯¢æè¿çé¢ |
| | | * select * from (select gid,geom,coor_z,cen_x,cen_y,name from elevation_correction |
| | | * where floor_num='Floor3') as xx order by (st_geomfromtext('Point(124.04 41.840)',4326)<->xx.geom) asc limit 1 |
| | | * |
| | | * @param x |
| | | * @param y |
| | | * @param floor |
| | | * @return |
| | | */ |
| | | |
| | | @Select("select gid,to_char(coor_z,'999.999') as high ,ST_X(ST_AsText(ST_PointOnSurface(geom::geometry))) as cen_x," + |
| | | "ST_Y(ST_AsText(ST_PointOnSurface(geom::geometry))) as cen_y,name from elevation_correction " + |
| | | "where floor_num='${floor_num}' order by (st_geomfromtext('Point(${x} ${y})',4326)<->geom) asc limit 1") |
| | | public List<Elevation> queryMinDistance(@Param("x") double x, @Param("y") double y, @Param("floor_num") String floor_num); |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.tairui.app.cim.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.tairui.app.cim.dao.model.EmergencySuppliesPoint; |
| | | import com.tairui.app.cim.dao.model.Inspection; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Select; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author hyy |
| | | * @since 2022-08-22 |
| | | */ |
| | | @Mapper |
| | | public interface EmergencySuppliesPointMapper extends BaseMapper<EmergencySuppliesPoint> { |
| | | @Select("select gid,geom ,ST_AsText(geom) as gwkt from emergency_supplies_point where gid=#{gid} ") |
| | | public List<EmergencySuppliesPoint> query(int gid); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.tairui.app.cim.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.tairui.app.cim.dao.model.EntranceGuardPoint; |
| | | import com.tairui.app.cim.dao.model.Inspection; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Select; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author hyy |
| | | * @since 2022-08-22 |
| | | */ |
| | | @Mapper |
| | | public interface EntranceGuardPointMapper extends BaseMapper<EntranceGuardPoint> { |
| | | @Select("select gid,geom ,ST_AsText(geom) as gwkt from entrance_guard_point where gid=#{gid} ") |
| | | public List<EntranceGuardPoint> query(int gid); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.tairui.app.cim.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.tairui.app.cim.dao.model.EntranceGuardPoint; |
| | | import com.tairui.app.cim.dao.model.EvacuationPoint; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Select; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author hyy |
| | | * @since 2022-08-22 |
| | | */ |
| | | @Mapper |
| | | public interface EvacuationPointMapper extends BaseMapper<EvacuationPoint> { |
| | | @Select("select gid,geom ,ST_AsText(geom) as gwkt from evacuation_point where gid=#{gid} ") |
| | | public List<EvacuationPoint> query(int gid); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.tairui.app.cim.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.tairui.app.cim.dao.model.EvacuationPoint; |
| | | import com.tairui.app.cim.dao.model.FireEquipmentPoint; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Select; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author hyy |
| | | * @since 2022-08-23 |
| | | */ |
| | | @Mapper |
| | | public interface FireEquipmentPointMapper extends BaseMapper<FireEquipmentPoint> { |
| | | @Select("select gid,geom ,ST_AsText(geom) as gwkt from fire_equipment_point where gid=#{gid} ") |
| | | public List<FireEquipmentPoint> query(int gid); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.tairui.app.cim.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.tairui.app.cim.dao.model.Inspection; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Select; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author yw |
| | | * @since 2022-05-21 |
| | | */ |
| | | @Mapper |
| | | @Repository |
| | | public interface InspectionMapper extends BaseMapper<Inspection> { |
| | | |
| | | @Select("select gid,geom ,ST_AsText(geom) as gwkt from onsite_inspection_point ") |
| | | public List<Inspection> listPage(); |
| | | @Select("select gid,geom ,ST_AsText(geom) as gwkt from onsite_inspection_point where gid=#{gid} ") |
| | | public List<Inspection> query(int gid); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.tairui.app.cim.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.tairui.app.cim.dao.model.EvacuationPoint; |
| | | import com.tairui.app.cim.dao.model.MajorHazardsPoint; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Select; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author hyy |
| | | * @since 2022-08-22 |
| | | */ |
| | | @Mapper |
| | | public interface MajorHazardsPointMapper extends BaseMapper<MajorHazardsPoint> { |
| | | @Select("select gid,geom ,ST_AsText(geom) as gwkt from major_hazards_point where gid=#{gid} ") |
| | | public List<MajorHazardsPoint> query(int gid); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.tairui.app.cim.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.tairui.app.cim.dao.model.OperationArea; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Select; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author yw |
| | | * @since 2022-05-21 |
| | | */ |
| | | @Mapper |
| | | @Repository |
| | | public interface OperationAreaMapper extends BaseMapper<OperationArea> { |
| | | |
| | | @Select("select gid,geom ,ST_AsText(geom) as gwkt from operation_area ") |
| | | public List<OperationArea> listPage(); |
| | | @Select("select gid,geom ,ST_AsText(geom) as gwkt from operation_area where gid=#{gid} ") |
| | | public List<OperationArea> query(int gid); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.tairui.app.cim.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.tairui.app.cim.dao.model.PersonnelPoint; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Select; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author yw |
| | | * @since 2022-05-21 |
| | | */ |
| | | @Mapper |
| | | @Repository |
| | | public interface PersonnelPointMapper extends BaseMapper<PersonnelPoint> { |
| | | |
| | | @Select("select gid,geom ,ST_AsText(geom) as gwkt from personnel_point ") |
| | | public List<PersonnelPoint> listPage(); |
| | | @Select("select gid,geom ,ST_AsText(geom) as gwkt from personnel_point where gid=#{gid} ") |
| | | public List<PersonnelPoint> query(int gid); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.tairui.app.cim.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.tairui.app.cim.dao.model.ProductionArea; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Select; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author yw |
| | | * @since 2022-05-21 |
| | | */ |
| | | @Mapper |
| | | @Repository |
| | | public interface ProductionAreaMapper extends BaseMapper<ProductionArea> { |
| | | |
| | | @Select("select * from production_area ") |
| | | public List<ProductionArea> listPage(); |
| | | @Select("select name from production_area ") |
| | | public List<String> listAreaName(); |
| | | @Select("select gid,geom ,ST_AsText(geom) as gwkt from production_area where gid=#{gid} ") |
| | | public List<ProductionArea> query(int gid); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.tairui.app.cim.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.tairui.app.cim.dao.model.ProductionUnitArea; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Select; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author yw |
| | | * @since 2022-05-21 |
| | | */ |
| | | @Mapper |
| | | @Repository |
| | | public interface ProductionUnitAreaMapper extends BaseMapper<ProductionUnitArea> { |
| | | |
| | | @Select("select gid,geom ,ST_AsText(geom) as gwkt from production_unit_area where gid=#{gid} ") |
| | | public List<ProductionUnitArea> query(int gid); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.tairui.app.cim.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.tairui.app.cim.dao.model.Inspection; |
| | | import com.tairui.app.cim.dao.model.ToxicGasPoint; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Select; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author hyy |
| | | * @since 2022-08-22 |
| | | */ |
| | | @Mapper |
| | | @Repository |
| | | public interface ToxicGasPointMapper extends BaseMapper<ToxicGasPoint> { |
| | | @Select("select gid,geom ,ST_AsText(geom) as gwkt from toxic_gas_point where gid=#{gid} ") |
| | | public List<ToxicGasPoint> query(int gid); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.tairui.app.cim.mapper.BusDeviceMainMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.tairui.app.cim.dao.model.BusDeviceMain"> |
| | | <result column="bdm_id" property="bdmId" /> |
| | | <result column="device_no" property="deviceNo" /> |
| | | <result column="bdm_device_name" property="bdmDeviceName" /> |
| | | <result column="bdm_type_first" property="bdmTypeFirst" /> |
| | | <result column="bdm_type_second" property="bdmTypeSecond" /> |
| | | <result column="bdm_type_third" property="bdmTypeThird" /> |
| | | <result column="bdm_area" property="bdmArea" /> |
| | | <result column="unit_area" property="unitArea" /> |
| | | <result column="bdm_location" property="bdmLocation" /> |
| | | <result column="bdm_department" property="bdmDepartment" /> |
| | | <result column="bdm_purpose" property="bdmPurpose" /> |
| | | <result column="bdm_specification" property="bdmSpecification" /> |
| | | <result column="bdm_manufacturer" property="bdmManufacturer" /> |
| | | <result column="bdm_production_date" property="bdmProductionDate" /> |
| | | <result column="bdm_first_use_date" property="bdmFirstUseDate" /> |
| | | <result column="bdm_newest_use_date" property="bdmNewestUseDate" /> |
| | | <result column="bdm_newest_valid_date" property="bdmNewestValidDate" /> |
| | | <result column="bdm_use_state" property="bdmUseState" /> |
| | | <result column="bdm_device_state" property="bdmDeviceState" /> |
| | | <result column="bdm_remark" property="bdmRemark" /> |
| | | <result column="bdm_map_point_flag" property="bdmMapPointFlag" /> |
| | | <result column="bdm_deleted_flag" property="bdmDeletedFlag" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="create_user" property="createUser" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | <result column="update_user" property="updateUser" /> |
| | | <result column="bdm_type" property="bdmType" /> |
| | | <result column="model_id" property="modelId" /> |
| | | <result column="status" property="status" /> |
| | | </resultMap> |
| | | |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.tairui.app.cim.mapper.BusProductionDeviceMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.tairui.app.cim.dao.model.BusProductionDevice"> |
| | | <result column="id" property="id" /> |
| | | <result column="device_no" property="deviceNo" /> |
| | | <result column="device_name" property="deviceName" /> |
| | | <result column="dept_id" property="deptId" /> |
| | | <result column="deivce_type" property="deivceType" /> |
| | | <result column="sub_device_type" property="subDeviceType" /> |
| | | <result column="device_trand" property="deviceTrand" /> |
| | | <result column="region_id" property="regionId" /> |
| | | <result column="tag_number" property="tagNumber" /> |
| | | <result column="state" property="state" /> |
| | | <result column="factory_no" property="factoryNo" /> |
| | | <result column="special" property="special" /> |
| | | <result column="equipment" property="equipment" /> |
| | | <result column="responsibility_by" property="responsibilityBy" /> |
| | | <result column="model_id" property="modelId" /> |
| | | <result column="video_coding" property="videoCoding" /> |
| | | <result column="device_channel" property="deviceChannel" /> |
| | | <result column="bitstream_type" property="bitstreamType" /> |
| | | <result column="monitor_type" property="monitorType" /> |
| | | <result column="videotape_type" property="videotapeType" /> |
| | | <result column="in_out_type" property="inOutType" /> |
| | | <result column="device_model" property="deviceModel" /> |
| | | <result column="location" property="location" /> |
| | | <result column="purpose" property="purpose" /> |
| | | <result column="device_account" property="deviceAccount" /> |
| | | <result column="device_password" property="devicePassword" /> |
| | | <result column="ip" property="ip" /> |
| | | <result column="prot" property="prot" /> |
| | | <result column="del_flag" property="delFlag" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | <result column="bind_location" property="bindLocation" /> |
| | | <result column="bind_state" property="bindState" /> |
| | | <result column="channel_state" property="channelState" /> |
| | | <result column="video_address" property="videoAddress" /> |
| | | <result column="unit" property="unit" /> |
| | | <result column="infra_red_channel" property="infraRedChannel" /> |
| | | <result column="status" property="status" /> |
| | | <result column="unit_area" property="unitArea" /> |
| | | <result column="create_user" property="createUser" /> |
| | | <result column="update_user" property="updateUser" /> |
| | | </resultMap> |
| | | |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.tairui.app.cim.service; |
| | | |
| | | import com.tairui.app.cim.dao.model.BusDeviceMain; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | /** |
| | | * <p> |
| | | * æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author yw |
| | | * @since 2022-05-21 |
| | | */ |
| | | public interface IBusDeviceMainService extends IService<BusDeviceMain> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.tairui.app.cim.service; |
| | | |
| | | import com.tairui.app.cim.dao.model.BusProductionDevice; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | /** |
| | | * <p> |
| | | * æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author yw |
| | | * @since 2022-05-21 |
| | | */ |
| | | public interface IBusProductionDeviceService extends IService<BusProductionDevice> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.tairui.app.cim.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.tairui.app.cim.dao.model.ProductionArea; |
| | | |
| | | /** |
| | | * <p> |
| | | * æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author yw |
| | | * @since 2022-05-21 |
| | | */ |
| | | public interface IProductionAreaService extends IService<ProductionArea> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.tairui.app.cim.service.impl; |
| | | |
| | | import com.tairui.app.cim.dao.model.BusDeviceMain; |
| | | import com.tairui.app.cim.mapper.BusDeviceMainMapper; |
| | | import com.tairui.app.cim.service.IBusDeviceMainService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author yw |
| | | * @since 2022-05-21 |
| | | */ |
| | | @Service |
| | | public class BusDeviceMainServiceImpl extends ServiceImpl<BusDeviceMainMapper, BusDeviceMain> implements IBusDeviceMainService { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.tairui.app.cim.service.impl; |
| | | |
| | | import com.tairui.app.cim.dao.model.BusProductionDevice; |
| | | import com.tairui.app.cim.mapper.BusProductionDeviceMapper; |
| | | import com.tairui.app.cim.service.IBusProductionDeviceService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author yw |
| | | * @since 2022-05-21 |
| | | */ |
| | | @Service |
| | | public class BusProductionDeviceServiceImpl extends ServiceImpl<BusProductionDeviceMapper, BusProductionDevice> implements IBusProductionDeviceService { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.tairui.app.cim.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.tairui.app.cim.dao.model.ProductionArea; |
| | | import com.tairui.app.cim.mapper.ProductionAreaMapper; |
| | | import com.tairui.app.cim.service.IProductionAreaService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author yw |
| | | * @since 2022-05-21 |
| | | */ |
| | | @Service |
| | | public class ProductionAreaServiceImpl extends ServiceImpl<ProductionAreaMapper, ProductionArea> implements IProductionAreaService { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.tairui.app.cim.util; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.core.exceptions.MybatisPlusException; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringPool; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.baomidou.mybatisplus.generator.AutoGenerator; |
| | | import com.baomidou.mybatisplus.generator.InjectionConfig; |
| | | import com.baomidou.mybatisplus.generator.config.*; |
| | | import com.baomidou.mybatisplus.generator.config.po.TableInfo; |
| | | import com.baomidou.mybatisplus.generator.config.rules.DateType; |
| | | import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy; |
| | | |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Scanner; |
| | | |
| | | /** |
| | | * @program: spring-boot-parent |
| | | * @description: 代ç çæå·¥å
·ç±» |
| | | * @author: |
| | | * @create: 2020-12-14 19:23 |
| | | */ |
| | | public class CodeGenerator { |
| | | |
| | | /** |
| | | * <p> |
| | | * è¯»åæ§å¶å°å
容 |
| | | * </p> |
| | | */ |
| | | public static String scanner(String tip) { |
| | | Scanner scanner = new Scanner(System.in); |
| | | StringBuilder help = new StringBuilder(); |
| | | help.append("请è¾å
¥" + tip + "ï¼"); |
| | | System.out.println(help.toString()); |
| | | if (scanner.hasNext()) { |
| | | String ipt = scanner.next(); |
| | | if (StringUtils.isNotBlank(ipt)) { |
| | | return ipt; |
| | | } |
| | | } |
| | | throw new MybatisPlusException("请è¾å
¥æ£ç¡®ç" + tip + "ï¼"); |
| | | } |
| | | |
| | | |
| | | public static void main(String[] args) { |
| | | // 代ç çæå¨ |
| | | AutoGenerator mpg = new AutoGenerator(); |
| | | |
| | | // å
¨å±é
ç½® |
| | | GlobalConfig gc = new GlobalConfig(); |
| | | String projectPath = System.getProperty("user.dir"); |
| | | gc.setOutputDir(projectPath + "/src/main/java"); |
| | | gc.setAuthor("hyy");//设置ä½è
|
| | | gc.setOpen(false); |
| | | gc.setFileOverride(false); |
| | | gc.setIdType(IdType.ASSIGN_ID); |
| | | gc.setDateType(DateType.ONLY_DATE); |
| | | gc.setSwagger2(true); //å®ä½å±æ§ Swagger2 注解 |
| | | gc.setServiceName("%sService"); //廿Serviceæ¥å£çé¦åæ¯I |
| | | gc.setBaseResultMap(true); |
| | | gc.setBaseColumnList(true); |
| | | mpg.setGlobalConfig(gc); |
| | | |
| | | TemplateConfig templateConfig = new TemplateConfig() |
| | | .setController(ConstVal.TEMPLATE_CONTROLLER).setXml(null) |
| | | .setServiceImpl(ConstVal.TEMPLATE_SERVICE_IMPL).setXml(null) |
| | | .setMapper(ConstVal.TEMPLATE_MAPPER).setXml(null) |
| | | .setService(ConstVal.TEMPLATE_SERVICE).setXml(null); |
| | | |
| | | mpg.setTemplate(templateConfig); |
| | | // æ°æ®æºé
ç½® |
| | | DataSourceConfig dsc = new DataSourceConfig(); |
| | | dsc.setUrl("jdbc:postgresql://192.168.22.198:5432/fssh?characterEncoding=utf8&ssl=false"); |
| | | // dsc.setSchemaName("public"); |
| | | dsc.setDriverName("org.postgresql.Driver"); |
| | | dsc.setUsername("postgres"); |
| | | dsc.setPassword("postgres"); |
| | | // dsc.setUrl("jdbc:mysql://localhost:3306/cyioc?charset=utf8mb4&useSSL=false&characterEncoding=utf-8&serverTimezone=Asia/Shanghai"); |
| | | // // dsc.setSchemaName("public"); |
| | | // dsc.setDriverName("com.mysql.cj.jdbc.Driver"); |
| | | // dsc.setUsername("root"); |
| | | // dsc.setPassword("123456"); |
| | | // dsc.setDbType(DbType.MYSQL); |
| | | mpg.setDataSource(dsc); |
| | | |
| | | |
| | | // å
é
ç½® |
| | | PackageConfig pc = new PackageConfig(); |
| | | pc.setParent("com.tairui.app.cim"); |
| | | pc.setModuleName(scanner("模åå")); |
| | | pc.setEntity("domain"); |
| | | pc.setMapper("mapper"); |
| | | pc.setService("service"); |
| | | pc.setController("controller"); |
| | | mpg.setPackageInfo(pc); |
| | | |
| | | |
| | | // å¦ææ¨¡æ¿å¼ææ¯ velocity |
| | | // String templatePath = "/templates/mapper.xml.vm"; |
| | | |
| | | |
| | | // çç¥é
ç½® |
| | | StrategyConfig strategy = new StrategyConfig(); |
| | | strategy.setNaming(NamingStrategy.underline_to_camel); |
| | | strategy.setColumnNaming(NamingStrategy.underline_to_camel); |
| | | strategy.setEntityLombokModel(true); |
| | | strategy.setRestControllerStyle(true); |
| | | //å
Œ
±ç¶ç±» |
| | | //strategy.setSuperControllerClass("BaseEntity"); |
| | | // strategy.setSuperEntityClass(BaseEntity.class); |
| | | // åäºç¶ç±»ä¸çå
Œ
±å段 |
| | | // strategy.setSuperEntityColumns("id", "create_time", "update_time"); |
| | | strategy.setInclude(scanner("表åï¼å¤ä¸ªè±æéå·åå²").split(",")); |
| | | strategy.setControllerMappingHyphenStyle(true); |
| | | strategy.setTablePrefix(pc.getModuleName() + "_"); |
| | | strategy.setVersionFieldName("version"); |
| | | |
| | | |
| | | InjectionConfig cfg = new InjectionConfig() { |
| | | @Override |
| | | public void initMap() { |
| | | } |
| | | }; |
| | | List<FileOutConfig> configList = new ArrayList<>(); |
| | | configList.add(new FileOutConfig(ConstVal.TEMPLATE_XML+ ".vm") { |
| | | @Override |
| | | public String outputFile(TableInfo tableInfo) { |
| | | return projectPath+"/src/main/resources/"+pc.getParent().replace(".","/") |
| | | +"/mapper/"+tableInfo.getXmlName()+ StringPool.DOT_XML; |
| | | } |
| | | }); |
| | | cfg.setFileOutConfigList(configList); |
| | | mpg.setCfg(cfg); |
| | | mpg.setStrategy(strategy); |
| | | mpg.execute(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.tairui.app.cim.util; |
| | | |
| | | |
| | | import com.vividsolutions.jts.geom.Geometry; |
| | | import com.vividsolutions.jts.geom.GeometryFactory; |
| | | import com.vividsolutions.jts.geom.Point; |
| | | import com.vividsolutions.jts.io.WKBReader; |
| | | import com.vividsolutions.jts.io.WKTReader; |
| | | import org.geotools.geojson.geom.GeometryJSON; |
| | | import org.springframework.util.StringUtils; |
| | | |
| | | import java.io.IOException; |
| | | import java.io.StringWriter; |
| | | |
| | | public class GeoJsonUtil { |
| | | |
| | | |
| | | public static String getGeoJSON(Point geometry){ |
| | | |
| | | if(geometry==null){ |
| | | return null; |
| | | } |
| | | StringWriter writer = new StringWriter(); |
| | | GeometryJSON g = new GeometryJSON(); |
| | | try { |
| | | g.write(geometry, writer); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | String json = writer.toString(); |
| | | if("null".equals(json)){ |
| | | json = null; |
| | | } |
| | | return json; |
| | | } |
| | | |
| | | public static Geometry getGeometryFromGeometryBinargy(String hexString){ |
| | | GeometryFactory geometryFactory = new GeometryFactory(); |
| | | WKBReader wktReader = new WKBReader(); |
| | | Geometry geometry = null ; |
| | | try { |
| | | geometry = wktReader.read(WKBReader.hexToBytes(hexString)); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return geometry ; |
| | | } |
| | | |
| | | //geoJSONæ ¼å¼å符串转Pointç±»å |
| | | public static Geometry getGeometryFromGeoJSON(String geoJSON){ |
| | | |
| | | if(StringUtils.isEmpty(geoJSON)){ |
| | | return null; |
| | | } |
| | | |
| | | GeometryJSON g = new GeometryJSON(); |
| | | |
| | | Geometry geometry =null ; |
| | | |
| | | try { |
| | | |
| | | geometry=(Geometry)g.read(geoJSON); |
| | | } catch (IOException e) { |
| | | // TODO Auto-generated catch block |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | |
| | | return geometry; |
| | | } |
| | | |
| | | //æ°æ®åºAsTextæ¥è¯¢åºæ¥çwktæ ¼å¼çå符串转为geoJSONè¿åå°å端 |
| | | public static String getGeoJSONFromWKT(String geoWkt){ |
| | | |
| | | if(StringUtils.isEmpty(geoWkt)){ |
| | | return null; |
| | | } |
| | | WKTReader reader = new WKTReader(); |
| | | |
| | | String ret = null; |
| | | try { |
| | | Geometry geometry = reader.read(geoWkt); |
| | | StringWriter writer = new StringWriter(); |
| | | GeometryJSON g = new GeometryJSON(); |
| | | g.write(geometry, writer); |
| | | ret = writer.toString(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return ret; |
| | | |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.tairui.app.cim.util; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | |
| | | @Configuration |
| | | public class MyBatisPage { |
| | | |
| | | /** |
| | | * é
ç½®PaginationInterceptor,使å
¶å页æä»¶ææ |
| | | * @return |
| | | */ |
| | | @Bean |
| | | public PaginationInterceptor paginationInterceptor() { |
| | | return new PaginationInterceptor(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.tairui.app.cim.util; |
| | | |
| | | import org.apache.ibatis.type.BaseTypeHandler; |
| | | import org.apache.ibatis.type.JdbcType; |
| | | import org.apache.ibatis.type.MappedTypes; |
| | | import org.postgis.PGgeometry; |
| | | |
| | | import java.sql.CallableStatement; |
| | | import java.sql.PreparedStatement; |
| | | import java.sql.ResultSet; |
| | | import java.sql.SQLException; |
| | | |
| | | @MappedTypes({String.class}) |
| | | public class MyGeometryHandler extends BaseTypeHandler<String> { |
| | | @Override |
| | | public void setNonNullParameter(PreparedStatement ps, int i, String parameter, JdbcType jdbcType) throws SQLException { |
| | | PGgeometry pGgeometry = new PGgeometry(parameter); |
| | | ps.setObject(i, pGgeometry); |
| | | } |
| | | |
| | | @Override |
| | | public String getNullableResult(ResultSet rs, String columnName) throws SQLException { |
| | | PGgeometry pGgeometry = new PGgeometry(rs.getString(columnName)); |
| | | if (pGgeometry == null) { |
| | | return null; |
| | | } |
| | | return pGgeometry.toString(); |
| | | } |
| | | |
| | | @Override |
| | | public String getNullableResult(ResultSet rs, int columnIndex) throws SQLException { |
| | | PGgeometry pGgeometry = new PGgeometry(rs.getString(columnIndex)); |
| | | if (pGgeometry == null) { |
| | | return null; |
| | | } |
| | | return pGgeometry.toString(); |
| | | } |
| | | |
| | | @Override |
| | | public String getNullableResult(CallableStatement cs, int columnIndex) throws SQLException { |
| | | |
| | | PGgeometry pGgeometry = new PGgeometry(cs.getString(columnIndex)); |
| | | if (pGgeometry == null) { |
| | | return null; |
| | | } |
| | | return pGgeometry.toString(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | server: |
| | | port: 8543 |
| | | servlet: |
| | | context-path: /fssh |
| | | # æ°æ®æºé
ç½® |
| | | spring: |
| | | datasource: |
| | | type: com.alibaba.druid.pool.DruidDataSource |
| | | driverClassName: org.postgresql.Driver |
| | | url: jdbc:postgresql://192.168.22.198:5432/fssh?characterEncoding=utf8&ssl=false |
| | | username: postgres |
| | | # 1.é
ç½®çæçpassword |
| | | password: postgres |
| | | # Druidæ°æ®æºé
ç½® |
| | | # åå§è¿æ¥æ° |
| | | initialSize: 5 |
| | | # æå°è¿æ¥æ± æ°é |
| | | minIdle: 10 |
| | | # æå¤§è¿æ¥æ± æ°é |
| | | maxActive: 20 |
| | | # é
ç½®è·åè¿æ¥çå¾
è¶
æ¶çæ¶é´ |
| | | maxWait: 60000 |
| | | # é
ç½®é´éå¤ä¹
æè¿è¡ä¸æ¬¡æ£æµï¼æ£æµéè¦å
³éç空é²è¿æ¥ï¼å使¯æ¯«ç§ |
| | | timeBetweenEvictionRunsMillis: 60000 |
| | | # é
ç½®ä¸ä¸ªè¿æ¥å¨æ± 䏿å°çåçæ¶é´ï¼å使¯æ¯«ç§ |
| | | minEvictableIdleTimeMillis: 300000 |
| | | # é
ç½®ä¸ä¸ªè¿æ¥å¨æ± 䏿大çåçæ¶é´ï¼å使¯æ¯«ç§ |
| | | maxEvictableIdleTimeMillis: 900000 |
| | | # é
ç½®æ£æµè¿æ¥æ¯å¦ææ |
| | | validationQuery: SELECT 1 FROM DUAL |
| | | #ç³è¯·è¿æ¥çæ¶åæ£æµï¼å¦æç©ºé²æ¶é´å¤§äºtimeBetweenEvictionRunsMillisï¼æ§è¡validationQueryæ£æµè¿æ¥æ¯å¦ææã |
| | | testWhileIdle: true |
| | | #é
ç½®ä»è¿æ¥æ± è·åè¿æ¥æ¶ï¼æ¯å¦æ£æ¥è¿æ¥æææ§ï¼trueæ¯æ¬¡é½æ£æ¥ï¼false䏿£æ¥ãåäºè¿ä¸ªé
ç½®ä¼é使§è½ã |
| | | testOnBorrow: false |
| | | #é
ç½®åè¿æ¥æ± å½è¿è¿æ¥æ¶ï¼æ¯å¦æ£æ¥è¿æ¥æææ§ï¼trueæ¯æ¬¡é½æ£æ¥ï¼false䏿£æ¥ãåäºè¿ä¸ªé
ç½®ä¼é使§è½ã |
| | | testOnReturn: false |
| | | #æå¼PsCacheï¼å¹¶ä¸æå®æ¯ä¸ªè¿æ¥ä¸PSCacheçå¤§å° |
| | | poolPreparedStatements: true |
| | | maxPoolPreparedStatementPerConnectionSize: 20 |
| | | # é
ç½®çæ§ç»è®¡æ¦æªçfiltersï¼å»æåçæ§çé¢sqlæ æ³ç»è®¡ï¼'wall'ç¨äºé²ç«å¢ |
| | | filters: stat,wall,log4j |
| | | #åå¹¶å¤ä¸ªDruidDatasourceççæ§æ°æ® |
| | | useGlobalDataSourceStat: true |
| | | #éè¿connectProperties屿§æ¥æå¼mergesqlåè½ç½æ
¢sQLè®°å½ |
| | | connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=500; |
| | | |
| | | #spring: |
| | | # |
| | | # datasource: |
| | | # driver-class-name: org.postgresql.Driver |
| | | # url: jdbc:postgresql://192.168.22.198:5432/fssh?characterEncoding=utf8&ssl=false |
| | | ## username: postgres |
| | | # # Tam@root |
| | | # # terra@123 |
| | | ## url: jdbc:postgresql://127.0.0.1:5432/fssh?characterEncoding=utf8&ssl=false |
| | | # username: postgres |
| | | # password: postgres |
| | | # # è¿éæ´å¾æ°æ®ç龿¥ãç¨äºåæ¾ææä¿¡æ¯ä»¥ååæä½¿ç¨ |
| | | |
| | | jackson: |
| | | date-format: yyyy-MM-dd HH:mm:ss |
| | | time-zone: GMT+8 |
| | | serialization: |
| | | write-dates-as-timestamps: false |
| | | # redis é
ç½® |
| | | |
| | | sql: |
| | | init: |
| | | platform: postgres |
| | | |
| | | logging: |
| | | level: |
| | | com.example.demo.cim.mapper: debug |
| | | mybatis-plus: |
| | | mapper-locations: classpath*:org/jeecg/modules/**/xml/*Mapper.xml |
| | | global-config: |
| | | # å
³éMP3.0èªå¸¦çbanner |
| | | banner: false |
| | | db-config: |
| | | #主é®ç±»å |
| | | id-type: ASSIGN_ID |
| | | # é»è®¤æ°æ®åºè¡¨ä¸å线å½å |
| | | table-underline: true |
| | | configuration: |
| | | # è¿ä¸ªé
ç½®ä¼å°æ§è¡çsqlæå°åºæ¥ï¼å¨å¼åææµè¯çæ¶åå¯ä»¥ç¨ |
| | | log-impl: org.apache.ibatis.logging.stdout.StdOutImpl |
| | | # è¿åç±»å为Map,æ¾ç¤ºnull对åºçåæ®µ |
| | | call-setters-on-nulls: true |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.tairui.app.cim.test.mapper.EmergencySuppliesPointMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.tairui.app.cim.test.domain.EmergencySuppliesPoint"> |
| | | <id column="gid" property="gid" /> |
| | | <result column="point_id" property="pointId" /> |
| | | <result column="point_type" property="pointType" /> |
| | | <result column="org_code" property="orgCode" /> |
| | | <result column="point_name" property="pointName" /> |
| | | <result column="createuser" property="createuser" /> |
| | | <result column="createtime" property="createtime" /> |
| | | <result column="updateuser" property="updateuser" /> |
| | | <result column="updatetime" property="updatetime" /> |
| | | <result column="coor_z" property="coorZ" /> |
| | | <result column="status" property="status" /> |
| | | <result column="remarks" property="remarks" /> |
| | | <result column="geom" property="geom" /> |
| | | </resultMap> |
| | | |
| | | <!-- éç¨æ¥è¯¢ç»æå --> |
| | | <sql id="Base_Column_List"> |
| | | gid, point_id, point_type, org_code, point_name, createuser, createtime, updateuser, updatetime, coor_z, status, remarks, geom |
| | | </sql> |
| | | |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.tairui.app.cim.test.mapper.EntranceGuardPointMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.tairui.app.cim.test.domain.EntranceGuardPoint"> |
| | | <id column="gid" property="gid" /> |
| | | <result column="point_id" property="pointId" /> |
| | | <result column="point_type" property="pointType" /> |
| | | <result column="org_code" property="orgCode" /> |
| | | <result column="point_name" property="pointName" /> |
| | | <result column="createuser" property="createuser" /> |
| | | <result column="createtime" property="createtime" /> |
| | | <result column="updateuser" property="updateuser" /> |
| | | <result column="updatetime" property="updatetime" /> |
| | | <result column="coor_z" property="coorZ" /> |
| | | <result column="status" property="status" /> |
| | | <result column="remarks" property="remarks" /> |
| | | <result column="bind_key" property="bindKey" /> |
| | | <result column="geom" property="geom" /> |
| | | </resultMap> |
| | | |
| | | <!-- éç¨æ¥è¯¢ç»æå --> |
| | | <sql id="Base_Column_List"> |
| | | gid, point_id, point_type, org_code, point_name, createuser, createtime, updateuser, updatetime, coor_z, status, remarks, bind_key, geom |
| | | </sql> |
| | | |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.tairui.app.cim.test.mapper.EvacuationPointMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.tairui.app.cim.test.domain.EvacuationPoint"> |
| | | <id column="gid" property="gid" /> |
| | | <result column="point_id" property="pointId" /> |
| | | <result column="point_type" property="pointType" /> |
| | | <result column="org_code" property="orgCode" /> |
| | | <result column="point_name" property="pointName" /> |
| | | <result column="createuser" property="createuser" /> |
| | | <result column="createtime" property="createtime" /> |
| | | <result column="updateuser" property="updateuser" /> |
| | | <result column="updatetime" property="updatetime" /> |
| | | <result column="coor_z" property="coorZ" /> |
| | | <result column="status" property="status" /> |
| | | <result column="remarks" property="remarks" /> |
| | | <result column="bind_key" property="bindKey" /> |
| | | <result column="geom" property="geom" /> |
| | | </resultMap> |
| | | |
| | | <!-- éç¨æ¥è¯¢ç»æå --> |
| | | <sql id="Base_Column_List"> |
| | | gid, point_id, point_type, org_code, point_name, createuser, createtime, updateuser, updatetime, coor_z, status, remarks, bind_key, geom |
| | | </sql> |
| | | |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.tairui.app.cim.test.mapper.FireEquipmentPointMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.tairui.app.cim.test.domain.FireEquipmentPoint"> |
| | | <id column="gid" property="gid" /> |
| | | <result column="point_id" property="pointId" /> |
| | | <result column="point_type" property="pointType" /> |
| | | <result column="org_code" property="orgCode" /> |
| | | <result column="point_name" property="pointName" /> |
| | | <result column="createuser" property="createuser" /> |
| | | <result column="createtime" property="createtime" /> |
| | | <result column="updateuser" property="updateuser" /> |
| | | <result column="updatetime" property="updatetime" /> |
| | | <result column="coor_z" property="coorZ" /> |
| | | <result column="status" property="status" /> |
| | | <result column="remarks" property="remarks" /> |
| | | <result column="geom" property="geom" /> |
| | | </resultMap> |
| | | |
| | | <!-- éç¨æ¥è¯¢ç»æå --> |
| | | <sql id="Base_Column_List"> |
| | | gid, point_id, point_type, org_code, point_name, createuser, createtime, updateuser, updatetime, coor_z, status, remarks, geom |
| | | </sql> |
| | | |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.tairui.app.cim.test.mapper.MajorHazardsPointMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.tairui.app.cim.test.domain.MajorHazardsPoint"> |
| | | <id column="gid" property="gid" /> |
| | | <result column="point_id" property="pointId" /> |
| | | <result column="point_type" property="pointType" /> |
| | | <result column="org_code" property="orgCode" /> |
| | | <result column="point_name" property="pointName" /> |
| | | <result column="createuser" property="createuser" /> |
| | | <result column="createtime" property="createtime" /> |
| | | <result column="updateuser" property="updateuser" /> |
| | | <result column="updatetime" property="updatetime" /> |
| | | <result column="coor_z" property="coorZ" /> |
| | | <result column="status" property="status" /> |
| | | <result column="remarks" property="remarks" /> |
| | | <result column="geom" property="geom" /> |
| | | </resultMap> |
| | | |
| | | <!-- éç¨æ¥è¯¢ç»æå --> |
| | | <sql id="Base_Column_List"> |
| | | gid, point_id, point_type, org_code, point_name, createuser, createtime, updateuser, updatetime, coor_z, status, remarks, geom |
| | | </sql> |
| | | |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.tairui.app.cim.test.mapper.ToxicGasPointMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.tairui.app.cim.test.domain.ToxicGasPoint"> |
| | | <id column="gid" property="gid" /> |
| | | <result column="point_id" property="pointId" /> |
| | | <result column="point_type" property="pointType" /> |
| | | <result column="org_code" property="orgCode" /> |
| | | <result column="point_name" property="pointName" /> |
| | | <result column="createuser" property="createuser" /> |
| | | <result column="createtime" property="createtime" /> |
| | | <result column="updateuser" property="updateuser" /> |
| | | <result column="updatetime" property="updatetime" /> |
| | | <result column="coor_z" property="coorZ" /> |
| | | <result column="status" property="status" /> |
| | | <result column="remarks" property="remarks" /> |
| | | <result column="bind_key" property="bindKey" /> |
| | | <result column="geom" property="geom" /> |
| | | </resultMap> |
| | | |
| | | <!-- éç¨æ¥è¯¢ç»æå --> |
| | | <sql id="Base_Column_List"> |
| | | gid, point_id, point_type, org_code, point_name, createuser, createtime, updateuser, updatetime, coor_z, status, remarks, bind_key, geom |
| | | </sql> |
| | | |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.tairui.app; |
| | | |
| | | import org.junit.jupiter.api.Test; |
| | | import org.springframework.boot.test.context.SpringBootTest; |
| | | |
| | | @SpringBootTest |
| | | class DemoApplicationTests { |
| | | |
| | | @Test |
| | | void contextLoads() { |
| | | } |
| | | |
| | | } |