Commit 888be65d authored by hanbing's avatar hanbing

方案管理-路口配置-路口方向列表

parent 43b9150d
...@@ -23,7 +23,7 @@ pipeline { ...@@ -23,7 +23,7 @@ pipeline {
} }
stage('编译构建web模块') { stage('编译构建web模块') {
steps { steps {
sh 'mvn -pl signal-web-service clean package -Dmaven.test.skip=true jib:build -DsendCredentialsOverHttp=true' sh 'mvn -pl signal-control-service clean package -Dmaven.test.skip=true jib:build -DsendCredentialsOverHttp=true'
} }
} }
stage('删除utc模块镜像和容器') { stage('删除utc模块镜像和容器') {
...@@ -48,13 +48,13 @@ pipeline { ...@@ -48,13 +48,13 @@ pipeline {
steps { steps {
sh ''' sh '''
echo \'检查容器是否存在\' echo \'检查容器是否存在\'
containerid=`docker ps -a|grep signal-web-service|awk \'{print $1}\'` containerid=`docker ps -a|grep signal-control-service|awk \'{print $1}\'`
if [ "$containerid" != "" ];then if [ "$containerid" != "" ];then
echo \'容器存在,删除容器\' echo \'容器存在,删除容器\'
docker rm -f $containerid docker rm -f $containerid
fi fi
echo \'检查镜像是否存在\' echo \'检查镜像是否存在\'
imageid=`docker images|grep signal-web-service|awk \'{print $3}\'` imageid=`docker images|grep signal-control-service|awk \'{print $3}\'`
if [ "$imageid" != "" ];then if [ "$imageid" != "" ];then
echo \'删除镜像\' echo \'删除镜像\'
docker rmi -f $imageid docker rmi -f $imageid
...@@ -69,7 +69,7 @@ pipeline { ...@@ -69,7 +69,7 @@ pipeline {
} }
stage('拉取web模块镜像') { stage('拉取web模块镜像') {
steps { steps {
sh 'docker pull 10.100.1.87:5000/xinkong/signal-web-service:0.2.1' sh 'docker pull 10.100.1.87:5000/xinkong/signal-control-service:0.2.1'
} }
} }
stage('运行utc模块容器') { stage('运行utc模块容器') {
...@@ -79,7 +79,7 @@ pipeline { ...@@ -79,7 +79,7 @@ pipeline {
} }
stage('运行web模块容器') { stage('运行web模块容器') {
steps { steps {
sh 'docker run -p 32001:32001 -p 15116:15116 -itd --name signal-web-service 10.100.1.87:5000/xinkong/signal-web-service:0.2.1' sh 'docker run -p 32001:32001 -p 15116:15116 -itd --name signal-control-service 10.100.1.87:5000/xinkong/signal-control-service:0.2.1'
} }
} }
} }
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<modules> <modules>
<module>identity-client-starter</module> <module>identity-client-starter</module>
<module>signal-utc-service</module> <module>signal-utc-service</module>
<module>signal-web-service</module> <module>signal-control-service</module>
<module>wj-common</module> <module>wj-common</module>
<module>wj-databus</module> <module>wj-databus</module>
<module>wj-identity</module> <module>wj-identity</module>
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<version>0.2.1</version> <version>0.2.1</version>
</parent> </parent>
<artifactId>signal-web-service</artifactId> <artifactId>signal-control-service</artifactId>
<name>signal-web-service</name> <name>signal-web-service</name>
......
...@@ -6,7 +6,7 @@ import java.util.Objects; ...@@ -6,7 +6,7 @@ import java.util.Objects;
* @author Kent HAN * @author Kent HAN
* @date 2022/11/8 17:20 * @date 2022/11/8 17:20
*/ */
public enum SpecialServiceCrossDirEnum { public enum CrossDirEnum {
ONE(1, "北"), ONE(1, "北"),
TWO(2, "东北"), TWO(2, "东北"),
THREE(3, "东"), THREE(3, "东"),
...@@ -14,18 +14,18 @@ public enum SpecialServiceCrossDirEnum { ...@@ -14,18 +14,18 @@ public enum SpecialServiceCrossDirEnum {
FIVE(5, "南"), FIVE(5, "南"),
SIX(6, "西南"), SIX(6, "西南"),
SEVEN(7, "西"), SEVEN(7, "西"),
EIGHT(3, "西北"); EIGHT(8, "西北");
private final int code; private final int code;
private final String msg; private final String msg;
SpecialServiceCrossDirEnum(int code, String msg) { CrossDirEnum(int code, String msg) {
this.code = code; this.code = code;
this.msg = msg; this.msg = msg;
} }
public static String getMsgByCode(int code) { public static String getMsgByCode(int code) {
for (SpecialServiceCrossDirEnum value : SpecialServiceCrossDirEnum.values()) { for (CrossDirEnum value : CrossDirEnum.values()) {
if (value.code == code) { if (value.code == code) {
return value.msg; return value.msg;
} }
...@@ -34,7 +34,7 @@ public enum SpecialServiceCrossDirEnum { ...@@ -34,7 +34,7 @@ public enum SpecialServiceCrossDirEnum {
} }
public static Integer getCodeByMsg(String msg) { public static Integer getCodeByMsg(String msg) {
for (SpecialServiceCrossDirEnum value : SpecialServiceCrossDirEnum.values()) { for (CrossDirEnum value : CrossDirEnum.values()) {
if (Objects.equals(value.msg, msg)) { if (Objects.equals(value.msg, msg)) {
return value.code; return value.code;
} }
......
package net.wanji.web.common.enums;
/**
* @author Kent HAN
* @date 2022/11/8 17:20
*/
public enum CrossInOutEnum {
ONE(1, "进口"),
TWO(2, "出口");
private final int code;
private final String msg;
CrossInOutEnum(int code, String msg) {
this.code = code;
this.msg = msg;
}
public static String getMsgByCode(int code) {
for (CrossInOutEnum value : CrossInOutEnum.values()) {
if (value.code == code) {
return value.msg;
}
}
return null;
}
public String getMsg() {
return msg;
}
}
package net.wanji.web.controller.scheme;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import net.wanji.web.common.entity.JsonViewObject;
import net.wanji.web.dto.CrossIdDTO;
import net.wanji.web.service.scheme.impl.CrossConfigServiceImpl;
import net.wanji.web.vo.scheme.CrossDirsVO;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.ws.rs.core.MediaType;
/**
* @author Kent HAN
* @date 2022/12/20 10:14
*/
@Api(value = "CrossConfigController", description = "方案管理-路口配置")
@RequestMapping("/crossConfig")
@RestController
public class CrossConfigController {
private final CrossConfigServiceImpl crossConfigServiceImpl;
public CrossConfigController(CrossConfigServiceImpl crossConfigServiceImpl) {
this.crossConfigServiceImpl = crossConfigServiceImpl;
}
@ApiOperation(value = "获取路口方向列表", notes = "获取路口方向列表", response = JsonViewObject.class,
produces = MediaType.APPLICATION_JSON, consumes = MediaType.APPLICATION_JSON)
@PostMapping(value = "/listCrossDirs",
produces = MediaType.APPLICATION_JSON, consumes = MediaType.APPLICATION_JSON)
@ApiResponses({
@ApiResponse(code = 200, message = "OK", response = CrossDirsVO.class),
})
public JsonViewObject listCrossDirs(@RequestBody CrossIdDTO crossIdDTO) {
String crossId = crossIdDTO.getCrossId();
CrossDirsVO crossDirsVO = crossConfigServiceImpl.listCrossDirs(crossId);
JsonViewObject jsonViewObject = JsonViewObject.newInstance();
return jsonViewObject.success(crossDirsVO);
}
}
package net.wanji.web.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author Kent HAN
* @date 2022/12/20 10:17
*/
@Data
public class CrossIdDTO {
@ApiModelProperty(value = "路口ID,如:c7e7b1f352dd4acab4a60088eb391cca", required = true)
private String crossId;
}
package net.wanji.web.mapper.scheme;
import io.lettuce.core.dynamic.annotation.Param;
import net.wanji.web.po.scheme.CrossDirInfoPO;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* @author Kent HAN
* @date 2022/12/20 10:32
*/
@Repository
public interface CrossDirInfoMapper {
List<CrossDirInfoPO> listByCrossID(@Param("crossId") String crossId);
}
package net.wanji.web.po.scheme;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
* @author Kent HAN
* @date 2022/12/20 10:36
*/
@Data
public class CrossDirInfoPO {
/** 路口方向ID(路口ID_方向_进出口_主辅路序号) */
@ApiModelProperty(name = "路口方向ID(路口ID_方向_进出口_主辅路序号)",notes = "")
private String id ;
/** 路口方向类型:1北;2东北;3东;4东南;5南;6西南;7西;8西北 */
@ApiModelProperty(name = "路口方向类型:1北;2东北;3东;4东南;5南;6西南;7西;8西北",notes = "")
private Integer dirType ;
/** 进出口类型:1进口;2出口 */
@ApiModelProperty(name = "进出口类型:1进口;2出口",notes = "")
private Integer inOutType ;
/** 路口ID */
@ApiModelProperty(name = "路口ID",notes = "")
private String crossId ;
/** 方向路段长度 */
@ApiModelProperty(name = "方向路段长度",notes = "")
private Double length ;
/** 创建时间 */
@ApiModelProperty(name = "创建时间",notes = "")
private Date gmtCreate ;
/** 修改时间 */
@ApiModelProperty(name = "修改时间",notes = "")
private Date gmtModified ;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment