Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
traffic-signal-platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
signal
traffic-signal-platform
Commits
1dcac903
Commit
1dcac903
authored
Dec 29, 2022
by
duanruiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化新增路口主键冲突校验
优化路口管理中参数功能 查询新的设备状态表
parent
356545a3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
9 deletions
+17
-9
AllDeviceStatusMapper.java
...main/java/net/wanji/web/mapper/AllDeviceStatusMapper.java
+1
-1
TBaseCrossInfoService.java
...ain/java/net/wanji/web/service/TBaseCrossInfoService.java
+9
-1
AllDeviceStatusMapper.xml
...rvice/src/main/resources/mapper/AllDeviceStatusMapper.xml
+1
-1
TBaseCrossInfoMapper.xml
...ervice/src/main/resources/mapper/TBaseCrossInfoMapper.xml
+6
-6
No files found.
signal-control-service/src/main/java/net/wanji/web/mapper/AllDeviceStatusMapper.java
View file @
1dcac903
...
...
@@ -12,7 +12,7 @@ import java.util.List;
* @date 2022/10/27 14:25
*/
@Repository
@DS
(
"webService"
)
//@DS("webService") 查询新数据库20221228
public
interface
AllDeviceStatusMapper
{
List
<
AllDeviceStatusPO
>
selectAllDeviceStatus
(
String
adCode
);
}
signal-control-service/src/main/java/net/wanji/web/service/TBaseCrossInfoService.java
View file @
1dcac903
...
...
@@ -16,6 +16,7 @@ import net.wanji.web.po.PageResultPO;
import
net.wanji.web.util.IdWorker
;
import
net.wanji.web.vo.BaseCrossInfoVO
;
import
net.wanji.web.vo.CrossInfoVO
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -23,6 +24,7 @@ import org.springframework.stereotype.Service;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Objects
;
import
java.util.stream.Collectors
;
/**
...
...
@@ -67,6 +69,12 @@ public class TBaseCrossInfoService extends ServiceImpl<TBaseCrossInfoMapper, TBa
* @return {@link Result}<{@link String}>
*/
public
Result
<
String
>
addOne
(
BaseCrossInfoVO
crossInfoPO
)
{
if
(
StringUtils
.
isNoneBlank
(
crossInfoPO
.
getId
()))
{
TBaseCrossInfo
tBaseCrossInfo
=
crossInfoMapper
.
selectByPrimaryKey
(
crossInfoPO
.
getId
());
if
(
Objects
.
nonNull
(
tBaseCrossInfo
))
{
return
Result
.
error
(
"路口编号重复,请重新设置!"
);
}
}
TBaseCrossInfo
record
=
getBaseCrossInfo
(
crossInfoPO
);
record
.
setGmtCreate
(
new
Date
());
int
insert
=
crossInfoMapper
.
insertSelective
(
record
);
...
...
@@ -168,7 +176,7 @@ public class TBaseCrossInfoService extends ServiceImpl<TBaseCrossInfoMapper, TBa
}
}
}
infos
=
infos
.
stream
().
filter
(
po
->
po
.
getParentCode
()
==
null
||
po
.
getParentCode
().
equals
(
100000
)
).
collect
(
Collectors
.
toList
());
infos
=
infos
.
stream
().
filter
(
po
->
po
.
getParentCode
()
!=
null
).
collect
(
Collectors
.
toList
());
return
Result
.
success
(
infos
);
}
}
signal-control-service/src/main/resources/mapper/AllDeviceStatusMapper.xml
View file @
1dcac903
...
...
@@ -11,7 +11,7 @@
<select
id=
"selectAllDeviceStatus"
resultMap=
"BaseResultMap"
>
select type, status, count(*) as statusCount
from t_
base_device_info
from t_
device_status_log
group by type, status
order by type
</select>
...
...
signal-control-service/src/main/resources/mapper/TBaseCrossInfoMapper.xml
View file @
1dcac903
...
...
@@ -197,13 +197,13 @@
<if
test=
"areaName != null and areaName != ''"
>
and a.name = #{areaName}
</if>
<if
test=
"isSignal != null
and isSignal != ''
"
>
<if
test=
"isSignal != null"
>
and c.is_signal = #{isSignal}
</if>
<if
test=
"isStart != null
and isStart != ''
"
>
<if
test=
"isStart != null"
>
and c.is_start = #{isStart}
</if>
<if
test=
"isSend != null
and isSend != ''
"
>
<if
test=
"isSend != null"
>
and c.is_send = #{isSend}
</if>
</where>
...
...
@@ -225,13 +225,13 @@
<if
test=
"areaName != null and areaName != ''"
>
and a.name = #{areaName}
</if>
<if
test=
"isSignal != null
and isSignal != ''
"
>
<if
test=
"isSignal != null"
>
and c.is_signal = #{isSignal}
</if>
<if
test=
"isStart != null
and isStart != ''
"
>
<if
test=
"isStart != null"
>
and c.is_start = #{isStart}
</if>
<if
test=
"isSend != null
and isSend != ''
"
>
<if
test=
"isSend != null"
>
and c.is_send = #{isSend}
</if>
</where>
...
...
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