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
18b0e84c
Commit
18b0e84c
authored
Jan 05, 2024
by
hkl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:1.代码提交
parent
e3032981
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
488 additions
and
55 deletions
+488
-55
pom.xml
jeecg-module-system/pom.xml
+4
-4
AnalysisAlgorithm.java
...es/dynamicStaticAnalysis/algorithm/AnalysisAlgorithm.java
+474
-45
AnalysisAdditiveCheckUnitDeviceMap.java
...icAnalysis/entity/AnalysisAdditiveCheckUnitDeviceMap.java
+4
-0
application-dev.yml
jeecg-module-system/src/main/resources/application-dev.yml
+1
-1
application-test.yml
jeecg-module-system/src/main/resources/application-test.yml
+1
-1
logback-spring.xml
jeecg-module-system/src/main/resources/logback-spring.xml
+4
-4
No files found.
jeecg-module-system/pom.xml
View file @
18b0e84c
...
@@ -73,10 +73,6 @@
...
@@ -73,10 +73,6 @@
<properties>
<properties>
<package.environment>
hkl
</package.environment>
<package.environment>
hkl
</package.environment>
</properties>
</properties>
<!-- 是否默认 true表示默认-->
<activation>
<activeByDefault>
true
</activeByDefault>
</activation>
</profile>
</profile>
<!-- 测试环境 -->
<!-- 测试环境 -->
...
@@ -93,6 +89,10 @@
...
@@ -93,6 +89,10 @@
<properties>
<properties>
<package.environment>
pressure
</package.environment>
<package.environment>
pressure
</package.environment>
</properties>
</properties>
<!-- 是否默认 true表示默认-->
<activation>
<activeByDefault>
true
</activeByDefault>
</activation>
</profile>
</profile>
<!-- 生成环境环境-->
<!-- 生成环境环境-->
...
...
jeecg-module-system/src/main/java/org/jeecg/modules/dynamicStaticAnalysis/algorithm/AnalysisAlgorithm.java
View file @
18b0e84c
...
@@ -95,6 +95,9 @@ public class AnalysisAlgorithm {
...
@@ -95,6 +95,9 @@ public class AnalysisAlgorithm {
@Resource
@Resource
private
IAnalysisTqiReportCheckUnitDeviceMapService
analysisTqiReportCheckUnitDeviceMapService
;
private
IAnalysisTqiReportCheckUnitDeviceMapService
analysisTqiReportCheckUnitDeviceMapService
;
@Resource
private
IConfigTqiLimitService
configTqiLimitService
;
@Transactional
@Transactional
public
void
analysis
(
String
analysisBatchId
)
{
public
void
analysis
(
String
analysisBatchId
)
{
Map
<
String
,
Map
<
String
,
Object
>>
unitDeviceTable
=
new
LinkedHashMap
<>();
Map
<
String
,
Map
<
String
,
Object
>>
unitDeviceTable
=
new
LinkedHashMap
<>();
...
@@ -530,41 +533,46 @@ public class AnalysisAlgorithm {
...
@@ -530,41 +533,46 @@ public class AnalysisAlgorithm {
JSONArray
dispatchingList
=
JSONArray
.
parseArray
(
analysisBatch
.
getDispatching
());
JSONArray
dispatchingList
=
JSONArray
.
parseArray
(
analysisBatch
.
getDispatching
());
for
(
Object
obj
:
dispatchingList
)
{
for
(
Object
obj
:
dispatchingList
)
{
JSONObject
dispatching
=
(
JSONObject
)
obj
;
JSONObject
dispatching
=
(
JSONObject
)
obj
;
Integer
type
=
Convert
.
toInt
(
dispatching
.
get
(
"type"
));
if
(
type
!=
4
)
{
continue
;
}
String
reasonValue
=
String
.
valueOf
(
dispatching
.
get
(
"reasonValue"
));
String
reasonValue
=
String
.
valueOf
(
dispatching
.
get
(
"reasonValue"
));
String
reasonLabel
=
String
.
valueOf
(
dispatching
.
get
(
"reasonLabel"
));
String
reasonLabel
=
String
.
valueOf
(
dispatching
.
get
(
"reasonLabel"
));
if
(
"add_instrument_1"
.
equals
(
reasonValue
))
{
if
(
"add_instrument_1"
.
equals
(
reasonValue
))
{
reasonLabelAddInstrumentOver1
=
reasonLabel
;
Boolean
isWorkTemp
=
Boolean
.
valueOf
(
dispatching
.
get
(
"isWork"
).
toString
());
Boolean
isWorkTemp
=
Boolean
.
valueOf
(
dispatching
.
get
(
"isWork"
).
toString
());
if
(
isWorkTemp
)
{
if
(
isWorkTemp
)
{
isWorkAddInstrumentOver1
=
1
;
isWorkAddInstrumentOver1
=
1
;
reasonLabelAddInstrumentOver1
=
reasonLabel
;
}
else
{
}
else
{
isWorkAddInstrumentOver1
=
0
;
isWorkAddInstrumentOver1
=
0
;
}
}
}
}
if
(
"add_instrument_2"
.
equals
(
reasonValue
))
{
if
(
"add_instrument_2"
.
equals
(
reasonValue
))
{
reasonLabelAddInstrumentOver2
=
reasonLabel
;
Boolean
isWorkTemp
=
Boolean
.
valueOf
(
dispatching
.
get
(
"isWork"
).
toString
());
Boolean
isWorkTemp
=
Boolean
.
valueOf
(
dispatching
.
get
(
"isWork"
).
toString
());
if
(
isWorkTemp
)
{
if
(
isWorkTemp
)
{
isWorkAddInstrumentOver2
=
2
;
isWorkAddInstrumentOver2
=
1
;
reasonLabelAddInstrumentOver2
=
reasonLabel
;
}
else
{
}
else
{
isWorkAddInstrumentOver2
=
0
;
isWorkAddInstrumentOver2
=
0
;
}
}
}
}
if
(
"add_instrument_3"
.
equals
(
reasonValue
))
{
if
(
"add_instrument_3"
.
equals
(
reasonValue
))
{
reasonLabelAddInstrumentOver3
=
reasonLabel
;
Boolean
isWorkTemp
=
Boolean
.
valueOf
(
dispatching
.
get
(
"isWork"
).
toString
());
Boolean
isWorkTemp
=
Boolean
.
valueOf
(
dispatching
.
get
(
"isWork"
).
toString
());
if
(
isWorkTemp
)
{
if
(
isWorkTemp
)
{
isWorkAddInstrumentOver3
=
3
;
isWorkAddInstrumentOver3
=
1
;
reasonLabelAddInstrumentOver3
=
reasonLabel
;
}
else
{
}
else
{
isWorkAddInstrumentOver3
=
0
;
isWorkAddInstrumentOver3
=
0
;
}
}
}
}
if
(
"add_instrument_4"
.
equals
(
reasonValue
))
{
if
(
"add_instrument_4"
.
equals
(
reasonValue
))
{
reasonLabelAddInstrumentOver4
=
reasonLabel
;
Boolean
isWorkTemp
=
Boolean
.
valueOf
(
dispatching
.
get
(
"isWork"
).
toString
());
Boolean
isWorkTemp
=
Boolean
.
valueOf
(
dispatching
.
get
(
"isWork"
).
toString
());
if
(
isWorkTemp
)
{
if
(
isWorkTemp
)
{
isWorkAddInstrumentOver4
=
4
;
isWorkAddInstrumentOver4
=
1
;
reasonLabelAddInstrumentOver4
=
reasonLabel
;
}
else
{
}
else
{
isWorkAddInstrumentOver4
=
0
;
isWorkAddInstrumentOver4
=
0
;
}
}
...
@@ -659,7 +667,7 @@ public class AnalysisAlgorithm {
...
@@ -659,7 +667,7 @@ public class AnalysisAlgorithm {
zontalSpeedTransfinite
.
setEkType
(
4
);
zontalSpeedTransfinite
.
setEkType
(
4
);
zontalSpeedTransfinite
.
setEkItemId
(
additiveInfo
.
getId
());
zontalSpeedTransfinite
.
setEkItemId
(
additiveInfo
.
getId
());
zontalSpeedTransfinite
.
setMeasurePointValue
(
additiveInfo
.
getVerticalSpeed
().
toString
());
zontalSpeedTransfinite
.
setMeasurePointValue
(
additiveInfo
.
getVerticalSpeed
().
toString
());
zontalSpeedTransfinite
.
setDiseaseMileage
(
additiveInfo
.
getPointMileage
()
);
zontalSpeedTransfinite
.
setDiseaseMileage
(
pointMileage
);
addInstrumentTransfiniteList
.
add
(
zontalSpeedTransfinite
);
addInstrumentTransfiniteList
.
add
(
zontalSpeedTransfinite
);
}
}
...
@@ -688,7 +696,7 @@ public class AnalysisAlgorithm {
...
@@ -688,7 +696,7 @@ public class AnalysisAlgorithm {
verticalSpeedTransfinite
.
setEkType
(
4
);
verticalSpeedTransfinite
.
setEkType
(
4
);
verticalSpeedTransfinite
.
setEkItemId
(
additiveInfo
.
getId
());
verticalSpeedTransfinite
.
setEkItemId
(
additiveInfo
.
getId
());
verticalSpeedTransfinite
.
setMeasurePointValue
(
additiveInfo
.
getVerticalSpeed
().
toString
());
verticalSpeedTransfinite
.
setMeasurePointValue
(
additiveInfo
.
getVerticalSpeed
().
toString
());
verticalSpeedTransfinite
.
setDiseaseMileage
(
additiveInfo
.
getPointMileage
()
);
verticalSpeedTransfinite
.
setDiseaseMileage
(
pointMileage
);
addInstrumentTransfiniteList
.
add
(
verticalSpeedTransfinite
);
addInstrumentTransfiniteList
.
add
(
verticalSpeedTransfinite
);
}
}
...
@@ -811,6 +819,7 @@ public class AnalysisAlgorithm {
...
@@ -811,6 +819,7 @@ public class AnalysisAlgorithm {
additiveInfoUnitMap
.
setUnitStartMileage
(
Convert
.
toBigDecimal
(
unitDevice
.
get
(
"startMileage"
)));
additiveInfoUnitMap
.
setUnitStartMileage
(
Convert
.
toBigDecimal
(
unitDevice
.
get
(
"startMileage"
)));
additiveInfoUnitMap
.
setUnitCenterMileage
(
Convert
.
toBigDecimal
(
unitDevice
.
get
(
"centerMileage"
)));
additiveInfoUnitMap
.
setUnitCenterMileage
(
Convert
.
toBigDecimal
(
unitDevice
.
get
(
"centerMileage"
)));
additiveInfoUnitMap
.
setUnitEndMileage
(
Convert
.
toBigDecimal
(
unitDevice
.
get
(
"endMileage"
)));
additiveInfoUnitMap
.
setUnitEndMileage
(
Convert
.
toBigDecimal
(
unitDevice
.
get
(
"endMileage"
)));
additiveInfoUnitMap
.
setMovementAdditiveInfoId
(
additiveInfo
.
getId
());
additiveInfoUnitMap
.
setPointMileage
(
additiveInfo
.
getPointMileage
().
multiply
(
new
BigDecimal
(
"1000"
)));
additiveInfoUnitMap
.
setPointMileage
(
additiveInfo
.
getPointMileage
().
multiply
(
new
BigDecimal
(
"1000"
)));
additiveInfoUnitMap
.
setZontalSpeed
(
additiveInfo
.
getZontalSpeed
());
additiveInfoUnitMap
.
setZontalSpeed
(
additiveInfo
.
getZontalSpeed
());
additiveInfoUnitMap
.
setZontalSpeedLevel
(
additiveInfo
.
getZontalSpeedLevel
());
additiveInfoUnitMap
.
setZontalSpeedLevel
(
additiveInfo
.
getZontalSpeedLevel
());
...
@@ -854,7 +863,11 @@ public class AnalysisAlgorithm {
...
@@ -854,7 +863,11 @@ public class AnalysisAlgorithm {
// 1.6 获取轨检车TQI阀值
// 1.6 获取轨检车TQI阀值
// config
List
<
ConfigTqiLimit
>
configTqiLimits
=
configTqiLimitService
.
lambdaQuery
()
.
eq
(
ConfigTqiLimit:
:
getSpeedMax
,
analysisBatch
.
getSpeedMax
())
.
eq
(
ConfigTqiLimit:
:
getSpeedMin
,
analysisBatch
.
getSpeedMin
())
.
orderByAsc
(
ConfigTqiLimit:
:
getOverStandardType
)
.
list
();
// 2.根据分析批次的里程查询出映射单元
// 2.根据分析批次的里程查询出映射单元
...
@@ -1044,7 +1057,6 @@ public class AnalysisAlgorithm {
...
@@ -1044,7 +1057,6 @@ public class AnalysisAlgorithm {
for
(
MovementTqiReport
tqiReport
:
tqiReports
)
{
for
(
MovementTqiReport
tqiReport
:
tqiReports
)
{
// 如果命中处理测点映射关系
// 如果命中处理测点映射关系
if
(
tqiReport
.
getStartMileage
().
compareTo
(
centerMileage
)
<=
0
&&
tqiReport
.
getEndMileage
().
compareTo
(
centerMileage
)
>
0
)
{
if
(
tqiReport
.
getStartMileage
().
compareTo
(
centerMileage
)
<=
0
&&
tqiReport
.
getEndMileage
().
compareTo
(
centerMileage
)
>
0
)
{
MovementTqiReportUnitDeviceMap
movementTqiReportUnitDeviceMap
=
new
MovementTqiReportUnitDeviceMap
();
MovementTqiReportUnitDeviceMap
movementTqiReportUnitDeviceMap
=
new
MovementTqiReportUnitDeviceMap
();
movementTqiReportUnitDeviceMap
.
setId
(
UUIDGenerator
.
generate
());
movementTqiReportUnitDeviceMap
.
setId
(
UUIDGenerator
.
generate
());
movementTqiReportUnitDeviceMap
.
setCheckId
(
checkDataMap
.
getEkId
());
movementTqiReportUnitDeviceMap
.
setCheckId
(
checkDataMap
.
getEkId
());
...
@@ -1170,13 +1182,11 @@ public class AnalysisAlgorithm {
...
@@ -1170,13 +1182,11 @@ public class AnalysisAlgorithm {
scoreList
.
add
(
tqiScore
);
scoreList
.
add
(
tqiScore
);
// 判断tqi是否超限
// tqi 超限等级
// 超标≤10% | 15 ≤ TQI < 16.5(0 < V ≤ 80)
AnalysisBatchUnitDeviceTransfinite
tqiTransfinite
=
this
.
createRailVehicleCheckTqiTransfinite
(
dispatchingList
,
tqiReport
,
configTqiLimits
);
// if(tqiReport.getTqiComeUpon())
if
(
ObjectUtil
.
isNotEmpty
(
tqiTransfinite
))
{
// // 轨检车超限等级
railVehicleTransfiniteList
.
add
(
tqiTransfinite
);
// AnalysisBatchUnitDeviceTransfinite tqiTransfinite = this.createRailVehicleCheckTqiTransfinite(dispatchingList, tqiReport);
}
// railVehicleTransfiniteList.add(tqiTransfinite);
// System.out.printf(analysisBatch.getDispatching());
// 只映射一个tqi区间,映射到了就直接结束区间循环
// 只映射一个tqi区间,映射到了就直接结束区间循环
break
;
break
;
...
@@ -1206,7 +1216,74 @@ public class AnalysisAlgorithm {
...
@@ -1206,7 +1216,74 @@ public class AnalysisAlgorithm {
}
}
private
AnalysisTqiReportCheckUnitDeviceMap
tqiReportCheckUnitDeviceMapSave
(
AnalysisBatchCheckDataMap
checkDataMap
,
Map
<
String
,
Object
>
unitDevice
,
MovementTqiReport
tqiReport
)
{
private
AnalysisBatchUnitDeviceTransfinite
createRailVehicleCheckTqiTransfinite
(
JSONArray
dispatchingList
,
MovementTqiReport
tqiReport
,
List
<
ConfigTqiLimit
>
configTqiLimits
)
{
// 先判断是否超限
Integer
transfiniteGrade
=
null
;
ConfigTqiLimit
currentTqiLimit
=
null
;
for
(
ConfigTqiLimit
tqiLimit
:
configTqiLimits
)
{
// 1.获取tqi数值
BigDecimal
tqiComeUpon
=
Convert
.
toBigDecimal
(
tqiReport
.
getTqiComeUpon
());
if
(
tqiLimit
.
getTqiMin
().
compareTo
(
tqiComeUpon
)
<=
0
&&
tqiLimit
.
getTqiMax
().
compareTo
(
tqiComeUpon
)
>=
0
)
{
transfiniteGrade
=
tqiLimit
.
getOverStandardType
();
currentTqiLimit
=
tqiLimit
;
break
;
}
}
// 如果没有读取到相应得配置表示不
if
(
transfiniteGrade
==
null
)
{
return
null
;
}
int
isWork
=
1
;
String
reasonLabel
=
""
;
String
railVehicleTqiOverGrade
=
"rail_vehicle_tqi_"
+
transfiniteGrade
;
for
(
Object
obj
:
dispatchingList
)
{
JSONObject
dispatching
=
(
JSONObject
)
obj
;
Integer
type
=
Convert
.
toInt
(
dispatching
.
get
(
"type"
));
if
(
type
!=
3
)
{
continue
;
}
String
reasonValue
=
String
.
valueOf
(
dispatching
.
get
(
"reasonValue"
));
if
(
reasonValue
.
equals
(
railVehicleTqiOverGrade
))
{
Boolean
isWorkTemp
=
Boolean
.
valueOf
(
dispatching
.
get
(
"isWork"
).
toString
());
reasonLabel
=
dispatching
.
get
(
"reasonLabel"
).
toString
();
if
(
isWorkTemp
)
{
isWork
=
1
;
}
else
{
isWork
=
0
;
}
break
;
}
}
// 人工的病害里程:这个格子的(起点里程 + 终点里程)/2
BigDecimal
diseaseMileage
=
tqiReport
.
getStartMileage
().
add
(
tqiReport
.
getEndMileage
()).
divide
(
new
BigDecimal
(
"2"
),
3
,
BigDecimal
.
ROUND_HALF_UP
);
AnalysisBatchUnitDeviceTransfinite
transfinite
=
new
AnalysisBatchUnitDeviceTransfinite
();
transfinite
.
setId
(
UUIDGenerator
.
generate
());
transfinite
.
setTransfiniteGrade
(
transfiniteGrade
);
transfinite
.
setTransfiniteType
(
"Tqi超限"
);
String
allowValue
=
currentTqiLimit
.
getTqiMin
()
+
"< tqi <"
+
currentTqiLimit
.
getTqiMax
();
transfinite
.
setAllowValue
(
allowValue
);
transfinite
.
setEkId
(
tqiReport
.
getMovementMasterId
());
transfinite
.
setEkType
(
3
);
transfinite
.
setEkItemId
(
tqiReport
.
getId
());
transfinite
.
setMeasurePointValue
(
tqiReport
.
getTqiComeUpon
());
transfinite
.
setIsWork
(
isWork
);
transfinite
.
setDiseaseMileage
(
diseaseMileage
);
transfinite
.
setTransfiniteGradeName
(
reasonLabel
);
return
transfinite
;
}
private
AnalysisTqiReportCheckUnitDeviceMap
tqiReportCheckUnitDeviceMapSave
(
AnalysisBatchCheckDataMap
checkDataMap
,
Map
<
String
,
Object
>
unitDevice
,
MovementTqiReport
tqiReport
)
{
AnalysisTqiReportCheckUnitDeviceMap
record
=
new
AnalysisTqiReportCheckUnitDeviceMap
();
AnalysisTqiReportCheckUnitDeviceMap
record
=
new
AnalysisTqiReportCheckUnitDeviceMap
();
record
.
setId
(
UUIDGenerator
.
generate
());
record
.
setId
(
UUIDGenerator
.
generate
());
record
.
setCheckId
(
checkDataMap
.
getEkId
());
record
.
setCheckId
(
checkDataMap
.
getEkId
());
...
@@ -1237,7 +1314,9 @@ public class AnalysisAlgorithm {
...
@@ -1237,7 +1314,9 @@ public class AnalysisAlgorithm {
return
record
;
return
record
;
}
}
private
AnalysisOverReportCheckUnitDeviceMap
analysisOverReportCheckUnitDeviceMapSave
(
Map
<
String
,
Object
>
unitDevice
,
AnalysisBatchCheckDataMap
checkDataMap
,
MovementOverReport
movementOverReport
)
{
private
AnalysisOverReportCheckUnitDeviceMap
analysisOverReportCheckUnitDeviceMapSave
(
Map
<
String
,
Object
>
unitDevice
,
AnalysisBatchCheckDataMap
checkDataMap
,
MovementOverReport
movementOverReport
)
{
AnalysisOverReportCheckUnitDeviceMap
record
=
new
AnalysisOverReportCheckUnitDeviceMap
();
AnalysisOverReportCheckUnitDeviceMap
record
=
new
AnalysisOverReportCheckUnitDeviceMap
();
record
.
setId
(
UUIDGenerator
.
generate
());
record
.
setId
(
UUIDGenerator
.
generate
());
record
.
setUnitId
(
Convert
.
toStr
(
unitDevice
.
get
(
"id"
)));
record
.
setUnitId
(
Convert
.
toStr
(
unitDevice
.
get
(
"id"
)));
...
@@ -1295,7 +1374,9 @@ public class AnalysisAlgorithm {
...
@@ -1295,7 +1374,9 @@ public class AnalysisAlgorithm {
/**
/**
* 创建轨检车测点得分
* 创建轨检车测点得分
*/
*/
private
AnalysisBatchUnitDevicePointScore
createRailVehicleCheckTransfinitePointScore
(
AnalysisBatch
analysisBatch
,
List
<
MovementOverReport
>
currentUnitDeviceOverReportList
,
String
overrunType
,
BigDecimal
weightValue
)
{
private
AnalysisBatchUnitDevicePointScore
createRailVehicleCheckTransfinitePointScore
(
AnalysisBatch
analysisBatch
,
List
<
MovementOverReport
>
currentUnitDeviceOverReportList
,
String
overrunType
,
BigDecimal
weightValue
)
{
if
(
ObjectUtil
.
isEmpty
(
currentUnitDeviceOverReportList
))
{
if
(
ObjectUtil
.
isEmpty
(
currentUnitDeviceOverReportList
))
{
return
null
;
return
null
;
}
}
...
@@ -1360,15 +1441,19 @@ public class AnalysisAlgorithm {
...
@@ -1360,15 +1441,19 @@ public class AnalysisAlgorithm {
boolean
isDisplay
=
false
;
boolean
isDisplay
=
false
;
int
isWork
=
1
;
int
isWork
=
1
;
String
reasonLabel
=
null
;
String
reasonLabel
=
""
;
Integer
transfiniteGrade
=
Convert
.
toInt
(
movementOverReport
.
getOverrunLevel
());
Integer
transfiniteGrade
=
Convert
.
toInt
(
movementOverReport
.
getOverrunLevel
());
String
railVehicleOverGrade
=
"rail_vehicle_over_"
+
transfiniteGrade
;
String
railVehicleOverGrade
=
"rail_vehicle_over_"
+
transfiniteGrade
;
for
(
Object
obj
:
dispatchingList
)
{
for
(
Object
obj
:
dispatchingList
)
{
JSONObject
dispatching
=
(
JSONObject
)
obj
;
JSONObject
dispatching
=
(
JSONObject
)
obj
;
Integer
type
=
Convert
.
toInt
(
dispatching
.
get
(
"type"
));
if
(
type
!=
3
)
{
continue
;
}
String
reasonValue
=
String
.
valueOf
(
dispatching
.
get
(
"reasonValue"
));
String
reasonValue
=
String
.
valueOf
(
dispatching
.
get
(
"reasonValue"
));
if
(
reasonValue
.
equals
(
railVehicleOverGrade
))
{
if
(
reasonValue
.
equals
(
railVehicleOverGrade
))
{
Boolean
isWorkTemp
=
Boolean
.
valueOf
(
dispatching
.
get
(
"isWork"
).
toString
());
Boolean
isWorkTemp
=
Boolean
.
valueOf
(
dispatching
.
get
(
"isWork"
).
toString
());
reasonLabel
=
String
.
valueOf
(
dispatching
.
get
(
"reasonLabel"
)
);
reasonLabel
=
dispatching
.
get
(
"reasonLabel"
).
toString
(
);
if
(
isWorkTemp
)
{
if
(
isWorkTemp
)
{
isWork
=
1
;
isWork
=
1
;
}
else
{
}
else
{
...
@@ -1405,7 +1490,8 @@ public class AnalysisAlgorithm {
...
@@ -1405,7 +1490,8 @@ public class AnalysisAlgorithm {
/**
/**
* 轨检仪检查数据分析
* 轨检仪检查数据分析
*/
*/
private
void
railDeviceCheckDataAnalysis
(
AnalysisBatch
analysisBatch
,
AnalysisBatchCheckDataMap
checkDataMap
,
List
<
Map
<
String
,
Object
>>
unitDeviceList
)
{
private
void
railDeviceCheckDataAnalysis
(
AnalysisBatch
analysisBatch
,
AnalysisBatchCheckDataMap
checkDataMap
,
List
<
Map
<
String
,
Object
>>
unitDeviceList
)
{
List
<
MovementCheckDataUnitDeviceMap
>
movementCheckDataUnitDeviceMaps
=
new
ArrayList
<>();
List
<
MovementCheckDataUnitDeviceMap
>
movementCheckDataUnitDeviceMaps
=
new
ArrayList
<>();
...
@@ -1483,10 +1569,16 @@ public class AnalysisAlgorithm {
...
@@ -1483,10 +1569,16 @@ public class AnalysisAlgorithm {
railDeviceCheckDataUnitDeviceMapList
.
add
(
railDeviceCheckDataUnitDeviceMap
);
railDeviceCheckDataUnitDeviceMapList
.
add
(
railDeviceCheckDataUnitDeviceMap
);
AnalysisBatchUnitDeviceTransfinite
transfinite
=
this
.
railDeviceCheckTransfinite
(
analysisBatch
,
movementCourseInfo
);
// AnalysisBatchUnitDeviceTransfinite transfinite = this.railDeviceCheckTransfinite(analysisBatch, movementCourseInfo);
if
(
transfinite
!=
null
)
{
// if (transfinite != null) {
transfiniteList
.
add
(
transfinite
);
// transfiniteList.add(transfinite);
// }
List
<
AnalysisBatchUnitDeviceTransfinite
>
innerTransfiniteList
=
this
.
railDeviceCheckTransfiniteList
(
analysisBatch
,
movementCourseInfo
);
if
(
ObjectUtil
.
isNotEmpty
(
innerTransfiniteList
))
{
transfiniteList
.
addAll
(
innerTransfiniteList
);
}
}
}
}
// 计算得分
// 计算得分
...
@@ -1513,7 +1605,144 @@ public class AnalysisAlgorithm {
...
@@ -1513,7 +1605,144 @@ public class AnalysisAlgorithm {
// movementCheckDataUnitDeviceMapService.saveBatch(movementCheckDataUnitDeviceMaps);
// movementCheckDataUnitDeviceMapService.saveBatch(movementCheckDataUnitDeviceMaps);
}
}
private
AnalysisRailDeviceCheckDataUnitDeviceMap
railDeviceCheckDataUnitDeviceMapSave
(
RailInspectionEquipmentItemDetail
movementCourseInfo
,
Map
<
String
,
Object
>
unitDevice
,
RailInspectionEquipmentItem
checkItem
)
{
private
List
<
AnalysisBatchUnitDeviceTransfinite
>
railDeviceCheckTransfiniteList
(
AnalysisBatch
analysisBatch
,
RailInspectionEquipmentItemDetail
movementCourseInfo
)
{
// 超限配置
JSONObject
allowValue
=
JSONObject
.
parseObject
(
analysisBatch
.
getAllowValue
());
BigDecimal
bigTrackGauge
=
Convert
.
toBigDecimal
(
allowValue
.
get
(
"bigTrackGauge"
));
// 大轨距
BigDecimal
smallTrackGauge
=
Convert
.
toBigDecimal
(
allowValue
.
get
(
"smallTrackGauge"
));
// 小轨距
BigDecimal
allowLevel
=
Convert
.
toBigDecimal
(
allowValue
.
get
(
"level"
));
// 水平
BigDecimal
allowTriangularPit
=
Convert
.
toBigDecimal
(
allowValue
.
get
(
"triangularPit"
));
// 三角坑
// 是否派工配置
Integer
isWork
=
1
;
String
reasonLabel
=
"轨检仪检查数据-超限"
;
JSONArray
dispatchingList
=
JSONArray
.
parseArray
(
analysisBatch
.
getDispatching
());
for
(
Object
obj
:
dispatchingList
)
{
JSONObject
dispatching
=
(
JSONObject
)
obj
;
Integer
type
=
Convert
.
toInt
(
dispatching
.
get
(
"type"
));
if
(
type
!=
1
)
{
continue
;
}
String
reasonValue
=
String
.
valueOf
(
dispatching
.
get
(
"reasonValue"
));
if
(
"static_limit"
.
equals
(
reasonValue
))
{
Boolean
isWorkTemp
=
Boolean
.
valueOf
(
dispatching
.
get
(
"isWork"
).
toString
());
if
(
isWorkTemp
)
{
isWork
=
1
;
}
else
{
isWork
=
0
;
}
}
}
// 轨仪器的病害里程:这个格子的(起点里程 + 终点里程)/2
BigDecimal
diseaseMileage
=
movementCourseInfo
.
getCurrentStartMileage
().
add
(
movementCourseInfo
.
getCurrentEndEndMileage
()).
divide
(
new
BigDecimal
(
"2"
),
3
,
BigDecimal
.
ROUND_HALF_UP
);
String
allowValueSave
=
""
;
String
measurePointValue
=
""
;
String
transfiniteType
=
""
;
List
<
AnalysisBatchUnitDeviceTransfinite
>
transfiniteList
=
new
ArrayList
<>();
// 轨距
BigDecimal
trackGauge
=
Convert
.
toBigDecimal
(
movementCourseInfo
.
getTrackGauge
());
if
(
ObjectUtil
.
isNotEmpty
(
trackGauge
))
{
if
(
trackGauge
.
compareTo
(
bigTrackGauge
)
>
0
)
{
allowValueSave
=
bigTrackGauge
.
toString
();
measurePointValue
=
trackGauge
.
toString
();
transfiniteType
=
"大轨距"
;
AnalysisBatchUnitDeviceTransfinite
record
=
new
AnalysisBatchUnitDeviceTransfinite
();
record
.
setId
(
UUIDGenerator
.
generate
());
record
.
setTransfiniteGrade
(
1
);
record
.
setTransfiniteGradeName
(
reasonLabel
);
record
.
setTransfiniteType
(
transfiniteType
);
record
.
setAllowValue
(
allowValueSave
);
record
.
setEkId
(
movementCourseInfo
.
getRailInspectionEquipmentId
());
record
.
setEkType
(
2
);
record
.
setEkItemId
(
movementCourseInfo
.
getRailInspectionEquipmentItemId
());
record
.
setMeasurePointValue
(
measurePointValue
);
record
.
setIsWork
(
isWork
);
record
.
setDiseaseMileage
(
diseaseMileage
);
transfiniteList
.
add
(
record
);
}
else
if
(
trackGauge
.
compareTo
(
smallTrackGauge
)
<
0
)
{
allowValueSave
=
smallTrackGauge
.
toString
();
measurePointValue
=
trackGauge
.
toString
();
transfiniteType
=
"小轨距"
;
AnalysisBatchUnitDeviceTransfinite
record
=
new
AnalysisBatchUnitDeviceTransfinite
();
record
.
setId
(
UUIDGenerator
.
generate
());
record
.
setTransfiniteGrade
(
1
);
record
.
setTransfiniteGradeName
(
reasonLabel
);
record
.
setTransfiniteType
(
transfiniteType
);
record
.
setAllowValue
(
allowValueSave
);
record
.
setEkId
(
movementCourseInfo
.
getRailInspectionEquipmentId
());
record
.
setEkType
(
2
);
record
.
setEkItemId
(
movementCourseInfo
.
getRailInspectionEquipmentItemId
());
record
.
setMeasurePointValue
(
measurePointValue
);
record
.
setIsWork
(
isWork
);
record
.
setDiseaseMileage
(
diseaseMileage
);
transfiniteList
.
add
(
record
);
}
}
// 水平
BigDecimal
level
=
Convert
.
toBigDecimal
(
movementCourseInfo
.
getLevel
());
if
(
ObjectUtil
.
isNotEmpty
(
level
))
{
if
(
level
.
compareTo
(
allowLevel
)
>
0
)
{
allowValueSave
=
allowLevel
.
toString
();
measurePointValue
=
level
.
toString
();
transfiniteType
=
"水平"
;
AnalysisBatchUnitDeviceTransfinite
record
=
new
AnalysisBatchUnitDeviceTransfinite
();
record
.
setId
(
UUIDGenerator
.
generate
());
record
.
setTransfiniteGrade
(
1
);
record
.
setTransfiniteGradeName
(
reasonLabel
);
record
.
setTransfiniteType
(
transfiniteType
);
record
.
setAllowValue
(
allowValueSave
);
record
.
setEkId
(
movementCourseInfo
.
getRailInspectionEquipmentId
());
record
.
setEkType
(
2
);
record
.
setEkItemId
(
movementCourseInfo
.
getRailInspectionEquipmentItemId
());
record
.
setMeasurePointValue
(
measurePointValue
);
record
.
setIsWork
(
isWork
);
record
.
setDiseaseMileage
(
diseaseMileage
);
transfiniteList
.
add
(
record
);
}
}
//三角坑
BigDecimal
triangularPit
=
Convert
.
toBigDecimal
(
movementCourseInfo
.
getTriangularPit
());
if
(
ObjectUtil
.
isNotEmpty
(
triangularPit
))
{
if
(
triangularPit
.
compareTo
(
allowTriangularPit
)
>
0
)
{
allowValueSave
=
allowTriangularPit
.
toString
();
measurePointValue
=
triangularPit
.
toString
();
transfiniteType
=
"三角坑"
;
AnalysisBatchUnitDeviceTransfinite
record
=
new
AnalysisBatchUnitDeviceTransfinite
();
record
.
setId
(
UUIDGenerator
.
generate
());
record
.
setTransfiniteGrade
(
1
);
record
.
setTransfiniteGradeName
(
reasonLabel
);
record
.
setTransfiniteType
(
transfiniteType
);
record
.
setAllowValue
(
allowValueSave
);
record
.
setEkId
(
movementCourseInfo
.
getRailInspectionEquipmentId
());
record
.
setEkType
(
2
);
record
.
setEkItemId
(
movementCourseInfo
.
getRailInspectionEquipmentItemId
());
record
.
setMeasurePointValue
(
measurePointValue
);
record
.
setIsWork
(
isWork
);
record
.
setDiseaseMileage
(
diseaseMileage
);
transfiniteList
.
add
(
record
);
}
}
return
transfiniteList
;
}
private
AnalysisRailDeviceCheckDataUnitDeviceMap
railDeviceCheckDataUnitDeviceMapSave
(
RailInspectionEquipmentItemDetail
movementCourseInfo
,
Map
<
String
,
Object
>
unitDevice
,
RailInspectionEquipmentItem
checkItem
)
{
AnalysisRailDeviceCheckDataUnitDeviceMap
record
=
new
AnalysisRailDeviceCheckDataUnitDeviceMap
();
AnalysisRailDeviceCheckDataUnitDeviceMap
record
=
new
AnalysisRailDeviceCheckDataUnitDeviceMap
();
record
.
setId
(
UUIDGenerator
.
generate
());
record
.
setId
(
UUIDGenerator
.
generate
());
record
.
setUnitId
(
Convert
.
toStr
(
unitDevice
.
get
(
"id"
)));
record
.
setUnitId
(
Convert
.
toStr
(
unitDevice
.
get
(
"id"
)));
...
@@ -1543,7 +1772,8 @@ public class AnalysisAlgorithm {
...
@@ -1543,7 +1772,8 @@ public class AnalysisAlgorithm {
/**
/**
* 轨检仪检查数据分数
* 轨检仪检查数据分数
*/
*/
private
void
railDeviceCheckScore
(
AnalysisBatch
analysisBatch
,
List
<
RailInspectionEquipmentItemDetail
>
railDeviceCheckList
,
Map
<
String
,
Object
>
unitDevice
)
{
private
void
railDeviceCheckScore
(
AnalysisBatch
analysisBatch
,
List
<
RailInspectionEquipmentItemDetail
>
railDeviceCheckList
,
Map
<
String
,
Object
>
unitDevice
)
{
Integer
analysisType
=
analysisBatch
.
getAnalysisType
();
Integer
analysisType
=
analysisBatch
.
getAnalysisType
();
BigDecimal
finalTrackGauge
=
null
;
BigDecimal
finalTrackGauge
=
null
;
...
@@ -1736,24 +1966,26 @@ public class AnalysisAlgorithm {
...
@@ -1736,24 +1966,26 @@ public class AnalysisAlgorithm {
/**
/**
* 轨检仪检查数据超限
* 轨检仪检查数据超限
*/
*/
private
AnalysisBatchUnitDeviceTransfinite
railDeviceCheckTransfinite
(
AnalysisBatch
analysisBatch
,
RailInspectionEquipmentItemDetail
movementCourseInfo
)
{
private
AnalysisBatchUnitDeviceTransfinite
railDeviceCheckTransfinite
(
AnalysisBatch
analysisBatch
,
RailInspectionEquipmentItemDetail
movementCourseInfo
)
{
// 超限配置
// 超限配置
JSONObject
allowValue
=
JSONObject
.
parseObject
(
analysisBatch
.
getAllowValue
());
JSONObject
allowValue
=
JSONObject
.
parseObject
(
analysisBatch
.
getAllowValue
());
Integer
bigTrackGauge
=
Convert
.
toInt
(
allowValue
.
get
(
"bigTrackGauge"
));
// 大轨距
Integer
bigTrackGauge
=
Convert
.
toInt
(
allowValue
.
get
(
"bigTrackGauge"
));
// 大轨距
Integer
smallTrackGauge
=
Convert
.
toInt
(
allowValue
.
get
(
"smallTrackGauge"
));
// 小轨距
Integer
smallTrackGauge
=
Convert
.
toInt
(
allowValue
.
get
(
"smallTrackGauge"
));
// 小轨距
Integer
allowLevel
=
Convert
.
toInt
(
allowValue
.
get
(
"level"
));
// 水平
Integer
allowLevel
=
Convert
.
toInt
(
allowValue
.
get
(
"level"
));
// 水平
Integer
allowTriangularPit
=
Convert
.
toInt
(
allowValue
.
get
(
"triangularPit"
));
// 三角坑
Integer
allowTriangularPit
=
Convert
.
toInt
(
allowValue
.
get
(
"triangularPit"
));
// 三角坑
Integer
allowHeight
=
Convert
.
toInt
(
allowValue
.
get
(
"height"
));
// 高低
Integer
allowDirection
=
Convert
.
toInt
(
allowValue
.
get
(
"direction"
));
// 轨向
// 是否派工配置
// 是否派工配置
Integer
isWork
=
1
;
Integer
isWork
=
1
;
String
reasonLabel
=
""
;
String
reasonLabel
=
"
轨检仪检查数据-超限
"
;
JSONArray
dispatchingList
=
JSONArray
.
parseArray
(
analysisBatch
.
getDispatching
());
JSONArray
dispatchingList
=
JSONArray
.
parseArray
(
analysisBatch
.
getDispatching
());
for
(
Object
obj
:
dispatchingList
)
{
for
(
Object
obj
:
dispatchingList
)
{
JSONObject
dispatching
=
(
JSONObject
)
obj
;
JSONObject
dispatching
=
(
JSONObject
)
obj
;
Integer
type
=
Convert
.
toInt
(
dispatching
.
get
(
"type"
));
if
(
type
!=
1
)
{
continue
;
}
String
reasonValue
=
String
.
valueOf
(
dispatching
.
get
(
"reasonValue"
));
String
reasonValue
=
String
.
valueOf
(
dispatching
.
get
(
"reasonValue"
));
reasonLabel
=
String
.
valueOf
(
dispatching
.
get
(
"reasonLabel"
));
if
(
"static_limit"
.
equals
(
reasonValue
))
{
if
(
"static_limit"
.
equals
(
reasonValue
))
{
Boolean
isWorkTemp
=
Boolean
.
valueOf
(
dispatching
.
get
(
"isWork"
).
toString
());
Boolean
isWorkTemp
=
Boolean
.
valueOf
(
dispatching
.
get
(
"isWork"
).
toString
());
if
(
isWorkTemp
)
{
if
(
isWorkTemp
)
{
...
@@ -1837,7 +2069,8 @@ public class AnalysisAlgorithm {
...
@@ -1837,7 +2069,8 @@ public class AnalysisAlgorithm {
/**
/**
* 轨检仪检查
* 轨检仪检查
*/
*/
private
MovementCheckDataUnitDeviceMap
railDeviceCheckDeviceMapSave
(
RailInspectionEquipmentItemDetail
movementCourseInfo
,
Map
<
String
,
Object
>
unitDevice
,
RailInspectionEquipmentItem
checkItem
)
{
private
MovementCheckDataUnitDeviceMap
railDeviceCheckDeviceMapSave
(
RailInspectionEquipmentItemDetail
movementCourseInfo
,
Map
<
String
,
Object
>
unitDevice
,
RailInspectionEquipmentItem
checkItem
)
{
MovementCheckDataUnitDeviceMap
movementCheckDataUnitDeviceMap
=
new
MovementCheckDataUnitDeviceMap
();
MovementCheckDataUnitDeviceMap
movementCheckDataUnitDeviceMap
=
new
MovementCheckDataUnitDeviceMap
();
movementCheckDataUnitDeviceMap
.
setId
(
UUIDGenerator
.
generate
());
movementCheckDataUnitDeviceMap
.
setId
(
UUIDGenerator
.
generate
());
movementCheckDataUnitDeviceMap
.
setCheckType
(
2
);
// 2-轨检仪静态检查
movementCheckDataUnitDeviceMap
.
setCheckType
(
2
);
// 2-轨检仪静态检查
...
@@ -1867,8 +2100,9 @@ public class AnalysisAlgorithm {
...
@@ -1867,8 +2100,9 @@ public class AnalysisAlgorithm {
/**
/**
* 人工检查数据分析
* 人工检查数据分析
*/
*/
public
void
labourCheckDataAnalysis
(
AnalysisBatch
analysisBatch
,
AnalysisBatchCheckDataMap
checkDataMap
,
List
<
Map
<
String
,
Object
>>
unitDeviceList
)
{
public
void
labourCheckDataAnalysis
(
AnalysisBatch
analysisBatch
,
AnalysisBatchCheckDataMap
List
<
MovementCheckDataUnitDeviceMap
>
movementCheckDataUnitDeviceMaps
=
new
ArrayList
<>();
checkDataMap
,
List
<
Map
<
String
,
Object
>>
unitDeviceList
)
{
// List<MovementCheckDataUnitDeviceMap> movementCheckDataUnitDeviceMaps = new ArrayList<>();
// 1 获取人工检查数据
// 1 获取人工检查数据
List
<
MovementCourse
>
checkItemList
=
movementCourseService
.
lambdaQuery
().
eq
(
MovementCourse:
:
getMovementMasterId
,
checkDataMap
.
getEkId
()).
list
();
List
<
MovementCourse
>
checkItemList
=
movementCourseService
.
lambdaQuery
().
eq
(
MovementCourse:
:
getMovementMasterId
,
checkDataMap
.
getEkId
()).
list
();
List
<
MovementCourseInfo
>
checkItemItemDetailList
=
movementCourseInfoService
.
lambdaQuery
().
eq
(
MovementCourseInfo:
:
getMovementMasterId
,
checkDataMap
.
getEkId
()).
list
();
List
<
MovementCourseInfo
>
checkItemItemDetailList
=
movementCourseInfoService
.
lambdaQuery
().
eq
(
MovementCourseInfo:
:
getMovementMasterId
,
checkDataMap
.
getEkId
()).
list
();
...
@@ -1923,10 +2157,15 @@ public class AnalysisAlgorithm {
...
@@ -1923,10 +2157,15 @@ public class AnalysisAlgorithm {
// 计算超限:如果为null则计算,否则和单元绑定
// 计算超限:如果为null则计算,否则和单元绑定
AnalysisBatchUnitDeviceTransfinite
transfinite
=
this
.
labourCheckTransfinite
(
analysisBatch
,
movementCourseInfo
);
// AnalysisBatchUnitDeviceTransfinite transfinite = this.labourCheckTransfinite(analysisBatch, movementCourseInfo);
// 如果超限不为空则添加进去
// // 如果超限不为空则添加进去
if
(
null
!=
transfinite
)
{
// if (null != transfinite) {
transfiniteList
.
add
(
transfinite
);
// transfiniteList.add(transfinite);
// }
List
<
AnalysisBatchUnitDeviceTransfinite
>
innerTransfiniteList
=
this
.
labourCheckTransfiniteList
(
analysisBatch
,
movementCourseInfo
);
if
(
ObjectUtil
.
isNotEmpty
(
innerTransfiniteList
))
{
transfiniteList
.
addAll
(
innerTransfiniteList
);
}
}
}
}
// 计算得分
// 计算得分
...
@@ -1953,7 +2192,193 @@ public class AnalysisAlgorithm {
...
@@ -1953,7 +2192,193 @@ public class AnalysisAlgorithm {
// }
// }
}
}
private
AnalysisLabourCheckDataUnitDeviceMap
labourCheckDataUnitDeviceMapSave
(
MovementCourseInfo
movementCourseInfo
,
Map
<
String
,
Object
>
unitDevice
,
MovementCourse
checkItem
)
{
private
List
<
AnalysisBatchUnitDeviceTransfinite
>
labourCheckTransfiniteList
(
AnalysisBatch
analysisBatch
,
MovementCourseInfo
movementCourseInfo
)
{
// 超限配置
JSONObject
allowValue
=
JSONObject
.
parseObject
(
analysisBatch
.
getAllowValue
());
BigDecimal
bigTrackGauge
=
Convert
.
toBigDecimal
(
allowValue
.
get
(
"bigTrackGauge"
));
// 大轨距
BigDecimal
smallTrackGauge
=
Convert
.
toBigDecimal
(
allowValue
.
get
(
"smallTrackGauge"
));
// 小轨距
BigDecimal
allowLevel
=
Convert
.
toBigDecimal
(
allowValue
.
get
(
"level"
));
// 水平
BigDecimal
allowTriangularPit
=
Convert
.
toBigDecimal
(
allowValue
.
get
(
"triangularPit"
));
// 三角坑
BigDecimal
allowHeight
=
Convert
.
toBigDecimal
(
allowValue
.
get
(
"height"
));
// 高低
BigDecimal
allowDirection
=
Convert
.
toBigDecimal
(
allowValue
.
get
(
"direction"
));
// 轨向
// 是否派工配置
Integer
isWork
=
1
;
String
reasonLabel
=
"人工检查数据超限-超限"
;
JSONArray
dispatchingList
=
JSONArray
.
parseArray
(
analysisBatch
.
getDispatching
());
for
(
Object
obj
:
dispatchingList
)
{
JSONObject
dispatching
=
(
JSONObject
)
obj
;
Integer
type
=
Convert
.
toInt
(
dispatching
.
get
(
"type"
));
if
(
type
!=
1
)
{
continue
;
}
String
reasonValue
=
String
.
valueOf
(
dispatching
.
get
(
"reasonValue"
));
if
(
"static_limit"
.
equals
(
reasonValue
))
{
Boolean
isWorkTemp
=
Boolean
.
valueOf
(
dispatching
.
get
(
"isWork"
).
toString
());
if
(
isWorkTemp
)
{
isWork
=
1
;
}
else
{
isWork
=
0
;
}
break
;
}
}
// 人工的病害里程:这个格子的(起点里程 + 终点里程)/2
BigDecimal
diseaseMileage
=
movementCourseInfo
.
getCurrentStartMileage
().
add
(
movementCourseInfo
.
getCurrentEndEndMileage
()).
divide
(
new
BigDecimal
(
"2"
),
3
,
BigDecimal
.
ROUND_HALF_UP
);
List
<
AnalysisBatchUnitDeviceTransfinite
>
transfiniteList
=
new
ArrayList
<>();
String
allowValueSave
=
""
;
String
measurePointValue
=
""
;
String
transfiniteType
=
""
;
// 轨距
BigDecimal
trackGauge
=
Convert
.
toBigDecimal
(
movementCourseInfo
.
getTrackGauge
());
if
(
ObjectUtil
.
isNotEmpty
(
trackGauge
))
{
if
(
trackGauge
.
compareTo
(
bigTrackGauge
)
>
0
)
{
allowValueSave
=
bigTrackGauge
.
toString
();
measurePointValue
=
trackGauge
.
toString
();
transfiniteType
=
"大轨距"
;
AnalysisBatchUnitDeviceTransfinite
record
=
new
AnalysisBatchUnitDeviceTransfinite
();
record
.
setId
(
UUIDGenerator
.
generate
());
record
.
setTransfiniteGrade
(
1
);
record
.
setTransfiniteGradeName
(
reasonLabel
);
record
.
setTransfiniteType
(
transfiniteType
);
record
.
setAllowValue
(
allowValueSave
);
record
.
setEkId
(
movementCourseInfo
.
getMovementMasterId
());
record
.
setEkType
(
1
);
record
.
setEkItemId
(
movementCourseInfo
.
getMovementCourseId
());
record
.
setMeasurePointValue
(
measurePointValue
);
record
.
setIsWork
(
isWork
);
record
.
setDiseaseMileage
(
diseaseMileage
);
transfiniteList
.
add
(
record
);
}
else
if
(
trackGauge
.
compareTo
(
smallTrackGauge
)
<
0
)
{
allowValueSave
=
smallTrackGauge
.
toString
();
measurePointValue
=
trackGauge
.
toString
();
transfiniteType
=
"小轨距"
;
AnalysisBatchUnitDeviceTransfinite
record
=
new
AnalysisBatchUnitDeviceTransfinite
();
record
.
setId
(
UUIDGenerator
.
generate
());
record
.
setTransfiniteGrade
(
1
);
record
.
setTransfiniteGradeName
(
reasonLabel
);
record
.
setTransfiniteType
(
transfiniteType
);
record
.
setAllowValue
(
allowValueSave
);
record
.
setEkId
(
movementCourseInfo
.
getMovementMasterId
());
record
.
setEkType
(
1
);
record
.
setEkItemId
(
movementCourseInfo
.
getMovementCourseId
());
record
.
setMeasurePointValue
(
measurePointValue
);
record
.
setIsWork
(
isWork
);
record
.
setDiseaseMileage
(
diseaseMileage
);
transfiniteList
.
add
(
record
);
}
}
// 水平
BigDecimal
level
=
Convert
.
toBigDecimal
(
movementCourseInfo
.
getLevel
());
if
(
ObjectUtil
.
isNotEmpty
(
level
))
{
if
(
level
.
compareTo
(
allowLevel
)
>
0
)
{
allowValueSave
=
allowLevel
.
toString
();
measurePointValue
=
level
.
toString
();
transfiniteType
=
"水平"
;
AnalysisBatchUnitDeviceTransfinite
record
=
new
AnalysisBatchUnitDeviceTransfinite
();
record
.
setId
(
UUIDGenerator
.
generate
());
record
.
setTransfiniteGrade
(
1
);
record
.
setTransfiniteGradeName
(
reasonLabel
);
record
.
setTransfiniteType
(
transfiniteType
);
record
.
setAllowValue
(
allowValueSave
);
record
.
setEkId
(
movementCourseInfo
.
getMovementMasterId
());
record
.
setEkType
(
1
);
record
.
setEkItemId
(
movementCourseInfo
.
getMovementCourseId
());
record
.
setMeasurePointValue
(
measurePointValue
);
record
.
setIsWork
(
isWork
);
record
.
setDiseaseMileage
(
diseaseMileage
);
transfiniteList
.
add
(
record
);
}
}
//三角坑
BigDecimal
triangularPit
=
Convert
.
toBigDecimal
(
movementCourseInfo
.
getTriangularPit
());
if
(
ObjectUtil
.
isNotEmpty
(
triangularPit
))
{
if
(
triangularPit
.
compareTo
(
allowTriangularPit
)
>
0
)
{
allowValueSave
=
allowTriangularPit
.
toString
();
measurePointValue
=
triangularPit
.
toString
();
transfiniteType
=
"三角坑"
;
AnalysisBatchUnitDeviceTransfinite
record
=
new
AnalysisBatchUnitDeviceTransfinite
();
record
.
setId
(
UUIDGenerator
.
generate
());
record
.
setTransfiniteGrade
(
1
);
record
.
setTransfiniteGradeName
(
reasonLabel
);
record
.
setTransfiniteType
(
transfiniteType
);
record
.
setAllowValue
(
allowValueSave
);
record
.
setEkId
(
movementCourseInfo
.
getMovementMasterId
());
record
.
setEkType
(
1
);
record
.
setEkItemId
(
movementCourseInfo
.
getMovementCourseId
());
record
.
setMeasurePointValue
(
measurePointValue
);
record
.
setIsWork
(
isWork
);
record
.
setDiseaseMileage
(
diseaseMileage
);
transfiniteList
.
add
(
record
);
}
}
// 高低
BigDecimal
height
=
Convert
.
toBigDecimal
(
movementCourseInfo
.
getHeight
());
if
(
ObjectUtil
.
isNotEmpty
(
height
))
{
if
(
height
.
compareTo
(
allowHeight
)
>
0
)
{
allowValueSave
=
allowHeight
.
toString
();
measurePointValue
=
height
.
toString
();
transfiniteType
=
"高低"
;
AnalysisBatchUnitDeviceTransfinite
record
=
new
AnalysisBatchUnitDeviceTransfinite
();
record
.
setId
(
UUIDGenerator
.
generate
());
record
.
setTransfiniteGrade
(
1
);
record
.
setTransfiniteGradeName
(
reasonLabel
);
record
.
setTransfiniteType
(
transfiniteType
);
record
.
setAllowValue
(
allowValueSave
);
record
.
setEkId
(
movementCourseInfo
.
getMovementMasterId
());
record
.
setEkType
(
1
);
record
.
setEkItemId
(
movementCourseInfo
.
getMovementCourseId
());
record
.
setMeasurePointValue
(
measurePointValue
);
record
.
setIsWork
(
isWork
);
record
.
setDiseaseMileage
(
diseaseMileage
);
transfiniteList
.
add
(
record
);
}
}
// 轨向
BigDecimal
direction
=
Convert
.
toBigDecimal
(
movementCourseInfo
.
getDirection
());
if
(
ObjectUtil
.
isNotEmpty
(
direction
))
{
if
(
direction
.
compareTo
(
allowDirection
)
>
0
)
{
allowValueSave
=
allowDirection
.
toString
();
measurePointValue
=
direction
.
toString
();
transfiniteType
=
"轨向"
;
AnalysisBatchUnitDeviceTransfinite
record
=
new
AnalysisBatchUnitDeviceTransfinite
();
record
.
setId
(
UUIDGenerator
.
generate
());
record
.
setTransfiniteGrade
(
1
);
record
.
setTransfiniteGradeName
(
reasonLabel
);
record
.
setTransfiniteType
(
transfiniteType
);
record
.
setAllowValue
(
allowValueSave
);
record
.
setEkId
(
movementCourseInfo
.
getMovementMasterId
());
record
.
setEkType
(
1
);
record
.
setEkItemId
(
movementCourseInfo
.
getMovementCourseId
());
record
.
setMeasurePointValue
(
measurePointValue
);
record
.
setIsWork
(
isWork
);
record
.
setDiseaseMileage
(
diseaseMileage
);
transfiniteList
.
add
(
record
);
}
}
return
transfiniteList
;
}
private
AnalysisLabourCheckDataUnitDeviceMap
labourCheckDataUnitDeviceMapSave
(
MovementCourseInfo
movementCourseInfo
,
Map
<
String
,
Object
>
unitDevice
,
MovementCourse
checkItem
)
{
AnalysisLabourCheckDataUnitDeviceMap
record
=
new
AnalysisLabourCheckDataUnitDeviceMap
();
AnalysisLabourCheckDataUnitDeviceMap
record
=
new
AnalysisLabourCheckDataUnitDeviceMap
();
record
.
setId
(
UUIDGenerator
.
generate
());
record
.
setId
(
UUIDGenerator
.
generate
());
record
.
setUnitId
(
Convert
.
toStr
(
unitDevice
.
get
(
"id"
)));
record
.
setUnitId
(
Convert
.
toStr
(
unitDevice
.
get
(
"id"
)));
...
@@ -1987,7 +2412,8 @@ public class AnalysisAlgorithm {
...
@@ -1987,7 +2412,8 @@ public class AnalysisAlgorithm {
/**
/**
* 人工分数
* 人工分数
*/
*/
private
void
labourCheckScore
(
AnalysisBatch
analysisBatch
,
List
<
MovementCourseInfo
>
labourCheckList
,
Map
<
String
,
Object
>
unitDevice
)
{
private
void
labourCheckScore
(
AnalysisBatch
analysisBatch
,
List
<
MovementCourseInfo
>
labourCheckList
,
Map
<
String
,
Object
>
unitDevice
)
{
Integer
analysisType
=
analysisBatch
.
getAnalysisType
();
Integer
analysisType
=
analysisBatch
.
getAnalysisType
();
BigDecimal
finalTrackGauge
=
null
;
BigDecimal
finalTrackGauge
=
null
;
...
@@ -2301,12 +2727,15 @@ public class AnalysisAlgorithm {
...
@@ -2301,12 +2727,15 @@ public class AnalysisAlgorithm {
// 是否派工配置
// 是否派工配置
Integer
isWork
=
1
;
Integer
isWork
=
1
;
String
reasonLabel
=
""
;
String
reasonLabel
=
"
人工检查数据超限-超限
"
;
JSONArray
dispatchingList
=
JSONArray
.
parseArray
(
analysisBatch
.
getDispatching
());
JSONArray
dispatchingList
=
JSONArray
.
parseArray
(
analysisBatch
.
getDispatching
());
for
(
Object
obj
:
dispatchingList
)
{
for
(
Object
obj
:
dispatchingList
)
{
JSONObject
dispatching
=
(
JSONObject
)
obj
;
JSONObject
dispatching
=
(
JSONObject
)
obj
;
Integer
type
=
Convert
.
toInt
(
dispatching
.
get
(
"type"
));
if
(
type
!=
1
)
{
continue
;
}
String
reasonValue
=
String
.
valueOf
(
dispatching
.
get
(
"reasonValue"
));
String
reasonValue
=
String
.
valueOf
(
dispatching
.
get
(
"reasonValue"
));
reasonLabel
=
String
.
valueOf
(
dispatching
.
get
(
"reasonLabel"
));
if
(
"static_limit"
.
equals
(
reasonValue
))
{
if
(
"static_limit"
.
equals
(
reasonValue
))
{
Boolean
isWorkTemp
=
Boolean
.
valueOf
(
dispatching
.
get
(
"isWork"
).
toString
());
Boolean
isWorkTemp
=
Boolean
.
valueOf
(
dispatching
.
get
(
"isWork"
).
toString
());
if
(
isWorkTemp
)
{
if
(
isWorkTemp
)
{
...
...
jeecg-module-system/src/main/java/org/jeecg/modules/dynamicStaticAnalysis/entity/AnalysisAdditiveCheckUnitDeviceMap.java
View file @
18b0e84c
...
@@ -63,6 +63,10 @@ public class AnalysisAdditiveCheckUnitDeviceMap implements Serializable {
...
@@ -63,6 +63,10 @@ public class AnalysisAdditiveCheckUnitDeviceMap implements Serializable {
@TableField
(
"movement_master_id"
)
@TableField
(
"movement_master_id"
)
private
String
movementMasterId
;
private
String
movementMasterId
;
@ApiModelProperty
(
"动静态几何尺寸数据主表主键-》外键"
)
@TableField
(
"movement_additive_info_id"
)
private
String
movementAdditiveInfoId
;
@ApiModelProperty
(
"设备单元id"
)
@ApiModelProperty
(
"设备单元id"
)
@TableField
(
"unit_id"
)
@TableField
(
"unit_id"
)
private
String
unitId
;
private
String
unitId
;
...
...
jeecg-module-system/src/main/resources/application-dev.yml
View file @
18b0e84c
...
@@ -131,7 +131,7 @@ spring:
...
@@ -131,7 +131,7 @@ spring:
connectionProperties
:
druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
connectionProperties
:
druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
datasource
:
datasource
:
master
:
master
:
url
:
jdbc:mysql://47.94.207.62:3306/hz
gw3
?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&zeroDateTimeBehavior=convertToNull
url
:
jdbc:mysql://47.94.207.62:3306/hz
somms
?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&zeroDateTimeBehavior=convertToNull
username
:
root
username
:
root
password
:
superAdmin&321
password
:
superAdmin&321
driver-class-name
:
com.mysql.jdbc.Driver
driver-class-name
:
com.mysql.jdbc.Driver
...
...
jeecg-module-system/src/main/resources/application-test.yml
View file @
18b0e84c
...
@@ -307,4 +307,4 @@ third-app:
...
@@ -307,4 +307,4 @@ third-app:
client-id
:
??
client-id
:
??
# appSecret
# appSecret
client-secret
:
??
client-secret
:
??
agent-id
:
??
agent-id
:
??
\ No newline at end of file
jeecg-module-system/src/main/resources/logback-spring.xml
View file @
18b0e84c
...
@@ -69,9 +69,9 @@
...
@@ -69,9 +69,9 @@
<!-- 日志输出级别 -->
<!-- 日志输出级别 -->
<root
level=
"INFO"
>
<root
level=
"INFO"
>
<appender-ref
ref=
"STDOUT"
/>
<appender-ref
ref=
"STDOUT"
/>
<!-- <appender-ref ref="FILE" />--
>
<appender-ref
ref=
"FILE"
/
>
<!-- <appender-ref ref="HTML" />--
>
<appender-ref
ref=
"HTML"
/
>
<!-- <appender-ref ref="FILE_HTML" />--
>
<appender-ref
ref=
"FILE_HTML"
/
>
</root>
</root>
</configuration>
</configuration>
\ 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