Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
BHFT
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
陈嘉强 Rainy Chen
BHFT
Commits
02dbe3d0
Commit
02dbe3d0
authored
Mar 09, 2022
by
陈嘉强
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
入出站落表存档,细节判断
parent
52de6995
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
111 additions
and
20 deletions
+111
-20
RabbitmqMapper.java
src/main/java/com/logwire/bhft/RabbitmqMapper.java
+3
-3
InterfaceParkingGateMapper.java
...java/com/logwire/bhft/dao/InterfaceParkingGateMapper.java
+1
-2
ParkingGateServiceImpl.java
...com/logwire/bhft/service/impl/ParkingGateServiceImpl.java
+10
-3
InterfaceParkingGateMapper.xml
...resources/mapper/interface/InterfaceParkingGateMapper.xml
+97
-12
No files found.
src/main/java/com/logwire/bhft/RabbitmqMapper.java
View file @
02dbe3d0
...
...
@@ -24,9 +24,9 @@ public class RabbitmqMapper {
// }
public
void
sendTopic
(){
String
message
=
"ASYNUP|uploadParkingTradingRecord|{\"terminalId\": \"主终端\", \"plateNo\": \"豫H
33333\", \"entryTime\": 1646639417620, \"entryId\": \"入口\", \"vehicleType\": \"小型车\", \"entryPhoto\":\"\", \"booking\": false, \"plateParseInfo\": \"{\\\"etcPlateNo\\\": [], \\\"videoPlateNo\\\": \\\"豫H33333\\\", \\\"state\\\": \\\"NORMAL\\\", \\\"idenType\\\": \\\"PLATE\\\"}\", \"parkingDetail\": {}, \"exitTime\": 1646639418573, \"requestId\": \"3bad40149deb11ec8f1ccaab5cf7fc68
\", \"username\": \"ftp94\", \"password\": \"1\", \"parkUUID\": \"ypark2\", \"parkType\": \"路外\"}"
;
String
message1
=
"ASYNUP|uploadParkingTradingRecord|{\"plateNo\": \"豫H11111\", \"vehicleType\": \"小型车\", \"entryTime\": 1646373838476, \"entryId\": \"入口\", \"booking\": false, \"exitTime\": 1646373842172, \"exitId\": \"出口\", \"tradeTime\": 1646373842172, \"tollRateVersion\": \"\", \"tollCollectorName\": \"默认收费员\", \"tradeType\": \"FREE\", \"accounts\": 0, \"cash\": 0, \"entryPhoto\": null, \"exitPhoto\": null, \"plateParseInfo\": \"{\\\"etcPlateNo\\\": [], \\\"videoPlateNo\\\": \\\"豫H11111\\\", \\\"state\\\": \\\"NORMAL\\\", \\\"idenType\\\": \\\"PLATE\\\"}\", \"useType\": \"\", \"parkingDetail\": {\"couponList\": [], \"payList\": [], \"negotiate\": false, \"parkingFeeBeforeNegotiate\": 0}, \"terminalId\": \"主终端\", \"time\": 1646373845403, \"requestId\": \"e5bb7e809b8011ec88d6d64e40ddb35c\", \"username\": \"ftp94\", \"password\": \"1\", \"parkUUID\": \"ypark2\", \"parkType\": \"路外\"}"
;
rabbitTemplate
.
convertAndSend
(
"global.parking.topic.exchange"
,
"ASYNUP.uploadParkingTradingRecord.ypark2"
,
message
1
);
String
message
=
"ASYNUP|uploadParkingTradingRecord|{\"terminalId\": \"主终端\", \"plateNo\": \"豫H
11111\", \"entryTime\": 1646373838476, \"entryId\": \"入口\", \"vehicleType\": \"小型车\", \"entryPhoto\": null, \"booking\": false, \"plateParseInfo\": \"{\\\"etcPlateNo\\\": [], \\\"videoPlateNo\\\": \\\"豫H11111\\\", \\\"state\\\": \\\"NORMAL\\\", \\\"idenType\\\": \\\"PLATE\\\"}\", \"parkingDetail\": {}, \"time\": 1646373838792, \"requestId\": \"e1caa8d29b8011ec88d6d64e40ddb35c
\", \"username\": \"ftp94\", \"password\": \"1\", \"parkUUID\": \"ypark2\", \"parkType\": \"路外\"}"
;
String
message1
=
"ASYNUP|uploadParkingTradingRecord|{\"plateNo\": \"豫H11111\", \"vehicleType\": \"小型车\", \"entryTime\": 1646373838476, \"entryId\": \"入口\", \"booking\": false, \"exitTime\": 1646373842172, \"exitId\": \"出口\", \"tradeTime\": 1646373842172, \"tollRateVersion\": \"\", \"tollCollectorName\": \"默认收费员\", \"tradeType\": \"FREE\", \"accounts\":
10
0, \"cash\": 0, \"entryPhoto\": null, \"exitPhoto\": null, \"plateParseInfo\": \"{\\\"etcPlateNo\\\": [], \\\"videoPlateNo\\\": \\\"豫H11111\\\", \\\"state\\\": \\\"NORMAL\\\", \\\"idenType\\\": \\\"PLATE\\\"}\", \"useType\": \"\", \"parkingDetail\": {\"couponList\": [], \"payList\": [], \"negotiate\": false, \"parkingFeeBeforeNegotiate\": 0}, \"terminalId\": \"主终端\", \"time\": 1646373845403, \"requestId\": \"e5bb7e809b8011ec88d6d64e40ddb35c\", \"username\": \"ftp94\", \"password\": \"1\", \"parkUUID\": \"ypark2\", \"parkType\": \"路外\"}"
;
rabbitTemplate
.
convertAndSend
(
"global.parking.topic.exchange"
,
"ASYNUP.uploadParkingTradingRecord.ypark2"
,
message
);
for
(
int
i
=
0
;
i
<
10
;
i
++){
// rabbitTemplate.convertAndSend("global.parking.topic.exchange","ASYNUP.uploadParkingTradingRecord.ypark2","测试发布订阅模型: " + i);
...
...
src/main/java/com/logwire/bhft/dao/InterfaceParkingGateMapper.java
View file @
02dbe3d0
...
...
@@ -15,13 +15,12 @@ public interface InterfaceParkingGateMapper {
List
<
InterfaceParkingGate
>
selectAllByRequestIdOrExitRequestId
(
@Param
(
"requestId"
)
String
requestId
);
List
<
InterfaceParkingGate
>
selectByEntryTimeAndEntryId
(
@Param
(
"entryTime"
)
Object
entryTime
,
@Param
(
"entryId"
)
String
entryId
);
InterfaceParkingGate
selectOneByExitFlagNum
(
@Param
(
"exitFlagNum"
)
String
exitFlagNum
);
int
insertAll
(
InterfaceParkingGate
interfaceParkingGate
);
int
updateExitInfo
(
InterfaceParkingGate
interfaceParkingGate
);
int
updateExitId
(
@Param
(
"exitId"
)
String
exitId
);
}
...
...
src/main/java/com/logwire/bhft/service/impl/ParkingGateServiceImpl.java
View file @
02dbe3d0
...
...
@@ -40,13 +40,20 @@ public class ParkingGateServiceImpl implements ParkingGateService {
int
id
=
interfaceParkingGateMapper
.
insertAll
(
parkingGate
);
}
else
{
// 出站逻辑
List
<
InterfaceParkingGate
>
interfaceParkingGates
=
interfaceParkingGateMapper
.
selectByEntryTimeAndEntryId
(
parkingGate
.
getEntryTime
(),
parkingGate
.
getEntryId
());
int
i
=
interfaceParkingGateMapper
.
updateExitInfo
(
parkingGate
);
InterfaceParkingGate
exitInfo
=
interfaceParkingGateMapper
.
selectOneByExitFlagNum
(
parkingGate
.
getExitFlagNum
());
exitInfo
.
setExitId
(
parkingGate
.
getExitId
());
exitInfo
.
setExitTime
(
parkingGate
.
getExitTime
());
exitInfo
.
setExitRequestId
(
parkingGate
.
getRequestId
());
exitInfo
.
setExitRequestTime
(
parkingGate
.
getRequestTime
());
exitInfo
.
setUpdateUser
(
"interface"
);
exitInfo
.
setUpdateDate
(
new
Date
());
int
i
=
interfaceParkingGateMapper
.
updateExitInfo
(
exitInfo
);
}
parkingGate
.
setUpdateUser
(
"cjq"
);
return
null
;
}
}
src/main/resources/mapper/interface/InterfaceParkingGateMapper.xml
View file @
02dbe3d0
...
...
@@ -48,7 +48,7 @@
slot_id,booking,parking_detail,
domain_name,version,deleted,
insert_user,insert_date,update_user,
update_date,exit_request_id,exit_request_time,exit
FlagN
um
update_date,exit_request_id,exit_request_time,exit
_flag_n
um
</sql>
<insert
id=
"insertAll"
>
insert into t01_interface_parking_gate
...
...
@@ -69,32 +69,117 @@
#{tollCollectorName,jdbcType=VARCHAR}, #{useType,jdbcType=VARCHAR}, #{areaId,jdbcType=VARCHAR},
#{slotId,jdbcType=VARCHAR}, #{booking,jdbcType=BOOLEAN}, #{parkingDetail,jdbcType=VARCHAR},
#{domainName,jdbcType=VARCHAR}, #{version}, #{deleted,jdbcType=BOOLEAN},
#{insertUser,jdbcType=VARCHAR}, #{insertDate,jdbcType=TIMESTAMP}
), #{exitFlagNum,jdbcType=VARCHAR}
#{insertUser,jdbcType=VARCHAR}, #{insertDate,jdbcType=TIMESTAMP}
, #{exitFlagNum,jdbcType=VARCHAR})
</insert>
<update
id=
"updateExitInfo"
parameterType=
"interfaceParkingGate"
>
update t01_interface_parking_gate
<set>
update_user = #{updateUser}
<if
test=
"requestTime != null"
>
request_time = #{requestTime,jdbcType=OTHER},
</if>
<if
test=
"requestId != null"
>
request_id = #{requestId,jdbcType=VARCHAR},
</if>
<if
test=
"plateNo != null"
>
plate_no = #{plateNo,jdbcType=VARCHAR},
</if>
<if
test=
"vehicleType != null"
>
vehicle_type = #{vehicleType,jdbcType=VARCHAR},
</if>
<if
test=
"plateParseInfo != null"
>
plate_parse_info = #{plateParseInfo,jdbcType=VARCHAR},
</if>
<if
test=
"entryTime != null"
>
entry_time = #{entryTime,jdbcType=BIGINT},
</if>
<if
test=
"entryId != null"
>
entry_id = #{entryId,jdbcType=VARCHAR},
</if>
<if
test=
"exitTime != null"
>
exit_time = #{exitTime,jdbcType=BIGINT},
</if>
<if
test=
"exitId != null"
>
exit_id = #{exitId,jdbcType=VARCHAR},
</if>
<if
test=
"tradeTime != null"
>
trade_time = #{tradeTime,jdbcType=OTHER},
</if>
<if
test=
"tollRateVersion != null"
>
toll_rate_version = #{tollRateVersion,jdbcType=VARCHAR},
</if>
<if
test=
"tradeType != null"
>
trade_type = #{tradeType,jdbcType=VARCHAR},
</if>
<if
test=
"account != null"
>
account = #{account,jdbcType=NUMERIC},
</if>
<if
test=
"cash != null"
>
cash = #{cash,jdbcType=NUMERIC},
</if>
<if
test=
"tollCollectorName != null"
>
toll_collector_name = #{tollCollectorName,jdbcType=VARCHAR},
</if>
<if
test=
"useType != null"
>
use_type = #{useType,jdbcType=VARCHAR},
</if>
<if
test=
"areaId != null"
>
area_id = #{areaId,jdbcType=VARCHAR},
</if>
<if
test=
"slotId != null"
>
slot_id = #{slotId,jdbcType=VARCHAR},
</if>
<if
test=
"booking != null"
>
booking = #{booking,jdbcType=BOOLEAN},
</if>
<if
test=
"parkingDetail != null"
>
parking_detail = #{parkingDetail,jdbcType=VARCHAR},
</if>
<if
test=
"domainName != null"
>
domain_name = #{domainName,jdbcType=VARCHAR},
</if>
<if
test=
"version != null"
>
version = #{version,jdbcType=OTHER},
</if>
<if
test=
"deleted != null"
>
deleted = #{deleted,jdbcType=BOOLEAN},
</if>
<if
test=
"insertUser != null"
>
insert_user = #{insertUser,jdbcType=VARCHAR},
</if>
<if
test=
"insertDate != null"
>
insert_date = #{insertDate,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateUser != null"
>
update_user = #{updateUser,jdbcType=VARCHAR},
</if>
<if
test=
"updateDate != null"
>
update_date = #{updateDate,jdbcType=TIMESTAMP},
</if>
<if
test=
"exitRequestId != null"
>
exit_request_id = #{exitRequestId,jdbcType=VARCHAR},
</if>
<if
test=
"exitRequestTime != null"
>
exit_request_time = #{exitRequestTime,jdbcType=BIGINT},
</if>
<if
test=
"exitFlagNum != null"
>
exit_flag_num = #{exitFlagNum,jdbcType=VARCHAR},
</if>
</set>
where id = #{id}
</update>
<select
id=
"select
ByEntryTimeAndEntry
Id"
resultMap=
"BaseResultMap"
>
<select
id=
"select
AllByRequestIdOrExitRequest
Id"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from t01_interface_parking_gate
where
entry_time = #{entryTime}
AND entry_id = #{entryId,jdbcType=VARCHAR}
request_id = #{requestId,jdbcType=VARCHAR} OR exit_request_id = #{requestId,jdbcType=VARCHAR}
</select>
<update
id=
"updateExitId"
>
update t01_interface_parking_gate
set exit_id = #{exitId,jdbcType=VARCHAR}
</update>
<select
id=
"selectAllByRequestIdOrExitRequestId"
resultMap=
"BaseResultMap"
>
<select
id=
"selectOneByExitFlagNum"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from t01_interface_parking_gate
where
request_id = #{requestId,jdbcType=VARCHAR} OR exit_request_id = #{requestId,jdbcType=VARCHAR}
exit_flag_num = #{exitFlagNum,jdbcType=VARCHAR}
limit 1
</select>
</mapper>
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