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
14c4564e
Commit
14c4564e
authored
Jun 30, 2025
by
麻笑宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(statistics): 增加高级筛选功能
- 修改高级筛选枚举,增加新的筛选条件- 新增企业、个人等不同类型的高级筛选接口和实现 - 增加单位类型、许可等查询接口和实现 -优化高级筛选数据结构,增加 key、label、value 字段
parent
38a8c7de
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
230 additions
and
13 deletions
+230
-13
AdvanceSearchEnum.java
...s/boot/module/statistics/api/enums/AdvanceSearchEnum.java
+3
-2
UnitTypeEnum.java
...n/amos/boot/module/statistics/api/enums/UnitTypeEnum.java
+14
-0
ComprehensiveStatisticalAnalysisController.java
...ontroller/ComprehensiveStatisticalAnalysisController.java
+70
-4
ComprehensiveStatisticalAnalysisServiceImpl.java
...ice/impl/ComprehensiveStatisticalAnalysisServiceImpl.java
+143
-7
No files found.
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-api/src/main/java/com/yeejoin/amos/boot/module/statistics/api/enums/AdvanceSearchEnum.java
View file @
14c4564e
...
...
@@ -50,8 +50,9 @@ public enum AdvanceSearchEnum {
JSONArray
jsonArray
=
new
JSONArray
();
for
(
AdvanceSearchEnum
item
:
values
())
{
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"name"
,
item
.
name
);
jsonObject
.
put
(
"code"
,
item
.
code
);
jsonObject
.
put
(
"label"
,
item
.
name
);
jsonObject
.
put
(
"value"
,
item
.
code
);
jsonObject
.
put
(
"key"
,
item
.
code
);
jsonObject
.
put
(
"paramType"
,
item
.
paramType
);
jsonObject
.
put
(
"isMulti"
,
false
);
if
(
TechnicalParameter
.
ParamType
.
BIG_DECIMAL
.
equals
(
item
.
paramType
)){
...
...
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-api/src/main/java/com/yeejoin/amos/boot/module/statistics/api/enums/UnitTypeEnum.java
View file @
14c4564e
package
com
.
yeejoin
.
amos
.
boot
.
module
.
statistics
.
api
.
enums
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
...
...
@@ -35,4 +37,16 @@ public enum UnitTypeEnum {
getCode
.
put
(
e
.
name
,
e
.
code
);
}
}
public
static
JSONArray
getAll
(){
JSONArray
jsonArray
=
new
JSONArray
();
for
(
UnitTypeEnum
e
:
UnitTypeEnum
.
values
())
{
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"label"
,
e
.
name
);
jsonObject
.
put
(
"value"
,
e
.
code
);
jsonObject
.
put
(
"key"
,
e
.
code
);
jsonArray
.
add
(
jsonObject
);
}
return
jsonArray
;
}
}
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/java/com/yeejoin/amos/boot/module/statistcs/biz/controller/ComprehensiveStatisticalAnalysisController.java
View file @
14c4564e
...
...
@@ -53,7 +53,7 @@ public class ComprehensiveStatisticalAnalysisController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/select/queryEquipmentSearchData"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"查询设备查询条件"
,
notes
=
"查询设备查询条件"
)
public
ResponseModel
<
JSON
Object
>
queryEquipmentSearchData
(
@RequestBody
JSONObject
jsonObject
)
{
public
ResponseModel
<
JSON
Array
>
queryEquipmentSearchData
(
@RequestBody
JSONObject
jsonObject
)
{
return
ResponseHelper
.
buildResponse
(
statisticalAnalysisService
.
queryEquipmentSearchData
(
jsonObject
.
getString
(
"value"
)));
}
...
...
@@ -62,10 +62,76 @@ public class ComprehensiveStatisticalAnalysisController extends BaseController {
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/select/queryAdvancedSearch"
)
@GetMapping
(
value
=
"/select/queryAdvancedSearch
/{type}
"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询高级筛选"
,
notes
=
"查询高级筛选"
)
public
ResponseModel
<
JSONArray
>
query
()
{
return
ResponseHelper
.
buildResponse
(
statisticalAnalysisService
.
queryAdvancedSearch
());
public
ResponseModel
<
JSONArray
>
query
(
@PathVariable
String
type
)
{
return
ResponseHelper
.
buildResponse
(
statisticalAnalysisService
.
queryAdvancedSearch
(
type
));
}
/**
* @param
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/select/queryCompanySearchData"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询企业条件"
,
notes
=
"查询企业条件"
)
public
ResponseModel
<
JSONObject
>
queryCompanySearchData
()
{
return
ResponseHelper
.
buildResponse
(
statisticalAnalysisService
.
queryCompanySearchData
());
}
/**
* @param
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/select/queryPersonSearchData"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询个人条件"
,
notes
=
"查询个人条件"
)
public
ResponseModel
<
JSONObject
>
queryPersonSearchData
()
{
return
ResponseHelper
.
buildResponse
(
statisticalAnalysisService
.
queryPersonSearchData
());
}
/**
* @param
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/select/queryUnitType"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询单位类型"
,
notes
=
"查询单位类型"
)
public
ResponseModel
<
JSONArray
>
queryUnitType
()
{
return
ResponseHelper
.
buildResponse
(
statisticalAnalysisService
.
queryUnitType
());
}
/**
* @param
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/select/queryXK"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询许可"
,
notes
=
"查询许可"
)
public
ResponseModel
<
JSONArray
>
queryXK
(
@RequestParam
(
required
=
false
)
String
type
)
{
return
ResponseHelper
.
buildResponse
(
statisticalAnalysisService
.
queryXK
(
type
));
}
/**
* @param
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/select/queryRYLX"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询人员类型"
,
notes
=
"查询人员类型"
)
public
ResponseModel
<
JSONArray
>
queryRYLX
(
@RequestParam
(
required
=
false
)
String
type
)
{
return
ResponseHelper
.
buildResponse
(
statisticalAnalysisService
.
queryRYLX
(
type
));
}
/**
* @param
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/select/queryZZZT"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询资质状态"
,
notes
=
"查询资质状态"
)
public
ResponseModel
<
JSONArray
>
queryZZZT
()
{
return
ResponseHelper
.
buildResponse
(
statisticalAnalysisService
.
queryZZZT
());
}
/**
...
...
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 @
14c4564e
...
...
@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONArray;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.annotation.TechnicalParameter
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.entity.DataDictionary
;
import
com.yeejoin.amos.boot.biz.common.excel.ExcelUtil
;
import
com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl
;
...
...
@@ -17,9 +18,12 @@ import com.yeejoin.amos.boot.module.statistcs.biz.utils.MinioUtils;
import
com.yeejoin.amos.boot.module.statistics.api.enums.AdvanceSearchEnum
;
import
com.yeejoin.amos.boot.module.statistics.api.enums.ConditionEnum
;
import
com.yeejoin.amos.boot.module.statistics.api.enums.StatisticalAnalysisEnum
;
import
com.yeejoin.amos.boot.module.statistics.api.enums.UnitTypeEnum
;
import
com.yeejoin.amos.boot.module.statistics.api.mapper.TzsCustomFilterMapper
;
import
com.yeejoin.amos.boot.module.statistics.api.vo.EquipInfoVo
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.EquipmentCategoryDto
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.EquipmentClassifityEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.EquipmentCategoryMapper
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.lucene.search.join.ScoreMode
;
...
...
@@ -32,6 +36,7 @@ import org.elasticsearch.script.Script;
import
org.elasticsearch.search.SearchHit
;
import
org.elasticsearch.search.builder.SearchSourceBuilder
;
import
org.elasticsearch.search.sort.SortOrder
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.core.io.Resource
;
import
org.springframework.stereotype.Service
;
...
...
@@ -73,6 +78,10 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
private
final
String
DOWNLOAD_TOPIC
=
"/topic/download/excel/%s"
;
private
final
String
BUCKET_NAME
=
"upload"
;
private
final
String
UPLOAD_PATH
=
"/tzs/excelTempFile"
;
@Autowired
EquipmentCategoryMapper
equipmentCategoryMapper
;
DateTimeFormatter
formatter
=
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
);
public
List
<
Map
<
String
,
Object
>>
queryEquipmentCategory
(
String
key
)
{
...
...
@@ -87,9 +96,9 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
return
list
;
}
public
JSON
Object
queryEquipmentSearchData
(
String
value
)
{
public
JSON
Array
queryEquipmentSearchData
(
String
value
)
{
List
<
TechParamItem
>
paramMetaList
=
TechParamUtil
.
getParamMetaList
(
value
);
ArrayList
<
JSONObject
>
list
=
new
ArrayList
<>
();
JSONArray
list
=
new
JSONArray
();
for
(
int
i
=
0
;
i
<
paramMetaList
.
size
();
i
++)
{
JSONObject
object
=
new
JSONObject
();
object
.
put
(
"key"
,
paramMetaList
.
get
(
i
).
getParamKey
());
...
...
@@ -112,9 +121,7 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
object
.
put
(
"skillConfig"
,
skillConfig
);
list
.
add
(
object
);
}
JSONObject
result
=
new
JSONObject
();
result
.
put
(
"techParam"
,
list
);
return
result
;
return
list
;
}
private
JSONArray
getData
(
String
dictCode
)
{
...
...
@@ -125,6 +132,7 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
JSONObject
object
=
new
JSONObject
();
object
.
put
(
"label"
,
dictionary
.
getName
());
object
.
put
(
"value"
,
dictionary
.
getCode
());
object
.
put
(
"key"
,
dictionary
.
getCode
());
jsonArray
.
add
(
object
);
}
return
jsonArray
;
...
...
@@ -134,8 +142,15 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
return
ConditionEnum
.
getByCode
(
ValidationUtil
.
isEmpty
(
dictCode
)
?
value
:
null
);
}
public
JSONArray
queryAdvancedSearch
()
{
JSONArray
all
=
AdvanceSearchEnum
.
getAll
();
public
JSONArray
queryAdvancedSearch
(
String
type
)
{
JSONArray
all
=
new
JSONArray
();
if
(
"equip"
.
equals
(
type
))
{
all
=
AdvanceSearchEnum
.
getAll
();
}
else
if
(
"company"
.
equals
(
type
)){
}
else
if
(
"person"
.
equals
(
type
)){
}
return
all
;
}
...
...
@@ -535,6 +550,120 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
}
}
result
.
put
(
"statics"
,
statics
);
return
result
;
}
public
JSONArray
queryUnitType
()
{
return
UnitTypeEnum
.
getAll
();
}
public
JSONObject
queryCompanySearchData
()
{
JSONObject
result
=
new
JSONObject
();
//获取企业类型
result
.
put
(
"UNIT_TYPE"
,
UnitTypeEnum
.
getAll
());
//获取企业等级
result
.
put
(
"regulatoryLabels"
,
deployDictionary
(
dataDictionaryService
.
getByType
(
"QYBQ"
)));
//行业主管部门
result
.
put
(
"industrySupervisor"
,
deployDictionary
(
dataDictionaryService
.
getByType
(
"HYZGBM"
)));
//经营状态
result
.
put
(
"operatingStatus"
,
deployDictionary
(
dataDictionaryService
.
getByType
(
"jyzt"
)));
//许可状态
JSONArray
permitStatusData
=
new
JSONArray
();
for
(
int
i
=
0
;
i
<
3
;
i
++){
JSONObject
object
=
new
JSONObject
();
if
(
0
==
i
){
object
.
put
(
"key"
,
"0"
);
object
.
put
(
"value"
,
"0"
);
object
.
put
(
"label"
,
"超期"
);
}
else
if
(
1
==
i
){
object
.
put
(
"key"
,
"1"
);
object
.
put
(
"value"
,
"1"
);
object
.
put
(
"label"
,
"临期"
);
}
else
{
object
.
put
(
"key"
,
"2"
);
object
.
put
(
"value"
,
"2"
);
object
.
put
(
"label"
,
"正常"
);
}
permitStatusData
.
add
(
object
);
}
result
.
put
(
"permitStatus"
,
permitStatusData
);
//监管设备类型
List
<
EquipmentCategoryDto
>
equipmentCategoryDtos
=
equipmentCategoryMapper
.
selectClassify
();
JSONArray
equipCategoryData
=
new
JSONArray
();
for
(
int
i
=
0
;
i
<
equipmentCategoryDtos
.
size
();
i
++){
JSONObject
object
=
new
JSONObject
();
object
.
put
(
"key"
,
equipmentCategoryDtos
.
get
(
i
).
getCode
());
object
.
put
(
"value"
,
equipmentCategoryDtos
.
get
(
i
).
getCode
());
object
.
put
(
"label"
,
equipmentCategoryDtos
.
get
(
i
).
getName
());
equipCategoryData
.
add
(
object
);
}
result
.
put
(
"equipList"
,
equipCategoryData
);
return
result
;
}
public
JSONObject
queryPersonSearchData
()
{
JSONObject
result
=
new
JSONObject
();
return
result
;
}
public
JSONArray
deployDictionary
(
List
<
DataDictionary
>
list
)
{
JSONArray
result
=
new
JSONArray
();
for
(
int
i
=
0
;
i
<
list
.
size
();
i
++)
{
JSONObject
object
=
new
JSONObject
();
object
.
put
(
"key"
,
list
.
get
(
i
).
getCode
());
object
.
put
(
"value"
,
list
.
get
(
i
).
getCode
());
object
.
put
(
"label"
,
list
.
get
(
i
).
getName
());
result
.
add
(
object
);
}
return
result
;
}
public
JSONArray
queryXK
(
String
type
)
{
JSONArray
result
=
new
JSONArray
();
if
(
ValidationUtil
.
isEmpty
(
type
)){
List
<
DataDictionary
>
xkxm
=
dataDictionaryService
.
lambdaQuery
().
like
(
DataDictionary:
:
getType
,
"XKXM"
).
eq
(
BaseEntity:
:
getIsDelete
,
false
).
list
();
result
=
deployDictionary
(
xkxm
);
}
else
{
List
<
DataDictionary
>
childrenxkxm
=
dataDictionaryService
.
lambdaQuery
().
eq
(
DataDictionary:
:
getTypeDesc
,
type
).
eq
(
BaseEntity:
:
getIsDelete
,
false
).
list
();
result
=
deployDictionary
(
childrenxkxm
);
}
return
result
;
}
public
JSONArray
queryRYLX
(
String
type
)
{
JSONArray
result
=
new
JSONArray
();
if
(
ValidationUtil
.
isEmpty
(
type
)){
List
<
String
>
typeList
=
new
ArrayList
<>(
Arrays
.
asList
(
"QYRYGW"
,
"QYRYGW-SYDW"
,
"QYRYGW-SCDW"
,
"QYRYGW-INSTALL"
,
"QYRYGW-INSPECTION"
));
result
=
deployDictionary
(
dataDictionaryService
.
lambdaQuery
()
.
select
(
DataDictionary:
:
getName
,
DataDictionary:
:
getCode
)
.
eq
(
DataDictionary:
:
getIsDelete
,
false
)
.
isNull
(
DataDictionary:
:
getParent
)
.
in
(
DataDictionary:
:
getType
,
typeList
)
.
list
());
}
else
{
List
<
DataDictionary
>
childrenrylx
=
dataDictionaryService
.
lambdaQuery
()
.
in
(
DataDictionary:
:
getParent
,
type
)
.
like
(
DataDictionary:
:
getType
,
"QYRYGW"
)
.
orderByAsc
(
DataDictionary:
:
getSortNum
)
.
list
();;
result
=
deployDictionary
(
childrenrylx
);
}
return
result
;
}
...
...
@@ -589,4 +718,10 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
.
fluentPut
(
"url"
,
urlString
)
.
fluentPut
(
"time"
,
new
Date
().
getTime
()));
}
public
JSONArray
queryZZZT
()
{
JSONArray
array
=
new
JSONArray
();
return
null
;
}
}
\ No newline at end of file
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