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
49ccbf04
Commit
49ccbf04
authored
Jul 22, 2019
by
jiaorz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加积分消息队列接口
parent
5340dbf4
Changes
26
Show whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
142 additions
and
36 deletions
+142
-36
IntegralSignRecordBiz.java
...com/xxfc/platform/activity/biz/IntegralSignRecordBiz.java
+2
-2
IntegralUserRecordBiz.java
...com/xxfc/platform/activity/biz/IntegralUserRecordBiz.java
+3
-3
MsgBiz.java
...server/src/main/java/com/xxfc/platform/im/biz/MsgBiz.java
+12
-3
OrderRentVehicleDetail.java
...om/xxfc/platform/order/entity/OrderRentVehicleDetail.java
+8
-5
OrderVehicleCrosstown.java
...com/xxfc/platform/order/entity/OrderVehicleCrosstown.java
+3
-0
OrderVehicleCrosstownDto.java
...c/platform/order/pojo/order/OrderVehicleCrosstownDto.java
+2
-0
BaseOrderBiz.java
...c/main/java/com/xxfc/platform/order/biz/BaseOrderBiz.java
+1
-1
OrderVehicalCrosstownBiz.java
...com/xxfc/platform/order/biz/OrderVehicalCrosstownBiz.java
+34
-4
OrderVehicaleCrosstownMapper.java
...c/platform/order/mapper/OrderVehicaleCrosstownMapper.java
+1
-1
BaseOrderController.java
...ava/com/xxfc/platform/order/rest/BaseOrderController.java
+22
-0
OrderVehicleCrosstownController.java
.../platform/order/rest/OrderVehicleCrosstownController.java
+3
-2
OrderVehicaleCrosstownMapper.xml
...rc/main/resources/mapper/OrderVehicaleCrosstownMapper.xml
+1
-1
VehicleAndModelInfoVo.java
...com/xxfc/platform/vehicle/pojo/VehicleAndModelInfoVo.java
+1
-0
VehicleWarningMsgQueryVo.java
.../xxfc/platform/vehicle/pojo/VehicleWarningMsgQueryVo.java
+4
-1
BranchCompanyBiz.java
.../java/com/xxfc/platform/vehicle/biz/BranchCompanyBiz.java
+7
-0
VehicleBiz.java
...c/main/java/com/xxfc/platform/vehicle/biz/VehicleBiz.java
+9
-1
VehicleBookHourInfoBiz.java
...com/xxfc/platform/vehicle/biz/VehicleBookHourInfoBiz.java
+0
-3
VehicleWarningMsgBiz.java
...a/com/xxfc/platform/vehicle/biz/VehicleWarningMsgBiz.java
+4
-2
BranchCompanyMapper.java
...com/xxfc/platform/vehicle/mapper/BranchCompanyMapper.java
+1
-0
VehicleWarningMsgMapper.java
...xxfc/platform/vehicle/mapper/VehicleWarningMsgMapper.java
+2
-1
VehicleWarningRuleMapper.java
...xfc/platform/vehicle/mapper/VehicleWarningRuleMapper.java
+1
-2
BranchCompanyController.java
...m/xxfc/platform/vehicle/rest/BranchCompanyController.java
+5
-0
VehicleController.java
...ava/com/xxfc/platform/vehicle/rest/VehicleController.java
+1
-2
BranchCompanyMapper.xml
...-server/src/main/resources/mapper/BranchCompanyMapper.xml
+4
-0
VehicleWarningMsgMapper.xml
...ver/src/main/resources/mapper/VehicleWarningMsgMapper.xml
+8
-1
VehicleWarningRuleMapper.xml
...er/src/main/resources/mapper/VehicleWarningRuleMapper.xml
+3
-1
No files found.
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/biz/IntegralSignRecordBiz.java
View file @
49ccbf04
...
@@ -108,7 +108,7 @@ public class IntegralSignRecordBiz extends BaseBiz<IntegralSignRecordMapper, Int
...
@@ -108,7 +108,7 @@ public class IntegralSignRecordBiz extends BaseBiz<IntegralSignRecordMapper, Int
addPoint
(
objectRestResponse
.
getData
(),
integralSignRecord
,
appUserDTO
,
integralSignRecord
.
getSignDays
());
addPoint
(
objectRestResponse
.
getData
(),
integralSignRecord
,
appUserDTO
,
integralSignRecord
.
getSignDays
());
return
ObjectRestResponse
.
succ
(
objectRestResponse
.
getData
().
getPoint
());
return
ObjectRestResponse
.
succ
(
objectRestResponse
.
getData
().
getPoint
());
}
}
return
ObjectRestResponse
.
createFailedResult
(
1006
,
"
签到次数已达到上限,请下次再来
"
);
return
ObjectRestResponse
.
createFailedResult
(
1006
,
"
今日已签到!
"
);
}
}
}
else
{
}
else
{
return
ObjectRestResponse
.
createFailedResult
(
1003
,
"签到规则不存在!"
);
return
ObjectRestResponse
.
createFailedResult
(
1003
,
"签到规则不存在!"
);
...
...
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/biz/IntegralUserRecordBiz.java
View file @
49ccbf04
...
@@ -58,10 +58,10 @@ public class IntegralUserRecordBiz extends BaseBiz<IntegralUserRecordMapper, Int
...
@@ -58,10 +58,10 @@ public class IntegralUserRecordBiz extends BaseBiz<IntegralUserRecordMapper, Int
return
ObjectRestResponse
.
createFailedResult
(
1202
,
"积分规则不存在"
);
return
ObjectRestResponse
.
createFailedResult
(
1202
,
"积分规则不存在"
);
}
}
Integer
point
=
0
;
Integer
point
=
0
;
IntegralRule
oldValue
=
ruleObjectRestResponse
.
getData
();
if
(
ruleObjectRestResponse
.
getData
()
.
getPoint
()
==
0
)
{
//没有基础分需要计算分数
if
(
oldValue
.
getPoint
()
==
0
)
{
//没有基础分需要计算分数
Integer
amount
=
Integer
.
parseInt
(
new
BigDecimal
(
integralUserRecord
.
getAmount
()).
divide
(
new
BigDecimal
(
"100"
),
0
,
BigDecimal
.
ROUND_DOWN
).
toString
());
Integer
amount
=
Integer
.
parseInt
(
new
BigDecimal
(
integralUserRecord
.
getAmount
()).
divide
(
new
BigDecimal
(
"100"
),
0
,
BigDecimal
.
ROUND_DOWN
).
toString
());
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
ruleObjectRestResponse
.
getData
()
.
getOtherRule
());
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
oldValue
.
getOtherRule
());
log
.
info
(
"查询的其他规则json信息:jsonObject = {}"
,
jsonObject
);
log
.
info
(
"查询的其他规则json信息:jsonObject = {}"
,
jsonObject
);
if
(
jsonObject
==
null
)
{
if
(
jsonObject
==
null
)
{
point
=
ruleObjectRestResponse
.
getData
().
getPoint
();
point
=
ruleObjectRestResponse
.
getData
().
getPoint
();
...
...
xx-im/xx-im-server/src/main/java/com/xxfc/platform/im/biz/MsgBiz.java
View file @
49ccbf04
...
@@ -57,17 +57,23 @@ public class MsgBiz {
...
@@ -57,17 +57,23 @@ public class MsgBiz {
Query
query
=
null
;
Query
query
=
null
;
List
<
Msg
>
msgList
=
null
;
List
<
Msg
>
msgList
=
null
;
if
(
type
!=
null
)
{
if
(
type
!=
null
)
{
query
=
new
Query
(
Criteria
.
where
(
"body.type"
).
is
(
type
)).
with
(
pageable
);
query
=
new
Query
(
Criteria
.
where
(
"body.type"
).
is
(
type
));
int
totalSize
=
mongoTemplate
.
find
(
query
,
Msg
.
class
,
"s_msg"
).
size
();
query
.
with
(
pageable
);
msgList
=
fetchAndAttach
(
mongoTemplate
.
find
(
query
,
Msg
.
class
,
"s_msg"
),
userId
);
msgList
=
fetchAndAttach
(
mongoTemplate
.
find
(
query
,
Msg
.
class
,
"s_msg"
),
userId
);
PageInfo
<
MsgVo
>
goodPageInfo
=
new
PageInfo
<>(
replaceMsgResult
(
msgList
));
PageInfo
<
MsgVo
>
goodPageInfo
=
new
PageInfo
<>(
replaceMsgResult
(
msgList
));
goodPageInfo
.
setPageSize
(
totalSize
%
limit
==
0
?
totalSize
/
limit
:
totalSize
/
limit
+
1
);
return
ObjectRestResponse
.
succ
(
goodPageInfo
);
return
ObjectRestResponse
.
succ
(
goodPageInfo
);
}
else
{
}
else
{
List
<
Integer
>
ids
=
new
ArrayList
<>();
List
<
Integer
>
ids
=
new
ArrayList
<>();
ids
.
add
(
2
);
ids
.
add
(
2
);
ids
.
add
(
4
);
ids
.
add
(
4
);
query
=
new
Query
(
Criteria
.
where
(
"body.type"
).
in
(
ids
)).
with
(
pageable
);
query
=
new
Query
(
Criteria
.
where
(
"body.type"
).
in
(
ids
));
int
totalSize
=
mongoTemplate
.
find
(
query
,
Msg
.
class
,
"s_msg"
).
size
();
query
.
with
(
pageable
);
msgList
=
fetchAndAttach
(
mongoTemplate
.
find
(
query
,
Msg
.
class
,
"s_msg"
),
userId
);
msgList
=
fetchAndAttach
(
mongoTemplate
.
find
(
query
,
Msg
.
class
,
"s_msg"
),
userId
);
PageInfo
<
MsgVo
>
goodPageInfo
=
new
PageInfo
<>(
replaceMsgResult
(
msgList
));
PageInfo
<
MsgVo
>
goodPageInfo
=
new
PageInfo
<>(
replaceMsgResult
(
msgList
));
goodPageInfo
.
setPageSize
(
totalSize
%
limit
==
0
?
totalSize
/
limit
:
totalSize
/
limit
+
1
);
return
ObjectRestResponse
.
succ
(
goodPageInfo
);
return
ObjectRestResponse
.
succ
(
goodPageInfo
);
}
}
...
@@ -81,10 +87,13 @@ public class MsgBiz {
...
@@ -81,10 +87,13 @@ public class MsgBiz {
List
<
Integer
>
ids
=
new
ArrayList
<>();
List
<
Integer
>
ids
=
new
ArrayList
<>();
ids
.
add
(
2
);
ids
.
add
(
2
);
ids
.
add
(
4
);
ids
.
add
(
4
);
Query
query
=
new
Query
(
Criteria
.
where
(
"body.type"
).
in
(
ids
)).
with
(
pageable
);
Query
query
=
new
Query
(
Criteria
.
where
(
"body.type"
).
in
(
ids
));
int
totalSize
=
mongoTemplate
.
find
(
query
,
Msg
.
class
,
"s_msg"
).
size
();
query
.
with
(
pageable
);
query
.
with
(
new
Sort
(
Sort
.
Direction
.
DESC
,
"count.praise"
));
query
.
with
(
new
Sort
(
Sort
.
Direction
.
DESC
,
"count.praise"
));
List
<
Msg
>
msgList
=
mongoTemplate
.
find
(
query
,
Msg
.
class
,
"s_msg"
);
List
<
Msg
>
msgList
=
mongoTemplate
.
find
(
query
,
Msg
.
class
,
"s_msg"
);
PageInfo
<
MsgVo
>
goodPageInfo
=
new
PageInfo
<>(
replaceMsgResult
(
msgList
));
PageInfo
<
MsgVo
>
goodPageInfo
=
new
PageInfo
<>(
replaceMsgResult
(
msgList
));
goodPageInfo
.
setPageSize
(
totalSize
%
limit
==
0
?
totalSize
/
limit
:
totalSize
/
limit
+
1
);
return
ObjectRestResponse
.
succ
(
goodPageInfo
);
return
ObjectRestResponse
.
succ
(
goodPageInfo
);
}
}
...
...
xx-order/xx-order-api/src/main/java/com/xxfc/platform/order/entity/OrderRentVehicleDetail.java
View file @
49ccbf04
package
com
.
xxfc
.
platform
.
order
.
entity
;
package
com
.
xxfc
.
platform
.
order
.
entity
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
javax.persistence.*
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
import
javax.persistence.Column
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
/**
/**
* 租车订单详情
* 租车订单详情
...
@@ -297,7 +300,7 @@ public class OrderRentVehicleDetail implements Serializable {
...
@@ -297,7 +300,7 @@ public class OrderRentVehicleDetail implements Serializable {
/**
/**
* 是否处理违章 0--未处理;1--已处理
* 是否处理违章 0--未处理;1--已处理
*/
*/
@ApiModelProperty
(
value
=
"是否
购买免赔
"
)
@ApiModelProperty
(
value
=
"是否
处理违章
"
)
@Column
(
name
=
"handel_violation"
)
@Column
(
name
=
"handel_violation"
)
private
Integer
handelViolation
;
private
Integer
handelViolation
;
...
...
xx-order/xx-order-api/src/main/java/com/xxfc/platform/order/entity/OrderVehicleCrosstown.java
View file @
49ccbf04
...
@@ -123,4 +123,7 @@ public class OrderVehicleCrosstown {
...
@@ -123,4 +123,7 @@ public class OrderVehicleCrosstown {
* 驾驶人Id
* 驾驶人Id
*/
*/
private
String
userLicenseId
;
private
String
userLicenseId
;
//操作人ID
private
Integer
orperaterId
;
}
}
\ No newline at end of file
xx-order/xx-order-api/src/main/java/com/xxfc/platform/order/pojo/order/OrderVehicleCrosstownDto.java
View file @
49ccbf04
...
@@ -27,4 +27,6 @@ public class OrderVehicleCrosstownDto extends OrderVehicleCrosstown {
...
@@ -27,4 +27,6 @@ public class OrderVehicleCrosstownDto extends OrderVehicleCrosstown {
private
String
licenseIdCard
;
private
String
licenseIdCard
;
private
String
vehicleNumberPlat
;
private
String
vehicleNumberPlat
;
private
String
username
;
}
}
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/BaseOrderBiz.java
View file @
49ccbf04
...
@@ -172,7 +172,7 @@ public class BaseOrderBiz extends BaseBiz<BaseOrderMapper,BaseOrder> {
...
@@ -172,7 +172,7 @@ public class BaseOrderBiz extends BaseBiz<BaseOrderMapper,BaseOrder> {
OrderVehicleCrosstownDto
orderVehicleCrosstownDto
=
new
OrderVehicleCrosstownDto
();
OrderVehicleCrosstownDto
orderVehicleCrosstownDto
=
new
OrderVehicleCrosstownDto
();
orderVehicleCrosstownDto
.
setOrderId
(
orderPageVo
.
getId
());
orderVehicleCrosstownDto
.
setOrderId
(
orderPageVo
.
getId
());
orderVehicleCrosstownDto
.
setOrderNo
(
orderPageVo
.
getNo
());
orderVehicleCrosstownDto
.
setOrderNo
(
orderPageVo
.
getNo
());
List
<
OrderVehicleCrosstown
>
orderVehicleCrosstowns
=
orderVehicalCrosstownBiz
.
selectByOrderId
(
orderVehicleCrosstownDto
);
List
<
OrderVehicleCrosstown
Dto
>
orderVehicleCrosstowns
=
orderVehicalCrosstownBiz
.
selectByOrderId
(
orderVehicleCrosstownDto
);
if
(
orderVehicleCrosstowns
!=
null
&&
orderVehicleCrosstowns
.
size
()
>
0
)
{
if
(
orderVehicleCrosstowns
!=
null
&&
orderVehicleCrosstowns
.
size
()
>
0
)
{
List
<
OrderUserLicense
>
orderUserLicenses
=
orderUserLicenseBiz
.
selectByIds
(
orderVehicleCrosstowns
.
get
(
0
).
getUserLicenseId
()).
getData
();
List
<
OrderUserLicense
>
orderUserLicenses
=
orderUserLicenseBiz
.
selectByIds
(
orderVehicleCrosstowns
.
get
(
0
).
getUserLicenseId
()).
getData
();
if
(
orderUserLicenses
!=
null
&&
orderUserLicenses
.
size
()
>
0
)
{
if
(
orderUserLicenses
!=
null
&&
orderUserLicenses
.
size
()
>
0
)
{
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/OrderVehicalCrosstownBiz.java
View file @
49ccbf04
...
@@ -2,8 +2,11 @@ package com.xxfc.platform.order.biz;
...
@@ -2,8 +2,11 @@ package com.xxfc.platform.order.biz;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.bean.copier.CopyOptions
;
import
cn.hutool.core.bean.copier.CopyOptions
;
import
com.github.wxiaoqi.security.admin.feign.UserFeign
;
import
com.github.wxiaoqi.security.admin.feign.dto.AppUserDTO
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.xxfc.platform.activity.user.UserInfoBiz
;
import
com.xxfc.platform.order.entity.BaseOrder
;
import
com.xxfc.platform.order.entity.BaseOrder
;
import
com.xxfc.platform.order.entity.OrderRentVehicleDetail
;
import
com.xxfc.platform.order.entity.OrderRentVehicleDetail
;
import
com.xxfc.platform.order.entity.OrderUserLicense
;
import
com.xxfc.platform.order.entity.OrderUserLicense
;
...
@@ -29,9 +32,12 @@ public class OrderVehicalCrosstownBiz extends BaseBiz<OrderVehicaleCrosstownMapp
...
@@ -29,9 +32,12 @@ public class OrderVehicalCrosstownBiz extends BaseBiz<OrderVehicaleCrosstownMapp
@Autowired
@Autowired
OrderUserLicenseBiz
orderUserLicenseBiz
;
OrderUserLicenseBiz
orderUserLicenseBiz
;
@Autowired
UserInfoBiz
userInfoBiz
;
@Autowired
@Autowired
VehicleFeign
vehicleFeign
;
VehicleFeign
vehicleFeign
;
@Autowired
UserFeign
userFeign
;
@Autowired
@Autowired
private
OrderRentVehicleBiz
orderRentVehicleBiz
;
private
OrderRentVehicleBiz
orderRentVehicleBiz
;
...
@@ -42,21 +48,45 @@ public class OrderVehicalCrosstownBiz extends BaseBiz<OrderVehicaleCrosstownMapp
...
@@ -42,21 +48,45 @@ public class OrderVehicalCrosstownBiz extends BaseBiz<OrderVehicaleCrosstownMapp
return
selectById
(
id
);
return
selectById
(
id
);
}
}
public
List
<
OrderVehicleCrosstown
>
selectByOrderId
(
OrderVehicleCrosstownDto
orderVehicleCrosstownDto
)
{
public
List
<
OrderVehicleCrosstownDto
>
selectByOrderId
(
OrderVehicleCrosstownDto
orderVehicleCrosstownDto
)
{
return
mapper
.
selectByOrderId
(
orderVehicleCrosstownDto
);
List
<
OrderVehicleCrosstownDto
>
list
=
mapper
.
selectByOrderId
(
orderVehicleCrosstownDto
);
for
(
OrderVehicleCrosstownDto
value
:
list
)
{
if
(
value
.
getOrperaterId
()
!=
null
)
{
ObjectRestResponse
<
AppUserDTO
>
objectRestResponse
=
userFeign
.
userDetailById
(
value
.
getOrperaterId
());
if
(
objectRestResponse
.
getData
()
!=
null
)
{
value
.
setUsername
(
objectRestResponse
.
getData
().
getNickname
());
}
}
if
(
value
.
getUserLicenseId
()
!=
null
)
{
List
<
OrderUserLicense
>
orderUserLicenses
=
orderUserLicenseBiz
.
selectByIds
(
value
.
getUserLicenseId
()).
getData
();
if
(
orderUserLicenses
!=
null
&&
orderUserLicenses
.
size
()
>
0
)
{
value
.
setLicenseIdCard
(
orderUserLicenses
.
get
(
0
).
getLicenseIdCard
());
value
.
setLicenseImg
(
orderUserLicenses
.
get
(
0
).
getLicenseImg
());
value
.
setLicenseName
(
orderUserLicenses
.
get
(
0
).
getLicenseName
());
value
.
setLicensePhone
(
orderUserLicenses
.
get
(
0
).
getLicensePhone
());
}
}
}
return
list
;
}
}
public
ObjectRestResponse
<
OrderVehicleCrosstownDto
>
add
(
OrderVehicleCrosstownDto
orderVehicleCrosstownDto
)
{
public
ObjectRestResponse
<
OrderVehicleCrosstownDto
>
add
(
OrderVehicleCrosstownDto
orderVehicleCrosstownDto
)
{
log
.
info
(
"添加的参数:orderVehicaleCrosstown = {}"
,
orderVehicleCrosstownDto
);
log
.
info
(
"添加的参数:orderVehicaleCrosstown = {}"
,
orderVehicleCrosstownDto
);
AppUserDTO
appUserDTO
=
userInfoBiz
.
getUserInfo
();
if
(
appUserDTO
==
null
)
{
return
ObjectRestResponse
.
createFailedResult
(
508
,
"token is null or invalid"
);
}
if
(
orderVehicleCrosstownDto
==
null
||
orderVehicleCrosstownDto
.
getOrderId
()
==
null
)
{
if
(
orderVehicleCrosstownDto
==
null
||
orderVehicleCrosstownDto
.
getOrderId
()
==
null
)
{
return
ObjectRestResponse
.
createFailedResult
(
500
,
"参数为空!"
);
return
ObjectRestResponse
.
createFailedResult
(
500
,
"参数为空!"
);
}
}
orderVehicleCrosstownDto
.
setOrperaterId
(
appUserDTO
.
getUserid
());
BaseOrder
baseOrder
=
baseOrderBiz
.
selectById
(
orderVehicleCrosstownDto
.
getOrderId
());
BaseOrder
baseOrder
=
baseOrderBiz
.
selectById
(
orderVehicleCrosstownDto
.
getOrderId
());
if
(
baseOrder
==
null
)
{
if
(
baseOrder
==
null
)
{
return
ObjectRestResponse
.
createFailedResult
(
500
,
"订单不存在!"
);
return
ObjectRestResponse
.
createFailedResult
(
500
,
"订单不存在!"
);
}
}
OrderRentVehicleDetail
orderRentVehicleDetail
=
orderRentVehicleBiz
.
selectById
(
baseOrder
.
getDetailId
());
OrderRentVehicleDetail
orderRentVehicleDetail
=
orderRentVehicleBiz
.
selectById
(
baseOrder
.
getDetailId
());
List
<
OrderVehicleCrosstown
>
oldValue
=
orderVehicalCrosstownBiz
.
selectByOrderId
(
orderVehicleCrosstownDto
);
List
<
OrderVehicleCrosstown
Dto
>
oldValue
=
orderVehicalCrosstownBiz
.
selectByOrderId
(
orderVehicleCrosstownDto
);
if
(
oldValue
.
size
()
==
1
)
{
if
(
oldValue
.
size
()
==
1
)
{
//已有直接返回
//已有直接返回
//交车完成 设置订单状态为出行中
//交车完成 设置订单状态为出行中
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/mapper/OrderVehicaleCrosstownMapper.java
View file @
49ccbf04
...
@@ -8,6 +8,6 @@ import java.util.List;
...
@@ -8,6 +8,6 @@ import java.util.List;
public
interface
OrderVehicaleCrosstownMapper
extends
Mapper
<
OrderVehicleCrosstown
>
{
public
interface
OrderVehicaleCrosstownMapper
extends
Mapper
<
OrderVehicleCrosstown
>
{
List
<
OrderVehicleCrosstown
>
selectByOrderId
(
OrderVehicleCrosstownDto
orderVehicleCrosstownDto
);
List
<
OrderVehicleCrosstown
Dto
>
selectByOrderId
(
OrderVehicleCrosstownDto
orderVehicleCrosstownDto
);
}
}
\ No newline at end of file
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/rest/BaseOrderController.java
View file @
49ccbf04
...
@@ -20,8 +20,11 @@ import com.github.wxiaoqi.security.common.util.process.ResultCode;
...
@@ -20,8 +20,11 @@ import com.github.wxiaoqi.security.common.util.process.ResultCode;
import
com.github.wxiaoqi.security.common.vo.PageDataVO
;
import
com.github.wxiaoqi.security.common.vo.PageDataVO
;
import
com.xxfc.platform.order.biz.BaseOrderBiz
;
import
com.xxfc.platform.order.biz.BaseOrderBiz
;
import
com.xxfc.platform.order.biz.OrderMemberDetailBiz
;
import
com.xxfc.platform.order.biz.OrderMemberDetailBiz
;
import
com.xxfc.platform.order.biz.OrderUserLicenseBiz
;
import
com.xxfc.platform.order.biz.OrderVehicalCrosstownBiz
;
import
com.xxfc.platform.order.contant.enumerate.OrderStatusEnum
;
import
com.xxfc.platform.order.contant.enumerate.OrderStatusEnum
;
import
com.xxfc.platform.order.entity.BaseOrder
;
import
com.xxfc.platform.order.entity.BaseOrder
;
import
com.xxfc.platform.order.entity.OrderUserLicense
;
import
com.xxfc.platform.order.mqhandler.RabbitProduct
;
import
com.xxfc.platform.order.mqhandler.RabbitProduct
;
import
com.xxfc.platform.order.pojo.order.*
;
import
com.xxfc.platform.order.pojo.order.*
;
import
com.xxfc.platform.order.pojo.pay.OrderPayDTO
;
import
com.xxfc.platform.order.pojo.pay.OrderPayDTO
;
...
@@ -73,6 +76,10 @@ public class BaseOrderController extends CommonBaseController implements UserRes
...
@@ -73,6 +76,10 @@ public class BaseOrderController extends CommonBaseController implements UserRes
@Autowired
@Autowired
OrderMemberDetailBiz
orderMemberDetailBiz
;
OrderMemberDetailBiz
orderMemberDetailBiz
;
@Autowired
OrderUserLicenseBiz
orderUserLicenseBiz
;
@Autowired
OrderVehicalCrosstownBiz
orderVehicalCrosstownBiz
;
@Override
@Override
public
UserFeign
getUserFeign
()
{
public
UserFeign
getUserFeign
()
{
...
@@ -178,6 +185,19 @@ public class BaseOrderController extends CommonBaseController implements UserRes
...
@@ -178,6 +185,19 @@ public class BaseOrderController extends CommonBaseController implements UserRes
if
(
restResponse
.
getData
()
!=
null
)
{
if
(
restResponse
.
getData
()
!=
null
)
{
orderPageVO
.
setVehicleNumberPlat
(
restResponse
.
getData
().
getNumberPlate
());
orderPageVO
.
setVehicleNumberPlat
(
restResponse
.
getData
().
getNumberPlate
());
}
}
if
(
StringUtils
.
isNotBlank
(
orderPageVO
.
getOrderRentVehicleDetail
().
getMyDriverIds
()))
{
List
<
OrderUserLicense
>
orderUserLicenses
=
orderUserLicenseBiz
.
selectByIds
(
orderPageVO
.
getOrderRentVehicleDetail
().
getMyDriverIds
()).
getData
();
if
(
orderUserLicenses
!=
null
&&
orderUserLicenses
.
size
()
>
0
)
{
OrderVehicleCrosstownDto
orderVehicleCrosstownDto
=
new
OrderVehicleCrosstownDto
();
orderVehicleCrosstownDto
.
setLicenseIdCard
(
orderUserLicenses
.
get
(
0
).
getLicenseIdCard
());
orderVehicleCrosstownDto
.
setLicenseImg
(
orderUserLicenses
.
get
(
0
).
getLicenseImg
());
orderVehicleCrosstownDto
.
setLicenseName
(
orderUserLicenses
.
get
(
0
).
getLicenseName
());
orderVehicleCrosstownDto
.
setLicensePhone
(
orderUserLicenses
.
get
(
0
).
getLicensePhone
());
orderPageVO
.
setOrderVehicleCrosstownDto
(
orderVehicleCrosstownDto
);
}
}
}
}
if
(
orderPageVO
.
getOrderRentVehicleDetail
()
!=
null
&&
orderPageVO
.
getOrderRentVehicleDetail
().
getStartCompanyId
()!=
null
&&
orderPageVO
.
getOrderRentVehicleDetail
().
getEndCompanyId
()
!=
null
)
{
if
(
orderPageVO
.
getOrderRentVehicleDetail
()
!=
null
&&
orderPageVO
.
getOrderRentVehicleDetail
().
getStartCompanyId
()!=
null
&&
orderPageVO
.
getOrderRentVehicleDetail
().
getEndCompanyId
()
!=
null
)
{
ObjectRestResponse
<
CompanyDetail
>
startResponse
=
vehicleFeign
.
getCompanyDetail
(
orderPageVO
.
getOrderRentVehicleDetail
().
getStartCompanyId
());
ObjectRestResponse
<
CompanyDetail
>
startResponse
=
vehicleFeign
.
getCompanyDetail
(
orderPageVO
.
getOrderRentVehicleDetail
().
getStartCompanyId
());
...
@@ -197,6 +217,8 @@ public class BaseOrderController extends CommonBaseController implements UserRes
...
@@ -197,6 +217,8 @@ public class BaseOrderController extends CommonBaseController implements UserRes
orderPageVO
.
setStartCompanyName
(
startResponse
.
getData
().
getName
());
orderPageVO
.
setStartCompanyName
(
startResponse
.
getData
().
getName
());
}
}
}
}
}
}
}
}
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/rest/OrderVehicleCrosstownController.java
View file @
49ccbf04
...
@@ -16,7 +16,7 @@ import org.springframework.web.bind.annotation.*;
...
@@ -16,7 +16,7 @@ import org.springframework.web.bind.annotation.*;
import
java.util.List
;
import
java.util.List
;
@RestController
@RestController
@RequestMapping
(
value
=
"
/
orderVehicle"
)
@RequestMapping
(
value
=
"orderVehicle"
)
@Api
(
value
=
"交还车记录"
,
tags
=
{
"交还车记录"
})
@Api
(
value
=
"交还车记录"
,
tags
=
{
"交还车记录"
})
@Slf4j
@Slf4j
public
class
OrderVehicleCrosstownController
{
public
class
OrderVehicleCrosstownController
{
...
@@ -34,6 +34,7 @@ public class OrderVehicleCrosstownController {
...
@@ -34,6 +34,7 @@ public class OrderVehicleCrosstownController {
@ApiOperation
(
value
=
"添加交还车记录"
)
@ApiOperation
(
value
=
"添加交还车记录"
)
@Transactional
@Transactional
public
ObjectRestResponse
<
OrderVehicleCrosstownDto
>
add
(
@RequestBody
OrderVehicleCrosstownDto
orderVehicleCrosstownDto
)
{
public
ObjectRestResponse
<
OrderVehicleCrosstownDto
>
add
(
@RequestBody
OrderVehicleCrosstownDto
orderVehicleCrosstownDto
)
{
return
orderVehicalCrosstownBiz
.
add
(
orderVehicleCrosstownDto
);
return
orderVehicalCrosstownBiz
.
add
(
orderVehicleCrosstownDto
);
}
}
...
@@ -45,7 +46,7 @@ public class OrderVehicleCrosstownController {
...
@@ -45,7 +46,7 @@ public class OrderVehicleCrosstownController {
@GetMapping
(
value
=
"/getByOrderId"
)
@GetMapping
(
value
=
"/getByOrderId"
)
@ApiOperation
(
value
=
"根据订单Id获取所有记录信息"
)
@ApiOperation
(
value
=
"根据订单Id获取所有记录信息"
)
public
ObjectRestResponse
<
List
<
OrderVehicleCrosstown
>>
getByOrderId
(
OrderVehicleCrosstownDto
orderVehicleCrosstownDto
)
{
public
ObjectRestResponse
<
List
<
OrderVehicleCrosstown
Dto
>>
getByOrderId
(
OrderVehicleCrosstownDto
orderVehicleCrosstownDto
)
{
if
(
orderVehicleCrosstownDto
==
null
)
{
if
(
orderVehicleCrosstownDto
==
null
)
{
return
ObjectRestResponse
.
createFailedResult
(
500
,
"参数orderId为空"
);
return
ObjectRestResponse
.
createFailedResult
(
500
,
"参数orderId为空"
);
}
}
...
...
xx-order/xx-order-server/src/main/resources/mapper/OrderVehicaleCrosstownMapper.xml
View file @
49ccbf04
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
<result
column=
"user_license_id"
jdbcType=
"VARCHAR"
property=
"userLicenseId"
/>
<result
column=
"user_license_id"
jdbcType=
"VARCHAR"
property=
"userLicenseId"
/>
</resultMap>
</resultMap>
<select
id=
"selectByOrderId"
parameterType=
"com.xxfc.platform.order.pojo.order.OrderVehicleCrosstownDto"
result
Map=
"BaseResultMap
"
>
<select
id=
"selectByOrderId"
parameterType=
"com.xxfc.platform.order.pojo.order.OrderVehicleCrosstownDto"
result
Type=
"com.xxfc.platform.order.pojo.order.OrderVehicleCrosstownDto
"
>
select *
select *
from order_vehicle_crosstown
from order_vehicle_crosstown
<where>
<where>
...
...
xx-vehicle/xx-vehicle-api/src/main/java/com/xxfc/platform/vehicle/pojo/VehicleAndModelInfoVo.java
View file @
49ccbf04
...
@@ -11,4 +11,5 @@ import java.util.List;
...
@@ -11,4 +11,5 @@ import java.util.List;
public
class
VehicleAndModelInfoVo
extends
Vehicle
{
public
class
VehicleAndModelInfoVo
extends
Vehicle
{
VehicleModel
vehicleModel
;
VehicleModel
vehicleModel
;
List
<
VehicleBookRecord
>
vehicleBookRecord
;
List
<
VehicleBookRecord
>
vehicleBookRecord
;
private
String
endCompanyName
;
}
}
xx-vehicle/xx-vehicle-api/src/main/java/com/xxfc/platform/vehicle/pojo/VehicleWarningMsgQueryVo.java
View file @
49ccbf04
package
com
.
xxfc
.
platform
.
vehicle
.
pojo
;
package
com
.
xxfc
.
platform
.
vehicle
.
pojo
;
import
com.xxfc.platform.vehicle.entity.VehicleWarningRule
;
import
lombok.Data
;
import
lombok.Data
;
import
java.util.Date
;
import
java.util.Date
;
...
@@ -9,7 +10,7 @@ import java.util.Date;
...
@@ -9,7 +10,7 @@ import java.util.Date;
*
*
*/
*/
@Data
@Data
public
class
VehicleWarningMsgQueryVo
{
public
class
VehicleWarningMsgQueryVo
{
public
Integer
id
;
public
Integer
id
;
/**
/**
...
@@ -66,4 +67,6 @@ public class VehicleWarningMsgQueryVo {
...
@@ -66,4 +67,6 @@ public class VehicleWarningMsgQueryVo {
private
Date
createTime
;
private
Date
createTime
;
private
Date
updateTime
;
private
Date
updateTime
;
VehicleWarningRule
vehicleWarningRule
;
}
}
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/BranchCompanyBiz.java
View file @
49ccbf04
...
@@ -71,6 +71,13 @@ public class BranchCompanyBiz extends BaseBiz<BranchCompanyMapper, BranchCompany
...
@@ -71,6 +71,13 @@ public class BranchCompanyBiz extends BaseBiz<BranchCompanyMapper, BranchCompany
return
mapper
.
selectByPrimaryKey
(
id
);
return
mapper
.
selectByPrimaryKey
(
id
);
}
}
public
List
<
BranchCompany
>
selectByZoneId
(
Integer
zoneId
)
{
if
(
zoneId
==
null
)
{
return
null
;
}
return
mapper
.
selectByZoneId
(
zoneId
);
}
/**
/**
* 获取公司信息
* 获取公司信息
* @param id
* @param id
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/VehicleBiz.java
View file @
49ccbf04
...
@@ -2,7 +2,6 @@ package com.xxfc.platform.vehicle.biz;
...
@@ -2,7 +2,6 @@ package com.xxfc.platform.vehicle.biz;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.core.util.StrUtil
;
import
com.ace.cache.annotation.Cache
;
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.common.biz.BaseBiz
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
...
@@ -317,6 +316,8 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> {
...
@@ -317,6 +316,8 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> {
Map
<
String
,
List
<
String
>>
yearMonthAndDate
=
Maps
.
newHashMap
();
Map
<
String
,
List
<
String
>>
yearMonthAndDate
=
Maps
.
newHashMap
();
DateTime
startDay
=
DateTime
.
parse
(
bookVehicleVo
.
getBookStartDate
(),
DEFAULT_DATE_TIME_FORMATTER
);
DateTime
startDay
=
DateTime
.
parse
(
bookVehicleVo
.
getBookStartDate
(),
DEFAULT_DATE_TIME_FORMATTER
);
DateTime
endDay
=
DateTime
.
parse
(
bookVehicleVo
.
getBookEndDate
(),
DEFAULT_DATE_TIME_FORMATTER
);
DateTime
endDay
=
DateTime
.
parse
(
bookVehicleVo
.
getBookEndDate
(),
DEFAULT_DATE_TIME_FORMATTER
);
//转换日期范围为列表,并检查是否合法
//转换日期范围为列表,并检查是否合法
fillDateList4DatePeriod
(
yearMonthAndDate
,
startDay
,
endDay
);
fillDateList4DatePeriod
(
yearMonthAndDate
,
startDay
,
endDay
);
if
(
yearMonthAndDate
.
size
()>
3
){
//连续的日期最多夸3个月
if
(
yearMonthAndDate
.
size
()>
3
){
//连续的日期最多夸3个月
...
@@ -1088,6 +1089,13 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> {
...
@@ -1088,6 +1089,13 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> {
public
PageDataVO
<
VehicleAndModelInfoVo
>
getAllVehicle
(
VehiclePlanDto
vehiclePlanDto
)
{
public
PageDataVO
<
VehicleAndModelInfoVo
>
getAllVehicle
(
VehiclePlanDto
vehiclePlanDto
)
{
Query
query
=
new
Query
(
vehiclePlanDto
);
Query
query
=
new
Query
(
vehiclePlanDto
);
PageDataVO
<
VehicleAndModelInfoVo
>
pageDataVO
=
PageDataVO
.
pageInfo
(
query
,
()
->
mapper
.
getAllVehicle
(
query
.
getSuper
()));
PageDataVO
<
VehicleAndModelInfoVo
>
pageDataVO
=
PageDataVO
.
pageInfo
(
query
,
()
->
mapper
.
getAllVehicle
(
query
.
getSuper
()));
for
(
VehicleAndModelInfoVo
vehicleAndModelInfoVo
:
pageDataVO
.
getData
())
{
CompanyDetail
restResponse
=
branchCompanyBiz
.
getDetailById
(
vehicleAndModelInfoVo
.
getParkBranchCompanyId
());
if
(
restResponse
!=
null
)
{
vehicleAndModelInfoVo
.
setEndCompanyName
(
restResponse
.
getName
());
}
}
return
pageDataVO
;
return
pageDataVO
;
}
}
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/VehicleBookHourInfoBiz.java
View file @
49ccbf04
package
com
.
xxfc
.
platform
.
vehicle
.
biz
;
package
com
.
xxfc
.
platform
.
vehicle
.
biz
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.bean.copier.CopyOptions
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.google.common.collect.Maps
;
import
com.google.common.collect.Maps
;
...
@@ -72,7 +70,6 @@ public class VehicleBookHourInfoBiz extends BaseBiz<VehicleBookHourInfoMapper, V
...
@@ -72,7 +70,6 @@ public class VehicleBookHourInfoBiz extends BaseBiz<VehicleBookHourInfoMapper, V
}
}
}
}
return
predictableHours
;
return
predictableHours
;
}
}
// public static void main(String[] args) {
// public static void main(String[] args) {
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/VehicleWarningMsgBiz.java
View file @
49ccbf04
...
@@ -14,6 +14,7 @@ import com.xxfc.platform.vehicle.entity.VehicleWarningRule;
...
@@ -14,6 +14,7 @@ import com.xxfc.platform.vehicle.entity.VehicleWarningRule;
import
com.xxfc.platform.vehicle.mapper.VehicleMapper
;
import
com.xxfc.platform.vehicle.mapper.VehicleMapper
;
import
com.xxfc.platform.vehicle.mapper.VehicleWarningMsgMapper
;
import
com.xxfc.platform.vehicle.mapper.VehicleWarningMsgMapper
;
import
com.xxfc.platform.vehicle.mapper.VehicleWarningRuleMapper
;
import
com.xxfc.platform.vehicle.mapper.VehicleWarningRuleMapper
;
import
com.xxfc.platform.vehicle.pojo.VehicleWarningMsgQueryVo
;
import
com.xxfc.platform.vehicle.pojo.dto.VehiclePlanDto
;
import
com.xxfc.platform.vehicle.pojo.dto.VehiclePlanDto
;
import
com.xxfc.platform.vehicle.util.JSUtil
;
import
com.xxfc.platform.vehicle.util.JSUtil
;
import
com.xxfc.platform.vehicle.pojo.AddVehicleWarningMsgVo
;
import
com.xxfc.platform.vehicle.pojo.AddVehicleWarningMsgVo
;
...
@@ -213,8 +214,9 @@ public class VehicleWarningMsgBiz extends BaseBiz<VehicleWarningMsgMapper, Vehic
...
@@ -213,8 +214,9 @@ public class VehicleWarningMsgBiz extends BaseBiz<VehicleWarningMsgMapper, Vehic
}
}
}
}
public
List
<
VehicleWarningMsg
>
getAllByParam
(
VehiclePlanDto
vehiclePlanDto
)
{
public
List
<
VehicleWarningMsgQueryVo
>
getAllByParam
(
VehiclePlanDto
vehiclePlanDto
)
{
return
mapper
.
getAllByparam
(
vehiclePlanDto
);
List
<
VehicleWarningMsgQueryVo
>
list
=
mapper
.
getAllByparam
(
vehiclePlanDto
);
return
list
;
}
}
}
}
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/mapper/BranchCompanyMapper.java
View file @
49ccbf04
...
@@ -8,4 +8,5 @@ import java.util.List;
...
@@ -8,4 +8,5 @@ import java.util.List;
public
interface
BranchCompanyMapper
extends
Mapper
<
BranchCompany
>
{
public
interface
BranchCompanyMapper
extends
Mapper
<
BranchCompany
>
{
List
<
BranchCompany
>
search
(
@Param
(
"lon"
)
String
lon
,
@Param
(
"lat"
)
String
lat
,
@Param
(
"addrCity"
)
Integer
addrCity
);
List
<
BranchCompany
>
search
(
@Param
(
"lon"
)
String
lon
,
@Param
(
"lat"
)
String
lat
,
@Param
(
"addrCity"
)
Integer
addrCity
);
List
<
BranchCompany
>
selectByZoneId
(
Integer
zoneId
);
}
}
\ No newline at end of file
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/mapper/VehicleWarningMsgMapper.java
View file @
49ccbf04
...
@@ -2,6 +2,7 @@ package com.xxfc.platform.vehicle.mapper;
...
@@ -2,6 +2,7 @@ package com.xxfc.platform.vehicle.mapper;
import
com.xxfc.platform.vehicle.entity.VehicleWarningMsg
;
import
com.xxfc.platform.vehicle.entity.VehicleWarningMsg
;
import
com.xxfc.platform.vehicle.pojo.QueryVehicleWarningMsgVo
;
import
com.xxfc.platform.vehicle.pojo.QueryVehicleWarningMsgVo
;
import
com.xxfc.platform.vehicle.pojo.VehicleWarningMsgQueryVo
;
import
com.xxfc.platform.vehicle.pojo.dto.VehiclePlanDto
;
import
com.xxfc.platform.vehicle.pojo.dto.VehiclePlanDto
;
import
tk.mybatis.mapper.common.Mapper
;
import
tk.mybatis.mapper.common.Mapper
;
...
@@ -16,6 +17,6 @@ public interface VehicleWarningMsgMapper extends Mapper<VehicleWarningMsg> {
...
@@ -16,6 +17,6 @@ public interface VehicleWarningMsgMapper extends Mapper<VehicleWarningMsg> {
public
List
<
VehicleWarningMsg
>
getMsgByVehicle
(
String
vehicleId
);
public
List
<
VehicleWarningMsg
>
getMsgByVehicle
(
String
vehicleId
);
public
List
<
VehicleWarningMsg
>
getAllByparam
(
VehiclePlanDto
vehiclePlanDto
);
public
List
<
VehicleWarningMsg
QueryVo
>
getAllByparam
(
VehiclePlanDto
vehiclePlanDto
);
}
}
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/mapper/VehicleWarningRuleMapper.java
View file @
49ccbf04
...
@@ -4,6 +4,5 @@ import com.xxfc.platform.vehicle.entity.VehicleWarningRule;
...
@@ -4,6 +4,5 @@ import com.xxfc.platform.vehicle.entity.VehicleWarningRule;
import
tk.mybatis.mapper.common.Mapper
;
import
tk.mybatis.mapper.common.Mapper
;
public
interface
VehicleWarningRuleMapper
extends
Mapper
<
VehicleWarningRule
>
{
public
interface
VehicleWarningRuleMapper
extends
Mapper
<
VehicleWarningRule
>
{
VehicleWarningRule
getOne
(
Integer
id
);
}
}
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/rest/BranchCompanyController.java
View file @
49ccbf04
...
@@ -91,6 +91,11 @@ public class BranchCompanyController extends BaseController<BranchCompanyBiz> {
...
@@ -91,6 +91,11 @@ public class BranchCompanyController extends BaseController<BranchCompanyBiz> {
return
RestResponse
.
data
(
baseBiz
.
add
(
branchCompanyVo
));
return
RestResponse
.
data
(
baseBiz
.
add
(
branchCompanyVo
));
}
}
@RequestMapping
(
value
=
"/app/unauth/getByZone"
,
method
=
RequestMethod
.
GET
)
public
RestResponse
getByZoneId
(
Integer
zoneId
)
{
return
RestResponse
.
suc
(
baseBiz
.
selectByZoneId
(
zoneId
));
}
@RequestMapping
(
value
=
"/upload/companyPic"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/upload/companyPic"
,
method
=
RequestMethod
.
POST
)
public
RestResponse
uploadCompanyPic
(
@RequestParam
(
"file"
)
MultipartFile
file
)
public
RestResponse
uploadCompanyPic
(
@RequestParam
(
"file"
)
MultipartFile
file
)
throws
Exception
{
throws
Exception
{
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/rest/VehicleController.java
View file @
49ccbf04
...
@@ -26,7 +26,6 @@ import com.xxfc.platform.vehicle.constant.VehicleBookRecordStatus;
...
@@ -26,7 +26,6 @@ import com.xxfc.platform.vehicle.constant.VehicleBookRecordStatus;
import
com.xxfc.platform.vehicle.entity.Vehicle
;
import
com.xxfc.platform.vehicle.entity.Vehicle
;
import
com.xxfc.platform.vehicle.entity.VehicleBookInfo
;
import
com.xxfc.platform.vehicle.entity.VehicleBookInfo
;
import
com.xxfc.platform.vehicle.entity.VehicleBookRecord
;
import
com.xxfc.platform.vehicle.entity.VehicleBookRecord
;
import
com.xxfc.platform.vehicle.entity.VehicleWarningMsg
;
import
com.xxfc.platform.vehicle.pojo.*
;
import
com.xxfc.platform.vehicle.pojo.*
;
import
com.xxfc.platform.vehicle.pojo.dto.VehiclePlanDto
;
import
com.xxfc.platform.vehicle.pojo.dto.VehiclePlanDto
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
...
@@ -425,7 +424,7 @@ public class VehicleController extends BaseController<VehicleBiz> {
...
@@ -425,7 +424,7 @@ public class VehicleController extends BaseController<VehicleBiz> {
//获取统计信息
//获取统计信息
List
<
VehicleCountVo
>
vehicleCountVos
=
baseBiz
.
countVehicleByParam
(
vehiclePlanDto
);
List
<
VehicleCountVo
>
vehicleCountVos
=
baseBiz
.
countVehicleByParam
(
vehiclePlanDto
);
//获取警告信息
//获取警告信息
List
<
VehicleWarningMsg
>
vehicleWarningMsgs
=
vehicleWarningMsgBiz
.
getAllByParam
(
vehiclePlanDto
);
List
<
VehicleWarningMsg
QueryVo
>
vehicleWarningMsgs
=
vehicleWarningMsgBiz
.
getAllByParam
(
vehiclePlanDto
);
//获取列表
//获取列表
PageDataVO
<
VehicleAndModelInfoVo
>
pageDataVO
=
baseBiz
.
getAllVehicle
(
vehiclePlanDto
);
PageDataVO
<
VehicleAndModelInfoVo
>
pageDataVO
=
baseBiz
.
getAllVehicle
(
vehiclePlanDto
);
Map
<
String
,
Object
>
map
=
Maps
.
newHashMap
();
Map
<
String
,
Object
>
map
=
Maps
.
newHashMap
();
...
...
xx-vehicle/xx-vehicle-server/src/main/resources/mapper/BranchCompanyMapper.xml
View file @
49ccbf04
...
@@ -36,4 +36,8 @@
...
@@ -36,4 +36,8 @@
order by distance asc
order by distance asc
</if>
</if>
</select>
</select>
<select
id=
"selectByZoneId"
parameterType=
"java.lang.Integer"
resultType=
"com.xxfc.platform.vehicle.entity.BranchCompany"
>
select * from branch_company
where zone_id = #{zoneId}
</select>
</mapper>
</mapper>
\ No newline at end of file
xx-vehicle/xx-vehicle-server/src/main/resources/mapper/VehicleWarningMsgMapper.xml
View file @
49ccbf04
<?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=
"com.xxfc.platform.vehicle.mapper.VehicleWarningMsgMapper"
>
<mapper
namespace=
"com.xxfc.platform.vehicle.mapper.VehicleWarningMsgMapper"
>
<resultMap
type=
"com.xxfc.platform.vehicle.pojo.VehicleWarningMsgQueryVo"
id=
"vehicleListMap"
>
<result
javaType=
"Integer"
column=
"id"
property=
"id"
></result>
<association
column=
"rule_id"
property=
"vehicleWarningRule"
select=
"com.xxfc.platform.vehicle.mapper.VehicleWarningRuleMapper.selectByPrimaryKey"
javaType=
"com.xxfc.platform.vehicle.entity.VehicleWarningRule"
></association>
</resultMap>
<select
id=
"getByPage"
resultType=
"com.xxfc.platform.vehicle.pojo.VehicleWarningMsgQueryVo"
<select
id=
"getByPage"
resultType=
"com.xxfc.platform.vehicle.pojo.VehicleWarningMsgQueryVo"
parameterType=
"com.xxfc.platform.vehicle.pojo.QueryVehicleWarningMsgVo"
>
parameterType=
"com.xxfc.platform.vehicle.pojo.QueryVehicleWarningMsgVo"
>
select
select
...
@@ -25,7 +32,7 @@
...
@@ -25,7 +32,7 @@
where vehicle_id = #{_parameter}
where vehicle_id = #{_parameter}
</select>
</select>
<select
id=
"getAllByparam"
parameterType=
"com.xxfc.platform.vehicle.pojo.dto.VehiclePlanDto"
result
Type=
"com.xxfc.platform.vehicle.entity.VehicleWarningMsg
"
>
<select
id=
"getAllByparam"
parameterType=
"com.xxfc.platform.vehicle.pojo.dto.VehiclePlanDto"
result
Map=
"vehicleListMap
"
>
select w.*
select w.*
from vehicle_warning_msg w
from vehicle_warning_msg w
left join vehicle v on w.vehicle_id = v.id
left join vehicle v on w.vehicle_id = v.id
...
...
xx-vehicle/xx-vehicle-server/src/main/resources/mapper/VehicleWarningRuleMapper.xml
View file @
49ccbf04
...
@@ -5,6 +5,8 @@
...
@@ -5,6 +5,8 @@
<select
id=
"getByPage"
parameterType=
"com.xxfc.platform.vehicle.pojo.QueryVehicleWarningMsgVo"
resultType=
"com.xxfc.platform.vehicle.entity.VehicleWarningMsg"
>
<select
id=
"getByPage"
parameterType=
"com.xxfc.platform.vehicle.pojo.QueryVehicleWarningMsgVo"
resultType=
"com.xxfc.platform.vehicle.entity.VehicleWarningMsg"
>
</select>
</select>
<select
id=
"getOne"
resultType=
"com.xxfc.platform.vehicle.entity.VehicleWarningRule"
parameterType=
"java.lang.Integer"
>
select * from vehicle_warning_rule where id = #{id}
</select>
</mapper>
</mapper>
\ No newline at end of file
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