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
e31b2a1c
Commit
e31b2a1c
authored
Nov 24, 2022
by
hanbing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改厂商简称字段为厂商代码
parent
4dc2e534
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
80 additions
and
87 deletions
+80
-87
pom.xml
signal-utc-service/pom.xml
+52
-62
Constants.java
...rc/main/java/net/wanji/utc/common/constant/Constants.java
+0
-17
ApiInfoTask.java
.../src/main/java/net/wanji/utc/common/task/ApiInfoTask.java
+1
-1
ManufacturerInfoMapper.java
...ain/java/net/wanji/utc/mapper/ManufacturerInfoMapper.java
+0
-1
HKControlCommandServiceImpl.java
...t/wanji/utc/service/impl/HKControlCommandServiceImpl.java
+11
-0
HkGetSignalMethodServiceImpl.java
.../wanji/utc/service/impl/HkGetSignalMethodServiceImpl.java
+13
-1
StaticInfoServiceImpl.java
...ji/utc/service/staticinfo/impl/StaticInfoServiceImpl.java
+2
-2
ManufacturerInsertOrUpdateInVO.java
...ji/utc/vo/systemadmin/ManufacturerInsertOrUpdateInVO.java
+0
-2
ManufacturerInfoMapper.xml
...vice/src/main/resources/mapper/ManufacturerInfoMapper.xml
+1
-1
No files found.
signal-utc-service/pom.xml
View file @
e31b2a1c
...
@@ -152,17 +152,7 @@
...
@@ -152,17 +152,7 @@
</dependencies>
</dependencies>
<build>
<build>
<resources>
<plugins>
<resource>
<directory>
lib
</directory>
<targetPath>
BOOT-INF/lib/
</targetPath>
<includes>
<include>
**/*.jar
</include>
</includes>
</resource>
</resources>
<plugins>
<!-- 编译插件 -->
<!-- 编译插件 -->
<plugin>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<groupId>
org.apache.maven.plugins
</groupId>
...
@@ -252,58 +242,58 @@
...
@@ -252,58 +242,58 @@
<!-- mvn clean package -Dmaven.test.skip=true jib:build -DsendCredentialsOverHttp=true -->
<!-- mvn clean package -Dmaven.test.skip=true jib:build -DsendCredentialsOverHttp=true -->
<!-- 使用jib 无需深入学习docker, 无需编写Dockerfile -->
<!-- 使用jib 无需深入学习docker, 无需编写Dockerfile -->
<plugin
>
<!-- <plugin>--
>
<groupId>
com.google.cloud.tools
</groupId
>
<!-- <groupId>com.google.cloud.tools</groupId>--
>
<artifactId>
jib-maven-plugin
</artifactId
>
<!-- <artifactId>jib-maven-plugin</artifactId>--
>
<version>
2.5.2
</version
>
<!-- <version>2.5.2</version>--
>
<configuration
>
<!-- <configuration>--
>
<!--from节点用来设置镜像的基础镜像,相当于Docerkfile中的FROM关键字
-->
<!-- <!–from节点用来设置镜像的基础镜像,相当于Docerkfile中的FROM关键字–>
-->
<from
>
<!-- <from>--
>
<!--使用harbor上的openjdk镜像
-->
<!-- <!–使用harbor上的openjdk镜像–>
-->
<image>
10.100.1.87:5000/xinkong/openjdk:8-alpine3.9
</image
>
<!-- <image>10.100.1.87:5000/xinkong/openjdk:8-alpine3.9</image>--
>
<!--harbor服务器的登录信息
-->
<!-- <!–harbor服务器的登录信息–>
-->
<auth
>
<!-- <auth>--
>
<username>
admin
</username
>
<!-- <username>admin</username>--
>
<password>
Wanji300552
</password
>
<!-- <password>Wanji300552</password>--
>
</auth
>
<!-- </auth>--
>
</from
>
<!-- </from>--
>
<to
>
<!-- <to>--
>
<image>
10.100.1.87:5000/xinkong/${artifactId}:${version}
</image
>
<!-- <image>10.100.1.87:5000/xinkong/${artifactId}:${version}</image>--
>
<auth
>
<!-- <auth>--
>
<username>
admin
</username
>
<!-- <username>admin</username>--
>
<password>
Wanji300552
</password
>
<!-- <password>Wanji300552</password>--
>
</auth
>
<!-- </auth>--
>
</to
>
<!-- </to>--
>
<container
>
<!-- <container>--
>
<!--配置jvm虚拟机参数
-->
<!-- <!–配置jvm虚拟机参数–>
-->
<jvmFlags
>
<!-- <jvmFlags>--
>
<jvmFlag>
-Xms512m
</jvmFlag
>
<!-- <jvmFlag>-Xms512m</jvmFlag>--
>
</jvmFlags
>
<!-- </jvmFlags>--
>
<!--配置使用的时区
-->
<!-- <!–配置使用的时区–>
-->
<environment
>
<!-- <environment>--
>
<TZ>
Asia/Shanghai
</TZ
>
<!-- <TZ>Asia/Shanghai</TZ>--
>
</environment
>
<!-- </environment>--
>
<!--要暴露的端口
-->
<!-- <!–要暴露的端口–>
-->
<ports
>
<!-- <ports>--
>
<port>
32000
</port
>
<!-- <port>32000</port>--
>
</ports
>
<!-- </ports>--
>
<!-- <creationTime>2022-10-14T10:08:59.304+08:00</creationTime>
-->
<!-- <!– <creationTime>2022-10-14T10:08:59.304+08:00</creationTime>–>
-->
<creationTime>
${maven.build.timestamp}
</creationTime
>
<!-- <creationTime>${maven.build.timestamp}</creationTime>--
>
<mainClass>
net.wanji.utc.UtcApplication
</mainClass
>
<!-- <mainClass>net.wanji.utc.UtcApplication</mainClass>--
>
</container
>
<!-- </container>--
>
<!--可以进行HTTP
-->
<!-- <!–可以进行HTTP–>
-->
<allowInsecureRegistries>
true
</allowInsecureRegistries
>
<!-- <allowInsecureRegistries>true</allowInsecureRegistries>--
>
</configuration
>
<!-- </configuration>--
>
<executions
>
<!-- <executions>--
>
<execution
>
<!-- <execution>--
>
<phase>
package
</phase
>
<!-- <phase>package</phase>--
>
<goals
>
<!-- <goals>--
>
<goal>
build
</goal
>
<!-- <goal>build</goal>--
>
</goals
>
<!-- </goals>--
>
</execution
>
<!-- </execution>--
>
</executions
>
<!-- </executions>--
>
</plugin
>
<!-- </plugin>--
>
</plugins>
</plugins>
</build>
</build>
...
...
signal-utc-service/src/main/java/net/wanji/utc/common/constant/Constants.java
View file @
e31b2a1c
...
@@ -122,23 +122,6 @@ public class Constants {
...
@@ -122,23 +122,6 @@ public class Constants {
Constants
.
telesemeLaneRealMap
=
telesemeLaneRealMap
;
Constants
.
telesemeLaneRealMap
=
telesemeLaneRealMap
;
}
}
private
static
String
artemisPath
;
@Value
(
"${signal.manufacturer.hk.artemisPath}"
)
public
static
void
setArtemisPath
(
String
artemisPath
)
{
Constants
.
artemisPath
=
artemisPath
;
}
/**
* 根据code获取三方 url
*/
public
static
Map
<
String
,
String
>
getPathMapByApiCode
(
String
apiCode
)
{
Map
<
String
,
String
>
res
=
new
HashMap
<>();
HttpRequest
httpRequest
=
new
HttpRequest
(
BasicEnum
.
ManufacturerEnum
.
HK
.
getAbbr
(),
apiCode
);
res
.
put
(
"http://"
,
artemisPath
+
httpRequest
.
getUrl
());
return
res
;
}
public
static
ConcurrentHashMap
<
String
,
List
<
CrossLanesVo
>>
getTelesemeLaneRealMap
()
{
public
static
ConcurrentHashMap
<
String
,
List
<
CrossLanesVo
>>
getTelesemeLaneRealMap
()
{
return
telesemeLaneRealMap
;
return
telesemeLaneRealMap
;
}
}
...
...
signal-utc-service/src/main/java/net/wanji/utc/common/task/ApiInfoTask.java
View file @
e31b2a1c
...
@@ -34,7 +34,7 @@ public class ApiInfoTask {
...
@@ -34,7 +34,7 @@ public class ApiInfoTask {
for
(
ManufacturerApiInfoPO
infoPO
:
manufacturerApiInfoPOList
)
{
for
(
ManufacturerApiInfoPO
infoPO
:
manufacturerApiInfoPOList
)
{
Integer
manufacturerId
=
infoPO
.
getManufacturerId
();
Integer
manufacturerId
=
infoPO
.
getManufacturerId
();
ManufacturerInfoPO
manufacturerInfoPO
=
manufacturerInfoMapper
.
selectById
(
manufacturerId
);
ManufacturerInfoPO
manufacturerInfoPO
=
manufacturerInfoMapper
.
selectById
(
manufacturerId
);
String
abbr
=
manufacturerInfoPO
.
get
NickNam
e
();
String
abbr
=
manufacturerInfoPO
.
get
Cod
e
();
String
s
=
abbr
+
Constants
.
SEPARATOR_UNDER_LINE
+
infoPO
.
getCode
();
String
s
=
abbr
+
Constants
.
SEPARATOR_UNDER_LINE
+
infoPO
.
getCode
();
Constants
.
putManufacturerUrlMap
(
s
,
infoPO
);
Constants
.
putManufacturerUrlMap
(
s
,
infoPO
);
}
}
...
...
signal-utc-service/src/main/java/net/wanji/utc/mapper/ManufacturerInfoMapper.java
View file @
e31b2a1c
...
@@ -3,7 +3,6 @@ package net.wanji.utc.mapper;
...
@@ -3,7 +3,6 @@ package net.wanji.utc.mapper;
import
net.wanji.utc.po.ManufacturerInfoPO
;
import
net.wanji.utc.po.ManufacturerInfoPO
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.List
;
/**
/**
...
...
signal-utc-service/src/main/java/net/wanji/utc/service/impl/HKControlCommandServiceImpl.java
View file @
e31b2a1c
...
@@ -8,6 +8,7 @@ import com.hikvision.artemis.sdk.config.ArtemisConfig;
...
@@ -8,6 +8,7 @@ import com.hikvision.artemis.sdk.config.ArtemisConfig;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
net.wanji.utc.common.Result
;
import
net.wanji.utc.common.Result
;
import
net.wanji.utc.common.baseentity.BaseCrossInfo
;
import
net.wanji.utc.common.baseentity.BaseCrossInfo
;
import
net.wanji.utc.common.commonentity.HttpRequest
;
import
net.wanji.utc.common.exception.ControlException
;
import
net.wanji.utc.common.exception.ControlException
;
import
net.wanji.utc.common.typeenum.BasicEnum
;
import
net.wanji.utc.common.typeenum.BasicEnum
;
import
net.wanji.utc.mapper.CrossPhaseMapper
;
import
net.wanji.utc.mapper.CrossPhaseMapper
;
...
@@ -23,6 +24,7 @@ import net.wanji.utc.vo.signal.SignalRingVo;
...
@@ -23,6 +24,7 @@ import net.wanji.utc.vo.signal.SignalRingVo;
import
net.wanji.utc.vo.timeplan.Phase
;
import
net.wanji.utc.vo.timeplan.Phase
;
import
net.wanji.utc.vo.timeplan.Ring
;
import
net.wanji.utc.vo.timeplan.Ring
;
import
net.wanji.utc.vo.timeplan.TimePlanVO
;
import
net.wanji.utc.vo.timeplan.TimePlanVO
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
...
@@ -38,6 +40,8 @@ import static net.wanji.utc.common.constant.Constants.*;
...
@@ -38,6 +40,8 @@ import static net.wanji.utc.common.constant.Constants.*;
@Slf4j
@Slf4j
@Service
(
"hkControlCommandService"
)
@Service
(
"hkControlCommandService"
)
public
class
HKControlCommandServiceImpl
implements
ControlCommandService
{
public
class
HKControlCommandServiceImpl
implements
ControlCommandService
{
@Value
(
"${signal.manufacturer.hk.artemisPath}"
)
private
String
artemisPath
;
@Resource
@Resource
private
HkGetSignalMethodService
hkGetSignalMethodService
;
private
HkGetSignalMethodService
hkGetSignalMethodService
;
...
@@ -236,6 +240,13 @@ public class HKControlCommandServiceImpl implements ControlCommandService {
...
@@ -236,6 +240,13 @@ public class HKControlCommandServiceImpl implements ControlCommandService {
}
}
}
}
private
Map
<
String
,
String
>
getPathMapByApiCode
(
String
apiCode
)
{
Map
<
String
,
String
>
res
=
new
HashMap
<>();
HttpRequest
httpRequest
=
new
HttpRequest
(
BasicEnum
.
ManufacturerEnum
.
HK
.
getAbbr
(),
apiCode
);
res
.
put
(
"http://"
,
artemisPath
+
httpRequest
.
getUrl
());
return
res
;
}
@Override
@Override
public
<
T
>
Result
<
T
>
phaseDiffSend
()
{
public
<
T
>
Result
<
T
>
phaseDiffSend
()
{
return
null
;
return
null
;
...
...
signal-utc-service/src/main/java/net/wanji/utc/service/impl/HkGetSignalMethodServiceImpl.java
View file @
e31b2a1c
...
@@ -7,10 +7,13 @@ import com.hikvision.artemis.sdk.ArtemisHttpUtil;
...
@@ -7,10 +7,13 @@ import com.hikvision.artemis.sdk.ArtemisHttpUtil;
import
com.hikvision.artemis.sdk.config.ArtemisConfig
;
import
com.hikvision.artemis.sdk.config.ArtemisConfig
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
net.wanji.utc.common.baseentity.BaseCrossInfo
;
import
net.wanji.utc.common.baseentity.BaseCrossInfo
;
import
net.wanji.utc.common.commonentity.HttpRequest
;
import
net.wanji.utc.common.constant.Constants
;
import
net.wanji.utc.common.constant.Constants
;
import
net.wanji.utc.common.typeenum.BasicEnum
;
import
net.wanji.utc.service.HkGetSignalMethodService
;
import
net.wanji.utc.service.HkGetSignalMethodService
;
import
net.wanji.utc.vo.CrossLanesVo
;
import
net.wanji.utc.vo.CrossLanesVo
;
import
net.wanji.utc.vo.signal.SignalLightStateVo
;
import
net.wanji.utc.vo.signal.SignalLightStateVo
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
...
@@ -30,6 +33,8 @@ import static net.wanji.utc.common.constant.Constants.HK_SUCCESS_CODE;
...
@@ -30,6 +33,8 @@ import static net.wanji.utc.common.constant.Constants.HK_SUCCESS_CODE;
@Slf4j
@Slf4j
@Service
@Service
public
class
HkGetSignalMethodServiceImpl
implements
HkGetSignalMethodService
{
public
class
HkGetSignalMethodServiceImpl
implements
HkGetSignalMethodService
{
@Value
(
"${signal.manufacturer.hk.artemisPath}"
)
private
String
artemisPath
;
@Resource
@Resource
private
ArtemisConfig
artemisConfig
;
private
ArtemisConfig
artemisConfig
;
...
@@ -43,7 +48,7 @@ public class HkGetSignalMethodServiceImpl implements HkGetSignalMethodService {
...
@@ -43,7 +48,7 @@ public class HkGetSignalMethodServiceImpl implements HkGetSignalMethodService {
List
<
SignalLightStateVo
>
result
=
new
ArrayList
<>();
List
<
SignalLightStateVo
>
result
=
new
ArrayList
<>();
SignalLightStateVo
infoVo
;
SignalLightStateVo
infoVo
;
try
{
try
{
Map
<
String
,
String
>
path
=
Constants
.
getPathMapByApiCode
(
"querySignalInfo"
);
Map
<
String
,
String
>
path
=
getPathMapByApiCode
(
"querySignalInfo"
);
for
(
BaseCrossInfo
entity
:
baseSignals
)
{
for
(
BaseCrossInfo
entity
:
baseSignals
)
{
JSONObject
jsonBody
=
new
JSONObject
();
JSONObject
jsonBody
=
new
JSONObject
();
jsonBody
.
put
(
"pageNo"
,
1
);
jsonBody
.
put
(
"pageNo"
,
1
);
...
@@ -133,6 +138,13 @@ public class HkGetSignalMethodServiceImpl implements HkGetSignalMethodService {
...
@@ -133,6 +138,13 @@ public class HkGetSignalMethodServiceImpl implements HkGetSignalMethodService {
return
result
;
return
result
;
}
}
private
Map
<
String
,
String
>
getPathMapByApiCode
(
String
apiCode
)
{
Map
<
String
,
String
>
res
=
new
HashMap
<>();
HttpRequest
httpRequest
=
new
HttpRequest
(
BasicEnum
.
ManufacturerEnum
.
HK
.
getAbbr
(),
apiCode
);
res
.
put
(
"http://"
,
artemisPath
+
httpRequest
.
getUrl
());
return
res
;
}
/**
/**
* 灯组颜色转换
* 灯组颜色转换
*/
*/
...
...
signal-utc-service/src/main/java/net/wanji/utc/service/staticinfo/impl/StaticInfoServiceImpl.java
View file @
e31b2a1c
...
@@ -103,7 +103,7 @@ public class StaticInfoServiceImpl implements StaticInfoService {
...
@@ -103,7 +103,7 @@ public class StaticInfoServiceImpl implements StaticInfoService {
Integer
manufacturerId
=
crossInfoPO
.
getManufacturerId
();
Integer
manufacturerId
=
crossInfoPO
.
getManufacturerId
();
// 获取厂商缩写
// 获取厂商缩写
ManufacturerInfoPO
manufacturerInfoPO
=
manufacturerInfoMapper
.
selectById
(
manufacturerId
);
ManufacturerInfoPO
manufacturerInfoPO
=
manufacturerInfoMapper
.
selectById
(
manufacturerId
);
String
manufacturerAbbr
=
manufacturerInfoPO
.
get
NickNam
e
();
String
manufacturerAbbr
=
manufacturerInfoPO
.
get
Cod
e
();
if
(
Objects
.
equals
(
BasicEnum
.
ManufacturerEnum
.
HK
.
getAbbr
(),
manufacturerAbbr
))
{
if
(
Objects
.
equals
(
BasicEnum
.
ManufacturerEnum
.
HK
.
getAbbr
(),
manufacturerAbbr
))
{
// 海康
// 海康
hkSchemePhaseLightsService
.
hkSchemePhaseLights
(
crossId
,
crossCode
);
hkSchemePhaseLightsService
.
hkSchemePhaseLights
(
crossId
,
crossCode
);
...
@@ -121,7 +121,7 @@ public class StaticInfoServiceImpl implements StaticInfoService {
...
@@ -121,7 +121,7 @@ public class StaticInfoServiceImpl implements StaticInfoService {
Integer
manufacturerId
=
crossInfoPO
.
getManufacturerId
();
Integer
manufacturerId
=
crossInfoPO
.
getManufacturerId
();
// 获取厂商缩写
// 获取厂商缩写
ManufacturerInfoPO
manufacturerInfoPO
=
manufacturerInfoMapper
.
selectById
(
manufacturerId
);
ManufacturerInfoPO
manufacturerInfoPO
=
manufacturerInfoMapper
.
selectById
(
manufacturerId
);
String
manufacturerAbbr
=
manufacturerInfoPO
.
get
NickNam
e
();
String
manufacturerAbbr
=
manufacturerInfoPO
.
get
Cod
e
();
Integer
planNo
=
planSectionInVO
.
getPlanNo
();
Integer
planNo
=
planSectionInVO
.
getPlanNo
();
if
(
Objects
.
equals
(
BasicEnum
.
ManufacturerEnum
.
HK
.
getAbbr
(),
manufacturerAbbr
))
{
if
(
Objects
.
equals
(
BasicEnum
.
ManufacturerEnum
.
HK
.
getAbbr
(),
manufacturerAbbr
))
{
// 海康
// 海康
...
...
signal-utc-service/src/main/java/net/wanji/utc/vo/systemadmin/ManufacturerInsertOrUpdateInVO.java
View file @
e31b2a1c
...
@@ -4,8 +4,6 @@ import io.swagger.annotations.ApiModel;
...
@@ -4,8 +4,6 @@ import io.swagger.annotations.ApiModel;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
import
java.util.Date
;
/**
/**
* @author Kent HAN
* @author Kent HAN
* @date 2022/11/24 9:42
* @date 2022/11/24 9:42
...
...
signal-utc-service/src/main/resources/mapper/ManufacturerInfoMapper.xml
View file @
e31b2a1c
...
@@ -51,7 +51,7 @@
...
@@ -51,7 +51,7 @@
select
select
id,code,name,nick_name,address,maintenance_unit,gmt_create,gmt_modified
id,code,name,nick_name,address,maintenance_unit,gmt_create,gmt_modified
from t_manufacturer_info
from t_manufacturer_info
where
nick_nam
e = #{abbr}
where
cod
e = #{abbr}
</select>
</select>
<select
id=
"selectById"
resultMap=
"BaseResultMap"
>
<select
id=
"selectById"
resultMap=
"BaseResultMap"
>
...
...
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