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
6c121853
Commit
6c121853
authored
Aug 16, 2023
by
hkl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 1.轨检仪器bug修改
parent
6ca0da31
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
182 additions
and
106 deletions
+182
-106
RailInspectionEquipmentItem.java
...aticGeometricData/entity/RailInspectionEquipmentItem.java
+2
-2
RailInspectionEquipmentItemServiceImpl.java
.../service/impl/RailInspectionEquipmentItemServiceImpl.java
+36
-26
AnalysisAlgorithm.java
...es/dynamicStaticAnalysis/algorithm/AnalysisAlgorithm.java
+82
-70
AnalysisAlgorithmMapper.java
...dynamicStaticAnalysis/mapper/AnalysisAlgorithmMapper.java
+5
-1
AnalysisAlgorithmMapper.xml
...amicStaticAnalysis/mapper/xml/AnalysisAlgorithmMapper.xml
+8
-0
AnalysisBatchUnitDeviceMapper.xml
...aticAnalysis/mapper/xml/AnalysisBatchUnitDeviceMapper.xml
+1
-1
StrUtil.java
...org/jeecg/modules/dynamicStaticAnalysis/util/StrUtil.java
+24
-0
WorkBatchMapper.xml
...cg/modules/maintenanceWork/mapper/xml/WorkBatchMapper.xml
+9
-6
WorkBatchServiceImpl.java
...es/maintenanceWork/service/impl/WorkBatchServiceImpl.java
+8
-0
WorkBatchDetailVO.java
...g/jeecg/modules/maintenanceWork/vo/WorkBatchDetailVO.java
+7
-0
No files found.
jeecg-module-system/src/main/java/org/jeecg/modules/checkData/dynamicStaticGeometricData/entity/RailInspectionEquipmentItem.java
View file @
6c121853
...
...
@@ -51,11 +51,11 @@ public class RailInspectionEquipmentItem implements Serializable {
@TableField
(
"rail_inspection_equipment_id"
)
private
String
railInspectionEquipmentId
;
@ApiModelProperty
(
"检查起始里程(m)"
)
@ApiModelProperty
(
"检查起始里程(
k
m)"
)
@TableField
(
"course_starting_mileage"
)
private
BigDecimal
courseStartingMileage
;
@ApiModelProperty
(
"检查终点里程(m)"
)
@ApiModelProperty
(
"检查终点里程(
k
m)"
)
@TableField
(
"course_end_mileage"
)
private
BigDecimal
courseEndMileage
;
...
...
jeecg-module-system/src/main/java/org/jeecg/modules/checkData/dynamicStaticGeometricData/service/impl/RailInspectionEquipmentItemServiceImpl.java
View file @
6c121853
...
...
@@ -24,6 +24,7 @@ import org.springframework.web.multipart.MultipartFile;
import
javax.annotation.Resource
;
import
java.io.IOException
;
import
java.math.BigDecimal
;
import
java.math.RoundingMode
;
import
java.util.ArrayList
;
import
java.util.List
;
...
...
@@ -93,6 +94,8 @@ public class RailInspectionEquipmentItemServiceImpl extends ServiceImpl<RailInsp
int
skipRow
=
analysisItemDetail
(
i
,
titleHeader
,
item
.
getId
(),
rowRecords
,
itemDetails
);
i
=
i
+
skipRow
;
}
else
{
i
++;
}
}
...
...
@@ -127,9 +130,12 @@ public class RailInspectionEquipmentItemServiceImpl extends ServiceImpl<RailInsp
private
int
analysisItemDetail
(
int
rows
,
String
titleHeader
,
String
itemId
,
List
<
List
<
Object
>>
rowRecords
,
List
<
RailInspectionEquipmentItemDetail
>
itemDetails
)
{
// 解析检查项目:3行:跳过2行不解析
// 解析检查项目:1行:跳过2行不解析
List
<
Object
>
checkItems
=
rowRecords
.
get
(
rows
+
2
);
// 解析规矩轨距:1行
// 解析测点:1行
List
<
Object
>
measurePoints
=
rowRecords
.
get
(
rows
+
3
);
// 解析轨距:1行
List
<
Object
>
trackGauges
=
rowRecords
.
get
(
rows
+
4
);
// 解析水平 :1行
List
<
Object
>
levels
=
rowRecords
.
get
(
rows
+
5
);
...
...
@@ -139,37 +145,36 @@ public class RailInspectionEquipmentItemServiceImpl extends ServiceImpl<RailInsp
List
<
Object
>
others
=
rowRecords
.
get
(
rows
+
7
);
int
measurePoint
=
1
;
int
sort
=
1
;
for
(
int
i
=
2
;
i
<
32
;
i
++)
{
if
(
measurePoint
%
8
==
0
)
{
measurePoint
=
1
;
i
=
i
+
2
;
// 测点:测点8和9不保留
Integer
measurePoint
=
Convert
.
toInt
(
measurePoints
.
get
(
i
))
;
if
(
measurePoint
==
8
||
measurePoint
==
9
)
{
continue
;
}
else
{
measurePoint
++;
}
RailInspectionEquipmentItemDetail
itemDetail
=
new
RailInspectionEquipmentItemDetail
();
itemDetail
.
setId
(
UUIDGenerator
.
generate
());
itemDetail
.
setRailInspectionEquipmentItemId
(
itemId
);
// 检查项目
String
checkItem
=
checkItems
.
get
(
i
).
toString
();
itemDetail
.
setCheckItem
(
checkItem
);
//轨距
//
轨距
String
trackGauge
=
trackGauges
.
get
(
i
).
toString
();
itemDetail
.
setTrackGauge
(
trackGauge
);
//水平
//
水平
String
level
=
levels
.
get
(
i
).
toString
();
itemDetail
.
setLevel
(
level
);
//三角坑
//
三角坑
String
triangularPit
=
triangularPits
.
get
(
i
).
toString
();
itemDetail
.
setTriangularPit
(
triangularPit
);
//解析轨向、高低及其它
String
other
=
others
.
get
(
i
).
toString
();
itemDetail
.
setOther
(
other
);
// 测点
itemDetail
.
setMeasurePoint
(
measurePoint
);
// 测点
值向后偏移一个
itemDetail
.
setMeasurePoint
(
measurePoint
+
1
);
itemDetail
.
setInfoSort
(
sort
++);
itemDetails
.
add
(
itemDetail
);
...
...
@@ -200,6 +205,11 @@ public class RailInspectionEquipmentItemServiceImpl extends ServiceImpl<RailInsp
@Override
public
void
saveRecord
(
RailInspectionEquipmentItem
record
)
{
// 中心里程 = (开始里程+结束里程) / 2
BigDecimal
startMileage
=
record
.
getCourseStartingMileage
();
BigDecimal
endMileage
=
record
.
getCourseEndMileage
();
BigDecimal
avgMileage
=
endMileage
.
subtract
(
startMileage
).
divide
(
new
BigDecimal
(
"2"
),
3
,
RoundingMode
.
HALF_UP
);
// 保存item表
record
.
setId
(
UUIDGenerator
.
generate
());
...
...
@@ -208,23 +218,28 @@ public class RailInspectionEquipmentItemServiceImpl extends ServiceImpl<RailInsp
// 初始化明细表
String
checkItem
=
"检查项目:"
;
List
<
RailInspectionEquipmentItemDetail
>
itemDetails
=
new
ArrayList
<>();
int
measurePoint
=
1
;
int
measurePoint
=
0
;
int
sort
=
1
;
for
(
int
i
=
2
;
i
<
32
;
i
++)
{
if
(
measurePoint
%
8
==
0
)
{
measurePoint
=
1
;
i
=
i
+
2
;
continue
;
}
else
{
if
(
measurePoint
==
8
)
{
measurePoint
++;
continue
;
}
if
(
measurePoint
==
9
)
{
measurePoint
=
0
;
startMileage
=
startMileage
.
add
(
avgMileage
);
continue
;
}
measurePoint
++;
RailInspectionEquipmentItemDetail
itemDetail
=
new
RailInspectionEquipmentItemDetail
();
itemDetail
.
setId
(
UUIDGenerator
.
generate
());
itemDetail
.
setRailInspectionEquipmentId
(
record
.
getRailInspectionEquipmentId
());
itemDetail
.
setRailInspectionEquipmentItemId
(
record
.
getId
());
// 检查项目
itemDetail
.
setCheckItem
(
""
);
itemDetail
.
setCheckItem
(
checkItem
+
startMileage
.
add
(
avgMileage
)
);
//轨距
itemDetail
.
setTrackGauge
(
""
);
//水平
...
...
@@ -235,12 +250,7 @@ public class RailInspectionEquipmentItemServiceImpl extends ServiceImpl<RailInsp
itemDetail
.
setOther
(
""
);
// 测点
itemDetail
.
setMeasurePoint
(
measurePoint
-
1
);
if
(
measurePoint
%
10
==
0
)
{
measurePoint
=
1
;
}
else
{
measurePoint
++;
}
itemDetail
.
setMeasurePoint
(
measurePoint
);
itemDetail
.
setInfoSort
(
sort
++);
itemDetails
.
add
(
itemDetail
);
}
...
...
jeecg-module-system/src/main/java/org/jeecg/modules/dynamicStaticAnalysis/algorithm/AnalysisAlgorithm.java
View file @
6c121853
This diff is collapsed.
Click to expand it.
jeecg-module-system/src/main/java/org/jeecg/modules/dynamicStaticAnalysis/mapper/AnalysisAlgorithmMapper.java
View file @
6c121853
package
org
.
jeecg
.
modules
.
dynamicStaticAnalysis
.
mapper
;
import
java.math.BigDecimal
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -19,5 +20,8 @@ public interface AnalysisAlgorithmMapper {
* @param lightRailId 线路id
* @param lineAliasId 线别id
*/
List
<
Map
<
String
,
Object
>>
getUnitDevice
(
String
lightRailId
,
String
lineAliasId
);
List
<
Map
<
String
,
Object
>>
getUnitDevice
(
String
lightRailId
,
String
lineAliasId
,
BigDecimal
startMileage
,
BigDecimal
endMileage
);
}
jeecg-module-system/src/main/java/org/jeecg/modules/dynamicStaticAnalysis/mapper/xml/AnalysisAlgorithmMapper.xml
View file @
6c121853
...
...
@@ -69,6 +69,14 @@
WHERE t1.line_alias_id = #{lineAliasId}
AND t2.light_rail_id = #{lightRailId}
) t
<where>
<if
test=
"startMileage != null"
>
AND t.centerMileage >= #{startMileage}
</if>
<if
test=
"endMileage != null"
>
AND t.centerMileage
<![CDATA[ <= ]]>
#{endMileage}
</if>
</where>
ORDER BY t.startMileage
</select>
</mapper>
jeecg-module-system/src/main/java/org/jeecg/modules/dynamicStaticAnalysis/mapper/xml/AnalysisBatchUnitDeviceMapper.xml
View file @
6c121853
...
...
@@ -18,7 +18,7 @@
t1.unit_device_code,
t1.unit_type,
t1.unit_type_name,
t1.unit_starting_mileage,
t1.unit_start
_mileage unit_start
ing_mileage,
t1.unit_center_mileage,
t1.unit_end_mileage,
t1.unit_score,
...
...
jeecg-module-system/src/main/java/org/jeecg/modules/dynamicStaticAnalysis/util/StrUtil.java
View file @
6c121853
package
org
.
jeecg
.
modules
.
dynamicStaticAnalysis
.
util
;
import
java.math.BigDecimal
;
import
java.util.regex.Matcher
;
import
java.util.regex.Pattern
;
...
...
@@ -30,4 +31,27 @@ public class StrUtil {
return
speedLevel
;
}
/**
* 提取文字成数字并去掉末尾多余的0
*
* @param text
* @return
*/
public
static
BigDecimal
extractTextToNumber
(
String
text
)
{
String
regex
=
"(-\\|+)?\\d+(\\.\\d+)?"
;
Pattern
pattern
=
Pattern
.
compile
(
regex
);
Matcher
matcher
=
pattern
.
matcher
(
text
);
BigDecimal
result
=
null
;
while
(
matcher
.
find
())
{
String
group
=
matcher
.
group
();
if
(
null
!=
group
&&
!
group
.
isEmpty
())
{
result
=
new
BigDecimal
(
group
);
break
;
}
}
return
result
;
}
}
jeecg-module-system/src/main/java/org/jeecg/modules/maintenanceWork/mapper/xml/WorkBatchMapper.xml
View file @
6c121853
...
...
@@ -99,12 +99,15 @@
WHERE t1.line_alias_id = #{dto.lineAliasId}
AND t2.light_rail_id = #{dto.lightRailId}
) t
<if
test=
"dto.startMileage != null"
>
AND t.centerMileage >= #{dto.startMileage}
</if>
<if
test=
"dto.endMileage != null"
>
AND t.centerMileage
<![CDATA[ <= ]]>
#{dto.endMileage}
</if>
<where>
<if
test=
"dto.startMileage != null"
>
AND t.centerMileage >= #{dto.startMileage}
</if>
<if
test=
"dto.endMileage != null"
>
AND t.centerMileage
<![CDATA[ <= ]]>
#{dto.endMileage}
</if>
</where>
ORDER BY t.startMileage
</select>
</mapper>
jeecg-module-system/src/main/java/org/jeecg/modules/maintenanceWork/service/impl/WorkBatchServiceImpl.java
View file @
6c121853
...
...
@@ -9,6 +9,8 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import
org.jeecg.common.util.UUIDGenerator
;
import
org.jeecg.modules.dynamicStaticAnalysis.entity.AnalysisBatchUnitDevice
;
import
org.jeecg.modules.dynamicStaticAnalysis.mapper.AnalysisBatchUnitDeviceMapper
;
import
org.jeecg.modules.dynamicStaticAnalysis.mapper.AnalysisBatchUnitDeviceTransfiniteMapper
;
import
org.jeecg.modules.dynamicStaticAnalysis.vo.AnalysisBatchUnitDeviceTransfiniteVO
;
import
org.jeecg.modules.maintenanceWork.dto.*
;
import
org.jeecg.modules.maintenanceWork.entity.WorkBatch
;
import
org.jeecg.modules.maintenanceWork.entity.WorkBatchDetail
;
...
...
@@ -39,6 +41,8 @@ public class WorkBatchServiceImpl extends ServiceImpl<WorkBatchMapper, WorkBatch
@Resource
private
AnalysisBatchUnitDeviceMapper
analysisBatchUnitDeviceMapper
;
@Resource
private
AnalysisBatchUnitDeviceTransfiniteMapper
transfiniteMapper
;
@Override
public
Page
<
WorkBatchVO
>
listRecord
(
Page
<
WorkBatchVO
>
pageData
,
WorkBatchDTO
dto
)
{
...
...
@@ -46,6 +50,10 @@ public class WorkBatchServiceImpl extends ServiceImpl<WorkBatchMapper, WorkBatch
for
(
WorkBatchVO
record
:
pageRecords
.
getRecords
())
{
List
<
WorkBatchDetailVO
>
detailList
=
workBatchDetailMapper
.
queryListByWorkBatchId
(
record
.
getId
());
// for (WorkBatchDetailVO workBatchDetailVO : detailList) {
// List<AnalysisBatchUnitDeviceTransfiniteVO> transfiniteList = transfiniteMapper.getTransfiniteList(record.getId());
// workBatchDetailVO.setTransfiniteList(transfiniteList);
// }
record
.
setDetailList
(
detailList
);
}
...
...
jeecg-module-system/src/main/java/org/jeecg/modules/maintenanceWork/vo/WorkBatchDetailVO.java
View file @
6c121853
...
...
@@ -6,13 +6,16 @@ import com.baomidou.mybatisplus.annotation.TableName;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Getter
;
import
lombok.Setter
;
import
org.jeecg.modules.dynamicStaticAnalysis.vo.AnalysisBatchUnitDeviceTransfiniteVO
;
/**
* <p>
...
...
@@ -68,4 +71,8 @@ public class WorkBatchDetailVO {
@ApiModelProperty
(
"备注"
)
private
String
remark
;
@ApiModelProperty
(
"超限"
)
private
List
<
AnalysisBatchUnitDeviceTransfiniteVO
>
transfiniteList
=
new
ArrayList
<>();
}
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