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
27ead316
Commit
27ead316
authored
Jan 30, 2024
by
hkl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:1.首页代码提交
parent
88028080
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
105 additions
and
44 deletions
+105
-44
AnalysisBatchMapper.java
...les/dynamicStaticAnalysis/mapper/AnalysisBatchMapper.java
+1
-0
AnalysisBatchMapper.xml
.../dynamicStaticAnalysis/mapper/xml/AnalysisBatchMapper.xml
+2
-3
IAnalysisBatchService.java
.../dynamicStaticAnalysis/service/IAnalysisBatchService.java
+2
-0
AnalysisBatchServiceImpl.java
...StaticAnalysis/service/impl/AnalysisBatchServiceImpl.java
+1
-0
DiseaseDTO.java
.../main/java/org/jeecg/modules/homePage/dto/DiseaseDTO.java
+7
-6
HomePageFaceImpl.java
...rg/jeecg/modules/homePage/face/impl/HomePageFaceImpl.java
+76
-27
DiseaseVO.java
...rc/main/java/org/jeecg/modules/homePage/vo/DiseaseVO.java
+5
-2
SubwaySectionMapper.xml
.../modules/subwayNetwork/mapper/xml/SubwaySectionMapper.xml
+3
-2
TrainStationMapper.xml
...g/modules/subwayNetwork/mapper/xml/TrainStationMapper.xml
+3
-2
SectionStationNode.java
...rg/jeecg/modules/subwayNetwork/vo/SectionStationNode.java
+3
-0
application-dev.yml
jeecg-module-system/src/main/resources/application-dev.yml
+2
-2
No files found.
jeecg-module-system/src/main/java/org/jeecg/modules/dynamicStaticAnalysis/mapper/AnalysisBatchMapper.java
View file @
27ead316
...
...
@@ -7,6 +7,7 @@ import org.jeecg.modules.dynamicStaticAnalysis.entity.AnalysisBatch;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.jeecg.modules.dynamicStaticAnalysis.vo.AnalysisBatchQueryVO
;
import
org.jeecg.modules.dynamicStaticAnalysis.vo.CheckBatchVO
;
import
org.jeecg.modules.homePage.dto.DiseaseDTO
;
import
org.jeecg.modules.homePage.vo.DiseaseVO
;
import
org.jeecg.modules.homePage.vo.ToDoDetailVO
;
...
...
jeecg-module-system/src/main/java/org/jeecg/modules/dynamicStaticAnalysis/mapper/xml/AnalysisBatchMapper.xml
View file @
27ead316
...
...
@@ -154,9 +154,9 @@
t2.transfinite_type diseaseTypeName,
t2.transfinite_grade overrunLevel,
t2.transfinite_grade_name,
t2.allow_value
peakValue,
IFNULL(t2.allow_value,'')
peakValue,
t2.measure_point_value longitude,
t2.
measure_point_value - t2.allow_value dataDifferenc
e
t2.
ek_typ
e
FROM
(
SELECT
...
...
@@ -184,7 +184,6 @@
t1.analysis_batch_id = #{analysisBatchCode}
) analysis
LEFT JOIN t_dsa_analysis_batch_unit_device_transfinite t2 ON t2.analysis_batch_unit_device_id = analysis.id
WHERE
1 = 1
AND analysis.unit_score_level = 3
...
...
jeecg-module-system/src/main/java/org/jeecg/modules/dynamicStaticAnalysis/service/IAnalysisBatchService.java
View file @
27ead316
...
...
@@ -8,6 +8,7 @@ import org.jeecg.modules.dynamicStaticAnalysis.entity.AnalysisBatch;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
org.jeecg.modules.dynamicStaticAnalysis.vo.AnalysisBatchQueryVO
;
import
org.jeecg.modules.dynamicStaticAnalysis.vo.CheckBatchVO
;
import
org.jeecg.modules.homePage.dto.DiseaseDTO
;
import
org.jeecg.modules.homePage.vo.DiseaseVO
;
import
org.jeecg.modules.homePage.vo.ToDoDetailVO
;
...
...
@@ -42,6 +43,7 @@ public interface IAnalysisBatchService extends IService<AnalysisBatch> {
/**
* 病害列表
*
* @param analysisBatchCode
* @return
*/
...
...
jeecg-module-system/src/main/java/org/jeecg/modules/dynamicStaticAnalysis/service/impl/AnalysisBatchServiceImpl.java
View file @
27ead316
...
...
@@ -18,6 +18,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import
org.jeecg.modules.dynamicStaticAnalysis.util.StrUtil
;
import
org.jeecg.modules.dynamicStaticAnalysis.vo.AnalysisBatchQueryVO
;
import
org.jeecg.modules.dynamicStaticAnalysis.vo.CheckBatchVO
;
import
org.jeecg.modules.homePage.dto.DiseaseDTO
;
import
org.jeecg.modules.homePage.vo.DiseaseVO
;
import
org.jeecg.modules.homePage.vo.ToDoDetailVO
;
import
org.jeecg.modules.utils.BeanCopyUtil
;
...
...
jeecg-module-system/src/main/java/org/jeecg/modules/homePage/dto/DiseaseDTO.java
View file @
27ead316
...
...
@@ -5,22 +5,23 @@ import io.swagger.annotations.ApiModelProperty;
import
lombok.Data
;
import
java.util.List
;
import
java.util.Set
;
@Data
@ApiModel
(
value
=
"DiseaseDTO对象"
,
description
=
"首页-病害DTO"
)
public
class
DiseaseDTO
{
@ApiModelProperty
(
"超限类型"
)
private
List
<
String
>
overType
;
@ApiModelProperty
(
"超限类型
1-人工检查数据 2-轨检仪检查数据
"
)
private
Set
<
Integer
>
overType
;
@ApiModelProperty
(
"轨检车超限"
)
private
List
<
String
>
overCard
;
@ApiModelProperty
(
"轨检车超限
1-1级超限 2-2级超限 3-3级超限 4-4级超限
"
)
private
Set
<
Integer
>
overCard
;
@ApiModelProperty
(
"水加"
)
private
List
<
String
>
h
;
private
Set
<
Integer
>
h
;
@ApiModelProperty
(
"垂加"
)
private
List
<
String
>
v
;
private
Set
<
Integer
>
v
;
}
jeecg-module-system/src/main/java/org/jeecg/modules/homePage/face/impl/HomePageFaceImpl.java
View file @
27ead316
package
org
.
jeecg
.
modules
.
homePage
.
face
.
impl
;
import
cn.hutool.core.convert.Convert
;
import
cn.hutool.core.util.ObjectUtil
;
import
io.swagger.models.auth.In
;
import
org.jeecg.modules.checkData.service.IMovementRecordsMasterService
;
import
org.jeecg.modules.dynamicStaticAnalysis.entity.AnalysisBatch
;
import
org.jeecg.modules.dynamicStaticAnalysis.service.IAnalysisBatchService
;
...
...
@@ -14,8 +17,10 @@ import org.jeecg.modules.subwayNetwork.vo.SectionStationNode;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.math.BigDecimal
;
import
java.math.RoundingMode
;
import
java.util.*
;
import
java.util.stream.Collectors
;
@Service
public
class
HomePageFaceImpl
implements
HomePageFace
{
...
...
@@ -69,6 +74,7 @@ public class HomePageFaceImpl implements HomePageFace {
.
last
(
"limit 1"
)
.
one
();
List
<
DiseaseVO
>
records
=
analysisBatchService
.
diseaseList
(
one
.
getId
());
for
(
DiseaseVO
record
:
records
)
{
record
.
setLineAliasId
(
one
.
getLineAliasId
());
...
...
@@ -78,31 +84,74 @@ public class HomePageFaceImpl implements HomePageFace {
record
.
setLineAliasCode
(
"XDK"
);
}
}
//
// // 病害里程,取分
// List<DiseaseVO> records = new ArrayList<>();
//
// DiseaseVO vo = new DiseaseVO();
// vo.setId("1682308697792339970");
// vo.setLineAliasCode("SDK");
// vo.setMileage("21556");
// vo.setOverrunType("左轨向");
// vo.setOverrunLevel("1");
// vo.setLongitude("2");
// vo.setPeakValue("-10.44");
// vo.setDataDifference("-0.44");
// records.add(vo);
//
// DiseaseVO vo2 = new DiseaseVO();
// vo2.setId("1682308697792339970");
// vo2.setLineAliasCode("SDK");
// vo2.setMileage("21556");
// vo2.setOverrunType("左轨向");
// vo2.setOverrunLevel("1");
// vo2.setLongitude("2");
// vo2.setPeakValue("-10.44");
// vo2.setDataDifference("-0.44");
// records.add(vo2);
if
(
ObjectUtil
.
isNotEmpty
(
records
))
{
records
=
conditionalFilter
(
records
,
dto
);
}
// 单独处理管理数据差字段
for
(
DiseaseVO
record
:
records
)
{
// 峰值是否全是数字
String
dataDifference
;
if
(
record
.
getPeakValue
().
matches
(
"\\d+(\\.\\d+)?"
))
{
BigDecimal
peakValue
=
Convert
.
toBigDecimal
(
record
.
getPeakValue
());
BigDecimal
longitude
=
Convert
.
toBigDecimal
(
record
.
getLongitude
());
BigDecimal
difference
=
peakValue
.
subtract
(
longitude
);
dataDifference
=
difference
.
toString
();
}
else
{
dataDifference
=
record
.
getLongitude
();
}
record
.
setDataDifference
(
dataDifference
);
}
return
records
;
}
/**
* 条件过滤
*
* @param records
* @param dto
*/
private
List
<
DiseaseVO
>
conditionalFilter
(
List
<
DiseaseVO
>
records
,
DiseaseDTO
dto
)
{
Set
<
Integer
>
overTypeSet
=
dto
.
getOverType
();
overTypeSet
.
add
(
3
);
// 3-轨检车检查
overTypeSet
.
add
(
4
);
// 4-添乘仪检查
// 1. 过滤检查类型
if
(
ObjectUtil
.
isNotEmpty
(
records
))
{
records
=
records
.
stream
()
.
filter
(
v
->
overTypeSet
.
contains
(
v
.
getEkType
()))
.
collect
(
Collectors
.
toList
());
}
// 轨检车超限
Set
<
Integer
>
overCardSet
=
dto
.
getOverCard
();
// 2.过滤轨检车相关数据
if
(
ObjectUtil
.
isNotEmpty
(
records
))
{
records
=
records
.
stream
().
filter
(
v
->
v
.
getEkType
()
!=
3
||
overCardSet
.
contains
(
v
.
getOverrunLevel
()))
.
collect
(
Collectors
.
toList
());
}
// 添乘仪-水平超限
Set
<
Integer
>
hSet
=
dto
.
getH
();
if
(
ObjectUtil
.
isNotEmpty
(
records
))
{
records
=
records
.
stream
()
.
filter
(
v
->
v
.
getEkType
()
!=
4
||
(
v
.
getDiseaseTypeName
().
equals
(
"水平超限"
)
&&
hSet
.
contains
(
v
.
getOverrunLevel
())))
.
collect
(
Collectors
.
toList
());
}
// 添乘仪-垂直超限
Set
<
Integer
>
vSet
=
dto
.
getV
();
if
(
ObjectUtil
.
isNotEmpty
(
records
))
{
records
=
records
.
stream
()
.
filter
(
v
->
v
.
getEkType
()
!=
4
||
(
v
.
getDiseaseTypeName
().
equals
(
"垂直超限"
)
&&
vSet
.
contains
(
v
.
getOverrunLevel
())))
.
collect
(
Collectors
.
toList
());
}
return
records
;
}
...
...
jeecg-module-system/src/main/java/org/jeecg/modules/homePage/vo/DiseaseVO.java
View file @
27ead316
...
...
@@ -23,9 +23,9 @@ public class DiseaseVO {
private
String
overrunType
;
@ApiModelProperty
(
"超限等级"
)
private
String
overrunLevel
;
private
Integer
overrunLevel
;
@ApiModelProperty
(
"
长度
"
)
@ApiModelProperty
(
"
测点值
"
)
private
String
longitude
;
@ApiModelProperty
(
"峰值"
)
...
...
@@ -39,4 +39,7 @@ public class DiseaseVO {
@ApiModelProperty
(
"病害类型名称"
)
private
String
diseaseTypeName
;
@ApiModelProperty
(
"检查类型 检查数据类型 1-人工静态检查 2-轨检仪静态检查 3-轨检车检查 4-添乘仪检查"
)
private
Integer
ekType
;
}
jeecg-module-system/src/main/java/org/jeecg/modules/subwayNetwork/mapper/xml/SubwaySectionMapper.xml
View file @
27ead316
...
...
@@ -45,7 +45,8 @@
t.section_starting_mileage startMileage,
TRUNCATE((t.section_end_mileage + t.section_starting_mileage) / 2, 3) centerMileage,
t.section_end_mileage endMileage,
true isLeaf
true isLeaf,
0 isStation
FROM t_sn_subway_section t
LEFT JOIN t_sn_light_rail t2 ON t.light_rail_id = t2.id
LEFT JOIN t_sn_line_alias t3 ON t.line_alias_id = t3.id
...
...
jeecg-module-system/src/main/java/org/jeecg/modules/subwayNetwork/mapper/xml/TrainStationMapper.xml
View file @
27ead316
...
...
@@ -44,7 +44,8 @@
t1.starting_mileage startMileage,
t1.center_mileage centerMileage,
t1.end_mileage endMileage,
true isLeaf
true isLeaf,
1 isStation
FROM t_sn_train_station t1
LEFT JOIN t_sn_light_rail t3 on t1.light_rail_id = t3.id
LEFT JOIN t_sn_line_alias t4 ON t1.line_alias_id = t4.id
...
...
jeecg-module-system/src/main/java/org/jeecg/modules/subwayNetwork/vo/SectionStationNode.java
View file @
27ead316
...
...
@@ -41,6 +41,9 @@ public class SectionStationNode {
@ApiModelProperty
(
value
=
"是否是叶子节点"
)
private
Boolean
isLeaf
;
@ApiModelProperty
(
value
=
"是否车站 1-是 0-否"
)
private
Integer
isStation
=
0
;
@ApiModelProperty
(
value
=
"孩子节点"
)
private
List
<
SectionStationNode
>
children
;
...
...
jeecg-module-system/src/main/resources/application-dev.yml
View file @
27ead316
server
:
port
:
808
0
port
:
808
1
tomcat
:
max-swallow-size
:
-1
error
:
...
...
@@ -131,7 +131,7 @@ spring:
connectionProperties
:
druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
datasource
:
master
:
url
:
jdbc:mysql://47.94.207.62:3306/hz
somms
?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&zeroDateTimeBehavior=convertToNull
url
:
jdbc:mysql://47.94.207.62:3306/hz
gw_test
?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&zeroDateTimeBehavior=convertToNull
username
:
root
password
:
superAdmin&321
driver-class-name
:
com.mysql.jdbc.Driver
...
...
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