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
2b42c19a
Commit
2b42c19a
authored
Oct 25, 2023
by
hkl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:1.修改bug
parent
867f3bf0
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
71 additions
and
16 deletions
+71
-16
pom.xml
jeecg-module-system/pom.xml
+4
-4
SignBoardManagementController.java
...deviceAsset/controller/SignBoardManagementController.java
+13
-1
TrackBedManagementController.java
.../deviceAsset/controller/TrackBedManagementController.java
+54
-11
人工检查导入模板.xlsx
...e-system/src/main/resources/templates/excel/人工检查导入模板.xlsx
+0
-0
人工静态检查导入模板.xlsx
...system/src/main/resources/templates/excel/人工静态检查导入模板.xlsx
+0
-0
No files found.
jeecg-module-system/pom.xml
View file @
2b42c19a
...
@@ -74,10 +74,6 @@
...
@@ -74,10 +74,6 @@
<properties>
<properties>
<package.environment>
hkl
</package.environment>
<package.environment>
hkl
</package.environment>
</properties>
</properties>
<!-- 是否默认 true表示默认-->
<activation>
<activeByDefault>
true
</activeByDefault>
</activation>
</profile>
</profile>
<!-- 测试环境 -->
<!-- 测试环境 -->
...
@@ -94,6 +90,10 @@
...
@@ -94,6 +90,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/deviceAsset/controller/SignBoardManagementController.java
View file @
2b42c19a
...
@@ -14,6 +14,7 @@ import org.jeecg.modules.deviceAsset.dto.FastenerManagementDTO;
...
@@ -14,6 +14,7 @@ import org.jeecg.modules.deviceAsset.dto.FastenerManagementDTO;
import
org.jeecg.modules.deviceAsset.dto.SignBoardManagementDTO
;
import
org.jeecg.modules.deviceAsset.dto.SignBoardManagementDTO
;
import
org.jeecg.modules.deviceAsset.entity.FastenerManagement
;
import
org.jeecg.modules.deviceAsset.entity.FastenerManagement
;
import
org.jeecg.modules.deviceAsset.entity.SignBoardManagement
;
import
org.jeecg.modules.deviceAsset.entity.SignBoardManagement
;
import
org.jeecg.modules.deviceAsset.entity.TrackBedManagement
;
import
org.jeecg.modules.deviceAsset.service.ISignBoardManagementService
;
import
org.jeecg.modules.deviceAsset.service.ISignBoardManagementService
;
import
org.jeecg.modules.deviceAsset.vo.FastenerManagementVO
;
import
org.jeecg.modules.deviceAsset.vo.FastenerManagementVO
;
import
org.jeecg.modules.deviceAsset.vo.SignBoardManagementVO
;
import
org.jeecg.modules.deviceAsset.vo.SignBoardManagementVO
;
...
@@ -28,6 +29,7 @@ import org.jeecg.common.system.base.controller.JeecgController;
...
@@ -28,6 +29,7 @@ import org.jeecg.common.system.base.controller.JeecgController;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
java.util.List
;
/**
/**
* <p>
* <p>
...
@@ -71,7 +73,17 @@ public class SignBoardManagementController extends JeecgController<SignBoardMana
...
@@ -71,7 +73,17 @@ public class SignBoardManagementController extends JeecgController<SignBoardMana
lightRailEndMileage
=
lightRail
.
getDownLineMileage
();
lightRailEndMileage
=
lightRail
.
getDownLineMileage
();
}
}
if
(
signBoardManagement
.
getMileage
().
compareTo
(
lightRailEndMileage
)
>
0
)
{
if
(
signBoardManagement
.
getMileage
().
compareTo
(
lightRailEndMileage
)
>
0
)
{
throw
JeecgBootException
.
error
(
"新增道床结束里程超过:"
+
lightRail
.
getRailLineName
()
+
"的"
+
lineAlias
.
getLineAliasName
()
+
"的结束里程【"
+
lightRailEndMileage
+
"】"
);
throw
JeecgBootException
.
error
(
"轨行区标识牌超过:"
+
lightRail
.
getRailLineName
()
+
"的"
+
lineAlias
.
getLineAliasName
()
+
"的结束里程【"
+
lightRailEndMileage
+
"】"
);
}
Long
count
=
this
.
service
.
lambdaQuery
()
.
eq
(
SignBoardManagement:
:
getSectionId
,
signBoardManagement
.
getSectionId
())
.
eq
(
SignBoardManagement:
:
getLineAliasId
,
signBoardManagement
.
getLineAliasId
())
.
eq
(
SignBoardManagement:
:
getMileage
,
signBoardManagement
.
getMileage
())
.
ne
(
ObjectUtil
.
isNotEmpty
(
signBoardManagement
.
getId
()),
SignBoardManagement:
:
getId
,
signBoardManagement
.
getId
())
.
count
();
if
(
count
>
0
)
{
throw
JeecgBootException
.
error
(
"轨行区标识牌已存在,和轨行区标识牌【编号:"
+
signBoardManagement
.
getSignBoardCode
()
+
"】里程冲突"
);
}
}
...
...
jeecg-module-system/src/main/java/org/jeecg/modules/deviceAsset/controller/TrackBedManagementController.java
View file @
2b42c19a
...
@@ -2,11 +2,9 @@ package org.jeecg.modules.deviceAsset.controller;
...
@@ -2,11 +2,9 @@ package org.jeecg.modules.deviceAsset.controller;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
io.swagger.annotations.ApiParam
;
import
org.jeecg.common.api.vo.Result
;
import
org.jeecg.common.api.vo.Result
;
...
@@ -28,7 +26,6 @@ import javax.annotation.Resource;
...
@@ -28,7 +26,6 @@ import javax.annotation.Resource;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* <p>
* <p>
...
@@ -64,7 +61,27 @@ public class TrackBedManagementController extends JeecgController<TrackBedManage
...
@@ -64,7 +61,27 @@ public class TrackBedManagementController extends JeecgController<TrackBedManage
@ApiOperation
(
value
=
"资产管理-道床管理-编辑"
,
notes
=
"资产管理-道床管理-编辑"
)
@ApiOperation
(
value
=
"资产管理-道床管理-编辑"
,
notes
=
"资产管理-道床管理-编辑"
)
@PostMapping
(
value
=
"/edit"
)
@PostMapping
(
value
=
"/edit"
)
public
Result
<
String
>
edit
(
@RequestBody
TrackBedManagement
trackBedManagement
)
{
public
Result
<
String
>
edit
(
@RequestBody
TrackBedManagement
trackBedManagement
)
{
// 1.查询当前车站的上下行里程&获取所有设备
// 1.验证参数
verifyEditParams
(
trackBedManagement
);
// 2.执行保存
if
(
ObjectUtil
.
isEmpty
(
trackBedManagement
.
getId
()))
{
trackBedManagement
.
setId
(
UUIDGenerator
.
generate
());
this
.
service
.
save
(
trackBedManagement
);
}
else
{
this
.
service
.
updateById
(
trackBedManagement
);
}
return
Result
.
OK
(
"编辑成功!"
);
}
/**
* 验证参数
*
* @param trackBedManagement
*/
private
void
verifyEditParams
(
TrackBedManagement
trackBedManagement
)
{
LightRail
lightRail
=
lightRailService
.
getById
(
trackBedManagement
.
getLightRailId
());
LightRail
lightRail
=
lightRailService
.
getById
(
trackBedManagement
.
getLightRailId
());
LineAlias
lineAlias
=
lineAliasService
.
getById
(
trackBedManagement
.
getLineAliasId
());
LineAlias
lineAlias
=
lineAliasService
.
getById
(
trackBedManagement
.
getLineAliasId
());
BigDecimal
lightRailEndMileage
=
lightRail
.
getUpLineMileage
();
BigDecimal
lightRailEndMileage
=
lightRail
.
getUpLineMileage
();
...
@@ -75,15 +92,41 @@ public class TrackBedManagementController extends JeecgController<TrackBedManage
...
@@ -75,15 +92,41 @@ public class TrackBedManagementController extends JeecgController<TrackBedManage
throw
JeecgBootException
.
error
(
"新增道床结束里程超过:"
+
lightRail
.
getRailLineName
()
+
"的"
+
lineAlias
.
getLineAliasName
()
+
"的结束里程【"
+
lightRailEndMileage
+
"】"
);
throw
JeecgBootException
.
error
(
"新增道床结束里程超过:"
+
lightRail
.
getRailLineName
()
+
"的"
+
lineAlias
.
getLineAliasName
()
+
"的结束里程【"
+
lightRailEndMileage
+
"】"
);
}
}
List
<
TrackBedManagement
>
listRecord
=
this
.
service
.
lambdaQuery
()
.
eq
(
TrackBedManagement:
:
getSectionId
,
trackBedManagement
.
getSectionId
())
.
eq
(
TrackBedManagement:
:
getLineAliasId
,
trackBedManagement
.
getLineAliasId
())
.
orderByDesc
(
TrackBedManagement:
:
getStartingMileage
)
.
list
();
if
(
ObjectUtil
.
isEmpty
(
trackBedManagement
.
getId
()))
{
for
(
TrackBedManagement
record
:
listRecord
)
{
trackBedManagement
.
setId
(
UUIDGenerator
.
generate
());
this
.
service
.
save
(
trackBedManagement
);
}
else
{
this
.
service
.
updateById
(
trackBedManagement
);
}
return
Result
.
OK
(
"编辑成功!"
);
// 如果是更新,排除自己
if
(
record
.
getId
().
equals
(
trackBedManagement
.
getId
()))
{
continue
;
}
BigDecimal
currentStartMileage
=
record
.
getStartingMileage
();
BigDecimal
currentEndMileage
=
record
.
getEndMileage
();
BigDecimal
startMileage
=
trackBedManagement
.
getStartingMileage
();
BigDecimal
endMileage
=
trackBedManagement
.
getEndMileage
();
String
deviceCode
=
trackBedManagement
.
getTrackBedCode
();
// 判断区间是否重叠
if
(
currentStartMileage
.
compareTo
(
startMileage
)
==
0
&&
currentEndMileage
.
compareTo
(
endMileage
)
==
0
)
{
throw
JeecgBootException
.
error
(
"和【道床编号:"
+
deviceCode
+
"】里程冲突"
);
}
// 判断开始里程是否是否冲突
if
(
currentStartMileage
.
compareTo
(
startMileage
)
<
0
&&
currentEndMileage
.
compareTo
(
startMileage
)
>
0
)
{
throw
JeecgBootException
.
error
(
"和【道床编号:"
+
deviceCode
+
"】里程冲突"
);
}
// 判断结束里程是否是否冲突
if
(
currentStartMileage
.
compareTo
(
endMileage
)
<
0
&&
currentEndMileage
.
compareTo
(
endMileage
)
>
0
)
{
throw
JeecgBootException
.
error
(
"和【道床编号:"
+
deviceCode
+
"】里程冲突"
);
}
}
}
}
/**
/**
...
...
jeecg-module-system/src/main/resources/templates/excel/人工检查导入模板.xlsx
deleted
100644 → 0
View file @
867f3bf0
File deleted
jeecg-module-system/src/main/resources/templates/excel/人工静态检查导入模板.xlsx
0 → 100644
View file @
2b42c19a
File added
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