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
d3106873
Commit
d3106873
authored
Aug 22, 2025
by
hcing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(statistics): 总览同一调整监管机构和所属区域,以及时间区间的查询,检验检测机构拆分
parent
9d8e0b1b
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
128 additions
and
35 deletions
+128
-35
DPFilterParamDto.java
...oin/amos/boot/module/common/api/dto/DPFilterParamDto.java
+10
-1
UnitTypeEnum.java
...ejoin/amos/boot/module/common/api/enums/UnitTypeEnum.java
+1
-1
UserPostEnum.java
...ejoin/amos/boot/module/common/api/enums/UserPostEnum.java
+5
-6
SafetyProblemTracingDto.java
.../amos/boot/module/jg/api/dto/SafetyProblemTracingDto.java
+20
-0
SafetyProblemTracingMapper.xml
.../src/main/resources/mapper/SafetyProblemTracingMapper.xml
+7
-5
DataHandlerController.java
.../boot/module/jg/biz/controller/DataHandlerController.java
+19
-14
DataHandlerServiceImpl.java
...ot/module/jg/biz/service/impl/DataHandlerServiceImpl.java
+10
-0
JyjcInspectionApplicationServiceImpl.java
...iz/service/impl/JyjcInspectionApplicationServiceImpl.java
+3
-1
ZLStatisticsMapper.xml
...tics-api/src/main/resources/mapper/ZLStatisticsMapper.xml
+7
-0
StCommonController.java
...t/module/statistcs/biz/controller/StCommonController.java
+8
-0
EnterpriseBizServiceImpl.java
.../statistcs/biz/service/impl/EnterpriseBizServiceImpl.java
+4
-0
EquipmentStaticsServiceImpl.java
...atistcs/biz/service/impl/EquipmentStaticsServiceImpl.java
+1
-1
StCommonServiceImpl.java
...odule/statistcs/biz/service/impl/StCommonServiceImpl.java
+8
-3
ZLDPStatisticsServiceImpl.java
...statistcs/biz/service/impl/ZLDPStatisticsServiceImpl.java
+25
-3
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/DPFilterParamDto.java
View file @
d3106873
...
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.common.api.dto;
import
lombok.Data
;
import
javax.validation.constraints.NotBlank
;
import
java.util.List
;
/**
* 大屏筛选过滤对象
...
...
@@ -43,7 +44,7 @@ public class DPFilterParamDto {
*/
private
String
searchType
;
/**
* 1生产单位 2使用单位 3充装单位 4检验检测机构
* 1生产单位 2使用单位 3充装单位 4检验
机构 5
检测机构
*/
private
String
companyType
;
/**
...
...
@@ -94,4 +95,12 @@ public class DPFilterParamDto {
private
String
equipType
;
private
String
phone
;
private
String
superviseKey
;
private
List
<
String
>
region
;
private
String
regionStr
;
/**
* 监管机构组织机构代码
*/
private
String
superviseOrgCode
;
}
amos-boot-system-tzs/amos-boot-module-common/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/enums/UnitTypeEnum.java
View file @
d3106873
...
...
@@ -21,7 +21,7 @@ public enum UnitTypeEnum {
CZDW
(
"充装单位"
,
"1231"
,
"3"
,
"充装单位"
),
//检验检测机构
JYJG
(
"检验机构"
,
"1233-1"
,
"4"
,
"检验机构"
),
JCJG
(
"检测机构"
,
"1233-2"
,
"4"
,
"检测机构"
),
JCJG
(
"检测机构"
,
"1233-2"
,
"5"
,
"检测机构"
),
;
String
name
;
...
...
amos-boot-system-tzs/amos-boot-module-common/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/enums/UserPostEnum.java
View file @
d3106873
...
...
@@ -6,7 +6,7 @@ import java.util.*;
@Getter
public
enum
UserPostEnum
{
//
type 1生产单位 2使用单位 3充装单位 4检验
检测机构
//
type 1生产单位 2使用单位 3充装单位 4检验机构 5
检测机构
//主要负责人
ZYFZR
(
"主要负责人"
,
"6548"
,
"1,2,3"
),
//质量安全总监
...
...
@@ -14,11 +14,11 @@ public enum UserPostEnum {
//质量安全员
ZLAQY
(
"质量安全员"
,
"6551"
,
"1"
),
//作业人员
ZYRY
(
"作业人员"
,
"6552"
,
"1,2,3,4
"
),
ZYRY
(
"作业人员"
,
"6552"
,
"1,2,3,4,5
"
),
//检验人员
ZJRY
(
"检验人员"
,
"66151"
,
"1,4
"
),
ZJRY
(
"检验人员"
,
"66151"
,
"1,4,5
"
),
//检测人员
JCRY
(
"检测人员"
,
"66152"
,
"1,4
"
),
JCRY
(
"检测人员"
,
"66152"
,
"1,4,5
"
),
//安全总监
AQZJ
(
"安全总监"
,
"6547"
,
"2,3"
),
//安全员
...
...
@@ -50,8 +50,7 @@ public enum UserPostEnum {
//质量保证体系人员(非字典表字段,后期修改code)
ZLBZTXRY
(
"质量保证体系人员"
,
"6619"
,
"1,3,4"
),
;
ZLBZTXRY
(
"质量保证体系人员"
,
"6619"
,
"1,3,4,5"
);
String
name
;
String
code
;
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/dto/SafetyProblemTracingDto.java
View file @
d3106873
...
...
@@ -6,6 +6,9 @@ import io.swagger.annotations.ApiModel;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.Getter
;
import
lombok.Setter
;
import
java.util.Date
;
import
java.util.Map
;
...
...
@@ -52,6 +55,9 @@ public class SafetyProblemTracingDto extends BaseDto {
@ApiModelProperty
(
value
=
"问题产生查询结束时间"
)
private
Date
problemTimeEnd
;
@ApiModelProperty
(
value
=
"问题时间区间"
)
private
ProblemTimeRange
problemTimeRange
;
@ApiModelProperty
(
value
=
"主体单位名称"
)
private
String
principalUnit
;
...
...
@@ -156,4 +162,18 @@ public class SafetyProblemTracingDto extends BaseDto {
@ApiModelProperty
(
value
=
"制造日期"
)
private
String
productDate
;
@Data
@Getter
@Setter
public
static
class
ProblemTimeRange
{
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@ApiModelProperty
(
value
=
"问题产生查询开始时间"
)
private
Date
beginDate
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@ApiModelProperty
(
value
=
"问题产生查询结束时间"
)
private
Date
endDate
;
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/SafetyProblemTracingMapper.xml
View file @
d3106873
...
...
@@ -33,11 +33,13 @@
<if
test=
"problemModel.problemTypeCode != null and problemModel.problemTypeCode != ''"
>
and spt.problem_type_code = #{problemModel.problemTypeCode}
</if>
<if
test=
"problemModel.problemTimeStart != null"
>
and to_char(spt.problem_time, 'YYYY-MM-DD')
<![CDATA[>=]]>
to_char(#{problemModel.problemTimeStart}::timestamp, 'YYYY-MM-DD')
<if
test=
"problemModel.problemTimeRange != null and problemModel.problemTimeRange.beginDate != null"
>
and to_char(spt.problem_time, 'YYYY-MM-DD')
<![CDATA[>=]]>
to_char(#{problemModel.problemTimeRange.beginDate}::timestamp, 'YYYY-MM-DD')
</if>
<if
test=
"problemModel.problemTimeEnd != null"
>
and to_char(spt.problem_time, 'YYYY-MM-DD')
<![CDATA[<=]]>
to_char(#{problemModel.problemTimeEnd}::timestamp, 'YYYY-MM-DD')
<if
test=
"problemModel.problemTimeRange != null and problemModel.problemTimeRange.endDate != null"
>
and to_char(spt.problem_time, 'YYYY-MM-DD')
<![CDATA[<=]]>
to_char(#{problemModel.problemTimeRange.endDate}::timestamp, 'YYYY-MM-DD')
</if>
<if
test=
"problemModel.problemDesc != null and problemModel.problemDesc != ''"
>
and spt.problem_desc like CONCAT('%', #{problemModel.problemDesc}, '%')
...
...
@@ -61,7 +63,7 @@
and spt.problem_status_code = #{problemModel.hiddenDangersLevel}
</if>
<if
test=
"problemModel.regionCode != null and problemModel.regionCode != ''"
>
and spt.region_code like CONCAT(#{problemModel.regionCode}, '%')
and spt.region_code like CONCAT(
'%',
#{problemModel.regionCode}, '%')
</if>
<if
test=
"problemModel.problemStatusCode != null and problemModel.problemStatusCode != ''"
>
and spt.problem_status_code = #{problemModel.problemStatusCode}
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/DataHandlerController.java
View file @
d3106873
...
...
@@ -15,6 +15,7 @@ import org.typroject.tyboot.core.restful.utils.ResponseModel;
import
javax.annotation.Resource
;
import
java.io.IOException
;
import
java.util.List
;
/**
* 用于业务变更过程中历史数据处理的控制层
...
...
@@ -273,9 +274,8 @@ public class DataHandlerController extends BaseController {
/**
* @apiNote 场车车牌号刷入ES
*
* @return
* @apiNote 场车车牌号刷入ES
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"场车车牌号刷入ES"
,
notes
=
"场车车牌号刷入ES"
)
...
...
@@ -285,47 +285,43 @@ public class DataHandlerController extends BaseController {
}
/**
* @apiNote 删除ES和数据库中状态≠已认领的设备
*
* @return
* @apiNote 删除ES和数据库中状态≠已认领的设备
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"删除ES和数据库中状态≠已认领的设备(备份后谨慎操作,不可恢复)"
,
notes
=
"删除ES和数据库中状态≠已认领的设备(备份后谨慎操作,不可恢复)"
)
@PutMapping
(
value
=
"/equip/deleteEquipWithStatusNotInClaimed"
)
public
ResponseModel
<
Integer
>
deleteEquipWithStatusNotInClaimed
(
@RequestParam
(
value
=
"indices"
,
defaultValue
=
"idx_biz_view_jg_all"
)
String
indices
,
@RequestParam
(
value
=
"isDelete"
,
defaultValue
=
"false"
)
boolean
isDelete
)
throws
InterruptedException
{
public
ResponseModel
<
Integer
>
deleteEquipWithStatusNotInClaimed
(
@RequestParam
(
value
=
"indices"
,
defaultValue
=
"idx_biz_view_jg_all"
)
String
indices
,
@RequestParam
(
value
=
"isDelete"
,
defaultValue
=
"false"
)
boolean
isDelete
)
throws
InterruptedException
{
return
ResponseHelper
.
buildResponse
(
dataHandlerService
.
deleteEquipWithStatusNotInClaimed
(
indices
,
isDelete
));
}
/**
* @apiNote 删除数据库中状态≠已认领的设备
*
* @return
* @apiNote 删除数据库中状态≠已认领的设备
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"删除数据库中状态≠已认领的设备"
,
notes
=
"删除数据库中状态≠已认领的设备"
)
@PutMapping
(
value
=
"/equip/deleteEquipExistDB"
)
public
ResponseModel
<
Integer
>
deleteEquipExistDB
(
@RequestParam
(
value
=
"isDelete"
,
defaultValue
=
"false"
)
boolean
isDelete
)
{
public
ResponseModel
<
Integer
>
deleteEquipExistDB
(
@RequestParam
(
value
=
"isDelete"
,
defaultValue
=
"false"
)
boolean
isDelete
)
{
return
ResponseHelper
.
buildResponse
(
dataHandlerService
.
deleteEquipExistDB
(
isDelete
));
}
/**
* @apiNote 修改SupervisionInfo中ORG_BRANCH_CODE=%50*X%的数据
*
* @return
* @apiNote 修改SupervisionInfo中ORG_BRANCH_CODE=%50*X%的数据
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"修改SupervisionInfo中ORG_BRANCH_CODE=%50*X%的数据"
,
notes
=
"修改SupervisionInfo中ORG_BRANCH_CODE=%50*X%的数据"
)
@PutMapping
(
value
=
"/equip/modifySupervisionOrgBranchCode"
)
public
ResponseModel
<
Integer
>
modifySupervisionOrgBranchCode
(
@RequestParam
(
value
=
"isModify"
,
defaultValue
=
"false"
)
boolean
isModify
)
{
public
ResponseModel
<
Integer
>
modifySupervisionOrgBranchCode
(
@RequestParam
(
value
=
"isModify"
,
defaultValue
=
"false"
)
boolean
isModify
)
{
return
ResponseHelper
.
buildResponse
(
dataHandlerService
.
modifySupervisionOrgBranchCode
(
isModify
));
}
/**
* @apiNote 删除导入管道未纳管的数据
*
* @return
* @apiNote 删除导入管道未纳管的数据
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"删除导入管道未纳管的数据"
,
notes
=
"删除导入管道未纳管的数据"
)
...
...
@@ -336,4 +332,12 @@ public class DataHandlerController extends BaseController {
@RequestParam
(
value
=
"isDelete"
,
defaultValue
=
"false"
)
boolean
isDelete
)
throws
IOException
{
return
ResponseHelper
.
buildResponse
(
dataHandlerService
.
deleteImportedPipelineData
(
uscUnitCreditCode
,
projectContraption
,
dataSource
,
isDelete
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"生成主键"
,
notes
=
"生成主键"
)
@GetMapping
(
value
=
"/generateSeq"
)
public
ResponseModel
<
List
<
Long
>>
generateSeq
(
@ApiParam
(
value
=
"生成的数量,默认10条"
,
defaultValue
=
"10"
)
@RequestParam
(
value
=
"num"
,
defaultValue
=
"10"
)
String
num
)
{
return
ResponseHelper
.
buildResponse
(
dataHandlerService
.
generateSeq
(
num
));
}
}
\ No newline at end of file
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/DataHandlerServiceImpl.java
View file @
d3106873
...
...
@@ -69,6 +69,7 @@ import org.springframework.util.ObjectUtils;
import
org.springframework.util.StopWatch
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
java.io.IOException
;
import
java.lang.reflect.Method
;
import
java.math.BigDecimal
;
...
...
@@ -82,6 +83,7 @@ import java.util.concurrent.atomic.AtomicInteger;
import
java.util.concurrent.atomic.AtomicReference
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
import
static
com
.
alibaba
.
fastjson
.
JSON
.
toJSONString
;
import
static
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
.
impl
.
JgInstallationNoticeServiceImpl
.
CONSTRUCTION_TYPE
;
import
static
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
.
impl
.
JgInstallationNoticeServiceImpl
.
CONSTRUCTION_TYPE_NAME
;
...
...
@@ -2132,4 +2134,12 @@ public class DataHandlerServiceImpl {
return
dto
;
}).
collect
(
Collectors
.
toList
());
}
public
List
<
Long
>
generateSeq
(
String
num
)
{
List
<
Long
>
result
=
new
ArrayList
<>();
for
(
long
l
=
Long
.
parseLong
(
num
);
l
>
0
;
l
--)
{
result
.
add
(
sequence
.
nextId
());
}
return
result
;
}
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/service/impl/JyjcInspectionApplicationServiceImpl.java
View file @
d3106873
...
...
@@ -1688,7 +1688,9 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
wrapper
.
eq
(
StringUtils
.
isNotBlank
(
projectContraption
),
IdxBizJgProjectContraption:
:
getProjectContraption
,
projectContraption
);
wrapper
.
eq
(
IdxBizJgProjectContraption:
:
getIsFirstMerge
,
false
);
wrapper
.
isNull
(
IdxBizJgProjectContraption:
:
getProjectContraptionParentId
);
wrapper
.
last
(
"and (length(use_registration_code) = 0 or use_registration_code is null) order by rec_date desc"
);
wrapper
.
isNotNull
(
IdxBizJgProjectContraption:
:
getUseRegistrationCode
);
wrapper
.
ne
(
IdxBizJgProjectContraption:
:
getUseRegistrationCode
,
""
);
wrapper
.
last
(
"order by create_date desc"
);
IPage
<
IdxBizJgProjectContraption
>
projectContraptionPage
=
jgProjectContraptionMapper
.
selectPage
(
page
,
wrapper
);
projectContraptionPage
.
getRecords
().
forEach
(
pro
->
pro
.
setDataQualityScore
(
commonService
.
castDataQualityScore2Name
(
pro
.
getDataQualityScore
(),
pro
.
getIsIntoManagement
())));
return
projectContraptionPage
;
...
...
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-api/src/main/resources/mapper/ZLStatisticsMapper.xml
View file @
d3106873
...
...
@@ -158,6 +158,13 @@
<if
test=
"paramDto.phone != null and paramDto.phone != ''"
>
AND tui.phone LIKE concat ( '%', #{paramDto.phone}, '%' )
</if>
<if
test=
"paramDto.superviseOrgCode!=null and paramDto.superviseOrgCode!='' "
>
AND bei.supervise_org_code LIKE CONCAT('%',#{paramDto.superviseOrgCode},'%')
</if>
<if
test=
"paramDto.regionStr!=null and paramDto.regionStr!='' "
>
AND CONCAT_WS('/', bei.province,bei.city,bei.district) LIKE CONCAT('%',#{paramDto.regionStr},'%')
</if>
order by tui.create_date desc
</select>
<select
id=
"count"
resultType=
"java.lang.Integer"
>
select count(1) from idx_biz_jg_other_info where INFORMATION_SITUATION NOTNULL
...
...
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/java/com/yeejoin/amos/boot/module/statistcs/biz/controller/StCommonController.java
View file @
d3106873
...
...
@@ -45,6 +45,14 @@ public class StCommonController extends BaseController {
return
ResponseHelper
.
buildResponse
(
regionList
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/4level/region-tree"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取用户regionCode"
,
notes
=
"获取用户regionCode"
)
public
ResponseModel
<
List
<
RegionModel
>>
getReginTreeFor4Level
(
@RequestParam
(
value
=
"regionCode"
)
Integer
regionCode
)
{
List
<
RegionModel
>
regionList
=
commonService
.
getReginTreeFor4Level
(
regionCode
);
return
ResponseHelper
.
buildResponse
(
regionList
);
}
/**
* 获取设备类型
* @return Map
...
...
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/EnterpriseBizServiceImpl.java
View file @
d3106873
...
...
@@ -112,6 +112,10 @@ public class EnterpriseBizServiceImpl {
}
}
}
if
(!
StringUtils
.
isEmpty
(
tzBaseEnterpriseInfoDto
.
getRegion
()))
{
String
region
=
tzBaseEnterpriseInfoDto
.
getRegion
();
tzBaseEnterpriseInfoDto
.
setRegion
(
region
.
replace
(
","
,
"/"
));
}
IPage
<
TzBaseEnterpriseInfoDto
>
tzBaseEnterpriseInfoDtoIPage
=
enterpriseBizMapper
.
pageList2
(
page
,
tzBaseEnterpriseInfoDto
,
orgCodeList
,
unitTypeList
);
if
(
ValidationUtil
.
isEmpty
(
tzBaseEnterpriseInfoDtoIPage
.
getRecords
()))
{
logger
.
info
(
"查询到的数据为空"
);
...
...
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/EquipmentStaticsServiceImpl.java
View file @
d3106873
...
...
@@ -355,7 +355,7 @@ public class EquipmentStaticsServiceImpl {
* 所属地区
*/
if
(
StringUtils
.
isNotEmpty
(
dpFilterParamForDetailDto
.
getUsePlace
()))
{
boolMust
.
must
(
QueryBuilders
.
wildcardQuery
(
"USE_PLACE"
,
"*"
+
dpFilterParamForDetailDto
.
getUsePlace
()
+
"*"
));
boolMust
.
must
(
QueryBuilders
.
wildcardQuery
(
"USE_PLACE"
,
"*"
+
dpFilterParamForDetailDto
.
getUsePlace
()
.
replace
(
","
,
"/"
)
+
"*"
));
}
/**
* 设备状态
...
...
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/StCommonServiceImpl.java
View file @
d3106873
...
...
@@ -8,9 +8,10 @@ import com.yeejoin.amos.boot.biz.common.dto.CountDto;
import
com.yeejoin.amos.boot.module.common.api.constant.TZSCommonConstant
;
import
com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamForDetailDto
;
import
com.yeejoin.amos.boot.module.common.api.enums.ReginStepEnum
;
import
com.yeejoin.amos.boot.module.common.api.enums.CylinderTypeEnum
;
import
com.yeejoin.amos.boot.module.common.api.enums.ReginStepEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.DPMapStatisticsItemEnum
;
import
com.yeejoin.amos.boot.module.statistics.api.enums.StatisticalAnalysisEnum
;
import
com.yeejoin.amos.boot.module.statistics.api.mapper.CommonBaseMapper
;
import
com.yeejoin.amos.boot.module.statistics.api.mapper.ZLStatisticsMapper
;
import
com.yeejoin.amos.boot.module.statistics.api.vo.EquCategoryVo
;
...
...
@@ -216,7 +217,7 @@ public class StCommonServiceImpl {
long
num
=
0
;
CountRequest
request
=
new
CountRequest
();
//request.indices("idx_biz_view_jg_all");
request
.
indices
(
"idx_biz_equipment_info"
);
request
.
indices
(
StatisticalAnalysisEnum
.
equip
.
getKey
()
);
BoolQueryBuilder
boolMust
=
QueryBuilders
.
boolQuery
();
if
(
isOrgBranchCodeExactMatch
)
{
// 按照管辖机构区域信息精确查询
...
...
@@ -254,7 +255,7 @@ public class StCommonServiceImpl {
public
long
staticsCenterMapCountDataForEquip
(
Map
<
String
,
Object
>
result
,
long
cylinderNum
,
String
orgCode
,
Boolean
supervisoryFlag
,
Boolean
isMatchSupervisoryCode
,
Boolean
isOrgBranchCodeExactMatch
)
{
SearchRequest
request
=
new
SearchRequest
();
// request.indices("idx_biz_view_jg_all");
request
.
indices
(
"idx_biz_equipment_info"
);
request
.
indices
(
StatisticalAnalysisEnum
.
equip
.
getKey
()
);
BoolQueryBuilder
boolMust
=
QueryBuilders
.
boolQuery
();
if
(
isOrgBranchCodeExactMatch
)
{
// 按照管辖机构区域信息精确查询
...
...
@@ -433,6 +434,10 @@ public class StCommonServiceImpl {
return
buildTree
(
regionModels
.
stream
().
filter
(
r
->
Integer
.
parseInt
(
StringUtils
.
trim
(
r
.
getLevel
()))
<=
3
).
collect
(
Collectors
.
toList
()),
r
->
r
.
getRegionCode
().
equals
(
regionCode
));
}
public
List
<
RegionModel
>
getReginTreeFor4Level
(
Integer
regionCode
)
{
return
buildTree
(
regionModels
.
stream
().
filter
(
r
->
Integer
.
parseInt
(
StringUtils
.
trim
(
r
.
getLevel
()))
<=
4
).
collect
(
Collectors
.
toList
()),
r
->
r
.
getRegionCode
().
equals
(
regionCode
));
}
public
List
<
RegionModel
>
buildTree
(
List
<
RegionModel
>
regions
,
Predicate
<
RegionModel
>
rootCondition
)
{
// 防御性拷贝避免修改原始数据
...
...
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/ZLDPStatisticsServiceImpl.java
View file @
d3106873
...
...
@@ -22,6 +22,7 @@ import com.yeejoin.amos.boot.module.common.api.enums.UserPostEnum;
import
com.yeejoin.amos.boot.module.statistcs.biz.utils.JsonUtils
;
import
com.yeejoin.amos.boot.module.statistcs.biz.utils.QueryBuilderUtils
;
import
com.yeejoin.amos.boot.module.statistics.api.enums.InformationManageTypeEnum
;
import
com.yeejoin.amos.boot.module.statistics.api.enums.StatisticalAnalysisEnum
;
import
com.yeejoin.amos.boot.module.statistics.api.feign.TzsServiceFeignClient
;
import
com.yeejoin.amos.boot.module.statistics.api.mapper.AlertStatisticsMapper
;
import
com.yeejoin.amos.boot.module.statistics.api.mapper.TzsCustomFilterMapper
;
...
...
@@ -33,6 +34,9 @@ import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgOtherInfo;
import
com.yeejoin.amos.boot.module.ymt.api.enums.EquimentEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.EquipmentClassifityEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.EquipmentCategoryMapper
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.CompanyModel
;
import
com.yeejoin.amos.feign.systemctl.model.RegionModel
;
import
org.apache.commons.compress.utils.Lists
;
import
org.apache.commons.lang3.StringUtils
;
...
...
@@ -88,7 +92,7 @@ public class ZLDPStatisticsServiceImpl {
private
final
EquipmentCategoryMapper
equipmentCategoryMapper
;
@Autowired
private
TzsCustomFilterMapper
tzsCustomFilterMapper
;
private
TzsCustomFilterMapper
tzsCustomFilterMapper
;
// 设备纳管 纳管:true 未纳管:false
public
static
final
String
IS_INTO_MANAGEMENT
=
"IS_INTO_MANAGEMENT"
;
...
...
@@ -862,7 +866,7 @@ public class ZLDPStatisticsServiceImpl {
Page
<
JSONObject
>
result
=
new
Page
<>(
map
.
getInteger
(
"number"
),
map
.
getInteger
(
"size"
));
SearchRequest
request
=
new
SearchRequest
();
// request.indices("idx_biz_view_jg_all");
request
.
indices
(
"idx_biz_equipment_info"
);
request
.
indices
(
StatisticalAnalysisEnum
.
equip
.
getKey
()
);
SearchSourceBuilder
builder
=
new
SearchSourceBuilder
();
builder
.
trackTotalHits
(
true
);
BoolQueryBuilder
boolMust
=
QueryBuilders
.
boolQuery
();
...
...
@@ -877,7 +881,7 @@ public class ZLDPStatisticsServiceImpl {
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"USE_PLACE"
)))
{
BoolQueryBuilder
query
=
QueryBuilders
.
boolQuery
();
String
test
=
QueryParser
.
escape
(
map
.
getString
(
"USE_PLACE"
));
test
=
test
.
replace
(
","
,
"/"
);
test
=
test
.
replace
(
","
,
"/"
);
query
.
must
(
QueryBuilders
.
wildcardQuery
(
"USE_PLACE"
,
"*"
+
test
+
"*"
));
boolMust
.
must
(
query
);
}
...
...
@@ -891,6 +895,11 @@ public class ZLDPStatisticsServiceImpl {
boolMust
.
must
(
QueryBuilders
.
prefixQuery
(
"ORG_BRANCH_CODE"
,
map
.
getString
(
"ORG_BRANCH_CODE"
)));
}
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"USE_PLACE_CODE"
)))
{
String
USE_PLACE_CODE
=
QueryParser
.
escape
(
map
.
getString
(
"USE_PLACE_CODE"
).
replace
(
","
,
"#"
));
boolMust
.
must
(
QueryBuilders
.
boolQuery
().
must
(
QueryBuilders
.
wildcardQuery
(
"USE_PLACE_CODE"
,
"*"
+
USE_PLACE_CODE
+
"*"
)));
}
if
(!
ObjectUtils
.
isEmpty
(
map
.
getString
(
"superviseUnitName"
)))
{
BoolQueryBuilder
query
=
QueryBuilders
.
boolQuery
();
String
test
=
QueryParser
.
escape
(
map
.
getString
(
"superviseUnitName"
));
...
...
@@ -1175,6 +1184,19 @@ public class ZLDPStatisticsServiceImpl {
if
(
StringUtils
.
isEmpty
(
orgCode
)){
return
new
Page
<>();
}
if
(
paramDto
.
getSuperviseKey
()
!=
null
)
{
if
(
paramDto
.
getSuperviseKey
().
contains
(
"_"
))
{
paramDto
.
setSuperviseOrgCode
(
stCommonService
.
getAndSetOrgCode
(
paramDto
.
getSuperviseKey
().
split
(
"_"
)[
0
]));
}
else
{
FeignClientResult
<
CompanyModel
>
result
=
Privilege
.
companyClient
.
seleteOne
(
Long
.
valueOf
(
paramDto
.
getSuperviseKey
()));
if
(
result
.
getResult
()
!=
null
)
{
paramDto
.
setSuperviseOrgCode
(
result
.
getResult
().
getOrgCode
());
}
}
}
if
(!
ObjectUtils
.
isEmpty
(
paramDto
.
getRegion
()))
{
paramDto
.
setRegionStr
(
String
.
join
(
"/"
,
paramDto
.
getRegion
()));
}
List
<
String
>
unitTypeList
=
UnitTypeEnum
.
getNameListByType
(
paramDto
.
getCompanyType
());
Page
<
Map
<
String
,
Object
>>
result
=
screenMapper
.
getPersonPage
(
page
,
paramDto
,
orgCode
,
unitTypeList
);
List
<
EquipmentCategoryDto
>
equipmentCategoryDtos
=
equipmentCategoryMapper
.
selectClassify
();
...
...
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