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
b19eeb71
Commit
b19eeb71
authored
Oct 09, 2025
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(jyjc): 报检规则4.0开发
1.推送消息缺少字段信息,applicationUnitAddress 报检单位地址 、 equName 设备名称、 equCode 设备代码、 produceDate 制造日期
parent
4e4ad398
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
15 deletions
+41
-15
InspectionApplicationPushEventListener.java
...vent/listener/InspectionApplicationPushEventListener.java
+26
-14
InspectAppDocCmService.java
...le/inspectapp/strategy/common/InspectAppDocCmService.java
+1
-1
CommonServiceImpl.java
.../boot/module/jyjc/biz/service/impl/CommonServiceImpl.java
+14
-0
No files found.
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/event/listener/InspectionApplicationPushEventListener.java
View file @
b19eeb71
...
@@ -23,6 +23,7 @@ import com.yeejoin.amos.boot.module.jyjc.api.model.InspectionEquipData;
...
@@ -23,6 +23,7 @@ import com.yeejoin.amos.boot.module.jyjc.api.model.InspectionEquipData;
import
com.yeejoin.amos.boot.module.jyjc.api.model.JyjcInspectionApplicationModel
;
import
com.yeejoin.amos.boot.module.jyjc.api.model.JyjcInspectionApplicationModel
;
import
com.yeejoin.amos.boot.module.jyjc.biz.event.InspectionApplicationPushEvent
;
import
com.yeejoin.amos.boot.module.jyjc.biz.event.InspectionApplicationPushEvent
;
import
com.yeejoin.amos.boot.module.jyjc.biz.kafka.KafkaProducer
;
import
com.yeejoin.amos.boot.module.jyjc.biz.kafka.KafkaProducer
;
import
com.yeejoin.amos.boot.module.jyjc.biz.service.impl.CommonServiceImpl
;
import
com.yeejoin.amos.boot.module.jyjc.biz.service.impl.JyjcInspectionApplicationEquipServiceImpl
;
import
com.yeejoin.amos.boot.module.jyjc.biz.service.impl.JyjcInspectionApplicationEquipServiceImpl
;
import
com.yeejoin.amos.boot.module.jyjc.biz.service.impl.JyjcInspectionApplicationPushLogServiceImpl
;
import
com.yeejoin.amos.boot.module.jyjc.biz.service.impl.JyjcInspectionApplicationPushLogServiceImpl
;
import
com.yeejoin.amos.boot.module.jyjc.biz.service.impl.JyjcInspectionApplicationServiceImpl
;
import
com.yeejoin.amos.boot.module.jyjc.biz.service.impl.JyjcInspectionApplicationServiceImpl
;
...
@@ -132,6 +133,12 @@ public class InspectionApplicationPushEventListener {
...
@@ -132,6 +133,12 @@ public class InspectionApplicationPushEventListener {
@javax
.
annotation
.
Resource
@javax
.
annotation
.
Resource
private
JyjcInspectionApplicationServiceImpl
inspectionApplicationService
;
private
JyjcInspectionApplicationServiceImpl
inspectionApplicationService
;
@javax
.
annotation
.
Resource
private
TzBaseEnterpriseInfoMapper
enterpriseInfoMapper
;
@javax
.
annotation
.
Resource
private
CommonServiceImpl
commonService
;
/**
/**
* 报检推送主题, 第一位为接收单位标识
* 报检推送主题, 第一位为接收单位标识
...
@@ -231,6 +238,7 @@ public class InspectionApplicationPushEventListener {
...
@@ -231,6 +238,7 @@ public class InspectionApplicationPushEventListener {
private
String
buildData
(
long
traceId
,
JyjcInspectionApplicationModel
applicationModel
)
{
private
String
buildData
(
long
traceId
,
JyjcInspectionApplicationModel
applicationModel
)
{
String
applicationUnitAddress
=
getAppUnitAddress
(
applicationModel
);
String
jsonStr
=
""
;
String
jsonStr
=
""
;
EquipmentClassifityEnum
classifyEnum
=
EquipmentClassifityEnum
.
getOne
(
applicationModel
.
getEquipClassify
());
EquipmentClassifityEnum
classifyEnum
=
EquipmentClassifityEnum
.
getOne
(
applicationModel
.
getEquipClassify
());
if
(
classifyEnum
==
EquipmentClassifityEnum
.
YLGD
)
{
if
(
classifyEnum
==
EquipmentClassifityEnum
.
YLGD
)
{
...
@@ -242,6 +250,7 @@ public class InspectionApplicationPushEventListener {
...
@@ -242,6 +250,7 @@ public class InspectionApplicationPushEventListener {
pushDataPipeline
.
setInspectionEquips
(
this
.
getPipelines
(
applicationModel
));
pushDataPipeline
.
setInspectionEquips
(
this
.
getPipelines
(
applicationModel
));
pushDataPipeline
.
setTotalLength
(
calTotalLength
(
pushDataPipeline
.
getInspectionEquips
()));
pushDataPipeline
.
setTotalLength
(
calTotalLength
(
pushDataPipeline
.
getInspectionEquips
()));
pushDataPipeline
.
setTraceId
(
traceId
+
""
);
pushDataPipeline
.
setTraceId
(
traceId
+
""
);
pushDataPipeline
.
setApplicationUnitAddress
(
applicationUnitAddress
);
jsonStr
=
JSONObject
.
toJSONString
(
pushDataPipeline
);
jsonStr
=
JSONObject
.
toJSONString
(
pushDataPipeline
);
}
else
{
}
else
{
InspectionApplicationPushData
pushData
=
new
InspectionApplicationPushData
();
InspectionApplicationPushData
pushData
=
new
InspectionApplicationPushData
();
...
@@ -251,11 +260,28 @@ public class InspectionApplicationPushEventListener {
...
@@ -251,11 +260,28 @@ public class InspectionApplicationPushEventListener {
// 报检的设备信息
// 报检的设备信息
pushData
.
setInspectionEquips
(
this
.
buildInspectionEquipInfo
(
applicationModel
));
pushData
.
setInspectionEquips
(
this
.
buildInspectionEquipInfo
(
applicationModel
));
pushData
.
setTraceId
(
traceId
+
""
);
pushData
.
setTraceId
(
traceId
+
""
);
pushData
.
setApplicationUnitAddress
(
applicationUnitAddress
);
jsonStr
=
JSONObject
.
toJSONString
(
pushData
);
jsonStr
=
JSONObject
.
toJSONString
(
pushData
);
}
}
return
jsonStr
;
return
jsonStr
;
}
}
private
String
getAppUnitAddress
(
JyjcInspectionApplicationModel
applicationModel
)
{
LambdaQueryWrapper
<
TzBaseEnterpriseInfo
>
enterpriseInfoQueryWrapper
=
new
LambdaQueryWrapper
<>();
// todo 注意useUnitCode不带证件类型, useCode带证件类型
enterpriseInfoQueryWrapper
.
eq
(
TzBaseEnterpriseInfo:
:
getUseUnitCode
,
applicationModel
.
getApplicationUnitCode
()).
select
(
BaseEntity:
:
getSequenceNbr
,
TzBaseEnterpriseInfo:
:
getProvince
,
TzBaseEnterpriseInfo:
:
getCity
,
TzBaseEnterpriseInfo:
:
getDistrict
,
TzBaseEnterpriseInfo:
:
getCommunity
,
TzBaseEnterpriseInfo:
:
getStreet
,
TzBaseEnterpriseInfo:
:
getAddress
);
TzBaseEnterpriseInfo
baseEnterpriseInfo
=
enterpriseInfoMapper
.
selectOne
(
enterpriseInfoQueryWrapper
);
return
commonService
.
buildFullAddress
(
baseEnterpriseInfo
);
}
private
List
<
PipelinePushItemDto
>
getPipelines
(
JyjcInspectionApplicationModel
applicationModel
)
{
private
List
<
PipelinePushItemDto
>
getPipelines
(
JyjcInspectionApplicationModel
applicationModel
)
{
List
<
Map
<
String
,
Object
>>
pipelines
=
inspectionApplicationService
.
getPipelines
(
applicationModel
);
List
<
Map
<
String
,
Object
>>
pipelines
=
inspectionApplicationService
.
getPipelines
(
applicationModel
);
return
pipelines
.
stream
().
map
(
p
->
{
return
pipelines
.
stream
().
map
(
p
->
{
...
@@ -478,23 +504,9 @@ public class InspectionApplicationPushEventListener {
...
@@ -478,23 +504,9 @@ public class InspectionApplicationPushEventListener {
}
}
private
void
setUseCodeAndCertPath
(
InspectionEquipData
equipData
,
String
equipUnicode
)
{
LambdaQueryWrapper
<
IdxBizJgRegisterInfo
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
select
(
IdxBizJgRegisterInfo:
:
getUseOrgCode
,
IdxBizJgRegisterInfo:
:
getLastUseCertFilePath
);
wrapper
.
eq
(
IdxBizJgRegisterInfo:
:
getRecord
,
equipUnicode
);
IdxBizJgRegisterInfo
jgRegisterInfo
=
idxBizJgRegisterInfoMapper
.
selectOne
(
wrapper
);
if
(
jgRegisterInfo
!=
null
)
{
equipData
.
setUseRegistrationCode
(
jgRegisterInfo
.
getUseOrgCode
());
equipData
.
setUseCertFilePath
(
jgRegisterInfo
.
getLastUseCertFilePath
());
}
}
private
String
getSuperviseNameByCode
(
String
applicationUnitCode
)
{
private
String
getSuperviseNameByCode
(
String
applicationUnitCode
)
{
//查询监管单位名称
//查询监管单位名称
TzBaseEnterpriseInfo
tzBaseEnterpriseInfo
=
baseEnterpriseInfoMapper
.
selectOne
(
new
LambdaQueryWrapper
<
TzBaseEnterpriseInfo
>().
eq
(
TzBaseEnterpriseInfo:
:
getUseCode
,
applicationUnitCode
));
TzBaseEnterpriseInfo
tzBaseEnterpriseInfo
=
baseEnterpriseInfoMapper
.
selectOne
(
new
LambdaQueryWrapper
<
TzBaseEnterpriseInfo
>().
eq
(
TzBaseEnterpriseInfo:
:
getUseCode
,
applicationUnitCode
));
return
Optional
.
ofNullable
(
tzBaseEnterpriseInfo
).
map
(
TzBaseEnterpriseInfo:
:
getSuperviseOrgName
).
orElse
(
null
);
return
Optional
.
ofNullable
(
tzBaseEnterpriseInfo
).
map
(
TzBaseEnterpriseInfo:
:
getSuperviseOrgName
).
orElse
(
null
);
}
}
}
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/file/inspectapp/strategy/common/InspectAppDocCmService.java
View file @
b19eeb71
...
@@ -37,7 +37,7 @@ public class InspectAppDocCmService {
...
@@ -37,7 +37,7 @@ public class InspectAppDocCmService {
baseInfo
.
put
(
"equList"
,
this
.
equCategoryCode2Name
(
inspectionApplication
.
getEquipClassify
()));
baseInfo
.
put
(
"equList"
,
this
.
equCategoryCode2Name
(
inspectionApplication
.
getEquipClassify
()));
baseInfo
.
put
(
"equCategory"
,
this
.
equCategoryCode2Name
(
inspectionApplication
.
getEquCategory
()));
baseInfo
.
put
(
"equCategory"
,
this
.
equCategoryCode2Name
(
inspectionApplication
.
getEquCategory
()));
baseInfo
.
put
(
"equDefine"
,
this
.
equCategoryCode2Name
(
inspectionApplication
.
getEquDefine
()));
baseInfo
.
put
(
"equDefine"
,
this
.
equCategoryCode2Name
(
inspectionApplication
.
getEquDefine
()));
baseInfo
.
put
(
"remark"
,
inspectionApplication
.
get
Remark
());
baseInfo
.
put
(
"remark"
,
inspectionApplication
.
get
ProcessDescription
());
baseInfo
.
put
(
"inspectionUnitName"
,
inspectionApplication
.
getInspectionUnitName
());
baseInfo
.
put
(
"inspectionUnitName"
,
inspectionApplication
.
getInspectionUnitName
());
baseInfo
.
put
(
"acceptDate"
,
DateUtil
.
formatDate
(
inspectionApplication
.
getAcceptDate
()));
baseInfo
.
put
(
"acceptDate"
,
DateUtil
.
formatDate
(
inspectionApplication
.
getAcceptDate
()));
baseInfo
.
put
(
"processDescription"
,
inspectionApplication
.
getProcessDescription
());
baseInfo
.
put
(
"processDescription"
,
inspectionApplication
.
getProcessDescription
());
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/service/impl/CommonServiceImpl.java
View file @
b19eeb71
...
@@ -481,4 +481,18 @@ public class CommonServiceImpl {
...
@@ -481,4 +481,18 @@ public class CommonServiceImpl {
unitCode
=
unitCode
.
contains
(
"_"
)
?
unitCode
.
substring
(
unitCode
.
indexOf
(
"_"
)
+
1
)
:
unitCode
;
unitCode
=
unitCode
.
contains
(
"_"
)
?
unitCode
.
substring
(
unitCode
.
indexOf
(
"_"
)
+
1
)
:
unitCode
;
return
unitCode
;
return
unitCode
;
}
}
private
String
trimNull
(
String
str
)
{
return
str
==
null
?
""
:
str
.
trim
();
}
public
String
buildFullAddress
(
TzBaseEnterpriseInfo
baseEnterpriseInfo
)
{
if
(
StringUtils
.
isEmpty
(
baseEnterpriseInfo
.
getAddress
()))
{
return
trimNull
(
baseEnterpriseInfo
.
getProvince
())
+
trimNull
(
baseEnterpriseInfo
.
getCity
())
+
trimNull
(
baseEnterpriseInfo
.
getDistrict
())
+
trimNull
(
baseEnterpriseInfo
.
getStreet
())
+
trimNull
(
baseEnterpriseInfo
.
getCommunity
());
}
if
(
baseEnterpriseInfo
.
getAddress
().
contains
(
"省"
)
||
baseEnterpriseInfo
.
getAddress
().
contains
(
"市"
)
||
baseEnterpriseInfo
.
getAddress
().
contains
(
"自治区"
))
{
return
baseEnterpriseInfo
.
getAddress
();
}
return
trimNull
(
baseEnterpriseInfo
.
getProvince
())
+
trimNull
(
baseEnterpriseInfo
.
getCity
())
+
trimNull
(
baseEnterpriseInfo
.
getDistrict
())
+
trimNull
(
baseEnterpriseInfo
.
getStreet
())
+
trimNull
(
baseEnterpriseInfo
.
getCommunity
())
+
trimNull
(
baseEnterpriseInfo
.
getAddress
());
}
}
}
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