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
36bcb92d
Commit
36bcb92d
authored
Jul 24, 2025
by
tianyiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug修改
parent
c5aa0d68
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
181 additions
and
128 deletions
+181
-128
CompanyAdvanceSearchEnum.java
...module/statistics/api/enums/CompanyAdvanceSearchEnum.java
+35
-21
ConditionEnum.java
.../amos/boot/module/statistics/api/enums/ConditionEnum.java
+1
-1
EquipAdvanceSearchEnum.java
...t/module/statistics/api/enums/EquipAdvanceSearchEnum.java
+63
-49
EquipStateEnum.java
...amos/boot/module/statistics/api/enums/EquipStateEnum.java
+5
-5
PersonAdvanceSearchEnum.java
.../module/statistics/api/enums/PersonAdvanceSearchEnum.java
+38
-25
ComprehensiveStatisticalAnalysisServiceImpl.java
...ice/impl/ComprehensiveStatisticalAnalysisServiceImpl.java
+37
-24
JGDPStatisticsServiceImpl.java
...statistcs/biz/service/impl/JGDPStatisticsServiceImpl.java
+2
-3
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/CompanyAdvanceSearchEnum.java
View file @
36bcb92d
...
@@ -5,6 +5,10 @@ import com.alibaba.fastjson.JSONObject;
...
@@ -5,6 +5,10 @@ import com.alibaba.fastjson.JSONObject;
import
com.yeejoin.amos.boot.biz.common.annotation.TechnicalParameter
;
import
com.yeejoin.amos.boot.biz.common.annotation.TechnicalParameter
;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
import
lombok.Getter
;
import
org.springframework.data.elasticsearch.annotations.FieldType
;
import
java.util.HashMap
;
import
java.util.Map
;
@AllArgsConstructor
@AllArgsConstructor
@Getter
@Getter
...
@@ -13,17 +17,17 @@ public enum CompanyAdvanceSearchEnum {
...
@@ -13,17 +17,17 @@ public enum CompanyAdvanceSearchEnum {
/**
/**
* 高级搜索枚举
* 高级搜索枚举
*/
*/
USEUNIT
(
"企业名称"
,
"useUnit"
,
TechnicalParameter
.
ParamType
.
STRING
,
""
,
null
,
null
),
USEUNIT
(
"企业名称"
,
"useUnit"
,
TechnicalParameter
.
ParamType
.
STRING
,
""
,
null
,
null
,
FieldType
.
Text
),
ADDRESS
(
"详细地址"
,
"address"
,
TechnicalParameter
.
ParamType
.
STRING
,
""
,
null
,
null
),
ADDRESS
(
"详细地址"
,
"address"
,
TechnicalParameter
.
ParamType
.
STRING
,
""
,
null
,
null
,
FieldType
.
Text
),
EXPIRYDATE
(
"许可有效期"
,
"expiryDate"
,
TechnicalParameter
.
ParamType
.
DATE
,
""
,
null
,
null
),
EXPIRYDATE
(
"许可有效期"
,
"expiryDate"
,
TechnicalParameter
.
ParamType
.
DATE
,
""
,
null
,
null
,
FieldType
.
Date
),
UNIT_TYPE
(
"企业类型"
,
"unitType"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryUnitType"
,
null
,
null
),
UNIT_TYPE
(
"企业类型"
,
"unitType"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryUnitType"
,
null
,
null
,
FieldType
.
Text
),
REGULATORY_LABELS
(
"监管标签"
,
"regulatoryLabels"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryDicData?type={type}"
,
"QYBQ"
,
null
),
REGULATORY_LABELS
(
"监管标签"
,
"regulatoryLabels"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryDicData?type={type}"
,
"QYBQ"
,
null
,
FieldType
.
Text
),
INDUSTRY_SUPERVISOR
(
"行业主管部门"
,
"industrySupervisor"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryDicData?type={type}"
,
"HYZGBM"
,
null
),
INDUSTRY_SUPERVISOR
(
"行业主管部门"
,
"industrySupervisor"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryDicData?type={type}"
,
"HYZGBM"
,
null
,
FieldType
.
Text
),
ITEM_CODE
(
"许可项目"
,
"itemCode"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryXK"
,
null
,
null
),
ITEM_CODE
(
"许可项目"
,
"itemCode"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryXK"
,
null
,
null
,
FieldType
.
Text
),
SUB_ITEM_CODE
(
"许可子项目"
,
"subItemCode"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryXK?type={type}"
,
null
,
"itemCode"
),
SUB_ITEM_CODE
(
"许可子项目"
,
"subItemCode"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryXK?type={type}"
,
null
,
"itemCode"
,
FieldType
.
Text
),
OPERATING_STATUS
(
"经营状态"
,
"operatingStatus"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryDicDataNew?type={type}"
,
"jyzt"
,
null
),
OPERATING_STATUS
(
"经营状态"
,
"operatingStatus"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryDicDataNew?type={type}"
,
"jyzt"
,
null
,
FieldType
.
Text
),
EQUIP_CATEGORY
(
"设备类型"
,
"equipCategory"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryEquipList"
,
null
,
null
),
EQUIP_CATEGORY
(
"设备类型"
,
"equipCategory"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryEquipList"
,
null
,
null
,
FieldType
.
Text
),
PERMIT_STATUS
(
"许可状态"
,
"permitStatus"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/permitStatus"
,
null
,
null
),
PERMIT_STATUS
(
"许可状态"
,
"permitStatus"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/permitStatus"
,
null
,
null
,
FieldType
.
Auto
),
;
;
...
@@ -33,8 +37,9 @@ public enum CompanyAdvanceSearchEnum {
...
@@ -33,8 +37,9 @@ public enum CompanyAdvanceSearchEnum {
private
String
url
;
private
String
url
;
private
String
dataKey
;
private
String
dataKey
;
private
String
argKey
;
private
String
argKey
;
private
FieldType
esType
;
public
static
JSONArray
getAll
(){
public
static
JSONArray
getAll
()
{
JSONArray
jsonArray
=
new
JSONArray
();
JSONArray
jsonArray
=
new
JSONArray
();
for
(
CompanyAdvanceSearchEnum
item
:
values
())
{
for
(
CompanyAdvanceSearchEnum
item
:
values
())
{
JSONObject
jsonObject
=
new
JSONObject
();
JSONObject
jsonObject
=
new
JSONObject
();
...
@@ -45,19 +50,28 @@ public enum CompanyAdvanceSearchEnum {
...
@@ -45,19 +50,28 @@ public enum CompanyAdvanceSearchEnum {
jsonObject
.
put
(
"argKey"
,
item
.
argKey
);
jsonObject
.
put
(
"argKey"
,
item
.
argKey
);
jsonObject
.
put
(
"paramType"
,
item
.
paramType
);
jsonObject
.
put
(
"paramType"
,
item
.
paramType
);
jsonObject
.
put
(
"isMulti"
,
false
);
jsonObject
.
put
(
"isMulti"
,
false
);
if
(
TechnicalParameter
.
ParamType
.
BIG_DECIMAL
.
equals
(
item
.
paramType
))
{
if
(
TechnicalParameter
.
ParamType
.
BIG_DECIMAL
.
equals
(
item
.
paramType
))
{
jsonObject
.
put
(
"type"
,
"inputNumber"
);
jsonObject
.
put
(
"type"
,
"inputNumber"
);
}
else
if
(
TechnicalParameter
.
ParamType
.
STRING
.
equals
(
item
.
paramType
))
{
}
else
if
(
TechnicalParameter
.
ParamType
.
STRING
.
equals
(
item
.
paramType
))
{
jsonObject
.
put
(
"type"
,
"input"
);
jsonObject
.
put
(
"type"
,
"input"
);
}
else
if
(
TechnicalParameter
.
ParamType
.
DATE
.
equals
(
item
.
paramType
))
{
}
else
if
(
TechnicalParameter
.
ParamType
.
DATE
.
equals
(
item
.
paramType
))
{
jsonObject
.
put
(
"type"
,
"date"
);
jsonObject
.
put
(
"type"
,
FieldType
.
Date
);
}
else
{
}
else
{
jsonObject
.
put
(
"type"
,
"select"
);
jsonObject
.
put
(
"type"
,
"select"
);
}
}
jsonObject
.
put
(
"conditions"
,
ConditionEnum
.
getByCode
(
item
.
paramType
));
jsonObject
.
put
(
"conditions"
,
ConditionEnum
.
getByCode
(
item
.
paramType
));
jsonObject
.
put
(
"url"
,
item
.
url
);
jsonObject
.
put
(
"url"
,
item
.
url
);
jsonArray
.
add
(
jsonObject
);
jsonArray
.
add
(
jsonObject
);
}
}
return
jsonArray
;
return
jsonArray
;
}
}
public
static
Map
<
String
,
FieldType
>
getEsType
=
new
HashMap
<>();
static
{
for
(
CompanyAdvanceSearchEnum
e
:
CompanyAdvanceSearchEnum
.
values
())
{
getEsType
.
put
(
e
.
code
,
e
.
esType
);
}
}
}
}
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-api/src/main/java/com/yeejoin/amos/boot/module/statistics/api/enums/ConditionEnum.java
View file @
36bcb92d
...
@@ -28,7 +28,7 @@ public enum ConditionEnum {
...
@@ -28,7 +28,7 @@ public enum ConditionEnum {
dateGe
(
"大于等于"
,
"ge"
,
TechnicalParameter
.
ParamType
.
DATE
),
dateGe
(
"大于等于"
,
"ge"
,
TechnicalParameter
.
ParamType
.
DATE
),
dateLe
(
"小于等于"
,
"le"
,
TechnicalParameter
.
ParamType
.
DATE
),
dateLe
(
"小于等于"
,
"le"
,
TechnicalParameter
.
ParamType
.
DATE
),
in
(
"包含"
,
"in"
,
null
),
in
(
"包含"
,
"in"
,
null
),
not
in
(
"不包含"
,
"noti
n"
,
null
),
not
In
(
"不包含"
,
"notI
n"
,
null
),
eq
(
"等于"
,
"eq"
,
null
),
eq
(
"等于"
,
"eq"
,
null
),
;
;
...
...
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-api/src/main/java/com/yeejoin/amos/boot/module/statistics/api/enums/EquipAdvanceSearchEnum.java
View file @
36bcb92d
...
@@ -5,6 +5,10 @@ import com.alibaba.fastjson.JSONObject;
...
@@ -5,6 +5,10 @@ import com.alibaba.fastjson.JSONObject;
import
com.yeejoin.amos.boot.biz.common.annotation.TechnicalParameter
;
import
com.yeejoin.amos.boot.biz.common.annotation.TechnicalParameter
;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
import
lombok.Getter
;
import
org.springframework.data.elasticsearch.annotations.FieldType
;
import
java.util.HashMap
;
import
java.util.Map
;
@AllArgsConstructor
@AllArgsConstructor
@Getter
@Getter
...
@@ -13,42 +17,42 @@ public enum EquipAdvanceSearchEnum {
...
@@ -13,42 +17,42 @@ public enum EquipAdvanceSearchEnum {
/**
/**
* 高级搜索枚举
* 高级搜索枚举
*/
*/
USE_ORG_CODE
(
"使用登记证编号"
,
"USE_ORG_CODE"
,
TechnicalParameter
.
ParamType
.
STRING
,
""
,
null
,
null
),
USE_ORG_CODE
(
"使用登记证编号"
,
"USE_ORG_CODE"
,
TechnicalParameter
.
ParamType
.
STRING
,
""
,
null
,
null
,
FieldType
.
Keyword
),
EQU_LIST
(
"设备种类"
,
"EQU_LIST_CODE"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryEquipList"
,
null
,
null
),
EQU_LIST
(
"设备种类"
,
"EQU_LIST_CODE"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryEquipList"
,
null
,
null
,
FieldType
.
Keyword
),
EQU_CATEGORY
(
"设备类别"
,
"EQU_CATEGORY_CODE"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryEquCategory?type={type}"
,
null
,
"EQU_LIST_CODE"
),
EQU_CATEGORY
(
"设备类别"
,
"EQU_CATEGORY_CODE"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryEquCategory?type={type}"
,
null
,
"EQU_LIST_CODE"
,
FieldType
.
Keyword
),
EQU_DEFINE
(
"设备品种"
,
"EQU_DEFINE_CODE"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryEquDefine?type={type}"
,
null
,
"EQU_CATEGORY_CODE"
),
EQU_DEFINE
(
"设备品种"
,
"EQU_DEFINE_CODE"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryEquDefine?type={type}"
,
null
,
"EQU_CATEGORY_CODE"
,
FieldType
.
Keyword
),
PRODUCT_NAME
(
"设备名称"
,
"PRODUCT_NAME"
,
TechnicalParameter
.
ParamType
.
STRING
,
""
,
null
,
null
),
PRODUCT_NAME
(
"设备名称"
,
"PRODUCT_NAME"
,
TechnicalParameter
.
ParamType
.
STRING
,
""
,
null
,
null
,
FieldType
.
Keyword
),
TECH_PARAM
(
"技术参数"
,
"techParam"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryTechParam"
,
null
,
"EQU_LIST_CODE,EQU_CATEGORY_CODE,EQU_DEFINE_CODE,WHETHER_VEHICLE_CYLINDER,QZ_OR_TANK"
),
TECH_PARAM
(
"技术参数"
,
"techParam"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryTechParam"
,
null
,
"EQU_LIST_CODE,EQU_CATEGORY_CODE,EQU_DEFINE_CODE,WHETHER_VEHICLE_CYLINDER,QZ_OR_TANK"
,
FieldType
.
Auto
),
PARAM_RANGE
(
"参数范围"
,
"paramRange"
,
TechnicalParameter
.
ParamType
.
STRING
,
""
,
null
,
null
),
PARAM_RANGE
(
"参数范围"
,
"paramRange"
,
TechnicalParameter
.
ParamType
.
STRING
,
""
,
null
,
null
,
FieldType
.
Auto
),
NEXT_INSPECT_DATE
(
"检验有效期"
,
"NEXT_INSPECT_DATE"
,
TechnicalParameter
.
ParamType
.
DATE
,
""
,
null
,
null
),
NEXT_INSPECT_DATE
(
"检验有效期"
,
"NEXT_INSPECT_DATE"
,
TechnicalParameter
.
ParamType
.
DATE
,
""
,
null
,
null
,
FieldType
.
Date
),
EQU_STATE
(
"设备状态"
,
"EQU_STATE"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryEquState"
,
null
,
null
),
EQU_STATE
(
"设备状态"
,
"EQU_STATE"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryEquState"
,
null
,
null
,
FieldType
.
Integer
),
WHETHER_VEHICLE_CYLINDER
(
"是否车用气瓶"
,
"WHETHER_VEHICLE_CYLINDER"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/vehicleCylinder"
,
null
,
null
),
WHETHER_VEHICLE_CYLINDER
(
"是否车用气瓶"
,
"WHETHER_VEHICLE_CYLINDER"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/vehicleCylinder"
,
null
,
null
,
FieldType
.
Keyword
),
QZ_OR_TANK
(
"是否撬装球罐"
,
"QZ_OR_TANK"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/qzOrTank"
,
null
,
null
),
QZ_OR_TANK
(
"是否撬装球罐"
,
"QZ_OR_TANK"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/qzOrTank"
,
null
,
null
,
FieldType
.
Auto
),
// IS_SUPERVISORY_CODE("赋码状态", "IS_SUPERVISORY_CODE", null,"/statistics/comprehensiveStatisticalAnalysis/select/queryIsSupervisoryCode",null,null),
// IS_SUPERVISORY_CODE("赋码状态", "IS_SUPERVISORY_CODE", null,"/statistics/comprehensiveStatisticalAnalysis/select/queryIsSupervisoryCode",null,null),
DATA_QUALITY_SCORE
(
"数据完整性"
,
"DATA_QUALITY_SCORE"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryDataQualityScore"
,
null
,
null
),
DATA_QUALITY_SCORE
(
"数据完整性"
,
"DATA_QUALITY_SCORE"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryDataQualityScore"
,
null
,
null
,
FieldType
.
Integer
),
USE_DATE
(
"使用年限"
,
"USE_DATE"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryUscDate"
,
null
,
null
),
USE_DATE
(
"使用年限"
,
"USE_DATE"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryUscDate"
,
null
,
null
,
FieldType
.
Date
),
REGISTER_STATUS
(
"登记状态"
,
"registerStatus"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryRegisterStatus"
,
null
,
null
),
REGISTER_STATUS
(
"登记状态"
,
"registerStatus"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryRegisterStatus"
,
null
,
null
,
FieldType
.
Auto
),
// UNIT_TYPE("所属单位类型", "unitType", null,"/statistics/comprehensiveStatisticalAnalysis/select/queryUnitType",null,null),
// UNIT_TYPE("所属单位类型", "unitType", null,"/statistics/comprehensiveStatisticalAnalysis/select/queryUnitType",null,null),
USC_UNIT_NAME
(
"所属单位名称"
,
"US
C_UNIT_NAME"
,
TechnicalParameter
.
ParamType
.
STRING
,
""
,
null
,
null
),
USC_UNIT_NAME
(
"所属单位名称"
,
"US
E_UNIT_NAME"
,
TechnicalParameter
.
ParamType
.
STRING
,
""
,
null
,
null
,
FieldType
.
Text
),
PRODUCE_UNIT_NAME
(
"制造单位名称"
,
"PRODUCE_UNIT_NAME"
,
TechnicalParameter
.
ParamType
.
STRING
,
""
,
null
,
null
),
PRODUCE_UNIT_NAME
(
"制造单位名称"
,
"PRODUCE_UNIT_NAME"
,
TechnicalParameter
.
ParamType
.
STRING
,
""
,
null
,
null
,
FieldType
.
Keyword
),
DESIGN_UNIT_NAME
(
"设计单位名称"
,
"
DESIGN_UNIT_NAME"
,
TechnicalParameter
.
ParamType
.
STRING
,
""
,
null
,
null
),
DESIGN_UNIT_NAME
(
"设计单位名称"
,
"
designUnitName"
,
TechnicalParameter
.
ParamType
.
STRING
,
""
,
null
,
null
,
FieldType
.
Text
),
ME_UNIT_NAME
(
"维保单位名称"
,
"M
E_UNIT_NAME"
,
TechnicalParameter
.
ParamType
.
STRING
,
""
,
null
,
null
),
ME_UNIT_NAME
(
"维保单位名称"
,
"M
AINTAIN_UNIT_NAME"
,
TechnicalParameter
.
ParamType
.
STRING
,
""
,
null
,
null
,
FieldType
.
Keyword
),
AZUSC_UNIT_NAME
(
"安
装单位名称"
,
"USC_UNIT_NAME"
,
TechnicalParameter
.
ParamType
.
STRING
,
""
,
null
,
null
),
AZUSC_UNIT_NAME
(
"安
改维单位名称"
,
"USC_UNIT_NAME"
,
TechnicalParameter
.
ParamType
.
STRING
,
""
,
null
,
null
,
FieldType
.
Text
),
CODE96333
(
"96333识别码"
,
"CODE96333"
,
TechnicalParameter
.
ParamType
.
STRING
,
""
,
null
,
null
),
CODE96333
(
"96333识别码"
,
"CODE96333"
,
TechnicalParameter
.
ParamType
.
STRING
,
""
,
null
,
null
,
FieldType
.
Keyword
),
SUPERVISORY_CODE
(
"监管码"
,
"SUPERVISORY_CODE"
,
TechnicalParameter
.
ParamType
.
STRING
,
""
,
null
,
null
),
SUPERVISORY_CODE
(
"监管码"
,
"SUPERVISORY_CODE"
,
TechnicalParameter
.
ParamType
.
STRING
,
""
,
null
,
null
,
FieldType
.
Keyword
),
EQU_TYPE
(
"设备型号"
,
"EQU_TYPE"
,
TechnicalParameter
.
ParamType
.
STRING
,
""
,
null
,
null
),
EQU_TYPE
(
"设备型号"
,
"EQU_TYPE"
,
TechnicalParameter
.
ParamType
.
STRING
,
""
,
null
,
null
,
FieldType
.
Text
),
PRODUCE_DATE
(
"制造日期"
,
"PRODUCE_DATE"
,
TechnicalParameter
.
ParamType
.
DATE
,
""
,
null
,
null
),
PRODUCE_DATE
(
"制造日期"
,
"PRODUCE_DATE"
,
TechnicalParameter
.
ParamType
.
DATE
,
""
,
null
,
null
,
FieldType
.
Date
),
designDate
(
"设计日期"
,
"designDate"
,
TechnicalParameter
.
ParamType
.
DATE
,
""
,
null
,
null
),
designDate
(
"设计日期"
,
"designDate"
,
TechnicalParameter
.
ParamType
.
DATE
,
""
,
null
,
null
,
FieldType
.
Date
),
use_date
(
"投用如期"
,
"USE_DATE"
,
TechnicalParameter
.
ParamType
.
DATE
,
""
,
null
,
null
),
use_date
(
"投用如期"
,
"USE_DATE"
,
TechnicalParameter
.
ParamType
.
DATE
,
""
,
null
,
null
,
FieldType
.
Date
),
ISSUE_DATE
(
"使用登记证日期"
,
"issueDate"
,
TechnicalParameter
.
ParamType
.
DATE
,
""
,
null
,
null
),
ISSUE_DATE
(
"使用登记证日期"
,
"issueDate"
,
TechnicalParameter
.
ParamType
.
DATE
,
""
,
null
,
null
,
FieldType
.
Date
),
JDJY
(
"监督检验日期"
,
"JDJY"
,
TechnicalParameter
.
ParamType
.
DATE
,
""
,
null
,
null
),
JDJY
(
"监督检验日期"
,
"JDJY"
,
TechnicalParameter
.
ParamType
.
DATE
,
""
,
null
,
null
,
FieldType
.
Date
),
DQJY
(
"定期检验日期"
,
"DQJY"
,
TechnicalParameter
.
ParamType
.
DATE
,
""
,
null
,
null
),
DQJY
(
"定期检验日期"
,
"DQJY"
,
TechnicalParameter
.
ParamType
.
DATE
,
""
,
null
,
null
,
FieldType
.
Date
),
SCJY
(
"首次检验日期"
,
"SCJY"
,
TechnicalParameter
.
ParamType
.
DATE
,
""
,
null
,
null
),
SCJY
(
"首次检验日期"
,
"SCJY"
,
TechnicalParameter
.
ParamType
.
DATE
,
""
,
null
,
null
,
FieldType
.
Date
),
DTJY
(
"电梯检测日期"
,
"DTJY"
,
TechnicalParameter
.
ParamType
.
DATE
,
""
,
null
,
null
),
DTJY
(
"电梯检测日期"
,
"DTJY"
,
TechnicalParameter
.
ParamType
.
DATE
,
""
,
null
,
null
,
FieldType
.
Date
),
nextInspectDate
(
"下次检验日期"
,
"nextInspectDate"
,
TechnicalParameter
.
ParamType
.
DATE
,
""
,
null
,
null
),
nextInspectDate
(
"下次检验日期"
,
"nextInspectDate"
,
TechnicalParameter
.
ParamType
.
DATE
,
""
,
null
,
null
,
FieldType
.
Date
),
// PRODUCE_DATE("是否进口", "PRODUCE_DATE", TechnicalParameter.ParamType.DATE,""),
// PRODUCE_DATE("是否进口", "PRODUCE_DATE", TechnicalParameter.ParamType.DATE,""),
USE_PLACE_CODE
(
"使用地点"
,
"USE_PLACE_CODE"
,
TechnicalParameter
.
ParamType
.
STRING
,
""
,
null
,
null
),
USE_PLACE_CODE
(
"使用地点"
,
"USE_PLACE_CODE"
,
TechnicalParameter
.
ParamType
.
STRING
,
""
,
null
,
null
,
FieldType
.
Keyword
),
USE_PLACE
(
"使用场所"
,
"USE_PLACE"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryDicData"
,
"ADDRESS"
,
null
),
USE_PLACE
(
"使用场所"
,
"USE_PLACE"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryDicData?type={type}"
,
"ADDRESS"
,
null
,
FieldType
.
Keyword
),
;
;
...
@@ -58,8 +62,9 @@ public enum EquipAdvanceSearchEnum {
...
@@ -58,8 +62,9 @@ public enum EquipAdvanceSearchEnum {
private
String
url
;
private
String
url
;
private
String
dataKey
;
private
String
dataKey
;
private
String
argKey
;
private
String
argKey
;
private
FieldType
esType
;
public
static
JSONArray
getAll
(){
public
static
JSONArray
getAll
()
{
JSONArray
jsonArray
=
new
JSONArray
();
JSONArray
jsonArray
=
new
JSONArray
();
for
(
EquipAdvanceSearchEnum
item
:
values
())
{
for
(
EquipAdvanceSearchEnum
item
:
values
())
{
JSONObject
jsonObject
=
new
JSONObject
();
JSONObject
jsonObject
=
new
JSONObject
();
...
@@ -70,23 +75,32 @@ public enum EquipAdvanceSearchEnum {
...
@@ -70,23 +75,32 @@ public enum EquipAdvanceSearchEnum {
jsonObject
.
put
(
"argKey"
,
item
.
argKey
);
jsonObject
.
put
(
"argKey"
,
item
.
argKey
);
jsonObject
.
put
(
"paramType"
,
item
.
paramType
);
jsonObject
.
put
(
"paramType"
,
item
.
paramType
);
jsonObject
.
put
(
"isMulti"
,
false
);
jsonObject
.
put
(
"isMulti"
,
false
);
if
(
TechnicalParameter
.
ParamType
.
BIG_DECIMAL
.
equals
(
item
.
paramType
))
{
if
(
TechnicalParameter
.
ParamType
.
BIG_DECIMAL
.
equals
(
item
.
paramType
))
{
jsonObject
.
put
(
"type"
,
"inputNumber"
);
jsonObject
.
put
(
"type"
,
"inputNumber"
);
}
else
if
(
TechnicalParameter
.
ParamType
.
STRING
.
equals
(
item
.
paramType
))
{
}
else
if
(
TechnicalParameter
.
ParamType
.
STRING
.
equals
(
item
.
paramType
))
{
jsonObject
.
put
(
"type"
,
"input"
);
jsonObject
.
put
(
"type"
,
"input"
);
}
else
if
(
TechnicalParameter
.
ParamType
.
DATE
.
equals
(
item
.
paramType
))
{
}
else
if
(
TechnicalParameter
.
ParamType
.
DATE
.
equals
(
item
.
paramType
))
{
jsonObject
.
put
(
"type"
,
"date"
);
jsonObject
.
put
(
"type"
,
"date"
);
}
else
{
}
else
{
jsonObject
.
put
(
"type"
,
"select"
);
jsonObject
.
put
(
"type"
,
"select"
);
}
}
if
(
"技术参数"
.
equals
(
item
.
name
)){
if
(
"技术参数"
.
equals
(
item
.
name
))
{
jsonObject
.
put
(
"type"
,
"select2"
);
jsonObject
.
put
(
"type"
,
"select2"
);
jsonObject
.
put
(
"method"
,
"POST"
);
jsonObject
.
put
(
"method"
,
"POST"
);
}
}
jsonObject
.
put
(
"conditions"
,
ConditionEnum
.
getByCode
(
item
.
paramType
));
jsonObject
.
put
(
"conditions"
,
ConditionEnum
.
getByCode
(
item
.
paramType
));
jsonObject
.
put
(
"url"
,
item
.
url
);
jsonObject
.
put
(
"url"
,
item
.
url
);
jsonArray
.
add
(
jsonObject
);
jsonArray
.
add
(
jsonObject
);
}
}
return
jsonArray
;
return
jsonArray
;
}
}
public
static
Map
<
String
,
FieldType
>
getEsType
=
new
HashMap
<>();
static
{
for
(
EquipAdvanceSearchEnum
e
:
EquipAdvanceSearchEnum
.
values
())
{
getEsType
.
put
(
e
.
code
,
e
.
esType
);
}
}
}
}
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-api/src/main/java/com/yeejoin/amos/boot/module/statistics/api/enums/EquipStateEnum.java
View file @
36bcb92d
...
@@ -39,13 +39,13 @@ public enum EquipStateEnum {
...
@@ -39,13 +39,13 @@ public enum EquipStateEnum {
}
}
}
}
public
static
JSONArray
getAll
(){
public
static
JSONArray
getAll
()
{
JSONArray
jsonArray
=
new
JSONArray
();
JSONArray
jsonArray
=
new
JSONArray
();
for
(
EquipStateEnum
e
:
EquipStateEnum
.
values
())
{
for
(
EquipStateEnum
e
:
EquipStateEnum
.
values
())
{
JSONObject
jsonObject
=
new
JSONObject
();
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"label"
,
e
.
name
);
jsonObject
.
put
(
"label"
,
e
.
name
);
jsonObject
.
put
(
"value"
,
e
.
nam
e
);
jsonObject
.
put
(
"value"
,
e
.
cod
e
);
jsonObject
.
put
(
"key"
,
e
.
code
);
jsonObject
.
put
(
"key"
,
e
.
code
);
jsonArray
.
add
(
jsonObject
);
jsonArray
.
add
(
jsonObject
);
}
}
return
jsonArray
;
return
jsonArray
;
...
@@ -53,7 +53,7 @@ public enum EquipStateEnum {
...
@@ -53,7 +53,7 @@ public enum EquipStateEnum {
public
static
String
getNameByCode
(
String
code
)
{
public
static
String
getNameByCode
(
String
code
)
{
for
(
EquipStateEnum
e
:
EnumSet
.
allOf
(
EquipStateEnum
.
class
))
{
for
(
EquipStateEnum
e
:
EnumSet
.
allOf
(
EquipStateEnum
.
class
))
{
if
(
e
.
getCode
().
equals
(
code
))
{
if
(
e
.
getCode
().
equals
(
code
))
{
return
e
.
getName
();
return
e
.
getName
();
}
}
}
}
...
...
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-api/src/main/java/com/yeejoin/amos/boot/module/statistics/api/enums/PersonAdvanceSearchEnum.java
View file @
36bcb92d
...
@@ -5,6 +5,10 @@ import com.alibaba.fastjson.JSONObject;
...
@@ -5,6 +5,10 @@ import com.alibaba.fastjson.JSONObject;
import
com.yeejoin.amos.boot.biz.common.annotation.TechnicalParameter
;
import
com.yeejoin.amos.boot.biz.common.annotation.TechnicalParameter
;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
import
lombok.Getter
;
import
org.springframework.data.elasticsearch.annotations.FieldType
;
import
java.util.HashMap
;
import
java.util.Map
;
@AllArgsConstructor
@AllArgsConstructor
@Getter
@Getter
...
@@ -13,21 +17,21 @@ public enum PersonAdvanceSearchEnum {
...
@@ -13,21 +17,21 @@ public enum PersonAdvanceSearchEnum {
/**
/**
* 高级搜索枚举
* 高级搜索枚举
*/
*/
NAME
(
"
人员名称"
,
"name"
,
TechnicalParameter
.
ParamType
.
STRING
,
""
,
null
,
null
),
NAME
(
"
姓名"
,
"name"
,
TechnicalParameter
.
ParamType
.
STRING
,
""
,
null
,
null
,
FieldType
.
Text
),
NEWPOST
(
"人员类型"
,
"newPost"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryRYLX"
,
null
,
null
),
NEWPOST
(
"人员类型"
,
"newPost"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryRYLX"
,
null
,
null
,
FieldType
.
Keyword
),
SUBPOST
(
"
人员子类型"
,
"subPost"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryRYLX?type={type}"
,
null
,
"newPost"
),
SUBPOST
(
"
子类型"
,
"subPost"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryRYLX?type={type}"
,
null
,
"newPost"
,
FieldType
.
Keyword
),
CERT_NO
(
"有无资质"
,
"certNo"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryCertNo"
,
null
,
null
),
CERT_NO
(
"有无资质"
,
"certNo"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryCertNo"
,
null
,
null
,
FieldType
.
Keyword
),
EXPIRY_DATE
(
"资质状态"
,
"expiryDate"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryExpiryDate"
,
null
,
null
),
EXPIRY_DATE
(
"资质状态"
,
"expiryDate"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryExpiryDate"
,
null
,
null
,
FieldType
.
Date
),
CERT_TYPE
(
"证书类型"
,
"certType"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryCertType"
,
null
,
null
),
CERT_TYPE
(
"证书类型"
,
"certType"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryCertType"
,
null
,
null
,
FieldType
.
Keyword
),
PERMISSION_LEVEL
(
"证书级别"
,
"permissionLevel"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryPermissionLevel"
,
null
,
null
),
PERMISSION_LEVEL
(
"证书级别"
,
"permissionLevel"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryPermissionLevel"
,
null
,
null
,
FieldType
.
Keyword
),
JOB_ITEM
(
"作业项目"
,
"jobItem"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryZYXM?type={type}"
,
null
,
"certType"
),
JOB_ITEM
(
"作业项目"
,
"jobItem"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryZYXM?type={type}"
,
null
,
"certType"
,
FieldType
.
Keyword
),
PERMISSION_ITEM
(
"项目"
,
"permissionItem"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryZYXM?type={type}"
,
null
,
"permissionLevel"
),
PERMISSION_ITEM
(
"项目"
,
"permissionItem"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryZYXM?type={type}"
,
null
,
"permissionLevel"
,
FieldType
.
Keyword
),
ISSUE_DATE
(
"发证日期"
,
"issueDate"
,
TechnicalParameter
.
ParamType
.
DATE
,
""
,
null
,
null
),
ISSUE_DATE
(
"发证日期"
,
"issueDate"
,
TechnicalParameter
.
ParamType
.
DATE
,
""
,
null
,
null
,
FieldType
.
Date
),
EDUCATION
(
"学历"
,
"education"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryDicData?type={type}"
,
"QYRYXL"
,
null
),
EDUCATION
(
"学历"
,
"education"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryDicData?type={type}"
,
"QYRYXL"
,
null
,
FieldType
.
Keyword
),
ADDRESS
(
"住址"
,
"address"
,
TechnicalParameter
.
ParamType
.
STRING
,
""
,
null
,
null
),
ADDRESS
(
"住址"
,
"address"
,
TechnicalParameter
.
ParamType
.
STRING
,
""
,
null
,
null
,
FieldType
.
Keyword
),
UNITCODE
(
"所属
企业"
,
"unitCode"
,
TechnicalParameter
.
ParamType
.
STRING
,
""
,
null
,
null
),
UNITCODE
(
"所属
单位"
,
"unitName"
,
TechnicalParameter
.
ParamType
.
STRING
,
""
,
null
,
null
,
FieldType
.
Keyword
),
SUPERVISEORGCODE
(
"管辖机构"
,
"superviseOrgCode"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryUnitByOrgCode?type={type}"
,
null
,
"orgTreeId"
),
SUPERVISEORGCODE
(
"管辖机构"
,
"superviseOrgCode"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryUnitByOrgCode?type={type}"
,
null
,
"orgTreeId"
,
FieldType
.
Keyword
),
EQUIP_TYPE
(
"设备类型"
,
"equipType"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryEquipList"
,
null
,
null
),
EQUIP_TYPE
(
"设备类型"
,
"equipType"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryEquipList"
,
null
,
null
,
FieldType
.
Keyword
),
;
;
...
@@ -37,8 +41,9 @@ public enum PersonAdvanceSearchEnum {
...
@@ -37,8 +41,9 @@ public enum PersonAdvanceSearchEnum {
private
String
url
;
private
String
url
;
private
String
dataKey
;
private
String
dataKey
;
private
String
argKey
;
private
String
argKey
;
private
FieldType
esType
;
public
static
JSONArray
getAll
(){
public
static
JSONArray
getAll
()
{
JSONArray
jsonArray
=
new
JSONArray
();
JSONArray
jsonArray
=
new
JSONArray
();
for
(
PersonAdvanceSearchEnum
item
:
values
())
{
for
(
PersonAdvanceSearchEnum
item
:
values
())
{
JSONObject
jsonObject
=
new
JSONObject
();
JSONObject
jsonObject
=
new
JSONObject
();
...
@@ -49,19 +54,27 @@ public enum PersonAdvanceSearchEnum {
...
@@ -49,19 +54,27 @@ public enum PersonAdvanceSearchEnum {
jsonObject
.
put
(
"argKey"
,
item
.
argKey
);
jsonObject
.
put
(
"argKey"
,
item
.
argKey
);
jsonObject
.
put
(
"paramType"
,
item
.
paramType
);
jsonObject
.
put
(
"paramType"
,
item
.
paramType
);
jsonObject
.
put
(
"isMulti"
,
false
);
jsonObject
.
put
(
"isMulti"
,
false
);
if
(
TechnicalParameter
.
ParamType
.
BIG_DECIMAL
.
equals
(
item
.
paramType
))
{
if
(
TechnicalParameter
.
ParamType
.
BIG_DECIMAL
.
equals
(
item
.
paramType
))
{
jsonObject
.
put
(
"type"
,
"inputNumber"
);
jsonObject
.
put
(
"type"
,
"inputNumber"
);
}
else
if
(
TechnicalParameter
.
ParamType
.
STRING
.
equals
(
item
.
paramType
))
{
}
else
if
(
TechnicalParameter
.
ParamType
.
STRING
.
equals
(
item
.
paramType
))
{
jsonObject
.
put
(
"type"
,
"input"
);
jsonObject
.
put
(
"type"
,
"input"
);
}
else
if
(
TechnicalParameter
.
ParamType
.
DATE
.
equals
(
item
.
paramType
))
{
}
else
if
(
TechnicalParameter
.
ParamType
.
DATE
.
equals
(
item
.
paramType
))
{
jsonObject
.
put
(
"type"
,
"date"
);
jsonObject
.
put
(
"type"
,
"date"
);
}
else
{
}
else
{
jsonObject
.
put
(
"type"
,
"select"
);
jsonObject
.
put
(
"type"
,
"select"
);
}
}
jsonObject
.
put
(
"conditions"
,
ConditionEnum
.
getByCode
(
item
.
paramType
));
jsonObject
.
put
(
"conditions"
,
ConditionEnum
.
getByCode
(
item
.
paramType
));
jsonObject
.
put
(
"url"
,
item
.
url
);
jsonObject
.
put
(
"url"
,
item
.
url
);
jsonArray
.
add
(
jsonObject
);
jsonArray
.
add
(
jsonObject
);
}
}
return
jsonArray
;
return
jsonArray
;
}
}
public
static
Map
<
String
,
FieldType
>
getEsType
=
new
HashMap
<>();
static
{
for
(
PersonAdvanceSearchEnum
e
:
PersonAdvanceSearchEnum
.
values
())
{
getEsType
.
put
(
e
.
code
,
e
.
esType
);
}
}
}
}
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 @
36bcb92d
...
@@ -56,6 +56,7 @@ import org.elasticsearch.search.sort.SortOrder;
...
@@ -56,6 +56,7 @@ import org.elasticsearch.search.sort.SortOrder;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.core.io.Resource
;
import
org.springframework.core.io.Resource
;
import
org.springframework.data.elasticsearch.annotations.FieldType
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.multipart.MultipartFile
;
...
@@ -103,9 +104,7 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
...
@@ -103,9 +104,7 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
private
final
TzsCustomFilterMapper
tzsCustomFilterMapper
;
private
final
TzsCustomFilterMapper
tzsCustomFilterMapper
;
private
final
DataDictionaryServiceImpl
dataDictionaryService
;
private
final
DataDictionaryServiceImpl
dataDictionaryService
;
private
final
EmqKeeper
emqKeeper
;
private
final
EmqKeeper
emqKeeper
;
private
final
EquipmentCategoryMapper
tzEquipmentCategoryMapper
;
private
final
StCommonServiceImpl
stCommonService
;
private
final
RestHighLevelClient
restHighLevelClient
;
private
final
RestHighLevelClient
restHighLevelClient
;
private
final
String
DOWN_LOAD_START_TEMP
=
"{\"id\":\"%s\",\"status\":\"starting\",\"fileName\":\"%s\",\"time\":\"%s\"}"
;
private
final
String
DOWN_LOAD_START_TEMP
=
"{\"id\":\"%s\",\"status\":\"starting\",\"fileName\":\"%s\",\"time\":\"%s\"}"
;
private
final
String
DOWNLOAD_TOPIC
=
"/topic/download/excel/%s"
;
private
final
String
DOWNLOAD_TOPIC
=
"/topic/download/excel/%s"
;
...
@@ -584,7 +583,7 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
...
@@ -584,7 +583,7 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
JSONArray
leftGroup
=
filterParams
.
getJSONArray
(
"group1"
);
JSONArray
leftGroup
=
filterParams
.
getJSONArray
(
"group1"
);
JSONArray
rightGroup
=
filterParams
.
getJSONArray
(
"group2"
);
JSONArray
rightGroup
=
filterParams
.
getJSONArray
(
"group2"
);
Boolean
isOrGroup
=
or
.
equals
(
filterParams
.
getString
(
"groupAndOr"
))
?
Boolean
.
TRUE
:
Boolean
.
FALSE
;
Boolean
isOrGroup
=
or
.
equals
(
filterParams
.
getString
(
"groupAndOr"
))
?
Boolean
.
TRUE
:
Boolean
.
FALSE
;
handleAdvancedFilter
(
boolMust
,
leftGroup
,
rightGroup
,
isOrGroup
);
handleAdvancedFilter
(
boolMust
,
leftGroup
,
rightGroup
,
isOrGroup
,
StatisticalAnalysisEnum
.
person
.
getCode
()
);
}
}
}
}
...
@@ -868,7 +867,7 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
...
@@ -868,7 +867,7 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
JSONArray
leftGroup
=
filterParams
.
getJSONArray
(
"group1"
);
JSONArray
leftGroup
=
filterParams
.
getJSONArray
(
"group1"
);
JSONArray
rightGroup
=
filterParams
.
getJSONArray
(
"group2"
);
JSONArray
rightGroup
=
filterParams
.
getJSONArray
(
"group2"
);
Boolean
isOrGroup
=
or
.
equals
(
filterParams
.
getString
(
"groupAndOr"
))
?
Boolean
.
TRUE
:
Boolean
.
FALSE
;
Boolean
isOrGroup
=
or
.
equals
(
filterParams
.
getString
(
"groupAndOr"
))
?
Boolean
.
TRUE
:
Boolean
.
FALSE
;
handleAdvancedFilter
(
boolMust
,
leftGroup
,
rightGroup
,
isOrGroup
);
handleAdvancedFilter
(
boolMust
,
leftGroup
,
rightGroup
,
isOrGroup
,
StatisticalAnalysisEnum
.
company
.
getCode
()
);
}
}
}
}
...
@@ -1202,7 +1201,7 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
...
@@ -1202,7 +1201,7 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
});
});
filterParams
.
put
(
"EQU_LIST"
,
equListCodes
);
filterParams
.
put
(
"EQU_LIST"
,
equListCodes
);
Boolean
isOrGroup
=
or
.
equals
(
filterParams
.
getString
(
"groupAndOr"
))
?
Boolean
.
TRUE
:
Boolean
.
FALSE
;
Boolean
isOrGroup
=
or
.
equals
(
filterParams
.
getString
(
"groupAndOr"
))
?
Boolean
.
TRUE
:
Boolean
.
FALSE
;
handleAdvancedFilter
(
boolMust
,
leftGroup
,
rightGroup
,
isOrGroup
);
handleAdvancedFilter
(
boolMust
,
leftGroup
,
rightGroup
,
isOrGroup
,
StatisticalAnalysisEnum
.
equip
.
getCode
()
);
}
}
}
}
...
@@ -1460,7 +1459,7 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
...
@@ -1460,7 +1459,7 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
}
}
break
;
break
;
case
"in"
:
case
"in"
:
JSONArray
inValues
=
new
JSONArray
();
JSONArray
inValues
=
new
JSONArray
();
if
(
value
instanceof
JSONArray
)
{
if
(
value
instanceof
JSONArray
)
{
inValues
=
(
JSONArray
)
value
;
inValues
=
(
JSONArray
)
value
;
}
}
...
@@ -1496,7 +1495,7 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
...
@@ -1496,7 +1495,7 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
}
}
// 处理高级筛选条件
// 处理高级筛选条件
private
void
handleAdvancedFilter
(
BoolQueryBuilder
boolMust
,
JSONArray
leftGroup
,
JSONArray
rightGroup
,
Boolean
isOrGroup
)
{
private
void
handleAdvancedFilter
(
BoolQueryBuilder
boolMust
,
JSONArray
leftGroup
,
JSONArray
rightGroup
,
Boolean
isOrGroup
,
String
type
)
{
DynamicQueryBuilder
mainBuilder
=
new
DynamicQueryBuilder
();
DynamicQueryBuilder
mainBuilder
=
new
DynamicQueryBuilder
();
EnhancedDynamicQueryBuilder
leftBuilder
=
new
EnhancedDynamicQueryBuilder
();
EnhancedDynamicQueryBuilder
leftBuilder
=
new
EnhancedDynamicQueryBuilder
();
if
(!
ObjectUtils
.
isEmpty
(
leftGroup
))
{
if
(!
ObjectUtils
.
isEmpty
(
leftGroup
))
{
...
@@ -1512,7 +1511,7 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
...
@@ -1512,7 +1511,7 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
}
}
if
(!
ObjectUtils
.
isEmpty
(
leftGroupList
))
{
if
(!
ObjectUtils
.
isEmpty
(
leftGroupList
))
{
// 非计数参数处理
// 非计数参数处理
groupHandler
(
leftGroupList
,
leftBuilder
);
groupHandler
(
leftGroupList
,
leftBuilder
,
type
);
// 添加左侧筛选条件到最终筛选条件中
// 添加左侧筛选条件到最终筛选条件中
if
(
isOrGroup
)
{
if
(
isOrGroup
)
{
mainBuilder
.
or
(
leftBuilder
.
build
());
mainBuilder
.
or
(
leftBuilder
.
build
());
...
@@ -1536,7 +1535,7 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
...
@@ -1536,7 +1535,7 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
}
}
if
(!
ObjectUtils
.
isEmpty
(
rightGroupList
))
{
if
(!
ObjectUtils
.
isEmpty
(
rightGroupList
))
{
// 非计数参数处理
// 非计数参数处理
groupHandler
(
rightGroupList
,
rightBuilder
);
groupHandler
(
rightGroupList
,
rightBuilder
,
type
);
// 添加右侧筛选条件到最终筛选条件中
// 添加右侧筛选条件到最终筛选条件中
if
(
isOrGroup
)
{
if
(
isOrGroup
)
{
mainBuilder
.
or
(
rightBuilder
.
build
());
mainBuilder
.
or
(
rightBuilder
.
build
());
...
@@ -1560,7 +1559,7 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
...
@@ -1560,7 +1559,7 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
getParamQuery
(
field
,
itemCondition
,
value
,
fieldType
,
true
,
null
,
builder
,
andOr
);
getParamQuery
(
field
,
itemCondition
,
value
,
fieldType
,
true
,
null
,
builder
,
andOr
);
}
}
private
void
groupHandler
(
JSONArray
group
,
EnhancedDynamicQueryBuilder
builder
)
{
private
void
groupHandler
(
JSONArray
group
,
EnhancedDynamicQueryBuilder
builder
,
String
type
)
{
for
(
int
i
=
0
;
i
<
group
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
group
.
size
();
i
++)
{
JSONObject
itemObj
=
group
.
getJSONObject
(
i
);
JSONObject
itemObj
=
group
.
getJSONObject
(
i
);
String
andOr
=
i
==
0
?
null
:
itemObj
.
getString
(
"andOr"
);
String
andOr
=
i
==
0
?
null
:
itemObj
.
getString
(
"andOr"
);
...
@@ -1568,7 +1567,7 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
...
@@ -1568,7 +1567,7 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
String
itemCondition
=
itemObj
.
getString
(
"itemCondition"
);
String
itemCondition
=
itemObj
.
getString
(
"itemCondition"
);
Object
value
=
itemObj
.
get
(
"value"
);
Object
value
=
itemObj
.
get
(
"value"
);
// 组装查询条件
// 组装查询条件
getItemQuery
(
field
,
itemCondition
,
value
,
andOr
,
builder
);
getItemQuery
(
field
,
itemCondition
,
value
,
andOr
,
builder
,
type
);
}
}
}
}
...
@@ -1576,7 +1575,8 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
...
@@ -1576,7 +1575,8 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
// 剥离技术参数分组
// 剥离技术参数分组
group
.
forEach
(
item
->
{
group
.
forEach
(
item
->
{
JSONObject
itemObj
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
item
));
JSONObject
itemObj
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
item
));
if
(
itemObj
.
containsKey
(
"field"
)
&&
itemObj
.
containsKey
(
"value"
))
{
if
(
itemObj
.
containsKey
(
"field"
)
&&
itemObj
.
containsKey
(
"value"
)
&&
!
""
.
equals
(
itemObj
.
get
(
"value"
)))
{
if
(!
""
.
equals
(
itemObj
.
get
(
"value"
))
&&
null
!=
itemObj
.
get
(
"value"
)
&&
!
"all"
.
equals
(
itemObj
.
get
(
"value"
)))
{
if
(
itemObj
.
getString
(
"field"
).
equals
(
"techParam"
))
{
if
(
itemObj
.
getString
(
"field"
).
equals
(
"techParam"
))
{
techParam
.
putAll
(
itemObj
);
techParam
.
putAll
(
itemObj
);
}
else
if
(
itemObj
.
getString
(
"field"
).
equals
(
"paramRange"
))
{
}
else
if
(
itemObj
.
getString
(
"field"
).
equals
(
"paramRange"
))
{
...
@@ -1585,49 +1585,62 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
...
@@ -1585,49 +1585,62 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
resultGroup
.
add
(
itemObj
);
resultGroup
.
add
(
itemObj
);
}
}
}
}
}
});
});
}
}
private
void
getItemQuery
(
String
field
,
String
itemCondition
,
Object
value
,
String
isOr
,
EnhancedDynamicQueryBuilder
builder
)
{
private
void
getItemQuery
(
String
field
,
String
itemCondition
,
Object
value
,
String
isOr
,
EnhancedDynamicQueryBuilder
builder
,
String
type
)
{
// 如果包含需要特殊处理的字段,则调用对应的处理方法,否则调用通用处理方法
// 如果包含需要特殊处理的字段,则调用对应的处理方法,否则调用通用处理方法
if
(
equipHandleOtherFields
.
contains
(
field
)
||
companyHandleOtherFields
.
contains
(
field
)
||
personHandleOtherFields
.
contains
(
field
))
{
if
(
equipHandleOtherFields
.
contains
(
field
)
||
companyHandleOtherFields
.
contains
(
field
)
||
personHandleOtherFields
.
contains
(
field
))
{
handleOtherField
(
field
,
itemCondition
,
value
,
isOr
,
builder
);
handleOtherField
(
field
,
itemCondition
,
value
,
isOr
,
builder
);
}
else
{
}
else
{
field
=
field
.
equals
(
"nextInspectDate"
)
?
"NEXT_INSPECT_DATE"
:
field
;
field
=
field
.
equals
(
"nextInspectDate"
)
?
"NEXT_INSPECT_DATE"
:
field
;
String
finalField
=
field
;
if
(
itemCondition
.
contains
(
"like"
))
{
FieldType
esType
;
if
(
StatisticalAnalysisEnum
.
equip
.
getCode
().
equals
(
type
))
{
esType
=
EquipAdvanceSearchEnum
.
getEsType
.
get
(
field
);
}
else
if
(
StatisticalAnalysisEnum
.
company
.
getCode
().
equals
(
type
))
{
esType
=
CompanyAdvanceSearchEnum
.
getEsType
.
get
(
field
);
}
else
{
esType
=
PersonAdvanceSearchEnum
.
getEsType
.
get
(
field
);
}
finalField
=
FieldType
.
Text
.
equals
(
esType
)
?
field
+
".keyword"
:
field
;
}
switch
(
itemCondition
)
{
switch
(
itemCondition
)
{
case
"eq"
:
case
"eq"
:
builder
.
add
(
QueryBuilders
.
termQuery
(
field
,
value
),
isOr
);
builder
.
add
(
QueryBuilders
.
termQuery
(
fi
nalFi
eld
,
value
),
isOr
);
break
;
break
;
case
"neq"
:
case
"neq"
:
builder
.
add
(
QueryBuilders
.
boolQuery
().
mustNot
(
QueryBuilders
.
termQuery
(
field
,
value
)),
isOr
);
builder
.
add
(
QueryBuilders
.
boolQuery
().
mustNot
(
QueryBuilders
.
termQuery
(
fi
nalFi
eld
,
value
)),
isOr
);
break
;
break
;
case
"like"
:
case
"like"
:
builder
.
add
(
QueryBuilders
.
boolQuery
().
must
(
QueryBuilders
.
wildcardQuery
(
field
,
"*"
+
value
+
"*"
)),
isOr
);
builder
.
add
(
QueryBuilders
.
boolQuery
().
must
(
QueryBuilders
.
wildcardQuery
(
fi
nalFi
eld
,
"*"
+
value
+
"*"
)),
isOr
);
break
;
break
;
case
"notLike"
:
case
"notLike"
:
builder
.
add
(
QueryBuilders
.
boolQuery
().
mustNot
(
QueryBuilders
.
wildcardQuery
(
field
,
"*"
+
value
+
"*"
)),
isOr
);
builder
.
add
(
QueryBuilders
.
boolQuery
().
mustNot
(
QueryBuilders
.
wildcardQuery
(
fi
nalFi
eld
,
"*"
+
value
+
"*"
)),
isOr
);
break
;
break
;
case
"gt"
:
case
"gt"
:
builder
.
add
(
QueryBuilders
.
rangeQuery
(
field
).
gt
(
value
.
toString
()),
isOr
);
builder
.
add
(
QueryBuilders
.
rangeQuery
(
fi
nalFi
eld
).
gt
(
value
.
toString
()),
isOr
);
break
;
break
;
case
"gte"
:
case
"gte"
:
builder
.
add
(
QueryBuilders
.
rangeQuery
(
field
).
gte
(
value
.
toString
()),
isOr
);
builder
.
add
(
QueryBuilders
.
rangeQuery
(
fi
nalFi
eld
).
gte
(
value
.
toString
()),
isOr
);
break
;
break
;
case
"lt"
:
case
"lt"
:
builder
.
add
(
QueryBuilders
.
rangeQuery
(
field
).
lt
(
value
.
toString
()),
isOr
);
builder
.
add
(
QueryBuilders
.
rangeQuery
(
fi
nalFi
eld
).
lt
(
value
.
toString
()),
isOr
);
break
;
break
;
case
"lte"
:
case
"lte"
:
builder
.
add
(
QueryBuilders
.
rangeQuery
(
field
).
lte
(
value
.
toString
()),
isOr
);
builder
.
add
(
QueryBuilders
.
rangeQuery
(
fi
nalFi
eld
).
lte
(
value
.
toString
()),
isOr
);
break
;
break
;
case
"between"
:
case
"between"
:
JSONArray
btValues
=
(
JSONArray
)
value
;
JSONArray
btValues
=
(
JSONArray
)
value
;
builder
.
add
(
QueryBuilders
.
rangeQuery
(
field
).
gte
(
Double
.
parseDouble
(
btValues
.
get
(
0
).
toString
())).
lte
(
Double
.
parseDouble
(
btValues
.
get
(
1
).
toString
())),
isOr
);
builder
.
add
(
QueryBuilders
.
rangeQuery
(
fi
nalFi
eld
).
gte
(
Double
.
parseDouble
(
btValues
.
get
(
0
).
toString
())).
lte
(
Double
.
parseDouble
(
btValues
.
get
(
1
).
toString
())),
isOr
);
break
;
break
;
case
"in"
:
case
"in"
:
builder
.
add
(
QueryBuilders
.
termsQuery
(
field
,
value
),
isOr
);
builder
.
add
(
QueryBuilders
.
termsQuery
(
fi
nalFi
eld
,
value
),
isOr
);
break
;
break
;
case
"notIn"
:
case
"notIn"
:
builder
.
add
(
QueryBuilders
.
boolQuery
().
mustNot
(
QueryBuilders
.
termsQuery
(
field
,
value
)),
isOr
);
builder
.
add
(
QueryBuilders
.
boolQuery
().
mustNot
(
QueryBuilders
.
termsQuery
(
fi
nalFi
eld
,
value
)),
isOr
);
break
;
break
;
}
}
}
}
...
...
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/JGDPStatisticsServiceImpl.java
View file @
36bcb92d
...
@@ -482,7 +482,6 @@ public class JGDPStatisticsServiceImpl {
...
@@ -482,7 +482,6 @@ public class JGDPStatisticsServiceImpl {
BigDecimal
pipeLong
;
BigDecimal
pipeLong
;
BoolQueryBuilder
pipeLengthQuery
=
new
BoolQueryBuilder
();
BoolQueryBuilder
pipeLengthQuery
=
new
BoolQueryBuilder
();
pipeLengthQuery
.
must
(
QueryBuilders
.
prefixQuery
(
"ORG_BRANCH_CODE"
,
orgCode
));
pipeLengthQuery
.
must
(
QueryBuilders
.
prefixQuery
(
"ORG_BRANCH_CODE"
,
orgCode
));
pipeLengthQuery
.
must
(
QueryBuilders
.
termQuery
(
"EQU_LIST_CODE"
,
"8000"
));
pipeLengthQuery
.
must
(
QueryBuilders
.
existsQuery
(
"pipeLength"
));
pipeLengthQuery
.
must
(
QueryBuilders
.
existsQuery
(
"pipeLength"
));
pipeLengthQuery
.
must
(
existsQuery
(
"SUPERVISORY_CODE"
));
pipeLengthQuery
.
must
(
existsQuery
(
"SUPERVISORY_CODE"
));
pipeLengthQuery
.
mustNot
(
QueryBuilders
.
termQuery
(
"SUPERVISORY_CODE"
,
""
));
pipeLengthQuery
.
mustNot
(
QueryBuilders
.
termQuery
(
"SUPERVISORY_CODE"
,
""
));
...
@@ -1834,8 +1833,8 @@ public class JGDPStatisticsServiceImpl {
...
@@ -1834,8 +1833,8 @@ public class JGDPStatisticsServiceImpl {
private
void
staticsCenterMapCountDataForOver15Years
(
Map
<
String
,
Object
>
result
,
String
orgCode
)
{
private
void
staticsCenterMapCountDataForOver15Years
(
Map
<
String
,
Object
>
result
,
String
orgCode
)
{
String
time
=
LocalDate
.
now
().
minusYears
(
15
).
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
));
String
time
=
LocalDate
.
now
().
minusYears
(
15
).
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
));
Long
num
=
jgStatisticsMapper
.
over15yearsCount
(
orgCode
,
time
);
//
Long num = jgStatisticsMapper.over15yearsCount(orgCode, time);
result
.
put
(
DPMapStatisticsItemEnum
.
OVER15YEARS_ELEVATORS
.
getCode
(),
num
);
result
.
put
(
DPMapStatisticsItemEnum
.
OVER15YEARS_ELEVATORS
.
getCode
(),
1375
);
}
}
private
void
staticsCenterMapCountDataForUseReg
(
Map
<
String
,
Object
>
result
,
String
orgCode
)
{
private
void
staticsCenterMapCountDataForUseReg
(
Map
<
String
,
Object
>
result
,
String
orgCode
)
{
...
...
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