diff --git a/src/main/java/club/joylink/rtss/controller/VoiceCommandController.java b/src/main/java/club/joylink/rtss/controller/VoiceCommandController.java deleted file mode 100644 index 74753cf9c..000000000 --- a/src/main/java/club/joylink/rtss/controller/VoiceCommandController.java +++ /dev/null @@ -1,39 +0,0 @@ -package club.joylink.rtss.controller; - -import club.joylink.rtss.services.IVoiceCommandService; -import club.joylink.rtss.simulation.cbtc.command.VoiceCommandBO; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -import java.util.List; - -/** - * 语音指令接口 - */ -@RestController -@RequestMapping("/api/voiceCommand") -public class VoiceCommandController { - @Autowired - private IVoiceCommandService iVoiceCommandService; - - /** - * 添加语音指令 - * @param command - */ - @PostMapping("") - public void create(VoiceCommandBO command) { - iVoiceCommandService.create(command); - } - - /** - * 查询所有语音指令 - * @return - */ - @GetMapping("") - public List getAll() { - return iVoiceCommandService.getAll(); - } -} diff --git a/src/main/java/club/joylink/rtss/services/IVoiceCommandService.java b/src/main/java/club/joylink/rtss/services/IVoiceCommandService.java deleted file mode 100644 index f5465f0fe..000000000 --- a/src/main/java/club/joylink/rtss/services/IVoiceCommandService.java +++ /dev/null @@ -1,17 +0,0 @@ -package club.joylink.rtss.services; - -import club.joylink.rtss.simulation.cbtc.command.VoiceCommandBO; - -import java.util.List; - -public interface IVoiceCommandService { - /** - * 添加语音指令 - */ - void create(VoiceCommandBO command); - - /** - * 获取所有语音指令 - */ - List getAll(); -} diff --git a/src/main/java/club/joylink/rtss/services/SysUserService.java b/src/main/java/club/joylink/rtss/services/SysUserService.java index af56ff24c..e4eed3440 100644 --- a/src/main/java/club/joylink/rtss/services/SysUserService.java +++ b/src/main/java/club/joylink/rtss/services/SysUserService.java @@ -226,7 +226,7 @@ public class SysUserService implements ISysUserService { // return PageVO.convert(page); SysAccountExample example = new SysAccountExample(); SysAccountExample.Criteria criteria = example.createCriteria(); - criteria.andStatusEqualTo(StatusEnum.Valid.getCode()); +// criteria.andStatusEqualTo(StatusEnum.Valid.getCode()); if (queryVO.getId() != null) { criteria.andIdEqualTo(queryVO.getId()); } diff --git a/src/main/java/club/joylink/rtss/services/VoiceCommandService.java b/src/main/java/club/joylink/rtss/services/VoiceCommandService.java deleted file mode 100644 index b08c95023..000000000 --- a/src/main/java/club/joylink/rtss/services/VoiceCommandService.java +++ /dev/null @@ -1,60 +0,0 @@ -package club.joylink.rtss.services; - -import club.joylink.rtss.simulation.cbtc.command.CommandBO; -import club.joylink.rtss.simulation.cbtc.command.VoiceCommandBO; -import club.joylink.rtss.simulation.cbtc.member.SimulationMember; -import club.joylink.rtss.dao.VoiceCommandDAO; -import club.joylink.rtss.entity.VoiceCommandWithBLOBs; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.util.*; - -@Service -public class VoiceCommandService implements IVoiceCommandService { - @Autowired - private VoiceCommandDAO voiceCommandDAO; - - @Override - public void create(VoiceCommandBO command) { - Long mapId = 41L; //西安三 - - String pattern = "^([0-9]{3})车.*(RM)模式.*引导信号.$"; - VoiceCommandBO.Type type = VoiceCommandBO.Type.Main_Body; - -// Map keyWordTypeMap = null; - Map keyWordTypeMap = new HashMap<>(); -// keyWordTypeMap.put(0, VoiceCommandBO.KeyWord.Train_Group); - keyWordTypeMap.put(1, VoiceCommandBO.KeyWord.Train_Group); - keyWordTypeMap.put(2, VoiceCommandBO.KeyWord.Drive_Mode); -// keyWordTypeMap.put(3, VoiceCommandBO.KeyWord.Train_Group); -// keyWordTypeMap.put(4, VoiceCommandBO.KeyWord.Train_Group); - - Integer deviceKeyWordIndex = 1; - - String reply = "%s车司机以%s模式凭引导信号行驶,司机收到"; -// String reply = null; - List replyParamIndexes = Arrays.asList(1,2); -// List replyParamIndexes = null; - - CommandBO.CommandType commandType = CommandBO.CommandType.Drive_Through_The_Guide_Signal; - - List commandParamIndexes = new ArrayList<>(); - - List fromType = Collections.singletonList(SimulationMember.Type.DISPATCHER); - List targetType = Collections.singletonList(SimulationMember.Type.DRIVER); - - VoiceCommandBO voiceCommandBO = new VoiceCommandBO(mapId, pattern, type, fromType, - targetType, keyWordTypeMap, deviceKeyWordIndex, reply, replyParamIndexes, - commandType, commandParamIndexes); - VoiceCommandWithBLOBs voiceCommand = voiceCommandBO.buildDB(); - voiceCommandDAO.insert(voiceCommand); - } - - @Override - public List getAll() { - List voiceCommands = voiceCommandDAO.selectByExampleWithBLOBs(null); - return VoiceCommandBO.convert(voiceCommands); - } - -} diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/Simulation.java b/src/main/java/club/joylink/rtss/simulation/cbtc/Simulation.java index f2805500a..5bd7f59c4 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/Simulation.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/Simulation.java @@ -6,7 +6,6 @@ import club.joylink.rtss.exception.BusinessExceptionAssertEnum; import club.joylink.rtss.simulation.cbtc.ATS.data.SimulationLog; import club.joylink.rtss.simulation.cbtc.CTC.data.CtcRepository; import club.joylink.rtss.simulation.cbtc.build.SimulationBuildParams; - import club.joylink.rtss.simulation.cbtc.command.VoiceCommandBO; import club.joylink.rtss.simulation.cbtc.competition.CompetitionBO; import club.joylink.rtss.simulation.cbtc.constant.SimulationConstants; @@ -68,7 +67,7 @@ public class Simulation extends club.joylink.rtss.simulation.Simulation createUserType; /**