Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
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
项目统一框架
amos-boot-biz
Commits
78657af1
Commit
78657af1
authored
Apr 29, 2024
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.字典增加缓存
parent
458a69f7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
20 deletions
+24
-20
JgVehicleInformationServiceImpl.java
.../jg/biz/service/impl/JgVehicleInformationServiceImpl.java
+24
-20
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/JgVehicleInformationServiceImpl.java
View file @
78657af1
...
...
@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.bo.CompanyBo
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.entity.DataDictionary
;
...
...
@@ -15,9 +16,13 @@ import com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.jg.api.dto.*
;
import
com.yeejoin.amos.boot.module.jg.api.entity.*
;
import
com.yeejoin.amos.boot.module.jg.api.enums.*
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgUseRegistrationMapper
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgRegistrationHistory
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgVehicleInformation
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgVehicleInformationEq
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.CylinderTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.VehicleApanageEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.WorkFlowStatusEnum
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgVehicleInformationEqMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgVehicleInformationMapper
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgVehicleInformationService
;
...
...
@@ -46,9 +51,8 @@ import org.redisson.api.RLock;
import
org.redisson.api.RedissonClient
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.ApplicationArguments
;
import
org.springframework.boot.ApplicationRunner
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.ObjectUtils
;
...
...
@@ -56,19 +60,17 @@ import org.springframework.util.StringUtils;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
javax.annotation.PostConstruct
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.*
;
import
java.util.concurrent.TimeUnit
;
import
java.util.stream.Collectors
;
import
java.util.stream.Stream
;
import
static
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
enums
.
VehicleApanageEnum
.*;
import
static
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
enums
.
VehicleApanageEnum
.
XIAN_YANG
;
import
static
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
enums
.
VehicleApanageEnum
.
XI_XIAN
;
import
static
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
.
impl
.
JgUseRegistrationServiceImpl
.
getAuditPassedDate
;
/**
...
...
@@ -170,7 +172,7 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
// 车牌号码 字段的唯一性校验
LambdaQueryWrapper
<
JgVehicleInformation
>
vehicleInfoWrapper
=
new
LambdaQueryWrapper
<>();
vehicleInfoWrapper
.
eq
(
JgVehicleInformation:
:
getCarNumber
,
vehicleInfoDto
.
getCarNumber
());
vehicleInfoWrapper
.
eq
(
JgVehicleInformation:
:
getIsDelete
,
false
);
vehicleInfoWrapper
.
eq
(
JgVehicleInformation:
:
getIsDelete
,
false
);
vehicleInfoWrapper
.
ne
(!
ValidationUtil
.
isEmpty
(
vehicleInfoDto
.
getSequenceNbr
()),
JgVehicleInformation:
:
getSequenceNbr
,
vehicleInfoDto
.
getSequenceNbr
());
Integer
count
=
this
.
baseMapper
.
selectCount
(
vehicleInfoWrapper
);
if
(
count
>
0
)
{
...
...
@@ -188,10 +190,10 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
}
// 使用单位信息
if
(
"个人主体"
.
equals
(
company
.
getCompanyType
()))
{
if
(
"个人主体"
.
equals
(
company
.
getCompanyType
()))
{
vehicleInfoDto
.
setUseUnitName
(
company
.
getCompanyName
().
split
(
"_"
)[
1
]);
vehicleInfoDto
.
setUseUnitCreditCode
(
company
.
getCompanyCode
().
split
(
"_"
)[
1
]);
}
else
{
}
else
{
vehicleInfoDto
.
setUseUnitName
(
company
.
getCompanyName
());
vehicleInfoDto
.
setUseUnitCreditCode
(
company
.
getCompanyCode
());
}
...
...
@@ -508,7 +510,7 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
.
map
(
JgVehicleInformationEq:
:
getEquId
)
.
collect
(
Collectors
.
toList
())
).
stream
()
.
peek
(
v
->
v
.
put
(
"chargingMedium"
,
getFillingMediumMap
().
get
(
v
.
getOrDefault
(
"chargingMedium"
,
""
)
+
""
)))
.
peek
(
v
->
v
.
put
(
"chargingMedium"
,
getFillingMediumMap
().
get
(
v
.
getOrDefault
(
"chargingMedium"
,
""
)
+
""
)))
.
collect
(
Collectors
.
toList
())
);
}
else
{
...
...
@@ -1184,19 +1186,20 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
commonService
.
updateTaskModel
(
taskMap
);
}
public
Map
<
String
,
Object
>
getFillingMediumMap
(){
synchronized
(
this
){
if
(
fillingMediumMap
!=
null
){
private
Map
<
String
,
Object
>
getFillingMediumMap
()
{
if
(
fillingMediumMap
==
null
)
{
synchronized
(
this
)
{
if
(
fillingMediumMap
==
null
)
{
List
<
DictionarieValueModel
>
fillingMedium
=
FeignUtil
.
remoteCall
(()
->
Systemctl
.
dictionarieClient
.
dictValues
(
"FILLING_MEDIUM"
));
fillingMediumMap
=
fillingMedium
.
stream
().
collect
(
Collectors
.
toMap
(
DictionarieValueModel:
:
getDictDataKey
,
DictionarieValueModel:
:
getDictDataValue
));
return
fillingMediumMap
;
}
else
{
if
(
fillingMediumMap
!=
null
){
return
fillingMediumMap
;
}
List
<
DictionarieValueModel
>
fillingMedium
=
FeignUtil
.
remoteCall
(()->
Systemctl
.
dictionarieClient
.
dictValues
(
"FILLING_MEDIUM"
));
fillingMediumMap
=
fillingMedium
.
stream
().
collect
(
Collectors
.
toMap
(
DictionarieValueModel:
:
getDictDataKey
,
DictionarieValueModel:
:
getDictDataValue
));
return
fillingMediumMap
;
}
}
return
fillingMediumMap
;
}
}
\ 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