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
a1879b60
Commit
a1879b60
authored
Feb 10, 2023
by
hanbing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
方案下发-信号机方案同步
parent
3a722535
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
30 additions
and
12 deletions
+30
-12
CrossLightsPO.java
.../src/main/java/net/wanji/web/po/scheme/CrossLightsPO.java
+1
-1
PlanSendServiceImpl.java
.../java/net/wanji/web/service/impl/PlanSendServiceImpl.java
+10
-8
CrossPhaseLightsMapper.java
...ain/java/net/wanji/utc/mapper/CrossPhaseLightsMapper.java
+5
-0
HkSchemePhaseLightsServiceImpl.java
...rvice/staticinfo/impl/HkSchemePhaseLightsServiceImpl.java
+3
-3
StaticInfoServiceImpl.java
...ji/utc/service/staticinfo/impl/StaticInfoServiceImpl.java
+4
-0
CrossPhaseLightsMapper.xml
...vice/src/main/resources/mapper/CrossPhaseLightsMapper.xml
+7
-0
No files found.
signal-control-service/src/main/java/net/wanji/web/po/scheme/CrossLightsPO.java
View file @
a1879b60
...
@@ -25,7 +25,7 @@ public class CrossLightsPO {
...
@@ -25,7 +25,7 @@ public class CrossLightsPO {
private
Integer
dir
;
private
Integer
dir
;
/** 灯组序号 */
/** 灯组序号 */
@ApiModelProperty
(
name
=
"灯组序号"
,
notes
=
""
)
@ApiModelProperty
(
name
=
"灯组序号"
,
notes
=
""
)
private
Integer
sort
;
private
Integer
sort
=
0
;
/** 路口ID */
/** 路口ID */
@ApiModelProperty
(
name
=
"路口ID"
,
notes
=
""
)
@ApiModelProperty
(
name
=
"路口ID"
,
notes
=
""
)
private
String
crossId
;
private
String
crossId
;
...
...
signal-control-service/src/main/java/net/wanji/web/service/impl/PlanSendServiceImpl.java
View file @
a1879b60
...
@@ -275,6 +275,7 @@ public class PlanSendServiceImpl implements PlanSendService {
...
@@ -275,6 +275,7 @@ public class PlanSendServiceImpl implements PlanSendService {
}
}
}
}
List
<
CrossPhaseLightsPO
>
crossPhaseLightsPOList
=
schemePhaseLightsVO
.
getCrossPhaseLightsPOList
();
List
<
CrossPhaseLightsPO
>
crossPhaseLightsPOList
=
schemePhaseLightsVO
.
getCrossPhaseLightsPOList
();
if
(
crossPhaseLightsPOList
!=
null
)
{
for
(
CrossPhaseLightsPO
crossPhaseLightsPO
:
crossPhaseLightsPOList
)
{
for
(
CrossPhaseLightsPO
crossPhaseLightsPO
:
crossPhaseLightsPOList
)
{
Integer
lightsId
=
crossPhaseLightsPO
.
getLightsId
();
Integer
lightsId
=
crossPhaseLightsPO
.
getLightsId
();
Integer
phaseId
=
crossPhaseLightsPO
.
getPhaseId
();
Integer
phaseId
=
crossPhaseLightsPO
.
getPhaseId
();
...
@@ -286,6 +287,7 @@ public class PlanSendServiceImpl implements PlanSendService {
...
@@ -286,6 +287,7 @@ public class PlanSendServiceImpl implements PlanSendService {
}
}
}
}
}
}
}
return
jsonViewObject
.
success
();
return
jsonViewObject
.
success
();
}
}
...
...
signal-utc-service/src/main/java/net/wanji/utc/mapper/CrossPhaseLightsMapper.java
View file @
a1879b60
...
@@ -4,6 +4,7 @@ import net.wanji.utc.po.CrossPhaseLightsPO;
...
@@ -4,6 +4,7 @@ import net.wanji.utc.po.CrossPhaseLightsPO;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Set
;
/**
/**
* @author Kent HAN
* @author Kent HAN
...
@@ -13,5 +14,9 @@ public interface CrossPhaseLightsMapper {
...
@@ -13,5 +14,9 @@ public interface CrossPhaseLightsMapper {
void
deleteByCrossId
(
@Param
(
"crossId"
)
String
crossId
);
void
deleteByCrossId
(
@Param
(
"crossId"
)
String
crossId
);
void
insertBatch
(
@Param
(
"entities"
)
Set
<
CrossPhaseLightsPO
>
crossPhaseLightsPOSet
);
void
insertBatch
(
@Param
(
"entities"
)
List
<
CrossPhaseLightsPO
>
crossPhaseLightsPOList
);
void
insertBatch
(
@Param
(
"entities"
)
List
<
CrossPhaseLightsPO
>
crossPhaseLightsPOList
);
List
<
CrossPhaseLightsPO
>
selectByCrossId
(
String
crossId
);
}
}
signal-utc-service/src/main/java/net/wanji/utc/service/staticinfo/impl/HkSchemePhaseLightsServiceImpl.java
View file @
a1879b60
...
@@ -62,7 +62,7 @@ public class HkSchemePhaseLightsServiceImpl implements HkSchemePhaseLightsServic
...
@@ -62,7 +62,7 @@ public class HkSchemePhaseLightsServiceImpl implements HkSchemePhaseLightsServic
private
void
handleLightsData
(
String
crossId
,
String
crossCode
,
Map
<
Integer
,
PhaseCache
>
laneNoMap
)
private
void
handleLightsData
(
String
crossId
,
String
crossCode
,
Map
<
Integer
,
PhaseCache
>
laneNoMap
)
throws
Exception
{
throws
Exception
{
Map
<
String
,
String
>
path
=
PathUtil
.
getPathMapByApiCode
(
"getCrossInfo"
);
Map
<
String
,
String
>
path
=
PathUtil
.
getPathMapByApiCode
(
"getCrossInfo"
);
List
<
CrossPhaseLightsPO
>
crossPhaseLightsPOList
=
new
ArrayLis
t
<>();
Set
<
CrossPhaseLightsPO
>
crossPhaseLightsPOSet
=
new
HashSe
t
<>();
JSONObject
requestContent
=
new
JSONObject
();
JSONObject
requestContent
=
new
JSONObject
();
// 海康固定入参字段名
// 海康固定入参字段名
requestContent
.
put
(
"pageNo"
,
1
);
requestContent
.
put
(
"pageNo"
,
1
);
...
@@ -118,7 +118,7 @@ public class HkSchemePhaseLightsServiceImpl implements HkSchemePhaseLightsServic
...
@@ -118,7 +118,7 @@ public class HkSchemePhaseLightsServiceImpl implements HkSchemePhaseLightsServic
crossPhaseLightsPO
.
setLightsId
(
crossLightsPOId
);
crossPhaseLightsPO
.
setLightsId
(
crossLightsPOId
);
crossPhaseLightsPO
.
setPhaseId
(
id
);
crossPhaseLightsPO
.
setPhaseId
(
id
);
crossPhaseLightsPO
.
setCrossId
(
crossId
);
crossPhaseLightsPO
.
setCrossId
(
crossId
);
crossPhaseLightsPO
Lis
t
.
add
(
crossPhaseLightsPO
);
crossPhaseLightsPO
Se
t
.
add
(
crossPhaseLightsPO
);
}
}
}
}
}
}
...
@@ -127,7 +127,7 @@ public class HkSchemePhaseLightsServiceImpl implements HkSchemePhaseLightsServic
...
@@ -127,7 +127,7 @@ public class HkSchemePhaseLightsServiceImpl implements HkSchemePhaseLightsServic
}
}
// 更新相位-灯组关系
// 更新相位-灯组关系
crossPhaseLightsMapper
.
deleteByCrossId
(
crossId
);
crossPhaseLightsMapper
.
deleteByCrossId
(
crossId
);
crossPhaseLightsMapper
.
insertBatch
(
crossPhaseLightsPO
Lis
t
);
crossPhaseLightsMapper
.
insertBatch
(
crossPhaseLightsPO
Se
t
);
}
}
private
void
handlePhaseData
(
String
crossCode
,
Map
<
Integer
,
PhaseCache
>
phaseNoMap
,
private
void
handlePhaseData
(
String
crossCode
,
Map
<
Integer
,
PhaseCache
>
phaseNoMap
,
...
...
signal-utc-service/src/main/java/net/wanji/utc/service/staticinfo/impl/StaticInfoServiceImpl.java
View file @
a1879b60
...
@@ -36,6 +36,7 @@ public class StaticInfoServiceImpl implements StaticInfoService {
...
@@ -36,6 +36,7 @@ public class StaticInfoServiceImpl implements StaticInfoService {
private
final
CrossSchemeMapper
crossSchemeMapper
;
private
final
CrossSchemeMapper
crossSchemeMapper
;
private
final
CrossPhaseMapper
crossPhaseMapper
;
private
final
CrossPhaseMapper
crossPhaseMapper
;
private
final
CrossLightsMapper
crossLightsMapper
;
private
final
CrossLightsMapper
crossLightsMapper
;
private
final
CrossPhaseLightsMapper
crossPhaseLightsMapper
;
private
final
CrossPlanMapper
crossPlanMapper
;
private
final
CrossPlanMapper
crossPlanMapper
;
private
final
CrossSectionMapper
crossSectionMapper
;
private
final
CrossSectionMapper
crossSectionMapper
;
private
final
CrossSchedulesMapper
crossSchedulesMapper
;
private
final
CrossSchedulesMapper
crossSchedulesMapper
;
...
@@ -143,11 +144,14 @@ public class StaticInfoServiceImpl implements StaticInfoService {
...
@@ -143,11 +144,14 @@ public class StaticInfoServiceImpl implements StaticInfoService {
List
<
CrossSchemePO
>
crossSchemePOList
=
crossSchemeMapper
.
selectByCrossId
(
crossId
);
List
<
CrossSchemePO
>
crossSchemePOList
=
crossSchemeMapper
.
selectByCrossId
(
crossId
);
List
<
CrossPhasePO
>
crossPhasePOList
=
crossPhaseMapper
.
selectByCrossId
(
crossId
);
List
<
CrossPhasePO
>
crossPhasePOList
=
crossPhaseMapper
.
selectByCrossId
(
crossId
);
List
<
CrossLightsPO
>
crossLightsPOList
=
crossLightsMapper
.
selectByCrossId
(
crossId
);
List
<
CrossLightsPO
>
crossLightsPOList
=
crossLightsMapper
.
selectByCrossId
(
crossId
);
List
<
CrossPhaseLightsPO
>
crossPhaseLightsPOList
=
crossPhaseLightsMapper
.
selectByCrossId
(
crossId
);
SchemePhaseLightsVO
schemePhaseLightsVO
=
new
SchemePhaseLightsVO
();
SchemePhaseLightsVO
schemePhaseLightsVO
=
new
SchemePhaseLightsVO
();
schemePhaseLightsVO
.
setCrossSchemeList
(
crossSchemePOList
);
schemePhaseLightsVO
.
setCrossSchemeList
(
crossSchemePOList
);
schemePhaseLightsVO
.
setCrossPhaseList
(
crossPhasePOList
);
schemePhaseLightsVO
.
setCrossPhaseList
(
crossPhasePOList
);
schemePhaseLightsVO
.
setCrossLightsList
(
crossLightsPOList
);
schemePhaseLightsVO
.
setCrossLightsList
(
crossLightsPOList
);
schemePhaseLightsVO
.
setCrossPhaseLightsPOList
(
crossPhaseLightsPOList
);
return
schemePhaseLightsVO
;
return
schemePhaseLightsVO
;
}
}
...
...
signal-utc-service/src/main/resources/mapper/CrossPhaseLightsMapper.xml
View file @
a1879b60
...
@@ -24,5 +24,12 @@
...
@@ -24,5 +24,12 @@
where cross_id = #{crossId}
where cross_id = #{crossId}
</delete>
</delete>
<select
id=
"selectByCrossId"
resultType=
"net.wanji.utc.po.CrossPhaseLightsPO"
>
select
id,lights_id,phase_id,cross_id,gmt_create,gmt_modified
from t_cross_phase_lights
where crossId = #{crossId}
</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