Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
f639093e
提交
f639093e
authored
10月 19, 2020
作者:
邓砥奕
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[统计分析]实现装备统计、自查统计service层,添加统计分析模块启动类
上级
e7b35eae
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
13 个修改的文件
包含
189 行增加
和
22 行删除
+189
-22
SelfCheckSchedulerTask.java
...ykj/dev/device/selfcheck/base/SelfCheckSchedulerTask.java
+1
-1
SelfCheckController.java
.../dev/device/selfcheck/controller/SelfCheckController.java
+1
-1
pom.xml
dev-statistical/pom.xml
+11
-2
StatisticalController.java
...ykj/dev/statistical/controller/StatisticalController.java
+33
-16
StatisticalService.java
.../com/tykj/dev/statistical/service/StatisticalService.java
+36
-0
StatisticalServiceImpl.java
.../dev/statistical/service/impl/StatisticalServiceImpl.java
+0
-0
statisticalApp.java
...rc/main/java/com/tykj/dev/statistical/statisticalApp.java
+21
-0
DevLifeSector.java
.../main/java/com/tykj/dev/statistical/vo/DevLifeSector.java
+4
-1
DevNum.java
...cal/src/main/java/com/tykj/dev/statistical/vo/DevNum.java
+4
-1
PerQuarter.java
...src/main/java/com/tykj/dev/statistical/vo/PerQuarter.java
+28
-0
SelfInspection.java
...main/java/com/tykj/dev/statistical/vo/SelfInspection.java
+3
-0
YearSelfInspection.java
.../java/com/tykj/dev/statistical/vo/YearSelfInspection.java
+36
-0
pom.xml
dev-union/pom.xml
+11
-0
没有找到文件。
dev-selfcheck/src/main/java/com/tykj/dev/device/selfcheck/base/SelfCheckSchedulerTask.java
浏览文件 @
f639093e
...
...
@@ -46,7 +46,7 @@ public class SelfCheckSchedulerTask {
/**
* 季度
*/
private
String
cron2
=
"0 0 0 1
3,6,9,12
? "
;
private
String
cron2
=
"0 0 0 1
1,4,7,10
? "
;
/**
* 年度
*/
...
...
dev-selfcheck/src/main/java/com/tykj/dev/device/selfcheck/controller/SelfCheckController.java
浏览文件 @
f639093e
...
...
@@ -104,7 +104,7 @@ public class SelfCheckController {
/**
* 季度
*/
private
String
cron2
=
"0 0 0 1
3,6,9,12
? "
;
private
String
cron2
=
"0 0 0 1
1,4,7,10
? "
;
/**
* 年度
*/
...
...
dev-statistical/pom.xml
浏览文件 @
f639093e
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns
=
"http://maven.apache.org/POM/4.0.0
"
xmlns
:xsi=
"http://www.w3.org/2001/XMLSchema-instance
"
<project
xmlns
:xsi=
"http://www.w3.org/2001/XMLSchema-instance
"
xmlns
=
"http://maven.apache.org/POM/4.0.0
"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<parent>
<artifactId>
equip
</artifactId>
...
...
@@ -24,6 +24,14 @@
<groupId>
com.tykj.dev
</groupId>
<artifactId>
config
</artifactId>
</dependency>
<dependency>
<groupId>
com.tykj
</groupId>
<artifactId>
dev-library
</artifactId>
</dependency>
<dependency>
<groupId>
com.tykj
</groupId>
<artifactId>
dev-selfcheck
</artifactId>
</dependency>
</dependencies>
</project>
\ No newline at end of file
dev-statistical/src/main/java/com/tykj/dev/statistical/controller/StatisticalController.java
浏览文件 @
f639093e
...
...
@@ -9,8 +9,16 @@ package com.tykj.dev.statistical.controller;
*/
import
com.tykj.dev.config.swagger.AutoDocument
;
import
com.tykj.dev.device.library.repository.DeviceLibraryDao
;
import
com.tykj.dev.device.library.subject.domin.DeviceLibrary
;
import
com.tykj.dev.device.user.subject.dao.AreaDao
;
import
com.tykj.dev.device.user.subject.dao.UnitsDao
;
import
com.tykj.dev.device.user.subject.entity.Area
;
import
com.tykj.dev.device.user.subject.entity.Units
;
import
com.tykj.dev.statistical.service.StatisticalService
;
import
com.tykj.dev.statistical.vo.*
;
import
io.swagger.annotations.Api
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.RequestEntity
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.web.bind.annotation.GetMapping
;
...
...
@@ -20,6 +28,7 @@ import org.springframework.web.bind.annotation.RestController;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.stream.Collectors
;
@RestController
@Api
(
tags
=
"统计业务模块"
,
description
=
"统计相关接口"
)
...
...
@@ -27,6 +36,8 @@ import java.util.List;
@RequestMapping
(
"/statistical"
)
public
class
StatisticalController
{
@Autowired
private
StatisticalService
statisticalService
;
/**
* 查询各市的装备数量
...
...
@@ -34,35 +45,41 @@ public class StatisticalController {
*/
@GetMapping
(
"/devNum"
)
public
ResponseEntity
selectDevNum
(){
List
<
DevNum
>
nums
=
new
ArrayList
<>();
return
ResponseEntity
.
ok
(
nums
);
return
ResponseEntity
.
ok
(
statisticalService
.
getDeviceNum
());
}
/**
* 查询各市装备生命状态数量
* @return 各市装备生命状态对象集合
* 查询
全省或
各市装备生命状态数量
* @return
全省或
各市装备生命状态对象集合
*/
@GetMapping
(
"/StateofLife"
)
public
ResponseEntity
selectStateofLife
(){
List
<
DevLifeSector
>
nums
=
new
ArrayList
<>();
return
ResponseEntity
.
ok
(
nums
);
@GetMapping
(
"/StateofLife/{type}"
)
public
ResponseEntity
selectStateofLife
(
@PathVariable
Integer
type
){
return
ResponseEntity
.
ok
(
statisticalService
.
getLifeStatus
(
type
));
}
/**
* 查询
各市自查情况数量
* @return 各市
装备生命
状态对象集合
* 查询
当前季度各市自查情况
* @return 各市
自查
状态对象集合
*/
@GetMapping
(
"/selfInspection/{type}"
)
public
ResponseEntity
selectSelfInspection
(
@PathVariable
Integer
type
){
List
<
SelfInspection
>
nums
=
new
ArrayList
<>();
return
ResponseEntity
.
ok
(
nums
);
@GetMapping
(
"/selfInspection"
)
public
ResponseEntity
selectSelfInspection
(){
return
ResponseEntity
.
ok
(
statisticalService
.
getSelfCheck
());
}
/**
* 查询年度各季度各市自查情况
* @return 各市自查状态对象集合
*/
@GetMapping
(
"/selfInspection/year"
)
public
ResponseEntity
selectYearSelfInspection
(){
return
ResponseEntity
.
ok
(
statisticalService
.
getYearSelfCheck
());
}
/**
* 查询各市核查情况数量
* @return 各市
装备生命
状态对象集合
* @return 各市
核查
状态对象集合
*/
@GetMapping
(
"/
self
Inspection/{type}"
)
@GetMapping
(
"/
confirm
Inspection/{type}"
)
public
ResponseEntity
selectVerification
(
@PathVariable
Integer
type
){
List
<
Verification
>
nums
=
new
ArrayList
<>();
return
ResponseEntity
.
ok
(
nums
);
...
...
dev-statistical/src/main/java/com/tykj/dev/statistical/service/StatisticalService.java
0 → 100644
浏览文件 @
f639093e
package
com
.
tykj
.
dev
.
statistical
.
service
;
import
com.tykj.dev.statistical.vo.DevLifeSector
;
import
com.tykj.dev.statistical.vo.DevNum
;
import
com.tykj.dev.statistical.vo.SelfInspection
;
import
com.tykj.dev.statistical.vo.YearSelfInspection
;
import
java.util.List
;
/**
* @author dengdiyi
*/
public
interface
StatisticalService
{
/**
* 获取装备统计信息
*/
List
<
DevNum
>
getDeviceNum
();
/**
* @param type 类型(1:省,2:市)
* 获取装备生命状态统计信息
*/
List
<
DevLifeSector
>
getLifeStatus
(
Integer
type
);
/**
* 获取季度自查统计信息
*/
List
<
SelfInspection
>
getSelfCheck
();
/**
* 获取年度自查统计信息
*/
List
<
YearSelfInspection
>
getYearSelfCheck
();
}
dev-statistical/src/main/java/com/tykj/dev/statistical/service/impl/StatisticalServiceImpl.java
0 → 100644
浏览文件 @
f639093e
差异被折叠。
点击展开。
dev-statistical/src/main/java/com/tykj/dev/statistical/statisticalApp.java
0 → 100644
浏览文件 @
f639093e
package
com
.
tykj
.
dev
.
statistical
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
/**
* @author zjm
* @version 1.0.0
* @ClassName userApp.java
* @Description TODO
* @createTime 2020年09月01日 14:32:00
*/
@SpringBootApplication
(
scanBasePackages
=
{
"com.tykj.dev.*"
,
}
)
public
class
statisticalApp
{
public
static
void
main
(
String
[]
args
)
{
SpringApplication
.
run
(
statisticalApp
.
class
,
args
);
}
}
dev-statistical/src/main/java/com/tykj/dev/statistical/vo/DevLifeSector.java
浏览文件 @
f639093e
package
com
.
tykj
.
dev
.
statistical
.
vo
;
import
lombok.Data
;
/**
* @author zjm
* @version 1.0.0
...
...
@@ -7,6 +9,7 @@ package com.tykj.dev.statistical.vo;
* @Description 各市扇形生命状态统计
* @createTime 2020年10月16日 09:55:00
*/
@Data
public
class
DevLifeSector
{
/**
* 市名称
...
...
@@ -21,7 +24,7 @@ public class DevLifeSector {
/**
* 维修数量
*/
private
Integer
maintenanceCo
nu
t
;
private
Integer
maintenanceCo
un
t
;
/**
* 报废数量
...
...
dev-statistical/src/main/java/com/tykj/dev/statistical/vo/DevNum.java
浏览文件 @
f639093e
package
com
.
tykj
.
dev
.
statistical
.
vo
;
import
lombok.Data
;
/**
* @author zjm
* @version 1.0.0
...
...
@@ -7,6 +9,7 @@ package com.tykj.dev.statistical.vo;
* @Description 统计分析 市级 本市装备数量
* @createTime 2020年10月15日 10:35:00
*/
@Data
public
class
DevNum
{
/**
* 区域名称
...
...
@@ -16,6 +19,6 @@ public class DevNum {
/**
* 区域装备总数
*/
private
Integer
co
nu
t
;
private
Integer
co
un
t
;
}
dev-statistical/src/main/java/com/tykj/dev/statistical/vo/PerQuarter.java
0 → 100644
浏览文件 @
f639093e
package
com
.
tykj
.
dev
.
statistical
.
vo
;
import
lombok.Data
;
import
java.util.List
;
/**
* @author dengdiyi
* 年度中每季度自查统计
*/
@Data
public
class
PerQuarter
{
/**
* 完成数量
*/
private
Integer
completeCount
;
/**
* 未完成数量
*/
private
Integer
noCompleteCount
;
/**
* 未完成单位
*/
private
List
<
String
>
noCompleteUnits
;
}
dev-statistical/src/main/java/com/tykj/dev/statistical/vo/SelfInspection.java
浏览文件 @
f639093e
package
com
.
tykj
.
dev
.
statistical
.
vo
;
import
lombok.Data
;
/**
* @author zjm
* @version 1.0.0
...
...
@@ -7,6 +9,7 @@ package com.tykj.dev.statistical.vo;
* @Description 自查各市完成情况
* @createTime 2020年10月16日 10:30:00
*/
@Data
public
class
SelfInspection
{
/**
* 市 名称
...
...
dev-statistical/src/main/java/com/tykj/dev/statistical/vo/YearSelfInspection.java
0 → 100644
浏览文件 @
f639093e
package
com
.
tykj
.
dev
.
statistical
.
vo
;
import
lombok.Data
;
/**
* @author dengdiyi
* 年度自查统计详情vo
*/
@Data
public
class
YearSelfInspection
{
/**
* 市 名称
*/
private
String
areaName
;
/**
* 第一季度统计
*/
private
PerQuarter
firstQuarter
;
/**
* 第二季度统计
*/
private
PerQuarter
secondQuarter
;
/**
* 第三季度统计
*/
private
PerQuarter
thirdQuarter
;
/**
* 第四季度统计
*/
private
PerQuarter
fourthQuarter
;
}
dev-union/pom.xml
浏览文件 @
f639093e
...
...
@@ -358,6 +358,17 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>
com.tykj
</groupId>
<artifactId>
dev-statistical
</artifactId>
<version>
1.0-SNAPSHOT
</version>
<exclusions>
<exclusion>
<groupId>
com.tykj.dev
</groupId>
<artifactId>
union
</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Spring Security Test -->
<dependency>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论