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
6401acff
Commit
6401acff
authored
Nov 05, 2025
by
tianbo
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop_tzs_bugfix' into develop_tzs_register
parents
3ac60aac
146ad182
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
283 additions
and
234 deletions
+283
-234
JgMaintenanceContractMapper.xml
...src/main/resources/mapper/JgMaintenanceContractMapper.xml
+9
-1
CommonEquipDataProcessService.java
...biz/edit/process/equip/CommonEquipDataProcessService.java
+1
-1
IdxBizJgProjectContraptionServiceImplService.java
...ce/impl/IdxBizJgProjectContraptionServiceImplService.java
+191
-174
JgMaintenanceContractServiceImpl.java
...jg/biz/service/impl/JgMaintenanceContractServiceImpl.java
+48
-35
SafetyProblemTracingServiceImpl.java
.../jg/biz/service/impl/SafetyProblemTracingServiceImpl.java
+1
-1
ComprehensiveStatisticalAnalysisServiceImpl.java
...ice/impl/ComprehensiveStatisticalAnalysisServiceImpl.java
+27
-22
TzBaseEnterpriseInfoServiceImpl.java
...tcm/biz/service/impl/TzBaseEnterpriseInfoServiceImpl.java
+6
-0
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgMaintenanceContractMapper.xml
View file @
6401acff
...
@@ -50,7 +50,15 @@
...
@@ -50,7 +50,15 @@
FROM tzs_jg_maintenance_contract_eq ede
FROM tzs_jg_maintenance_contract_eq ede
LEFT JOIN idx_biz_jg_supervision_info si ON si."RECORD" = ede.equ_id
LEFT JOIN idx_biz_jg_supervision_info si ON si."RECORD" = ede.equ_id
WHERE ede.equip_transfer_id = tjmc.sequence_nbr
WHERE ede.equip_transfer_id = tjmc.sequence_nbr
) AS orgBranchCodes
) AS orgBranchCodes,
(
SELECT mri.ME_MASTER1_PHONE AS phone
FROM tzs_jg_maintenance_contract_eq ede
LEFT JOIN idx_biz_jg_maintenance_record_info mri
ON mri."RECORD" = ede.equ_id
WHERE ede.equip_transfer_id = tjmc.sequence_nbr
order by mri.REC_DATE limit 1
) AS phone
FROM
FROM
tzs_jg_maintenance_contract tjmc
tzs_jg_maintenance_contract tjmc
</sql>
</sql>
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/edit/process/equip/CommonEquipDataProcessService.java
View file @
6401acff
...
@@ -824,7 +824,7 @@ public class CommonEquipDataProcessService {
...
@@ -824,7 +824,7 @@ public class CommonEquipDataProcessService {
// 设备来源,前端无法判断,故后端进行判断,分为新设备(new)、历史有证设备(his)、历史无证设备(black)
// 设备来源,前端无法判断,故后端进行判断,分为新设备(new)、历史有证设备(his)、历史无证设备(black)
result
.
put
(
"dataSourceClassify"
,
this
.
genDataSource
(
useInfo
.
getDataSource
()));
result
.
put
(
"dataSourceClassify"
,
this
.
genDataSource
(
useInfo
.
getDataSource
()));
// 获取已登记设备的登记证对应接收机构
// 获取已登记设备的登记证对应接收机构
if
(
registerInfo
.
getUseOrgCode
()
!=
null
)
{
if
(
!
ValidationUtil
.
isEmpty
(
registerInfo
.
getUseOrgCode
())
)
{
JgUseRegistrationManage
jgUseRegistrationManage
=
jgUseRegistrationManageService
.
lambdaQuery
()
JgUseRegistrationManage
jgUseRegistrationManage
=
jgUseRegistrationManageService
.
lambdaQuery
()
.
eq
(
JgUseRegistrationManage:
:
getUseRegistrationCode
,
registerInfo
.
getUseOrgCode
())
.
eq
(
JgUseRegistrationManage:
:
getUseRegistrationCode
,
registerInfo
.
getUseOrgCode
())
.
select
(
JgUseRegistrationManage:
:
getSequenceNbr
,
JgUseRegistrationManage:
:
getReceiveCompanyCode
).
one
();
.
select
(
JgUseRegistrationManage:
:
getSequenceNbr
,
JgUseRegistrationManage:
:
getReceiveCompanyCode
).
one
();
...
...
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/IdxBizJgProjectContraptionServiceImplService.java
View file @
6401acff
...
@@ -252,182 +252,199 @@ public class IdxBizJgProjectContraptionServiceImplService extends BaseEntityServ
...
@@ -252,182 +252,199 @@ public class IdxBizJgProjectContraptionServiceImplService extends BaseEntityServ
*/
*/
@Override
@Override
public
IPage
<
IdxBizJgProjectContraption
>
proConPageByParams
(
int
current
,
int
size
,
String
sort
,
Map
<
String
,
String
>
params
,
ReginParams
reginParams
)
{
public
IPage
<
IdxBizJgProjectContraption
>
proConPageByParams
(
int
current
,
int
size
,
String
sort
,
Map
<
String
,
String
>
params
,
ReginParams
reginParams
)
{
Page
<
IdxBizJgProjectContraption
>
page
=
new
Page
<>();
try
{
page
.
setCurrent
(
current
);
Page
<
IdxBizJgProjectContraption
>
page
=
new
Page
<>();
page
.
setSize
(
size
);
page
.
setCurrent
(
current
);
CompanyBo
company
=
reginParams
.
getCompany
();
page
.
setSize
(
size
);
String
companyType
=
company
.
getCompanyType
();
CompanyBo
company
=
reginParams
.
getCompany
();
String
companyCode
=
company
.
getCompanyCode
();
String
companyType
=
company
.
getCompanyType
();
SortVo
sortVo
=
commonService
.
sortFieldConversion
(
sort
);
String
companyCode
=
company
.
getCompanyCode
();
// 是否是否纳管:true - 已纳管 false-未纳管
SortVo
sortVo
=
commonService
.
sortFieldConversion
(
sort
);
boolean
isIntoManagement
=
Boolean
.
parseBoolean
(
params
.
get
(
IS_INTO_MANAGEMENT
));
// 是否是否纳管:true - 已纳管 false-未纳管
// 使用登记编号
boolean
isIntoManagement
=
Boolean
.
parseBoolean
(
params
.
get
(
IS_INTO_MANAGEMENT
));
String
useRegistrationCode
=
params
.
get
(
USE_REGISTRATION_CODE
);
// 使用登记编号
// 使用登记编号是否为空 true/false
String
useRegistrationCode
=
params
.
get
(
USE_REGISTRATION_CODE
);
String
regCodeIsNull
=
params
.
get
(
REG_CODE_IS_NULL
);
// 使用登记编号是否为空 true/false
// 工程装置名称
String
regCodeIsNull
=
params
.
get
(
REG_CODE_IS_NULL
);
String
projectContraption
=
params
.
get
(
PROJECT_CONTRAPTION
);
// 工程装置名称
// 工程装置编号
String
projectContraption
=
params
.
get
(
PROJECT_CONTRAPTION
);
String
projectContraptionNo
=
params
.
get
(
PROJECT_CONTRAPTION_NO
);
// 工程装置编号
//属地监管部门code
String
projectContraptionNo
=
params
.
get
(
PROJECT_CONTRAPTION_NO
);
String
orgBranchCode
=
params
.
get
(
ORG_BRANCH_CODE
);
//属地监管部门code
String
dataSource
=
params
.
get
(
DATA_SOURCE
);
String
orgBranchCode
=
params
.
get
(
ORG_BRANCH_CODE
);
// 设备类别code
String
dataSource
=
params
.
get
(
DATA_SOURCE
);
String
equCategory
=
params
.
get
(
EQU_CATEGORY
);
// 设备类别code
// 设备类品种code
String
equCategory
=
params
.
get
(
EQU_CATEGORY
);
String
equDefine
=
params
.
get
(
EQU_DEFINE
);
// 设备类品种code
String
equDefine
=
params
.
get
(
EQU_DEFINE
);
String
dataQualityScore
=
params
.
get
(
DATA_QUALITY_SCORE
);
String
dataQuality
=
params
.
get
(
DATA_QUALITY
);
String
dataQualityScore
=
params
.
get
(
DATA_QUALITY_SCORE
);
// 证详情-查询标识
String
dataQuality
=
params
.
get
(
DATA_QUALITY
);
String
useRegDetail
=
params
.
get
(
"useRegDetail"
);
// 证详情-查询标识
// 登录人公司类型:企业,监管
String
useRegDetail
=
params
.
get
(
"useRegDetail"
);
String
companyLevel
=
this
.
getCompanyLevel
(
company
);
// 登录人公司类型:企业,监管
// 未在业务流程中
String
companyLevel
=
this
.
getCompanyLevel
(
company
);
boolean
isNotInBusiness
=
!
ValidationUtil
.
isEmpty
(
params
.
get
(
"isNotInBusiness"
))
&&
params
.
get
(
"isNotInBusiness"
).
equals
(
"true"
);
// 未在业务流程中
// 查询在业务流程中sql
boolean
isNotInBusiness
=
!
ValidationUtil
.
isEmpty
(
params
.
get
(
"isNotInBusiness"
))
&&
params
.
get
(
"isNotInBusiness"
).
equals
(
"true"
);
String
inBusinessSQL
=
"SELECT 1 FROM tzs_jg_change_registration_reform A WHERE\n"
+
// 查询在业务流程中sql
" idx_biz_jg_project_contraption.sequence_nbr = A.\"project_contraption_id\" \n"
+
String
inBusinessSQL
=
"SELECT 1 FROM tzs_jg_change_registration_reform A WHERE\n"
+
" AND A.\"is_delete\" = 0 \n"
+
" idx_biz_jg_project_contraption.sequence_nbr = A.\"project_contraption_id\" \n"
+
" AND A.audit_status <> '使用单位待提交' \n"
+
" AND A.\"is_delete\" = 0 \n"
+
" AND A.audit_status <> '一级受理已驳回' \n"
+
" AND A.audit_status <> '使用单位待提交' \n"
+
" AND A.audit_status <> '使用单位已撤回' \n"
+
" AND A.audit_status <> '一级受理已驳回' \n"
+
" AND A.audit_status <> '已完成' \n"
+
" AND A.audit_status <> '使用单位已撤回' \n"
+
" AND A.audit_status <> '已作废' UNION ALL\n"
+
" AND A.audit_status <> '已完成' \n"
+
"SELECT 1 FROM tzs_jg_installation_notice A \n"
+
" AND A.audit_status <> '已作废' UNION ALL\n"
+
"WHERE\n"
+
"SELECT 1 FROM tzs_jg_installation_notice A \n"
+
" idx_biz_jg_project_contraption.sequence_nbr = A.\"project_contraption_id\" \n"
+
"WHERE\n"
+
" AND A.\"is_delete\" = 0 \n"
+
" idx_biz_jg_project_contraption.sequence_nbr = A.\"project_contraption_id\" \n"
+
" AND A.notice_status <> '6614' \n"
+
" AND A.\"is_delete\" = 0 \n"
+
" AND A.notice_status <> '6615' \n"
+
" AND A.notice_status <> '6614' \n"
+
" AND A.notice_status <> '6610' \n"
+
" AND A.notice_status <> '6615' \n"
+
" AND A.notice_status <> '6616' \n"
+
" AND A.notice_status <> '6610' \n"
+
" AND A.notice_status <> '6617' UNION ALL\n"
+
" AND A.notice_status <> '6616' \n"
+
"SELECT 1 FROM tzs_jg_reform_notice A \n"
+
" AND A.notice_status <> '6617' UNION ALL\n"
+
"WHERE\n"
+
"SELECT 1 FROM tzs_jg_reform_notice A \n"
+
" idx_biz_jg_project_contraption.sequence_nbr = A.\"project_contraption_id\" \n"
+
"WHERE\n"
+
" AND A.\"is_delete\" = 0 \n"
+
" idx_biz_jg_project_contraption.sequence_nbr = A.\"project_contraption_id\" \n"
+
" AND A.notice_status <> '6614' \n"
+
" AND A.\"is_delete\" = 0 \n"
+
" AND A.notice_status <> '6615' \n"
+
" AND A.notice_status <> '6614' \n"
+
" AND A.notice_status <> '6610' \n"
+
" AND A.notice_status <> '6615' \n"
+
" AND A.notice_status <> '6616' \n"
+
" AND A.notice_status <> '6610' \n"
+
" AND A.notice_status <> '6617' UNION ALL\n"
+
" AND A.notice_status <> '6616' \n"
+
"SELECT 1 FROM tzs_jg_use_registration A \n"
+
" AND A.notice_status <> '6617' UNION ALL\n"
+
"WHERE\n"
+
"SELECT 1 FROM tzs_jg_use_registration A \n"
+
" idx_biz_jg_project_contraption.sequence_nbr = A.\"project_contraption_id\" \n"
+
"WHERE\n"
+
" AND A.\"is_delete\" = 0 \n"
+
" idx_biz_jg_project_contraption.sequence_nbr = A.\"project_contraption_id\" \n"
+
" AND A.status <> '使用单位待提交' \n"
+
" AND A.\"is_delete\" = 0 \n"
+
" AND A.status <> '一级受理已驳回' \n"
+
" AND A.status <> '使用单位待提交' \n"
+
" AND A.status <> '使用单位已撤回' \n"
+
" AND A.status <> '一级受理已驳回' \n"
+
" AND A.status <> '已完成' \n"
+
" AND A.status <> '使用单位已撤回' \n"
+
" AND A.status <> '已作废'"
;
" AND A.status <> '已完成' \n"
+
//获取省
" AND A.status <> '已作废'"
;
String
province
=
params
.
get
(
"province"
);
//获取省
if
(!
StringUtils
.
isEmpty
(
province
)
&&
province
.
contains
(
"_"
)){
String
province
=
params
.
get
(
"province"
);
province
=
province
.
split
(
"_"
)[
0
];
if
(!
StringUtils
.
isEmpty
(
province
)
&&
province
.
contains
(
"_"
)){
}
province
=
province
.
split
(
"_"
)[
0
];
//获取市
}
String
city
=
params
.
get
(
"city"
);
//获取市
if
(!
StringUtils
.
isEmpty
(
city
)
&&
city
.
contains
(
"_"
)){
String
city
=
params
.
get
(
"city"
);
city
=
city
.
split
(
"_"
)[
0
];
if
(!
StringUtils
.
isEmpty
(
city
)
&&
city
.
contains
(
"_"
)){
}
city
=
city
.
split
(
"_"
)[
0
];
//获取区
}
String
county
=
params
.
get
(
"county"
);
//获取区
if
(!
StringUtils
.
isEmpty
(
county
)
&&
county
.
contains
(
"_"
)){
String
county
=
params
.
get
(
"county"
);
county
=
county
.
split
(
"_"
)[
0
];
if
(!
StringUtils
.
isEmpty
(
county
)
&&
county
.
contains
(
"_"
)){
}
county
=
county
.
split
(
"_"
)[
0
];
//获取街道
}
String
street
=
params
.
get
(
"street"
);
//获取街道
if
(!
StringUtils
.
isEmpty
(
street
)
&&
street
.
contains
(
"_"
)){
String
street
=
params
.
get
(
"street"
);
street
=
street
.
split
(
"_"
)[
0
];
if
(!
StringUtils
.
isEmpty
(
street
)
&&
street
.
contains
(
"_"
)){
}
street
=
street
.
split
(
"_"
)[
0
];
String
useUnitCreditCode
=
params
.
get
(
USE_UNIT_CREDIT_CODE
);
}
if
(!
StringUtils
.
isEmpty
(
useUnitCreditCode
)
&&
useUnitCreditCode
.
contains
(
"_"
)){
String
useUnitCreditCode
=
params
.
get
(
USE_UNIT_CREDIT_CODE
);
useUnitCreditCode
=
useUnitCreditCode
.
split
(
"_"
)[
0
];
if
(!
StringUtils
.
isEmpty
(
useUnitCreditCode
)
&&
useUnitCreditCode
.
contains
(
"_"
)){
}
useUnitCreditCode
=
useUnitCreditCode
.
split
(
"_"
)[
0
];
String
useUnitName
=
params
.
get
(
USE_UNIT_NAME
);
}
LambdaQueryChainWrapper
<
IdxBizJgProjectContraption
>
queryWrapper
=
lambdaQuery
()
String
useUnitName
=
params
.
get
(
USE_UNIT_NAME
);
// 企业按照公司类型进行过滤
LambdaQueryChainWrapper
<
IdxBizJgProjectContraption
>
queryWrapper
=
lambdaQuery
()
.
eq
(
BaseController
.
COMPANY_TYPE_COMPANY
.
equals
(
companyLevel
)
&&
CompanyTypeEnum
.
CONSTRUCTION
.
getName
().
equals
(
companyType
),
IdxBizJgProjectContraption:
:
getUscUnitCreditCode
,
companyCode
)
// 企业按照公司类型进行过滤
.
eq
(
BaseController
.
COMPANY_TYPE_COMPANY
.
equals
(
companyLevel
)
&&
CompanyTypeEnum
.
USE
.
getName
().
equals
(
companyType
),
IdxBizJgProjectContraption:
:
getUseUnitCreditCode
,
companyCode
)
.
eq
(
BaseController
.
COMPANY_TYPE_COMPANY
.
equals
(
companyLevel
)
&&
CompanyTypeEnum
.
CONSTRUCTION
.
getName
().
equals
(
companyType
),
IdxBizJgProjectContraption:
:
getUscUnitCreditCode
,
companyCode
)
.
eq
(
BaseController
.
COMPANY_TYPE_COMPANY
.
equals
(
companyLevel
)
&&
CompanyTypeEnum
.
INDIVIDUAL
.
getName
().
equals
(
companyType
),
IdxBizJgProjectContraption:
:
getUseUnitCreditCode
,
companyCode
.
split
(
"_"
).
length
>
1
?
companyCode
.
split
(
"_"
)[
1
]
:
companyCode
)
.
eq
(
BaseController
.
COMPANY_TYPE_COMPANY
.
equals
(
companyLevel
)
&&
CompanyTypeEnum
.
USE
.
getName
().
equals
(
companyType
),
IdxBizJgProjectContraption:
:
getUseUnitCreditCode
,
companyCode
)
// 监管机构按照属地监管部门orgCode进行过滤【最大数据集合】
.
eq
(
BaseController
.
COMPANY_TYPE_COMPANY
.
equals
(
companyLevel
)
&&
CompanyTypeEnum
.
INDIVIDUAL
.
getName
().
equals
(
companyType
),
IdxBizJgProjectContraption:
:
getUseUnitCreditCode
,
companyCode
.
split
(
"_"
).
length
>
1
?
companyCode
.
split
(
"_"
)[
1
]
:
companyCode
)
.
likeRight
(
ValidationUtil
.
isEmpty
(
useRegDetail
)
&&
BaseController
.
COMPANY_TYPE_SUPERVISION
.
equals
(
companyLevel
),
IdxBizJgProjectContraption:
:
getOrgCode
,
company
.
getOrgCode
())
// 监管机构按照属地监管部门orgCode进行过滤【最大数据集合】
.
eq
(!
ValidationUtil
.
isEmpty
(
params
.
get
(
IS_INTO_MANAGEMENT
)),
IdxBizJgProjectContraption:
:
getIsIntoManagement
,
isIntoManagement
)
.
likeRight
(
ValidationUtil
.
isEmpty
(
useRegDetail
)
&&
BaseController
.
COMPANY_TYPE_SUPERVISION
.
equals
(
companyLevel
),
IdxBizJgProjectContraption:
:
getOrgCode
,
company
.
getOrgCode
())
.
eq
(!
ValidationUtil
.
isEmpty
(
useRegistrationCode
),
IdxBizJgProjectContraption:
:
getUseRegistrationCode
,
useRegistrationCode
)
.
eq
(!
ValidationUtil
.
isEmpty
(
params
.
get
(
IS_INTO_MANAGEMENT
)),
IdxBizJgProjectContraption:
:
getIsIntoManagement
,
isIntoManagement
)
.
eq
(!
ValidationUtil
.
isEmpty
(
equCategory
),
IdxBizJgProjectContraption:
:
getEquCategory
,
equCategory
)
.
eq
(!
ValidationUtil
.
isEmpty
(
useRegistrationCode
),
IdxBizJgProjectContraption:
:
getUseRegistrationCode
,
useRegistrationCode
)
.
eq
(!
ValidationUtil
.
isEmpty
(
equDefine
),
IdxBizJgProjectContraption:
:
getEquDefine
,
equDefine
)
.
eq
(!
ValidationUtil
.
isEmpty
(
equCategory
),
IdxBizJgProjectContraption:
:
getEquCategory
,
equCategory
)
.
eq
(!
ValidationUtil
.
isEmpty
(
province
),
IdxBizJgProjectContraption:
:
getProvince
,
province
)
.
eq
(!
ValidationUtil
.
isEmpty
(
equDefine
),
IdxBizJgProjectContraption:
:
getEquDefine
,
equDefine
)
.
eq
(!
ValidationUtil
.
isEmpty
(
city
),
IdxBizJgProjectContraption:
:
getCity
,
city
)
.
eq
(!
ValidationUtil
.
isEmpty
(
province
),
IdxBizJgProjectContraption:
:
getProvince
,
province
)
.
eq
(!
ValidationUtil
.
isEmpty
(
county
),
IdxBizJgProjectContraption:
:
getCounty
,
county
)
.
eq
(!
ValidationUtil
.
isEmpty
(
city
),
IdxBizJgProjectContraption:
:
getCity
,
city
)
.
eq
(!
ValidationUtil
.
isEmpty
(
street
),
IdxBizJgProjectContraption:
:
getStreet
,
street
)
.
eq
(!
ValidationUtil
.
isEmpty
(
county
),
IdxBizJgProjectContraption:
:
getCounty
,
county
)
.
eq
(!
ValidationUtil
.
isEmpty
(
dataQualityScore
),
IdxBizJgProjectContraption:
:
getDataQualityScore
,
dataQualityScore
)
.
eq
(!
ValidationUtil
.
isEmpty
(
street
),
IdxBizJgProjectContraption:
:
getStreet
,
street
)
.
in
(!
ValidationUtil
.
isEmpty
(
dataQuality
),
IdxBizJgProjectContraption:
:
getDataQualityScore
,
JSON
.
parseArray
(
dataQuality
,
String
.
class
))
.
eq
(!
ValidationUtil
.
isEmpty
(
dataQualityScore
),
IdxBizJgProjectContraption:
:
getDataQualityScore
,
dataQualityScore
)
.
eq
(!
ValidationUtil
.
isEmpty
(
useUnitCreditCode
),
IdxBizJgProjectContraption:
:
getUseUnitCreditCode
,
useUnitCreditCode
)
.
in
(!
ValidationUtil
.
isEmpty
(
dataQuality
),
IdxBizJgProjectContraption:
:
getDataQualityScore
,
JSON
.
parseArray
(
dataQuality
,
String
.
class
))
.
like
(!
ValidationUtil
.
isEmpty
(
useUnitName
),
IdxBizJgProjectContraption:
:
getUseUnitName
,
useUnitName
)
.
eq
(!
ValidationUtil
.
isEmpty
(
useUnitCreditCode
),
IdxBizJgProjectContraption:
:
getUseUnitCreditCode
,
useUnitCreditCode
)
.
like
(!
ValidationUtil
.
isEmpty
(
projectContraption
),
IdxBizJgProjectContraption:
:
getProjectContraption
,
projectContraption
)
.
like
(!
ValidationUtil
.
isEmpty
(
useUnitName
),
IdxBizJgProjectContraption:
:
getUseUnitName
,
useUnitName
)
.
eq
(!
ValidationUtil
.
isEmpty
(
orgBranchCode
)
&&
BaseController
.
COMPANY_TYPE_COMPANY
.
equals
(
companyLevel
),
IdxBizJgProjectContraption:
:
getOrgCode
,
orgBranchCode
)
// 企业 等于匹配
.
like
(!
ValidationUtil
.
isEmpty
(
projectContraption
),
IdxBizJgProjectContraption:
:
getProjectContraption
,
projectContraption
)
.
likeRight
(!
ValidationUtil
.
isEmpty
(
orgBranchCode
)
&&
BaseController
.
COMPANY_TYPE_SUPERVISION
.
equals
(
companyLevel
),
IdxBizJgProjectContraption:
:
getOrgCode
,
orgBranchCode
)
// 监管 右模糊匹配
.
eq
(!
ValidationUtil
.
isEmpty
(
orgBranchCode
)
&&
BaseController
.
COMPANY_TYPE_COMPANY
.
equals
(
companyLevel
),
IdxBizJgProjectContraption:
:
getOrgCode
,
orgBranchCode
)
// 企业 等于匹配
.
like
(!
ValidationUtil
.
isEmpty
(
projectContraptionNo
),
IdxBizJgProjectContraption:
:
getProjectContraptionNo
,
projectContraptionNo
)
.
likeRight
(!
ValidationUtil
.
isEmpty
(
orgBranchCode
)
&&
BaseController
.
COMPANY_TYPE_SUPERVISION
.
equals
(
companyLevel
),
IdxBizJgProjectContraption:
:
getOrgCode
,
orgBranchCode
)
// 监管 右模糊匹配
.
and
(!
ValidationUtil
.
isEmpty
(
dataSource
),
w
->
{
.
like
(!
ValidationUtil
.
isEmpty
(
projectContraptionNo
),
IdxBizJgProjectContraption:
:
getProjectContraptionNo
,
projectContraptionNo
)
if
(
"jg"
.
equals
(
dataSource
))
{
.
and
(!
ValidationUtil
.
isEmpty
(
dataSource
),
w
->
{
w
.
likeRight
(
IdxBizJgProjectContraption:
:
getDataSource
,
"jg"
).
notLike
(
IdxBizJgProjectContraption:
:
getDataSource
,
"jg_his"
);
if
(
"jg"
.
equals
(
dataSource
))
{
}
else
if
(
"jg_his"
.
equals
(
dataSource
))
{
w
.
likeRight
(
IdxBizJgProjectContraption:
:
getDataSource
,
"jg"
).
notLike
(
IdxBizJgProjectContraption:
:
getDataSource
,
"jg_his"
);
w
.
likeRight
(
IdxBizJgProjectContraption:
:
getDataSource
,
"jg_his"
).
notLike
(
IdxBizJgProjectContraption:
:
getDataSource
,
"jg_his_black"
);
}
else
if
(
"jg_his"
.
equals
(
dataSource
))
{
}
else
if
(
"jg_his_black"
.
equals
(
dataSource
))
{
w
.
likeRight
(
IdxBizJgProjectContraption:
:
getDataSource
,
"jg_his"
).
notLike
(
IdxBizJgProjectContraption:
:
getDataSource
,
"jg_his_black"
);
w
.
eq
(
IdxBizJgProjectContraption:
:
getDataSource
,
"jg_his_black"
).
or
().
likeRight
(
IdxBizJgProjectContraption:
:
getDataSource
,
"jg_his_black_"
);
}
else
if
(
"jg_his_black"
.
equals
(
dataSource
))
{
}
else
{
w
.
eq
(
IdxBizJgProjectContraption:
:
getDataSource
,
"jg_his_black"
).
or
().
likeRight
(
IdxBizJgProjectContraption:
:
getDataSource
,
"jg_his_black_"
);
w
.
eq
(
IdxBizJgProjectContraption:
:
getDataSource
,
dataSource
);
}
else
{
}
w
.
eq
(
IdxBizJgProjectContraption:
:
getDataSource
,
dataSource
);
})
}
.
isNull
(!
ValidationUtil
.
isEmpty
(
regCodeIsNull
)
&&
Boolean
.
TRUE
.
equals
(
Boolean
.
valueOf
(
regCodeIsNull
)),
IdxBizJgProjectContraption:
:
getUseRegistrationCode
)
})
.
isNotNull
(!
ValidationUtil
.
isEmpty
(
regCodeIsNull
)
&&
Boolean
.
FALSE
.
equals
(
Boolean
.
valueOf
(
regCodeIsNull
)),
IdxBizJgProjectContraption:
:
getUseRegistrationCode
)
.
isNull
(!
ValidationUtil
.
isEmpty
(
regCodeIsNull
)
&&
Boolean
.
TRUE
.
equals
(
Boolean
.
valueOf
(
regCodeIsNull
)),
IdxBizJgProjectContraption:
:
getUseRegistrationCode
)
.
isNull
(
IdxBizJgProjectContraption:
:
getProjectContraptionParentId
)
.
isNotNull
(!
ValidationUtil
.
isEmpty
(
regCodeIsNull
)
&&
Boolean
.
FALSE
.
equals
(
Boolean
.
valueOf
(
regCodeIsNull
)),
IdxBizJgProjectContraption:
:
getUseRegistrationCode
)
.
notExists
(
isNotInBusiness
,
inBusinessSQL
);
.
isNull
(
IdxBizJgProjectContraption:
:
getProjectContraptionParentId
)
.
notExists
(
isNotInBusiness
,
inBusinessSQL
);
if
(
sortVo
!=
null
&&
"ASC"
.
equalsIgnoreCase
(
sortVo
.
getSortType
()))
{
queryWrapper
.
orderByAsc
(
resolveField
(
sortVo
.
getField
()));
if
(
sortVo
!=
null
&&
"ASC"
.
equalsIgnoreCase
(
sortVo
.
getSortType
()))
{
}
else
if
(
sortVo
!=
null
&&
"DESC"
.
equalsIgnoreCase
(
sortVo
.
getSortType
()))
{
queryWrapper
.
orderByAsc
(
resolveField
(
sortVo
.
getField
()));
queryWrapper
.
orderByDesc
(
resolveField
(
sortVo
.
getField
()));
}
else
if
(
sortVo
!=
null
&&
"DESC"
.
equalsIgnoreCase
(
sortVo
.
getSortType
()))
{
}
else
{
queryWrapper
.
orderByDesc
(
resolveField
(
sortVo
.
getField
()));
queryWrapper
.
orderByDesc
(
IdxBizJgProjectContraption:
:
getRecDate
);
}
else
{
}
queryWrapper
.
orderByDesc
(
IdxBizJgProjectContraption:
:
getRecDate
);
}
IPage
<
IdxBizJgProjectContraption
>
pageList
=
queryWrapper
.
page
(
page
);
// 单位类型区分的企业还是监管
String
companyType2
=
CommonServiceImpl
.
getCompanyType
(
company
);
if
(!
ValidationUtil
.
isEmpty
(
pageList
.
getRecords
()))
{
Map
<
String
,
Boolean
>
projectContraptionUseMap
=
getPidUseMap
(
pageList
);
pageList
.
getRecords
().
forEach
(
record
->
{
BigDecimal
pipelineLength
=
BigDecimal
.
valueOf
(
record
.
getPipelineLength
());
BigDecimal
roundedValue
=
pipelineLength
.
setScale
(
3
,
RoundingMode
.
HALF_UP
);
BigDecimal
strippedValue
=
roundedValue
.
stripTrailingZeros
();
record
.
setPipelineLength
(
Double
.
valueOf
(
strippedValue
.
toPlainString
()));
record
.
setDataSourceName
(
EquipSourceEnum
.
getDataSourceName
(
record
.
getDataSource
()));
record
.
setDataQualityScore
(
commonService
.
castDataQualityScore2Name
(
record
.
getDataQualityScore
(),
record
.
getIsIntoManagement
()));
record
.
setFullAddress
(
Stream
.
of
(
record
.
getProvinceName
(),
record
.
getCityName
(),
record
.
getCountyName
(),
record
.
getStreetName
(),
record
.
getAddress
())
.
map
(
value
->
value
==
null
?
""
:
value
)
.
collect
(
Collectors
.
joining
())
);
record
.
setCompanyType
(
companyType2
);
// 来源类型:前端控制编辑按钮显示隐藏
record
.
setRegType
(
CommonServiceImpl
.
genRegTypeByDataSource
(
record
.
getDataSource
()));
record
.
setIsIntoManagementName
(
IsIntoManagementEnum
.
getName
(
record
.
getIsIntoManagement
()));
// 设置是否发生过后续业务::前端控制编辑按钮显示隐藏
record
.
setHappenAfterBiz
(
projectContraptionUseMap
.
getOrDefault
(
record
.
getSequenceNbr
()
+
""
,
false
));
});
List
<
Long
>
projectContraptionIdList
=
pageList
.
getRecords
().
stream
().
map
(
IdxBizJgProjectContraption:
:
getSequenceNbr
).
collect
(
Collectors
.
toList
());
IPage
<
IdxBizJgProjectContraption
>
pageList
=
queryWrapper
.
page
(
page
);
Map
<
String
,
Boolean
>
canEditMap
=
this
.
checkContraptionIsCanEdit
(
projectContraptionIdList
);
// 单位类型区分的企业还是监管
pageList
.
getRecords
().
forEach
(
record
->
record
.
setCanEdit
(
canEditMap
.
get
(
record
.
getSequenceNbr
()+
""
)));
String
companyType2
=
CommonServiceImpl
.
getCompanyType
(
company
);
Map
<
String
,
Boolean
>
canDeleteMap
=
this
.
checkContraptionIsCanDelete
(
projectContraptionIdList
,
isIntoManagement
);
pageList
.
getRecords
().
forEach
(
record
->
record
.
setCanDelete
(
canDeleteMap
.
get
(
record
.
getSequenceNbr
()+
""
)));
if
(!
ValidationUtil
.
isEmpty
(
pageList
.
getRecords
()))
{
//判断是否有检验结果录入
Map
<
String
,
Boolean
>
projectContraptionUseMap
=
getPidUseMap
(
pageList
);
judgeCheckResult
(
pageList
.
getRecords
());
pageList
.
getRecords
().
forEach
(
record
->
{
BigDecimal
pipelineLength
=
BigDecimal
.
valueOf
(
record
.
getPipelineLength
());
BigDecimal
roundedValue
=
pipelineLength
.
setScale
(
3
,
RoundingMode
.
HALF_UP
);
BigDecimal
strippedValue
=
roundedValue
.
stripTrailingZeros
();
record
.
setPipelineLength
(
Double
.
valueOf
(
strippedValue
.
toPlainString
()));
record
.
setDataSourceName
(
EquipSourceEnum
.
getDataSourceName
(
record
.
getDataSource
()));
record
.
setDataQualityScore
(
commonService
.
castDataQualityScore2Name
(
record
.
getDataQualityScore
(),
record
.
getIsIntoManagement
()));
record
.
setFullAddress
(
Stream
.
of
(
record
.
getProvinceName
(),
record
.
getCityName
(),
record
.
getCountyName
(),
record
.
getStreetName
(),
record
.
getAddress
())
.
map
(
value
->
value
==
null
?
""
:
value
)
.
collect
(
Collectors
.
joining
())
);
record
.
setCompanyType
(
companyType2
);
// 来源类型:前端控制编辑按钮显示隐藏
record
.
setRegType
(
CommonServiceImpl
.
genRegTypeByDataSource
(
record
.
getDataSource
()));
record
.
setIsIntoManagementName
(
IsIntoManagementEnum
.
getName
(
record
.
getIsIntoManagement
()));
// 设置是否发生过后续业务::前端控制编辑按钮显示隐藏
record
.
setHappenAfterBiz
(
projectContraptionUseMap
.
getOrDefault
(
record
.
getSequenceNbr
()
+
""
,
false
));
});
List
<
Long
>
projectContraptionIdList
=
pageList
.
getRecords
().
stream
().
map
(
IdxBizJgProjectContraption:
:
getSequenceNbr
).
collect
(
Collectors
.
toList
());
Map
<
String
,
Boolean
>
canEditMap
=
this
.
checkContraptionIsCanEdit
(
projectContraptionIdList
);
pageList
.
getRecords
().
forEach
(
record
->
record
.
setCanEdit
(
canEditMap
.
get
(
record
.
getSequenceNbr
()+
""
)));
Map
<
String
,
Boolean
>
canDeleteMap
=
this
.
checkContraptionIsCanDelete
(
projectContraptionIdList
,
isIntoManagement
);
pageList
.
getRecords
().
forEach
(
record
->
record
.
setCanDelete
(
canDeleteMap
.
get
(
record
.
getSequenceNbr
()+
""
)));
//判断是否有检验结果录入
judgeCheckResult
(
pageList
.
getRecords
());
List
<
IdxBizJgUseInfo
>
useInfos
=
useInfoService
.
lambdaQuery
().
select
(
IdxBizJgUseInfo:
:
getRecord
,
IdxBizJgUseInfo:
:
getPhone
)
.
in
(
IdxBizJgUseInfo:
:
getProjectContraptionId
,
projectContraptionIdList
).
list
();
useInfos
.
forEach
(
info
->
System
.
out
.
println
(
"record="
+
info
.
getRecord
()
+
", phone="
+
info
.
getPhone
()));
}
return
pageList
;
}
catch
(
Exception
ex
)
{
String
msg
=
ex
.
getMessage
()
==
null
?
""
:
ex
.
getMessage
();
if
(
msg
.
contains
(
"eyibc decrypt error"
)
||
msg
.
contains
(
"EYIBCException"
)
||
msg
.
contains
(
"olym jdbc error"
)
||
msg
.
contains
(
"数据非法"
)
||
msg
.
contains
(
"Code: 100023:sql parse error"
)
||
msg
.
contains
(
"decrypt error, code: -65"
))
{
throw
new
BadRequest
(
"数据完整性被破坏(解密失败),请联系管理员。"
);
}
throw
new
BadRequest
(
"系统内部错误,请联系管理员。"
);
}
}
return
pageList
;
}
}
/**
/**
...
...
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/JgMaintenanceContractServiceImpl.java
View file @
6401acff
...
@@ -118,45 +118,58 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
...
@@ -118,45 +118,58 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
* 分页查询
* 分页查询
*/
*/
public
Page
<
JgMaintenanceContractVo
>
queryForPage
(
Page
<
JgMaintenanceContract
>
page
,
String
sort
,
JgMaintenanceContractDto
dto
,
ReginParams
reginParams
,
String
client
)
{
public
Page
<
JgMaintenanceContractVo
>
queryForPage
(
Page
<
JgMaintenanceContract
>
page
,
String
sort
,
JgMaintenanceContractDto
dto
,
ReginParams
reginParams
,
String
client
)
{
if
(
ObjectUtils
.
isEmpty
(
dto
))
{
try
{
dto
=
new
JgMaintenanceContractDto
();
if
(
ObjectUtils
.
isEmpty
(
dto
))
{
}
dto
=
new
JgMaintenanceContractDto
();
Page
<
JgMaintenanceContractDto
>
contractList
;
Page
<
JgMaintenanceContractVo
>
result
=
new
Page
<>();
CompanyBo
company
=
reginParams
.
getCompany
();
SortVo
sortMap
=
commonService
.
sortFieldConversion
(
sort
);
Map
<
String
,
Object
>
companyTypeMap
=
jrmInstallationNoticeService
.
getCompanyType
();
String
companyLevel
=
""
;
String
companyType
=
""
;
if
(
companyTypeMap
.
containsKey
(
"companyLevel"
))
{
companyLevel
=
companyTypeMap
.
get
(
"companyLevel"
).
toString
();
}
if
(
companyTypeMap
.
containsKey
(
"companyType"
))
{
companyType
=
companyTypeMap
.
get
(
"companyType"
).
toString
();
}
if
(
"supervision"
.
equals
(
companyLevel
))
{
// 监管单位查询
if
(
client
.
equals
(
"jgLook"
))
{
dto
.
setOrgBranchCode
(
company
.
getOrgCode
());
}
else
{
// 接收机构查询
dto
.
setReceiveOrgCodeFilter
(
company
.
getCompanyCode
());
}
}
}
else
if
(
"company"
.
equals
(
companyLevel
))
{
Page
<
JgMaintenanceContractDto
>
contractList
;
if
(
companyType
.
contains
(
CompanyTypeEnum
.
USE
.
getCode
())
||
companyType
.
contains
(
CompanyTypeEnum
.
INDIVIDUAL
.
getCode
()))
{
Page
<
JgMaintenanceContractVo
>
result
=
new
Page
<>();
// 使用单位用"使用单位统一信用代码"匹配数据
CompanyBo
company
=
reginParams
.
getCompany
();
dto
.
setUseUnitCodeFilter
(
company
.
getCompanyCode
());
SortVo
sortMap
=
commonService
.
sortFieldConversion
(
sort
);
dto
.
setRoleIds
(
null
);
Map
<
String
,
Object
>
companyTypeMap
=
jrmInstallationNoticeService
.
getCompanyType
();
String
companyLevel
=
""
;
String
companyType
=
""
;
if
(
companyTypeMap
.
containsKey
(
"companyLevel"
))
{
companyLevel
=
companyTypeMap
.
get
(
"companyLevel"
).
toString
();
}
if
(
companyTypeMap
.
containsKey
(
"companyType"
))
{
companyType
=
companyTypeMap
.
get
(
"companyType"
).
toString
();
}
if
(
"supervision"
.
equals
(
companyLevel
))
{
// 监管单位查询
if
(
client
.
equals
(
"jgLook"
))
{
dto
.
setOrgBranchCode
(
company
.
getOrgCode
());
}
else
{
// 接收机构查询
dto
.
setReceiveOrgCodeFilter
(
company
.
getCompanyCode
());
}
}
else
if
(
"company"
.
equals
(
companyLevel
))
{
if
(
companyType
.
contains
(
CompanyTypeEnum
.
USE
.
getCode
())
||
companyType
.
contains
(
CompanyTypeEnum
.
INDIVIDUAL
.
getCode
()))
{
// 使用单位用"使用单位统一信用代码"匹配数据
dto
.
setUseUnitCodeFilter
(
company
.
getCompanyCode
());
dto
.
setRoleIds
(
null
);
}
if
(
companyType
.
contains
(
CompanyTypeEnum
.
CONSTRUCTION
.
getCode
()))
{
// 维保单位用"维保单位统一信用代码"匹配数据
dto
.
setMaintenanceUnitCodeFilter
(
company
.
getCompanyCode
());
}
}
}
if
(
companyType
.
contains
(
CompanyTypeEnum
.
CONSTRUCTION
.
getCode
()))
{
contractList
=
maintenanceContractMapper
.
getContractList
(
page
,
sortMap
,
dto
,
reginParams
.
getUserModel
().
getUserId
(),
client
);
// 维保单位用"维保单位统一信用代码"匹配数据
List
<
JgMaintenanceContractDto
>
records
=
contractList
.
getRecords
().
stream
().
peek
(
x
->
x
.
setUnitType
(
company
.
getCompanyType
())).
collect
(
Collectors
.
toList
());
dto
.
setMaintenanceUnitCodeFilter
(
company
.
getCompanyCode
());
contractList
.
setRecords
(
records
);
BeanUtils
.
copyProperties
(
contractList
,
result
);
return
result
;
}
catch
(
Exception
ex
)
{
String
msg
=
ex
.
getMessage
()
==
null
?
""
:
ex
.
getMessage
();
if
(
msg
.
contains
(
"eyibc decrypt error"
)
||
msg
.
contains
(
"EYIBCException"
)
||
msg
.
contains
(
"olym jdbc error"
)
||
msg
.
contains
(
"数据非法"
)
||
msg
.
contains
(
"Code: 100023:sql parse error"
)
||
msg
.
contains
(
"decrypt error, code: -65"
))
{
throw
new
BadRequest
(
"数据完整性被破坏(解密失败),请联系管理员。"
);
}
}
throw
new
BadRequest
(
"系统内部错误,请联系管理员。"
);
}
}
contractList
=
maintenanceContractMapper
.
getContractList
(
page
,
sortMap
,
dto
,
reginParams
.
getUserModel
().
getUserId
(),
client
);
List
<
JgMaintenanceContractDto
>
records
=
contractList
.
getRecords
().
stream
().
peek
(
x
->
x
.
setUnitType
(
company
.
getCompanyType
())).
collect
(
Collectors
.
toList
());
contractList
.
setRecords
(
records
);
BeanUtils
.
copyProperties
(
contractList
,
result
);
return
result
;
}
}
/**
/**
...
...
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/SafetyProblemTracingServiceImpl.java
View file @
6401acff
...
@@ -330,7 +330,7 @@ public class SafetyProblemTracingServiceImpl extends BaseService<SafetyProblemTr
...
@@ -330,7 +330,7 @@ public class SafetyProblemTracingServiceImpl extends BaseService<SafetyProblemTr
log
.
error
(
"Other表更新失败,设备record:{},错误原因:{}"
,
records
,
e
.
getMessage
(),
e
);
log
.
error
(
"Other表更新失败,设备record:{},错误原因:{}"
,
records
,
e
.
getMessage
(),
e
);
}
}
// 更新ES状态
// 更新ES状态
(添加异常处理)
try
{
try
{
Iterable
<
ESEquipmentCategoryDto
>
esEquipmentIter
=
esEquipmentCategory
.
findAllById
(
records
);
Iterable
<
ESEquipmentCategoryDto
>
esEquipmentIter
=
esEquipmentCategory
.
findAllById
(
records
);
esEquipmentIter
.
forEach
(
dto
->
esEquipmentIter
.
forEach
(
dto
->
...
...
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/java/com/yeejoin/amos/boot/module/statistcs/biz/service/impl/ComprehensiveStatisticalAnalysisServiceImpl.java
View file @
6401acff
...
@@ -322,7 +322,7 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
...
@@ -322,7 +322,7 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
}
}
// 组装人员过滤条件
// 组装人员过滤条件
String
orgCode
=
filter
.
getString
(
"orgCode"
);
String
orgCode
=
filter
.
getString
(
"orgCode"
);
personOrgCodeBoolMust
(
orgCode
,
boolMust
);
personOrgCodeBoolMust
(
orgCode
,
boolMust
,
StatisticalAnalysisEnum
.
person
.
getCode
()
);
this
.
getPersonBoolQueryBuilder
(
filterParams
,
boolMust
,
filterType
);
this
.
getPersonBoolQueryBuilder
(
filterParams
,
boolMust
,
filterType
);
if
(
"custom"
.
equals
(
filterType
))
{
if
(
"custom"
.
equals
(
filterType
))
{
JSONArray
leftGroup
=
filterParams
.
getJSONArray
(
"group1"
);
JSONArray
leftGroup
=
filterParams
.
getJSONArray
(
"group1"
);
...
@@ -403,15 +403,16 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
...
@@ -403,15 +403,16 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
return
result
;
return
result
;
}
}
private
void
personOrgCodeBoolMust
(
String
orgCode
,
BoolQueryBuilder
boolMust
)
{
private
void
personOrgCodeBoolMust
(
String
orgCode
,
BoolQueryBuilder
boolMust
,
String
type
)
{
String
superviseOrgCodeKey
=
type
.
equals
(
StatisticalAnalysisEnum
.
person
.
getCode
())
?
"superviseOrgCode"
:
"superviseOrgCode.keyword"
;
String
officeRegion
=
commonMapper
.
getCompanyCodeByOrgCode
(
orgCode
);
String
officeRegion
=
commonMapper
.
getCompanyCodeByOrgCode
(
orgCode
);
BoolQueryBuilder
queryBuilder1
=
QueryBuilders
.
boolQuery
();
BoolQueryBuilder
queryBuilder1
=
QueryBuilders
.
boolQuery
();
BoolQueryBuilder
queryBuilder2
=
QueryBuilders
.
boolQuery
();
BoolQueryBuilder
queryBuilder2
=
QueryBuilders
.
boolQuery
();
EnhancedDynamicQueryBuilder
enhancedDynamicQueryBuilder
=
new
EnhancedDynamicQueryBuilder
();
EnhancedDynamicQueryBuilder
enhancedDynamicQueryBuilder
=
new
EnhancedDynamicQueryBuilder
();
queryBuilder1
.
must
(
QueryBuilders
.
termQuery
(
"superviseOrgCode"
,
"50"
))
queryBuilder1
.
must
(
QueryBuilders
.
termQuery
(
superviseOrgCodeKey
,
"50"
))
.
must
(
QueryBuilders
.
wildcardQuery
(
"officeRegion"
,
"*"
+
officeRegion
+
"*"
));
.
must
(
QueryBuilders
.
wildcardQuery
(
"officeRegion"
,
"*"
+
officeRegion
+
"*"
));
queryBuilder2
.
mustNot
(
QueryBuilders
.
termQuery
(
"superviseOrgCode"
,
"50"
))
queryBuilder2
.
mustNot
(
QueryBuilders
.
termQuery
(
superviseOrgCodeKey
,
"50"
))
.
must
(
QueryBuilders
.
prefixQuery
(
"superviseOrgCode"
,
orgCode
));
.
must
(
QueryBuilders
.
prefixQuery
(
superviseOrgCodeKey
,
orgCode
));
enhancedDynamicQueryBuilder
.
add
(
queryBuilder1
,
or
);
enhancedDynamicQueryBuilder
.
add
(
queryBuilder1
,
or
);
enhancedDynamicQueryBuilder
.
add
(
queryBuilder2
,
or
);
enhancedDynamicQueryBuilder
.
add
(
queryBuilder2
,
or
);
boolMust
.
must
(
enhancedDynamicQueryBuilder
.
build
());
boolMust
.
must
(
enhancedDynamicQueryBuilder
.
build
());
...
@@ -497,14 +498,18 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
...
@@ -497,14 +498,18 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
boolMust
.
must
(
licencesQueryBuilder
.
build
());
boolMust
.
must
(
licencesQueryBuilder
.
build
());
}
else
if
(
k
.
equals
(
"issueDate"
))
{
}
else
if
(
k
.
equals
(
"issueDate"
))
{
JSONArray
issueDates
=
(
JSONArray
)
v
;
JSONArray
issueDates
=
(
JSONArray
)
v
;
String
startDate
=
DateUtils
.
convertDateToString
(
issueDates
.
getDate
(
0
),
DateUtils
.
DATE_PATTERN
);
Date
startDate
=
issueDates
.
getDate
(
0
);
String
endDate
=
DateUtils
.
convertDateToString
(
issueDates
.
getDate
(
1
),
DateUtils
.
DATE_PATTERN
);
Date
endDate
=
issueDates
.
getDate
(
1
);
NestedQueryBuilder
nestedQuery
=
QueryBuilders
.
nestedQuery
(
if
(!
""
.
equals
(
startDate
)
&&
!
""
.
equals
(
endDate
)
&&
!
ObjectUtils
.
isEmpty
(
startDate
)
&&
!
ObjectUtils
.
isEmpty
(
endDate
))
{
"licenses"
,
String
startDateString
=
DateUtils
.
convertDateToString
(
startDate
,
DateUtils
.
DATE_PATTERN
);
QueryBuilders
.
rangeQuery
(
"licenses."
+
k
).
gte
(
startDate
).
lte
(
endDate
),
String
endDateString
=
DateUtils
.
convertDateToString
(
endDate
,
DateUtils
.
DATE_PATTERN
);
ScoreMode
.
None
NestedQueryBuilder
nestedQuery
=
QueryBuilders
.
nestedQuery
(
);
"licenses"
,
boolMust
.
filter
(
nestedQuery
);
QueryBuilders
.
rangeQuery
(
"licenses."
+
k
).
gte
(
startDateString
).
lte
(
endDateString
),
ScoreMode
.
None
);
boolMust
.
filter
(
nestedQuery
);
}
}
}
}
}
}
else
if
(
v
instanceof
String
)
{
}
else
if
(
v
instanceof
String
)
{
...
@@ -570,7 +575,7 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
...
@@ -570,7 +575,7 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
BoolQueryBuilder
boolMust
=
QueryBuilders
.
boolQuery
();
BoolQueryBuilder
boolMust
=
QueryBuilders
.
boolQuery
();
String
orgCode
=
filter
.
getString
(
"orgCode"
);
String
orgCode
=
filter
.
getString
(
"orgCode"
);
boolMust
.
must
(
QueryBuilders
.
prefixQuery
(
"superviseOrgCode.keyword"
,
orgCode
));
personOrgCodeBoolMust
(
orgCode
,
boolMust
,
StatisticalAnalysisEnum
.
company
.
getCode
(
));
JSONObject
filterParams
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
filter
.
get
(
"filterParams"
)));
JSONObject
filterParams
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
filter
.
get
(
"filterParams"
)));
String
filterType
=
filter
.
getString
(
"filterType"
);
String
filterType
=
filter
.
getString
(
"filterType"
);
...
@@ -1152,7 +1157,7 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
...
@@ -1152,7 +1157,7 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
JSONArray
dates
=
(
JSONArray
)
v
;
JSONArray
dates
=
(
JSONArray
)
v
;
String
startDate
=
dates
.
getString
(
0
);
String
startDate
=
dates
.
getString
(
0
);
String
endDate
=
dates
.
getString
(
1
);
String
endDate
=
dates
.
getString
(
1
);
if
(!
""
.
equals
(
startDate
)
&&
!
""
.
equals
(
endDate
))
{
if
(!
""
.
equals
(
startDate
)
&&
!
""
.
equals
(
endDate
)
&&
!
ObjectUtils
.
isEmpty
(
startDate
)
&&
!
ObjectUtils
.
isEmpty
(
endDate
)
)
{
boolMust
.
filter
(
QueryBuilders
.
rangeQuery
(
field
).
gte
(
startDate
).
lte
(
endDate
));
boolMust
.
filter
(
QueryBuilders
.
rangeQuery
(
field
).
gte
(
startDate
).
lte
(
endDate
));
}
}
}
else
if
(
k
.
equals
(
"EQU_LIST"
)
||
k
.
equals
(
"EQU_CATEGORY"
)
||
k
.
equals
(
"EQU_DEFINE"
)
||
k
.
equals
(
"DATA_QUALITY_SCORE"
))
{
}
else
if
(
k
.
equals
(
"EQU_LIST"
)
||
k
.
equals
(
"EQU_CATEGORY"
)
||
k
.
equals
(
"EQU_DEFINE"
)
||
k
.
equals
(
"DATA_QUALITY_SCORE"
))
{
...
@@ -3142,16 +3147,16 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
...
@@ -3142,16 +3147,16 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
boolMust
.
must
(
QueryBuilders
.
prefixQuery
(
"ORG_BRANCH_CODE"
,
orgCode
));
boolMust
.
must
(
QueryBuilders
.
prefixQuery
(
"ORG_BRANCH_CODE"
,
orgCode
));
data
=
queryDpEquipStatistics
(
filter
,
request
,
builder
,
boolMust
,
tabTotalMap
);
data
=
queryDpEquipStatistics
(
filter
,
request
,
builder
,
boolMust
,
tabTotalMap
);
}
else
if
(
StatisticalAnalysisEnum
.
company
.
getCode
().
equals
(
businessType
))
{
}
else
if
(
StatisticalAnalysisEnum
.
company
.
getCode
().
equals
(
businessType
))
{
boolMust
.
must
(
QueryBuilders
.
prefixQuery
(
"superviseOrgCode.keyword"
,
orgCode
));
personOrgCodeBoolMust
(
orgCode
,
boolMust
,
StatisticalAnalysisEnum
.
company
.
getCode
(
));
data
=
queryDpCompanyStatistics
(
filter
,
request
,
builder
,
boolMust
,
tabTotalMap
);
data
=
queryDpCompanyStatistics
(
filter
,
request
,
builder
,
boolMust
,
tabTotalMap
);
}
else
if
(
StatisticalAnalysisEnum
.
person
.
getCode
().
equals
(
businessType
))
{
}
else
if
(
StatisticalAnalysisEnum
.
person
.
getCode
().
equals
(
businessType
))
{
personOrgCodeBoolMust
(
orgCode
,
boolMust
);
personOrgCodeBoolMust
(
orgCode
,
boolMust
,
StatisticalAnalysisEnum
.
person
.
getCode
()
);
data
=
queryDpPersonStatistics
(
filter
,
request
,
builder
,
boolMust
,
tabTotalMap
);
data
=
queryDpPersonStatistics
(
filter
,
request
,
builder
,
boolMust
,
tabTotalMap
);
}
else
if
(
StatisticalAnalysisEnum
.
inspectionCompany
.
getCode
().
equals
(
businessType
))
{
}
else
if
(
StatisticalAnalysisEnum
.
inspectionCompany
.
getCode
().
equals
(
businessType
))
{
boolMust
.
must
(
QueryBuilders
.
prefixQuery
(
"superviseOrgCode.keyword"
,
orgCode
));
personOrgCodeBoolMust
(
orgCode
,
boolMust
,
StatisticalAnalysisEnum
.
company
.
getCode
(
));
data
=
queryDpInspectionCompanyStatistics
(
filter
,
request
,
builder
,
boolMust
,
tabTotalMap
);
data
=
queryDpInspectionCompanyStatistics
(
filter
,
request
,
builder
,
boolMust
,
tabTotalMap
);
}
else
{
}
else
{
personOrgCodeBoolMust
(
orgCode
,
boolMust
);
personOrgCodeBoolMust
(
orgCode
,
boolMust
,
StatisticalAnalysisEnum
.
person
.
getCode
()
);
data
=
queryDpInspectionPersonStatistics
(
filter
,
request
,
builder
,
boolMust
,
tabTotalMap
);
data
=
queryDpInspectionPersonStatistics
(
filter
,
request
,
builder
,
boolMust
,
tabTotalMap
);
}
}
...
@@ -3256,7 +3261,7 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
...
@@ -3256,7 +3261,7 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
companyBoolMust
.
must
(
companyUnitTypeBoolMust
);
companyBoolMust
.
must
(
companyUnitTypeBoolMust
);
BoolQueryBuilder
personBoolMust
=
QueryBuilders
.
boolQuery
();
BoolQueryBuilder
personBoolMust
=
QueryBuilders
.
boolQuery
();
personOrgCodeBoolMust
(
orgCode
,
personBoolMust
);
personOrgCodeBoolMust
(
orgCode
,
personBoolMust
,
StatisticalAnalysisEnum
.
person
.
getCode
()
);
personBoolMust
.
must
(
companyUnitTypeBoolMust
);
personBoolMust
.
must
(
companyUnitTypeBoolMust
);
BoolQueryBuilder
inspectionCompanyBoolMust
=
QueryBuilders
.
boolQuery
();
BoolQueryBuilder
inspectionCompanyBoolMust
=
QueryBuilders
.
boolQuery
();
...
@@ -3266,7 +3271,7 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
...
@@ -3266,7 +3271,7 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
BoolQueryBuilder
inspectionPersonBoolMust
=
QueryBuilders
.
boolQuery
();
BoolQueryBuilder
inspectionPersonBoolMust
=
QueryBuilders
.
boolQuery
();
personOrgCodeBoolMust
(
orgCode
,
inspectionPersonBoolMust
);
personOrgCodeBoolMust
(
orgCode
,
personBoolMust
,
StatisticalAnalysisEnum
.
person
.
getCode
()
);
inspectionPersonBoolMust
.
must
(
inspectionUnitTypeBoolMust
);
inspectionPersonBoolMust
.
must
(
inspectionUnitTypeBoolMust
);
inspectionPersonBoolMust
.
mustNot
(
QueryBuilders
.
wildcardQuery
(
"unitType.keyword"
,
"*检验检测机构*"
));
inspectionPersonBoolMust
.
mustNot
(
QueryBuilders
.
wildcardQuery
(
"unitType.keyword"
,
"*检验检测机构*"
));
...
@@ -4034,7 +4039,7 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
...
@@ -4034,7 +4039,7 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
JSONObject
filterParams
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
filter
.
get
(
"filterParams"
)));
JSONObject
filterParams
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
filter
.
get
(
"filterParams"
)));
String
filterType
=
"advanced"
;
String
filterType
=
"advanced"
;
// 组装人员过滤条件
// 组装人员过滤条件
personOrgCodeBoolMust
(
orgCode
,
boolQuery
);
personOrgCodeBoolMust
(
orgCode
,
boolQuery
,
StatisticalAnalysisEnum
.
person
.
getCode
()
);
this
.
getPersonBoolQueryBuilder
(
filterParams
,
boolQuery
,
filterType
);
this
.
getPersonBoolQueryBuilder
(
filterParams
,
boolQuery
,
filterType
);
// 查询
// 查询
JSONObject
expiryDateStatus
=
this
.
getExpiryDateStatusGroupStatistics
(
boolQuery
);
JSONObject
expiryDateStatus
=
this
.
getExpiryDateStatusGroupStatistics
(
boolQuery
);
...
...
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/java/com/yeejoin/amos/boot/module/tcm/biz/service/impl/TzBaseEnterpriseInfoServiceImpl.java
View file @
6401acff
...
@@ -232,12 +232,18 @@ public class TzBaseEnterpriseInfoServiceImpl
...
@@ -232,12 +232,18 @@ public class TzBaseEnterpriseInfoServiceImpl
// }
// }
// }
// }
SortVo
sortMap
=
userInfoService
.
sortFieldConversion
(
sort
);
SortVo
sortMap
=
userInfoService
.
sortFieldConversion
(
sort
);
// 密评专用(查tz_flc_reg_unit_info表中的admin_login_pwd字段,以用于验证密评数据完整性)
List
<
RegUnitInfo
>
regUnitInfoList
=
regUnitInfoService
.
lambdaQuery
().
select
(
RegUnitInfo:
:
getUnitCode
,
RegUnitInfo:
:
getAdminLoginPwd
)
.
eq
(
RegUnitInfo:
:
getName
,
tzBaseEnterpriseInfoDto
.
getUseUnit
()).
list
();
regUnitInfoList
.
forEach
(
info
->
System
.
out
.
println
(
"unitCode="
+
info
.
getUnitCode
()
+
", adminLoginPwd="
+
info
.
getAdminLoginPwd
()));
return
this
.
baseMapper
.
pageList
(
page
,
tzBaseEnterpriseInfoDto
,
orgCode
,
sortMap
,
officeRegion
);
return
this
.
baseMapper
.
pageList
(
page
,
tzBaseEnterpriseInfoDto
,
orgCode
,
sortMap
,
officeRegion
);
}
catch
(
Exception
ex
)
{
}
catch
(
Exception
ex
)
{
String
msg
=
ex
.
getMessage
()
==
null
?
""
:
ex
.
getMessage
();
String
msg
=
ex
.
getMessage
()
==
null
?
""
:
ex
.
getMessage
();
if
(
msg
.
contains
(
"eyibc decrypt error"
)
if
(
msg
.
contains
(
"eyibc decrypt error"
)
||
msg
.
contains
(
"EYIBCException"
)
||
msg
.
contains
(
"EYIBCException"
)
||
msg
.
contains
(
"olym jdbc error"
)
||
msg
.
contains
(
"olym jdbc error"
)
||
msg
.
contains
(
"100022:"
)
||
msg
.
contains
(
"数据非法"
)
||
msg
.
contains
(
"数据非法"
)
||
msg
.
contains
(
"decrypt error, code: -65"
))
{
||
msg
.
contains
(
"decrypt error, code: -65"
))
{
throw
new
BadRequest
(
"数据完整性被破坏(解密失败),请联系管理员。"
);
throw
new
BadRequest
(
"数据完整性被破坏(解密失败),请联系管理员。"
);
...
...
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