Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
Z
zh-baseversion-project
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
王浩
zh-baseversion-project
Commits
ccf7cb94
Commit
ccf7cb94
authored
Mar 14, 2026
by
zhangjianqian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
app接口
parent
e8f3450b
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
45 additions
and
0 deletions
+45
-0
StatisticController.java
.../zehong/web/controller/statistic/StatisticController.java
+13
-0
TLinePatrolMapper.java
...main/java/com/zehong/system/mapper/TLinePatrolMapper.java
+8
-0
ITLinePatrolService.java
...n/java/com/zehong/system/service/ITLinePatrolService.java
+7
-0
TLinePatrolServiceImpl.java
...om/zehong/system/service/impl/TLinePatrolServiceImpl.java
+11
-0
TLinePatrolMapper.xml
...em/src/main/resources/mapper/system/TLinePatrolMapper.xml
+6
-0
No files found.
zh-baseversion-admin/src/main/java/com/zehong/web/controller/statistic/StatisticController.java
View file @
ccf7cb94
...
@@ -17,6 +17,7 @@ import org.springframework.web.bind.annotation.GetMapping;
...
@@ -17,6 +17,7 @@ import org.springframework.web.bind.annotation.GetMapping;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.time.Year
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -47,6 +48,8 @@ public class StatisticController
...
@@ -47,6 +48,8 @@ public class StatisticController
private
ITWorkOrderService
tWorkOrderService
;
private
ITWorkOrderService
tWorkOrderService
;
@Autowired
@Autowired
private
ITInspectReportService
inspectReportService
;
private
ITInspectReportService
inspectReportService
;
@Autowired
private
ITLinePatrolService
linePatrolService
;
/**
/**
* 燃气事故台账统计
* 燃气事故台账统计
...
@@ -121,4 +124,14 @@ public class StatisticController
...
@@ -121,4 +124,14 @@ public class StatisticController
return
AjaxResult
.
success
(
list
);
return
AjaxResult
.
success
(
list
);
}
}
/**
* 巡检次数统计
* @return
*/
@GetMapping
(
"/xunjianNum"
)
public
AjaxResult
xunjianNum
()
{
List
<
Map
<
String
,
Object
>>
list
=
linePatrolService
.
selectXunjianNum
();
return
AjaxResult
.
success
(
list
);
}
}
}
zh-baseversion-system/src/main/java/com/zehong/system/mapper/TLinePatrolMapper.java
View file @
ccf7cb94
package
com
.
zehong
.
system
.
mapper
;
package
com
.
zehong
.
system
.
mapper
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
com.zehong.system.domain.TLinePatrol
;
import
com.zehong.system.domain.TLinePatrol
;
/**
/**
...
@@ -60,4 +62,10 @@ public interface TLinePatrolMapper
...
@@ -60,4 +62,10 @@ public interface TLinePatrolMapper
public
int
deleteTLinePatrolByIds
(
Long
[]
ids
);
public
int
deleteTLinePatrolByIds
(
Long
[]
ids
);
int
insertBatch
(
List
<
TLinePatrol
>
tLinePatrol
);
int
insertBatch
(
List
<
TLinePatrol
>
tLinePatrol
);
/**
* 企业巡检数量
* @return
*/
public
List
<
Map
<
String
,
Object
>>
selectXunjianNum
();
}
}
\ No newline at end of file
zh-baseversion-system/src/main/java/com/zehong/system/service/ITLinePatrolService.java
View file @
ccf7cb94
package
com
.
zehong
.
system
.
service
;
package
com
.
zehong
.
system
.
service
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
com.zehong.system.domain.TLinePatrol
;
import
com.zehong.system.domain.TLinePatrol
;
...
@@ -61,4 +62,10 @@ public interface ITLinePatrolService
...
@@ -61,4 +62,10 @@ public interface ITLinePatrolService
public
int
deleteTLinePatrolById
(
Long
id
);
public
int
deleteTLinePatrolById
(
Long
id
);
int
insertBatch
(
List
<
TLinePatrol
>
tLinePatrol
);
int
insertBatch
(
List
<
TLinePatrol
>
tLinePatrol
);
/**
* 查询巡检数量
* @return
*/
public
List
<
Map
<
String
,
Object
>>
selectXunjianNum
();
}
}
\ No newline at end of file
zh-baseversion-system/src/main/java/com/zehong/system/service/impl/TLinePatrolServiceImpl.java
View file @
ccf7cb94
package
com
.
zehong
.
system
.
service
.
impl
;
package
com
.
zehong
.
system
.
service
.
impl
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
com.zehong.common.utils.DateUtils
;
import
com.zehong.common.utils.DateUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -97,4 +99,13 @@ public class TLinePatrolServiceImpl implements ITLinePatrolService
...
@@ -97,4 +99,13 @@ public class TLinePatrolServiceImpl implements ITLinePatrolService
public
int
insertBatch
(
List
<
TLinePatrol
>
tLinePatrol
)
{
public
int
insertBatch
(
List
<
TLinePatrol
>
tLinePatrol
)
{
return
tLinePatrolMapper
.
insertBatch
(
tLinePatrol
);
return
tLinePatrolMapper
.
insertBatch
(
tLinePatrol
);
}
}
/**
* 企业巡检数量
* @return
*/
@Override
public
List
<
Map
<
String
,
Object
>>
selectXunjianNum
()
{
return
tLinePatrolMapper
.
selectXunjianNum
();
}
}
}
\ No newline at end of file
zh-baseversion-system/src/main/resources/mapper/system/TLinePatrolMapper.xml
View file @
ccf7cb94
...
@@ -98,4 +98,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -98,4 +98,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
)
)
</foreach>
</foreach>
</insert>
</insert>
<select
id=
"selectXunjianNum"
resultType=
"hashmap"
>
SELECT * FROM (SELECT e.enterprise_name AS ename, COUNT(p.id) AS num FROM t_enterprise_info e
LEFT JOIN t_line_patrol p ON p.beyond_enterprise_id = e.enterprise_id
GROUP BY e.enterprise_id) t
ORDER BY t.num DESC limit 10
</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