删除一些无用的东西

This commit is contained in:
joylink_zhangsai 2023-04-07 13:24:57 +08:00
parent db606a2745
commit 6ac172edbd
5 changed files with 2 additions and 119 deletions

View File

@ -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<VoiceCommandBO> getAll() {
return iVoiceCommandService.getAll();
}
}

View File

@ -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<VoiceCommandBO> getAll();
}

View File

@ -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());
}

View File

@ -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<Integer, VoiceCommandBO.KeyWord> keyWordTypeMap = null;
Map<Integer, VoiceCommandBO.KeyWord> 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<Integer> replyParamIndexes = Arrays.asList(1,2);
// List<Integer> replyParamIndexes = null;
CommandBO.CommandType commandType = CommandBO.CommandType.Drive_Through_The_Guide_Signal;
List<Integer> commandParamIndexes = new ArrayList<>();
List<SimulationMember.Type> fromType = Collections.singletonList(SimulationMember.Type.DISPATCHER);
List<SimulationMember.Type> 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<VoiceCommandBO> getAll() {
List<VoiceCommandWithBLOBs> voiceCommands = voiceCommandDAO.selectByExampleWithBLOBs(null);
return VoiceCommandBO.convert(voiceCommands);
}
}

View File

@ -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<Simulati
/**
* 仿真创建所使用的权限类型及主体
* key = 权限类型+"-" + 权限主体id
* {@link PermissionSubjectTypeEnum.org or PermissionSubjectTypeEnum.project}
* {@link PermissionSubjectTypeEnum#org or PermissionSubjectTypeEnum.project}
*/
private Map<String,Boolean> createUserType;
/**