Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
H
hzsomms
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
ZTGK
hzsomms
Commits
1e53dd39
Commit
1e53dd39
authored
Aug 09, 2024
by
hkl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:1.统计分析-线网动态几何尺寸扣分走势图
parent
c6849893
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
206 additions
and
0 deletions
+206
-0
StatisticAnalysisController.java
...isticAnalysis/controller/StatisticAnalysisController.java
+34
-0
StatisticAnalysisMapper.java
...les/statisticAnalysis/mapper/StatisticAnalysisMapper.java
+20
-0
StatisticAnalysisMapper.xml
.../statisticAnalysis/mapper/xml/StatisticAnalysisMapper.xml
+29
-0
StatisticAnalysisService.java
...s/statisticAnalysis/service/StatisticAnalysisService.java
+15
-0
StatisticAnalysisServiceImpl.java
...icAnalysis/service/impl/StatisticAnalysisServiceImpl.java
+72
-0
DynamicGeometryVO.java
...jeecg/modules/statisticAnalysis/vo/DynamicGeometryVO.java
+36
-0
No files found.
jeecg-module-system/src/main/java/org/jeecg/modules/statisticAnalysis/controller/StatisticAnalysisController.java
0 → 100644
View file @
1e53dd39
package
org
.
jeecg
.
modules
.
statisticAnalysis
.
controller
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.jeecg.common.api.vo.Result
;
import
org.jeecg.common.aspect.annotation.AutoLog
;
import
org.jeecg.modules.statisticAnalysis.service.StatisticAnalysisService
;
import
org.jeecg.modules.statisticAnalysis.vo.DynamicGeometryVO
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.annotation.Resource
;
import
java.util.List
;
@RestController
@RequestMapping
(
"/statisticAnalysis"
)
@Api
(
tags
=
"统计分析"
)
public
class
StatisticAnalysisController
{
@Resource
private
StatisticAnalysisService
statisticAnalysisService
;
@AutoLog
(
value
=
"统计分析-线网动态几何尺寸扣分走势图"
)
@ApiOperation
(
value
=
"统计分析-线网动态几何尺寸扣分走势图"
,
notes
=
"统计分析-线网动态几何尺寸扣分走势图"
)
@GetMapping
(
value
=
"/dynamicGeometry"
)
public
Result
<
List
<
DynamicGeometryVO
>>
dynamicGeometry
(
String
year
)
{
List
<
DynamicGeometryVO
>
voList
=
statisticAnalysisService
.
dynamicGeometry
(
year
);
return
Result
.
OK
(
voList
);
}
}
jeecg-module-system/src/main/java/org/jeecg/modules/statisticAnalysis/mapper/StatisticAnalysisMapper.java
0 → 100644
View file @
1e53dd39
package
org
.
jeecg
.
modules
.
statisticAnalysis
.
mapper
;
import
java.util.List
;
import
java.util.Map
;
/**
* 统计分析
*/
public
interface
StatisticAnalysisMapper
{
/**
* @param year
* @return map
* lightRailName = 线路名称
* checkMonth = 检查月份
* deductAveSum = 得分统计
* checkNum = 当月检查次数
*/
List
<
Map
<
String
,
Object
>>
getDynamicGeometry
(
String
year
);
}
jeecg-module-system/src/main/java/org/jeecg/modules/statisticAnalysis/mapper/xml/StatisticAnalysisMapper.xml
0 → 100644
View file @
1e53dd39
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"org.jeecg.modules.statisticAnalysis.mapper.StatisticAnalysisMapper"
>
<select
id=
"getDynamicGeometry"
resultType=
"java.util.Map"
>
SELECT t.light_rail_name AS lightRailName,
t.check_month AS checkMonth,
SUM(deduct_ave) AS deductAveSum,
COUNT(1) AS checkNum
FROM (SELECT t1.deduct_ave, YEAR ( t2.check_time ) AS check_year, MONTH ( t2.check_time ) AS check_month, t2.light_rail_id, t2.light_rail_name
FROM
t_djt_movement_section_report t1
INNER JOIN t_djt_movement_records_master t2
ON t1.movement_master_id = t2.id
WHERE
t1.project_name = '总计'
AND t2.check_time >= STR_TO_DATE( CONCAT( #{year}
, '-01-01' )
, '%Y-%m-%d' )
AND t2.check_time
<
DATE_ADD( STR_TO_DATE(CONCAT(#{year}
, '-01-01')
, '%Y-%m-%d')
, INTERVAL 1 YEAR)) t
GROUP BY t.light_rail_id,
t.check_month
ORDER BY t.check_month ASC
</select>
</mapper>
jeecg-module-system/src/main/java/org/jeecg/modules/statisticAnalysis/service/StatisticAnalysisService.java
0 → 100644
View file @
1e53dd39
package
org
.
jeecg
.
modules
.
statisticAnalysis
.
service
;
import
org.jeecg.modules.statisticAnalysis.vo.DynamicGeometryVO
;
import
java.util.List
;
public
interface
StatisticAnalysisService
{
/**
* 统计分析-线网动态几何尺寸扣分走势图
*
* @param year
* @return
*/
List
<
DynamicGeometryVO
>
dynamicGeometry
(
String
year
);
}
jeecg-module-system/src/main/java/org/jeecg/modules/statisticAnalysis/service/impl/StatisticAnalysisServiceImpl.java
0 → 100644
View file @
1e53dd39
package
org
.
jeecg
.
modules
.
statisticAnalysis
.
service
.
impl
;
import
cn.hutool.core.convert.Convert
;
import
io.swagger.annotations.ApiModelProperty
;
import
org.jeecg.modules.statisticAnalysis.mapper.StatisticAnalysisMapper
;
import
org.jeecg.modules.statisticAnalysis.service.StatisticAnalysisService
;
import
org.jeecg.modules.statisticAnalysis.vo.DynamicGeometryVO
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* 统计分析
*/
@Service
public
class
StatisticAnalysisServiceImpl
implements
StatisticAnalysisService
{
@Resource
private
StatisticAnalysisMapper
statisticAnalysisMapper
;
@Override
public
List
<
DynamicGeometryVO
>
dynamicGeometry
(
String
year
)
{
List
<
DynamicGeometryVO
>
volist
=
new
ArrayList
<>();
List
<
Map
<
String
,
Object
>>
records
=
statisticAnalysisMapper
.
getDynamicGeometry
(
year
);
Map
<
String
,
DynamicGeometryVO
>
recordMap
=
new
HashMap
<>();
for
(
Map
<
String
,
Object
>
record
:
records
)
{
// 线路
String
lightRailName
=
Convert
.
toStr
(
record
.
get
(
"lightRailName"
));
// 检查月份
Integer
checkMonth
=
Convert
.
toInt
(
record
.
get
(
"checkMonth"
));
// 检查得分
BigDecimal
deductAveSum
=
Convert
.
toBigDecimal
(
record
.
get
(
"deductAveSum"
));
// 当月检查次数
Integer
checkNum
=
Convert
.
toInt
(
record
.
get
(
"checkNum"
));
DynamicGeometryVO
currentVo
=
recordMap
.
get
(
lightRailName
);
if
(
null
==
currentVo
)
{
currentVo
=
new
DynamicGeometryVO
();
// 检查线路名称
currentVo
.
setLightRailName
(
lightRailName
);
// 检查数据其他对象以防其他的时候要用
List
<
DynamicGeometryVO
.
CheckData
>
checkDataList
=
new
ArrayList
<>();
currentVo
.
setCheckDataList
(
checkDataList
);
recordMap
.
put
(
lightRailName
,
currentVo
);
volist
.
add
(
currentVo
);
}
// 存放数据对象
List
<
DynamicGeometryVO
.
CheckData
>
checkDataList
=
currentVo
.
getCheckDataList
();
DynamicGeometryVO
.
CheckData
checkData
=
new
DynamicGeometryVO
.
CheckData
();
checkData
.
setCheckMonth
(
checkMonth
);
checkData
.
setDeductAveSum
(
deductAveSum
);
checkData
.
setCheckNum
(
checkNum
);
checkDataList
.
add
(
checkData
);
}
return
volist
;
}
}
jeecg-module-system/src/main/java/org/jeecg/modules/statisticAnalysis/vo/DynamicGeometryVO.java
0 → 100644
View file @
1e53dd39
package
org
.
jeecg
.
modules
.
statisticAnalysis
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.math.BigDecimal
;
import
java.util.List
;
@Data
@ApiModel
(
value
=
"DynamicGeometryVO对象"
,
description
=
"统计分析-线网动态几何尺寸扣分走势图"
)
public
class
DynamicGeometryVO
{
@ApiModelProperty
(
"线路名称"
)
private
String
lightRailName
;
@ApiModelProperty
(
"检查数据12月个数据"
)
private
List
<
CheckData
>
checkDataList
;
@ApiModelProperty
(
"检查数据列表"
)
private
BigDecimal
[]
deductAveSumArray
;
@Data
@ApiModel
(
value
=
"DynamicGeometryVO$CheckData对象"
,
description
=
"统计分析-线网动态几何尺寸扣分走势图-检查数据"
)
public
static
class
CheckData
{
@ApiModelProperty
(
"检查月份"
)
private
Integer
checkMonth
;
@ApiModelProperty
(
"得分统计"
)
private
BigDecimal
deductAveSum
;
@ApiModelProperty
(
"当月检查次数"
)
private
Integer
checkNum
;
}
}
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