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
3ee2cf8a
Commit
3ee2cf8a
authored
Sep 13, 2023
by
hkl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:1.修改轨检查仪数据问题
parent
6359c104
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
88 additions
and
86 deletions
+88
-86
AnalysisAlgorithm.java
...es/dynamicStaticAnalysis/algorithm/AnalysisAlgorithm.java
+12
-6
AnalysisBatchUnitDeviceMapper.xml
...aticAnalysis/mapper/xml/AnalysisBatchUnitDeviceMapper.xml
+1
-0
SysLogController.java
...org/jeecg/modules/system/controller/SysLogController.java
+74
-79
application-dev.yml
jeecg-module-system/src/main/resources/application-dev.yml
+1
-1
No files found.
jeecg-module-system/src/main/java/org/jeecg/modules/dynamicStaticAnalysis/algorithm/AnalysisAlgorithm.java
View file @
3ee2cf8a
...
@@ -608,11 +608,11 @@ public class AnalysisAlgorithm {
...
@@ -608,11 +608,11 @@ public class AnalysisAlgorithm {
BigDecimal
sumUnitScore
=
null
;
BigDecimal
sumUnitScore
=
null
;
BigDecimal
finalZontalSpeed
=
null
;
BigDecimal
finalZontalSpeed
=
null
;
BigDecimal
sumZontalSpeed
=
BigDecimal
.
ZERO
;
BigDecimal
sumZontalSpeed
=
BigDecimal
.
ZERO
;
int
zontalSpeedSize
=
1
;
int
zontalSpeedSize
=
0
;
BigDecimal
finalVerticalSpeed
=
null
;
BigDecimal
finalVerticalSpeed
=
null
;
BigDecimal
sumVerticalSpeed
=
BigDecimal
.
ZERO
;
BigDecimal
sumVerticalSpeed
=
BigDecimal
.
ZERO
;
int
verticalSpeedSize
=
1
;
int
verticalSpeedSize
=
0
;
List
<
AnalysisBatchUnitDevicePointScore
>
scoreList
=
new
ArrayList
<>();
List
<
AnalysisBatchUnitDevicePointScore
>
scoreList
=
new
ArrayList
<>();
for
(
MovementAdditiveInfo
movementAdditiveInfo
:
currentUnitDeviceAdditiveList
)
{
for
(
MovementAdditiveInfo
movementAdditiveInfo
:
currentUnitDeviceAdditiveList
)
{
...
@@ -1302,6 +1302,13 @@ public class AnalysisAlgorithm {
...
@@ -1302,6 +1302,13 @@ public class AnalysisAlgorithm {
// 1.2 处理检查项目是公里的情况
// 1.2 处理检查项目是公里的情况
BigDecimal
checkItemStartingMileage
=
checkItem
.
getCourseStartingMileage
().
multiply
(
new
BigDecimal
(
"1000"
));
BigDecimal
checkItemStartingMileage
=
checkItem
.
getCourseStartingMileage
().
multiply
(
new
BigDecimal
(
"1000"
));
BigDecimal
checkItemEndMileage
=
checkItem
.
getCourseEndMileage
().
multiply
(
new
BigDecimal
(
"1000"
));
BigDecimal
checkItemEndMileage
=
checkItem
.
getCourseEndMileage
().
multiply
(
new
BigDecimal
(
"1000"
));
// 如果 开始里程>结束里程 就两两交换位置
if
(
checkItemStartingMileage
.
compareTo
(
checkItemEndMileage
)
>
0
)
{
BigDecimal
tempMileage
=
checkItemStartingMileage
;
checkItemStartingMileage
=
checkItemEndMileage
;
checkItemEndMileage
=
tempMileage
;
}
checkItem
.
setCourseStartingMileage
(
checkItemStartingMileage
);
checkItem
.
setCourseStartingMileage
(
checkItemStartingMileage
);
checkItem
.
setCourseEndMileage
(
checkItemEndMileage
);
checkItem
.
setCourseEndMileage
(
checkItemEndMileage
);
}
}
...
@@ -1311,16 +1318,15 @@ public class AnalysisAlgorithm {
...
@@ -1311,16 +1318,15 @@ public class AnalysisAlgorithm {
for
(
Map
<
String
,
Object
>
unitDevice
:
unitDeviceList
)
{
for
(
Map
<
String
,
Object
>
unitDevice
:
unitDeviceList
)
{
BigDecimal
centerMileage
=
Convert
.
toBigDecimal
(
unitDevice
.
get
(
"centerMileage"
));
BigDecimal
centerMileage
=
Convert
.
toBigDecimal
(
unitDevice
.
get
(
"centerMileage"
));
System
.
out
.
println
(
"单元设备code:"
+
unitDevice
.
get
(
"unitCode"
)
+
"单元中心里程:"
+
centerMileage
);
// 2.1 循环遍历检查项目比较【开始-结束】来映射关联关系
// 2.1 循环遍历检查项目比较【开始-结束】来映射关联关系
System
.
out
.
println
(
"单元设备名称="
+
unitDevice
.
get
(
"unitCode"
));
System
.
out
.
println
(
"单元中心里程="
+
centerMileage
);
for
(
RailInspectionEquipmentItem
checkItem
:
checkItemList
)
{
for
(
RailInspectionEquipmentItem
checkItem
:
checkItemList
)
{
BigDecimal
checkItemStartingMileage
=
checkItem
.
getCourseStartingMileage
();
BigDecimal
checkItemStartingMileage
=
checkItem
.
getCourseStartingMileage
();
BigDecimal
checkItemEndMileage
=
checkItem
.
getCourseEndMileage
();
BigDecimal
checkItemEndMileage
=
checkItem
.
getCourseEndMileage
();
System
.
out
.
printf
(
"检查项目[开始-结束]=["
+
centerMileage
+
"-"
+
checkItemEndMileage
+
"]"
);
System
.
out
.
printf
(
"【"
+
checkItemStartingMileage
+
"-"
+
checkItemEndMileage
+
"]"
);
// 2.2.1 命中检查项目
// 2.2.1 命中检查项目
if
(
checkItemStartingMileage
.
compareTo
(
centerMileage
)
<=
0
&&
checkItemEndMileage
.
compareTo
(
centerMileage
)
>
0
)
{
if
(
checkItemStartingMileage
.
compareTo
(
centerMileage
)
<=
0
&&
checkItemEndMileage
.
compareTo
(
centerMileage
)
>
0
)
{
List
<
RailInspectionEquipmentItemDetail
>
movementCourseInfos
=
checkItemItemDetailMap
.
get
(
checkItem
.
getId
());
List
<
RailInspectionEquipmentItemDetail
>
movementCourseInfos
=
checkItemItemDetailMap
.
get
(
checkItem
.
getId
());
...
...
jeecg-module-system/src/main/java/org/jeecg/modules/dynamicStaticAnalysis/mapper/xml/AnalysisBatchUnitDeviceMapper.xml
View file @
3ee2cf8a
...
@@ -210,6 +210,7 @@
...
@@ -210,6 +210,7 @@
LEFT JOIN t_djt_movement_records_master t3 ON t2.movement_master_id = t3.id
LEFT JOIN t_djt_movement_records_master t3 ON t2.movement_master_id = t3.id
WHERE t1.analysis_batch_unit_device_id = #{id}
WHERE t1.analysis_batch_unit_device_id = #{id}
AND t1.ek_type = 4
AND t1.ek_type = 4
GROUP BY t2.id
ORDER BY t3.ek_code ASC
ORDER BY t3.ek_code ASC
</select>
</select>
...
...
jeecg-module-system/src/main/java/org/jeecg/modules/system/controller/SysLogController.java
View file @
3ee2cf8a
...
@@ -46,52 +46,47 @@ public class SysLogController {
...
@@ -46,52 +46,47 @@ public class SysLogController {
private
static
final
String
ALL_ClEAR
=
"allclear"
;
private
static
final
String
ALL_ClEAR
=
"allclear"
;
/**
/**
* @功能:查询日志记录
* @param syslog
* @param syslog
* @param pageNo
* @param pageNo
* @param pageSize
* @param pageSize
* @param req
* @param req
* @return
* @return
* @功能:查询日志记录
*/
*/
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
public
Result
<
IPage
<
SysLog
>>
queryPageList
(
SysLog
syslog
,
@RequestParam
(
name
=
"pageNo"
,
defaultValue
=
"1"
)
Integer
pageNo
,
public
Result
<
IPage
<
SysLog
>>
queryPageList
(
SysLog
syslog
,
@RequestParam
(
name
=
"pageNo"
,
defaultValue
=
"1"
)
Integer
pageNo
,
@RequestParam
(
name
=
"pageSize"
,
defaultValue
=
"10"
)
Integer
pageSize
,
HttpServletRequest
req
)
{
@RequestParam
(
name
=
"pageSize"
,
defaultValue
=
"10"
)
Integer
pageSize
,
HttpServletRequest
req
)
{
Result
<
IPage
<
SysLog
>>
result
=
new
Result
<
IPage
<
SysLog
>>();
Result
<
IPage
<
SysLog
>>
result
=
new
Result
<
IPage
<
SysLog
>>();
QueryWrapper
<
SysLog
>
queryWrapper
=
QueryGenerator
.
initQueryWrapper
(
syslog
,
req
.
getParameterMap
());
QueryWrapper
<
SysLog
>
queryWrapper
=
QueryGenerator
.
initQueryWrapper
(
syslog
,
req
.
getParameterMap
());
queryWrapper
.
lambda
().
orderByDesc
(
SysLog:
:
getCreateTime
);
Page
<
SysLog
>
page
=
new
Page
<
SysLog
>(
pageNo
,
pageSize
);
Page
<
SysLog
>
page
=
new
Page
<
SysLog
>(
pageNo
,
pageSize
);
//日志关键词
//日志关键词
String
keyWord
=
req
.
getParameter
(
"keyWord"
);
String
keyWord
=
req
.
getParameter
(
"keyWord"
);
if
(
oConvertUtils
.
isNotEmpty
(
keyWord
))
{
if
(
oConvertUtils
.
isNotEmpty
(
keyWord
))
{
queryWrapper
.
like
(
"log_content"
,
keyWord
);
queryWrapper
.
like
(
"log_content"
,
keyWord
);
}
}
//TODO 过滤逻辑处理
//TODO begin、end逻辑处理
//TODO 一个强大的功能,前端传一个字段字符串,后台只返回这些字符串对应的字段
//创建时间/创建人的赋值
//创建时间/创建人的赋值
IPage
<
SysLog
>
pageList
=
sysLogService
.
page
(
page
,
queryWrapper
);
IPage
<
SysLog
>
pageList
=
sysLogService
.
page
(
page
,
queryWrapper
);
log
.
info
(
"查询当前页:"
+
pageList
.
getCurrent
());
log
.
info
(
"查询当前页数量:"
+
pageList
.
getSize
());
log
.
info
(
"查询结果数量:"
+
pageList
.
getRecords
().
size
());
log
.
info
(
"数据总数:"
+
pageList
.
getTotal
());
result
.
setSuccess
(
true
);
result
.
setSuccess
(
true
);
result
.
setResult
(
pageList
);
result
.
setResult
(
pageList
);
return
result
;
return
result
;
}
}
/**
/**
* @功能:删除单个日志记录
* @param id
* @param id
* @return
* @return
* @功能:删除单个日志记录
*/
*/
@RequestMapping
(
value
=
"/delete"
,
method
=
RequestMethod
.
DELETE
)
@RequestMapping
(
value
=
"/delete"
,
method
=
RequestMethod
.
DELETE
)
public
Result
<
SysLog
>
delete
(
@RequestParam
(
name
=
"id"
,
required
=
true
)
String
id
)
{
public
Result
<
SysLog
>
delete
(
@RequestParam
(
name
=
"id"
,
required
=
true
)
String
id
)
{
Result
<
SysLog
>
result
=
new
Result
<
SysLog
>();
Result
<
SysLog
>
result
=
new
Result
<
SysLog
>();
SysLog
sysLog
=
sysLogService
.
getById
(
id
);
SysLog
sysLog
=
sysLogService
.
getById
(
id
);
if
(
sysLog
==
null
)
{
if
(
sysLog
==
null
)
{
result
.
error500
(
"未找到对应实体"
);
result
.
error500
(
"未找到对应实体"
);
}
else
{
}
else
{
boolean
ok
=
sysLogService
.
removeById
(
id
);
boolean
ok
=
sysLogService
.
removeById
(
id
);
if
(
ok
)
{
if
(
ok
)
{
result
.
success
(
"删除成功!"
);
result
.
success
(
"删除成功!"
);
}
}
}
}
...
@@ -99,17 +94,17 @@ public class SysLogController {
...
@@ -99,17 +94,17 @@ public class SysLogController {
}
}
/**
/**
* @功能:批量,全部清空日志记录
* @param ids
* @param ids
* @return
* @return
* @功能:批量,全部清空日志记录
*/
*/
@RequestMapping
(
value
=
"/deleteBatch"
,
method
=
RequestMethod
.
DELETE
)
@RequestMapping
(
value
=
"/deleteBatch"
,
method
=
RequestMethod
.
DELETE
)
public
Result
<
SysRole
>
deleteBatch
(
@RequestParam
(
name
=
"ids"
,
required
=
true
)
String
ids
)
{
public
Result
<
SysRole
>
deleteBatch
(
@RequestParam
(
name
=
"ids"
,
required
=
true
)
String
ids
)
{
Result
<
SysRole
>
result
=
new
Result
<
SysRole
>();
Result
<
SysRole
>
result
=
new
Result
<
SysRole
>();
if
(
ids
==
null
||
""
.
equals
(
ids
.
trim
()))
{
if
(
ids
==
null
||
""
.
equals
(
ids
.
trim
()))
{
result
.
error500
(
"参数不识别!"
);
result
.
error500
(
"参数不识别!"
);
}
else
{
}
else
{
if
(
ALL_ClEAR
.
equals
(
ids
))
{
if
(
ALL_ClEAR
.
equals
(
ids
))
{
this
.
sysLogService
.
removeAll
();
this
.
sysLogService
.
removeAll
();
result
.
success
(
"清除成功!"
);
result
.
success
(
"清除成功!"
);
}
}
...
...
jeecg-module-system/src/main/resources/application-dev.yml
View file @
3ee2cf8a
...
@@ -167,7 +167,7 @@ mybatis-plus:
...
@@ -167,7 +167,7 @@ mybatis-plus:
table-underline
:
true
table-underline
:
true
configuration
:
configuration
:
# 这个配置会将执行的sql打印出来,在开发或测试的时候可以用
# 这个配置会将执行的sql打印出来,在开发或测试的时候可以用
log-impl
:
org.apache.ibatis.logging.stdout.StdOutImpl
#
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
# 返回类型为Map,显示null对应的字段
# 返回类型为Map,显示null对应的字段
call-setters-on-nulls
:
true
call-setters-on-nulls
:
true
# 驼峰
# 驼峰
...
...
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