Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
Project
Project
Details
Activity
Releases
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
youjj
cloud-platform
Commits
295a60f9
Commit
295a60f9
authored
Dec 26, 2019
by
hanfeng
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master-bug-vehiclemodel-hf' into dev
parents
7bf1ea7b
4d81ee9c
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
58 additions
and
14 deletions
+58
-14
AppPermissionService.java
...aoqi/security/admin/rpc/service/AppPermissionService.java
+3
-3
ResultVehicleVo.java
.../java/com/xxfc/platform/vehicle/pojo/ResultVehicleVo.java
+1
-1
VehicleExcelVo.java
...n/java/com/xxfc/platform/vehicle/pojo/VehicleExcelVo.java
+29
-1
VehiclePageQueryVo.java
...va/com/xxfc/platform/vehicle/pojo/VehiclePageQueryVo.java
+5
-1
VehicleInformationDownloadBiz.java
...c/platform/vehicle/biz/VehicleInformationDownloadBiz.java
+12
-5
VehicleInformationDownloadController.java
...icle/rest/admin/VehicleInformationDownloadController.java
+8
-3
No files found.
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rpc/service/AppPermissionService.java
View file @
295a60f9
...
@@ -205,7 +205,7 @@ public class AppPermissionService {
...
@@ -205,7 +205,7 @@ public class AppPermissionService {
return
JsonResultUtil
.
createDefaultFail
();
return
JsonResultUtil
.
createDefaultFail
();
}
}
try
{
try
{
result
.
put
(
"mobilecode"
,
mobilecode
);
result
.
put
(
"mobilecode"
,
""
);
//mobilecode
String
redisLockKey
=
RedisKey
.
CONSTANT_CODE_PREFIX
+
phone
+
mobilecode
;
String
redisLockKey
=
RedisKey
.
CONSTANT_CODE_PREFIX
+
phone
+
mobilecode
;
Boolean
suc
=
userRedisTemplate
.
opsForValue
().
setIfAbsent
(
redisLockKey
,
mobilecode
);
Boolean
suc
=
userRedisTemplate
.
opsForValue
().
setIfAbsent
(
redisLockKey
,
mobilecode
);
if
(
suc
)
{
if
(
suc
)
{
...
@@ -262,14 +262,14 @@ public class AppPermissionService {
...
@@ -262,14 +262,14 @@ public class AppPermissionService {
}
}
}
}
}
}
/*
String redisLockKey = RedisKey.CONSTANT_CODE_PREFIX + username + mobilecode;
String
redisLockKey
=
RedisKey
.
CONSTANT_CODE_PREFIX
+
username
+
mobilecode
;
String
mobilecodeRedis
=
userRedisTemplate
.
opsForValue
().
get
(
redisLockKey
)
==
null
?
""
:
userRedisTemplate
.
opsForValue
().
get
(
redisLockKey
).
toString
();
String
mobilecodeRedis
=
userRedisTemplate
.
opsForValue
().
get
(
redisLockKey
)
==
null
?
""
:
userRedisTemplate
.
opsForValue
().
get
(
redisLockKey
).
toString
();
log
.
info
(
"注册接口,获取redis中的验证码:"
+
mobilecodeRedis
+
"---time===="
+
System
.
currentTimeMillis
()/
1000L
);
log
.
info
(
"注册接口,获取redis中的验证码:"
+
mobilecodeRedis
+
"---time===="
+
System
.
currentTimeMillis
()/
1000L
);
// 获取到缓存的验证码后要先清空缓存对应键的值
// 获取到缓存的验证码后要先清空缓存对应键的值
userRedisTemplate
.
delete
(
redisLockKey
);
userRedisTemplate
.
delete
(
redisLockKey
);
if
(
StringUtils
.
isBlank
(
mobilecodeRedis
))
{
if
(
StringUtils
.
isBlank
(
mobilecodeRedis
))
{
return
JsonResultUtil
.
createFailedResult
(
ResultCode
.
NOTEXIST_CODE
,
"验证码错误"
);
return
JsonResultUtil
.
createFailedResult
(
ResultCode
.
NOTEXIST_CODE
,
"验证码错误"
);
}
*/
}
// 是否已存在
// 是否已存在
AppUserLogin
user
=
appUserLoginBiz
.
checkeUserLogin
(
username
);
AppUserLogin
user
=
appUserLoginBiz
.
checkeUserLogin
(
username
);
if
(
null
!=
user
)
{
if
(
null
!=
user
)
{
...
...
xx-vehicle/xx-vehicle-api/src/main/java/com/xxfc/platform/vehicle/pojo/ResultVehicleVo.java
View file @
295a60f9
...
@@ -5,7 +5,7 @@ import lombok.Data;
...
@@ -5,7 +5,7 @@ import lombok.Data;
import
java.util.Date
;
import
java.util.Date
;
@Data
@Data
public
class
ResultVehicleVo
{
public
class
ResultVehicleVo
{
/**
/**
* 主键(uuid)
* 主键(uuid)
*/
*/
...
...
xx-vehicle/xx-vehicle-api/src/main/java/com/xxfc/platform/vehicle/pojo/VehicleExcelVo.java
View file @
295a60f9
package
com
.
xxfc
.
platform
.
vehicle
.
pojo
;
package
com
.
xxfc
.
platform
.
vehicle
.
pojo
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.util.HashMap
;
import
java.util.Map
;
@Data
@Data
public
class
VehicleExcelVo
{
@Builder
@NoArgsConstructor
@AllArgsConstructor
public
class
VehicleExcelVo
{
private
static
Map
<
Integer
,
String
>
map
=
new
HashMap
();
static
{
map
.
put
(
1
,
"正常运行"
);
map
.
put
(
2
,
"维修"
);
map
.
put
(
3
,
"报废"
);
}
/**
/**
* 车牌号,空字符串-没有
* 车牌号,空字符串-没有
...
@@ -34,7 +48,21 @@ public class VehicleExcelVo {
...
@@ -34,7 +48,21 @@ public class VehicleExcelVo {
/**
/**
* 停靠分支机构(名)
* 停靠分支机构(名)
*/
*/
private
String
parkBranchCompanyName
;
private
String
parkBranchCompanyName
;
/**
* 车辆状态: 1-正常运行 2-维修 3-报废
*/
private
Integer
status
;
/**
* 所属人 名称
*/
private
String
belongToName
;
public
String
getStatus
()
{
return
map
.
get
(
status
);
}
}
}
xx-vehicle/xx-vehicle-api/src/main/java/com/xxfc/platform/vehicle/pojo/VehiclePageQueryVo.java
View file @
295a60f9
package
com
.
xxfc
.
platform
.
vehicle
.
pojo
;
package
com
.
xxfc
.
platform
.
vehicle
.
pojo
;
import
com.sun.org.apache.xpath.internal.operations.Bool
;
import
lombok.Data
;
import
lombok.Data
;
import
java.util.Date
;
import
java.util.Date
;
...
@@ -138,6 +139,9 @@ public class VehiclePageQueryVo {
...
@@ -138,6 +139,9 @@ public class VehiclePageQueryVo {
*/
*/
private
Integer
modelId
;
private
Integer
modelId
;
/**
* 判断是否需要下载
*/
private
boolean
download
;
}
}
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/VehicleInformationDownloadBiz.java
View file @
295a60f9
...
@@ -67,8 +67,8 @@ public class VehicleInformationDownloadBiz extends BaseBiz<VehicleMapper, Vehicl
...
@@ -67,8 +67,8 @@ public class VehicleInformationDownloadBiz extends BaseBiz<VehicleMapper, Vehicl
try
{
try
{
if
(
StringUtils
.
isNotBlank
(
vehiclePageQueryVoJson
)){
if
(
StringUtils
.
isNotBlank
(
vehiclePageQueryVoJson
)){
vehiclePageQueryVo
=
JSON
.
parseObject
(
vehiclePageQueryVoJson
,
VehiclePageQueryVo
.
class
);
vehiclePageQueryVo
=
JSON
.
parseObject
(
vehiclePageQueryVoJson
,
VehiclePageQueryVo
.
class
);
vehiclePageQueryVo
.
setDownload
(
true
);
}
}
if
(
userDTO
.
getDataAll
()
==
2
)
{
if
(
userDTO
.
getDataAll
()
==
2
)
{
List
<
Integer
>
companyList
=
vehicleBiz
.
dataCompany
(
userDTO
.
getDataZone
(),
userDTO
.
getDataCompany
());
List
<
Integer
>
companyList
=
vehicleBiz
.
dataCompany
(
userDTO
.
getDataZone
(),
userDTO
.
getDataCompany
());
return
getByPageNotAllData
(
vehiclePageQueryVo
,
companyList
);
return
getByPageNotAllData
(
vehiclePageQueryVo
,
companyList
);
...
@@ -85,11 +85,18 @@ public class VehicleInformationDownloadBiz extends BaseBiz<VehicleMapper, Vehicl
...
@@ -85,11 +85,18 @@ public class VehicleInformationDownloadBiz extends BaseBiz<VehicleMapper, Vehicl
public
List
<
VehicleExcelVo
>
getList
(
String
vehiclePageQueryVoJson
,
UserDTO
userDTO
)
throws
Exception
{
public
List
<
VehicleExcelVo
>
getList
(
String
vehiclePageQueryVoJson
,
UserDTO
userDTO
)
throws
Exception
{
List
<
ResultVehicleVo
>
resultVehicleVoList
=
getResultVehicleVoList
(
vehiclePageQueryVoJson
,
userDTO
);
List
<
ResultVehicleVo
>
resultVehicleVoList
=
getResultVehicleVoList
(
vehiclePageQueryVoJson
,
userDTO
);
ArrayList
<
VehicleExcelVo
>
arrayList
=
Lists
.
newArrayList
();
ArrayList
<
VehicleExcelVo
>
arrayList
=
Lists
.
newArrayList
();
resultVehicleVoList
.
parallelS
tream
().
forEach
(
result
->{
resultVehicleVoList
.
s
tream
().
forEach
(
result
->{
try
{
try
{
VehicleExcelVo
vehicleExcelVo
=
new
VehicleExcelVo
();
VehicleExcelVo
build
=
VehicleExcelVo
.
builder
()
BeanUtilsBean
.
getInstance
().
copyProperties
(
vehicleExcelVo
,
result
);
.
code
(
result
.
getCode
())
arrayList
.
add
(
vehicleExcelVo
);
.
numberPlate
(
result
.
getNumberPlate
())
.
parkBranchCompanyName
(
result
.
getParkBranchCompanyName
())
.
status
(
result
.
getStatus
())
.
useTypeName
(
result
.
getUseTypeName
())
.
vehicleType
(
result
.
getVehicleType
())
.
belongToName
(
result
.
getBelongToName
())
.
build
();
arrayList
.
add
(
build
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
());
log
.
error
(
e
.
getMessage
());
log
.
error
(
e
.
getMessage
(),
e
);
log
.
error
(
e
.
getMessage
(),
e
);
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/rest/admin/VehicleInformationDownloadController.java
View file @
295a60f9
...
@@ -50,13 +50,18 @@ public class VehicleInformationDownloadController extends BaseController<Vehicle
...
@@ -50,13 +50,18 @@ public class VehicleInformationDownloadController extends BaseController<Vehicle
if
(
userDTO
==
null
)
{
if
(
userDTO
==
null
)
{
throw
new
BaseException
(
"token已失效"
);
throw
new
BaseException
(
"token已失效"
);
}
}
List
<
VehicleExcelVo
>
rows
=
baseBiz
.
getList
(
vehiclePageQueryVoJson
,
userDTO
);
List
<
VehicleExcelVo
>
rows
=
baseBiz
.
getList
(
vehiclePageQueryVoJson
,
userDTO
);
ExcelWriter
writer
=
ExcelUtil
.
getWriter
(
true
);
ExcelWriter
writer
=
ExcelUtil
.
getWriter
(
true
);
writer
.
addHeaderAlias
(
"numberPlate"
,
"车牌号"
);
writer
.
addHeaderAlias
(
"code"
,
"车辆编码"
);
writer
.
addHeaderAlias
(
"code"
,
"车辆编码"
);
writer
.
addHeaderAlias
(
"vehicleType"
,
"车型"
);
writer
.
addHeaderAlias
(
"numberPlate"
,
"车牌号"
);
writer
.
addHeaderAlias
(
"useTypeName"
,
"用途"
);
writer
.
addHeaderAlias
(
"status"
,
"车辆状态"
);
writer
.
addHeaderAlias
(
"vehicleType"
,
"车辆品牌"
);
writer
.
addHeaderAlias
(
"parkBranchCompanyName"
,
"停靠分公司"
);
writer
.
addHeaderAlias
(
"parkBranchCompanyName"
,
"停靠分公司"
);
writer
.
addHeaderAlias
(
"useTypeName"
,
"用途"
);
writer
.
addHeaderAlias
(
"belongToName"
,
"托管人"
);
// 一次性写出内容,使用默认样式,强制输出标题
// 一次性写出内容,使用默认样式,强制输出标题
writer
.
write
(
rows
,
true
);
writer
.
write
(
rows
,
true
);
//response为HttpServletResponse对象
//response为HttpServletResponse对象
...
...
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