Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
H
hzsomms
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ZTGK
hzsomms
Commits
634df7bc
Commit
634df7bc
authored
Jul 06, 2023
by
hkl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:1.代码提交
parent
414b9804
Changes
30
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
100 additions
and
2161 deletions
+100
-2161
LogRecordAspect.java
.../src/main/java/org/jeecg/modules/aop/LogRecordAspect.java
+2
-2
SystemApiController.java
...org/jeecg/modules/api/controller/SystemApiController.java
+0
-767
CasClientController.java
...org/jeecg/modules/cas/controller/CasClientController.java
+0
-111
CasServiceUtil.java
.../main/java/org/jeecg/modules/cas/util/CasServiceUtil.java
+0
-107
XmlUtils.java
...iz/src/main/java/org/jeecg/modules/cas/util/XmlUtils.java
+0
-304
CurveManagementDTO.java
...org/jeecg/modules/deviceAsset/dto/CurveManagementDTO.java
+0
-48
FastenerManagementDTO.java
.../jeecg/modules/deviceAsset/dto/FastenerManagementDTO.java
+2
-2
SignBoardManagementDTO.java
...jeecg/modules/deviceAsset/dto/SignBoardManagementDTO.java
+3
-41
TrackBedManagementDTO.java
.../jeecg/modules/deviceAsset/dto/TrackBedManagementDTO.java
+4
-45
VerticalCurveManagementDTO.java
...g/modules/deviceAsset/dto/VerticalCurveManagementDTO.java
+4
-60
TrackBedManagement.java
.../jeecg/modules/deviceAsset/entity/TrackBedManagement.java
+9
-8
CurveManagementMapper.xml
.../modules/deviceAsset/mapper/xml/CurveManagementMapper.xml
+10
-1
SignBoardManagementMapper.xml
...ules/deviceAsset/mapper/xml/SignBoardManagementMapper.xml
+8
-1
VerticalCurveManagementMapper.xml
.../deviceAsset/mapper/xml/VerticalCurveManagementMapper.xml
+13
-1
CurveManagementQueryVO.java
.../jeecg/modules/deviceAsset/vo/CurveManagementQueryVO.java
+9
-0
FastenerManagementVO.java
...rg/jeecg/modules/deviceAsset/vo/FastenerManagementVO.java
+0
-12
SignBoardManagementVO.java
...g/jeecg/modules/deviceAsset/vo/SignBoardManagementVO.java
+12
-15
TrackBedManagementVO.java
...rg/jeecg/modules/deviceAsset/vo/TrackBedManagementVO.java
+6
-21
VerticalCurveManagementVO.java
...ecg/modules/deviceAsset/vo/VerticalCurveManagementVO.java
+12
-18
NgAlainController.java
...g/jeecg/modules/ngalain/controller/NgAlainController.java
+0
-86
NgAlainService.java
...ava/org/jeecg/modules/ngalain/service/NgAlainService.java
+0
-37
NgAlainServiceImpl.java
...eecg/modules/ngalain/service/impl/NgAlainServiceImpl.java
+0
-187
OssFileController.java
...a/org/jeecg/modules/oss/controller/OssFileController.java
+0
-97
OssFile.java
...z/src/main/java/org/jeecg/modules/oss/entity/OssFile.java
+0
-28
OssFileMapper.java
...main/java/org/jeecg/modules/oss/mapper/OssFileMapper.java
+0
-12
IOssFileService.java
...n/java/org/jeecg/modules/oss/service/IOssFileService.java
+0
-29
OssFileServiceImpl.java
...rg/jeecg/modules/oss/service/impl/OssFileServiceImpl.java
+0
-53
SubwaySection.java
...org/jeecg/modules/subwayNetwork/entity/SubwaySection.java
+4
-0
SubwaySectionServiceImpl.java
.../subwayNetwork/service/impl/SubwaySectionServiceImpl.java
+2
-0
SysUploadController.java
.../jeecg/modules/system/controller/SysUploadController.java
+0
-68
No files found.
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/
ngalain/
aop/LogRecordAspect.java
→
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/aop/LogRecordAspect.java
View file @
634df7bc
package
org
.
jeecg
.
modules
.
ngalain
.
aop
;
package
org
.
jeecg
.
modules
.
aop
;
import
javax.servlet.http.HttpServletRequest
;
...
...
@@ -18,7 +18,7 @@ import org.slf4j.LoggerFactory;;
//@Aspect //定义一个切面
//@Configuration
public
class
LogRecordAspect
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
LogRecordAspect
.
class
);
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
LogRecordAspect
.
class
);
// 定义切点Pointcut
@Pointcut
(
"execution(public * org.jeecg.modules.*.*.*Controller.*(..))"
)
...
...
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/api/controller/SystemApiController.java
deleted
100644 → 0
View file @
414b9804
This diff is collapsed.
Click to expand it.
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/cas/controller/CasClientController.java
deleted
100644 → 0
View file @
414b9804
package
org
.
jeecg
.
modules
.
cas
.
controller
;
import
java.util.List
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
org.apache.commons.lang.StringUtils
;
import
org.jeecg.common.api.vo.Result
;
import
org.jeecg.common.constant.CommonConstant
;
import
org.jeecg.common.system.util.JwtUtil
;
import
org.jeecg.common.util.RedisUtil
;
import
org.jeecg.modules.cas.util.CasServiceUtil
;
import
org.jeecg.modules.cas.util.XmlUtils
;
import
org.jeecg.modules.system.entity.SysDepart
;
import
org.jeecg.modules.system.entity.SysUser
;
import
org.jeecg.modules.system.service.ISysDepartService
;
import
org.jeecg.modules.system.service.ISysUserService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.http.HttpEntity
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.alibaba.fastjson.JSONObject
;
import
lombok.extern.slf4j.Slf4j
;
/**
* <p>
* CAS单点登录客户端登录认证
* </p>
*
* @Author zhoujf
* @since 2018-12-20
*/
@Slf4j
@RestController
@RequestMapping
(
"/sys/cas/client"
)
public
class
CasClientController
{
@Autowired
private
ISysUserService
sysUserService
;
@Autowired
private
ISysDepartService
sysDepartService
;
@Autowired
private
RedisUtil
redisUtil
;
@Value
(
"${cas.prefixUrl}"
)
private
String
prefixUrl
;
@GetMapping
(
"/validateLogin"
)
public
Object
validateLogin
(
@RequestParam
(
name
=
"ticket"
)
String
ticket
,
@RequestParam
(
name
=
"service"
)
String
service
,
HttpServletRequest
request
,
HttpServletResponse
response
)
throws
Exception
{
Result
<
JSONObject
>
result
=
new
Result
<
JSONObject
>();
log
.
info
(
"Rest api login."
);
try
{
String
validateUrl
=
prefixUrl
+
"/p3/serviceValidate"
;
String
res
=
CasServiceUtil
.
getStValidate
(
validateUrl
,
ticket
,
service
);
log
.
info
(
"res."
+
res
);
final
String
error
=
XmlUtils
.
getTextForElement
(
res
,
"authenticationFailure"
);
if
(
StringUtils
.
isNotEmpty
(
error
))
{
throw
new
Exception
(
error
);
}
final
String
principal
=
XmlUtils
.
getTextForElement
(
res
,
"user"
);
if
(
StringUtils
.
isEmpty
(
principal
))
{
throw
new
Exception
(
"No principal was found in the response from the CAS server."
);
}
log
.
info
(
"-------token----username---"
+
principal
);
//1. 校验用户是否有效
SysUser
sysUser
=
sysUserService
.
getUserByName
(
principal
);
result
=
sysUserService
.
checkUserIsEffective
(
sysUser
);
if
(!
result
.
isSuccess
())
{
return
result
;
}
String
token
=
JwtUtil
.
sign
(
sysUser
.
getUsername
(),
sysUser
.
getPassword
());
// 设置超时时间
redisUtil
.
set
(
CommonConstant
.
PREFIX_USER_TOKEN
+
token
,
token
);
redisUtil
.
expire
(
CommonConstant
.
PREFIX_USER_TOKEN
+
token
,
JwtUtil
.
EXPIRE_TIME
*
2
/
1000
);
//获取用户部门信息
JSONObject
obj
=
new
JSONObject
();
List
<
SysDepart
>
departs
=
sysDepartService
.
queryUserDeparts
(
sysUser
.
getId
());
obj
.
put
(
"departs"
,
departs
);
if
(
departs
==
null
||
departs
.
size
()
==
0
)
{
obj
.
put
(
"multi_depart"
,
0
);
}
else
if
(
departs
.
size
()
==
1
)
{
sysUserService
.
updateUserDepart
(
principal
,
departs
.
get
(
0
).
getOrgCode
(),
null
);
obj
.
put
(
"multi_depart"
,
1
);
}
else
{
obj
.
put
(
"multi_depart"
,
2
);
}
obj
.
put
(
"token"
,
token
);
obj
.
put
(
"userInfo"
,
sysUser
);
result
.
setResult
(
obj
);
result
.
success
(
"登录成功"
);
}
catch
(
Exception
e
)
{
//e.printStackTrace();
result
.
error500
(
e
.
getMessage
());
}
return
new
HttpEntity
<>(
result
);
}
}
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/cas/util/CasServiceUtil.java
deleted
100644 → 0
View file @
414b9804
package
org
.
jeecg
.
modules
.
cas
.
util
;
import
java.io.BufferedReader
;
import
java.io.IOException
;
import
java.io.InputStreamReader
;
import
java.security.cert.X509Certificate
;
import
javax.net.ssl.SSLContext
;
import
javax.net.ssl.TrustManager
;
import
javax.net.ssl.X509TrustManager
;
import
org.apache.http.HttpResponse
;
import
org.apache.http.client.methods.HttpGet
;
import
org.apache.http.conn.socket.LayeredConnectionSocketFactory
;
import
org.apache.http.conn.ssl.SSLConnectionSocketFactory
;
import
org.apache.http.impl.client.CloseableHttpClient
;
import
org.apache.http.impl.client.HttpClients
;
/**
* @Description: CasServiceUtil
* @author: jeecg-boot
*/
public
class
CasServiceUtil
{
public
static
void
main
(
String
[]
args
)
{
String
serviceUrl
=
"https://cas.8f8.com.cn:8443/cas/p3/serviceValidate"
;
String
service
=
"http://localhost:3003/user/login"
;
String
ticket
=
"ST-5-1g-9cNES6KXNRwq-GuRET103sm0-DESKTOP-VKLS8B3"
;
String
res
=
getStValidate
(
serviceUrl
,
ticket
,
service
);
System
.
out
.
println
(
"---------res-----"
+
res
);
}
/**
* 验证ST
*/
public
static
String
getStValidate
(
String
url
,
String
st
,
String
service
){
try
{
url
=
url
+
"?service="
+
service
+
"&ticket="
+
st
;
CloseableHttpClient
httpclient
=
createHttpClientWithNoSsl
();
HttpGet
httpget
=
new
HttpGet
(
url
);
HttpResponse
response
=
httpclient
.
execute
(
httpget
);
String
res
=
readResponse
(
response
);
return
res
==
null
?
null
:
(
res
==
""
?
null
:
res
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
""
;
}
/**
* 读取 response body 内容为字符串
*
* @param response
* @return
* @throws IOException
*/
private
static
String
readResponse
(
HttpResponse
response
)
throws
IOException
{
BufferedReader
in
=
new
BufferedReader
(
new
InputStreamReader
(
response
.
getEntity
().
getContent
()));
String
result
=
new
String
();
String
line
;
while
((
line
=
in
.
readLine
())
!=
null
)
{
result
+=
line
;
}
return
result
;
}
/**
* 创建模拟客户端(针对 https 客户端禁用 SSL 验证)
*
* @param cookieStore 缓存的 Cookies 信息
* @return
* @throws Exception
*/
private
static
CloseableHttpClient
createHttpClientWithNoSsl
()
throws
Exception
{
// Create a trust manager that does not validate certificate chains
TrustManager
[]
trustAllCerts
=
new
TrustManager
[]{
new
X509TrustManager
()
{
@Override
public
X509Certificate
[]
getAcceptedIssuers
()
{
return
null
;
}
@Override
public
void
checkClientTrusted
(
X509Certificate
[]
certs
,
String
authType
)
{
// don't check
}
@Override
public
void
checkServerTrusted
(
X509Certificate
[]
certs
,
String
authType
)
{
// don't check
}
}
};
SSLContext
ctx
=
SSLContext
.
getInstance
(
"TLS"
);
ctx
.
init
(
null
,
trustAllCerts
,
null
);
LayeredConnectionSocketFactory
sslSocketFactory
=
new
SSLConnectionSocketFactory
(
ctx
);
return
HttpClients
.
custom
()
.
setSSLSocketFactory
(
sslSocketFactory
)
.
build
();
}
}
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/cas/util/XmlUtils.java
deleted
100644 → 0
View file @
414b9804
This diff is collapsed.
Click to expand it.
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/deviceAsset/dto/CurveManagementDTO.java
View file @
634df7bc
...
...
@@ -28,57 +28,9 @@ public class CurveManagementDTO implements Serializable {
private
String
id
;
@ApiModelProperty
(
"创建人"
)
private
String
createBy
;
@ApiModelProperty
(
"创建日期"
)
private
Date
createTime
;
@ApiModelProperty
(
"更新人"
)
private
String
updateBy
;
@ApiModelProperty
(
"更新时间"
)
private
Date
updateTime
;
@ApiModelProperty
(
"曲线编号"
)
private
String
curveCode
;
@ApiModelProperty
(
"曲线偏角a(°′″)"
)
private
String
curveDeflectionAngle
;
@ApiModelProperty
(
"曲线半径R(m)"
)
private
BigDecimal
curveAdius
;
@ApiModelProperty
(
"缓和曲线长I(m)"
)
private
BigDecimal
transitionCurveLen
;
@ApiModelProperty
(
"切线长T(m)"
)
private
BigDecimal
tangentLen
;
@ApiModelProperty
(
"曲线长L(m)"
)
private
BigDecimal
curveLen
;
@ApiModelProperty
(
"直缓(直圆)里程ZH(ZY)"
)
private
String
curveMileageZh
;
@ApiModelProperty
(
"缓圆里程(HY)"
)
private
String
curveMileageHy
;
@ApiModelProperty
(
"圆缓里程(YH)"
)
private
String
curveMileageYh
;
@ApiModelProperty
(
"缓直(圆直)里程HZ(YZ)"
)
private
String
curveMileageHz
;
@ApiModelProperty
(
"超高H(mm)"
)
private
BigDecimal
superHigh
;
@ApiModelProperty
(
"区间id"
)
private
String
sectionId
;
@ApiModelProperty
(
"线别id"
)
private
String
lineAliasId
;
@ApiModelProperty
(
"备注"
)
private
String
remark
;
...
...
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/deviceAsset/dto/FastenerManagementDTO.java
View file @
634df7bc
...
...
@@ -2,14 +2,14 @@ package org.jeecg.modules.deviceAsset.dto;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Getter
;
import
lombok.Setter
;
import
java.math.BigDecimal
;
import
java.util.Date
;
@Getter
@Setter
@Data
public
class
FastenerManagementDTO
{
private
static
final
long
serialVersionUID
=
1L
;
...
...
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/deviceAsset/dto/SignBoardManagementDTO.java
View file @
634df7bc
...
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Getter
;
import
lombok.Setter
;
...
...
@@ -19,10 +20,8 @@ import java.util.Date;
* @author hkl
* @since 2023-07-06
*/
@Getter
@Setter
@TableName
(
"t_da_sign_board_management"
)
@ApiModel
(
value
=
"SignBoardManagement对象"
,
description
=
"资产管理-轨行区标识牌管理"
)
@Data
@ApiModel
(
value
=
"SignBoardManagementDTO对象"
,
description
=
"资产管理-轨行区标识牌管理"
)
public
class
SignBoardManagementDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
...
...
@@ -30,45 +29,8 @@ public class SignBoardManagementDTO implements Serializable {
@TableField
(
"id"
)
private
String
id
;
@ApiModelProperty
(
"创建人"
)
@TableField
(
"create_by"
)
private
String
createBy
;
@ApiModelProperty
(
"创建日期"
)
@TableField
(
"create_time"
)
private
Date
createTime
;
@ApiModelProperty
(
"更新人"
)
@TableField
(
"update_by"
)
private
String
updateBy
;
@ApiModelProperty
(
"更新时间"
)
@TableField
(
"update_time"
)
private
Date
updateTime
;
@ApiModelProperty
(
"轨行区标识牌编号"
)
@TableField
(
"sign_board_code"
)
private
String
signBoardCode
;
@ApiModelProperty
(
"轨行区标识牌类型"
)
@TableField
(
"sign_board_type"
)
private
String
signBoardType
;
@ApiModelProperty
(
"区间id"
)
@TableField
(
"section_id"
)
private
String
sectionId
;
@ApiModelProperty
(
"线别id"
)
@TableField
(
"line_alias_id"
)
private
String
lineAliasId
;
@ApiModelProperty
(
"里程"
)
@TableField
(
"mileage"
)
private
BigDecimal
mileage
;
@ApiModelProperty
(
"备注"
)
@TableField
(
"remark"
)
private
String
remark
;
}
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/deviceAsset/dto/TrackBedManagementDTO.java
View file @
634df7bc
...
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Getter
;
import
lombok.Setter
;
...
...
@@ -19,10 +20,7 @@ import java.util.Date;
* @author hkl
* @since 2023-07-06
*/
@Getter
@Setter
@TableName
(
"t_da_track_bed_management"
)
@ApiModel
(
value
=
"TrackBedManagement对象"
,
description
=
"资产管理-道床管理"
)
@Data
public
class
TrackBedManagementDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
...
...
@@ -30,52 +28,13 @@ public class TrackBedManagementDTO implements Serializable {
@TableField
(
"id"
)
private
String
id
;
@ApiModelProperty
(
"创建人"
)
@TableField
(
"create_by"
)
private
String
createBy
;
@ApiModelProperty
(
"创建日期"
)
@TableField
(
"create_time"
)
private
Date
createTime
;
@ApiModelProperty
(
"更新人"
)
@TableField
(
"update_by"
)
private
String
updateBy
;
@ApiModelProperty
(
"更新时间"
)
@TableField
(
"update_time"
)
private
Date
updateTime
;
@ApiModelProperty
(
"轨枕编号"
)
@TableField
(
"track_bed_code"
)
@ApiModelProperty
(
"道床编号"
)
private
String
trackBedCode
;
@ApiModelProperty
(
"轨枕类型"
)
@TableField
(
"track_bed_type"
)
@ApiModelProperty
(
"道床类型"
)
private
String
trackBedType
;
@ApiModelProperty
(
"区间id"
)
@TableField
(
"section_id"
)
private
String
sectionId
;
@ApiModelProperty
(
"线别id"
)
@TableField
(
"line_alias_id"
)
private
String
lineAliasId
;
@ApiModelProperty
(
"起始里程"
)
@TableField
(
"starting_mileage"
)
private
BigDecimal
startingMileage
;
@ApiModelProperty
(
"结束里程"
)
@TableField
(
"end_mileage"
)
private
BigDecimal
endMileage
;
@ApiModelProperty
(
"扣件长度"
)
@TableField
(
"fastener_len"
)
private
BigDecimal
fastenerLen
;
@ApiModelProperty
(
"备注"
)
@TableField
(
"remark"
)
private
String
remark
;
...
...
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/deviceAsset/dto/VerticalCurveManagementDTO.java
View file @
634df7bc
...
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Getter
;
import
lombok.Setter
;
...
...
@@ -19,72 +20,15 @@ import java.util.Date;
* @author hkl
* @since 2023-07-06
*/
@Getter
@Setter
@TableName
(
"t_da_vertical_curve_management"
)
@ApiModel
(
value
=
"VerticalCurveManagement对象"
,
description
=
"资产管理-竖曲线管理"
)
@Data
@ApiModel
(
value
=
"VerticalCurveManagementDTO对象"
,
description
=
"资产管理-竖曲线管理"
)
public
class
VerticalCurveManagementDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
@TableField
(
"id"
)
@ApiModelProperty
(
"id"
)
private
String
id
;
@ApiModelProperty
(
"创建人"
)
@TableField
(
"create_by"
)
private
String
createBy
;
@ApiModelProperty
(
"创建日期"
)
@TableField
(
"create_time"
)
private
Date
createTime
;
@ApiModelProperty
(
"更新人"
)
@TableField
(
"update_by"
)
private
String
updateBy
;
@ApiModelProperty
(
"更新时间"
)
@TableField
(
"update_time"
)
private
Date
updateTime
;
@ApiModelProperty
(
"竖曲线编号"
)
@TableField
(
"vertical_curve_code"
)
private
String
verticalCurveCode
;
@ApiModelProperty
(
"区间id"
)
@TableField
(
"section_id"
)
private
String
sectionId
;
@ApiModelProperty
(
"线别id"
)
@TableField
(
"line_alias_id"
)
private
String
lineAliasId
;
@ApiModelProperty
(
"起始里程"
)
@TableField
(
"starting_mileage"
)
private
BigDecimal
startingMileage
;
@ApiModelProperty
(
"中心里程"
)
@TableField
(
"center_mileage"
)
private
BigDecimal
centerMileage
;
@ApiModelProperty
(
"结束里程"
)
@TableField
(
"end_mileage"
)
private
BigDecimal
endMileage
;
@ApiModelProperty
(
"竖曲线半径R(m)"
)
@TableField
(
"vertical_curve_adius"
)
private
BigDecimal
verticalCurveAdius
;
@ApiModelProperty
(
"切线长T(m)"
)
@TableField
(
"tangent_len"
)
private
BigDecimal
tangentLen
;
@ApiModelProperty
(
"外矢距/E(m)"
)
@TableField
(
"apex_distance"
)
private
BigDecimal
apexDistance
;
@ApiModelProperty
(
"备注"
)
@TableField
(
"remark"
)
private
String
remark
;
}
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/deviceAsset/entity/TrackBedManagement.java
View file @
634df7bc
...
...
@@ -2,11 +2,14 @@ package org.jeecg.modules.deviceAsset.entity;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Getter
;
import
lombok.Setter
;
...
...
@@ -18,8 +21,7 @@ import lombok.Setter;
* @author hkl
* @since 2023-07-06
*/
@Getter
@Setter
@Data
@TableName
(
"t_da_track_bed_management"
)
@ApiModel
(
value
=
"TrackBedManagement对象"
,
description
=
"资产管理-道床管理"
)
public
class
TrackBedManagement
implements
Serializable
{
...
...
@@ -45,11 +47,11 @@ public class TrackBedManagement implements Serializable {
@TableField
(
"update_time"
)
private
Date
updateTime
;
@ApiModelProperty
(
"
轨枕
编号"
)
@ApiModelProperty
(
"
道床
编号"
)
@TableField
(
"track_bed_code"
)
private
String
trackBedCode
;
@ApiModelProperty
(
"
轨枕
类型"
)
@ApiModelProperty
(
"
道床
类型"
)
@TableField
(
"track_bed_type"
)
private
String
trackBedType
;
...
...
@@ -69,13 +71,12 @@ public class TrackBedManagement implements Serializable {
@TableField
(
"end_mileage"
)
private
BigDecimal
endMileage
;
@ApiModelProperty
(
"
扣件长度
"
)
@TableField
(
"
fastener
_len"
)
private
BigDecimal
fastener
Len
;
@ApiModelProperty
(
"
道床长度=结束里程-起始里程
"
)
@TableField
(
"
track_bed
_len"
)
private
BigDecimal
trackBed
Len
;
@ApiModelProperty
(
"备注"
)
@TableField
(
"remark"
)
private
String
remark
;
}
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/deviceAsset/mapper/xml/CurveManagementMapper.xml
View file @
634df7bc
...
...
@@ -5,8 +5,17 @@
<select
id=
"queryPageList"
resultType=
"org.jeecg.modules.deviceAsset.vo.CurveManagementQueryVO"
>
SELECT
t1.*
t1.*,
t2.light_rail_name,
t2.section_name,
(SELECT line_alias_name FROM t_sn_line_alias WHERE id = t1.line_alias_id limit 1) line_alias_name
FROM
t_da_curve_management t1
LEFT JOIN t_sn_subway_section t2 ON t1.section_id = t2.id
<where>
<if
test=
"dto.curveCode != null and dto.curveCode != ''"
>
AND t1.curve_code like concat('%',#{dto.curveCode},'%')
</if>
</where>
</select>
</mapper>
\ No newline at end of file
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/deviceAsset/mapper/xml/SignBoardManagementMapper.xml
View file @
634df7bc
...
...
@@ -3,6 +3,13 @@
<mapper
namespace=
"org.jeecg.modules.deviceAsset.mapper.SignBoardManagementMapper"
>
<select
id=
"queryPageList"
resultType=
"org.jeecg.modules.deviceAsset.vo.SignBoardManagementVO"
>
select t1.* from t_da_sign_board_management t1
SELECT
t1.*,
t2.light_rail_name,
t2.section_name,
( SELECT line_alias_name FROM t_sn_line_alias WHERE id = t1.line_alias_id LIMIT 1 ) line_alias_name
FROM
t_da_sign_board_management t1
LEFT JOIN t_sn_subway_section t2 ON t1.section_id = t2.id
</select>
</mapper>
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/deviceAsset/mapper/xml/VerticalCurveManagementMapper.xml
View file @
634df7bc
...
...
@@ -3,6 +3,18 @@
<mapper
namespace=
"org.jeecg.modules.deviceAsset.mapper.VerticalCurveManagementMapper"
>
<select
id=
"queryPageList"
resultType=
"org.jeecg.modules.deviceAsset.vo.VerticalCurveManagementVO"
>
select * from t_da_vertical_curve_management
SELECT
t1.*,
t2.light_rail_name,
t2.section_name,
( SELECT line_alias_name FROM t_sn_line_alias WHERE id = t1.line_alias_id LIMIT 1 ) line_alias_name
FROM
t_da_vertical_curve_management t1
LEFT JOIN t_sn_subway_section t2 ON t1.section_id = t2.id
<where>
<if
test=
"dto.curveCode != null and dto.curveCode != ''"
>
AND t1.vertical_curve_code like concat('%',#{dto.curveCode},'%')
</if>
</where>
</select>
</mapper>
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/deviceAsset/vo/CurveManagementQueryVO.java
View file @
634df7bc
...
...
@@ -72,9 +72,18 @@ public class CurveManagementQueryVO implements Serializable {
@ApiModelProperty
(
"区间id"
)
private
String
sectionId
;
@ApiModelProperty
(
"线路名称"
)
private
String
lightRailName
;
@ApiModelProperty
(
"区间名称"
)
private
String
sectionName
;
@ApiModelProperty
(
"线别id"
)
private
String
lineAliasId
;
@ApiModelProperty
(
"线别名称"
)
private
String
lineAliasName
;
@ApiModelProperty
(
"备注"
)
private
String
remark
;
...
...
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/deviceAsset/vo/FastenerManagementVO.java
View file @
634df7bc
...
...
@@ -17,50 +17,38 @@ public class FastenerManagementVO {
private
String
id
;
@ApiModelProperty
(
"创建人"
)
@TableField
(
"create_by"
)
private
String
createBy
;
@ApiModelProperty
(
"创建日期"
)
@TableField
(
"create_time"
)
private
Date
createTime
;
@ApiModelProperty
(
"更新人"
)
@TableField
(
"update_by"
)
private
String
updateBy
;
@ApiModelProperty
(
"更新时间"
)
@TableField
(
"update_time"
)
private
Date
updateTime
;
@ApiModelProperty
(
"扣件编号"
)
@TableField
(
"fastener_code"
)
private
String
fastenerCode
;
@ApiModelProperty
(
"扣件类型"
)
@TableField
(
"fastener_type"
)
private
String
fastenerType
;
@ApiModelProperty
(
"区间id"
)
@TableField
(
"section_id"
)
private
String
sectionId
;
@ApiModelProperty
(
"线别id"
)
@TableField
(
"line_alias_id"
)
private
String
lineAliasId
;
@ApiModelProperty
(
"起始里程"
)
@TableField
(
"starting_mileage"
)
private
BigDecimal
startingMileage
;
@ApiModelProperty
(
"结束里程"
)
@TableField
(
"end_mileage"
)
private
BigDecimal
endMileage
;
@ApiModelProperty
(
"扣件长度"
)
@TableField
(
"fastener_len"
)
private
BigDecimal
fastenerLen
;
@ApiModelProperty
(
"备注"
)
@TableField
(
"remark"
)
private
String
remark
;
}
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/deviceAsset/vo/SignBoardManagementVO.java
View file @
634df7bc
...
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Getter
;
import
lombok.Setter
;
...
...
@@ -19,10 +20,8 @@ import java.util.Date;
* @author hkl
* @since 2023-07-06
*/
@Getter
@Setter
@TableName
(
"t_da_sign_board_management"
)
@ApiModel
(
value
=
"SignBoardManagement对象"
,
description
=
"资产管理-轨行区标识牌管理"
)
@Data
@ApiModel
(
value
=
"SignBoardManagementVO对象"
,
description
=
"资产管理-轨行区标识牌管理"
)
public
class
SignBoardManagementVO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
...
...
@@ -31,44 +30,42 @@ public class SignBoardManagementVO implements Serializable {
private
String
id
;
@ApiModelProperty
(
"创建人"
)
@TableField
(
"create_by"
)
private
String
createBy
;
@ApiModelProperty
(
"创建日期"
)
@TableField
(
"create_time"
)
private
Date
createTime
;
@ApiModelProperty
(
"更新人"
)
@TableField
(
"update_by"
)
private
String
updateBy
;
@ApiModelProperty
(
"更新时间"
)
@TableField
(
"update_time"
)
private
Date
updateTime
;
@ApiModelProperty
(
"轨行区标识牌编号"
)
@TableField
(
"sign_board_code"
)
private
String
signBoardCode
;
@ApiModelProperty
(
"轨行区标识牌类型"
)
@TableField
(
"sign_board_type"
)
private
String
signBoardType
;
@ApiModelProperty
(
"区间id"
)
@TableField
(
"section_id"
)
private
String
sectionId
;
@ApiModelProperty
(
"线路名称"
)
private
String
lightRailName
;
@ApiModelProperty
(
"区间名称"
)
private
String
sectionName
;
@ApiModelProperty
(
"线别id"
)
@TableField
(
"line_alias_id"
)
private
String
lineAliasId
;
@ApiModelProperty
(
"线别名称"
)
private
String
lineAliasName
;
@ApiModelProperty
(
"里程"
)
@TableField
(
"mileage"
)
private
BigDecimal
mileage
;
@ApiModelProperty
(
"备注"
)
@TableField
(
"remark"
)
private
String
remark
;
}
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/deviceAsset/vo/TrackBedManagementVO.java
View file @
634df7bc
...
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Getter
;
import
lombok.Setter
;
...
...
@@ -19,10 +20,7 @@ import java.util.Date;
* @author hkl
* @since 2023-07-06
*/
@Getter
@Setter
@TableName
(
"t_da_track_bed_management"
)
@ApiModel
(
value
=
"TrackBedManagement对象"
,
description
=
"资产管理-道床管理"
)
@Data
public
class
TrackBedManagementVO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
...
...
@@ -31,52 +29,39 @@ public class TrackBedManagementVO implements Serializable {
private
String
id
;
@ApiModelProperty
(
"创建人"
)
@TableField
(
"create_by"
)
private
String
createBy
;
@ApiModelProperty
(
"创建日期"
)
@TableField
(
"create_time"
)
private
Date
createTime
;
@ApiModelProperty
(
"更新人"
)
@TableField
(
"update_by"
)
private
String
updateBy
;
@ApiModelProperty
(
"更新时间"
)
@TableField
(
"update_time"
)
private
Date
updateTime
;
@ApiModelProperty
(
"轨枕编号"
)
@TableField
(
"track_bed_code"
)
@ApiModelProperty
(
"道床编号"
)
private
String
trackBedCode
;
@ApiModelProperty
(
"轨枕类型"
)
@TableField
(
"track_bed_type"
)
@ApiModelProperty
(
"道床类型"
)
private
String
trackBedType
;
@ApiModelProperty
(
"区间id"
)
@TableField
(
"section_id"
)
private
String
sectionId
;
@ApiModelProperty
(
"线别id"
)
@TableField
(
"line_alias_id"
)
private
String
lineAliasId
;
@ApiModelProperty
(
"起始里程"
)
@TableField
(
"starting_mileage"
)
private
BigDecimal
startingMileage
;
@ApiModelProperty
(
"结束里程"
)
@TableField
(
"end_mileage"
)
private
BigDecimal
endMileage
;
@ApiModelProperty
(
"扣件长度"
)
@TableField
(
"fastener_len"
)
private
BigDecimal
fastenerLen
;
@ApiModelProperty
(
"道床长度=结束里程-起始里程"
)
private
BigDecimal
trackBedLen
;
@ApiModelProperty
(
"备注"
)
@TableField
(
"remark"
)
private
String
remark
;
}
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/deviceAsset/vo/VerticalCurveManagementVO.java
View file @
634df7bc
...
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Getter
;
import
lombok.Setter
;
...
...
@@ -19,10 +20,8 @@ import java.util.Date;
* @author hkl
* @since 2023-07-06
*/
@Getter
@Setter
@TableName
(
"t_da_vertical_curve_management"
)
@ApiModel
(
value
=
"VerticalCurveManagement对象"
,
description
=
"资产管理-竖曲线管理"
)
@Data
@ApiModel
(
value
=
"VerticalCurveManagementDTO对象"
,
description
=
"资产管理-竖曲线管理"
)
public
class
VerticalCurveManagementVO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
...
...
@@ -31,59 +30,54 @@ public class VerticalCurveManagementVO implements Serializable {
private
String
id
;
@ApiModelProperty
(
"创建人"
)
@TableField
(
"create_by"
)
private
String
createBy
;
@ApiModelProperty
(
"创建日期"
)
@TableField
(
"create_time"
)
private
Date
createTime
;
@ApiModelProperty
(
"更新人"
)
@TableField
(
"update_by"
)
private
String
updateBy
;
@ApiModelProperty
(
"更新时间"
)
@TableField
(
"update_time"
)
private
Date
updateTime
;
@ApiModelProperty
(
"竖曲线编号"
)
@TableField
(
"vertical_curve_code"
)
private
String
verticalCurveCode
;
@ApiModelProperty
(
"区间id"
)
@TableField
(
"section_id"
)
private
String
sectionId
;
@ApiModelProperty
(
"线路名称"
)
private
String
lightRailName
;
@ApiModelProperty
(
"区间名称"
)
private
String
sectionName
;
@ApiModelProperty
(
"线别id"
)
@TableField
(
"line_alias_id"
)
private
String
lineAliasId
;
@ApiModelProperty
(
"线别名称"
)
private
String
lineAliasName
;
@ApiModelProperty
(
"起始里程"
)
@TableField
(
"starting_mileage"
)
private
BigDecimal
startingMileage
;
@ApiModelProperty
(
"中心里程"
)
@TableField
(
"center_mileage"
)
private
BigDecimal
centerMileage
;
@ApiModelProperty
(
"结束里程"
)
@TableField
(
"end_mileage"
)
private
BigDecimal
endMileage
;
@ApiModelProperty
(
"竖曲线半径R(m)"
)
@TableField
(
"vertical_curve_adius"
)
private
BigDecimal
verticalCurveAdius
;
@ApiModelProperty
(
"切线长T(m)"
)
@TableField
(
"tangent_len"
)
private
BigDecimal
tangentLen
;
@ApiModelProperty
(
"外矢距/E(m)"
)
@TableField
(
"apex_distance"
)
private
BigDecimal
apexDistance
;
@ApiModelProperty
(
"备注"
)
@TableField
(
"remark"
)
private
String
remark
;
...
...
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/ngalain/controller/NgAlainController.java
deleted
100644 → 0
View file @
414b9804
//package org.jeecg.modules.ngalain.controller;
//
//import java.util.ArrayList;
//import java.util.List;
//import java.util.Map;
//
//import javax.servlet.http.HttpServletRequest;
//
//import org.apache.shiro.SecurityUtils;
//import org.jeecg.common.api.vo.Result;
//import org.jeecg.common.system.vo.DictModel;
//import org.jeecg.common.system.vo.LoginUser;
//import org.jeecg.modules.ngalain.service.NgAlainService;
//import org.jeecg.modules.system.service.ISysDictService;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.PathVariable;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RequestMethod;
//import org.springframework.web.bind.annotation.ResponseBody;
//import org.springframework.web.bind.annotation.RestController;
//
//import com.alibaba.fastjson.JSONObject;
//
//import lombok.extern.slf4j.Slf4j;
//
//@Slf4j
//@RestController
//@RequestMapping("/sys/ng-alain")
//public class NgAlainController {
// @Autowired
// private NgAlainService ngAlainService;
// @Autowired
// private ISysDictService sysDictService;
//
// @RequestMapping(value = "/getAppData")
// @ResponseBody
// public JSONObject getAppData(HttpServletRequest request) throws Exception {
// String token=request.getHeader("X-Access-Token");
// JSONObject j = new JSONObject();
// LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
// JSONObject userObjcet = new JSONObject();
// userObjcet.put("name", user.getUsername());
// userObjcet.put("avatar", user.getAvatar());
// userObjcet.put("email", user.getEmail());
// userObjcet.put("token", token);
// j.put("user", userObjcet);
// j.put("menu",ngAlainService.getMenu(user.getUsername()));
// JSONObject app = new JSONObject();
// app.put("name", "jeecg-boot-angular");
// app.put("description", "jeecg+ng-alain整合版本");
// j.put("app", app);
// return j;
// }
//
// @RequestMapping(value = "/getDictItems/{dictCode}", method = RequestMethod.GET)
// public Object getDictItems(@PathVariable String dictCode) {
// log.info(" dictCode : "+ dictCode);
// Result<List<DictModel>> result = new Result<List<DictModel>>();
// List<DictModel> ls = null;
// try {
// ls = sysDictService.queryDictItemsByCode(dictCode);
// result.setSuccess(true);
// result.setResult(ls);
// } catch (Exception e) {
// log.error(e.getMessage(),e);
// result.error500("操作失败");
// return result;
// }
// List<JSONObject> dictlist=new ArrayList<>();
// for (DictModel l : ls) {
// JSONObject dict=new JSONObject();
// try {
// dict.put("value",Integer.parseInt(l.getValue()));
// } catch (NumberFormatException e) {
// dict.put("value",l.getValue());
// }
// dict.put("label",l.getText());
// dictlist.add(dict);
// }
// return dictlist;
// }
// @RequestMapping(value = "/getDictItemsByTable/{table}/{key}/{value}", method = RequestMethod.GET)
// public Object getDictItemsByTable(@PathVariable String table,@PathVariable String key,@PathVariable String value) {
// return this.ngAlainService.getDictByTable(table,key,value);
// }
//}
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/ngalain/service/NgAlainService.java
deleted
100644 → 0
View file @
414b9804
package
org
.
jeecg
.
modules
.
ngalain
.
service
;
import
com.alibaba.fastjson.JSONArray
;
import
java.util.List
;
import
java.util.Map
;
/**
* @Description: NgAlainService接口
* @author: jeecg-boot
*/
public
interface
NgAlainService
{
/**
* 菜单
* @param id
* @return JSONArray
* @throws Exception
*/
public
JSONArray
getMenu
(
String
id
)
throws
Exception
;
/**
* jeecg菜单
* @param id
* @return JSONArray
* @throws Exception
*/
public
JSONArray
getJeecgMenu
(
String
id
)
throws
Exception
;
/**
* 获取字典值
* @param table
* @param key
* @param value
* @return List<Map<String, String>>
*/
public
List
<
Map
<
String
,
String
>>
getDictByTable
(
String
table
,
String
key
,
String
value
);
}
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/ngalain/service/impl/NgAlainServiceImpl.java
deleted
100644 → 0
View file @
414b9804
package
org
.
jeecg
.
modules
.
ngalain
.
service
.
impl
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
org.jeecg.common.constant.CommonConstant
;
import
org.jeecg.common.constant.SymbolConstant
;
import
org.jeecg.common.util.oConvertUtils
;
import
org.jeecg.modules.ngalain.service.NgAlainService
;
import
org.jeecg.modules.system.entity.SysPermission
;
import
org.jeecg.modules.system.mapper.SysDictMapper
;
import
org.jeecg.modules.system.service.ISysPermissionService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.Base64
;
import
java.util.List
;
import
java.util.Map
;
/**
* @Description: NgAlainServiceImpl 实现类
* @author: jeecg-boot
*/
@Service
(
"ngAlainService"
)
public
class
NgAlainServiceImpl
implements
NgAlainService
{
@Autowired
private
ISysPermissionService
sysPermissionService
;
@Autowired
private
SysDictMapper
mapper
;
@Override
public
JSONArray
getMenu
(
String
id
)
throws
Exception
{
return
getJeecgMenu
(
id
);
}
@Override
public
JSONArray
getJeecgMenu
(
String
id
)
throws
Exception
{
List
<
SysPermission
>
metaList
=
sysPermissionService
.
queryByUser
(
id
);
JSONArray
jsonArray
=
new
JSONArray
();
getPermissionJsonArray
(
jsonArray
,
metaList
,
null
);
JSONArray
menulist
=
parseNgAlain
(
jsonArray
);
JSONObject
jeecgMenu
=
new
JSONObject
();
jeecgMenu
.
put
(
"text"
,
"jeecg菜单"
);
jeecgMenu
.
put
(
"group"
,
true
);
jeecgMenu
.
put
(
"children"
,
menulist
);
JSONArray
jeecgMenuList
=
new
JSONArray
();
jeecgMenuList
.
add
(
jeecgMenu
);
return
jeecgMenuList
;
}
@Override
public
List
<
Map
<
String
,
String
>>
getDictByTable
(
String
table
,
String
key
,
String
value
)
{
return
this
.
mapper
.
getDictByTableNgAlain
(
table
,
key
,
value
);
}
private
JSONArray
parseNgAlain
(
JSONArray
jsonArray
)
{
JSONArray
menulist
=
new
JSONArray
();
for
(
Object
object
:
jsonArray
)
{
JSONObject
jsonObject
=
(
JSONObject
)
object
;
String
path
=
(
String
)
jsonObject
.
get
(
"path"
);
JSONObject
meta
=
(
JSONObject
)
jsonObject
.
get
(
"meta"
);
JSONObject
menu
=
new
JSONObject
();
menu
.
put
(
"text"
,
meta
.
get
(
"title"
));
menu
.
put
(
"reuse"
,
true
);
if
(
jsonObject
.
get
(
"children"
)!=
null
){
JSONArray
child
=
parseNgAlain
((
JSONArray
)
jsonObject
.
get
(
"children"
));
menu
.
put
(
"children"
,
child
);
JSONObject
icon
=
new
JSONObject
();
icon
.
put
(
"type"
,
"icon"
);
icon
.
put
(
"value"
,
meta
.
get
(
"icon"
));
menu
.
put
(
"icon"
,
icon
);
}
else
{
menu
.
put
(
"link"
,
path
);
}
menulist
.
add
(
menu
);
}
return
menulist
;
}
/**
* 获取菜单JSON数组
* @param jsonArray
* @param metaList
* @param parentJson
*/
private
void
getPermissionJsonArray
(
JSONArray
jsonArray
,
List
<
SysPermission
>
metaList
,
JSONObject
parentJson
)
{
for
(
SysPermission
permission
:
metaList
)
{
if
(
permission
.
getMenuType
()==
null
)
{
continue
;
}
String
tempPid
=
permission
.
getParentId
();
JSONObject
json
=
getPermissionJsonObject
(
permission
);
if
(
parentJson
==
null
&&
oConvertUtils
.
isEmpty
(
tempPid
))
{
jsonArray
.
add
(
json
);
if
(!
permission
.
isLeaf
())
{
getPermissionJsonArray
(
jsonArray
,
metaList
,
json
);
}
}
else
if
(
parentJson
!=
null
&&
oConvertUtils
.
isNotEmpty
(
tempPid
)
&&
tempPid
.
equals
(
parentJson
.
getString
(
"id"
))){
if
(
permission
.
getMenuType
()==
0
)
{
JSONObject
metaJson
=
parentJson
.
getJSONObject
(
"meta"
);
if
(
metaJson
.
containsKey
(
"permissionList"
))
{
metaJson
.
getJSONArray
(
"permissionList"
).
add
(
json
);
}
else
{
JSONArray
permissionList
=
new
JSONArray
();
permissionList
.
add
(
json
);
metaJson
.
put
(
"permissionList"
,
permissionList
);
}
}
else
if
(
permission
.
getMenuType
()==
1
)
{
if
(
parentJson
.
containsKey
(
"children"
))
{
parentJson
.
getJSONArray
(
"children"
).
add
(
json
);
}
else
{
JSONArray
children
=
new
JSONArray
();
children
.
add
(
json
);
parentJson
.
put
(
"children"
,
children
);
}
if
(!
permission
.
isLeaf
())
{
getPermissionJsonArray
(
jsonArray
,
metaList
,
json
);
}
}
}
}
}
private
JSONObject
getPermissionJsonObject
(
SysPermission
permission
)
{
JSONObject
json
=
new
JSONObject
();
//类型(0:一级菜单 1:子菜单 2:按钮)
if
(
CommonConstant
.
MENU_TYPE_2
.
equals
(
permission
.
getMenuType
()))
{
json
.
put
(
"action"
,
permission
.
getPerms
());
json
.
put
(
"describe"
,
permission
.
getName
());
}
else
if
(
CommonConstant
.
MENU_TYPE_0
.
equals
(
permission
.
getMenuType
())
||
CommonConstant
.
MENU_TYPE_1
.
equals
(
permission
.
getMenuType
()))
{
json
.
put
(
"id"
,
permission
.
getId
());
boolean
flag
=
permission
.
getUrl
()!=
null
&&(
permission
.
getUrl
().
startsWith
(
CommonConstant
.
HTTP_PROTOCOL
)||
permission
.
getUrl
().
startsWith
(
CommonConstant
.
HTTPS_PROTOCOL
));
if
(
flag
)
{
String
url
=
new
String
(
Base64
.
getUrlEncoder
().
encode
(
permission
.
getUrl
().
getBytes
()));
json
.
put
(
"path"
,
"/sys/link/"
+
url
.
replaceAll
(
"="
,
""
));
}
else
{
json
.
put
(
"path"
,
permission
.
getUrl
());
}
//重要规则:路由name (通过URL生成路由name,路由name供前端开发,页面跳转使用)
json
.
put
(
"name"
,
urlToRouteName
(
permission
.
getUrl
()));
//是否隐藏路由,默认都是显示的
if
(
permission
.
isHidden
())
{
json
.
put
(
"hidden"
,
true
);
}
//聚合路由
if
(
permission
.
isAlwaysShow
())
{
json
.
put
(
"alwaysShow"
,
true
);
}
json
.
put
(
"component"
,
permission
.
getComponent
());
JSONObject
meta
=
new
JSONObject
();
meta
.
put
(
"title"
,
permission
.
getName
());
if
(
oConvertUtils
.
isEmpty
(
permission
.
getParentId
()))
{
//一级菜单跳转地址
json
.
put
(
"redirect"
,
permission
.
getRedirect
());
meta
.
put
(
"icon"
,
oConvertUtils
.
getString
(
permission
.
getIcon
(),
""
));
}
else
{
meta
.
put
(
"icon"
,
oConvertUtils
.
getString
(
permission
.
getIcon
(),
""
));
}
if
(
flag
)
{
meta
.
put
(
"url"
,
permission
.
getUrl
());
}
json
.
put
(
"meta"
,
meta
);
}
return
json
;
}
/**
* 通过URL生成路由name(去掉URL前缀斜杠,替换内容中的斜杠‘/’为-)
* 举例: URL = /isystem/role
* RouteName = isystem-role
* @return
*/
private
String
urlToRouteName
(
String
url
)
{
if
(
oConvertUtils
.
isNotEmpty
(
url
))
{
if
(
url
.
startsWith
(
SymbolConstant
.
SINGLE_SLASH
))
{
url
=
url
.
substring
(
1
);
}
url
=
url
.
replace
(
"/"
,
"-"
);
return
url
;
}
else
{
return
null
;
}
}
}
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/oss/controller/OssFileController.java
deleted
100644 → 0
View file @
414b9804
package
org
.
jeecg
.
modules
.
oss
.
controller
;
import
javax.servlet.http.HttpServletRequest
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.apache.shiro.authz.annotation.RequiresRoles
;
import
org.jeecg.common.api.vo.Result
;
import
org.jeecg.common.system.query.QueryGenerator
;
import
org.jeecg.modules.oss.entity.OssFile
;
import
org.jeecg.modules.oss.service.IOssFileService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
lombok.extern.slf4j.Slf4j
;
/**
* 云存储示例 DEMO
* @author: jeecg-boot
*/
@Slf4j
@Controller
@RequestMapping
(
"/sys/oss/file"
)
public
class
OssFileController
{
@Autowired
private
IOssFileService
ossFileService
;
@ResponseBody
@GetMapping
(
"/list"
)
public
Result
<
IPage
<
OssFile
>>
queryPageList
(
OssFile
file
,
@RequestParam
(
name
=
"pageNo"
,
defaultValue
=
"1"
)
Integer
pageNo
,
@RequestParam
(
name
=
"pageSize"
,
defaultValue
=
"10"
)
Integer
pageSize
,
HttpServletRequest
req
)
{
Result
<
IPage
<
OssFile
>>
result
=
new
Result
<>();
QueryWrapper
<
OssFile
>
queryWrapper
=
QueryGenerator
.
initQueryWrapper
(
file
,
req
.
getParameterMap
());
Page
<
OssFile
>
page
=
new
Page
<>(
pageNo
,
pageSize
);
IPage
<
OssFile
>
pageList
=
ossFileService
.
page
(
page
,
queryWrapper
);
result
.
setSuccess
(
true
);
result
.
setResult
(
pageList
);
return
result
;
}
@ResponseBody
@PostMapping
(
"/upload"
)
//@RequiresRoles("admin")
//@RequiresPermissions("system:ossFile:upload")
public
Result
upload
(
@RequestParam
(
"file"
)
MultipartFile
multipartFile
)
{
Result
result
=
new
Result
();
try
{
ossFileService
.
upload
(
multipartFile
);
result
.
success
(
"上传成功!"
);
}
catch
(
Exception
ex
)
{
log
.
info
(
ex
.
getMessage
(),
ex
);
result
.
error500
(
"上传失败"
);
}
return
result
;
}
@ResponseBody
@DeleteMapping
(
"/delete"
)
public
Result
delete
(
@RequestParam
(
name
=
"id"
)
String
id
)
{
Result
result
=
new
Result
();
OssFile
file
=
ossFileService
.
getById
(
id
);
if
(
file
==
null
)
{
result
.
error500
(
"未找到对应实体"
);
}
else
{
boolean
ok
=
ossFileService
.
delete
(
file
);
result
.
success
(
"删除成功!"
);
}
return
result
;
}
/**
* 通过id查询.
*/
@ResponseBody
@GetMapping
(
"/queryById"
)
public
Result
<
OssFile
>
queryById
(
@RequestParam
(
name
=
"id"
)
String
id
)
{
Result
<
OssFile
>
result
=
new
Result
<>();
OssFile
file
=
ossFileService
.
getById
(
id
);
if
(
file
==
null
)
{
result
.
error500
(
"未找到对应实体"
);
}
else
{
result
.
setResult
(
file
);
result
.
setSuccess
(
true
);
}
return
result
;
}
}
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/oss/entity/OssFile.java
deleted
100644 → 0
View file @
414b9804
package
org
.
jeecg
.
modules
.
oss
.
entity
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
org.jeecg.common.system.base.entity.JeecgEntity
;
import
org.jeecgframework.poi.excel.annotation.Excel
;
/**
* @Description: oss云存储实体类
* @author: jeecg-boot
*/
@Data
@TableName
(
"oss_file"
)
@EqualsAndHashCode
(
callSuper
=
false
)
@Accessors
(
chain
=
true
)
public
class
OssFile
extends
JeecgEntity
{
private
static
final
long
serialVersionUID
=
1L
;
@Excel
(
name
=
"文件名称"
)
private
String
fileName
;
@Excel
(
name
=
"文件地址"
)
private
String
url
;
}
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/oss/mapper/OssFileMapper.java
deleted
100644 → 0
View file @
414b9804
package
org
.
jeecg
.
modules
.
oss
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.jeecg.modules.oss.entity.OssFile
;
/**
* @Description: oss云存储Mapper
* @author: jeecg-boot
*/
public
interface
OssFileMapper
extends
BaseMapper
<
OssFile
>
{
}
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/oss/service/IOssFileService.java
deleted
100644 → 0
View file @
414b9804
package
org
.
jeecg
.
modules
.
oss
.
service
;
import
java.io.IOException
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
org.jeecg.modules.oss.entity.OssFile
;
import
org.springframework.web.multipart.MultipartFile
;
/**
* @Description: OOS云存储service接口
* @author: jeecg-boot
*/
public
interface
IOssFileService
extends
IService
<
OssFile
>
{
/**
* oss文件上传
* @param multipartFile
* @throws IOException
*/
void
upload
(
MultipartFile
multipartFile
)
throws
Exception
;
/**
* oss文件删除
* @param ossFile OSSFile对象
* @return
*/
boolean
delete
(
OssFile
ossFile
);
}
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/oss/service/impl/OssFileServiceImpl.java
deleted
100644 → 0
View file @
414b9804
package
org
.
jeecg
.
modules
.
oss
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.jeecg.common.exception.JeecgBootException
;
import
org.jeecg.common.util.CommonUtils
;
import
org.jeecg.common.util.oConvertUtils
;
import
org.jeecg.common.util.oss.OssBootUtil
;
import
org.jeecg.modules.oss.entity.OssFile
;
import
org.jeecg.modules.oss.mapper.OssFileMapper
;
import
org.jeecg.modules.oss.service.IOssFileService
;
import
org.springframework.stereotype.Service
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.io.IOException
;
/**
* @Description: OSS云存储实现类
* @author: jeecg-boot
*/
@Service
(
"ossFileService"
)
public
class
OssFileServiceImpl
extends
ServiceImpl
<
OssFileMapper
,
OssFile
>
implements
IOssFileService
{
@Override
public
void
upload
(
MultipartFile
multipartFile
)
throws
Exception
{
String
fileName
=
multipartFile
.
getOriginalFilename
();
fileName
=
CommonUtils
.
getFileName
(
fileName
);
OssFile
ossFile
=
new
OssFile
();
ossFile
.
setFileName
(
fileName
);
String
url
=
OssBootUtil
.
upload
(
multipartFile
,
"upload/test"
);
if
(
oConvertUtils
.
isEmpty
(
url
)){
throw
new
JeecgBootException
(
"上传文件失败! "
);
}
//update-begin--Author:scott Date:20201227 for:JT-361【文件预览】阿里云原生域名可以文件预览,自己映射域名kkfileview提示文件下载失败-------------------
// 返回阿里云原生域名前缀URL
ossFile
.
setUrl
(
OssBootUtil
.
getOriginalUrl
(
url
));
//update-end--Author:scott Date:20201227 for:JT-361【文件预览】阿里云原生域名可以文件预览,自己映射域名kkfileview提示文件下载失败-------------------
this
.
save
(
ossFile
);
}
@Override
public
boolean
delete
(
OssFile
ossFile
)
{
try
{
this
.
removeById
(
ossFile
.
getId
());
OssBootUtil
.
deleteUrl
(
ossFile
.
getUrl
());
}
catch
(
Exception
ex
)
{
log
.
error
(
ex
.
getMessage
(),
ex
);
return
false
;
}
return
true
;
}
}
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/subwayNetwork/entity/SubwaySection.java
View file @
634df7bc
...
...
@@ -61,6 +61,10 @@ public class SubwaySection implements Serializable {
@ApiModelProperty
(
value
=
"轻轨线路ID"
)
private
String
lightRailId
;
@Excel
(
name
=
"轻轨线路Name"
,
width
=
15
)
@ApiModelProperty
(
value
=
"轻轨线路Name"
)
private
String
lightRailName
;
@ApiModelProperty
(
value
=
"起始车站Id"
)
private
String
startTrainStationId
;
...
...
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/subwayNetwork/service/impl/SubwaySectionServiceImpl.java
View file @
634df7bc
...
...
@@ -49,6 +49,8 @@ public class SubwaySectionServiceImpl extends ServiceImpl<SubwaySectionMapper, S
@Override
public
void
edit
(
SubwaySectionEditDTO
dto
)
{
SubwaySection
subwaySection
=
BeanUtil
.
copyProperties
(
dto
,
SubwaySection
.
class
);
LightRail
rail
=
lightRailMapper
.
selectById
(
dto
.
getLightRailId
());
subwaySection
.
setLightRailName
(
rail
.
getRailLineName
());
if
(
ObjectUtil
.
isEmpty
(
dto
.
getId
()))
{
this
.
save
(
subwaySection
);
}
else
{
...
...
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/SysUploadController.java
deleted
100644 → 0
View file @
414b9804
package
org
.
jeecg
.
modules
.
system
.
controller
;
import
lombok.extern.slf4j.Slf4j
;
import
org.jeecg.common.api.vo.Result
;
import
org.jeecg.common.exception.JeecgBootException
;
import
org.jeecg.common.util.CommonUtils
;
import
org.jeecg.common.util.MinioUtil
;
import
org.jeecg.common.util.oConvertUtils
;
import
org.jeecg.modules.oss.entity.OssFile
;
import
org.jeecg.modules.oss.service.IOssFileService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.multipart.MultipartHttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
/**
* minio文件上传示例
* @author: jeecg-boot
*/
@Slf4j
@RestController
@RequestMapping
(
"/sys/upload"
)
public
class
SysUploadController
{
@Autowired
private
IOssFileService
ossFileService
;
/**
* 上传
* @param request
*/
@PostMapping
(
value
=
"/uploadMinio"
)
public
Result
<?>
uploadMinio
(
HttpServletRequest
request
)
throws
Exception
{
Result
<?>
result
=
new
Result
<>();
String
bizPath
=
request
.
getParameter
(
"biz"
);
//LOWCOD-2580 sys/common/upload接口存在任意文件上传漏洞
boolean
flag
=
oConvertUtils
.
isNotEmpty
(
bizPath
)
&&
(
bizPath
.
contains
(
"../"
)
||
bizPath
.
contains
(
"..\\"
));
if
(
flag
)
{
throw
new
JeecgBootException
(
"上传目录bizPath,格式非法!"
);
}
if
(
oConvertUtils
.
isEmpty
(
bizPath
)){
bizPath
=
""
;
}
MultipartHttpServletRequest
multipartRequest
=
(
MultipartHttpServletRequest
)
request
;
// 获取上传文件对象
MultipartFile
file
=
multipartRequest
.
getFile
(
"file"
);
// 获取文件名
String
orgName
=
file
.
getOriginalFilename
();
orgName
=
CommonUtils
.
getFileName
(
orgName
);
String
fileUrl
=
MinioUtil
.
upload
(
file
,
bizPath
);
if
(
oConvertUtils
.
isEmpty
(
fileUrl
)){
return
Result
.
error
(
"上传失败,请检查配置信息是否正确!"
);
}
//保存文件信息
OssFile
minioFile
=
new
OssFile
();
minioFile
.
setFileName
(
orgName
);
minioFile
.
setUrl
(
fileUrl
);
ossFileService
.
save
(
minioFile
);
result
.
setMessage
(
fileUrl
);
result
.
setSuccess
(
true
);
return
result
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment