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
2a2816f0
Commit
2a2816f0
authored
Nov 01, 2023
by
hkl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:1.人工检查数据导入bug
parent
271591d2
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
7 additions
and
315 deletions
+7
-315
pom.xml
jeecg-module-system/pom.xml
+4
-4
MovementRecordsMasterController.java
...checkData/controller/MovementRecordsMasterController.java
+0
-247
MovementRecordsMasterFaceImpl.java
...es/checkData/face/impl/MovementRecordsMasterFaceImpl.java
+0
-28
RailInspectionEquipmentItemServiceImpl.java
.../service/impl/RailInspectionEquipmentItemServiceImpl.java
+0
-34
AnalysisAlgorithm.java
...es/dynamicStaticAnalysis/algorithm/AnalysisAlgorithm.java
+3
-2
No files found.
jeecg-module-system/pom.xml
View file @
2a2816f0
...
...
@@ -74,10 +74,6 @@
<properties>
<package.environment>
hkl
</package.environment>
</properties>
<!-- 是否默认 true表示默认-->
<activation>
<activeByDefault>
true
</activeByDefault>
</activation>
</profile>
<!-- 测试环境 -->
...
...
@@ -86,6 +82,10 @@
<properties>
<package.environment>
test
</package.environment>
</properties>
<!-- 是否默认 true表示默认-->
<activation>
<activeByDefault>
true
</activeByDefault>
</activation>
</profile>
<!-- 压测环境-->
...
...
jeecg-module-system/src/main/java/org/jeecg/modules/checkData/controller/MovementRecordsMasterController.java
View file @
2a2816f0
This diff is collapsed.
Click to expand it.
jeecg-module-system/src/main/java/org/jeecg/modules/checkData/face/impl/MovementRecordsMasterFaceImpl.java
View file @
2a2816f0
...
...
@@ -95,8 +95,6 @@ public class MovementRecordsMasterFaceImpl implements MovementRecordsMasterFace
List
<
MovementCourse
>
movementCourseList
=
new
ArrayList
<>();
List
<
MovementCourseInfo
>
movementCourseInfoList
=
new
ArrayList
<>();
MovementRecordsMaster
recordsMaster
=
this
.
movementRecordsMasterService
.
getById
(
id
);
// 1.excel导入List<List<Object>> 中
CurrentRowHandler
currentRowHandler
=
new
CurrentRowHandler
();
ExcelUtil
.
readBySax
(
inputStream
,
0
,
currentRowHandler
);
...
...
@@ -135,25 +133,6 @@ public class MovementRecordsMasterFaceImpl implements MovementRecordsMasterFace
BigDecimal
startMileage
=
Convert
.
toBigDecimal
(
startMileageStr
);
BigDecimal
endMileage
=
Convert
.
toBigDecimal
(
endMileageStr
);
if
(
startMileage
.
compareTo
(
endMileage
)
>=
0
)
{
throw
JeecgBootException
.
error
(
"开始里程不能大于等于结束里程"
);
}
if
(
startMileage
.
compareTo
(
recordsMaster
.
getStartingMileage
())
<
0
)
{
throw
JeecgBootException
.
error
(
"开始里程小于当前批次开始里程"
);
}
else
if
(
startMileage
.
compareTo
(
recordsMaster
.
getStartingMileage
())
==
0
)
{
startExist
=
true
;
}
// 如果结束里程 < 外面的主表的结束里程
if
(
endMileage
.
compareTo
(
recordsMaster
.
getEndMileage
())
>
0
)
{
throw
JeecgBootException
.
error
(
"结束里程大于当前批次结束里程"
);
}
else
if
(
endMileage
.
compareTo
(
recordsMaster
.
getEndMileage
())
==
0
)
{
endExist
=
true
;
}
// ② 获取曲线半径,可能为空,‘/’ 视为空
startIndex
=
startingAndRowDataStr
.
indexOf
(
"曲线半径"
);
endIndex
=
startingAndRowDataStr
.
indexOf
(
"m"
);
...
...
@@ -304,13 +283,6 @@ public class MovementRecordsMasterFaceImpl implements MovementRecordsMasterFace
}
}
if
(!
startExist
)
{
throw
JeecgBootException
.
error
(
"起点里程要和批次的起点里程一致"
);
}
if
(!
endExist
)
{
throw
JeecgBootException
.
error
(
"终点里程要和批次的终点里程一致"
);
}
// 保存之前先删除
movementCourseService
.
lambdaUpdate
().
eq
(
MovementCourse:
:
getMovementMasterId
,
id
).
remove
();
movementCourseInfoService
.
lambdaUpdate
().
eq
(
MovementCourseInfo:
:
getMovementMasterId
,
id
).
remove
();
...
...
jeecg-module-system/src/main/java/org/jeecg/modules/checkData/service/impl/RailInspectionEquipmentItemServiceImpl.java
View file @
2a2816f0
...
...
@@ -57,8 +57,6 @@ public class RailInspectionEquipmentItemServiceImpl extends ServiceImpl<RailInsp
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
uploadFile
(
String
masterId
,
MultipartFile
file
)
{
try
{
MovementRecordsMaster
recordsMaster
=
movementRecordsMasterMapper
.
selectById
(
masterId
);
//读取第一个sheet页的数据
ExcelReader
reader
=
ExcelUtil
.
getReader
(
file
.
getInputStream
(),
0
);
//读取Excel中所有的数据,以行保存
...
...
@@ -67,8 +65,6 @@ public class RailInspectionEquipmentItemServiceImpl extends ServiceImpl<RailInsp
List
<
RailInspectionEquipmentItem
>
items
=
new
ArrayList
<>();
List
<
RailInspectionEquipmentItemDetail
>
itemDetails
=
new
ArrayList
<>();
boolean
startExist
=
false
;
boolean
endExist
=
false
;
int
sort
=
1
;
for
(
int
i
=
0
;
i
<
rowRecords
.
size
();
)
{
List
<
Object
>
cols
=
rowRecords
.
get
(
i
);
...
...
@@ -81,27 +77,6 @@ public class RailInspectionEquipmentItemServiceImpl extends ServiceImpl<RailInsp
BigDecimal
courseEndMileage
=
Convert
.
toBigDecimal
(
cols
.
get
(
6
));
if
((
ObjectUtil
.
isNotEmpty
(
titleHeader
)
&&
titleHeader
.
contains
(
"股道"
))
&&
(
ObjectUtil
.
isNotEmpty
(
courseStartingMileage
)
&&
ObjectUtil
.
isNotEmpty
(
courseEndMileage
)))
{
// 如果开始里程 > 外面的主表的开始程则报错
BigDecimal
currentStartMileage
=
courseStartingMileage
.
multiply
(
new
BigDecimal
(
1000
));
BigDecimal
currentEntMileage
=
courseEndMileage
.
multiply
(
new
BigDecimal
(
1000
));
if
(
currentStartMileage
.
compareTo
(
currentEntMileage
)
>=
0
)
{
throw
JeecgBootException
.
error
(
"开始里程不能大于等于结束里程"
);
}
if
(
currentStartMileage
.
compareTo
(
recordsMaster
.
getStartingMileage
())
<
0
)
{
throw
JeecgBootException
.
error
(
"开始里程小于当前批次开始里程"
);
}
else
if
(
currentStartMileage
.
compareTo
(
recordsMaster
.
getStartingMileage
())
==
0
)
{
startExist
=
true
;
}
// 如果结束里程 < 外面的主表的结束里程
if
(
currentEntMileage
.
compareTo
(
recordsMaster
.
getEndMileage
())
>
0
)
{
throw
JeecgBootException
.
error
(
"结束里程大于当前批次结束里程"
);
}
else
if
(
currentEntMileage
.
compareTo
(
recordsMaster
.
getEndMileage
())
==
0
)
{
endExist
=
true
;
}
// 曲线半径
BigDecimal
curveRadius
=
null
;
if
(
ObjectUtil
.
isNotEmpty
(
cols
.
get
(
18
).
toString
().
trim
()))
{
...
...
@@ -138,13 +113,6 @@ public class RailInspectionEquipmentItemServiceImpl extends ServiceImpl<RailInsp
}
}
if
(!
startExist
)
{
throw
JeecgBootException
.
error
(
"起点里程要和批次的起点里程一致"
);
}
if
(!
endExist
)
{
throw
JeecgBootException
.
error
(
"终点里程要和批次的起点里程一致"
);
}
// 项目信息-先删除,再导入
this
.
lambdaUpdate
().
eq
(
RailInspectionEquipmentItem:
:
getRailInspectionEquipmentId
,
masterId
).
remove
();
LambdaQueryWrapper
<
RailInspectionEquipmentItemDetail
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
...
...
@@ -160,8 +128,6 @@ public class RailInspectionEquipmentItemServiceImpl extends ServiceImpl<RailInsp
}
private
int
readItemDetail
(
int
rows
,
String
titleHeader
,
String
itemId
,
List
<
List
<
Object
>>
rowRecords
,
List
<
RailInspectionEquipmentItemDetail
>
itemDetails
)
{
// 解析检查项目:1行:跳过2行不解析
List
<
Object
>
checkItems
=
rowRecords
.
get
(
rows
+
2
);
// 解析测点:1行
...
...
jeecg-module-system/src/main/java/org/jeecg/modules/dynamicStaticAnalysis/algorithm/AnalysisAlgorithm.java
View file @
2a2816f0
...
...
@@ -1274,10 +1274,11 @@ public class AnalysisAlgorithm {
movementCourseInfo
.
setCurrentStartMileage
(
currentStartMileage
);
movementCourseInfo
.
setCurrentEndEndMileage
(
currentEndEndMileage
);
transfinite
=
this
.
railDeviceCheckTransfinite
(
analysisBatch
,
movementCourseInfo
);
}
else
{
if
(
transfinite
!=
null
)
{
unitDevice
.
put
(
"railDeviceTransfinite"
,
transfinite
);
}
}
}
// 计算得分
this
.
railDeviceCheckScore
(
analysisBatch
,
railDeviceCheckList
,
unitDevice
);
...
...
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