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
f758e2be
Commit
f758e2be
authored
Dec 12, 2024
by
duanruiming
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
5c4e63a8
72354af8
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
2 deletions
+41
-2
WanJiCommonStaticInfoServiceImpl.java
...ice/staticinfo/impl/WanJiCommonStaticInfoServiceImpl.java
+30
-2
CrossLightsMapper.java
.../java/net/wanji/databus/dao/mapper/CrossLightsMapper.java
+2
-0
CrossLightsMapper.xml
wj-databus/src/main/resources/mapper/CrossLightsMapper.xml
+9
-0
No files found.
signal-utc-service/src/main/java/net/wanji/utc/service/staticinfo/impl/WanJiCommonStaticInfoServiceImpl.java
View file @
f758e2be
...
@@ -216,7 +216,6 @@ public class WanJiCommonStaticInfoServiceImpl implements WanJiCommonStaticInfoSe
...
@@ -216,7 +216,6 @@ public class WanJiCommonStaticInfoServiceImpl implements WanJiCommonStaticInfoSe
FeignCommon
utcFeignClientService
=
utcFeignClientCache
.
getUtcFeignClientService
(
manufacturerIdCode
);
FeignCommon
utcFeignClientService
=
utcFeignClientCache
.
getUtcFeignClientService
(
manufacturerIdCode
);
jsonViewObject
=
utcFeignClientService
.
crossSchemeRings
(
crossSchemeRingsDTO
);
jsonViewObject
=
utcFeignClientService
.
crossSchemeRings
(
crossSchemeRingsDTO
);
}
else
{
}
else
{
//TODO
CrossSchemeRings
crossSchemeRings
=
getCrossSchemeRings
(
crossSchemeRingsDTO
);
CrossSchemeRings
crossSchemeRings
=
getCrossSchemeRings
(
crossSchemeRingsDTO
);
if
(
ObjectUtil
.
isNotEmpty
(
crossSchemeRings
))
{
if
(
ObjectUtil
.
isNotEmpty
(
crossSchemeRings
))
{
jsonViewObject
=
JsonViewObject
.
newInstance
().
success
(
crossSchemeRings
);
jsonViewObject
=
JsonViewObject
.
newInstance
().
success
(
crossSchemeRings
);
...
@@ -245,6 +244,15 @@ public class WanJiCommonStaticInfoServiceImpl implements WanJiCommonStaticInfoSe
...
@@ -245,6 +244,15 @@ public class WanJiCommonStaticInfoServiceImpl implements WanJiCommonStaticInfoSe
//通过方案查询相位信息
//通过方案查询相位信息
List
<
CrossPhasePO
>
phasePOList
=
crossPhaseMapper
.
selectByCrossIdAndPlanId
(
crossId
,
String
.
valueOf
(
schemeId
));
List
<
CrossPhasePO
>
phasePOList
=
crossPhaseMapper
.
selectByCrossIdAndPlanId
(
crossId
,
String
.
valueOf
(
schemeId
));
if
(
ObjectUtil
.
isNotEmpty
(
phasePOList
))
{
if
(
ObjectUtil
.
isNotEmpty
(
phasePOList
))
{
List
<
String
>
dirList
=
new
ArrayList
<>();
//更新方向转向信息
for
(
CrossPhasePO
crossPhasePO
:
phasePOList
)
{
List
<
CrossLightsPO
>
crossLightsPOS
=
crossLightsMapper
.
selectByphaseId
(
crossPhasePO
.
getId
());
String
[]
array
=
crossLightsPOS
.
stream
().
map
(
x
->
x
.
getDir
()
+
"_"
+
x
.
getTurn
()).
toArray
(
String
[]
::
new
);
String
join
=
StringUtils
.
join
(
array
,
","
);
dirList
.
add
(
join
);
}
crossSchemeRings
=
new
CrossSchemeRings
();
crossSchemeRings
=
new
CrossSchemeRings
();
List
<
Integer
>
greenList
=
phasePOList
.
stream
().
map
(
x
->
x
.
getGreenTime
()).
collect
(
Collectors
.
toList
());
List
<
Integer
>
greenList
=
phasePOList
.
stream
().
map
(
x
->
x
.
getGreenTime
()).
collect
(
Collectors
.
toList
());
List
<
Integer
>
redList
=
phasePOList
.
stream
().
map
(
x
->
x
.
getRedTime
()).
collect
(
Collectors
.
toList
());
List
<
Integer
>
redList
=
phasePOList
.
stream
().
map
(
x
->
x
.
getRedTime
()).
collect
(
Collectors
.
toList
());
...
@@ -265,7 +273,7 @@ public class WanJiCommonStaticInfoServiceImpl implements WanJiCommonStaticInfoSe
...
@@ -265,7 +273,7 @@ public class WanJiCommonStaticInfoServiceImpl implements WanJiCommonStaticInfoSe
phase
.
setRedTime
(
changeTimeList
(
redList
,
16
));
phase
.
setRedTime
(
changeTimeList
(
redList
,
16
));
phase
.
setYellowTime
(
changeTimeList
(
yellowList
,
16
));
phase
.
setYellowTime
(
changeTimeList
(
yellowList
,
16
));
phase
.
setGreenTime
(
changeTimeList
(
greenList
,
16
));
phase
.
setGreenTime
(
changeTimeList
(
greenList
,
16
));
phase
.
setDirection
(
change
TimeList
(
null
,
16
));
phase
.
setDirection
(
change
Phase
(
dirList
,
16
));
phase
.
setMinGTime
(
changeTimeList
(
minGreenList
,
16
));
phase
.
setMinGTime
(
changeTimeList
(
minGreenList
,
16
));
phase
.
setMaxGTime
(
changeTimeList
(
maxGreenList
,
16
));
phase
.
setMaxGTime
(
changeTimeList
(
maxGreenList
,
16
));
phase
.
setChannelDim
(
changeTimeList
(
null
,
16
));
phase
.
setChannelDim
(
changeTimeList
(
null
,
16
));
...
@@ -305,6 +313,26 @@ public class WanJiCommonStaticInfoServiceImpl implements WanJiCommonStaticInfoSe
...
@@ -305,6 +313,26 @@ public class WanJiCommonStaticInfoServiceImpl implements WanJiCommonStaticInfoSe
return
join
;
return
join
;
}
}
/**
* @return java.lang.String
* @Description 包装数据,将list数据转换为String ,中间用空格隔开
* @Param [list, length]
**/
private
static
String
changePhase
(
List
<
String
>
list
,
int
length
)
{
if
(
ObjectUtil
.
isEmpty
(
list
))
{
list
=
new
ArrayList
<>();
}
int
size
=
list
.
size
();
List
<
String
>
addList
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
length
-
size
;
i
++){
addList
.
add
(
"0"
);
}
list
.
addAll
(
addList
);
String
[]
array
=
list
.
stream
().
map
(
String:
:
valueOf
).
toArray
(
String
[]
::
new
);
String
join
=
StringUtils
.
join
(
array
,
" "
);
return
join
;
}
@Override
@Override
public
JsonViewObject
schemeOptLog
(
CrossSchemeRingsDTO
crossSchemeRingsDTO
)
throws
Exception
{
public
JsonViewObject
schemeOptLog
(
CrossSchemeRingsDTO
crossSchemeRingsDTO
)
throws
Exception
{
LambdaQueryWrapper
<
CrossSchemeStageOptLogPO
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
CrossSchemeStageOptLogPO
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
...
...
wj-databus/src/main/java/net/wanji/databus/dao/mapper/CrossLightsMapper.java
View file @
f758e2be
...
@@ -20,4 +20,6 @@ public interface CrossLightsMapper {
...
@@ -20,4 +20,6 @@ public interface CrossLightsMapper {
void
deleteByCrossId
(
String
crossId
);
void
deleteByCrossId
(
String
crossId
);
CrossLightsPO
selectEntity
(
@Param
(
"entity"
)
CrossLightsPO
entity
);
CrossLightsPO
selectEntity
(
@Param
(
"entity"
)
CrossLightsPO
entity
);
List
<
CrossLightsPO
>
selectByphaseId
(
@Param
(
"phaseId"
)
Integer
phaseId
);
}
}
wj-databus/src/main/resources/mapper/CrossLightsMapper.xml
View file @
f758e2be
...
@@ -43,5 +43,14 @@
...
@@ -43,5 +43,14 @@
where cross_id = #{entity.crossId} and lights_no = #{entity.lightsNo}
where cross_id = #{entity.crossId} and lights_no = #{entity.lightsNo}
</select>
</select>
<select
id=
"selectByphaseId"
resultMap=
"BaseResultMap"
>
SELECT
id,lights_no,name,type,dir,turn,cross_id,in_out_type,gmt_create,gmt_modified
FROM
t_cross_lights
WHERE
id IN ( SELECT lights_id FROM t_cross_phase_lights WHERE phase_id = #{phaseId})
</select>
</mapper>
</mapper>
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