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
b9f8499b
Commit
b9f8499b
authored
Jul 31, 2019
by
jiaorz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改代码
parent
43e825be
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
9 deletions
+5
-9
ResCode.java
...a/com/xxfc/platform/vehicle/constant/ResCode/ResCode.java
+1
-1
VehicleBiz.java
...c/main/java/com/xxfc/platform/vehicle/biz/VehicleBiz.java
+4
-8
No files found.
xx-vehicle/xx-vehicle-api/src/main/java/com/xxfc/platform/vehicle/constant/ResCode/ResCode.java
View file @
b9f8499b
...
@@ -17,7 +17,7 @@ public enum ResCode {
...
@@ -17,7 +17,7 @@ public enum ResCode {
VEHICLE_INFO_CODE_EXIST
(
102003
,
"车辆编码已存在"
),
VEHICLE_INFO_CODE_EXIST
(
102003
,
"车辆编码已存在"
),
VEHICLE_INFO_SAME_NUM_PLATE_AND_CODE_EMPTY
(
102004
,
"车辆编码和车牌号为空"
),
VEHICLE_INFO_SAME_NUM_PLATE_AND_CODE_EMPTY
(
102004
,
"车辆编码和车牌号为空"
),
VEHICLE_INFO_SAME_NUM_PLATE_AND_CODE_EXIST
(
102004
,
"车辆编码或车牌号已存在"
),
VEHICLE_INFO_SAME_NUM_PLATE_AND_CODE_EXIST
(
102004
,
"车辆编码或车牌号已存在"
),
VEHICLE_INFO_IS_BOOKED
(
102004
,
"车辆已经被预定"
),
//车辆信息相关返回码-预定申请信息
//车辆信息相关返回码-预定申请信息
VEHICLE_BOOKED_RECORD_ALREADY_CHANGED
(
103001
,
"车辆预定申请已被审批,请刷新后继续操作"
),
VEHICLE_BOOKED_RECORD_ALREADY_CHANGED
(
103001
,
"车辆预定申请已被审批,请刷新后继续操作"
),
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/VehicleBiz.java
View file @
b9f8499b
...
@@ -5,9 +5,7 @@ import cn.hutool.core.bean.copier.CopyOptions;
...
@@ -5,9 +5,7 @@ import cn.hutool.core.bean.copier.CopyOptions;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.core.util.StrUtil
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.github.pagehelper.PageInfo
;
import
com.github.wxiaoqi.security.admin.feign.UserFeign
;
import
com.github.wxiaoqi.security.admin.feign.dto.UserDTO
;
import
com.github.wxiaoqi.security.admin.feign.dto.UserDTO
;
import
com.github.wxiaoqi.security.admin.feign.rest.UserRestInterface
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.github.wxiaoqi.security.common.exception.BaseException
;
import
com.github.wxiaoqi.security.common.exception.BaseException
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
...
@@ -61,7 +59,7 @@ import static com.github.wxiaoqi.security.auth.common.constatns.CommonConstants.
...
@@ -61,7 +59,7 @@ import static com.github.wxiaoqi.security.auth.common.constatns.CommonConstants.
@Service
@Service
@Slf4j
@Slf4j
public
class
VehicleBiz
extends
BaseBiz
<
VehicleMapper
,
Vehicle
>
implements
UserRestInterface
{
public
class
VehicleBiz
extends
BaseBiz
<
VehicleMapper
,
Vehicle
>
{
public
static
final
DateTimeFormatter
DEFAULT_DATE_TIME_FORMATTER
=
DateTimeFormat
.
forPattern
(
"yyyy-MM-dd"
);
public
static
final
DateTimeFormatter
DEFAULT_DATE_TIME_FORMATTER
=
DateTimeFormat
.
forPattern
(
"yyyy-MM-dd"
);
public
static
final
DateTimeFormatter
DATE_TIME_FORMATTER
=
DateTimeFormat
.
forPattern
(
"yyyy-MM-dd HH:mm:ss"
);
public
static
final
DateTimeFormatter
DATE_TIME_FORMATTER
=
DateTimeFormat
.
forPattern
(
"yyyy-MM-dd HH:mm:ss"
);
...
@@ -86,9 +84,7 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
...
@@ -86,9 +84,7 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
@Autowired
@Autowired
private
VehicleBookHourInfoBiz
vehicleBookHourInfoBiz
;
private
VehicleBookHourInfoBiz
vehicleBookHourInfoBiz
;
@Autowired
@Autowired
UserFeign
userFeign
;
AdminInfoFeign
adminInfoFeign
;
@Override
public
UserFeign
getUserFeign
()
{
return
userFeign
;}
@Value
(
"${vehicle.baseUploadPath}"
)
@Value
(
"${vehicle.baseUploadPath}"
)
private
String
baseUploadPath
;
private
String
baseUploadPath
;
@Value
(
"${vehicle.fristMileage}"
)
@Value
(
"${vehicle.fristMileage}"
)
...
@@ -415,7 +411,7 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
...
@@ -415,7 +411,7 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
for
(
Map
.
Entry
<
String
,
List
<
String
>>
entry:
yearMonthAndDate
.
entrySet
()){
for
(
Map
.
Entry
<
String
,
List
<
String
>>
entry:
yearMonthAndDate
.
entrySet
()){
Boolean
rsEach
=
applyVehicle4EmployeePerMonth
(
bookVehicleVo
.
getVehicleId
(),
entry
.
getValue
(),
entry
.
getKey
());
Boolean
rsEach
=
applyVehicle4EmployeePerMonth
(
bookVehicleVo
.
getVehicleId
(),
entry
.
getValue
(),
entry
.
getKey
());
if
(
Boolean
.
FALSE
.
equals
(
rsEach
)){
if
(
Boolean
.
FALSE
.
equals
(
rsEach
)){
throw
new
BaseException
(
"车辆已经被预定!"
);
throw
new
BaseException
(
ResCode
.
VEHICLE_INFO_IS_BOOKED
.
getDesc
()
);
}
}
}
}
...
@@ -1270,7 +1266,7 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
...
@@ -1270,7 +1266,7 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
Integer
limit
=
vehiclePlanDto
.
getLimit
()
==
null
?
10
:
vehiclePlanDto
.
getLimit
();
Integer
limit
=
vehiclePlanDto
.
getLimit
()
==
null
?
10
:
vehiclePlanDto
.
getLimit
();
vehiclePlanDto
.
setPage
(
page
);
vehiclePlanDto
.
setPage
(
page
);
vehiclePlanDto
.
setLimit
(
limit
);
vehiclePlanDto
.
setLimit
(
limit
);
UserDTO
userDTO
=
getAdminUserInfo
();
UserDTO
userDTO
=
adminInfoFeign
.
getAdminUserInfo
();
if
(
userDTO
==
null
)
{
if
(
userDTO
==
null
)
{
return
ObjectRestResponse
.
createFailedResult
(
235
,
"token失效"
);
return
ObjectRestResponse
.
createFailedResult
(
235
,
"token失效"
);
}
}
...
...
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