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
a3fcbbac
Commit
a3fcbbac
authored
Jul 10, 2024
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.大屏地图图列统计接口开发
parent
8d669ef2
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
74 additions
and
2 deletions
+74
-2
DPStatisticsServiceImpl.java
...t/module/jg/biz/service/impl/DPStatisticsServiceImpl.java
+48
-2
TzBaseEnterpriseInfoMapper.java
...oot/module/ymt/api/mapper/TzBaseEnterpriseInfoMapper.java
+2
-0
TzsUserInfoMapper.java
...in/amos/boot/module/ymt/api/mapper/TzsUserInfoMapper.java
+2
-0
TzBaseEnterpriseInfoMapper.xml
.../src/main/resources/mapper/TzBaseEnterpriseInfoMapper.xml
+9
-0
TzsUserInfoMapper.xml
...e-ymt-api/src/main/resources/mapper/TzsUserInfoMapper.xml
+13
-0
No files found.
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/DPStatisticsServiceImpl.java
View file @
a3fcbbac
...
@@ -5,12 +5,15 @@ import com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamDto;
...
@@ -5,12 +5,15 @@ import com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamDto;
import
com.yeejoin.amos.boot.module.common.api.dto.LegendDataDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.LegendDataDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.EquipBizCountDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.EquipBizCountDto
;
import
com.yeejoin.amos.boot.module.jg.api.enums.DPMapStatisticsItemEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.DPMapStatisticsItemEnum
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.CommonMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgEnableDisableMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgEnableDisableMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgScrapCancelMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgScrapCancelMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgUseRegistrationMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgUseRegistrationMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.EquipmentCategoryDto
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.EquipmentCategoryDto
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.EquipTechParamPipelineMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.EquipTechParamPipelineMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.EquipmentCategoryMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.EquipmentCategoryMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.TzBaseEnterpriseInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.TzsUserInfoMapper
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.elasticsearch.action.search.SearchRequest
;
import
org.elasticsearch.action.search.SearchRequest
;
...
@@ -33,6 +36,7 @@ import java.util.ArrayList;
...
@@ -33,6 +36,7 @@ import java.util.ArrayList;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.concurrent.ConcurrentHashMap
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
/**
/**
...
@@ -54,6 +58,27 @@ public class DPStatisticsServiceImpl {
...
@@ -54,6 +58,27 @@ public class DPStatisticsServiceImpl {
*/
*/
private
final
static
String
EQU_CATEGORY_CYLINDER
=
"2300"
;
private
final
static
String
EQU_CATEGORY_CYLINDER
=
"2300"
;
/**
* 单位类型-使用单位
*/
private
final
static
String
COMPANY_TYPE_USE
=
"使用单位"
;
/**
* 单位类型-安装改造维修单位
*/
private
final
static
String
COMPANY_TYPE_MAINTENANCE
=
"安装改造维修单位"
;
/**
* 单位类型-制造单位
*/
private
final
static
String
COMPANY_TYPE_MANUFACTURE
=
"制造单位"
;
/**
* 单位类型-充装单位
*/
private
final
static
String
COMPANY_TYPE_FILLING
=
"充装单位"
;
private
EquipmentCategoryMapper
equipmentCategoryMapper
;
private
EquipmentCategoryMapper
equipmentCategoryMapper
;
private
JgUseRegistrationMapper
useRegistrationMapper
;
private
JgUseRegistrationMapper
useRegistrationMapper
;
...
@@ -66,16 +91,27 @@ public class DPStatisticsServiceImpl {
...
@@ -66,16 +91,27 @@ public class DPStatisticsServiceImpl {
private
RestHighLevelClient
restHighLevelClient
;
private
RestHighLevelClient
restHighLevelClient
;
private
TzBaseEnterpriseInfoMapper
enterpriseInfoMapper
;
private
CommonMapper
commonMapper
;
private
static
List
<
EquipmentCategoryDto
>
equipmentCategoryDtos
;
private
static
List
<
EquipmentCategoryDto
>
equipmentCategoryDtos
;
private
TzsUserInfoMapper
userInfoMapper
;
public
DPStatisticsServiceImpl
(
EquipmentCategoryMapper
equipmentCategoryMapper
,
JgUseRegistrationMapper
useRegistrationMapper
,
EquipTechParamPipelineMapper
techParamsPipelineMapper
,
JgEnableDisableMapper
enableDisableMapper
,
JgScrapCancelMapper
scrapCancelMapper
,
RestHighLevelClient
restHighLevelClient
)
{
private
static
Map
<
String
,
String
>
regionCodeOrgCodeMap
=
new
ConcurrentHashMap
<>();
public
DPStatisticsServiceImpl
(
EquipmentCategoryMapper
equipmentCategoryMapper
,
JgUseRegistrationMapper
useRegistrationMapper
,
EquipTechParamPipelineMapper
techParamsPipelineMapper
,
JgEnableDisableMapper
enableDisableMapper
,
JgScrapCancelMapper
scrapCancelMapper
,
RestHighLevelClient
restHighLevelClient
,
TzBaseEnterpriseInfoMapper
enterpriseInfoMapper
,
CommonMapper
commonMapper
,
TzsUserInfoMapper
userInfoMapper
)
{
this
.
equipmentCategoryMapper
=
equipmentCategoryMapper
;
this
.
equipmentCategoryMapper
=
equipmentCategoryMapper
;
this
.
useRegistrationMapper
=
useRegistrationMapper
;
this
.
useRegistrationMapper
=
useRegistrationMapper
;
this
.
techParamsPipelineMapper
=
techParamsPipelineMapper
;
this
.
techParamsPipelineMapper
=
techParamsPipelineMapper
;
this
.
enableDisableMapper
=
enableDisableMapper
;
this
.
enableDisableMapper
=
enableDisableMapper
;
this
.
scrapCancelMapper
=
scrapCancelMapper
;
this
.
scrapCancelMapper
=
scrapCancelMapper
;
this
.
restHighLevelClient
=
restHighLevelClient
;
this
.
restHighLevelClient
=
restHighLevelClient
;
this
.
enterpriseInfoMapper
=
enterpriseInfoMapper
;
this
.
commonMapper
=
commonMapper
;
this
.
userInfoMapper
=
userInfoMapper
;
}
}
@PostConstruct
@PostConstruct
...
@@ -182,13 +218,23 @@ public class DPStatisticsServiceImpl {
...
@@ -182,13 +218,23 @@ public class DPStatisticsServiceImpl {
this
.
staticsCenterMapCountDataForCompany
(
result
,
dpFilterParamDto
);
this
.
staticsCenterMapCountDataForCompany
(
result
,
dpFilterParamDto
);
//4.人员数量统计
//4.人员数量统计
this
.
staticsCenterMapCountDataForPerson
(
result
,
dpFilterParamDto
);
this
.
staticsCenterMapCountDataForPerson
(
result
,
dpFilterParamDto
);
return
null
;
return
result
;
}
}
private
void
staticsCenterMapCountDataForPerson
(
Map
<
String
,
Object
>
result
,
DPFilterParamDto
dpFilterParamDto
)
{
private
void
staticsCenterMapCountDataForPerson
(
Map
<
String
,
Object
>
result
,
DPFilterParamDto
dpFilterParamDto
)
{
Long
num
=
userInfoMapper
.
countUserByPostAndAreaCode
(
dpFilterParamDto
.
getCityCode
(),
"6552"
);
}
}
private
void
staticsCenterMapCountDataForCompany
(
Map
<
String
,
Object
>
result
,
DPFilterParamDto
dpFilterParamDto
)
{
private
void
staticsCenterMapCountDataForCompany
(
Map
<
String
,
Object
>
result
,
DPFilterParamDto
dpFilterParamDto
)
{
String
orgCode
=
regionCodeOrgCodeMap
.
get
(
dpFilterParamDto
.
getCityCode
());
if
(
orgCode
==
null
)
{
orgCode
=
commonMapper
.
getOrgCodeByCompanyCode
(
dpFilterParamDto
.
getCityCode
());
regionCodeOrgCodeMap
.
put
(
dpFilterParamDto
.
getCityCode
(),
orgCode
);
}
result
.
put
(
DPMapStatisticsItemEnum
.
USERS_UNITS
.
getCode
(),
enterpriseInfoMapper
.
countByUnitTypeAndOrgCode
(
orgCode
,
COMPANY_TYPE_USE
));
result
.
put
(
DPMapStatisticsItemEnum
.
CONSTRUCTION_UNITS
.
getCode
(),
enterpriseInfoMapper
.
countByUnitTypeAndOrgCode
(
orgCode
,
COMPANY_TYPE_MAINTENANCE
));
result
.
put
(
DPMapStatisticsItemEnum
.
MANUFACTURING_UNITS
.
getCode
(),
enterpriseInfoMapper
.
countByUnitTypeAndOrgCode
(
orgCode
,
COMPANY_TYPE_MANUFACTURE
));
result
.
put
(
DPMapStatisticsItemEnum
.
GAS_UNITS
.
getCode
(),
enterpriseInfoMapper
.
countByUnitTypeAndOrgCode
(
orgCode
,
COMPANY_TYPE_FILLING
));
}
}
private
long
staticsCenterMapCountDataForCylinder
(
Map
<
String
,
Object
>
result
,
DPFilterParamDto
dpFilterParamDto
)
{
private
long
staticsCenterMapCountDataForCylinder
(
Map
<
String
,
Object
>
result
,
DPFilterParamDto
dpFilterParamDto
)
{
...
...
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/java/com/yeejoin/amos/boot/module/ymt/api/mapper/TzBaseEnterpriseInfoMapper.java
View file @
a3fcbbac
...
@@ -64,4 +64,6 @@ public interface TzBaseEnterpriseInfoMapper extends BaseMapper<TzBaseEnterpriseI
...
@@ -64,4 +64,6 @@ public interface TzBaseEnterpriseInfoMapper extends BaseMapper<TzBaseEnterpriseI
* @author yangyang
* @author yangyang
*/
*/
TzBaseEnterpriseInfo
selectBySeq
(
Long
sequenceNbr
);
TzBaseEnterpriseInfo
selectBySeq
(
Long
sequenceNbr
);
Long
countByUnitTypeAndOrgCode
(
@Param
(
"orgCode"
)
String
orgCode
,
@Param
(
"unitType"
)
String
unitType
);
}
}
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/java/com/yeejoin/amos/boot/module/ymt/api/mapper/TzsUserInfoMapper.java
View file @
a3fcbbac
...
@@ -11,4 +11,6 @@ import java.util.Set;
...
@@ -11,4 +11,6 @@ import java.util.Set;
public
interface
TzsUserInfoMapper
extends
BaseMapper
<
TzsUserInfo
>
{
public
interface
TzsUserInfoMapper
extends
BaseMapper
<
TzsUserInfo
>
{
Page
<
TzsUserInfoDto
>
selectPageMessage
(
@Param
(
"page"
)
Page
<
TzsUserInfoDto
>
page
,
@Param
(
"dto"
)
TzsUserInfoDto
dto
);
Page
<
TzsUserInfoDto
>
selectPageMessage
(
@Param
(
"page"
)
Page
<
TzsUserInfoDto
>
page
,
@Param
(
"dto"
)
TzsUserInfoDto
dto
);
Long
countUserByPostAndAreaCode
(
@Param
(
"areaCode"
)
String
areaCode
,
@Param
(
"post"
)
String
post
);
}
}
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/resources/mapper/TzBaseEnterpriseInfoMapper.xml
View file @
a3fcbbac
...
@@ -196,4 +196,13 @@
...
@@ -196,4 +196,13 @@
<select
id=
"selectBySeq"
resultType=
"com.yeejoin.amos.boot.module.ymt.api.entity.TzBaseEnterpriseInfo"
>
<select
id=
"selectBySeq"
resultType=
"com.yeejoin.amos.boot.module.ymt.api.entity.TzBaseEnterpriseInfo"
>
select * from tz_base_enterprise_info where sequence_nbr = #{sequenceNbr}
select * from tz_base_enterprise_info where sequence_nbr = #{sequenceNbr}
</select>
</select>
<select
id=
"countByUnitTypeAndOrgCode"
resultType=
"java.lang.Long"
>
SELECT
count(1)
FROM
"tz_base_enterprise_info" a
where
a.supervise_org_code like concat(#{orgCode},'%')
and a.unit_type like concat('%', #{unitType},'%')
</select>
</mapper>
</mapper>
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/resources/mapper/TzsUserInfoMapper.xml
View file @
a3fcbbac
...
@@ -48,4 +48,16 @@
...
@@ -48,4 +48,16 @@
</where>
</where>
order by rec_date
order by rec_date
</select>
</select>
<select
id=
"countUserByPostAndAreaCode"
resultType=
"java.lang.Long"
>
SELECT
count(1)
FROM
tzs_user_info tui,
tz_base_enterprise_info bi
WHERE
tui.unit_code = bi.use_code
and tui.post LIKE concat ( '%', #{post}, '%' )
and bi.supervise_org_code LIKE CONCAT ( #{areaCode}}, '%' )
and tui.is_delete=false
</select>
</mapper>
</mapper>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment