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
382b0468
Commit
382b0468
authored
Nov 22, 2022
by
zhengjuzi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
设备类型及数量统计
parent
8ad1a315
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
4 deletions
+24
-4
EquipmentMapper.java
...join/amos/boot/module/ugp/api/mapper/EquipmentMapper.java
+2
-0
EquipmentMapper.xml
...ule-ugp-api/src/main/resources/mapper/EquipmentMapper.xml
+4
-0
EquipmentController.java
...s/boot/module/ugp/biz/controller/EquipmentController.java
+12
-0
EquipmentServiceImpl.java
...oot/module/ugp/biz/service/impl/EquipmentServiceImpl.java
+6
-4
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 @
382b0468
...
...
@@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import
org.apache.ibatis.annotations.Mapper
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Set
;
/**
...
...
@@ -21,4 +22,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
();
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/resources/mapper/EquipmentMapper.xml
View file @
382b0468
...
...
@@ -25,4 +25,8 @@
order by rec_date desc
</select>
<select
id=
"informationStatistics"
resultType=
"java.util.HashMap"
>
SELECT type as name ,count(1) AS value FROM tz_ugp_equipment GROUP BY type
</select>
</mapper>
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/EquipmentController.java
View file @
382b0468
...
...
@@ -29,6 +29,7 @@ import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
com.yeejoin.amos.boot.module.ugp.biz.service.impl.EquipmentServiceImpl
;
...
...
@@ -274,4 +275,15 @@ public class EquipmentController extends BaseController {
equipmentServiceImpl
.
updateEI
(
sequenceNbr
,
object
);
return
ResponseHelper
.
buildResponse
(
"ok"
);
}
/**
* 设备管理->信息统计
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/information"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"设备管理->信息统计"
,
notes
=
"设备管理->信息统计"
)
public
ResponseModel
<
List
<
Map
<
String
,
Long
>>>
informationStatistics
()
{
return
ResponseHelper
.
buildResponse
(
equipmentServiceImpl
.
informationStatistics
());
}
}
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 @
382b0468
...
...
@@ -22,10 +22,7 @@ import org.typroject.tyboot.core.rdbms.service.BaseService;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
java.util.ArrayList
;
import
java.util.HashSet
;
import
java.util.List
;
import
java.util.Set
;
import
java.util.*
;
/**
* 设备信息表服务实现类
...
...
@@ -241,4 +238,8 @@ public class EquipmentServiceImpl extends BaseService<EquipmentDto, Equipment, E
}
//设备管理->信息统计
public
List
<
Map
<
String
,
Long
>>
informationStatistics
()
{
return
equipmentMapper
.
informationStatistics
();
}
}
\ 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