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
814c0392
Commit
814c0392
authored
Nov 30, 2022
by
DESKTOP-BQLVS7A\admin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化设备弹窗统计接口(权限)
parent
57257f57
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
58 additions
and
5 deletions
+58
-5
EquipmentMapper.java
...join/amos/boot/module/ugp/api/mapper/EquipmentMapper.java
+1
-3
EquipmentMapper.xml
...ule-ugp-api/src/main/resources/mapper/EquipmentMapper.xml
+10
-1
EquipmentServiceImpl.java
...oot/module/ugp/biz/service/impl/EquipmentServiceImpl.java
+47
-1
No files found.
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/mapper/EquipmentMapper.java
View file @
814c0392
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
api
.
mapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.CompanyDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.EquipmentDto
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Company
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Equipment
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Mapper
;
...
...
@@ -23,5 +21,5 @@ import java.util.Set;
public
interface
EquipmentMapper
extends
BaseMapper
<
Equipment
>
{
IPage
<
EquipmentDto
>
queryEquipmentPage
(
IPage
<
EquipmentDto
>
page
,
Equipment
equipment
,
Set
<
String
>
companyIds
);
List
<
Map
<
String
,
Long
>>
informationStatistics
(
@Param
(
"company
SequenceNbr"
)
Long
companySequenceNbr
);
List
<
Map
<
String
,
Long
>>
informationStatistics
(
@Param
(
"company
Ids"
)
Set
<
String
>
companyIds
);
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/resources/mapper/EquipmentMapper.xml
View file @
814c0392
...
...
@@ -26,7 +26,16 @@
</select>
<select
id=
"informationStatistics"
parameterType=
"Long"
resultType=
"java.util.HashMap"
>
SELECT type as name ,count(1) AS value FROM tz_ugp_equipment where company_id = #{companySequenceNbr} GROUP BY type
SELECT type as name ,count(1) AS value FROM tz_ugp_equipment
<where>
<if
test=
"companyIds !=null and companyIds.size>0"
>
and company_id in
<foreach
collection=
"companyIds"
index=
"index"
item=
"item"
open=
"("
close=
")"
separator=
","
>
#{item}
</foreach>
</if>
</where>
GROUP BY type
</select>
</mapper>
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/EquipmentServiceImpl.java
View file @
814c0392
...
...
@@ -8,11 +8,14 @@ import com.alibaba.fastjson.JSONArray;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.module.common.api.entity.OrgUsr
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.OrgEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.AttachmentDto
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.*
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.CompanyMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.EquipmentMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.ProjectMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.SuperviseRuleMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.service.IEquipmentService
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.EquipmentDto
;
import
com.yeejoin.amos.boot.module.ugp.biz.framework.BusinessIdentify
;
...
...
@@ -44,11 +47,17 @@ public class EquipmentServiceImpl extends BaseService<EquipmentDto, Equipment, E
OrgServiceImpl
orgService
;
@Autowired
SuperviseRuleMapper
superviseRuleMapper
;
@Autowired
SuperviseRuleServiceImpl
superviseRuleService
;
@Autowired
CompanyServiceImpl
companyService
;
@Autowired
CompanyMapper
companyMapper
;
/**
* 分页查询
...
...
@@ -239,8 +248,44 @@ public class EquipmentServiceImpl extends BaseService<EquipmentDto, Equipment, E
//设备管理->信息统计
@BusinessIdentify
public
List
<
Map
<
String
,
Long
>>
informationStatistics
()
{
// List<Map<String,Long>> D = new ArrayList<>();
// Map<String,Long> w = new HashMap<>();
Set
<
String
>
strings
=
new
HashSet
<>();
Long
companySequenceNbr
=
orgService
.
getReginParams
().
getBusinessInfo
().
getCompanySequenceNbr
();
return
equipmentMapper
.
informationStatistics
(
companySequenceNbr
);
if
(
companyMapper
.
selectById
(
companySequenceNbr
).
getType
().
equals
(
OrgEnum
.
安装单位
.
getKey
())){
LambdaQueryWrapper
<
Equipment
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
Equipment:
:
getSequenceNbr
,
companySequenceNbr
);
strings
.
add
(
String
.
valueOf
(
companySequenceNbr
));
}
else
if
(
companyMapper
.
selectById
(
companySequenceNbr
).
getType
().
equals
(
OrgEnum
.
监检机构
.
getKey
()))
{
LambdaQueryWrapper
<
SuperviseRule
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
SuperviseRule:
:
getInspectionUnitId
,
companySequenceNbr
);
List
<
SuperviseRule
>
inspectionLists
=
superviseRuleMapper
.
selectList
(
wrapper
);
for
(
SuperviseRule
inspectionList
:
inspectionLists
){
LambdaQueryWrapper
<
Company
>
wrapper1
=
new
LambdaQueryWrapper
<>();
wrapper1
.
eq
(
Company:
:
getRegionCode
,
inspectionList
.
getAdminRegionCode
());
List
<
Company
>
codeLists
=
companyMapper
.
selectList
(
wrapper1
);
for
(
Company
codeList
:
codeLists
){
strings
.
add
(
String
.
valueOf
(
codeList
.
getSequenceNbr
()));
}
}
}
else
if
(
companyMapper
.
selectById
(
companySequenceNbr
).
getType
().
equals
(
OrgEnum
.
监察部门
.
getKey
()))
{
LambdaQueryWrapper
<
SuperviseRule
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
SuperviseRule:
:
getSuperviseDeptId
,
companySequenceNbr
);
List
<
SuperviseRule
>
superviseLists
=
superviseRuleMapper
.
selectList
(
wrapper
);
for
(
SuperviseRule
inspectionList
:
superviseLists
)
{
LambdaQueryWrapper
<
Company
>
wrapper1
=
new
LambdaQueryWrapper
<>();
wrapper1
.
eq
(
Company:
:
getRegionCode
,
inspectionList
.
getAdminRegionCode
());
List
<
Company
>
codeLists
=
companyMapper
.
selectList
(
wrapper1
);
for
(
Company
codeList
:
codeLists
)
{
strings
.
add
(
String
.
valueOf
(
codeList
.
getSequenceNbr
()));
}
}
}
return
equipmentMapper
.
informationStatistics
(
strings
);
}
}
\ 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