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
f3923df0
Commit
f3923df0
authored
Sep 05, 2025
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refeat(jyjc): 报检规则4.0开发
1.报检规则推送规则
parent
b27488e8
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
33 additions
and
12 deletions
+33
-12
InspectionEquipInfoModel.java
.../boot/module/jyjc/api/model/InspectionEquipInfoModel.java
+5
-2
JyjcOpeningApplicationMapper.xml
...rc/main/resources/mapper/JyjcOpeningApplicationMapper.xml
+1
-1
RuleActionHandler.java
...n/amos/boot/module/jyjc/biz/action/RuleActionHandler.java
+9
-2
EnableRuleDataPreparationService.java
.../event/rule/service/EnableRuleDataPreparationService.java
+16
-3
JyjcOpeningApplicationServiceImpl.java
...c/biz/service/impl/JyjcOpeningApplicationServiceImpl.java
+2
-4
No files found.
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/java/com/yeejoin/amos/boot/module/jyjc/api/model/InspectionEquipInfoModel.java
View file @
f3923df0
...
@@ -41,8 +41,11 @@ public class InspectionEquipInfoModel implements Serializable {
...
@@ -41,8 +41,11 @@ public class InspectionEquipInfoModel implements Serializable {
@ApiModelProperty
(
value
=
"主题,无需上送,由topic解析出来"
)
@ApiModelProperty
(
value
=
"主题,无需上送,由topic解析出来"
)
private
String
componentKey
;
private
String
componentKey
;
@ApiModelProperty
(
value
=
"申请报检单位信用代码"
)
@ApiModelProperty
(
value
=
"登录人token"
)
private
String
unitCode
;
private
String
token
;
@ApiModelProperty
(
value
=
"登录人userId"
)
private
String
userId
;
@ApiModelProperty
(
value
=
"设备分类,大型游乐设施使用"
)
@ApiModelProperty
(
value
=
"设备分类,大型游乐设施使用"
)
private
String
equipTag1
;
private
String
equipTag1
;
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/resources/mapper/JyjcOpeningApplicationMapper.xml
View file @
f3923df0
...
@@ -137,7 +137,7 @@
...
@@ -137,7 +137,7 @@
FROM "tz_jyjc_opening_application"
FROM "tz_jyjc_opening_application"
where
where
status = '已完成'
status = '已完成'
and agency
C
lassify in
and agency
_c
lassify in
<foreach
collection=
"agencyClassifies"
separator=
","
open=
"("
close=
")"
item=
"agencyClassify"
>
<foreach
collection=
"agencyClassifies"
separator=
","
open=
"("
close=
")"
item=
"agencyClassify"
>
#{agencyClassify}
#{agencyClassify}
</foreach>
</foreach>
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/action/RuleActionHandler.java
View file @
f3923df0
...
@@ -141,7 +141,7 @@ public class RuleActionHandler {
...
@@ -141,7 +141,7 @@ public class RuleActionHandler {
// 本次报检已经不予受理的单位code
// 本次报检已经不予受理的单位code
List
<
String
>
noAcceptUnitCodes
=
getNoAcceptHistoryUnit
(
inspectionEquipInfo
);
List
<
String
>
noAcceptUnitCodes
=
getNoAcceptHistoryUnit
(
inspectionEquipInfo
);
// 不予受理的单位去掉,目的下次不能在进行选择
// 不予受理的单位去掉,目的下次不能在进行选择
matchEnterpriseInfos
.
removeIf
(
e
->
!
noAcceptUnitCodes
.
contains
(
e
.
getUseCode
()));
matchEnterpriseInfos
.
removeIf
(
e
->
noAcceptUnitCodes
.
contains
(
e
.
getUseCode
()));
}
}
...
@@ -162,11 +162,18 @@ public class RuleActionHandler {
...
@@ -162,11 +162,18 @@ public class RuleActionHandler {
.
eq
(
TzBaseUnitLicence:
:
getLicenceType
,
LicenceTypeEnum
.
JY_JC
.
getCode
())
.
eq
(
TzBaseUnitLicence:
:
getLicenceType
,
LicenceTypeEnum
.
JY_JC
.
getCode
())
.
in
(
TzBaseUnitLicence:
:
getItemCode
,
Arrays
.
asList
(
itemCode
.
split
(
","
)))
.
in
(
TzBaseUnitLicence:
:
getItemCode
,
Arrays
.
asList
(
itemCode
.
split
(
","
)))
.
ge
(
TzBaseUnitLicence:
:
getExpiryDate
,
LocalDate
.
now
())
.
ge
(
TzBaseUnitLicence:
:
getExpiryDate
,
LocalDate
.
now
())
.
eq
(
TzBaseUnitLicence:
:
getIsDelete
,
false
)
.
isNotNull
(
TzBaseUnitLicence:
:
getEnterpriseCertSeq
)
.
eq
(
TzBaseUnitLicence:
:
getLicenceState
,
LicenceStateEnum
.
enabled
.
getValue
()));
.
eq
(
TzBaseUnitLicence:
:
getLicenceState
,
LicenceStateEnum
.
enabled
.
getValue
()));
}
}
if
(!
tzBaseUnitLicences
.
isEmpty
())
{
if
(!
tzBaseUnitLicences
.
isEmpty
())
{
// 匹配单位类型的证书
// 匹配单位类型的证书
List
<
String
>
certSeqs
=
baseEnterpriseCertService
.
list
(
new
LambdaQueryWrapper
<
BaseEnterpriseCert
>().
in
(
com
.
yeejoin
.
amos
.
boot
.
biz
.
common
.
entity
.
BaseEntity
::
getSequenceNbr
,
tzBaseUnitLicences
.
stream
().
map
(
TzBaseUnitLicence:
:
getEnterpriseCertSeq
).
collect
(
Collectors
.
toList
())).
eq
(
BaseEnterpriseCert:
:
getUnitType
,
orgType
).
select
(
com
.
yeejoin
.
amos
.
boot
.
biz
.
common
.
entity
.
BaseEntity
::
getSequenceNbr
)).
stream
().
map
(
e
->
String
.
valueOf
(
e
.
getSequenceNbr
())).
collect
(
Collectors
.
toList
());
List
<
String
>
certSeqs
=
baseEnterpriseCertService
.
list
(
new
LambdaQueryWrapper
<
BaseEnterpriseCert
>()
.
in
(
com
.
yeejoin
.
amos
.
boot
.
biz
.
common
.
entity
.
BaseEntity
::
getSequenceNbr
,
tzBaseUnitLicences
.
stream
().
map
(
TzBaseUnitLicence:
:
getEnterpriseCertSeq
).
collect
(
Collectors
.
toList
()))
.
eq
(
BaseEnterpriseCert:
:
getUnitType
,
OpenBizTypeEnumV2
.
getOneByCode
(
orgType
).
getUnitType
())
.
eq
(
com
.
yeejoin
.
amos
.
boot
.
biz
.
common
.
entity
.
BaseEntity
::
getIsDelete
,
false
)
.
select
(
com
.
yeejoin
.
amos
.
boot
.
biz
.
common
.
entity
.
BaseEntity
::
getSequenceNbr
))
.
stream
().
map
(
e
->
String
.
valueOf
(
e
.
getSequenceNbr
())).
collect
(
Collectors
.
toList
());
// 返回符合核准项目且开通的项目且开通的单位类型能匹配上的资质
// 返回符合核准项目且开通的项目且开通的单位类型能匹配上的资质
tzBaseUnitLicences
=
tzBaseUnitLicences
.
stream
().
filter
(
l
->
certSeqs
.
contains
(
l
.
getEnterpriseCertSeq
())).
collect
(
Collectors
.
toList
());
tzBaseUnitLicences
=
tzBaseUnitLicences
.
stream
().
filter
(
l
->
certSeqs
.
contains
(
l
.
getEnterpriseCertSeq
())).
collect
(
Collectors
.
toList
());
}
}
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/event/rule/service/EnableRuleDataPreparationService.java
View file @
f3923df0
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
biz
.
event
.
rule
.
service
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
biz
.
event
.
rule
.
service
;
import
com.alibaba.fastjson.JSON
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.SnowflakeIdUtil
;
import
com.yeejoin.amos.boot.biz.common.utils.SnowflakeIdUtil
;
import
com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcInspectionApplicationNoAcceptLog
;
import
com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcInspectionApplicationNoAcceptLog
;
import
com.yeejoin.amos.boot.module.jyjc.api.enums.JYJCTypeEnum
;
import
com.yeejoin.amos.boot.module.jyjc.api.enums.JYJCTypeEnum
;
...
@@ -64,10 +68,18 @@ public class EnableRuleDataPreparationService {
...
@@ -64,10 +68,18 @@ public class EnableRuleDataPreparationService {
private
final
TzBaseEnterpriseInfoMapper
baseEnterpriseInfoMapper
;
private
final
TzBaseEnterpriseInfoMapper
baseEnterpriseInfoMapper
;
private
final
RedisUtils
redisUtils
;
@Value
(
"${rule.data.preparation.thread.number:2}"
)
@Value
(
"${rule.data.preparation.thread.number:2}"
)
private
int
threadNumber
;
private
int
threadNumber
;
/**
/**
* 默认的企业标签:管控等级
*/
@Value
(
"${enterprise.regulatoryLabels.default.value:三级管控}"
)
private
String
defaultRegulatoryLabels
;
/**
* 压力类设备种类
* 压力类设备种类
*/
*/
private
static
final
List
<
String
>
PRESSURE_EQU_LIST
=
Arrays
.
asList
(
"8000"
,
"1000"
,
"2000"
);
private
static
final
List
<
String
>
PRESSURE_EQU_LIST
=
Arrays
.
asList
(
"8000"
,
"1000"
,
"2000"
);
...
@@ -75,7 +87,7 @@ public class EnableRuleDataPreparationService {
...
@@ -75,7 +87,7 @@ public class EnableRuleDataPreparationService {
/**
/**
* 需要技术参数匹配报检的设备类别-目的提高执行速度
* 需要技术参数匹配报检的设备类别-目的提高执行速度
*/
*/
private
static
final
List
<
String
>
NEED_TECH_PARAM_EQU_CATEGORY
=
Arrays
.
asList
(
"1100"
,
"2
100"
);
private
static
final
List
<
String
>
NEED_TECH_PARAM_EQU_CATEGORY
=
Collections
.
singletonList
(
"1
100"
);
public
void
onApplicationEvent
(
InspectionOrgRefreshEvent
event
)
{
public
void
onApplicationEvent
(
InspectionOrgRefreshEvent
event
)
{
...
@@ -139,9 +151,10 @@ public class EnableRuleDataPreparationService {
...
@@ -139,9 +151,10 @@ public class EnableRuleDataPreparationService {
inspectionEquipInfo
.
setIsBallValve
(!
"0"
.
equals
(
registrationInfo
.
getWhetherSphericalTank
()));
inspectionEquipInfo
.
setIsBallValve
(!
"0"
.
equals
(
registrationInfo
.
getWhetherSphericalTank
()));
}
}
if
(
PRESSURE_EQU_LIST
.
contains
(
equipInfoModel
.
getEquList
()))
{
if
(
PRESSURE_EQU_LIST
.
contains
(
equipInfoModel
.
getEquList
()))
{
String
useCode
=
equipInfoModel
.
getUnitCode
();
ReginParams
reginParams
=
JSON
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
equipInfoModel
.
getUserId
(),
equipInfoModel
.
getToken
())).
toString
(),
ReginParams
.
class
);
String
useCode
=
reginParams
.
getCompany
().
getCompanyCode
();
TzBaseEnterpriseInfo
enterpriseInfo
=
baseEnterpriseInfoMapper
.
selectOne
(
new
LambdaQueryWrapper
<
TzBaseEnterpriseInfo
>().
eq
(
TzBaseEnterpriseInfo:
:
getUseCode
,
useCode
).
select
(
BaseEntity:
:
getSequenceNbr
,
TzBaseEnterpriseInfo:
:
getRegulatoryLabels
));
TzBaseEnterpriseInfo
enterpriseInfo
=
baseEnterpriseInfoMapper
.
selectOne
(
new
LambdaQueryWrapper
<
TzBaseEnterpriseInfo
>().
eq
(
TzBaseEnterpriseInfo:
:
getUseCode
,
useCode
).
select
(
BaseEntity:
:
getSequenceNbr
,
TzBaseEnterpriseInfo:
:
getRegulatoryLabels
));
inspectionEquipInfo
.
setManageLevel
(
enterpriseInfo
.
getRegulatoryLabels
()
);
inspectionEquipInfo
.
setManageLevel
(
StringUtils
.
isNotBlank
(
enterpriseInfo
.
getRegulatoryLabels
())
?
enterpriseInfo
.
getRegulatoryLabels
()
:
defaultRegulatoryLabels
);
}
}
inspectionEquipInfo
.
setAreaCode
(
ruleCommonService
.
getArea
(
equipInfoModel
.
getCity
(),
equipInfoModel
.
getCounty
()));
inspectionEquipInfo
.
setAreaCode
(
ruleCommonService
.
getArea
(
equipInfoModel
.
getCity
(),
equipInfoModel
.
getCounty
()));
inspectionEquipInfo
.
setDistrictOrCountyCode
(
equipInfoModel
.
getCounty
());
inspectionEquipInfo
.
setDistrictOrCountyCode
(
equipInfoModel
.
getCounty
());
...
...
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/JyjcOpeningApplicationServiceImpl.java
View file @
f3923df0
...
@@ -33,10 +33,7 @@ import com.yeejoin.amos.boot.module.jyjc.api.common.BizCommonConstant;
...
@@ -33,10 +33,7 @@ import com.yeejoin.amos.boot.module.jyjc.api.common.BizCommonConstant;
import
com.yeejoin.amos.boot.module.jyjc.api.dto.InspectionCompanyPublicityDto
;
import
com.yeejoin.amos.boot.module.jyjc.api.dto.InspectionCompanyPublicityDto
;
import
com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcInspectionHistory
;
import
com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcInspectionHistory
;
import
com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcOpeningApplication
;
import
com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcOpeningApplication
;
import
com.yeejoin.amos.boot.module.jyjc.api.enums.BizTypeEnum
;
import
com.yeejoin.amos.boot.module.jyjc.api.enums.*
;
import
com.yeejoin.amos.boot.module.jyjc.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jyjc.api.enums.OpenBizTypeEnum
;
import
com.yeejoin.amos.boot.module.jyjc.api.enums.OpenBizTypeEnumV2
;
import
com.yeejoin.amos.boot.module.jyjc.api.mapper.JyjcOpeningApplicationMapper
;
import
com.yeejoin.amos.boot.module.jyjc.api.mapper.JyjcOpeningApplicationMapper
;
import
com.yeejoin.amos.boot.module.jyjc.api.model.*
;
import
com.yeejoin.amos.boot.module.jyjc.api.model.*
;
import
com.yeejoin.amos.boot.module.jyjc.api.service.IJyjcOpeningApplicationService
;
import
com.yeejoin.amos.boot.module.jyjc.api.service.IJyjcOpeningApplicationService
;
...
@@ -933,6 +930,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
...
@@ -933,6 +930,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
licence
.
setAgencyTypeName
(
commonService
.
getDictName
(
Arrays
.
asList
(
"1233-1"
,
"1233-2"
),
licence
.
getAgencyType
()));
licence
.
setAgencyTypeName
(
commonService
.
getDictName
(
Arrays
.
asList
(
"1233-1"
,
"1233-2"
),
licence
.
getAgencyType
()));
licence
.
setUnitCode
(
jyjcOpeningApplication
.
getUnitCode
());
licence
.
setUnitCode
(
jyjcOpeningApplication
.
getUnitCode
());
licence
.
setUnitName
(
jyjcOpeningApplication
.
getUnitCodeName
());
licence
.
setUnitName
(
jyjcOpeningApplication
.
getUnitCodeName
());
licence
.
setLicenceType
(
LicenceTypeEnum
.
JY_JC
.
getCode
());
licence
.
setEnterpriseCertSeq
(
cert
.
getSequenceNbr
().
toString
());
licence
.
setEnterpriseCertSeq
(
cert
.
getSequenceNbr
().
toString
());
licences
.
add
(
licence
);
licences
.
add
(
licence
);
});
});
...
...
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