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
14ccfb80
Commit
14ccfb80
authored
Aug 10, 2024
by
hkl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:1.统计分析-钢轨伤损数量统计
parent
15347069
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
140 additions
and
4 deletions
+140
-4
StatisticAnalysisController.java
...isticAnalysis/controller/StatisticAnalysisController.java
+11
-0
StatisticAnalysisMapper.java
...les/statisticAnalysis/mapper/StatisticAnalysisMapper.java
+13
-0
StatisticAnalysisMapper.xml
.../statisticAnalysis/mapper/xml/StatisticAnalysisMapper.xml
+11
-0
StatisticAnalysisService.java
...s/statisticAnalysis/service/StatisticAnalysisService.java
+8
-0
StatisticAnalysisServiceImpl.java
...icAnalysis/service/impl/StatisticAnalysisServiceImpl.java
+69
-1
DynamicGeometryVO.java
...jeecg/modules/statisticAnalysis/vo/DynamicGeometryVO.java
+0
-3
RailWearVO.java
...va/org/jeecg/modules/statisticAnalysis/vo/RailWearVO.java
+28
-0
No files found.
jeecg-module-system/src/main/java/org/jeecg/modules/statisticAnalysis/controller/StatisticAnalysisController.java
View file @
14ccfb80
...
...
@@ -6,6 +6,7 @@ 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.jeecg.modules.statisticAnalysis.vo.RailWearVO
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
...
...
@@ -31,4 +32,14 @@ public class StatisticAnalysisController {
return
Result
.
OK
(
voList
);
}
@AutoLog
(
value
=
"统计分析-钢轨伤损数量统计"
)
@ApiOperation
(
value
=
"统计分析-钢轨伤损数量统计"
,
notes
=
"统计分析-钢轨伤损数量统计"
)
@GetMapping
(
value
=
"/railWear"
)
public
Result
<
List
<
RailWearVO
>>
railWear
(
String
startMonth
,
String
endMonth
)
{
List
<
RailWearVO
>
voList
=
statisticAnalysisService
.
railWear
(
startMonth
,
endMonth
);
return
Result
.
OK
(
voList
);
}
}
jeecg-module-system/src/main/java/org/jeecg/modules/statisticAnalysis/mapper/StatisticAnalysisMapper.java
View file @
14ccfb80
package
org
.
jeecg
.
modules
.
statisticAnalysis
.
mapper
;
import
org.jeecg.modules.statisticAnalysis.vo.RailWearVO
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -17,4 +19,15 @@ public interface StatisticAnalysisMapper {
* checkNum = 当月检查次数
*/
List
<
Map
<
String
,
Object
>>
getDynamicGeometry
(
String
year
);
/**
* @param startMonth
* @param endMonth
* @return map
* lightRailName = 线路名称
* damageType = 伤损种类(1-鱼鳞纹,2-剥落掉块,3-表面疲劳裂纹,4-轨底掉块,5-灼伤,6-核伤,7-焊缝,8-其他)
* damageDegree = 伤损程度(1-轻伤,2-轻伤有发展,3-重伤)
* checkNum = 检查次数
*/
List
<
RailWearVO
>
getRailWear
(
String
startMonth
,
String
endMonth
);
}
jeecg-module-system/src/main/java/org/jeecg/modules/statisticAnalysis/mapper/xml/StatisticAnalysisMapper.xml
View file @
14ccfb80
...
...
@@ -26,4 +26,15 @@
t.check_month
ORDER BY t.check_month ASC
</select>
<select
id=
"getRailWear"
resultType=
"org.jeecg.modules.statisticAnalysis.vo.RailWearVO"
>
SELECT t1.damage_type AS damageType,
t1.damage_degree AS damageDegree,
t2.light_rail_name AS lightRailName,
COUNT(1) AS checkNum
FROM t_ek_rail_wear_record t1
INNER JOIN t_ek_records_master_check t2 ON t1.records_master_check_id = t2.id
GROUP BY t2.light_rail_name,
t1.damage_type,
t1.damage_degree
</select>
</mapper>
jeecg-module-system/src/main/java/org/jeecg/modules/statisticAnalysis/service/StatisticAnalysisService.java
View file @
14ccfb80
package
org
.
jeecg
.
modules
.
statisticAnalysis
.
service
;
import
org.jeecg.modules.statisticAnalysis.vo.DynamicGeometryVO
;
import
org.jeecg.modules.statisticAnalysis.vo.RailWearVO
;
import
java.util.List
;
...
...
@@ -12,4 +13,11 @@ public interface StatisticAnalysisService {
* @return
*/
List
<
DynamicGeometryVO
>
dynamicGeometry
(
String
year
);
/**
* 统计分析-钢轨伤损数量统计
*
* @return
*/
List
<
RailWearVO
>
railWear
(
String
startMonth
,
String
endMonth
);
}
jeecg-module-system/src/main/java/org/jeecg/modules/statisticAnalysis/service/impl/StatisticAnalysisServiceImpl.java
View file @
14ccfb80
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.jeecg.modules.statisticAnalysis.vo.RailWearVO
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
...
...
@@ -69,4 +69,72 @@ public class StatisticAnalysisServiceImpl implements StatisticAnalysisService {
return
volist
;
}
@Override
public
List
<
RailWearVO
>
railWear
(
String
startMonth
,
String
endMonth
)
{
List
<
RailWearVO
>
records
=
statisticAnalysisMapper
.
getRailWear
(
startMonth
,
endMonth
);
for
(
RailWearVO
record
:
records
)
{
String
label
=
getDamageTypeName
(
record
.
getDamageType
())
+
"-"
+
getDamageDegree
(
record
.
getDamageDegree
());
record
.
setLabel
(
label
);
}
return
records
;
}
/**
* 伤损程度(1-轻伤,2-轻伤有发展,3-重伤)
*/
public
static
String
getDamageDegree
(
Integer
damageDegree
)
{
String
resultStr
=
""
;
switch
(
damageDegree
)
{
case
1
:
resultStr
=
"轻伤"
;
break
;
case
2
:
resultStr
=
"轻伤有发展"
;
break
;
case
3
:
resultStr
=
"重伤"
;
break
;
default
:
resultStr
=
"其他"
;
}
return
resultStr
;
}
/**
* 伤损种类(1-鱼鳞纹,2-剥落掉块,3-表面疲劳裂纹,4-轨底掉块,5-灼伤,6-核伤,7-焊缝,8-其他)
*
* @param damageType
* @return
*/
public
static
String
getDamageTypeName
(
Integer
damageType
)
{
String
resultStr
=
""
;
switch
(
damageType
)
{
case
1
:
resultStr
=
"鱼鳞纹"
;
break
;
case
2
:
resultStr
=
"剥落掉块"
;
break
;
case
3
:
resultStr
=
"表面疲劳裂纹"
;
break
;
case
4
:
resultStr
=
"轨底掉块"
;
break
;
case
5
:
resultStr
=
"灼伤"
;
break
;
case
6
:
resultStr
=
"核伤"
;
break
;
case
7
:
resultStr
=
"焊缝"
;
break
;
default
:
resultStr
=
"其他"
;
}
return
resultStr
;
}
}
jeecg-module-system/src/main/java/org/jeecg/modules/statisticAnalysis/vo/DynamicGeometryVO.java
View file @
14ccfb80
...
...
@@ -17,9 +17,6 @@ public class DynamicGeometryVO {
@ApiModelProperty
(
"检查数据12月个数据"
)
private
List
<
CheckData
>
checkDataList
;
@ApiModelProperty
(
"检查数据列表"
)
private
BigDecimal
[]
deductAveSumArray
;
@Data
@ApiModel
(
value
=
"DynamicGeometryVO$CheckData对象"
,
description
=
"统计分析-线网动态几何尺寸扣分走势图-检查数据"
)
public
static
class
CheckData
{
...
...
jeecg-module-system/src/main/java/org/jeecg/modules/statisticAnalysis/vo/RailWearVO.java
0 → 100644
View file @
14ccfb80
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
=
"RailWearVO对象"
,
description
=
"统计分析-钢轨探伤记录"
)
public
class
RailWearVO
{
@ApiModelProperty
(
"线路名称"
)
private
String
lightRailName
;
@ApiModelProperty
(
"伤损种类(1-鱼鳞纹,2-剥落掉块,3-表面疲劳裂纹,4-轨底掉块,5-灼伤,6-核伤,7-焊缝,8-其他)"
)
private
Integer
damageType
;
@ApiModelProperty
(
"伤损程度(1-轻伤,2-轻伤有发展,3-重伤)"
)
private
Integer
damageDegree
;
@ApiModelProperty
(
"检查次数"
)
private
Integer
checkNum
;
@ApiModelProperty
(
"标签"
)
private
String
label
;
}
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