Commit 7d7a0f69 authored by hkl's avatar hkl

Merge branch 'dev' into 'master'

Dev

See merge request !2
parents e325c69c 227f17c6
...@@ -78,6 +78,12 @@ ...@@ -78,6 +78,12 @@
<artifactId>micrometer-registry-prometheus</artifactId> <artifactId>micrometer-registry-prometheus</artifactId>
</dependency> </dependency>
<!-- <dependency>-->
<!-- <groupId>cn.hutool</groupId>-->
<!-- <artifactId>hutool-extra</artifactId>-->
<!-- <version>${hutool.version}</version>-->
<!-- </dependency>-->
<!-- commons --> <!-- commons -->
<dependency> <dependency>
<groupId>commons-io</groupId> <groupId>commons-io</groupId>
......
...@@ -9,169 +9,178 @@ import org.jeecg.common.constant.CommonConstant; ...@@ -9,169 +9,178 @@ import org.jeecg.common.constant.CommonConstant;
import java.io.Serializable; import java.io.Serializable;
/** /**
* 接口返回数据格式 * 接口返回数据格式
*
* @author scott * @author scott
* @email jeecgos@163.com * @email jeecgos@163.com
* @date 2019年1月19日 * @date 2019年1月19日
*/ */
@Data @Data
@ApiModel(value="接口返回对象", description="接口返回对象") @ApiModel(value = "接口返回对象", description = "接口返回对象")
public class Result<T> implements Serializable { public class Result<T> implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/**
* 成功标志 public void setSuccess(boolean success) {
*/ this.success = success;
@ApiModelProperty(value = "成功标志") if (success == true) {
private boolean success = true; this.code = 200;
}
/** }
* 返回处理消息
*/ /**
@ApiModelProperty(value = "返回处理消息") * 成功标志
private String message = ""; */
@ApiModelProperty(value = "成功标志")
/** private boolean success = true;
* 返回代码 /**
*/ * 返回处理消息
@ApiModelProperty(value = "返回代码") */
private Integer code = 0; @ApiModelProperty(value = "返回处理消息")
private String message = "";
/**
* 返回数据对象 data /**
*/ * 返回代码
@ApiModelProperty(value = "返回数据对象") */
private T result; @ApiModelProperty(value = "返回代码")
private Integer code = 0;
/**
* 时间戳 /**
*/ * 返回数据对象 data
@ApiModelProperty(value = "时间戳") */
private long timestamp = System.currentTimeMillis(); @ApiModelProperty(value = "返回数据对象")
private T result;
public Result() {
} /**
* 时间戳
*/
@ApiModelProperty(value = "时间戳")
private long timestamp = System.currentTimeMillis();
public Result() {
}
/** /**
* 兼容VUE3版token失效不跳转登录页面 * 兼容VUE3版token失效不跳转登录页面
*
* @param code * @param code
* @param message * @param message
*/ */
public Result(Integer code, String message) { public Result(Integer code, String message) {
this.code = code; this.code = code;
this.message = message; this.message = message;
} }
public Result<T> success(String message) { public Result<T> success(String message) {
this.message = message; this.message = message;
this.code = CommonConstant.SC_OK_200; this.code = CommonConstant.SC_OK_200;
this.success = true; this.success = true;
return this; return this;
} }
public static<T> Result<T> ok() { public static <T> Result<T> ok() {
Result<T> r = new Result<T>(); Result<T> r = new Result<T>();
r.setSuccess(true); r.setSuccess(true);
r.setCode(CommonConstant.SC_OK_200); r.setCode(CommonConstant.SC_OK_200);
return r; return r;
} }
public static<T> Result<T> ok(String msg) { public static <T> Result<T> ok(String msg) {
Result<T> r = new Result<T>(); Result<T> r = new Result<T>();
r.setSuccess(true); r.setSuccess(true);
r.setCode(CommonConstant.SC_OK_200); r.setCode(CommonConstant.SC_OK_200);
//Result OK(String msg)方法会造成兼容性问题 issues/I4IP3D //Result OK(String msg)方法会造成兼容性问题 issues/I4IP3D
r.setResult((T) msg); r.setResult((T) msg);
r.setMessage(msg); r.setMessage(msg);
return r; return r;
} }
public static<T> Result<T> ok(T data) { public static <T> Result<T> ok(T data) {
Result<T> r = new Result<T>(); Result<T> r = new Result<T>();
r.setSuccess(true); r.setSuccess(true);
r.setCode(CommonConstant.SC_OK_200); r.setCode(CommonConstant.SC_OK_200);
r.setResult(data); r.setResult(data);
return r; return r;
} }
public static<T> Result<T> OK() { public static <T> Result<T> OK() {
Result<T> r = new Result<T>(); Result<T> r = new Result<T>();
r.setSuccess(true); r.setSuccess(true);
r.setCode(CommonConstant.SC_OK_200); r.setCode(CommonConstant.SC_OK_200);
return r; return r;
} }
/** /**
* 此方法是为了兼容升级所创建 * 此方法是为了兼容升级所创建
* *
* @param msg * @param msg
* @param <T> * @param <T>
* @return * @return
*/ */
public static<T> Result<T> OK(String msg) { public static <T> Result<T> OK(String msg) {
Result<T> r = new Result<T>(); Result<T> r = new Result<T>();
r.setSuccess(true); r.setSuccess(true);
r.setCode(CommonConstant.SC_OK_200); r.setCode(CommonConstant.SC_OK_200);
r.setMessage(msg); r.setMessage(msg);
//Result OK(String msg)方法会造成兼容性问题 issues/I4IP3D //Result OK(String msg)方法会造成兼容性问题 issues/I4IP3D
r.setResult((T) msg); r.setResult((T) msg);
return r; return r;
} }
public static<T> Result<T> OK(T data) { public static <T> Result<T> OK(T data) {
Result<T> r = new Result<T>(); Result<T> r = new Result<T>();
r.setSuccess(true); r.setSuccess(true);
r.setCode(CommonConstant.SC_OK_200); r.setCode(CommonConstant.SC_OK_200);
r.setResult(data); r.setResult(data);
return r; return r;
} }
public static<T> Result<T> OK(String msg, T data) { public static <T> Result<T> OK(String msg, T data) {
Result<T> r = new Result<T>(); Result<T> r = new Result<T>();
r.setSuccess(true); r.setSuccess(true);
r.setCode(CommonConstant.SC_OK_200); r.setCode(CommonConstant.SC_OK_200);
r.setMessage(msg); r.setMessage(msg);
r.setResult(data); r.setResult(data);
return r; return r;
} }
public static<T> Result<T> error(String msg, T data) { public static <T> Result<T> error(String msg, T data) {
Result<T> r = new Result<T>(); Result<T> r = new Result<T>();
r.setSuccess(false); r.setSuccess(false);
r.setCode(CommonConstant.SC_INTERNAL_SERVER_ERROR_500); r.setCode(CommonConstant.SC_INTERNAL_SERVER_ERROR_500);
r.setMessage(msg); r.setMessage(msg);
r.setResult(data); r.setResult(data);
return r; return r;
} }
public static<T> Result<T> error(String msg) { public static <T> Result<T> error(String msg) {
return error(CommonConstant.SC_INTERNAL_SERVER_ERROR_500, msg); return error(CommonConstant.SC_INTERNAL_SERVER_ERROR_500, msg);
} }
public static<T> Result<T> error(int code, String msg) { public static <T> Result<T> error(int code, String msg) {
Result<T> r = new Result<T>(); Result<T> r = new Result<T>();
r.setCode(code); r.setCode(code);
r.setMessage(msg); r.setMessage(msg);
r.setSuccess(false); r.setSuccess(false);
return r; return r;
} }
public Result<T> error500(String message) { public Result<T> error500(String message) {
this.message = message; this.message = message;
this.code = CommonConstant.SC_INTERNAL_SERVER_ERROR_500; this.code = CommonConstant.SC_INTERNAL_SERVER_ERROR_500;
this.success = false; this.success = false;
return this; return this;
} }
/** /**
* 无权限访问返回结果 * 无权限访问返回结果
*/ */
public static<T> Result<T> noauth(String msg) { public static <T> Result<T> noauth(String msg) {
return error(CommonConstant.SC_JEECG_NO_AUTHZ, msg); return error(CommonConstant.SC_JEECG_NO_AUTHZ, msg);
} }
@JsonIgnore @JsonIgnore
private String onlTable; private String onlTable;
} }
\ No newline at end of file
package org.jeecg.common.util;
public class EntityUtil {
// public static <T> t
}
...@@ -14,8 +14,8 @@ import org.springframework.http.ResponseEntity; ...@@ -14,8 +14,8 @@ import org.springframework.http.ResponseEntity;
*/ */
public class RestDesformUtil { public class RestDesformUtil {
private static String domain = null; public static String domain = null;
private static String path = null; public static String path = null;
static { static {
domain = SpringContextUtils.getDomain(); domain = SpringContextUtils.getDomain();
......
...@@ -25,59 +25,59 @@ public class FileTypeFilter { ...@@ -25,59 +25,59 @@ public class FileTypeFilter {
static { static {
FILE_TYPE_MAP.put("3c25402070616765206c", "jsp"); FILE_TYPE_MAP.put("3c25402070616765206c", "jsp");
FILE_TYPE_MAP.put("3c3f7068700a0a2f2a2a0a202a205048", "php"); FILE_TYPE_MAP.put("3c3f7068700a0a2f2a2a0a202a205048", "php");
/* fileTypeMap.put("ffd8ffe000104a464946", "jpg"); FILE_TYPE_MAP.put("ffd8ffe000104a464946", "jpg");
fileTypeMap.put("89504e470d0a1a0a0000", "png"); FILE_TYPE_MAP.put("89504e470d0a1a0a0000", "png");
fileTypeMap.put("47494638396126026f01", "gif"); FILE_TYPE_MAP.put("47494638396126026f01", "gif");
fileTypeMap.put("49492a00227105008037", "tif"); FILE_TYPE_MAP.put("49492a00227105008037", "tif");
fileTypeMap.put("424d228c010000000000", "bmp"); FILE_TYPE_MAP.put("424d228c010000000000", "bmp");
fileTypeMap.put("424d8240090000000000", "bmp"); FILE_TYPE_MAP.put("424d8240090000000000", "bmp");
fileTypeMap.put("424d8e1b030000000000", "bmp"); FILE_TYPE_MAP.put("424d8e1b030000000000", "bmp");
fileTypeMap.put("41433130313500000000", "dwg"); FILE_TYPE_MAP.put("41433130313500000000", "dwg");
fileTypeMap.put("3c21444f435459504520", "html"); FILE_TYPE_MAP.put("3c21444f435459504520", "html");
fileTypeMap.put("3c21646f637479706520", "htm"); FILE_TYPE_MAP.put("3c21646f637479706520", "htm");
fileTypeMap.put("48544d4c207b0d0a0942", "css"); FILE_TYPE_MAP.put("48544d4c207b0d0a0942", "css");
fileTypeMap.put("696b2e71623d696b2e71", "js"); FILE_TYPE_MAP.put("696b2e71623d696b2e71", "js");
fileTypeMap.put("7b5c727466315c616e73", "rtf"); FILE_TYPE_MAP.put("7b5c727466315c616e73", "rtf");
fileTypeMap.put("38425053000100000000", "psd"); FILE_TYPE_MAP.put("38425053000100000000", "psd");
fileTypeMap.put("46726f6d3a203d3f6762", "eml"); FILE_TYPE_MAP.put("46726f6d3a203d3f6762", "eml");
fileTypeMap.put("d0cf11e0a1b11ae10000", "doc"); FILE_TYPE_MAP.put("d0cf11e0a1b11ae10000", "doc");
fileTypeMap.put("5374616E64617264204A", "mdb"); FILE_TYPE_MAP.put("5374616E64617264204A", "mdb");
fileTypeMap.put("252150532D41646F6265", "ps"); FILE_TYPE_MAP.put("252150532D41646F6265", "ps");
fileTypeMap.put("255044462d312e350d0a", "pdf"); FILE_TYPE_MAP.put("255044462d312e350d0a", "pdf");
fileTypeMap.put("2e524d46000000120001", "rmvb"); FILE_TYPE_MAP.put("2e524d46000000120001", "rmvb");
fileTypeMap.put("464c5601050000000900", "flv"); FILE_TYPE_MAP.put("464c5601050000000900", "flv");
fileTypeMap.put("00000020667479706d70", "mp4"); FILE_TYPE_MAP.put("00000020667479706d70", "mp4");
fileTypeMap.put("49443303000000002176", "mp3"); FILE_TYPE_MAP.put("49443303000000002176", "mp3");
fileTypeMap.put("000001ba210001000180", "mpg"); FILE_TYPE_MAP.put("000001ba210001000180", "mpg");
fileTypeMap.put("3026b2758e66cf11a6d9", "wmv"); FILE_TYPE_MAP.put("3026b2758e66cf11a6d9", "wmv");
fileTypeMap.put("52494646e27807005741", "wav"); FILE_TYPE_MAP.put("52494646e27807005741", "wav");
fileTypeMap.put("52494646d07d60074156", "avi"); FILE_TYPE_MAP.put("52494646d07d60074156", "avi");
fileTypeMap.put("4d546864000000060001", "mid"); FILE_TYPE_MAP.put("4d546864000000060001", "mid");
fileTypeMap.put("504b0304140000000800", "zip"); FILE_TYPE_MAP.put("504b0304140000000800", "zip");
fileTypeMap.put("526172211a0700cf9073", "rar"); FILE_TYPE_MAP.put("526172211a0700cf9073", "rar");
fileTypeMap.put("235468697320636f6e66", "ini"); FILE_TYPE_MAP.put("235468697320636f6e66", "ini");
fileTypeMap.put("504b03040a0000000000", "jar"); FILE_TYPE_MAP.put("504b03040a0000000000", "jar");
fileTypeMap.put("4d5a9000030000000400", "exe"); FILE_TYPE_MAP.put("4d5a9000030000000400", "exe");
fileTypeMap.put("3c25402070616765206c", "jsp"); FILE_TYPE_MAP.put("3c25402070616765206c", "jsp");
fileTypeMap.put("4d616e69666573742d56", "mf"); FILE_TYPE_MAP.put("4d616e69666573742d56", "mf");
fileTypeMap.put("3c3f786d6c2076657273", "xml"); FILE_TYPE_MAP.put("3c3f786d6c2076657273", "xml");
fileTypeMap.put("494e5345525420494e54", "sql"); FILE_TYPE_MAP.put("494e5345525420494e54", "sql");
fileTypeMap.put("7061636b616765207765", "java"); FILE_TYPE_MAP.put("7061636b616765207765", "java");
fileTypeMap.put("406563686f206f66660d", "bat"); FILE_TYPE_MAP.put("406563686f206f66660d", "bat");
fileTypeMap.put("1f8b0800000000000000", "gz"); FILE_TYPE_MAP.put("1f8b0800000000000000", "gz");
fileTypeMap.put("6c6f67346a2e726f6f74", "properties"); FILE_TYPE_MAP.put("6c6f67346a2e726f6f74", "properties");
fileTypeMap.put("cafebabe0000002e0041", "class"); FILE_TYPE_MAP.put("cafebabe0000002e0041", "class");
fileTypeMap.put("49545346030000006000", "chm"); FILE_TYPE_MAP.put("49545346030000006000", "chm");
fileTypeMap.put("04000000010000001300", "mxp"); FILE_TYPE_MAP.put("04000000010000001300", "mxp");
fileTypeMap.put("504b0304140006000800", "docx"); FILE_TYPE_MAP.put("504b0304140006000800", "docx");
fileTypeMap.put("6431303a637265617465", "torrent"); FILE_TYPE_MAP.put("6431303a637265617465", "torrent");
fileTypeMap.put("6D6F6F76", "mov"); FILE_TYPE_MAP.put("6D6F6F76", "mov");
fileTypeMap.put("FF575043", "wpd"); FILE_TYPE_MAP.put("FF575043", "wpd");
fileTypeMap.put("CFAD12FEC5FD746F", "dbx"); FILE_TYPE_MAP.put("CFAD12FEC5FD746F", "dbx");
fileTypeMap.put("2142444E", "pst"); FILE_TYPE_MAP.put("2142444E", "pst");
fileTypeMap.put("AC9EBD8F", "qdf"); FILE_TYPE_MAP.put("AC9EBD8F", "qdf");
fileTypeMap.put("E3828596", "pwl"); FILE_TYPE_MAP.put("E3828596", "pwl");
fileTypeMap.put("2E7261FD", "ram");*/ FILE_TYPE_MAP.put("2E7261FD", "ram");
} }
/** /**
......
...@@ -19,13 +19,11 @@ import springfox.documentation.builders.ApiInfoBuilder; ...@@ -19,13 +19,11 @@ import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.builders.ParameterBuilder; import springfox.documentation.builders.ParameterBuilder;
import springfox.documentation.builders.PathSelectors; import springfox.documentation.builders.PathSelectors;
import springfox.documentation.builders.RequestHandlerSelectors; import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.oas.annotations.EnableOpenApi;
import springfox.documentation.schema.ModelRef; import springfox.documentation.schema.ModelRef;
import springfox.documentation.service.*; import springfox.documentation.service.*;
import springfox.documentation.spi.DocumentationType; import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spi.service.contexts.SecurityContext; import springfox.documentation.spi.service.contexts.SecurityContext;
import springfox.documentation.spring.web.plugins.Docket; import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.spring.web.plugins.WebFluxRequestHandlerProvider;
import springfox.documentation.spring.web.plugins.WebMvcRequestHandlerProvider; import springfox.documentation.spring.web.plugins.WebMvcRequestHandlerProvider;
import springfox.documentation.swagger2.annotations.EnableSwagger2; import springfox.documentation.swagger2.annotations.EnableSwagger2;
...@@ -45,7 +43,6 @@ import java.util.stream.Collectors; ...@@ -45,7 +43,6 @@ import java.util.stream.Collectors;
public class Swagger2Config implements WebMvcConfigurer { public class Swagger2Config implements WebMvcConfigurer {
/** /**
*
* 显示swagger-ui.html文档展示页,还必须注入swagger资源: * 显示swagger-ui.html文档展示页,还必须注入swagger资源:
* *
* @param registry * @param registry
...@@ -89,8 +86,10 @@ public class Swagger2Config implements WebMvcConfigurer { ...@@ -89,8 +86,10 @@ public class Swagger2Config implements WebMvcConfigurer {
SecurityScheme securityScheme() { SecurityScheme securityScheme() {
return new ApiKey(CommonConstant.X_ACCESS_TOKEN, CommonConstant.X_ACCESS_TOKEN, "header"); return new ApiKey(CommonConstant.X_ACCESS_TOKEN, CommonConstant.X_ACCESS_TOKEN, "header");
} }
/** /**
* JWT token * JWT token
*
* @return * @return
*/ */
private List<Parameter> setHeaderToken() { private List<Parameter> setHeaderToken() {
...@@ -115,7 +114,7 @@ public class Swagger2Config implements WebMvcConfigurer { ...@@ -115,7 +114,7 @@ public class Swagger2Config implements WebMvcConfigurer {
// 描述 // 描述
.description("后台API接口") .description("后台API接口")
// 作者 // 作者
.contact(new Contact(" "," "," ")) .contact(new Contact(" ", " ", " "))
.license("The Apache License, Version 2.0") .license("The Apache License, Version 2.0")
.licenseUrl("http://www.apache.org/licenses/LICENSE-2.0.html") .licenseUrl("http://www.apache.org/licenses/LICENSE-2.0.html")
.build(); .build();
...@@ -143,6 +142,7 @@ public class Swagger2Config implements WebMvcConfigurer { ...@@ -143,6 +142,7 @@ public class Swagger2Config implements WebMvcConfigurer {
/** /**
* 解决springboot2.6 和springfox不兼容问题 * 解决springboot2.6 和springfox不兼容问题
*
* @return * @return
*/ */
@Bean @Bean
...@@ -151,7 +151,7 @@ public class Swagger2Config implements WebMvcConfigurer { ...@@ -151,7 +151,7 @@ public class Swagger2Config implements WebMvcConfigurer {
@Override @Override
public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException { public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
if (bean instanceof WebMvcRequestHandlerProvider || bean instanceof WebFluxRequestHandlerProvider) { if (bean instanceof WebMvcRequestHandlerProvider) {
customizeSpringfoxHandlerMappings(getHandlerMappings(bean)); customizeSpringfoxHandlerMappings(getHandlerMappings(bean));
} }
return bean; return bean;
......
...@@ -11,6 +11,11 @@ ...@@ -11,6 +11,11 @@
<artifactId>jeecg-system-biz</artifactId> <artifactId>jeecg-system-biz</artifactId>
<dependencies> <dependencies>
<dependency>
<groupId>io.github.biezhi</groupId>
<artifactId>TinyPinyin</artifactId>
<version>2.0.3.RELEASE</version>
</dependency>
<dependency> <dependency>
<groupId>org.jeecgframework.boot</groupId> <groupId>org.jeecgframework.boot</groupId>
<artifactId>jeecg-system-local-api</artifactId> <artifactId>jeecg-system-local-api</artifactId>
......
package org.jeecg.modules.deviceAsset.controller;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.modules.deviceAsset.dto.SwitchManagementQueryDTO;
import org.jeecg.modules.deviceAsset.entity.SwitchManagement;
import org.jeecg.modules.deviceAsset.service.ISwitchManagementService;
import org.jeecg.modules.deviceAsset.vo.SwitchManagementQueryVO;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.Arrays;
/**
* @Description: 资产管理-道岔管理
* @Author: jeecg-boot
* @Date: 2023-06-14
* @Version: V1.0
*/
@Api(tags = "资产管理-道岔管理")
@RestController
@RequestMapping("/deviceAsset/switchManagement")
@Slf4j
public class SwitchManagementController extends JeecgController<SwitchManagement, ISwitchManagementService> {
@Resource
private ISwitchManagementService switchManagementService;
@AutoLog(value = "资产管理-道岔管理-分页列表查询")
@ApiOperation(value = "资产管理-道岔管理-分页列表查询", notes = "资产管理-道岔管理-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<SwitchManagementQueryVO>> queryPageList(@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
SwitchManagementQueryDTO dto) {
Page<SwitchManagementQueryVO> pageData = new Page<>(pageNo, pageSize);
pageData = switchManagementService.queryPageList(pageData, dto);
return Result.OK(pageData);
}
@AutoLog(value = "资产管理-道岔管理-编辑")
@ApiOperation(value = "资产管理-道岔管理-编辑", notes = "资产管理-道岔管理-编辑")
@PostMapping(value = "/edit")
public Result<String> edit(@RequestBody SwitchManagement switchManagement) {
if (ObjectUtil.isEmpty(switchManagement.getId())) {
switchManagementService.save(switchManagement);
} else {
switchManagementService.updateById(switchManagement);
}
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "资产管理-道岔管理-通过id删除")
@ApiOperation(value = "资产管理-道岔管理-通过id删除", notes = "资产管理-道岔管理-通过id删除")
@GetMapping(value = "/delete")
public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
switchManagementService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "资产管理-道岔管理-批量删除")
@ApiOperation(value = "线路车站-轻轨线路-批量删除", notes = "线路车站-轻轨线路-批量删除")
@GetMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
switchManagementService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
// /**
// * 通过id查询
// *
// * @param id
// * @return
// */
// @AutoLog(value = "线路车站-轻轨线路-通过id查询")
// @ApiOperation(value = "线路车站-轻轨线路-通过id查询", notes = "线路车站-轻轨线路-通过id查询")
// @GetMapping(value = "/queryById")
// public Result<LightRail> queryById(@RequestParam(name = "id", required = true) String id) {
// LightRail lightRail = lightRailService.getById(id);
// if (lightRail == null) {
// return Result.error("未找到对应数据");
// }
// return Result.OK(lightRail);
// }
//
// @AutoLog(value = "线路车站-轻轨线路-获取全部线路")
// @ApiOperation(value = "线路车站-轻轨线路-获取全部线路", notes = "线路车站-轻轨线路-获取全部线路")
// @GetMapping(value = "/listAll")
// public Result<List<Map<String, Object>>> listAll() {
// List<LightRail> pageList = lightRailService.list();
//
// List<Map<String, Object>> list = new ArrayList<>();
// for (LightRail lightRail : pageList) {
// Map<String, Object> map = new HashMap<>();
// map.put("label", lightRail.getRailLineName());
// map.put("value", lightRail.getId());
// list.add(map);
// }
// return Result.OK(list);
// }
}
package org.jeecg.modules.deviceAsset.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
@ApiModel(value = "资产管理-道岔管理DTO")
public class SwitchManagementQueryDTO {
@ApiModelProperty(value = "线路name")
private String railLineName;
@ApiModelProperty(value = "状态")
private String status;
}
package org.jeecg.modules.deviceAsset.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* @Description: 资产管理-道岔管理
*/
@Data
@TableName("t_da_switch_management")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "t_da_switch_management对象", description = "资产管理-道岔管理")
public class SwitchManagement implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private String id;
@ApiModelProperty(value = "创建人")
private String createBy;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private Date createTime;
@ApiModelProperty(value = "更新人")
private String updateBy;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新日期")
private Date updateTime;
@ApiModelProperty(value = "道岔编号")
private String switchCode;
@ApiModelProperty(value = "道岔型号")
private String switchModel;
@ApiModelProperty(value = "线别Id")
private String lineAliasId;
@ApiModelProperty(value = "开向")
private String openTo;
@ApiModelProperty(value = "岔前/岔前里程")
private BigDecimal byroadPreMileage;
@ApiModelProperty(value = "岔心里程")
private BigDecimal byroadCenterMileage;
@ApiModelProperty(value = "岔前/岔后里程")
private BigDecimal byroadEndMileage;
@ApiModelProperty(value = "区间车站mapId")
private String byroadTrainStationId;
@ApiModelProperty(value = "备注")
private String remark;
}
package org.jeecg.modules.deviceAsset.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.modules.deviceAsset.dto.SwitchManagementQueryDTO;
import org.jeecg.modules.deviceAsset.entity.SwitchManagement;
import org.jeecg.modules.deviceAsset.vo.SwitchManagementQueryVO;
/**
* @Description: 资产管理-道岔管理
*/
public interface SwitchManagementMapper extends BaseMapper<SwitchManagement> {
Page<SwitchManagementQueryVO> queryPageList(Page<SwitchManagementQueryVO> pageData, SwitchManagementQueryDTO dto);
}
<?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="org.jeecg.modules.deviceAsset.mapper.SwitchManagementMapper">
<select id="queryPageList" resultType="org.jeecg.modules.deviceAsset.vo.SwitchManagementQueryVO">
SELECT * FROM t_da_switch_management
</select>
</mapper>
\ No newline at end of file
package org.jeecg.modules.deviceAsset.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.deviceAsset.dto.SwitchManagementQueryDTO;
import org.jeecg.modules.deviceAsset.entity.SwitchManagement;
import org.jeecg.modules.deviceAsset.vo.SwitchManagementQueryVO;
/**
* @Description: 线路车站-轻轨线路
* @Author: jeecg-boot
* @Date: 2023-06-14
* @Version: V1.0
*/
public interface ISwitchManagementService extends IService<SwitchManagement> {
Page<SwitchManagementQueryVO> queryPageList(Page<SwitchManagementQueryVO> pageData, SwitchManagementQueryDTO dto);
}
package org.jeecg.modules.deviceAsset.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.common.api.dto.PageSearch;
import org.jeecg.modules.deviceAsset.dto.SwitchManagementQueryDTO;
import org.jeecg.modules.deviceAsset.entity.SwitchManagement;
import org.jeecg.modules.deviceAsset.mapper.SwitchManagementMapper;
import org.jeecg.modules.deviceAsset.service.ISwitchManagementService;
import org.jeecg.modules.deviceAsset.vo.SwitchManagementQueryVO;
import org.jeecg.modules.subwayNetwork.dto.LightRailQueryDTO;
import org.jeecg.modules.subwayNetwork.entity.LightRail;
import org.jeecg.modules.subwayNetwork.mapper.LightRailMapper;
import org.jeecg.modules.subwayNetwork.service.ILightRailService;
import org.jeecg.modules.subwayNetwork.vo.LightRailQueryVO;
import org.springframework.stereotype.Service;
/**
* @Description: 线路车站-轻轨线路
* @Author: jeecg-boot
* @Date: 2023-06-14
* @Version: V1.0
*/
@Service
public class SwitchManagementServiceImpl extends ServiceImpl<SwitchManagementMapper, SwitchManagement> implements ISwitchManagementService {
@Override
public Page<SwitchManagementQueryVO> queryPageList(Page<SwitchManagementQueryVO> pageData, SwitchManagementQueryDTO dto) {
return this.baseMapper.queryPageList(pageData, dto);
}
}
package org.jeecg.modules.deviceAsset.vo;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.math.BigDecimal;
import java.util.Date;
@Data
@ApiModel(value = "资产管理-道岔管理VO")
public class SwitchManagementQueryVO {
private static final long serialVersionUID = 1L;
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private String id;
@ApiModelProperty(value = "创建人")
private String createBy;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private Date createTime;
@ApiModelProperty(value = "更新人")
private String updateBy;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新日期")
private Date updateTime;
@ApiModelProperty(value = "道岔编号")
private String switchCode;
@ApiModelProperty(value = "道岔型号")
private String switchModel;
@ApiModelProperty(value = "线别Id")
private String lineAliasId;
@ApiModelProperty(value = "开向")
private String openTo;
@ApiModelProperty(value = "岔前/岔前里程")
private BigDecimal byroadPreMileage;
@ApiModelProperty(value = "岔心里程")
private BigDecimal byroadCenterMileage;
@ApiModelProperty(value = "岔前/岔后里程")
private BigDecimal byroadEndMileage;
@ApiModelProperty(value = "区间车站mapId")
private String byroadTrainStationId;
@ApiModelProperty(value = "备注")
private String remark;
}
package org.jeecg.modules.subwayNetwork.controller;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.dto.PageSearch;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.modules.deviceAsset.dto.SwitchManagementQueryDTO;
import org.jeecg.modules.deviceAsset.vo.SwitchManagementQueryVO;
import org.jeecg.modules.subwayNetwork.dto.LightRailQueryDTO;
import org.jeecg.modules.subwayNetwork.dto.LineAliasQueryDTO;
import org.jeecg.modules.subwayNetwork.entity.LightRail;
import org.jeecg.modules.subwayNetwork.entity.LineAlias;
import org.jeecg.modules.subwayNetwork.service.ILightRailService;
import org.jeecg.modules.subwayNetwork.service.ILineAliasService;
import org.jeecg.modules.subwayNetwork.vo.LightAliasQueryVO;
import org.jeecg.modules.subwayNetwork.vo.LightRailQueryVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.*;
/**
* @Description: 线路车站-线别管理
*/
@Api(tags = "线路车站-线别管理")
@RestController
@RequestMapping("/subwayNetwork/lightAlias")
@Slf4j
public class LightAliasController extends JeecgController<LineAlias, ILineAliasService> {
@Autowired
private ILineAliasService lineAliasService;
@AutoLog(value = "线路车站-线别管理-分页列表查询")
@ApiOperation(value = "线路车站-线别管理-分页列表查询", notes = "线路车站-线别管理-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<LightAliasQueryVO>> queryPageList(@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
LineAliasQueryDTO dto) {
Page<LightAliasQueryVO> pageData = new Page<>(pageNo, pageSize);
IPage<LightAliasQueryVO> pageList = lineAliasService.queryPageList(pageData, dto);
return Result.OK(pageList);
}
@AutoLog(value = "线路车站-线别管理-编辑")
@ApiOperation(value = "线路车站-线别管理-编辑", notes = "线路车站-线别管理-编辑")
@PostMapping(value = "/edit")
public Result<String> edit(@RequestBody LineAlias lineAlias) {
//获取当前用户
if (ObjectUtil.isEmpty(lineAlias.getId())) {
lineAliasService.save(lineAlias);
} else {
lineAliasService.updateById(lineAlias);
}
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "线路车站-线别管理-通过id删除")
@ApiOperation(value = "线路车站-线别管理-通过id删除", notes = "线路车站-线别管理-通过id删除")
@GetMapping(value = "/delete")
public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
lineAliasService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "线路车站-线别管理-批量删除")
@ApiOperation(value = "线路车站-线别管理-批量删除", notes = "线路车站-线别管理-批量删除")
@GetMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
lineAliasService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
}
package org.jeecg.modules.subwayNetwork.controller; package org.jeecg.modules.subwayNetwork.controller;
import java.util.Arrays; import java.util.*;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import org.apache.shiro.SecurityUtils;
import org.jeecg.common.api.dto.PageSearch; import org.jeecg.common.api.dto.PageSearch;
import org.jeecg.common.api.vo.Result; import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator; import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.modules.subwayNetwork.dto.LightRailQueryDTO; import org.jeecg.modules.subwayNetwork.dto.LightRailQueryDTO;
import org.jeecg.modules.subwayNetwork.entity.LightRail; import org.jeecg.modules.subwayNetwork.entity.LightRail;
import org.jeecg.modules.subwayNetwork.service.ILightRailService; import org.jeecg.modules.subwayNetwork.service.ILightRailService;
...@@ -41,11 +43,6 @@ public class LightRailController extends JeecgController<LightRail, ILightRailSe ...@@ -41,11 +43,6 @@ public class LightRailController extends JeecgController<LightRail, ILightRailSe
@Autowired @Autowired
private ILightRailService lightRailService; private ILightRailService lightRailService;
/**
* 分页列表查询
*
* @return
*/
@AutoLog(value = "线路车站-轻轨线路-分页列表查询") @AutoLog(value = "线路车站-轻轨线路-分页列表查询")
@ApiOperation(value = "线路车站-轻轨线路-分页列表查询", notes = "线路车站-轻轨线路-分页列表查询") @ApiOperation(value = "线路车站-轻轨线路-分页列表查询", notes = "线路车站-轻轨线路-分页列表查询")
@PostMapping(value = "/list") @PostMapping(value = "/list")
...@@ -60,7 +57,10 @@ public class LightRailController extends JeecgController<LightRail, ILightRailSe ...@@ -60,7 +57,10 @@ public class LightRailController extends JeecgController<LightRail, ILightRailSe
@ApiOperation(value = "线路车站-轻轨线路-编辑", notes = "线路车站-轻轨线路-编辑") @ApiOperation(value = "线路车站-轻轨线路-编辑", notes = "线路车站-轻轨线路-编辑")
@PostMapping(value = "/edit") @PostMapping(value = "/edit")
public Result<String> edit(@RequestBody LightRail lightRail) { public Result<String> edit(@RequestBody LightRail lightRail) {
//获取当前用户
lightRail.setUpdateTime(new Date());
if (ObjectUtil.isEmpty(lightRail.getId())) { if (ObjectUtil.isEmpty(lightRail.getId())) {
lightRail.setCreateTime(new Date());
lightRailService.save(lightRail); lightRailService.save(lightRail);
} else { } else {
lightRailService.updateById(lightRail); lightRailService.updateById(lightRail);
...@@ -114,4 +114,20 @@ public class LightRailController extends JeecgController<LightRail, ILightRailSe ...@@ -114,4 +114,20 @@ public class LightRailController extends JeecgController<LightRail, ILightRailSe
return Result.OK(lightRail); return Result.OK(lightRail);
} }
@AutoLog(value = "线路车站-轻轨线路-获取全部线路")
@ApiOperation(value = "线路车站-轻轨线路-获取全部线路", notes = "线路车站-轻轨线路-获取全部线路")
@GetMapping(value = "/listAll")
public Result<List<Map<String, Object>>> listAll() {
List<LightRail> pageList = lightRailService.list();
List<Map<String, Object>> list = new ArrayList<>();
for (LightRail lightRail : pageList) {
Map<String, Object> map = new HashMap<>();
map.put("label", lightRail.getRailLineName());
map.put("value", lightRail.getId() );
list.add(map);
}
return Result.OK(list);
}
} }
...@@ -4,9 +4,11 @@ import java.util.Arrays; ...@@ -4,9 +4,11 @@ import java.util.Arrays;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import org.jeecg.common.api.dto.PageSearch;
import org.jeecg.common.api.vo.Result; import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator; import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.modules.subwayNetwork.dto.SubwaySectionEditDTO; import org.jeecg.modules.subwayNetwork.dto.SubwaySectionEditDTO;
import org.jeecg.modules.subwayNetwork.dto.SubwaySectionQueryDTO;
import org.jeecg.modules.subwayNetwork.entity.SubwaySection; import org.jeecg.modules.subwayNetwork.entity.SubwaySection;
import org.jeecg.modules.subwayNetwork.service.ISubwaySectionService; import org.jeecg.modules.subwayNetwork.service.ISubwaySectionService;
...@@ -16,6 +18,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; ...@@ -16,6 +18,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.system.base.controller.JeecgController; import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.modules.subwayNetwork.vo.SubwaySectionVO;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
...@@ -40,14 +43,9 @@ public class SubwaySectionController extends JeecgController<SubwaySection, ISub ...@@ -40,14 +43,9 @@ public class SubwaySectionController extends JeecgController<SubwaySection, ISub
@AutoLog(value = "线路车站-地铁区间-分页列表查询") @AutoLog(value = "线路车站-地铁区间-分页列表查询")
@ApiOperation(value = "线路车站-地铁区间-分页列表查询", notes = "线路车站-地铁区间-分页列表查询") @ApiOperation(value = "线路车站-地铁区间-分页列表查询", notes = "线路车站-地铁区间-分页列表查询")
@GetMapping(value = "/list") @PostMapping(value = "/list")
public Result<IPage<SubwaySection>> queryPageList(SubwaySection subwaySection, public Result<IPage<SubwaySectionVO>> queryPageList(@RequestBody PageSearch<SubwaySectionQueryDTO> dto) {
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, IPage<SubwaySectionVO> pageList = subwaySectionService.queryPageList(dto);
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<SubwaySection> queryWrapper = QueryGenerator.initQueryWrapper(subwaySection, req.getParameterMap());
Page<SubwaySection> page = new Page<SubwaySection>(pageNo, pageSize);
IPage<SubwaySection> pageList = subwaySectionService.page(page, queryWrapper);
return Result.OK(pageList); return Result.OK(pageList);
} }
...@@ -56,13 +54,16 @@ public class SubwaySectionController extends JeecgController<SubwaySection, ISub ...@@ -56,13 +54,16 @@ public class SubwaySectionController extends JeecgController<SubwaySection, ISub
@ApiOperation(value = "线路车站-地铁区间-编辑", notes = "线路车站-地铁区间-编辑") @ApiOperation(value = "线路车站-地铁区间-编辑", notes = "线路车站-地铁区间-编辑")
@PostMapping(value = "/edit") @PostMapping(value = "/edit")
public Result<String> edit(@RequestBody SubwaySectionEditDTO dto) { public Result<String> edit(@RequestBody SubwaySectionEditDTO dto) {
subwaySectionService.edit(dto); subwaySectionService.edit(dto);
return Result.OK("编辑成功!"); return Result.OK("编辑成功!");
} }
@AutoLog(value = "线路车站-地铁区间-通过id删除") @AutoLog(value = "线路车站-地铁区间-通过id删除")
@ApiOperation(value = "线路车站-地铁区间-通过id删除", notes = "线路车站-地铁区间-通过id删除") @ApiOperation(value = "线路车站-地铁区间-通过id删除", notes = "线路车站-地铁区间-通过id删除")
@DeleteMapping(value = "/delete") @GetMapping(value = "/delete")
public Result<String> delete(@RequestParam(name = "id", required = true) String id) { public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
subwaySectionService.removeById(id); subwaySectionService.removeById(id);
return Result.OK("删除成功!"); return Result.OK("删除成功!");
...@@ -70,21 +71,10 @@ public class SubwaySectionController extends JeecgController<SubwaySection, ISub ...@@ -70,21 +71,10 @@ public class SubwaySectionController extends JeecgController<SubwaySection, ISub
@AutoLog(value = "线路车站-地铁区间-批量删除") @AutoLog(value = "线路车站-地铁区间-批量删除")
@ApiOperation(value = "线路车站-地铁区间-批量删除", notes = "线路车站-地铁区间-批量删除") @ApiOperation(value = "线路车站-地铁区间-批量删除", notes = "线路车站-地铁区间-批量删除")
@DeleteMapping(value = "/deleteBatch") @GetMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) { public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
this.subwaySectionService.removeByIds(Arrays.asList(ids.split(","))); this.subwaySectionService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!"); return Result.OK("批量删除成功!");
} }
//@AutoLog(value = "线路车站-地铁区间-通过id查询")
@ApiOperation(value = "线路车站-地铁区间-通过id查询", notes = "线路车站-地铁区间-通过id查询")
@GetMapping(value = "/queryById")
public Result<SubwaySection> queryById(@RequestParam(name = "id", required = true) String id) {
SubwaySection subwaySection = subwaySectionService.getById(id);
if (subwaySection == null) {
return Result.error("未找到对应数据");
}
return Result.OK(subwaySection);
}
} }
package org.jeecg.modules.subwayNetwork.controller; package org.jeecg.modules.subwayNetwork.controller;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
...@@ -8,14 +9,16 @@ import org.jeecg.common.api.dto.PageSearch; ...@@ -8,14 +9,16 @@ import org.jeecg.common.api.dto.PageSearch;
import org.jeecg.common.api.vo.Result; import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog; import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.base.controller.JeecgController; import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.modules.subwayNetwork.dto.TrainStationEditDTO;
import org.jeecg.modules.subwayNetwork.dto.TrainStationQueryDTO; import org.jeecg.modules.subwayNetwork.dto.TrainStationQueryDTO;
import org.jeecg.modules.subwayNetwork.entity.LightRail;
import org.jeecg.modules.subwayNetwork.entity.TrainStation; import org.jeecg.modules.subwayNetwork.entity.TrainStation;
import org.jeecg.modules.subwayNetwork.service.ITrainStationService; import org.jeecg.modules.subwayNetwork.service.ITrainStationService;
import org.jeecg.modules.subwayNetwork.vo.TrainStationVO; import org.jeecg.modules.subwayNetwork.vo.TrainStationVO;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.util.Arrays; import java.util.*;
/** /**
* @Description: 线路车站-地铁站 * @Description: 线路车站-地铁站
...@@ -33,32 +36,27 @@ public class TrainStationController extends JeecgController<TrainStation, ITrain ...@@ -33,32 +36,27 @@ public class TrainStationController extends JeecgController<TrainStation, ITrain
@AutoLog(value = "线路车站-地铁站-分页列表查询") @AutoLog(value = "线路车站-地铁站-分页列表查询")
@ApiOperation(value = "线路车站-地铁站-分页列表查询", notes = "线路车站-地铁站-分页列表查询") @ApiOperation(value = "线路车站-地铁站-分页列表查询", notes = "线路车站-地铁站-分页列表查询")
@GetMapping(value = "/list") @PostMapping(value = "/list")
public Result<IPage<TrainStationVO>> queryPageList(@RequestBody PageSearch<TrainStationQueryDTO> dto) { public Result<IPage<TrainStationVO>> queryPageList(@RequestBody PageSearch<TrainStationQueryDTO> dto) {
IPage<TrainStationVO> pageList = trainStationService.queryPageList(dto); IPage<TrainStationVO> pageList = trainStationService.queryPageList(dto);
return Result.OK(pageList); return Result.OK(pageList);
} }
@AutoLog(value = "线路车站-地铁站-添加")
@ApiOperation(value = "线路车站-地铁站-添加", notes = "线路车站-地铁站-添加")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody TrainStation trainStation) {
trainStationService.save(trainStation);
return Result.OK("添加成功!");
}
@AutoLog(value = "线路车站-地铁站-编辑") @AutoLog(value = "线路车站-地铁站-编辑")
@ApiOperation(value = "线路车站-地铁站-编辑", notes = "线路车站-地铁站-编辑") @ApiOperation(value = "线路车站-地铁站-编辑", notes = "线路车站-地铁站-编辑")
@PostMapping(value = "/edit") @PostMapping(value = "/edit")
public Result<String> edit(@RequestBody TrainStation trainStation) { public Result<String> edit(@RequestBody TrainStationEditDTO dto) {
trainStationService.updateById(trainStation);
trainStationService.edit(dto);
return Result.OK("编辑成功!"); return Result.OK("编辑成功!");
} }
@AutoLog(value = "线路车站-地铁站-通过id删除") @AutoLog(value = "线路车站-地铁站-通过id删除")
@ApiOperation(value = "线路车站-地铁站-通过id删除", notes = "线路车站-地铁站-通过id删除") @ApiOperation(value = "线路车站-地铁站-通过id删除", notes = "线路车站-地铁站-通过id删除")
@DeleteMapping(value = "/delete") @GetMapping(value = "/delete")
public Result<String> delete(@RequestParam(name = "id", required = true) String id) { public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
trainStationService.removeById(id); trainStationService.removeById(id);
return Result.OK("删除成功!"); return Result.OK("删除成功!");
...@@ -67,11 +65,29 @@ public class TrainStationController extends JeecgController<TrainStation, ITrain ...@@ -67,11 +65,29 @@ public class TrainStationController extends JeecgController<TrainStation, ITrain
@AutoLog(value = "线路车站-地铁站-批量删除") @AutoLog(value = "线路车站-地铁站-批量删除")
@ApiOperation(value = "线路车站-地铁站-批量删除", notes = "线路车站-地铁站-批量删除") @ApiOperation(value = "线路车站-地铁站-批量删除", notes = "线路车站-地铁站-批量删除")
@DeleteMapping(value = "/deleteBatch") @GetMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) { public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
this.trainStationService.removeByIds(Arrays.asList(ids.split(","))); this.trainStationService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!"); return Result.OK("批量删除成功!");
} }
@AutoLog(value = "线路车站-地铁站-获取全部车站")
@ApiOperation(value = "线路车站-地铁站-获取全部车站", notes = "线路车站-地铁站-获取全部车站")
@GetMapping(value = "/listAll")
public Result<List<Map<String, Object>>> listAll() {
List<TrainStation> pageList = trainStationService.list();
List<Map<String, Object>> list = new ArrayList<>();
for (TrainStation trainStation : pageList) {
Map<String, Object> map = new HashMap<>();
map.put("label", trainStation.getStationName());
map.put("value", trainStation.getId());
map.put("lineAliasCode", trainStation.getLineAliasCode());
map.put("lightRailId", trainStation.getLightRailId());
list.add(map);
}
return Result.OK(list);
}
} }
package org.jeecg.modules.subwayNetwork.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
@ApiModel(value = "线路DTO")
public class LineAliasQueryDTO {
@ApiModelProperty(value = "线别Code")
private String lineAliasCode;
@ApiModelProperty(value = "线别名称")
private String lineAliasName;
@ApiModelProperty(value = "备注")
private String remark;
}
package org.jeecg.modules.subwayNetwork.dto; package org.jeecg.modules.subwayNetwork.dto;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import org.jeecgframework.poi.excel.annotation.Excel;
@Data @Data
@ApiModel(value = "SubwaySectionEditDTO编辑") @ApiModel(value = "SubwaySectionEditDTO编辑")
public class SubwaySectionEditDTO { public class SubwaySectionEditDTO {
private String id;
@ApiModelProperty(value = "轻轨线路ID")
private String lightRailId;
@ApiModelProperty(value = "起始车站Id")
private String startTrainStationId;
@ApiModelProperty(value = "结束车站Id")
private String endTrainStationId;
@ApiModelProperty(value = "区间名")
private String sectionName;
@ApiModelProperty(value = "备注")
private String remark;
} }
...@@ -3,14 +3,11 @@ package org.jeecg.modules.subwayNetwork.dto; ...@@ -3,14 +3,11 @@ package org.jeecg.modules.subwayNetwork.dto;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import org.jeecgframework.poi.excel.annotation.Excel;
@Data @Data
@ApiModel(value = "区间DTO") @ApiModel(value = "区间DTO")
public class SubwaySectionDTO { public class SubwaySectionQueryDTO {
@ApiModelProperty(value = "区间名")
@ApiModelProperty(value = "线路id") private String sectionName;
private java.lang.String railId;
} }
package org.jeecg.modules.subwayNetwork.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
@Data
@ApiModel(value = "地铁站编辑DTO")
public class TrainStationEditDTO {
@ApiModelProperty(value = "id")
private String id;
@ApiModelProperty(value = "轻轨线路ID")
private String lightRailId;
@ApiModelProperty(value = "车站名")
private String stationName;
@ApiModelProperty(value = "车站编码")
private String stationCode;
@ApiModelProperty(value = "线别Code")
private String lineAliasCode;
@ApiModelProperty(value = "起始里程")
private BigDecimal startingMileage;
@ApiModelProperty(value = "中心里程")
private BigDecimal centerMileage;
@ApiModelProperty(value = "结束里程")
private BigDecimal endMileage;
@ApiModelProperty(value = "序号")
private Integer seq;
@ApiModelProperty(value = "备注")
private String remark;
}
package org.jeecg.modules.subwayNetwork.entity; package org.jeecg.modules.subwayNetwork.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableLogic;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
/**
* @Description: 线路车站-区间站点映射
* @Author: jeecg-boot
* @Date: 2023-06-15
* @Version: V1.0
*/
@Data @Data
@TableName("t_sn_section_station_map") @TableName("t_sn_line_alias")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@ApiModel(value="t_sn_section_station_map对象", description="线路车站-区间站点映射") @ApiModel(value = "t_sn_line_alias对象", description = "线路车站-线别管理")
public class SectionStationMap implements Serializable { public class LineAlias {
private static final long serialVersionUID = 1L; @TableId(type = IdType.ASSIGN_ID)
/**主键*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键") @ApiModelProperty(value = "主键")
private java.lang.String id; private java.lang.String id;
/**创建人*/
@ApiModelProperty(value = "创建人") @ApiModelProperty(value = "创建人")
private java.lang.String createBy; private java.lang.String createBy;
/**创建日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期") @ApiModelProperty(value = "创建日期")
private java.util.Date createTime; private java.util.Date createTime;
/**更新人*/
@ApiModelProperty(value = "更新人") @ApiModelProperty(value = "更新人")
private java.lang.String updateBy; private String updateBy;
/**更新日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新日期") @ApiModelProperty(value = "更新日期")
private java.util.Date updateTime; private Date updateTime;
/**区间id*/
@Excel(name = "区间id", width = 15) @ApiModelProperty(value = "线别Code")
@ApiModelProperty(value = "区间id") private String lineAliasCode;
private java.lang.String sectionId;
/**车站id*/ @ApiModelProperty(value = "线别名称")
@Excel(name = "车站id", width = 15) private String lineAliasName;
@ApiModelProperty(value = "车站id")
private java.lang.String stationId; @ApiModelProperty(value = "备注")
private String remark;
} }
package org.jeecg.modules.subwayNetwork.entity; package org.jeecg.modules.subwayNetwork.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableLogic;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.math.BigDecimal;
/** /**
* @Description: 线路车站-地铁区间 * @Description: 线路车站-地铁区间
* @Author: jeecg-boot * @Author: jeecg-boot
* @Date: 2023-06-15 * @Date: 2023-06-15
* @Version: V1.0 * @Version: V1.0
*/ */
@Data @Data
@TableName("t_sn_subway_section") @TableName("t_sn_subway_section")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@ApiModel(value="t_sn_subway_section对象", description="线路车站-地铁区间") @ApiModel(value = "t_sn_subway_section对象", description = "线路车站-地铁区间")
public class SubwaySection implements Serializable { public class SubwaySection implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/**主键*/ @TableId(type = IdType.ASSIGN_ID)
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键") @ApiModelProperty(value = "主键")
private java.lang.String id; private java.lang.String id;
/**创建人*/
@ApiModelProperty(value = "创建人") @ApiModelProperty(value = "创建人")
private java.lang.String createBy; private java.lang.String createBy;
/**创建日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期") @ApiModelProperty(value = "创建日期")
private java.util.Date createTime; private java.util.Date createTime;
/**更新人*/
@ApiModelProperty(value = "更新人") @ApiModelProperty(value = "更新人")
private java.lang.String updateBy; private java.lang.String updateBy;
/**更新日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新日期") @ApiModelProperty(value = "更新日期")
private java.util.Date updateTime; private java.util.Date updateTime;
/**区间名*/
@Excel(name = "区间名", width = 15) @Excel(name = "区间名", width = 15)
@ApiModelProperty(value = "区间名") @ApiModelProperty(value = "区间名")
private java.lang.String sectionName; private java.lang.String sectionName;
/**区间code*/
@Excel(name = "区间code", width = 15) @Excel(name = "区间code", width = 15)
@ApiModelProperty(value = "区间code") @ApiModelProperty(value = "区间code")
private java.lang.String sectionCode; private java.lang.String sectionCode;
/**线路id*/
@Excel(name = "线路id", width = 15) @Excel(name = "线路id", width = 15)
@ApiModelProperty(value = "线路id") @ApiModelProperty(value = "轻轨线路ID")
private java.lang.String railId; private String lightRailId;
@ApiModelProperty(value = "起始车站Id")
private String startTrainStationId;
@ApiModelProperty(value = "结束车站Id")
private String endTrainStationId;
@ApiModelProperty(value = "备注")
private String remark;
} }
...@@ -71,34 +71,30 @@ public class TrainStation implements Serializable { ...@@ -71,34 +71,30 @@ public class TrainStation implements Serializable {
@ApiModelProperty(value = "车站编码") @ApiModelProperty(value = "车站编码")
private String stationCode; private String stationCode;
@Excel(name = "线别", width = 15) @Excel(name = "线别", width = 15)
@ApiModelProperty(value = "线别") @ApiModelProperty(value = "线别Code")
private String lineAlias; private String lineAliasCode;
@Excel(name = "起始里程前缀", width = 15)
@ApiModelProperty(value = "起始里程前缀")
private String startingMileagePrefix;
@Excel(name = "起始里程", width = 15) @Excel(name = "起始里程", width = 15)
@ApiModelProperty(value = "起始里程") @ApiModelProperty(value = "起始里程")
private BigDecimal startingMileage; private BigDecimal startingMileage;
@Excel(name = "中心里程前缀", width = 15)
@ApiModelProperty(value = "中心里程前缀")
private String centerMileagePrefix;
@Excel(name = "中心里程", width = 15) @Excel(name = "中心里程", width = 15)
@ApiModelProperty(value = "中心里程") @ApiModelProperty(value = "中心里程")
private BigDecimal centerMileage; private BigDecimal centerMileage;
@Excel(name = "结束里程前缀", width = 15)
@ApiModelProperty(value = "结束里程前缀")
private String endMileagePrefix;
@Excel(name = "结束里程", width = 15) @Excel(name = "结束里程", width = 15)
@ApiModelProperty(value = "结束里程") @ApiModelProperty(value = "结束里程")
private BigDecimal endMileage; private BigDecimal endMileage;
@ApiModelProperty(value = "序号") @ApiModelProperty(value = "序号")
private Integer seq; private Integer seq;
@ApiModelProperty(value = "站长度(m)")
private BigDecimal length;
@ApiModelProperty(value = "备注")
private String remark;
} }
...@@ -7,9 +7,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; ...@@ -7,9 +7,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.jeecg.modules.subwayNetwork.vo.LightRailQueryVO; import org.jeecg.modules.subwayNetwork.vo.LightRailQueryVO;
/** /**
* @Description: 线路车站-轻轨线路 * @Description: 线路车站-线别管理
* @Author: jeecg-boot
* @Date: 2023-06-14
* @Version: V1.0 * @Version: V1.0
*/ */
public interface LightRailMapper extends BaseMapper<LightRail> { public interface LightRailMapper extends BaseMapper<LightRail> {
......
package org.jeecg.modules.subwayNetwork.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.modules.subwayNetwork.dto.LineAliasQueryDTO;
import org.jeecg.modules.subwayNetwork.entity.LineAlias;
import org.jeecg.modules.subwayNetwork.vo.LightAliasQueryVO;
public interface LineAliasMapper extends BaseMapper<LineAlias> {
IPage<LightAliasQueryVO> queryPageList(Page<LightAliasQueryVO> pageData, LineAliasQueryDTO dto);
}
package org.jeecg.modules.subwayNetwork.mapper;
import org.jeecg.modules.subwayNetwork.entity.SectionStationMap;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 线路车站-区间站点映射
* @Author: jeecg-boot
* @Date: 2023-06-15
* @Version: V1.0
*/
public interface SectionStationMapMapper extends BaseMapper<SectionStationMap> {
}
package org.jeecg.modules.subwayNetwork.mapper; package org.jeecg.modules.subwayNetwork.mapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.jeecg.modules.subwayNetwork.dto.SubwaySectionQueryDTO;
import org.jeecg.modules.subwayNetwork.entity.SubwaySection; import org.jeecg.modules.subwayNetwork.entity.SubwaySection;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.jeecg.modules.subwayNetwork.vo.SubwaySectionVO;
/** /**
* @Description: 线路车站-地铁区间 * @Description: 线路车站-地铁区间
...@@ -11,4 +14,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; ...@@ -11,4 +14,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/ */
public interface SubwaySectionMapper extends BaseMapper<SubwaySection> { public interface SubwaySectionMapper extends BaseMapper<SubwaySection> {
IPage<SubwaySectionVO> queryPageList(IPage<SubwaySectionVO> page, SubwaySectionQueryDTO query);
} }
...@@ -16,4 +16,5 @@ import org.jeecg.modules.subwayNetwork.vo.TrainStationVO; ...@@ -16,4 +16,5 @@ import org.jeecg.modules.subwayNetwork.vo.TrainStationVO;
public interface TrainStationMapper extends BaseMapper<TrainStation> { public interface TrainStationMapper extends BaseMapper<TrainStation> {
IPage<TrainStationVO> queryPageList(IPage<LightRailQueryVO> page, TrainStationQueryDTO query); IPage<TrainStationVO> queryPageList(IPage<LightRailQueryVO> page, TrainStationQueryDTO query);
} }
...@@ -12,13 +12,11 @@ ...@@ -12,13 +12,11 @@
t1.status, t1.status,
t1.update_by, t1.update_by,
t1.update_time, t1.update_time,
count(t2.id) subwaySectionNum, (SELECT count(1) FROM t_sn_subway_section WHERE light_rail_id = t1.id ) subwaySectionNum,
count(t3.id) trainStationNum, (SELECT count( DISTINCT station_name) FROM t_sn_train_station WHERE light_rail_id = t1.id ) trainStationNum,
ifnull(sum(t3.end_mileage),0) lineMileage (SELECT max(end_mileage) FROM t_sn_train_station WHERE light_rail_id = t1.id ) lineMileage
FROM FROM
t_sn_light_rail t1 t_sn_light_rail t1
LEFT JOIN t_sn_subway_section t2 ON t1.id = t2.rail_id
LEFT JOIN t_sn_train_station t3 ON t1.id = t3.light_rail_id
<where> <where>
<if test="query.railLineName != null and query.railLineName != ''"> <if test="query.railLineName != null and query.railLineName != ''">
AND t1.rail_line_name like concat('%',#{query.railLineName},'%') AND t1.rail_line_name like concat('%',#{query.railLineName},'%')
......
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.subwayNetwork.mapper.SectionStationMapMapper"> <mapper namespace="org.jeecg.modules.subwayNetwork.mapper.LineAliasMapper">
<select id="queryPageList" resultType="org.jeecg.modules.subwayNetwork.vo.LightAliasQueryVO">
select * from t_sn_line_alias
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -2,4 +2,23 @@ ...@@ -2,4 +2,23 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.subwayNetwork.mapper.SubwaySectionMapper"> <mapper namespace="org.jeecg.modules.subwayNetwork.mapper.SubwaySectionMapper">
<select id="queryPageList" resultType="org.jeecg.modules.subwayNetwork.vo.SubwaySectionVO">
SELECT
t1.id,
t1.create_by,
t1.create_time,
t1.section_name,
t2.rail_line_name light_rail_name,
t1.light_rail_id,
t1.start_train_station_id,
t1.end_train_station_id,
t1.remark
FROM
t_sn_subway_section t1 LEFT JOIN t_sn_light_rail t2 ON t1.light_rail_id = t2.id
<where>
<if test="query.sectionName != null and query.sectionName != ''">
AND t1.section_name like concat('%',#{query.sectionName},'%')
</if>
</where>
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -4,38 +4,24 @@ ...@@ -4,38 +4,24 @@
<select id="queryPageList" resultType="org.jeecg.modules.subwayNetwork.vo.TrainStationVO"> <select id="queryPageList" resultType="org.jeecg.modules.subwayNetwork.vo.TrainStationVO">
SELECT SELECT
t1.center_mileage,
t1.center_mileage_prefix,
t1.create_by,
t1.create_time,
t1.end_mileage,
t1.end_mileage_prefix,
t1.id, t1.id,
t1.station_name,
t1.station_code,
t1.light_rail_id, t1.light_rail_id,
t1.line_alias, t2.rail_line_name light_rail_name,
t1.line_alias_code,
t1.starting_mileage, t1.starting_mileage,
t1.starting_mileage_prefix,
t1.station_code,
t1.station_name,
t1.update_by,
t1.update_time,
t1.center_mileage, t1.center_mileage,
t1.center_mileage_prefix, t1.end_mileage,
t1.create_by, t1.create_by,
t1.create_time, t1.create_time,
t1.end_mileage,
t1.end_mileage_prefix,
t1.id,
t1.light_rail_id,
t1.line_alias,
t1.starting_mileage,
t1.starting_mileage_prefix,
t1.station_code,
t1.station_name,
t1.update_by, t1.update_by,
t1.update_time t1.update_time,
FROM t1.length,
t_sn_train_station t1 t1.seq,
t1.remark
FROM t_sn_train_station t1
LEFT JOIN t_sn_light_rail t2 ON t1.light_rail_id = t2.id
<where> <where>
<if test="query.stationName !=null and query.stationName!=''"> <if test="query.stationName !=null and query.stationName!=''">
AND t1.station_name like concat('%',#{query.stationName},'%') AND t1.station_name like concat('%',#{query.stationName},'%')
......
package org.jeecg.modules.subwayNetwork.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.subwayNetwork.dto.LineAliasQueryDTO;
import org.jeecg.modules.subwayNetwork.entity.LineAlias;
import org.jeecg.modules.subwayNetwork.vo.LightAliasQueryVO;
/**
* @Description: 线路车站-线别管理
* @Version: V1.0
*/
public interface ILineAliasService extends IService<LineAlias> {
IPage<LightAliasQueryVO> queryPageList(Page<LightAliasQueryVO> pageData, LineAliasQueryDTO dto);
}
package org.jeecg.modules.subwayNetwork.service;
import org.jeecg.modules.subwayNetwork.entity.SectionStationMap;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @Description: 线路车站-区间站点映射
* @Author: jeecg-boot
* @Date: 2023-06-15
* @Version: V1.0
*/
public interface ISectionStationMapService extends IService<SectionStationMap> {
}
package org.jeecg.modules.subwayNetwork.service; package org.jeecg.modules.subwayNetwork.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.jeecg.common.api.dto.PageSearch;
import org.jeecg.modules.subwayNetwork.dto.SubwaySectionEditDTO; import org.jeecg.modules.subwayNetwork.dto.SubwaySectionEditDTO;
import org.jeecg.modules.subwayNetwork.dto.SubwaySectionQueryDTO;
import org.jeecg.modules.subwayNetwork.entity.SubwaySection; import org.jeecg.modules.subwayNetwork.entity.SubwaySection;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.subwayNetwork.vo.SubwaySectionVO;
/** /**
* @Description: 线路车站-地铁区间 * @Description: 线路车站-地铁区间
...@@ -13,4 +17,6 @@ import com.baomidou.mybatisplus.extension.service.IService; ...@@ -13,4 +17,6 @@ import com.baomidou.mybatisplus.extension.service.IService;
public interface ISubwaySectionService extends IService<SubwaySection> { public interface ISubwaySectionService extends IService<SubwaySection> {
void edit(SubwaySectionEditDTO dto); void edit(SubwaySectionEditDTO dto);
IPage<SubwaySectionVO> queryPageList(PageSearch<SubwaySectionQueryDTO> dto);
} }
...@@ -3,6 +3,7 @@ package org.jeecg.modules.subwayNetwork.service; ...@@ -3,6 +3,7 @@ package org.jeecg.modules.subwayNetwork.service;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.common.api.dto.PageSearch; import org.jeecg.common.api.dto.PageSearch;
import org.jeecg.modules.subwayNetwork.dto.TrainStationEditDTO;
import org.jeecg.modules.subwayNetwork.dto.TrainStationQueryDTO; import org.jeecg.modules.subwayNetwork.dto.TrainStationQueryDTO;
import org.jeecg.modules.subwayNetwork.entity.TrainStation; import org.jeecg.modules.subwayNetwork.entity.TrainStation;
import org.jeecg.modules.subwayNetwork.vo.TrainStationVO; import org.jeecg.modules.subwayNetwork.vo.TrainStationVO;
...@@ -17,4 +18,6 @@ public interface ITrainStationService extends IService<TrainStation> { ...@@ -17,4 +18,6 @@ public interface ITrainStationService extends IService<TrainStation> {
IPage<TrainStationVO> queryPageList(PageSearch<TrainStationQueryDTO> dto); IPage<TrainStationVO> queryPageList(PageSearch<TrainStationQueryDTO> dto);
void edit(TrainStationEditDTO dto);
} }
package org.jeecg.modules.subwayNetwork.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.subwayNetwork.dto.LineAliasQueryDTO;
import org.jeecg.modules.subwayNetwork.entity.LineAlias;
import org.jeecg.modules.subwayNetwork.mapper.LineAliasMapper;
import org.jeecg.modules.subwayNetwork.service.ILineAliasService;
import org.jeecg.modules.subwayNetwork.vo.LightAliasQueryVO;
import org.springframework.stereotype.Service;
/**
* @Description: 线路车站-轻轨线路
* @Author: jeecg-boot
* @Date: 2023-06-14
* @Version: V1.0
*/
@Service
public class LightAliasServiceImpl extends ServiceImpl<LineAliasMapper, LineAlias> implements ILineAliasService {
@Override
public IPage<LightAliasQueryVO> queryPageList(Page<LightAliasQueryVO> pageData, LineAliasQueryDTO dto) {
return this.baseMapper.queryPageList(pageData,dto);
}
}
...@@ -6,17 +6,13 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; ...@@ -6,17 +6,13 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.common.api.dto.PageSearch; import org.jeecg.common.api.dto.PageSearch;
import org.jeecg.modules.subwayNetwork.dto.LightRailQueryDTO; import org.jeecg.modules.subwayNetwork.dto.LightRailQueryDTO;
import org.jeecg.modules.subwayNetwork.entity.LightRail; import org.jeecg.modules.subwayNetwork.entity.LightRail;
import org.jeecg.modules.subwayNetwork.entity.SectionStationMap;
import org.jeecg.modules.subwayNetwork.mapper.LightRailMapper; import org.jeecg.modules.subwayNetwork.mapper.LightRailMapper;
import org.jeecg.modules.subwayNetwork.service.ILightRailService; import org.jeecg.modules.subwayNetwork.service.ILightRailService;
import org.jeecg.modules.subwayNetwork.vo.LightRailQueryVO; import org.jeecg.modules.subwayNetwork.vo.LightRailQueryVO;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
/** /**
* @Description: 线路车站-轻轨线路 * @Description: 线路车站-线别管理
* @Author: jeecg-boot
* @Date: 2023-06-14
* @Version: V1.0
*/ */
@Service @Service
public class LightRailServiceImpl extends ServiceImpl<LightRailMapper, LightRail> implements ILightRailService { public class LightRailServiceImpl extends ServiceImpl<LightRailMapper, LightRail> implements ILightRailService {
......
package org.jeecg.modules.subwayNetwork.service.impl;
import org.jeecg.modules.subwayNetwork.entity.SectionStationMap;
import org.jeecg.modules.subwayNetwork.mapper.SectionStationMapMapper;
import org.jeecg.modules.subwayNetwork.service.ISectionStationMapService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: 线路车站-区间站点映射
* @Author: jeecg-boot
* @Date: 2023-06-15
* @Version: V1.0
*/
@Service
public class SectionStationMapServiceImpl extends ServiceImpl<SectionStationMapMapper, SectionStationMap> implements ISectionStationMapService {
}
package org.jeecg.modules.subwayNetwork.service.impl; package org.jeecg.modules.subwayNetwork.service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.ObjectUtil;
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.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.common.api.dto.PageSearch;
import org.jeecg.modules.subwayNetwork.dto.SubwaySectionEditDTO; import org.jeecg.modules.subwayNetwork.dto.SubwaySectionEditDTO;
import org.jeecg.modules.subwayNetwork.dto.SubwaySectionQueryDTO;
import org.jeecg.modules.subwayNetwork.entity.SubwaySection; import org.jeecg.modules.subwayNetwork.entity.SubwaySection;
import org.jeecg.modules.subwayNetwork.entity.TrainStation;
import org.jeecg.modules.subwayNetwork.mapper.SubwaySectionMapper; import org.jeecg.modules.subwayNetwork.mapper.SubwaySectionMapper;
import org.jeecg.modules.subwayNetwork.mapper.TrainStationMapper;
import org.jeecg.modules.subwayNetwork.service.ISubwaySectionService; import org.jeecg.modules.subwayNetwork.service.ISubwaySectionService;
import org.jeecg.modules.subwayNetwork.vo.SubwaySectionVO;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import javax.annotation.Resource;
import java.math.BigDecimal;
/** /**
* @Description: 线路车站-地铁区间 * @Description: 线路车站-地铁区间
* @Author: jeecg-boot * @Author: jeecg-boot
* @Date: 2023-06-15 * @Date: 2023-06-15
* @Version: V1.0 * @Version: V1.0
*/ */
@Service @Service
public class SubwaySectionServiceImpl extends ServiceImpl<SubwaySectionMapper, SubwaySection> implements ISubwaySectionService { public class SubwaySectionServiceImpl extends ServiceImpl<SubwaySectionMapper, SubwaySection> implements ISubwaySectionService {
@Resource
private TrainStationMapper trainStationMapper;
@Override @Override
public void edit(SubwaySectionEditDTO dto) { public void edit(SubwaySectionEditDTO dto) {
SubwaySection subwaySection = BeanUtil.copyProperties(dto, SubwaySection.class);
if (ObjectUtil.isEmpty(dto.getId())) {
this.save(subwaySection);
} else {
this.updateById(subwaySection);
}
}
@Override
public IPage<SubwaySectionVO> queryPageList(PageSearch<SubwaySectionQueryDTO> dto) {
// 分页查询
IPage<SubwaySectionVO> page = new Page<>(dto.getPageNo(), dto.getPageSize());
page = this.baseMapper.queryPageList(page, dto.getQuery());
for (SubwaySectionVO record : page.getRecords()) {
// 计算区间里程
TrainStation startTrainStation = trainStationMapper.selectById(record.getStartTrainStationId());
TrainStation endTrainStation = trainStationMapper.selectById(record.getEndTrainStationId());
BigDecimal sectionMileage = endTrainStation.getEndMileage().subtract(startTrainStation.getEndMileage());
record.setSectionMileage(sectionMileage);
// 车站数量
int trainStationNum = endTrainStation.getSeq() - startTrainStation.getSeq() + 1;
record.setTrainStationNum(trainStationNum);
}
return page;
} }
} }
package org.jeecg.modules.subwayNetwork.service.impl; package org.jeecg.modules.subwayNetwork.service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.conditions.query.QueryChainWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.common.api.dto.PageSearch; import org.jeecg.common.api.dto.PageSearch;
import org.jeecg.modules.subwayNetwork.dto.TrainStationEditDTO;
import org.jeecg.modules.subwayNetwork.dto.TrainStationQueryDTO; import org.jeecg.modules.subwayNetwork.dto.TrainStationQueryDTO;
import org.jeecg.modules.subwayNetwork.mapper.TrainStationMapper; import org.jeecg.modules.subwayNetwork.mapper.TrainStationMapper;
import org.jeecg.modules.subwayNetwork.service.ITrainStationService; import org.jeecg.modules.subwayNetwork.service.ITrainStationService;
...@@ -12,6 +17,9 @@ import org.jeecg.modules.subwayNetwork.vo.TrainStationVO; ...@@ -12,6 +17,9 @@ import org.jeecg.modules.subwayNetwork.vo.TrainStationVO;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.math.BigDecimal;
import java.util.List;
/** /**
* @Description: 线路车站-地铁站 * @Description: 线路车站-地铁站
* @Author: jeecg-boot * @Author: jeecg-boot
...@@ -24,6 +32,43 @@ public class TrainStationServiceImpl extends ServiceImpl<TrainStationMapper, Tra ...@@ -24,6 +32,43 @@ public class TrainStationServiceImpl extends ServiceImpl<TrainStationMapper, Tra
@Override @Override
public IPage<TrainStationVO> queryPageList(PageSearch<TrainStationQueryDTO> dto) { public IPage<TrainStationVO> queryPageList(PageSearch<TrainStationQueryDTO> dto) {
IPage<LightRailQueryVO> page = new Page<>(dto.getPageNo(), dto.getPageSize()); IPage<LightRailQueryVO> page = new Page<>(dto.getPageNo(), dto.getPageSize());
return this.baseMapper.queryPageList(page,dto.getQuery()); return this.baseMapper.queryPageList(page, dto.getQuery());
} }
@Override
public void edit(TrainStationEditDTO dto) {
// 1.计算站长度:终点里程-起始里程
BigDecimal length = dto.getEndMileage().subtract(dto.getStartingMileage());
// 2.通过id判断是保存还是修改
if (ObjectUtil.isEmpty(dto.getId())) {
//
Integer seq = 1;
TrainStation exist = this.lambdaQuery().eq(TrainStation::getLightRailId, dto.getLightRailId())
.eq(TrainStation::getStationName, dto.getStationName())
.last("limit 1")
.one();
if (ObjectUtil.isEmpty(exist)) {
List<TrainStation> list = this.lambdaQuery()
.eq(TrainStation::getLightRailId, dto.getLightRailId())
.groupBy(TrainStation::getStationName)
.list();
seq = list.size() + 1;
} else {
seq = exist.getSeq();
}
TrainStation trainStation = BeanUtil.copyProperties(dto, TrainStation.class);
trainStation.setLength(length);
trainStation.setSeq(seq);
this.save(trainStation);
} else {
TrainStation trainStation = BeanUtil.copyProperties(dto, TrainStation.class);
trainStation.setLength(length);
this.updateById(trainStation);
}
}
} }
package org.jeecg.modules.subwayNetwork.vo;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
@Data
@ApiModel(value = "线路车站-线别管理VO")
public class LightAliasQueryVO {
private static final long serialVersionUID = 1L;
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private java.lang.String id;
@ApiModelProperty(value = "创建人")
private java.lang.String createBy;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private java.util.Date createTime;
@ApiModelProperty(value = "更新人")
private String updateBy;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新日期")
private Date updateTime;
@ApiModelProperty(value = "线别Code")
private String lineAliasCode;
@ApiModelProperty(value = "线别名称")
private String lineAliasName;
@ApiModelProperty(value = "备注")
private String remark;
}
package org.jeecg.modules.subwayNetwork.vo; package org.jeecg.modules.subwayNetwork.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.math.BigDecimal;
import java.util.Date;
@Data @Data
@ApiModel(value = "区间VO") @ApiModel(value = "区间VO")
public class SubwaySectionVO { public class SubwaySectionVO {
@ApiModelProperty(value = "主键")
private String id;
@ApiModelProperty(value = "创建人")
private String createBy;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private Date createTime;
@ApiModelProperty(value = "更新人")
private String updateBy;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新日期")
private Date updateTime;
@ApiModelProperty(value = "轻轨线路ID")
private String lightRailId;
@ApiModelProperty(value = "轻轨线路名称")
private String lightRailName;
@ApiModelProperty(value = "起始车站Id")
private String startTrainStationId;
@ApiModelProperty(value = "结束车站Id")
private String endTrainStationId;
@ApiModelProperty(value = "区间名")
private String sectionName;
@ApiModelProperty(value = "区间里程")
private BigDecimal sectionMileage;
@ApiModelProperty(value = "车站数量")
private Integer trainStationNum;
@ApiModelProperty(value = "备注")
private String remark;
} }
package org.jeecg.modules.subwayNetwork.vo; package org.jeecg.modules.subwayNetwork.vo;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
import java.math.BigDecimal; import java.math.BigDecimal;
...@@ -35,33 +32,36 @@ public class TrainStationVO { ...@@ -35,33 +32,36 @@ public class TrainStationVO {
@ApiModelProperty(value = "更新日期") @ApiModelProperty(value = "更新日期")
private Date updateTime; private Date updateTime;
@ApiModelProperty(value = "轻轨线路ID") @ApiModelProperty(value = "轻轨线路Id")
private String lightRailId; private String lightRailId;
@ApiModelProperty(value = "轻轨线路名称")
private String lightRailName;
@ApiModelProperty(value = "车站名") @ApiModelProperty(value = "车站名")
private String stationName; private String stationName;
@ApiModelProperty(value = "车站编码") @ApiModelProperty(value = "车站编码")
private String stationCode; private String stationCode;
@ApiModelProperty(value = "线别") @ApiModelProperty(value = "线别Code")
private String lineAlias; private String lineAliasCode;
@ApiModelProperty(value = "起始里程前缀")
private String startingMileagePrefix;
@ApiModelProperty(value = "起始里程") @ApiModelProperty(value = "起始里程")
private BigDecimal startingMileage; private BigDecimal startingMileage;
@ApiModelProperty(value = "中心里程前缀")
private String centerMileagePrefix;
@ApiModelProperty(value = "中心里程") @ApiModelProperty(value = "中心里程")
private BigDecimal centerMileage; private BigDecimal centerMileage;
@ApiModelProperty(value = "结束里程前缀")
private String endMileagePrefix;
@ApiModelProperty(value = "结束里程") @ApiModelProperty(value = "结束里程")
private BigDecimal endMileage; private BigDecimal endMileage;
@ApiModelProperty(value = "站台长度")
private BigDecimal length;
@ApiModelProperty(value = "顺序")
private Integer seq;
@ApiModelProperty(value = "备注")
private String remark;
} }
...@@ -302,6 +302,7 @@ public class SysPermissionController { ...@@ -302,6 +302,7 @@ public class SysPermissionController {
json.put("allAuth", allauthjsonArray); json.put("allAuth", allauthjsonArray);
json.put("sysSafeMode", jeecgBaseConfig.getSafeMode()); json.put("sysSafeMode", jeecgBaseConfig.getSafeMode());
result.setResult(json); result.setResult(json);
result.setSuccess(true);
} catch (Exception e) { } catch (Exception e) {
result.error500("查询失败:" + e.getMessage()); result.error500("查询失败:" + e.getMessage());
log.error(e.getMessage(), e); log.error(e.getMessage(), e);
......
...@@ -156,6 +156,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl ...@@ -156,6 +156,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
result.setSuccess(true); result.setSuccess(true);
result.setResult(pageList); result.setResult(pageList);
result.setCode(200);
//log.info(pageList.toString()); //log.info(pageList.toString());
return result; return result;
} }
......
...@@ -71,7 +71,7 @@ public class PermissionDataUtil { ...@@ -71,7 +71,7 @@ public class PermissionDataUtil {
// 一级菜单默认组件 // 一级菜单默认组件
if (0 == permission.getMenuType() && oConvertUtils.isEmpty(permission.getComponent())) { if (0 == permission.getMenuType() && oConvertUtils.isEmpty(permission.getComponent())) {
// 一级菜单默认组件 // 一级菜单默认组件
permission.setComponent("layouts/RouteView"); // permission.setComponent("layouts/RouteView");
} }
return permission; return permission;
} }
......
...@@ -131,7 +131,7 @@ spring: ...@@ -131,7 +131,7 @@ spring:
connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000 connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
datasource: datasource:
master: master:
url: jdbc:mysql://47.94.207.62:3306/hzsomms2?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&zeroDateTimeBehavior=convertToNull url: jdbc:mysql://47.94.207.62:3306/hzsomms?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&zeroDateTimeBehavior=convertToNull
username: root username: root
password: superAdmin&321 password: superAdmin&321
driver-class-name: com.mysql.jdbc.Driver driver-class-name: com.mysql.jdbc.Driver
...@@ -188,9 +188,10 @@ jeecg: ...@@ -188,9 +188,10 @@ jeecg:
app: http://localhost:8051 app: http://localhost:8051
path: path:
#文件上传根目录 设置 #文件上传根目录 设置
upload: /opt/upFiles upload: F:\\upFiles
#webapp文件路径 #webapp文件路径
webapp: /opt/webapp webapp: F:\\upFiles
#文件访问域名
shiro: shiro:
excludeUrls: /test/jeecgDemo/demo3,/test/jeecgDemo/redisDemo/**,/category/**,/visual/**,/map/**,/jmreport/bigscreen2/** excludeUrls: /test/jeecgDemo/demo3,/test/jeecgDemo/redisDemo/**,/category/**,/visual/**,/map/**,/jmreport/bigscreen2/**
#阿里云oss存储和大鱼短信秘钥配置 #阿里云oss存储和大鱼短信秘钥配置
...@@ -205,7 +206,7 @@ jeecg: ...@@ -205,7 +206,7 @@ jeecg:
cluster-nodes: 127.0.0.1:9200 cluster-nodes: 127.0.0.1:9200
check-enabled: false check-enabled: false
# 在线预览文件服务器地址配置 # 在线预览文件服务器地址配置
file-view-domain: http://fileview.jeecg.com file-view-domain: http://192.168.11.41:8080
# minio文件上传 # minio文件上传
minio: minio:
minio_url: http://minio.jeecg.com minio_url: http://minio.jeecg.com
......
server: server:
port: 8080 port: 16888
tomcat: tomcat:
max-swallow-size: -1 max-swallow-size: -1
error: error:
...@@ -7,7 +7,7 @@ server: ...@@ -7,7 +7,7 @@ server:
include-stacktrace: ALWAYS include-stacktrace: ALWAYS
include-message: ALWAYS include-message: ALWAYS
servlet: servlet:
context-path: /jeecg-boot context-path: /hzsomms/api
compression: compression:
enabled: true enabled: true
min-response-size: 1024 min-response-size: 1024
......
...@@ -131,7 +131,7 @@ spring: ...@@ -131,7 +131,7 @@ spring:
connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000 connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
datasource: datasource:
master: master:
url: jdbc:mysql://47.94.207.62:3306/hzsomms2?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&zeroDateTimeBehavior=convertToNull url: jdbc:mysql://127.0.0.1:3306/hzsomms?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&zeroDateTimeBehavior=convertToNull
username: root username: root
password: superAdmin&321 password: superAdmin&321
driver-class-name: com.mysql.jdbc.Driver driver-class-name: com.mysql.jdbc.Driver
...@@ -144,7 +144,7 @@ spring: ...@@ -144,7 +144,7 @@ spring:
#redis 配置 #redis 配置
redis: redis:
database: 0 database: 0
host: 47.94.207.62 host: 127.0.0.1
lettuce: lettuce:
pool: pool:
max-active: 8 #最大连接数据库连接数,设 0 为没有限制 max-active: 8 #最大连接数据库连接数,设 0 为没有限制
...@@ -188,9 +188,9 @@ jeecg: ...@@ -188,9 +188,9 @@ jeecg:
app: http://localhost:8051 app: http://localhost:8051
path: path:
#文件上传根目录 设置 #文件上传根目录 设置
upload: D://opt//upFiles upload: /opt/ztgk/file
#webapp文件路径 #webapp文件路径
webapp: D://opt//webapp webapp: /opt/ztgk/file
shiro: shiro:
excludeUrls: /test/jeecgDemo/demo3,/test/jeecgDemo/redisDemo/**,/category/**,/visual/**,/map/**,/jmreport/bigscreen2/** excludeUrls: /test/jeecgDemo/demo3,/test/jeecgDemo/redisDemo/**,/category/**,/visual/**,/map/**,/jmreport/bigscreen2/**
#阿里云oss存储和大鱼短信秘钥配置 #阿里云oss存储和大鱼短信秘钥配置
...@@ -206,7 +206,7 @@ jeecg: ...@@ -206,7 +206,7 @@ jeecg:
cluster-nodes: 81.70.47.128:9200 cluster-nodes: 81.70.47.128:9200
check-enabled: false check-enabled: false
# 在线预览文件服务器地址配置 # 在线预览文件服务器地址配置
file-view-domain: http://127.0.0.1:8012 file-view-domain: http://47.94.207.62
# minio文件上传 # minio文件上传
minio: minio:
minio_url: http://minio.jeecg.com minio_url: http://minio.jeecg.com
...@@ -257,7 +257,7 @@ knife4j: ...@@ -257,7 +257,7 @@ knife4j:
#开启生产环境屏蔽 #开启生产环境屏蔽
production: false production: false
basic: basic:
enable: true enable: false
username: jeecg username: jeecg
password: jeecg1314 password: jeecg1314
#第三方登录 #第三方登录
......
...@@ -2,4 +2,4 @@ spring: ...@@ -2,4 +2,4 @@ spring:
application: application:
name: jeecg-system name: jeecg-system
profiles: profiles:
active: dev active: dev
\ No newline at end of file
...@@ -28,14 +28,16 @@ ...@@ -28,14 +28,16 @@
<xxl-job-core.version>2.2.0</xxl-job-core.version> <xxl-job-core.version>2.2.0</xxl-job-core.version>
<fastjson.version>1.2.83</fastjson.version> <fastjson.version>1.2.83</fastjson.version>
<pegdown.version>1.6.0</pegdown.version> <pegdown.version>1.6.0</pegdown.version>
<knife4j-spring-boot-starter.version>3.0.3</knife4j-spring-boot-starter.version> <knife4j-spring-boot-starter.version>2.0.2</knife4j-spring-boot-starter.version>
<knife4j-spring-ui.version>2.0.9</knife4j-spring-ui.version> <knife4j-spring-ui.version>2.0.2</knife4j-spring-ui.version>
<!-- <knife4j-spring-ui.version>2.0.9</knife4j-spring-ui.version>
<knife4j-spring-boot-starter.version>3.0.3</knife4j-spring-boot-starter.version>-->
<!-- 数据库驱动 --> <!-- 数据库驱动 -->
<postgresql.version>42.2.25</postgresql.version> <postgresql.version>42.2.25</postgresql.version>
<ojdbc6.version>11.2.0.3</ojdbc6.version> <ojdbc6.version>11.2.0.3</ojdbc6.version>
<sqljdbc4.version>4.0</sqljdbc4.version> <sqljdbc4.version>4.0</sqljdbc4.version>
<mysql-connector-java.version>8.0.27</mysql-connector-java.version> <mysql-connector-java.version>8.0.27</mysql-connector-java.version>
<hutool.version>5.3.8</hutool.version> <hutool.version>5.8.20</hutool.version>
<!-- 持久层 --> <!-- 持久层 -->
<mybatis-plus.version>3.5.1</mybatis-plus.version> <mybatis-plus.version>3.5.1</mybatis-plus.version>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment