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
7f52fe37
Commit
7f52fe37
authored
Jul 30, 2025
by
tianyiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug修改
parent
4dac010d
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
216 additions
and
75 deletions
+216
-75
ElevatorTechParamDefine.java
...s/boot/module/common/api/dto/ElevatorTechParamDefine.java
+3
-3
CompanyAdvanceSearchEnum.java
...module/statistics/api/enums/CompanyAdvanceSearchEnum.java
+1
-1
PersonAdvanceSearchEnum.java
.../module/statistics/api/enums/PersonAdvanceSearchEnum.java
+4
-5
ComprehensiveStatisticalAnalysisController.java
...ontroller/ComprehensiveStatisticalAnalysisController.java
+46
-0
ComprehensiveStatisticalAnalysisServiceImpl.java
...ice/impl/ComprehensiveStatisticalAnalysisServiceImpl.java
+158
-65
DPSubServiceImpl.java
...t/module/statistcs/biz/service/impl/DPSubServiceImpl.java
+4
-1
No files found.
amos-boot-system-tzs/amos-boot-module-common/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/dto/ElevatorTechParamDefine.java
View file @
7f52fe37
...
...
@@ -60,9 +60,9 @@ public class ElevatorTechParamDefine implements ITechParamDefine {
@TechnicalParameter
(
key
=
"explosionproofGrade"
,
label
=
"区域防爆等级"
,
equCategory
=
{
"3400"
},
equDefine
=
{
"3410"
},
type
=
TechnicalParameter
.
ParamType
.
STRING
,
dictCode
=
"FBDJ"
)
private
String
explosionproofGrade
;
@TechnicalParameter
(
key
=
"explosionproofSignComplete"
,
label
=
"整机防爆标志"
,
equCategory
=
{
"3400"
},
equDefine
=
{
"3410"
},
type
=
TechnicalParameter
.
ParamType
.
STRING
)
private
String
explosionproofSignComplete
;
// 附件上传类型的参数,无法参与查询,暂时注释掉
//
@TechnicalParameter(key = "explosionproofSignComplete", label = "整机防爆标志", equCategory = {"3400"}, equDefine = {"3410"}, type = TechnicalParameter.ParamType.STRING)
//
private String explosionproofSignComplete;
@TechnicalParameter
(
key
=
"nominalSpeed"
,
label
=
"名义速度"
,
equCategory
=
{
"3300"
},
type
=
TechnicalParameter
.
ParamType
.
BIG_DECIMAL
,
unit
=
"m/s"
)
...
...
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 @
7f52fe37
...
...
@@ -24,7 +24,7 @@ public enum CompanyAdvanceSearchEnum {
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
,
FieldType
.
Text
),
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"
,
FieldType
.
Text
),
SUB_ITEM_CODE
(
"许可子项目"
,
"subItemCode"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/query
Sub
XK?type={type}"
,
null
,
"itemCode"
,
FieldType
.
Text
),
OPERATING_STATUS
(
"经营状态"
,
"operatingStatus"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryDicDataNew?type={type}"
,
"jyzt"
,
null
,
FieldType
.
Text
),
EQUIP_CATEGORY
(
"设备类型"
,
"equipCategory"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryEquipList"
,
null
,
null
,
FieldType
.
Text
),
PERMIT_STATUS
(
"许可状态"
,
"permitStatus"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/permitStatus"
,
null
,
null
,
FieldType
.
Auto
),
...
...
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 @
7f52fe37
...
...
@@ -17,20 +17,19 @@ public enum PersonAdvanceSearchEnum {
/**
* 高级搜索枚举
*/
NAME
(
"姓名"
,
"name"
,
TechnicalParameter
.
ParamType
.
STRING
,
""
,
null
,
null
,
FieldType
.
Text
),
NAME
(
"姓名"
,
"name"
,
TechnicalParameter
.
ParamType
.
STRING
,
""
,
null
,
null
,
FieldType
.
Keyword
),
NEWPOST
(
"人员类型"
,
"newPost"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryRYLX"
,
null
,
null
,
FieldType
.
Keyword
),
SUBPOST
(
"子类型"
,
"subPost"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryRYLX?type={type}"
,
null
,
"newPost"
,
FieldType
.
Keyword
),
SUBPOST
(
"子类型"
,
"subPost"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/query
Sub
RYLX?type={type}"
,
null
,
"newPost"
,
FieldType
.
Keyword
),
CERT_NO
(
"有无资质"
,
"certNo"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryCertNo"
,
null
,
null
,
FieldType
.
Keyword
),
EXPIRY_DATE
(
"资质状态"
,
"expiryDate"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryExpiryDate"
,
null
,
null
,
FieldType
.
Date
),
CERT_TYPE
(
"证书类型"
,
"certType"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryCertType"
,
null
,
null
,
FieldType
.
Keyword
),
PERMISSION_LEVEL
(
"证书级别"
,
"permissionLevel"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryPermissionLevel"
,
null
,
null
,
FieldType
.
Keyword
),
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"
,
FieldType
.
Keyword
),
JOB_ITEM
(
"作业项目"
,
"jobItem"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/query
Type
ZYXM?type={type}"
,
null
,
"certType"
,
FieldType
.
Keyword
),
PERMISSION_ITEM
(
"项目"
,
"permissionItem"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/query
Level
ZYXM?type={type}"
,
null
,
"permissionLevel"
,
FieldType
.
Keyword
),
ISSUE_DATE
(
"发证日期"
,
"issueDate"
,
TechnicalParameter
.
ParamType
.
DATE
,
""
,
null
,
null
,
FieldType
.
Date
),
EDUCATION
(
"学历"
,
"education"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryDicData?type={type}"
,
"QYRYXL"
,
null
,
FieldType
.
Keyword
),
ADDRESS
(
"住址"
,
"address"
,
TechnicalParameter
.
ParamType
.
STRING
,
""
,
null
,
null
,
FieldType
.
Keyword
),
UNITCODE
(
"所属单位"
,
"unitName"
,
TechnicalParameter
.
ParamType
.
STRING
,
""
,
null
,
null
,
FieldType
.
Keyword
),
SUPERVISEORGCODE
(
"管辖机构"
,
"superviseOrgCode"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryUnitByOrgCode?type={type}"
,
null
,
"orgTreeId"
,
FieldType
.
Keyword
),
EQUIP_TYPE
(
"设备类型"
,
"equipType"
,
null
,
"/statistics/comprehensiveStatisticalAnalysis/select/queryEquipList"
,
null
,
null
,
FieldType
.
Keyword
),
;
...
...
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 @
7f52fe37
...
...
@@ -123,6 +123,18 @@ public class ComprehensiveStatisticalAnalysisController extends BaseController {
return
ResponseHelper
.
buildResponse
(
statisticalAnalysisService
.
queryXK
(
type
));
}
/**
* @param
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/select/querySubXK"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"高级筛选查询许可子项目"
,
notes
=
"高级筛选查询许可子项目"
)
public
ResponseModel
<
JSONArray
>
querySubXK
(
@RequestParam
(
required
=
false
)
String
type
)
{
return
ResponseHelper
.
buildResponse
(
statisticalAnalysisService
.
querySubXK
(
type
));
}
/**
* @param
* @return
...
...
@@ -145,6 +157,18 @@ public class ComprehensiveStatisticalAnalysisController extends BaseController {
return
ResponseHelper
.
buildResponse
(
statisticalAnalysisService
.
queryRYLX
(
type
));
}
/**
* @param
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/select/querySubRYLX"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"高级筛选查询人员子类型"
,
notes
=
"高级筛选查询人员子类型"
)
public
ResponseModel
<
JSONArray
>
querySubRYLX
(
@RequestParam
(
required
=
false
)
String
type
)
{
return
ResponseHelper
.
buildResponse
(
statisticalAnalysisService
.
querySubRYLX
(
type
));
}
/**
* @param
* @return
...
...
@@ -156,6 +180,28 @@ public class ComprehensiveStatisticalAnalysisController extends BaseController {
return
ResponseHelper
.
buildResponse
(
statisticalAnalysisService
.
queryZYXM
(
type
));
}
/**
* @param
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/select/queryTypeZYXM"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"高级筛选查询作业项目"
,
notes
=
"高级筛选查询作业项目"
)
public
ResponseModel
<
JSONArray
>
queryTypeZYXM
(
@RequestParam
String
type
)
{
return
ResponseHelper
.
buildResponse
(
statisticalAnalysisService
.
queryTypeZYXM
(
type
));
}
/**
* @param
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/select/queryLevelZYXM"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"高级沙筛选查询项目"
,
notes
=
"高级沙筛选查询项目"
)
public
ResponseModel
<
JSONArray
>
queryLevelZYXM
(
@RequestParam
String
type
)
{
return
ResponseHelper
.
buildResponse
(
statisticalAnalysisService
.
queryLevelZYXM
(
type
));
}
/**
* @param
...
...
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 @
7f52fe37
...
...
@@ -428,7 +428,7 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
licensesStatus
=
licensesStatusMap
.
get
(
noLicense
);
}
}
else
{
licensesStatus
=
licensesStatusMap
.
get
(
noLicenseReq
);
licensesStatus
=
!
""
.
equals
(
licensesStatusStr
)
?
licensesStatusMap
.
get
(
licensesStatusStr
)
:
licensesStatusMap
.
get
(
noLicenseReq
);
}
}
dto
.
put
(
"licensesStatus"
,
licensesStatus
);
...
...
@@ -730,6 +730,8 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
}
else
if
(
zc
>
0
)
{
permissionStatus
=
normalStr
;
}
}
else
{
permissionStatus
=
noneStr
;
}
}
}
else
if
(!
dto
.
containsKey
(
"licenses"
)
&&
(
dto
.
get
(
"unitType"
).
toString
().
contains
(
"检测单位"
)
||
...
...
@@ -1024,7 +1026,7 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
if
(!
ValidationUtil
.
isEmpty
(
dto
.
getString
(
"CYLINDER_CATEGORY"
)))
{
String
cylinderCategory
=
dto
.
getString
(
"CYLINDER_CATEGORY"
);
boolean
integer
=
isInteger
(
cylinderCategory
);
if
(
integer
)
{
if
(
integer
)
{
cylinderCategory
=
CylinderCategoryEnum
.
getName
(
cylinderCategory
);
}
dto
.
put
(
"CYLINDER_CATEGORY"
,
cylinderCategory
);
...
...
@@ -1694,10 +1696,8 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
private
void
getItemQuery
(
String
field
,
String
itemCondition
,
Object
value
,
String
isOr
,
EnhancedDynamicQueryBuilder
builder
,
String
type
)
{
// 如果包含需要特殊处理的字段,则调用对应的处理方法,否则调用通用处理方法
if
((
equipHandleOtherFields
.
contains
(
field
)
&&
StatisticalAnalysisEnum
.
equip
.
getCode
().
equals
(
type
))
||
(
companyHandleOtherFields
.
contains
(
field
)
&&
StatisticalAnalysisEnum
.
company
.
getCode
().
equals
(
type
))
||
(
personHandleOtherFields
.
contains
(
field
)
&&
StatisticalAnalysisEnum
.
person
.
getCode
().
equals
(
type
)))
{
handleOtherField
(
field
,
itemCondition
,
value
,
isOr
,
builder
);
if
(
equipHandleOtherFields
.
contains
(
field
)
||
companyHandleOtherFields
.
contains
(
field
)
||
personHandleOtherFields
.
contains
(
field
))
{
handleOtherField
(
field
,
itemCondition
,
value
,
isOr
,
builder
,
type
);
}
else
{
field
=
field
.
equals
(
"nextInspectDate"
)
?
"NEXT_INSPECT_DATE"
:
field
.
equals
(
"use_date"
)
?
"USE_DATE"
:
field
;
String
finalField
=
field
;
...
...
@@ -1752,12 +1752,12 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
}
// 特殊处理字段
private
void
handleOtherField
(
String
field
,
String
itemCondition
,
Object
value
,
String
isOr
,
EnhancedDynamicQueryBuilder
builder
)
{
if
(
equipHandleOtherFields
.
contains
(
field
))
{
private
void
handleOtherField
(
String
field
,
String
itemCondition
,
Object
value
,
String
isOr
,
EnhancedDynamicQueryBuilder
builder
,
String
type
)
{
if
(
equipHandleOtherFields
.
contains
(
field
)
&&
StatisticalAnalysisEnum
.
equip
.
getCode
().
equals
(
type
)
)
{
equipFieldHandle
(
field
,
itemCondition
,
value
,
isOr
,
builder
);
}
else
if
(
companyHandleOtherFields
.
contains
(
field
))
{
}
else
if
(
companyHandleOtherFields
.
contains
(
field
)
&&
StatisticalAnalysisEnum
.
company
.
getCode
().
equals
(
type
)
)
{
companyFieldHandle
(
field
,
itemCondition
,
value
,
isOr
,
builder
);
}
else
if
(
personHandleOtherFields
.
contains
(
field
))
{
}
else
if
(
(
personHandleOtherFields
.
contains
(
field
)
&&
StatisticalAnalysisEnum
.
person
.
getCode
().
equals
(
type
)
))
{
personFieldHandle
(
field
,
itemCondition
,
value
,
isOr
,
builder
);
}
}
...
...
@@ -1815,66 +1815,109 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
}
}
}
else
if
(
field
.
equals
(
"expiryDate"
))
{
if
(
value
.
equals
(
overdue
))
{
if
(
itemCondition
.
equals
(
"eq"
)
||
itemCondition
.
equals
(
"in"
))
{
NestedQueryBuilder
nestedQuery
=
QueryBuilders
.
nestedQuery
(
// 无资质到期日期
NestedQueryBuilder
noneQuery
=
QueryBuilders
.
nestedQuery
(
path
,
QueryBuilders
.
boolQuery
().
filter
(
QueryBuilders
.
rangeQuery
(
nestedField
).
lt
(
LocalDate
.
now
().
format
(
formatter
)
)),
QueryBuilders
.
boolQuery
().
mustNot
(
existsQuery
(
nestedField
)),
ScoreMode
.
None
);
builder
.
add
(
nestedQuery
,
isOr
);
}
else
{
NestedQueryBuilder
nestedQuery
=
QueryBuilders
.
nestedQuery
(
// 有资质到期日期
NestedQueryBuilder
existsQuery
=
QueryBuilders
.
nestedQuery
(
path
,
QueryBuilders
.
boolQuery
().
filter
(
QueryBuilders
.
rangeQuery
(
nestedField
).
gte
(
LocalDate
.
now
().
format
(
formatter
))
),
existsQuery
(
nestedField
),
ScoreMode
.
None
);
builder
.
add
(
nestedQuery
,
isOr
);
}
}
else
if
(
value
.
equals
(
near
))
{
if
(
itemCondition
.
equals
(
"eq"
)
||
itemCondition
.
equals
(
"in"
))
{
NestedQueryBuilder
nestedQuery
=
QueryBuilders
.
nestedQuery
(
// 正常资质到期日期
NestedQueryBuilder
normalNestedQuery
=
QueryBuilders
.
nestedQuery
(
path
,
QueryBuilders
.
boolQuery
().
filter
(
QueryBuilders
.
rangeQuery
(
nestedField
).
lte
(
LocalDate
.
now
().
plusDays
(
30
).
format
(
formatter
)).
gte
(
LocalDate
.
now
(
).
format
(
formatter
))),
QueryBuilders
.
boolQuery
().
filter
(
QueryBuilders
.
rangeQuery
(
nestedField
).
gt
(
LocalDate
.
now
().
plusDays
(
30
).
format
(
formatter
))),
ScoreMode
.
None
);
builder
.
add
(
nestedQuery
,
isOr
);
}
else
{
// 超期资质到期日期
NestedQueryBuilder
overdueNestedQuery
=
QueryBuilders
.
nestedQuery
(
path
,
QueryBuilders
.
boolQuery
().
filter
(
QueryBuilders
.
rangeQuery
(
nestedField
).
lt
(
LocalDate
.
now
().
format
(
formatter
))),
ScoreMode
.
None
);
NestedQueryBuilder
normalNestedQuery
=
QueryBuilders
.
nestedQuery
(
// 临期资质到期日期
NestedQueryBuilder
nearNestedQuery
=
QueryBuilders
.
nestedQuery
(
path
,
QueryBuilders
.
boolQuery
().
filter
(
QueryBuilders
.
rangeQuery
(
nestedField
).
gt
(
LocalDate
.
now
().
plusDays
(
30
).
format
(
formatter
))),
QueryBuilders
.
boolQuery
().
filter
(
QueryBuilders
.
rangeQuery
(
nestedField
).
lte
(
LocalDate
.
now
().
plusDays
(
30
).
format
(
formatter
)).
gte
(
LocalDate
.
now
(
).
format
(
formatter
))),
ScoreMode
.
None
);
builder
.
add
(
overdueNestedQuery
,
or
);
builder
.
add
(
normalNestedQuery
,
or
);
}
}
else
if
(
value
.
equals
(
normal
))
{
if
(
value
.
equals
(
overdue
))
{
if
(
itemCondition
.
equals
(
"eq"
)
||
itemCondition
.
equals
(
"in"
))
{
builder
.
add
(
QueryBuilders
.
boolQuery
().
must
(
overdueNestedQuery
),
isOr
);
}
else
{
EnhancedDynamicQueryBuilder
builders
=
new
EnhancedDynamicQueryBuilder
();
NestedQueryBuilder
nestedQuery
=
QueryBuilders
.
nestedQuery
(
path
,
QueryBuilders
.
boolQuery
().
filter
(
QueryBuilders
.
rangeQuery
(
nestedField
).
gt
(
LocalDate
.
now
().
plusDays
(
30
).
format
(
formatter
))),
QueryBuilders
.
boolQuery
().
filter
(
QueryBuilders
.
rangeQuery
(
nestedField
).
gt
e
(
LocalDate
.
now
(
).
format
(
formatter
))),
ScoreMode
.
None
);
builder
.
add
(
nestedQuery
,
isOr
);
builders
.
add
(
QueryBuilders
.
boolQuery
().
must
(
nestedQuery
),
or
);
builders
.
add
(
QueryBuilders
.
boolQuery
().
must
(
noneQuery
),
or
);
builders
.
add
(
QueryBuilders
.
boolQuery
().
mustNot
(
overdueNestedQuery
),
and
);
builder
.
add
(
builders
.
build
(),
isOr
);
}
}
else
if
(
value
.
equals
(
near
))
{
if
(
itemCondition
.
equals
(
"eq"
)
||
itemCondition
.
equals
(
"in"
))
{
builder
.
add
(
QueryBuilders
.
boolQuery
().
must
(
nearNestedQuery
),
isOr
);
}
else
{
NestedQueryBuilder
elseNestedQuery
=
QueryBuilders
.
nestedQuery
(
EnhancedDynamicQueryBuilder
builders
=
new
EnhancedDynamicQueryBuilder
();
builders
.
add
(
QueryBuilders
.
boolQuery
().
must
(
overdueNestedQuery
),
or
);
builders
.
add
(
QueryBuilders
.
boolQuery
().
must
(
normalNestedQuery
),
or
);
builders
.
add
(
QueryBuilders
.
boolQuery
().
must
(
noneQuery
),
or
);
builders
.
add
(
QueryBuilders
.
boolQuery
().
mustNot
(
nearNestedQuery
),
and
);
builder
.
add
(
builders
.
build
(),
isOr
);
}
}
else
if
(
value
.
equals
(
normal
))
{
if
(
itemCondition
.
equals
(
"eq"
)
||
itemCondition
.
equals
(
"in"
))
{
builder
.
add
(
normalNestedQuery
,
isOr
);
}
else
{
EnhancedDynamicQueryBuilder
builders
=
new
EnhancedDynamicQueryBuilder
();
NestedQueryBuilder
nestedQuery
=
QueryBuilders
.
nestedQuery
(
path
,
QueryBuilders
.
boolQuery
().
filter
(
QueryBuilders
.
rangeQuery
(
nestedField
).
lte
(
LocalDate
.
now
().
plusDays
(
30
).
format
(
formatter
))),
ScoreMode
.
None
);
NestedQueryBuilder
noLicensesNestedQuery
=
QueryBuilders
.
nestedQuery
(
builders
.
add
(
QueryBuilders
.
boolQuery
().
must
(
nestedQuery
),
or
);
builders
.
add
(
QueryBuilders
.
boolQuery
().
must
(
noneQuery
),
or
);
builders
.
add
(
QueryBuilders
.
boolQuery
().
mustNot
(
normalNestedQuery
),
and
);
builder
.
add
(
builders
.
build
(),
isOr
);
}
}
else
if
(
value
.
equals
(
none
))
{
if
(
itemCondition
.
equals
(
"eq"
)
||
itemCondition
.
equals
(
"in"
))
{
builder
.
add
(
noneQuery
,
and
);
}
else
{
builder
.
add
(
existsQuery
,
and
);
}
}
}
else
if
(
field
.
equals
(
"issueDate"
))
{
BoolQueryBuilder
query
=
QueryBuilders
.
boolQuery
();
switch
(
itemCondition
)
{
case
"eq"
:
query
.
must
(
QueryBuilders
.
termQuery
(
nestedField
,
value
));
break
;
case
"lt"
:
query
.
must
(
QueryBuilders
.
rangeQuery
(
nestedField
).
lt
(
value
));
break
;
case
"lte"
:
query
.
must
(
QueryBuilders
.
rangeQuery
(
nestedField
).
lte
(
value
));
break
;
case
"gt"
:
query
.
must
(
QueryBuilders
.
rangeQuery
(
nestedField
).
gt
(
value
));
break
;
case
"gte"
:
query
.
must
(
QueryBuilders
.
rangeQuery
(
nestedField
).
gte
(
value
));
break
;
}
NestedQueryBuilder
dateQuery
=
QueryBuilders
.
nestedQuery
(
path
,
existsQuery
(
nestedField
)
,
query
,
ScoreMode
.
None
);
builder
.
add
(
elseNestedQuery
,
or
);
}
}
builder
.
add
(
dateQuery
,
isOr
);
}
else
{
NestedQueryBuilder
nestedQuery
=
QueryBuilders
.
nestedQuery
(
path
,
...
...
@@ -1947,10 +1990,10 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
QueryBuilders
.
boolQuery
().
mustNot
(
existsQuery
(
nestedField
)),
ScoreMode
.
None
);
// 有
效
许可到期日期
// 有许可到期日期
NestedQueryBuilder
existsQuery
=
QueryBuilders
.
nestedQuery
(
path
,
QueryBuilders
.
boolQuery
().
must
(
existsQuery
(
nestedField
)
),
existsQuery
(
nestedField
),
ScoreMode
.
None
);
// 正常许可到期日期
...
...
@@ -1983,6 +2026,7 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
);
builders
.
add
(
QueryBuilders
.
boolQuery
().
must
(
nestedQuery
),
or
);
builders
.
add
(
QueryBuilders
.
boolQuery
().
must
(
noneQuery
),
or
);
builders
.
add
(
QueryBuilders
.
boolQuery
().
mustNot
(
overdueNestedQuery
),
and
);
builder
.
add
(
builders
.
build
(),
isOr
);
}
}
else
if
(
value
.
equals
(
near
))
{
...
...
@@ -1993,6 +2037,7 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
builders
.
add
(
QueryBuilders
.
boolQuery
().
must
(
overdueNestedQuery
),
or
);
builders
.
add
(
QueryBuilders
.
boolQuery
().
must
(
normalNestedQuery
),
or
);
builders
.
add
(
QueryBuilders
.
boolQuery
().
must
(
noneQuery
),
or
);
builders
.
add
(
QueryBuilders
.
boolQuery
().
mustNot
(
nearNestedQuery
),
and
);
builder
.
add
(
builders
.
build
(),
isOr
);
}
}
else
if
(
value
.
equals
(
normal
))
{
...
...
@@ -2007,13 +2052,14 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
);
builders
.
add
(
QueryBuilders
.
boolQuery
().
must
(
nestedQuery
),
or
);
builders
.
add
(
QueryBuilders
.
boolQuery
().
must
(
noneQuery
),
or
);
builders
.
add
(
QueryBuilders
.
boolQuery
().
mustNot
(
normalNestedQuery
),
and
);
builder
.
add
(
builders
.
build
(),
isOr
);
}
}
else
if
(
value
.
equals
(
none
))
{
if
(
itemCondition
.
equals
(
"eq"
)
||
itemCondition
.
equals
(
"in"
))
{
builder
.
add
(
QueryBuilders
.
boolQuery
().
must
(
existsQuery
),
or
);
builder
.
add
(
noneQuery
,
and
);
}
else
{
builder
.
add
(
QueryBuilders
.
boolQuery
().
must
(
noneQuery
),
or
);
builder
.
add
(
existsQuery
,
and
);
}
}
}
else
if
(
field
.
equals
(
"expiryDate"
))
{
...
...
@@ -2412,34 +2458,29 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
public
JSONArray
queryXK
(
String
type
)
{
JSONArray
result
=
new
JSONArray
();
if
(
ObjectUtils
.
isEmpty
(
type
))
{
List
<
DataDictionary
>
xkxm
=
dataDictionaryService
.
lambdaQuery
()
.
and
(
wrapper
->
wrapper
.
like
(
DataDictionary:
:
getType
,
"XKXM"
)
.
or
()
.
eq
(
DataDictionary:
:
getType
,
"sbpz"
))
.
eq
(
BaseEntity:
:
getIsDelete
,
false
)
.
list
();
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
querySubXK
(
String
type
)
{
JSONArray
result
=
new
JSONArray
();
List
<
DataDictionary
>
childrenxkxm
=
new
ArrayList
<>();
if
(
"null"
.
equals
(
type
))
{
childrenxkxm
=
dataDictionaryService
.
lambdaQuery
()
.
likeRight
(
DataDictionary:
:
getCode
,
"XK"
)
.
isNotNull
(
DataDictionary:
:
getTypeDesc
)
.
eq
(
BaseEntity:
:
getIsDelete
,
false
).
list
();
if
(
ValidationUtil
.
isEmpty
(
type
))
{
// childrenxkxm = dataDictionaryService.lambdaQuery()
// .likeRight(DataDictionary::getCode, "XK")
// .isNotNull(DataDictionary::getTypeDesc)
// .eq(BaseEntity::getIsDelete, false).list();
throw
new
BaseException
(
"请先选择许可项目,才能选择子许可项目"
,
"200"
,
"请先选择许可项目,才能选择子许可项目"
);
}
else
{
childrenxkxm
=
dataDictionaryService
.
lambdaQuery
().
eq
(
DataDictionary:
:
getTypeDesc
,
type
).
eq
(
BaseEntity:
:
getIsDelete
,
false
).
list
();
}
result
=
deployDictionary
(
childrenxkxm
);
}
// 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
;
}
...
...
@@ -2531,6 +2572,21 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
return
result
;
}
public
JSONArray
querySubRYLX
(
String
type
)
{
JSONArray
result
=
new
JSONArray
();
if
(
ValidationUtil
.
isEmpty
(
type
))
{
throw
new
BaseException
(
"请先选择人员类型,才能选择子类型"
,
"200"
,
"请先选择人员类型,才能选择子类型"
);
}
else
{
List
<
DataDictionary
>
childrenrylx
=
dataDictionaryService
.
lambdaQuery
()
.
in
(
DataDictionary:
:
getParent
,
type
)
.
like
(
DataDictionary:
:
getType
,
"QYRYGW"
)
.
orderByAsc
(
DataDictionary:
:
getSortNum
)
.
list
();
result
=
deployDictionary
(
childrenrylx
);
}
return
result
;
}
/**
* 开始下载 发送消息
*/
...
...
@@ -2749,6 +2805,43 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
return
result
;
}
public
JSONArray
queryTypeZYXM
(
String
type
)
{
JSONArray
result
=
new
JSONArray
();
if
(
"特种设备安全管理和作业人员证"
.
equals
(
type
))
{
List
<
DictionarieValueModel
>
certType
=
Systemctl
.
dictionarieClient
.
dictValues
(
"JOB_ITEM"
).
getResult
();
for
(
DictionarieValueModel
certTypeModel
:
certType
)
{
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"key"
,
certTypeModel
.
getDictDataKey
());
jsonObject
.
put
(
"value"
,
certTypeModel
.
getDictDataKey
());
jsonObject
.
put
(
"label"
,
certTypeModel
.
getDictDataValue
());
result
.
add
(
jsonObject
);
}
}
else
{
throw
new
BaseException
(
"请先选择证书类型,才能选择作业项目"
,
"200"
,
"请先选择证书类型,才能选择作业项目"
);
}
return
result
;
}
public
JSONArray
queryLevelZYXM
(
String
type
)
{
JSONArray
result
=
new
JSONArray
();
if
(!
ObjectUtils
.
isEmpty
(
type
))
{
List
<
DictionarieValueModel
>
certType
=
Systemctl
.
dictionarieClient
.
dictValues
(
"JOB_ITEM"
).
getResult
();
for
(
DictionarieValueModel
certTypeModel
:
certType
)
{
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"key"
,
certTypeModel
.
getDictDataKey
());
jsonObject
.
put
(
"value"
,
certTypeModel
.
getDictDataKey
());
jsonObject
.
put
(
"label"
,
certTypeModel
.
getDictDataValue
());
result
.
add
(
jsonObject
);
}
}
else
{
throw
new
BaseException
(
"请先选择证书级别,才能选择项目"
,
"200"
,
"请先选择证书级别,才能选择项目"
);
}
return
result
;
}
public
JSONArray
queryUnitByOrgCode
(
String
orgCode
)
{
SearchRequest
searchRequest
=
new
SearchRequest
(
"idx_biz_enterprise_info"
);
SearchSourceBuilder
searchSourceBuilder
=
new
SearchSourceBuilder
();
...
...
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/DPSubServiceImpl.java
View file @
7f52fe37
...
...
@@ -24,6 +24,7 @@ import org.springframework.http.MediaType;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.client.RestTemplate
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
...
...
@@ -723,11 +724,13 @@ public class DPSubServiceImpl {
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
f
);
Date
date
=
null
;
try
{
if
(!
ObjectUtils
.
isEmpty
(
value
)
&&
!
value
.
equals
(
"null"
)
&&
!
value
.
equals
(
"undefined"
)){
date
=
sdf
.
parse
(
ValidationUtil
.
validateString
(
value
));
}
}
catch
(
ParseException
e
)
{
throw
new
RuntimeException
(
e
);
}
jsonObject
.
put
(
"value"
,
sdf
.
format
(
date
));
jsonObject
.
put
(
"value"
,
null
==
date
?
""
:
sdf
.
format
(
date
));
}
}
else
if
(
"checkbox"
.
equals
(
xObj
.
getString
(
"componentKey"
)))
{
...
...
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