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
711096ee
Commit
711096ee
authored
Jun 28, 2019
by
hanfeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改违章,把查询到的车型代码和类型保存到数据库3
parent
0cf880f4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
4 deletions
+21
-4
LicensePlateTypeBiz.java
.../com/xxfc/platform/universal/biz/LicensePlateTypeBiz.java
+10
-0
TrafficViolationsService.java
.../platform/universal/service/TrafficViolationsService.java
+11
-4
No files found.
xx-universal/xx-universal-server/src/main/java/com/xxfc/platform/universal/biz/LicensePlateTypeBiz.java
View file @
711096ee
...
...
@@ -17,10 +17,20 @@ import java.util.List;
@Service
public
class
LicensePlateTypeBiz
extends
BaseBiz
<
LicensePlateTypeMapper
,
LicensePlateType
>
{
/**
* 获取车牌类型和和编码
* @param licensePlateTypes
*/
@Transactional
public
void
insertLicensePlateType
(
List
<
LicensePlateType
>
licensePlateTypes
)
{
mapper
.
insertLicensePlateType
(
licensePlateTypes
);
}
/**
* 修改数据库数据
* @param licensePlateTypes
* @throws SQLException
*/
@Transactional
public
void
updateLicensePlateType
(
List
<
LicensePlateType
>
licensePlateTypes
)
throws
SQLException
{
// List<LicensePlateType> saveLicensePlateTypes = mapper.selectAll();
...
...
xx-universal/xx-universal-server/src/main/java/com/xxfc/platform/universal/service/TrafficViolationsService.java
View file @
711096ee
...
...
@@ -17,6 +17,7 @@ import org.springframework.core.task.TaskExecutor;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.stereotype.Service
;
import
java.sql.SQLException
;
import
java.util.*
;
import
java.util.regex.Matcher
;
import
java.util.regex.Pattern
;
...
...
@@ -38,7 +39,9 @@ public class TrafficViolationsService {
private
String
CODE
;
@Value
(
"${RETURN.TYPE}"
)
private
String
TYPE
;
/**
* 下列参数,根据使用不同的公司的接口进行修改
*/
private
static
final
String
CITY_HOST
=
"https://weizhang.market.alicloudapi.com"
;
private
static
final
String
CITY_PATH
=
"/wz/province"
;
private
static
final
String
CITY_METHOD
=
"GET"
;
...
...
@@ -125,7 +128,7 @@ public class TrafficViolationsService {
/**
* Unicode转汉字字符串
* Unicode转汉字字符串
(根据接口返回编码的类型使用)
* @param str
* @return
*/
...
...
@@ -191,8 +194,12 @@ public class TrafficViolationsService {
return
licensePlateTypes
;
}
@Scheduled
(
cron
=
"0 0 0 0/3 * *"
)
private
void
updateLicensePlateType
(){
/**
* 定时修改车牌类型
* @throws SQLException
*/
@Scheduled
(
cron
=
"0 0 0 0/7 * ?"
)
private
void
updateLicensePlateType
()
throws
SQLException
{
List
<
LicensePlateType
>
licensePlateTypes
=
licensePlateTypeBiz
.
selectListAll
();
licensePlateTypeBiz
.
updateLicensePlateType
(
licensePlateTypes
);
}
...
...
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