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
5e058812
Commit
5e058812
authored
Nov 16, 2024
by
duanruiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[update] utc静态数据保存优化
parent
5b13fa8f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
3 deletions
+13
-3
StaticInfoServiceImpl.java
...wanji/utc/hisense/service/impl/StaticInfoServiceImpl.java
+2
-0
WanJiCommonStaticInfoServiceImpl.java
...ice/staticinfo/impl/WanJiCommonStaticInfoServiceImpl.java
+8
-3
CrossPlanPO.java
...c/main/java/net/wanji/databus/dao/entity/CrossPlanPO.java
+3
-0
No files found.
signal-utc-hisense-service/src/main/java/net/wanji/utc/hisense/service/impl/StaticInfoServiceImpl.java
View file @
5e058812
...
@@ -399,6 +399,8 @@ public class StaticInfoServiceImpl implements StaticInfoService {
...
@@ -399,6 +399,8 @@ public class StaticInfoServiceImpl implements StaticInfoService {
crossLightsPO
.
setType
(
0
);
crossLightsPO
.
setType
(
0
);
if
(
wjPerson
!=
0
)
{
if
(
wjPerson
!=
0
)
{
crossLightsPO
.
setType
(
3
);
crossLightsPO
.
setType
(
3
);
}
else
if
(
wjPerson
==
0
&&
wjLightsDir
>
0
)
{
crossLightsPO
.
setType
(
1
);
}
}
crossLightsPO
.
setDir
(
wjLightsDir
);
crossLightsPO
.
setDir
(
wjLightsDir
);
crossLightsPO
.
setTurn
(
wjLightsTurn
);
crossLightsPO
.
setTurn
(
wjLightsTurn
);
...
...
signal-utc-service/src/main/java/net/wanji/utc/service/staticinfo/impl/WanJiCommonStaticInfoServiceImpl.java
View file @
5e058812
...
@@ -25,6 +25,7 @@ import org.springframework.stereotype.Service;
...
@@ -25,6 +25,7 @@ import org.springframework.stereotype.Service;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.CollectionUtils
;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Objects
;
import
java.util.Objects
;
...
@@ -135,8 +136,10 @@ public class WanJiCommonStaticInfoServiceImpl implements WanJiCommonStaticInfoSe
...
@@ -135,8 +136,10 @@ public class WanJiCommonStaticInfoServiceImpl implements WanJiCommonStaticInfoSe
Integer
id
=
crossPlanMapper
.
selectIdByNo
(
crossSectionPO
.
getCrossId
(),
crossSectionPO
.
getPlanId
());
Integer
id
=
crossPlanMapper
.
selectIdByNo
(
crossSectionPO
.
getCrossId
(),
crossSectionPO
.
getPlanId
());
crossSectionPO
.
setPlanId
(
id
);
crossSectionPO
.
setPlanId
(
id
);
CrossSchemePO
baseCrossSchemePO
=
crossSchemeMapper
.
selectByCrossIdAndSchemeNo
(
crossId
,
crossSectionPO
.
getSchemeId
());
CrossSchemePO
baseCrossSchemePO
=
crossSchemeMapper
.
selectByCrossIdAndSchemeNo
(
crossId
,
crossSectionPO
.
getSchemeId
());
crossSectionPO
.
setSchemeId
(
baseCrossSchemePO
.
getId
());
if
(
Objects
.
nonNull
(
baseCrossSchemePO
))
{
crossSectionMapper
.
insertOne
(
crossSectionPO
);
crossSectionPO
.
setSchemeId
(
baseCrossSchemePO
.
getId
());
crossSectionMapper
.
insertOne
(
crossSectionPO
);
}
});
});
}
}
}
}
...
@@ -162,8 +165,10 @@ public class WanJiCommonStaticInfoServiceImpl implements WanJiCommonStaticInfoSe
...
@@ -162,8 +165,10 @@ public class WanJiCommonStaticInfoServiceImpl implements WanJiCommonStaticInfoSe
Integer
planId
=
crossSchedulesPO
.
getPlanId
();
Integer
planId
=
crossSchedulesPO
.
getPlanId
();
Integer
id
=
crossPlanMapper
.
selectIdByNo
(
crossId
,
planId
);
Integer
id
=
crossPlanMapper
.
selectIdByNo
(
crossId
,
planId
);
crossSchedulesPO
.
setPlanId
(
id
);
crossSchedulesPO
.
setPlanId
(
id
);
if
(
Objects
.
nonNull
(
id
))
{
crossSchedulesMapper
.
insertBatch
(
Collections
.
singletonList
(
crossSchedulesPO
));
}
}
}
crossSchedulesMapper
.
insertBatch
(
content
);
}
}
}
}
return
Result
.
success
(
content
);
return
Result
.
success
(
content
);
...
...
wj-databus/src/main/java/net/wanji/databus/dao/entity/CrossPlanPO.java
View file @
5e058812
package
net
.
wanji
.
databus
.
dao
.
entity
;
package
net
.
wanji
.
databus
.
dao
.
entity
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -25,8 +26,10 @@ public class CrossPlanPO {
...
@@ -25,8 +26,10 @@ public class CrossPlanPO {
private
String
crossId
;
private
String
crossId
;
/** 创建时间 */
/** 创建时间 */
@ApiModelProperty
(
value
=
"创建时间"
,
notes
=
""
)
@ApiModelProperty
(
value
=
"创建时间"
,
notes
=
""
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
gmtCreate
;
private
Date
gmtCreate
;
/** 修改时间 */
/** 修改时间 */
@ApiModelProperty
(
value
=
"修改时间"
,
notes
=
""
)
@ApiModelProperty
(
value
=
"修改时间"
,
notes
=
""
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
gmtModified
;
private
Date
gmtModified
;
}
}
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