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
4be4070b
Commit
4be4070b
authored
Mar 28, 2024
by
刘林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(JG):车用气瓶-监管码功能开发
parent
7974d794
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
66 additions
and
25 deletions
+66
-25
VehicleApanageEnum.java
...oin/amos/boot/module/jg/api/enums/VehicleApanageEnum.java
+24
-18
JgVehicleInformationServiceImpl.java
.../jg/biz/service/impl/JgVehicleInformationServiceImpl.java
+42
-7
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/enums/VehicleApanageEnum.java
View file @
4be4070b
...
...
@@ -14,28 +14,34 @@ public enum VehicleApanageEnum {
/**
* 属性机构枚举
*/
XIAN
(
"陕A"
,
"
XIAN
"
),
TONG_CHUAN
(
"陕B"
,
"
TONG_CHUAN
"
),
BAO_JI
(
"陕C"
,
"
BAO_JI
"
),
XIAN_YANG
(
"陕D"
,
"
XIAN_YANG
"
),
WEI_NAN
(
"陕E"
,
"
WEI_NAN
"
),
YAN_AN
(
"陕J"
,
"
YAN_AN
"
),
HAN_ZHONG
(
"陕F"
,
"
HAN_ZHONG
"
),
YU_LIN
(
"陕K"
,
"
YU_LIN
"
),
AN_KANG
(
"陕G"
,
"
AN_KANG
"
),
SHANG_LUO
(
"陕H"
,
"
SHANG_LUO
"
),
XI_XIAN
(
"陕U"
,
"
XI_XIAN
"
),
YANG_LING
(
"陕V"
,
"
YANG_LING
"
),
HAN_CHENG
(
"陕Y"
,
"HAN_CHENG"
);
private
final
String
code
;
XIAN
(
"陕A"
,
"
610100
"
),
TONG_CHUAN
(
"陕B"
,
"
610200
"
),
BAO_JI
(
"陕C"
,
"
610300
"
),
XIAN_YANG
(
"陕D"
,
"
610400
"
),
WEI_NAN
(
"陕E"
,
"
610500
"
),
YAN_AN
(
"陕J"
,
"
610600
"
),
HAN_ZHONG
(
"陕F"
,
"
610700
"
),
YU_LIN
(
"陕K"
,
"
610800
"
),
AN_KANG
(
"陕G"
,
"
610900
"
),
SHANG_LUO
(
"陕H"
,
"
611000
"
),
XI_XIAN
(
"陕U"
,
"
617000
"
),
YANG_LING
(
"陕V"
,
"
610403
"
),
SHEN_MU
(
"陕K"
,
"610881"
),
FU_GU
(
"陕K"
,
"610822"
),
HAN_CHENG
(
"陕Y"
,
"610581"
)
;
private
final
String
city
;
private
final
String
code
;
public
static
String
of
(
String
city
){
/**
* 根据机构代码返回属地前缀
* @param code 属地代码
* @return 属地前缀
*/
public
static
String
of
(
String
code
){
for
(
VehicleApanageEnum
e
:
VehicleApanageEnum
.
values
()){
if
(
e
.
getCity
().
equals
(
c
ity
)){
return
e
.
getC
ode
();
if
(
e
.
getCity
().
equals
(
c
ode
)){
return
e
.
getC
ity
();
}
}
return
null
;
...
...
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 @
4be4070b
...
...
@@ -58,6 +58,7 @@ 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
.
biz
.
service
.
impl
.
JgUseRegistrationServiceImpl
.
getAuditPassedDate
;
/**
...
...
@@ -105,6 +106,8 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
private
JgVehicleInformationEqServiceImpl
jgVehicleInformationEqService
;
@Autowired
private
IdxBizJgFactoryInfoMapper
idxBizJgFactoryInfoMapper
;
@Autowired
private
IdxBizJgOtherInfoMapper
otherInfoMapper
;
/**
* 新增(提交)车用气瓶
...
...
@@ -637,8 +640,13 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
updateRegisterWrapper
.
set
(
IdxBizJgRegisterInfo:
:
getRegisterState
,
this
.
getRegCode
());
idxBizJgRegisterInfoService
.
update
(
updateRegisterWrapper
);
// 查询其他信息
LambdaQueryWrapper
<
IdxBizJgOtherInfo
>
otherInfoWrapper
=
new
QueryWrapper
<
IdxBizJgOtherInfo
>().
lambda
();
otherInfoWrapper
.
eq
(
IdxBizJgOtherInfo:
:
getRecord
,
String
.
valueOf
(
mapData
.
get
(
"record"
)));
IdxBizJgOtherInfo
otherInfo
=
otherInfoMapper
.
selectOne
(
otherInfoWrapper
);
// 更新设备信息
this
.
updateEquipMessage
(
jgVehicleInformation
,
mapData
);
this
.
updateEquipMessage
(
jgVehicleInformation
,
mapData
,
registerInfo
,
otherInfo
);
// 使用信息
LambdaQueryWrapper
<
IdxBizJgUseInfo
>
lambdaUseInfo
=
new
QueryWrapper
<
IdxBizJgUseInfo
>().
lambda
();
...
...
@@ -646,7 +654,7 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
IdxBizJgUseInfo
useInfo
=
useInfoMapper
.
selectOne
(
lambdaUseInfo
);
String
usePlace
=
useInfo
.
getProvinceName
()
+
"/"
+
useInfo
.
getCityName
()
+
"/"
+
useInfo
.
getCountyName
()
+
useInfo
.
getStreetName
();
// 更新es
updateEsData
(
usePlace
,
mapData
,
jgVehicleInformation
);
updateEsData
(
usePlace
,
mapData
,
jgVehicleInformation
,
otherInfo
);
}
// 更新代办状态
...
...
@@ -665,10 +673,11 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
this
.
getBaseMapper
().
updateById
(
jgVehicleInformation
);
}
public
void
updateEsData
(
String
usePlace
,
JSONObject
dataMap
,
JgVehicleInformation
jgVehicleInformation
)
{
public
void
updateEsData
(
String
usePlace
,
JSONObject
dataMap
,
JgVehicleInformation
jgVehicleInformation
,
IdxBizJgOtherInfo
otherInfo
)
{
// 更新es
HashMap
<
String
,
Map
<
String
,
Object
>>
objMap
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
param
=
new
HashMap
<>();
param
.
put
(
"SUPERVISORY_CODE"
,
otherInfo
.
getSupervisoryCode
());
param
.
put
(
"USE_UNIT_CREDIT_CODE"
,
dataMap
.
get
(
"useUnitCreditCode"
));
param
.
put
(
"USE_UNIT_NAME"
,
dataMap
.
get
(
"useUnitName"
));
param
.
put
(
"ADDRESS"
,
dataMap
.
getOrDefault
(
"address"
,
""
));
...
...
@@ -733,16 +742,17 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
return
this
.
baseMapper
.
getListPage
(
page
,
dto
,
roleIds
);
}
public
void
updateEquipMessage
(
JgVehicleInformation
jgVehicleInformation
,
JSONObject
map
)
{
public
void
updateEquipMessage
(
JgVehicleInformation
jgVehicleInformation
,
JSONObject
map
,
IdxBizJgRegisterInfo
registerInfo
,
IdxBizJgOtherInfo
otherInfo
)
{
String
useOrgCode
=
jgVehicleInformation
.
getUseRegistrationCode
();
map
.
remove
(
"status"
);
map
.
remove
(
"instanceId"
);
map
.
remove
(
"REC_DATE"
);
IdxBizJgUseInfo
useInfo
=
new
IdxBizJgUseInfo
();
BeanUtil
.
copyProperties
(
map
,
useInfo
);
if
(
map
.
containsKey
(
"isXixian"
))
{
useInfo
.
setIsNotXiXian
(
map
.
get
(
"isXixian"
)
+
""
);
}
// 判断是否为西咸
String
isXiXian
=
XI_XIAN
.
getCode
().
equals
(
jgVehicleInformation
.
getVehicleApanage
())
?
"1"
:
"0"
;
jgVehicleInformation
.
setIsXixian
(
isXiXian
);
useInfo
.
setIsNotXiXian
(
isXiXian
);
useInfo
.
setProvince
(
"610000"
);
useInfo
.
setProvinceName
(
"陕西省"
);
LambdaQueryWrapper
<
IdxBizJgUseInfo
>
lambda
=
new
QueryWrapper
<
IdxBizJgUseInfo
>().
lambda
();
...
...
@@ -778,6 +788,31 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
}
// 更新设备使用登记证
idxBizJgRegisterInfoMapper
.
updateUseOrgCodeByEquip
(
String
.
valueOf
(
map
.
get
(
"record"
)),
useOrgCode
);
// 车用气瓶生成监管码
this
.
createCode
(
jgVehicleInformation
,
registerInfo
,
otherInfo
);
}
/**
* 生成监管码
*/
public
void
createCode
(
JgVehicleInformation
jgVehicleInformation
,
IdxBizJgRegisterInfo
registerInfo
,
IdxBizJgOtherInfo
otherInfo
)
{
// 创建参数映射
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"cityCode"
,
XI_XIAN
.
getCode
().
equals
(
jgVehicleInformation
.
getVehicleApanage
())
?
XIAN_YANG
.
getCode
()
:
jgVehicleInformation
.
getVehicleApanage
());
map
.
put
(
"isXiXian"
,
jgVehicleInformation
.
getIsXixian
());
map
.
put
(
"equCategory"
,
registerInfo
.
getEquCategory
());
// 调用服务创建代码
ResponseModel
<
Map
<
String
,
Object
>>
code
=
tzsServiceFeignClient
.
createCode
(
map
);
Map
<
String
,
Object
>
result
=
code
.
getResult
();
// 更新其他信息
if
(
result
!=
null
&&
!
result
.
isEmpty
())
{
otherInfo
.
setSupervisoryCode
(
String
.
valueOf
(
result
.
get
(
"superviseCode"
)));
otherInfo
.
setClaimStatus
(
"已认领"
);
otherInfoMapper
.
updateById
(
otherInfo
);
}
}
/**
...
...
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