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
69c00675
Commit
69c00675
authored
Jul 31, 2023
by
hkl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:1.动静态分析代码核心业务代码提交
parent
4c6e0b11
Changes
15
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
260 additions
and
50 deletions
+260
-50
InitData.java
...-system/src/main/java/org/jeecg/config/init/InitData.java
+8
-1
SystemInitRunner.java
...src/main/java/org/jeecg/config/init/SystemInitRunner.java
+1
-1
RailManagementMapper.java
...eecg/modules/deviceAsset/mapper/RailManagementMapper.java
+1
-1
RailManagementMapper.xml
...g/modules/deviceAsset/mapper/xml/RailManagementMapper.xml
+23
-13
IRailManagementService.java
...g/modules/deviceAsset/service/IRailManagementService.java
+1
-1
RailManagementServiceImpl.java
...s/deviceAsset/service/impl/RailManagementServiceImpl.java
+3
-6
AnalysisAlgorithm.java
...es/dynamicStaticAnalysis/algorithm/AnalysisAlgorithm.java
+114
-0
Buffer.java
...jeecg/modules/dynamicStaticAnalysis/algorithm/Buffer.java
+5
-1
MultiProducer.java
...odules/dynamicStaticAnalysis/algorithm/MultiProducer.java
+2
-2
SingleConsumer.java
...dules/dynamicStaticAnalysis/algorithm/SingleConsumer.java
+9
-1
AnalysisBatch.java
...g/modules/dynamicStaticAnalysis/entity/AnalysisBatch.java
+6
-6
AnalysisAlgorithmMapper.java
...dynamicStaticAnalysis/mapper/AnalysisAlgorithmMapper.java
+23
-0
AnalysisAlgorithmMapper.xml
...amicStaticAnalysis/mapper/xml/AnalysisAlgorithmMapper.xml
+57
-0
AnalysisBatchServiceImpl.java
...StaticAnalysis/service/impl/AnalysisBatchServiceImpl.java
+7
-0
UnitCodeUtil.java
...m/src/main/java/org/jeecg/modules/utils/UnitCodeUtil.java
+0
-17
No files found.
jeecg-module-system/src/main/java/org/jeecg/config/init/InitData.java
View file @
69c00675
...
...
@@ -4,7 +4,8 @@ import org.jeecg.modules.deviceAsset.service.ICurveManagementService;
import
org.jeecg.modules.deviceAsset.service.IRailManagementService
;
import
org.jeecg.modules.deviceAsset.service.ISwitchManagementService
;
import
org.jeecg.modules.deviceAsset.service.IVerticalCurveManagementService
;
import
org.jeecg.modules.deviceAsset.service.impl.RailManagementServiceImpl
;
import
org.jeecg.modules.dynamicStaticAnalysis.algorithm.AnalysisAlgorithm
;
import
org.jeecg.modules.dynamicStaticAnalysis.algorithm.SingleConsumer
;
import
org.jeecg.modules.subwayNetwork.service.ILineAliasService
;
import
org.jeecg.modules.utils.UnitCodeUtil
;
import
org.springframework.beans.factory.InitializingBean
;
...
...
@@ -32,6 +33,10 @@ public class InitData implements InitializingBean {
@Resource
private
IRailManagementService
railManagementService
;
@Resource
private
AnalysisAlgorithm
analysisAlgorithm
;
@Override
public
void
afterPropertiesSet
()
throws
Exception
{
UnitCodeUtil
.
setService
(
lineAliasService
,
...
...
@@ -39,5 +44,7 @@ public class InitData implements InitializingBean {
curveManagementService
,
verticalCurveManagementService
,
railManagementService
);
SingleConsumer
.
setService
(
analysisAlgorithm
);
}
}
jeecg-module-system/src/main/java/org/jeecg/config/init/SystemInitRunner.java
View file @
69c00675
...
...
@@ -12,7 +12,7 @@ import org.springframework.stereotype.Component;
public
class
SystemInitRunner
implements
ApplicationRunner
{
@Override
public
void
run
(
ApplicationArguments
args
)
throws
Exception
{
//
开启消费者
//
单独开启消费者线程
new
Thread
(
SingleConsumer:
:
consume
).
start
();
}
}
jeecg-module-system/src/main/java/org/jeecg/modules/deviceAsset/mapper/RailManagementMapper.java
View file @
69c00675
...
...
@@ -21,5 +21,5 @@ public interface RailManagementMapper extends BaseMapper<RailManagement> {
Page
<
RailManagementVO
>
queryPageList
(
Page
<
RailManagementVO
>
pageData
,
RailManagementDTO
dto
);
List
<
Map
<
String
,
Object
>>
getLineSpecialRail
(
String
lineAliasId
);
List
<
Map
<
String
,
Object
>>
getLineSpecialRail
(
String
li
ghtRailId
,
String
li
neAliasId
);
}
jeecg-module-system/src/main/java/org/jeecg/modules/deviceAsset/mapper/xml/RailManagementMapper.xml
View file @
69c00675
...
...
@@ -28,6 +28,7 @@
</select>
<select
id=
"getLineSpecialRail"
resultType=
"java.util.Map"
>
SELECT
id,
unitCode,
startMileage,
endMileage,
...
...
@@ -35,38 +36,47 @@
FROM
(
SELECT
t1.id,
t1.unit_code unitCode,
t1.curve_mileage_zh startMileage,
t1.curve_mileage_hz endMileage,
'曲线' type
FROM
t_da_curve_management t1
LEFT JOIN t_sn_train_station t2 ON t1.section_id = t1.id
WHERE
t1.line_alias_id = #{lineAliasId}
AND t2.light_rail_id = #{lightRailId}
UNION ALL
SELECT
unit_code unitCode,
starting_mileage startMileage,
end_mileage endMileage,
t1.id,
t1.unit_code unitCode,
t1.starting_mileage startMileage,
t1.end_mileage endMileage,
'竖曲线' type
FROM
t_da_vertical_curve_management
t_da_vertical_curve_management t1
LEFT JOIN t_sn_train_station t2 ON t1.section_id = t1.id
WHERE
line_alias_id = #{lineAliasId}
t1.line_alias_id = #{lineAliasId}
AND t2.light_rail_id = #{lightRailId}
UNION ALL
SELECT
unit_code unitCode,
byroad_pre_mileage startMileage,
byroad_end_mileage endMileage,
t1.id,
t1.unit_code unitCode,
t1.byroad_pre_mileage startMileage,
t1.byroad_end_mileage endMileage,
'道岔' type
FROM
t_da_switch_management
t_da_switch_management t1
LEFT JOIN t_sn_section_station_map t2 ON t1.section_station_map_id = t2.id
LEFT JOIN t_sn_subway_section t3 ON t2.section_id = t3.id
AND t3.line_alias_id = t1.line_alias_id
WHERE
line_alias_id = #{lineAliasId}
t1.line_alias_id = #{lineAliasId}
AND t2.light_rail_id = #{lightRailId}
) t
ORDER BY
t.startMileage
...
...
jeecg-module-system/src/main/java/org/jeecg/modules/deviceAsset/service/IRailManagementService.java
View file @
69c00675
...
...
@@ -30,5 +30,5 @@ public interface IRailManagementService extends IService<RailManagement> {
*
* @param lineAliasId 线别ID
*/
List
<
Map
<
String
,
Object
>>
getLineSpecialRail
(
String
lineAliasId
);
List
<
Map
<
String
,
Object
>>
getLineSpecialRail
(
String
li
ghtRailId
,
String
li
neAliasId
);
}
jeecg-module-system/src/main/java/org/jeecg/modules/deviceAsset/service/impl/RailManagementServiceImpl.java
View file @
69c00675
...
...
@@ -2,12 +2,9 @@ package org.jeecg.modules.deviceAsset.service.impl;
import
cn.hutool.core.convert.Convert
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
ognl.IntHashMap
;
import
org.jeecg.common.util.UUIDGenerator
;
import
org.jeecg.modules.deviceAsset.dto.RailManagementDTO
;
import
org.jeecg.modules.deviceAsset.entity.RailManagement
;
...
...
@@ -188,7 +185,7 @@ public class RailManagementServiceImpl extends ServiceImpl<RailManagementMapper,
* @param lineAliasId
*/
private
void
generationCore
(
LightRail
lightRail
,
List
<
RailManagement
>
allRailList
,
String
lineAliasId
)
{
List
<
Map
<
String
,
Object
>>
lineSpecialRailList
=
this
.
getLineSpecialRail
(
lineAliasId
);
List
<
Map
<
String
,
Object
>>
lineSpecialRailList
=
this
.
getLineSpecialRail
(
li
ghtRail
.
getId
(),
li
neAliasId
);
BigDecimal
lineStartMileage
=
BigDecimal
.
ZERO
;
BigDecimal
endMileage
=
lightRail
.
getUpLineMileage
();
...
...
@@ -271,7 +268,7 @@ public class RailManagementServiceImpl extends ServiceImpl<RailManagementMapper,
@Override
public
List
<
Map
<
String
,
Object
>>
getLineSpecialRail
(
String
lineAliasId
)
{
return
this
.
baseMapper
.
getLineSpecialRail
(
lineAliasId
);
public
List
<
Map
<
String
,
Object
>>
getLineSpecialRail
(
String
li
ghtRailId
,
String
li
neAliasId
)
{
return
this
.
baseMapper
.
getLineSpecialRail
(
li
ghtRailId
,
li
neAliasId
);
}
}
jeecg-module-system/src/main/java/org/jeecg/modules/dynamicStaticAnalysis/algorithm/AnalysisAlgorithm.java
0 → 100644
View file @
69c00675
package
org
.
jeecg
.
modules
.
dynamicStaticAnalysis
.
algorithm
;
import
cn.hutool.core.convert.Convert
;
import
cn.hutool.core.convert.Converter
;
import
org.jeecg.modules.checkData.equipmentCheckData.entity.MovementCourse
;
import
org.jeecg.modules.checkData.equipmentCheckData.entity.MovementCourseInfo
;
import
org.jeecg.modules.checkData.equipmentCheckData.service.IMovementCourseInfoService
;
import
org.jeecg.modules.checkData.equipmentCheckData.service.IMovementCourseService
;
import
org.jeecg.modules.dynamicStaticAnalysis.entity.AnalysisBatch
;
import
org.jeecg.modules.dynamicStaticAnalysis.entity.AnalysisBatchCheckDataMap
;
import
org.jeecg.modules.dynamicStaticAnalysis.mapper.AnalysisAlgorithmMapper
;
import
org.jeecg.modules.dynamicStaticAnalysis.service.IAnalysisBatchCheckDataMapService
;
import
org.jeecg.modules.dynamicStaticAnalysis.service.IAnalysisBatchService
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.math.BigDecimal
;
import
java.math.RoundingMode
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
/**
* 分析算法
*/
@Service
public
class
AnalysisAlgorithm
{
@Resource
private
AnalysisAlgorithmMapper
analysisAlgorithmMapper
;
@Resource
private
IAnalysisBatchService
analysisBatchService
;
@Resource
private
IAnalysisBatchCheckDataMapService
analysisBatchCheckDataMapService
;
@Resource
private
IMovementCourseInfoService
movementCourseInfoService
;
@Resource
private
IMovementCourseService
movementCourseService
;
/**
* 分析
*/
public
void
analysis
(
String
analysisBatchId
)
{
// 1.映射单元格
// 1.1 获取分析批次数据
AnalysisBatch
analysisBatch
=
analysisBatchService
.
getById
(
analysisBatchId
);
List
<
AnalysisBatchCheckDataMap
>
analysisBatchCheckDataMapList
=
analysisBatchCheckDataMapService
.
lambdaQuery
()
.
eq
(
AnalysisBatchCheckDataMap:
:
getAnalysisBatchId
,
analysisBatchId
)
.
list
();
// 1.2 按公里数正序排序所有道岔,钢轨,曲线,竖曲线
List
<
Map
<
String
,
Object
>>
unitDeviceList
=
analysisAlgorithmMapper
.
getUnitDevice
(
analysisBatch
.
getLightRailId
(),
analysisBatch
.
getLineAliasId
());
// 1.3 获取检查数据
for
(
AnalysisBatchCheckDataMap
checkDataMap
:
analysisBatchCheckDataMapList
)
{
// 检查数据类型 1-人工静态检查 2-轨检仪静态检查 3-轨检车检查 4-添乘仪检查
if
(
1
==
checkDataMap
.
getEkType
())
{
// 1 获取人工检查数据
List
<
MovementCourse
>
checkItemList
=
movementCourseService
.
lambdaQuery
()
.
eq
(
MovementCourse:
:
getMovementMasterId
,
checkDataMap
.
getEkId
())
.
list
();
List
<
MovementCourseInfo
>
checkItemItemDetailList
=
movementCourseInfoService
.
lambdaQuery
()
.
eq
(
MovementCourseInfo:
:
getMovementMasterId
,
checkDataMap
.
getEkId
())
.
list
();
Map
<
String
,
List
<
MovementCourseInfo
>>
checkItemItemDetailMap
=
checkItemItemDetailList
.
stream
()
.
collect
(
Collectors
.
groupingBy
(
MovementCourseInfo:
:
getMovementCourseId
));
// 2 循环遍历检查项目比较【开始-结束】来映射关联关系
for
(
MovementCourse
checkItem
:
checkItemList
)
{
// 2.1 这里可能出现开始时间比结束时间大的情况
String
seq
=
"ASC"
;
BigDecimal
checkItemStartingMileage
=
checkItem
.
getCourseStartingMileage
();
BigDecimal
checkItemEndMileage
=
checkItem
.
getCourseEndMileage
();
if
(
checkItemStartingMileage
.
compareTo
(
checkItemEndMileage
)
>
0
)
{
seq
=
"DESC"
;
// 说明起始和结束里程颠倒了
checkItemStartingMileage
=
checkItem
.
getCourseEndMileage
();
checkItemEndMileage
=
checkItem
.
getCourseStartingMileage
();
}
// 2.2 单元设备中心里程落在检查项目【开始-结束】这个区间视为这个区间的单元设备
for
(
Map
<
String
,
Object
>
unitDevice
:
unitDeviceList
)
{
BigDecimal
startMileage
=
Convert
.
toBigDecimal
(
unitDevice
.
get
(
"startMileage"
));
BigDecimal
endMileage
=
Convert
.
toBigDecimal
(
unitDevice
.
get
(
"endMileage"
));
BigDecimal
centerMileage
=
startMileage
.
add
(
endMileage
).
divide
(
new
BigDecimal
(
"2"
),
3
,
RoundingMode
.
HALF_UP
);
if
(
checkItemStartingMileage
.
compareTo
(
centerMileage
)
>
0
)
{
break
;
}
if
(
checkItemStartingMileage
.
compareTo
(
centerMileage
)
<=
0
&&
checkItemEndMileage
.
compareTo
(
centerMileage
)
>
0
)
{
List
<
MovementCourseInfo
>
movementCourseInfos
=
checkItemItemDetailMap
.
get
(
checkItem
.
getId
());
Map
<
String
,
List
<
MovementCourseInfo
>>
trackCodeMap
=
movementCourseInfos
.
stream
().
collect
(
Collectors
.
groupingBy
(
MovementCourseInfo:
:
getTrackCode
));
int
size
=
trackCodeMap
.
size
();
if
(
size
!=
0
)
{
BigDecimal
divide
=
checkItemStartingMileage
.
add
(
checkItemEndMileage
).
divide
(
new
BigDecimal
(
size
),
3
,
RoundingMode
.
HALF_UP
);
}
}
}
}
}
// 1.映射单元格
// 2.评分
}
}
}
\ No newline at end of file
jeecg-module-system/src/main/java/org/jeecg/modules/dynamicStaticAnalysis/algorithm/Buffer.java
View file @
69c00675
...
...
@@ -3,6 +3,10 @@ package org.jeecg.modules.dynamicStaticAnalysis.algorithm;
import
java.util.concurrent.BlockingQueue
;
import
java.util.concurrent.LinkedBlockingQueue
;
/**
* @author hkl
* 换冲区
*/
public
class
Buffer
{
/**
* 缓冲队列最大缓存能力
...
...
@@ -11,7 +15,7 @@ public class Buffer {
/**
* 缓冲队列
* 这个队列是一个基于链表的阻塞队列,它的容量可以是有界的或无界的。
* 当使用有界容量时,如果队列已满,新
的
插入操作会被阻塞,直到有空间可用。
* 当使用有界容量时,如果队列已满,新插入操作会被阻塞,直到有空间可用。
* 因为队列可以无限增长(无界),所以在插入元素时不会发生阻塞。
*/
public
static
final
BlockingQueue
<
String
>
queue
=
new
LinkedBlockingQueue
<>(
MAX_CAPACITY
);
...
...
jeecg-module-system/src/main/java/org/jeecg/modules/dynamicStaticAnalysis/algorithm/MultiProducer.java
View file @
69c00675
...
...
@@ -13,10 +13,10 @@ public class MultiProducer {
public
static
void
produce
(
String
analysisBatchId
)
{
try
{
Buffer
.
queue
.
put
(
analysisBatchId
);
log
.
info
(
"MultiProducer[生产者]|线程id:【"
+
Thread
.
currentThread
().
getId
()
+
"】=============分析批次ID:【"
+
analysisBatchId
+
"】"
);
log
.
info
(
"MultiProducer[生产者]|线程id:【"
+
Thread
.
currentThread
().
getId
()
+
"】=============分析批次ID:【"
+
analysisBatchId
+
"】"
);
}
catch
(
InterruptedException
e
)
{
e
.
printStackTrace
();
log
.
error
(
"MultiProducer:"
);
log
.
info
(
"MultiProducer[生产者]|线程id:【"
+
Thread
.
currentThread
().
getId
()
+
"】=============分析批次ID:【"
+
analysisBatchId
+
"】异常信息:"
+
e
.
getMessage
()
);
}
}
}
jeecg-module-system/src/main/java/org/jeecg/modules/dynamicStaticAnalysis/algorithm/SingleConsumer.java
View file @
69c00675
...
...
@@ -8,15 +8,23 @@ import lombok.extern.slf4j.Slf4j;
*/
@Slf4j
public
class
SingleConsumer
{
private
static
AnalysisAlgorithm
analysisAlgorithm
;
public
static
void
setService
(
AnalysisAlgorithm
analysisAlgorithm
)
{
SingleConsumer
.
analysisAlgorithm
=
analysisAlgorithm
;
}
public
static
void
consume
()
{
try
{
while
(
true
)
{
String
analysisBatchId
=
Buffer
.
queue
.
take
();
log
.
info
(
"SingleConsumer[消费者]|线程id:【"
+
Thread
.
currentThread
().
getId
()
+
"】=============分析批次ID:【"
+
analysisBatchId
+
"】"
);
log
.
info
(
"SingleConsumer[消费者]|线程id:【"
+
Thread
.
currentThread
().
getId
()
+
"】=============分析批次ID:【"
+
analysisBatchId
+
"】"
);
analysisAlgorithm
.
analysis
(
analysisBatchId
);
}
}
catch
(
InterruptedException
e
)
{
e
.
printStackTrace
();
log
.
info
(
"SingleConsumer[消费者]|线程id:【"
+
Thread
.
currentThread
().
getId
()
+
"】异常信息:"
+
e
.
getMessage
());
}
}
...
...
jeecg-module-system/src/main/java/org/jeecg/modules/dynamicStaticAnalysis/entity/AnalysisBatch.java
View file @
69c00675
...
...
@@ -55,17 +55,17 @@ public class AnalysisBatch implements Serializable {
@TableField
(
"light_rail_id"
)
private
String
lightRailId
;
//
@ApiModelProperty("所属线路名称")
//
@TableField("light_rail_name")
//
private String lightRailName;
@ApiModelProperty
(
"所属线路名称"
)
@TableField
(
"light_rail_name"
)
private
String
lightRailName
;
@ApiModelProperty
(
"所属线别id"
)
@TableField
(
"line_alias_id"
)
private
String
lineAliasId
;
//
@ApiModelProperty("所属线别名称")
//
@TableField("line_alias_name")
//
private String lineAliasName;
@ApiModelProperty
(
"所属线别名称"
)
@TableField
(
"line_alias_name"
)
private
String
lineAliasName
;
@ApiModelProperty
(
"起始里程"
)
@TableField
(
"starting_mileage"
)
...
...
jeecg-module-system/src/main/java/org/jeecg/modules/dynamicStaticAnalysis/mapper/AnalysisAlgorithmMapper.java
0 → 100644
View file @
69c00675
package
org
.
jeecg
.
modules
.
dynamicStaticAnalysis
.
mapper
;
import
java.util.List
;
import
java.util.Map
;
/**
* <p>
* 动静态分析-算法sql
* </p>
*
* @author hkl
* @since 2023-07-25
*/
public
interface
AnalysisAlgorithmMapper
{
/**
* 获取单元设备
*
* @param lightRailId 线路id
* @param lineAliasId 线别id
*/
List
<
Map
<
String
,
Object
>>
getUnitDevice
(
String
lightRailId
,
String
lineAliasId
);
}
jeecg-module-system/src/main/java/org/jeecg/modules/dynamicStaticAnalysis/mapper/xml/AnalysisAlgorithmMapper.xml
0 → 100644
View file @
69c00675
<?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.dynamicStaticAnalysis.mapper.AnalysisAlgorithmMapper"
>
<select
id=
"getUnitDevice"
resultType=
"java.util.Map"
>
SELECT id,
unitCode,
startMileage,
endMileage,
type
FROM (SELECT t1.id,
t1.unit_code unitCode,
t1.starting_mileage startMileage,
t1.end_mileage endMileage,
'钢轨' type
FROM t_da_rail_management t1
WHERE t1.line_alias_id = #{lineAliasId}
AND t1.light_rail_id = #{lightRailId}
UNION ALL
SELECT t1.id,
t1.unit_code unitCode,
t1.curve_mileage_zh startMileage,
t1.curve_mileage_hz endMileage,
'曲线' type
FROM t_da_curve_management t1
LEFT JOIN t_sn_train_station t2 ON t1.section_id = t1.id
WHERE t1.line_alias_id = #{lineAliasId}
AND t2.light_rail_id = #{lightRailId}
UNION ALL
SELECT t1.id,
t1.unit_code unitCode,
t1.starting_mileage startMileage,
t1.end_mileage endMileage,
'竖曲线' type
FROM t_da_vertical_curve_management t1
LEFT JOIN t_sn_train_station t2 ON t1.section_id = t1.id
WHERE t1.line_alias_id = #{lineAliasId}
AND t2.light_rail_id = #{lightRailId}
UNION ALL
SELECT t1.id,
t1.unit_code unitCode,
t1.byroad_pre_mileage startMileage,
t1.byroad_end_mileage endMileage,
'道岔' type
FROM t_da_switch_management t1
LEFT JOIN t_sn_section_station_map t2 ON t1.section_station_map_id = t2.id
LEFT JOIN t_sn_subway_section t3 ON t2.section_id = t3.id
AND t3.line_alias_id = t1.line_alias_id
WHERE t1.line_alias_id = #{lineAliasId}
AND t2.light_rail_id = #{lightRailId}) t
ORDER BY t.startMileage
</select>
</mapper>
jeecg-module-system/src/main/java/org/jeecg/modules/dynamicStaticAnalysis/service/impl/AnalysisBatchServiceImpl.java
View file @
69c00675
...
...
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
org.jeecg.common.util.UUIDGenerator
;
import
org.jeecg.modules.dynamicStaticAnalysis.algorithm.MultiProducer
;
import
org.jeecg.modules.dynamicStaticAnalysis.dto.AnalysisBatchQueryDTO
;
import
org.jeecg.modules.dynamicStaticAnalysis.dto.AnalysisBatchSaveOrUpdateDTO
;
import
org.jeecg.modules.dynamicStaticAnalysis.dto.CheckBatchDTO
;
...
...
@@ -73,6 +74,9 @@ public class AnalysisBatchServiceImpl extends ServiceImpl<AnalysisBatchMapper, A
for
(
AnalysisBatchCheckDataMap
analysisBatchCheckDataMap
:
analysisBatchCheckDataMaps
)
{
analysisBatchCheckDataMapMapper
.
insert
(
analysisBatchCheckDataMap
);
}
// 执行分析
MultiProducer
.
produce
(
analysisBatch
.
getId
());
}
@Override
...
...
@@ -111,6 +115,9 @@ public class AnalysisBatchServiceImpl extends ServiceImpl<AnalysisBatchMapper, A
for
(
AnalysisBatchCheckDataMap
analysisBatchCheckDataMap
:
analysisBatchCheckDataMaps
)
{
analysisBatchCheckDataMapMapper
.
insert
(
analysisBatchCheckDataMap
);
}
// 执行分析
MultiProducer
.
produce
(
analysisBatch
.
getId
());
}
@Override
...
...
jeecg-module-system/src/main/java/org/jeecg/modules/utils/UnitCodeUtil.java
View file @
69c00675
...
...
@@ -12,9 +12,6 @@ import org.jeecg.modules.deviceAsset.service.IVerticalCurveManagementService;
import
org.jeecg.modules.subwayNetwork.entity.LineAlias
;
import
org.jeecg.modules.subwayNetwork.service.ILineAliasService
;
import
java.util.List
;
import
java.util.Map
;
/**
* @describe:单元编码生成工具
*/
...
...
@@ -184,18 +181,4 @@ public class UnitCodeUtil {
return
String
.
format
(
"%0"
+
numLength
+
"d"
,
num
);
}
/**
* 钢轨智能单元生成
*
* @param lineAliasId 线别ID
*/
public
static
void
railIntelligentGeneration
(
String
lineAliasId
)
{
List
<
Map
<
String
,
Object
>>
lineSpecialRail
=
railManagementService
.
getLineSpecialRail
(
lineAliasId
);
// 1.判断完整的线路有没有空白部分(指剩余区间既不是道岔、曲线、竖曲线、钢轨的部分),只需要填空白部分,空白部分一定是钢轨,按照25一根的逻辑余数自成一根;
// 2.如果不存在空白部分,则定义道岔曲线竖曲线为绝对正确里程值,并且定义为特殊钢轨,相邻两个特殊钢轨之间的里程区间按照25一根的逻辑余数自成一根。
}
}
\ 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