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
94fc4620
Commit
94fc4620
authored
Oct 20, 2025
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(jyjc): 报检规则4.0开发
1.开通多个机构类型时,对省内公益机构匹配资质时,限制证书类型 2.机构分类增加到证表
parent
b335b73a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
47 additions
and
23 deletions
+47
-23
BaseEnterpriseCertDto.java
...mos/boot/module/common/api/dto/BaseEnterpriseCertDto.java
+3
-0
BaseEnterpriseCert.java
...mos/boot/module/common/api/entity/BaseEnterpriseCert.java
+17
-12
RuleActionHandler.java
...n/amos/boot/module/jyjc/biz/action/RuleActionHandler.java
+26
-11
JyjcOpeningApplicationServiceImpl.java
...c/biz/service/impl/JyjcOpeningApplicationServiceImpl.java
+1
-0
No files found.
amos-boot-system-tzs/amos-boot-module-common/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/dto/BaseEnterpriseCertDto.java
View file @
94fc4620
...
@@ -65,4 +65,7 @@ public class BaseEnterpriseCertDto extends BaseDto {
...
@@ -65,4 +65,7 @@ public class BaseEnterpriseCertDto extends BaseDto {
@ApiModelProperty
(
value
=
"证的状态:报检预留字段,如启用、停用、超期等"
)
@ApiModelProperty
(
value
=
"证的状态:报检预留字段,如启用、停用、超期等"
)
private
Integer
certState
;
private
Integer
certState
;
@ApiModelProperty
(
value
=
"机构分类"
)
private
String
agencyClassify
;
}
}
amos-boot-system-tzs/amos-boot-module-common/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/entity/BaseEnterpriseCert.java
View file @
94fc4620
...
@@ -3,11 +3,10 @@ package com.yeejoin.amos.boot.module.common.api.entity;
...
@@ -3,11 +3,10 @@ package com.yeejoin.amos.boot.module.common.api.entity;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
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.entity.BaseLogicEntity
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
lombok.experimental.Accessors
;
import
java.util.Date
;
import
java.util.Date
;
/**
/**
...
@@ -27,61 +26,61 @@ public class BaseEnterpriseCert extends BaseEntity {
...
@@ -27,61 +26,61 @@ public class BaseEnterpriseCert extends BaseEntity {
/**
/**
* 单位编码-不带证件类型的,来源tz_base_enterprise_info的use_unit_code
* 单位编码-不带证件类型的,来源tz_base_enterprise_info的use_unit_code
*/
*/
@TableField
(
"unit_code"
)
@TableField
(
"unit_code"
)
private
String
unitCode
;
private
String
unitCode
;
/**
/**
* 证书类型
* 证书类型
*/
*/
@TableField
(
"cert_type"
)
@TableField
(
"cert_type"
)
private
String
certType
;
private
String
certType
;
/**
/**
* 证书类型code
* 证书类型code
*/
*/
@TableField
(
"cert_type_code"
)
@TableField
(
"cert_type_code"
)
private
String
certTypeCode
;
private
String
certTypeCode
;
/**
/**
* 证书编号(核准证编号)
* 证书编号(核准证编号)
*/
*/
@TableField
(
"cert_no"
)
@TableField
(
"cert_no"
)
private
String
certNo
;
private
String
certNo
;
/**
/**
* 有效期至
* 有效期至
*/
*/
@TableField
(
"expiry_date"
)
@TableField
(
"expiry_date"
)
private
Date
expiryDate
;
private
Date
expiryDate
;
/**
/**
* 发证日期
* 发证日期
*/
*/
@TableField
(
"issue_date"
)
@TableField
(
"issue_date"
)
private
Date
issueDate
;
private
Date
issueDate
;
/**
/**
* 发证机关名称
* 发证机关名称
*/
*/
@TableField
(
"approved_organ"
)
@TableField
(
"approved_organ"
)
private
String
approvedOrgan
;
private
String
approvedOrgan
;
/**
/**
* 发证机关code
* 发证机关code
*/
*/
@TableField
(
"approved_organ_code"
)
@TableField
(
"approved_organ_code"
)
private
String
approvedOrganCode
;
private
String
approvedOrganCode
;
/**
/**
* 企业资质证书照片
* 企业资质证书照片
*/
*/
@TableField
(
"qualification_certificate_attachment"
)
@TableField
(
"qualification_certificate_attachment"
)
private
String
qualificationCertificateAttachment
;
private
String
qualificationCertificateAttachment
;
/**
/**
* 备注
* 备注
*/
*/
@TableField
(
"remark"
)
@TableField
(
"remark"
)
private
String
remark
;
private
String
remark
;
/**
/**
...
@@ -102,4 +101,10 @@ public class BaseEnterpriseCert extends BaseEntity {
...
@@ -102,4 +101,10 @@ public class BaseEnterpriseCert extends BaseEntity {
*/
*/
@TableField
(
"cert_state"
)
@TableField
(
"cert_state"
)
private
Integer
certState
;
private
Integer
certState
;
/**
* 机构分类
*/
@TableField
(
value
=
"agency_classify"
)
private
String
agencyClassify
;
}
}
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 @
94fc4620
...
@@ -84,7 +84,7 @@ public class RuleActionHandler {
...
@@ -84,7 +84,7 @@ public class RuleActionHandler {
}
}
redisUtils
.
set
(
this
.
buildRedisDataKey
(
"firstInspectionOrgMatchAction2"
,
inspectionEquipInfo
.
getUuid
()),
inspectionEquipInfo
.
getUuid
(),
3600
);
redisUtils
.
set
(
this
.
buildRedisDataKey
(
"firstInspectionOrgMatchAction2"
,
inspectionEquipInfo
.
getUuid
()),
inspectionEquipInfo
.
getUuid
(),
3600
);
// 1.获取所有的符合资质条件的单位许可信息
// 1.获取所有的符合资质条件的单位许可信息
List
<
TzBaseUnitLicence
>
unitLicenceList
=
getBaseUnitLicenceList
(
itemCode
,
isMatchItem
,
orgType
);
List
<
TzBaseUnitLicence
>
unitLicenceList
=
getBaseUnitLicenceList
(
itemCode
,
isMatchItem
,
orgType
,
inspectionCompanyType
);
// 2.匹配过滤机构信息,区分检验还是检测
// 2.匹配过滤机构信息,区分检验还是检测
List
<
TzBaseEnterpriseInfoDto
>
tzBaseEnterpriseInfoList
=
getInspectionUnitListForFirstCommit2
(
isMatchItem
,
unitLicenceList
,
isMatchArea
,
inspectionEquipInfo
,
orgType
,
defaultInspectionCode
,
legalInspectionCodes
,
isMustAccept
,
inspectionCompanyType
);
List
<
TzBaseEnterpriseInfoDto
>
tzBaseEnterpriseInfoList
=
getInspectionUnitListForFirstCommit2
(
isMatchItem
,
unitLicenceList
,
isMatchArea
,
inspectionEquipInfo
,
orgType
,
defaultInspectionCode
,
legalInspectionCodes
,
isMustAccept
,
inspectionCompanyType
);
// 3.数据去重按照use_code
// 3.数据去重按照use_code
...
@@ -143,7 +143,7 @@ public class RuleActionHandler {
...
@@ -143,7 +143,7 @@ public class RuleActionHandler {
InspectionEquipInfo
inspectionEquipInfo
=
(
InspectionEquipInfo
)
bizObj
;
InspectionEquipInfo
inspectionEquipInfo
=
(
InspectionEquipInfo
)
bizObj
;
try
{
try
{
// 1.获取所有的符合资质条件的单位许可信息
// 1.获取所有的符合资质条件的单位许可信息
List
<
TzBaseUnitLicence
>
unitLicenceList
=
getBaseUnitLicenceList
(
itemCode
,
isMatchItem
,
orgType
);
List
<
TzBaseUnitLicence
>
unitLicenceList
=
getBaseUnitLicenceList
(
itemCode
,
isMatchItem
,
orgType
,
inspectionCompanyType
);
// 2.匹配过滤机构信息,默认检验机构(目前检测没配置规则,后续检测也需要配置规则时,需要规则那回调方法新增参数,区分检验还是检测)
// 2.匹配过滤机构信息,默认检验机构(目前检测没配置规则,后续检测也需要配置规则时,需要规则那回调方法新增参数,区分检验还是检测)
List
<
TzBaseEnterpriseInfoDto
>
tzBaseEnterpriseInfoList
=
getInspectionUnitListForNoAccept2
(
isMatchItem
,
unitLicenceList
,
isMatchArea
,
inspectionEquipInfo
,
orgType
,
defaultInspectionCode
,
legalInspectionCodes
,
inspectionCompanyType
,
isMustAccept
);
List
<
TzBaseEnterpriseInfoDto
>
tzBaseEnterpriseInfoList
=
getInspectionUnitListForNoAccept2
(
isMatchItem
,
unitLicenceList
,
isMatchArea
,
inspectionEquipInfo
,
orgType
,
defaultInspectionCode
,
legalInspectionCodes
,
inspectionCompanyType
,
isMustAccept
);
// 3.去掉已经不予受理的单位,报检时该单位不能再进行接收报检信息(列表不显示)
// 3.去掉已经不予受理的单位,报检时该单位不能再进行接收报检信息(列表不显示)
...
@@ -174,7 +174,7 @@ public class RuleActionHandler {
...
@@ -174,7 +174,7 @@ public class RuleActionHandler {
}
}
private
List
<
TzBaseUnitLicence
>
getBaseUnitLicenceList
(
String
itemCode
,
Boolean
isMatchItem
,
String
orgType
)
{
private
List
<
TzBaseUnitLicence
>
getBaseUnitLicenceList
(
String
itemCode
,
Boolean
isMatchItem
,
String
orgType
,
String
filterCompanyType
)
{
List
<
TzBaseUnitLicence
>
tzBaseUnitLicences
=
new
ArrayList
<>();
List
<
TzBaseUnitLicence
>
tzBaseUnitLicences
=
new
ArrayList
<>();
if
(
isMatchItem
&&
StringUtils
.
isNotEmpty
(
itemCode
))
{
if
(
isMatchItem
&&
StringUtils
.
isNotEmpty
(
itemCode
))
{
tzBaseUnitLicences
=
baseUnitLicenceMapper
.
selectList
(
new
LambdaQueryWrapper
<
TzBaseUnitLicence
>()
tzBaseUnitLicences
=
baseUnitLicenceMapper
.
selectList
(
new
LambdaQueryWrapper
<
TzBaseUnitLicence
>()
...
@@ -188,14 +188,29 @@ public class RuleActionHandler {
...
@@ -188,14 +188,29 @@ public class RuleActionHandler {
}
}
if
(!
tzBaseUnitLicences
.
isEmpty
())
{
if
(!
tzBaseUnitLicences
.
isEmpty
())
{
// 匹配单位类型的证书
// 匹配单位类型的证书
List
<
String
>
certSeqs
=
baseEnterpriseCertService
.
list
(
new
LambdaQueryWrapper
<
BaseEnterpriseCert
>()
InspectionCompanyType
inspectionCompanyType
=
InspectionCompanyType
.
getByCode
(
filterCompanyType
);
.
in
(
com
.
yeejoin
.
amos
.
boot
.
biz
.
common
.
entity
.
BaseEntity
::
getSequenceNbr
,
tzBaseUnitLicences
.
stream
().
map
(
TzBaseUnitLicence:
:
getEnterpriseCertSeq
).
collect
(
Collectors
.
toList
()))
List
<
String
>
certSeqs
;
.
eq
(
BaseEnterpriseCert:
:
getUnitType
,
OpenBizTypeEnumV2
.
getOneByCode
(
orgType
).
getUnitType
())
if
(
inspectionCompanyType
==
InspectionCompanyType
.
LEGAL
)
{
// 省内公益逻辑
.
eq
(
com
.
yeejoin
.
amos
.
boot
.
biz
.
common
.
entity
.
BaseEntity
::
getIsDelete
,
false
)
certSeqs
=
baseEnterpriseCertService
.
list
(
new
LambdaQueryWrapper
<
BaseEnterpriseCert
>()
.
select
(
com
.
yeejoin
.
amos
.
boot
.
biz
.
common
.
entity
.
BaseEntity
::
getSequenceNbr
))
.
in
(
com
.
yeejoin
.
amos
.
boot
.
biz
.
common
.
entity
.
BaseEntity
::
getSequenceNbr
,
tzBaseUnitLicences
.
stream
().
map
(
TzBaseUnitLicence:
:
getEnterpriseCertSeq
).
collect
(
Collectors
.
toList
()))
.
stream
().
map
(
e
->
String
.
valueOf
(
e
.
getSequenceNbr
())).
collect
(
Collectors
.
toList
());
.
eq
(
BaseEnterpriseCert:
:
getUnitType
,
OpenBizTypeEnumV2
.
getOneByCode
(
orgType
).
getUnitType
())
// 返回符合核准项目且开通的项目且开通的单位类型能匹配上的资质
.
eq
(
com
.
yeejoin
.
amos
.
boot
.
biz
.
common
.
entity
.
BaseEntity
::
getIsDelete
,
false
)
tzBaseUnitLicences
=
tzBaseUnitLicences
.
stream
().
filter
(
l
->
certSeqs
.
contains
(
l
.
getEnterpriseCertSeq
())).
collect
(
Collectors
.
toList
());
// 省内匹配时需要匹配证书也是省内开通的
.
eq
(
BaseEnterpriseCert:
:
getAgencyClassify
,
JyAgencyClassifyEnum
.
SBGY
.
getCode
())
.
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
());
}
else
{
// 其他逻辑
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
());
}
}
}
return
tzBaseUnitLicences
;
return
tzBaseUnitLicences
;
}
}
...
...
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 @
94fc4620
...
@@ -913,6 +913,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
...
@@ -913,6 +913,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
cert
.
setRecUserId
(
RequestContext
.
getExeUserId
());
cert
.
setRecUserId
(
RequestContext
.
getExeUserId
());
cert
.
setRecDate
(
new
Date
());
cert
.
setRecDate
(
new
Date
());
cert
.
setCertState
(
LicenceStateEnum
.
enabled
.
getValue
());
cert
.
setCertState
(
LicenceStateEnum
.
enabled
.
getValue
());
cert
.
setAgencyClassify
(
jyjcOpeningApplication
.
getAgencyClassify
());
Optional
.
ofNullable
(
e
.
getItemCodes
())
Optional
.
ofNullable
(
e
.
getItemCodes
())
.
orElseGet
(
Collections:
:
emptyList
)
.
orElseGet
(
Collections:
:
emptyList
)
.
stream
()
.
stream
()
...
...
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