删除swagger依赖,将swagger注解替换为Java注释,引入smart-doc的maven插件,可以生成Rest接口的doc文档

添加2d模型草稿增删改查接口和实现
This commit is contained in:
walker-sheng 2021-06-21 15:49:30 +08:00
parent dce0f88ec4
commit eb16909a52
338 changed files with 8368 additions and 3786 deletions

45
pom.xml
View File

@ -59,18 +59,6 @@
<artifactId>spring-boot-starter-aop</artifactId>
</dependency>
<!-- swagger -->
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>3.0.0</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>3.0.0</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-all</artifactId>
@ -147,6 +135,39 @@
<includeSystemScope>true</includeSystemScope>
</configuration>
</plugin>
<plugin>
<groupId>com.github.shalousun</groupId>
<artifactId>smart-doc-maven-plugin</artifactId>
<version>2.1.9</version>
<configuration>
<!--指定生成文档的使用的配置文件,配置文件放在自己的项目中-->
<configFile>./src/main/resources/smart-doc.json</configFile>
<!--指定项目名称-->
<projectName>测试</projectName>
<!--smart-doc实现自动分析依赖树加载第三方依赖的源码如果一些框架依赖库加载不到导致报错这时请使用excludes排除掉-->
<excludes>
<!--格式为groupId:artifactId;参考如下-->
<exclude>com.alibaba:fastjson</exclude>
</excludes>
<!--自1.0.8版本开始插件提供includes支持,配置了includes后插件会按照用户配置加载而不是自动加载因此使用时需要注意-->
<!--smart-doc能自动分析依赖树加载所有依赖源码原则上会影响文档构建效率因此你可以使用includes来让插件加载你配置的组件-->
<includes>
<!--格式为groupId:artifactId;参考如下-->
<include>com.alibaba:fastjson</include>
</includes>
</configuration>
<executions>
<execution>
<!--如果不需要在执行编译时启动smart-doc则将phase注释掉-->
<phase>compile</phase>
<goals>
<!--smart-doc提供了html、openapi、markdown等goal可按需配置-->
<goal>html</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

17
sql/20210621-sheng.sql Normal file
View File

@ -0,0 +1,17 @@
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for model_2d_draft
-- ----------------------------
DROP TABLE IF EXISTS `model_2d_draft`;
CREATE TABLE `model_2d_draft` (
`id` bigint(20) NOT NULL,
`code` varchar(32) NOT NULL COMMENT '编号',
`name` varchar(32) NOT NULL COMMENT '模型名称',
`json_data` mediumtext COMMENT '模型数据',
`create_user_id` bigint(20) NOT NULL,
`create_time` datetime NOT NULL ON UPDATE CURRENT_TIMESTAMP,
`update_user_id` bigint(20) DEFAULT NULL,
`update_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

View File

@ -5,7 +5,6 @@ import club.joylink.rtss.vo.AccountVO;
import club.joylink.rtss.vo.client.file.FileBindingVO;
import club.joylink.rtss.vo.client.file.FileQueryVO;
import club.joylink.rtss.vo.client.file.FileVO;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@ -70,7 +69,10 @@ public class FileController {
return iFileManagerService.queryFileBindingInfo(fileId);
}
@ApiOperation("删除文件绑定信息")
/**
* 删除文件绑定信息
* @param bindingId
*/
@DeleteMapping("/binding/{bindingId}")
public void deleteBindingInfo(@PathVariable long bindingId) {
iFileManagerService.deleteBindingInfo(bindingId);

View File

@ -11,16 +11,15 @@ import club.joylink.rtss.vo.client.post.LearnMessagePagedQueryVO;
import club.joylink.rtss.vo.client.post.LearnMessageVO;
import club.joylink.rtss.vo.client.post.LearnPostPagedQueryVO;
import club.joylink.rtss.vo.client.validGroup.LearnCommentCreateCheck;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import java.util.List;
@Api(tags = { "学习吧接口" })
/**
*学习吧接口
*/
@RestController
@RequestMapping(path = "/api/learn")
public class LearnController {
@ -28,94 +27,124 @@ public class LearnController {
@Autowired
private ILearnService iLearnService;
@ApiOperation(value = "分页查询留言板列表")
/**
*分页查询留言板列表
*/
@GetMapping(path = "/post")
public PageVO<LearnPostVO> queryPagedPost(LearnPostPagedQueryVO queryVO) {
return iLearnService.queryPagedPost(queryVO);
}
@ApiOperation("查询项目留言板")
/**
*查询项目留言板
*/
@GetMapping("/{project}/post")
public LearnPostVO queryPost(@PathVariable Project project) {
return iLearnService.queryPost(project);
}
@ApiOperation(value = "新建帖子")
/**
*新建帖子
*/
@PostMapping(path = "/post")
public Long createPost(@RequestBody @Validated LearnPostCreateVO createVO, @ApiIgnore @RequestAttribute AccountVO user) {
public Long createPost(@RequestBody @Validated LearnPostCreateVO createVO, @RequestAttribute AccountVO user) {
return iLearnService.createPost(createVO, user);
}
@ApiOperation("编辑留言板基础信息")
/**
*编辑留言板基础信息
*/
@PutMapping("/{postId}")
public void updatePost(@PathVariable Long postId, @RequestBody @Validated LearnPostUpdateVO updateVO,
@RequestAttribute AccountVO user) {
iLearnService.updatePost(postId, updateVO, user);
}
@ApiOperation(value = "获取帖子信息")
/**
*获取帖子信息
*/
@GetMapping(path = "/{postId}")
public LearnPostVO getPostInfo(@PathVariable Long postId) {
return iLearnService.getPostInfo(postId);
}
@ApiOperation(value = "赞贴")
/**
*赞贴
*/
@PostMapping(path = "/post/{postId}/like")
public void likePost(@PathVariable Long postId, @ApiIgnore @RequestAttribute AccountVO user) {
public void likePost(@PathVariable Long postId, @RequestAttribute AccountVO user) {
iLearnService.likePost(postId, user);
}
@ApiOperation(value = "踩贴")
/**
*踩贴
*/
@PostMapping(path = "/post/{postId}/unlike")
public void unlikePost(@PathVariable Long postId, @ApiIgnore @RequestAttribute AccountVO user) {
public void unlikePost(@PathVariable Long postId, @RequestAttribute AccountVO user) {
iLearnService.unlikePost(postId, user);
}
@ApiOperation(value = "置顶-管理员操作")
/**
*置顶-管理员操作
*/
@PutMapping(path = "/{postId}/top")
public void top(@PathVariable Long postId, @ApiIgnore @RequestAttribute AccountVO user) {
public void top(@PathVariable Long postId, @RequestAttribute AccountVO user) {
iLearnService.top(postId, user);
}
@ApiOperation(value = "删除帖子-管理员操作")
/**
*删除帖子-管理员操作
*/
@DeleteMapping(path = "/{postId}")
public void deletePost(@PathVariable Long postId, @ApiIgnore @RequestAttribute AccountVO user) {
public void deletePost(@PathVariable Long postId, @RequestAttribute AccountVO user) {
iLearnService.deletePost(postId, user);
}
//--------------------------------- 留言 ---------------------------------
@ApiOperation("留言")
/**
*留言
*/
@PostMapping("/message/create")
public long createMessage(@RequestBody @Validated LearnMessageCreateVO messageCreateVO, @RequestAttribute AccountVO user) {
return iLearnService.createMessage(messageCreateVO, user);
}
@ApiOperation("成工院留言")
/**
*成工院留言
*/
@PostMapping("/cgy/message/create")
public long cgyCreateMessage(@RequestBody @Validated LearnMessageCreateVO messageCreateVO) {
return iLearnService.cgyCreateMessage(messageCreateVO);
}
@ApiOperation("分页查询留言")
/**
*分页查询留言
*/
@GetMapping("/{postId}/message/pagedQuery/postId")
public PageVO<LearnMessageVO> pagedQueryMessageByPostId(@PathVariable Long postId, LearnMessagePagedQueryVO queryVO) {
return iLearnService.pagedQueryMessageByPostId(postId, queryVO);
}
@ApiOperation("根据项目分页查询留言")
/**
*根据项目分页查询留言
*/
@GetMapping("/{project}/message/pagedQuery/project")
public PageVO<LearnMessageVO> pagedQueryMessageByProject(@PathVariable Project project, LearnMessagePagedQueryVO queryVO) {
return iLearnService.pagedQueryMessageByProject(project, queryVO);
}
@ApiOperation("删除留言(管理员)")
/**
*删除留言管理员
*/
@DeleteMapping("/{messageId}/deleteMessage/admin")
public void adminDeleteMessage(@PathVariable Long messageId, @RequestAttribute AccountVO user) {
iLearnService.adminDeleteMessage(messageId, user);
}
@ApiOperation("删除留言(用户删自己的)")
/**
*删除留言用户删自己的
*/
@DeleteMapping("/{messageId}/deleteMessage/user")
public void userDeleteMessage(@PathVariable Long messageId, @RequestAttribute AccountVO user) {
iLearnService.userDeleteMessage(messageId, user);
@ -135,85 +164,111 @@ public class LearnController {
//----------------------------------------- 评论 -----------------------------------------
@ApiOperation(value = "分页查询留言评论列表")
/**
*分页查询留言评论列表
*/
@GetMapping(path = "/{messageId}/comment")
public PageVO<LearnCommentVO> queryPagedComment(@PathVariable Long messageId, PageQueryVO queryVO) {
return iLearnService.pagedQueryComment(messageId, queryVO);
}
@ApiOperation(value = "查询留言回复列表")
/**
*查询留言回复列表
*/
@GetMapping(path = "/{messageId}/list")
public List<LearnCommentVO> queryCommentList(@PathVariable Long messageId) {
return iLearnService.queryCommentList(messageId);
}
@ApiOperation(value = "评论")
/**
*评论
*/
@PostMapping(path = "/{messageId}/comment")
public void comment(@PathVariable Long messageId,
@RequestBody @Validated(value = LearnCommentCreateCheck.class) LearnCreateVO commentCreateVO,
@ApiIgnore @RequestAttribute AccountVO user) {
@RequestAttribute AccountVO user) {
iLearnService.addComment(messageId, commentCreateVO, user);
}
@ApiOperation(value = "成工院评论")
/**
*成工院评论
*/
@PostMapping(path = "/cgy/{messageId}/comment")
public void cygComment(@PathVariable Long messageId,
@RequestBody @Validated(value = LearnCommentCreateCheck.class) LearnCreateVO commentCreateVO) {
@RequestBody @Validated(value = LearnCommentCreateCheck.class) LearnCreateVO commentCreateVO) {
iLearnService.cgyAddComment(messageId, commentCreateVO);
}
@ApiOperation(value = "回复")
/**
*回复
*/
@PostMapping(path = "/{messageId}/{commentId}/comment")
public void comment(@PathVariable Long messageId, @PathVariable Long commentId,
@RequestBody @Validated(value = LearnCommentCreateCheck.class) LearnCreateVO postCreateVO,
@ApiIgnore @RequestAttribute AccountVO user) {
@RequestAttribute AccountVO user) {
iLearnService.addComment(messageId, commentId, postCreateVO, user);
}
@ApiOperation(value = "赞回复")
/**
*赞回复
*/
@PostMapping(path = "/comment/{commentId}/like")
public void likeComment(@PathVariable Long commentId, @ApiIgnore @RequestAttribute AccountVO user) {
public void likeComment(@PathVariable Long commentId, @RequestAttribute AccountVO user) {
iLearnService.likeComment(commentId, user);
}
@ApiOperation(value = "踩回复")
/**
*踩回复
*/
@PostMapping(path = "/comment/{commentId}/unlike")
public void unlikeComment(@PathVariable Long commentId, @ApiIgnore @RequestAttribute AccountVO user) {
public void unlikeComment(@PathVariable Long commentId, @RequestAttribute AccountVO user) {
iLearnService.unlikeComment(commentId, user);
}
@ApiOperation(value = "取消置顶-管理员操作")
/**
*取消置顶-管理员操作
*/
@PutMapping(path = "/{postId}/unTop")
public void unTop(@PathVariable Long postId, @ApiIgnore @RequestAttribute AccountVO user) {
public void unTop(@PathVariable Long postId, @RequestAttribute AccountVO user) {
iLearnService.unTop(postId, user);
}
@ApiOperation(value = "删除评论-管理员操作")
/**
*删除评论-管理员操作
*/
@DeleteMapping(path = "/{commentId}/deleteComment/admin")
public void adminDeleteComment(@PathVariable Long commentId, @ApiIgnore @RequestAttribute AccountVO user) {
public void adminDeleteComment(@PathVariable Long commentId, @RequestAttribute AccountVO user) {
iLearnService.adminDeleteComment(commentId, user);
}
@ApiOperation(value = "删除评论-用户操作")
/**
*删除评论-用户操作
*/
@DeleteMapping(path = "/{commentId}/deleteComment/user")
public void userDeleteComment(@PathVariable Long commentId, @ApiIgnore @RequestAttribute AccountVO user) {
public void userDeleteComment(@PathVariable Long commentId, @RequestAttribute AccountVO user) {
iLearnService.userDeleteComment(commentId, user);
}
//----------------------------------------- 改数据 -----------------------------------------
@ApiOperation(value = "管理员修改留言数据")
/**
*管理员修改留言数据
*/
@PutMapping(path = "/admin/update/message")
public void adminUpdateMessage(LearnMessageUpdateVO messageUpdateVO) {
iLearnService.adminUpdateMessage(messageUpdateVO);
}
@ApiOperation(value = "管理员修改评论数据")
/**
*管理员修改评论数据
*/
@PutMapping(path = "/admin/update/comment")
public void adminUpdateComment(LearnCommentUpdateVO commentUpdateVO) {
iLearnService.adminUpdateComment(commentUpdateVO);
}
@ApiOperation(value = "成工院留言时间打散")
/**
*成工院留言时间打散
*/
@PutMapping(path = "/cgy/updateMessageTime")
public void cgyUpdateMessageTime() {
iLearnService.cgyUpdateMessageTime();

View File

@ -8,7 +8,6 @@ import club.joylink.rtss.vo.client.LoginStatusVO;
import club.joylink.rtss.vo.client.LoginUserVO;
import club.joylink.rtss.vo.client.validGroup.LoginInfoCheck;
import club.joylink.rtss.vo.client.validGroup.ThirdLoginInfoCheck;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@ -27,20 +26,26 @@ public class LoginController {
return this.iAuthenticateService.thirdPartyLogin(loginInfo);
}
@ApiOperation(value = "获取微信小程序登陆二维码")
/**
*获取微信小程序登陆二维码
*/
@GetMapping(path = "/wmurl")
public LoginStatusVO getWmLoginUrl(@NotBlank String clientId, @NotBlank String secret,
Project project, @RequestParam(required = false) String deviceCode) {
return this.iAuthenticateService.getWmLoginUrl(clientId, secret, project, deviceCode);
}
@ApiOperation(value = "用户微信小程序扫登陆二维码")
/**
*用户微信小程序扫登陆二维码
*/
@GetMapping(path = "/scan/wmLoginUrl")
public AccountVO scanWmLoginQrCode(String code, String state) {
return this.iAuthenticateService.scanWmLoginQrCode(code, state);
}
@ApiOperation(value = "微信小程序确认登陆接口")
/**
*微信小程序确认登陆接口
*/
@PostMapping(path = "/wm")
public void wmConfirmLogin(String code, String state) {
this.iAuthenticateService.wmConfirmClientLogin(code, state);
@ -87,7 +92,9 @@ public class LoginController {
return this.iAuthenticateService.getLoginUserInfoByToken(token);
}
@ApiOperation(value = "<玖琏科技>微信小程序code换取token")
/**
*<玖琏科技>微信小程序code换取token
*/
@GetMapping(path = "/wm/token")
public String getTokenByWmCode(String code) {
return this.iAuthenticateService.getTokenByWmCode(code);
@ -103,7 +110,9 @@ public class LoginController {
return this.iAuthenticateService.getTokenByWmCode2(code);
}
@ApiOperation(value = "token是否过期")
/**
*token是否过期
*/
@GetMapping(path = "/{token}/isExpired")
public boolean isTokenExpired(@PathVariable String token) {
return this.iAuthenticateService.isTokenExpired(token);

View File

@ -5,8 +5,6 @@ import club.joylink.rtss.vo.AccountVO;
import club.joylink.rtss.vo.client.map.Map3dModelCreateVO;
import club.joylink.rtss.vo.client.map.Map3dModelUpdateVO;
import club.joylink.rtss.vo.client.map.Map3dModelVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
@ -14,7 +12,9 @@ import org.springframework.web.bind.annotation.*;
import java.util.List;
@Api(tags= {"地图3d模型数据管理接口"})
/**
*地图3d模型数据管理接口
*/
@RestController
@RequestMapping("/api/map3dModel")
@Slf4j
@ -23,13 +23,17 @@ public class Map3dModelController {
@Autowired
private IMap3dModelService iMap3dModelService;
@ApiOperation(value = "获取所有有效地图3d模型数据")
/**
*获取所有有效地图3d模型数据
*/
@GetMapping(path = "/all")
public List<Map3dModelVO> findAllModels() {
return this.iMap3dModelService.findAllModels();
}
@ApiOperation("按类型查询有效的数据")
/**
*按类型查询有效的数据
*/
@GetMapping("")
public List<Map3dModelVO> query(String resourceType) {
return this.iMap3dModelService.query(resourceType);
@ -40,13 +44,17 @@ public class Map3dModelController {
this.iMap3dModelService.update(updateVO);
}
@ApiOperation(value = "创建地图3d模型数据")
/**
*创建地图3d模型数据
*/
@PostMapping("")
public void create(@RequestBody @Validated Map3dModelCreateVO createVO, @RequestAttribute AccountVO user) {
iMap3dModelService.create(createVO, user);
}
@ApiOperation(value = "删除地图3d模型数据")
/**
*删除地图3d模型数据
*/
@DeleteMapping("/{id}/delete")
public void delete(@PathVariable Long id) {
iMap3dModelService.delete(id);

View File

@ -11,8 +11,6 @@ import club.joylink.rtss.vo.client.training.definition.OperateStepVO;
import club.joylink.rtss.vo.client.validGroup.OperateBatchCreateCheck;
import club.joylink.rtss.vo.client.validGroup.OperateSignleCreateCheck;
import club.joylink.rtss.vo.client.validGroup.ValidList;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@ -20,7 +18,9 @@ import org.springframework.web.bind.annotation.*;
import javax.validation.constraints.NotBlank;
import java.util.List;
@Api(tags = { "操作管理接口" })
/**
*操作管理接口
*/
@RestController
@RequestMapping(path = "/api/operate")
public class OperateController {
@ -32,75 +32,99 @@ public class OperateController {
this.iOperateService = iOperateService;
}
@ApiOperation(value = "创建操作定义")
/**
*创建操作定义
*/
@PostMapping(path = "")
public void create(@RequestBody @Validated(value = {OperateSignleCreateCheck.class}) OperateDefinitionVO definitionVO) {
this.iOperateService.create(definitionVO);
}
@ApiOperation(value = "分页查询操作定义")
/**
*分页查询操作定义
*/
@GetMapping(path = "")
public PageVO<OperateDefinitionVO> queryPagedOperateDefinition(OperateDefinitionQueryVO queryVO) {
return this.iOperateService.queryPagedOperateDefinition(queryVO);
}
@ApiOperation(value = "修改操作定义")
/**
*修改操作定义
*/
@PutMapping(path = "/{id}")
public void updateDefinition(@PathVariable Long id, @RequestBody @Validated(value = {OperateSignleCreateCheck.class}) OperateDefinitionVO definitionVO) {
this.iOperateService.update(id, definitionVO);
}
@ApiOperation(value = "删除操作定义")
/**
*删除操作定义
*/
@DeleteMapping(path = "/{id}")
public void deleteDefinition(@PathVariable Long id) {
this.iOperateService.delete(id);
}
@ApiOperation(value = "创建操作步骤")
/**
*创建操作步骤
*/
@PostMapping(path = "/{definitionId}/step")
public void createStep(@PathVariable Long definitionId, @RequestBody @Validated(value = {OperateSignleCreateCheck.class}) OperateStepVO stepVO) {
this.iOperateService.createStep(definitionId, stepVO);
}
@ApiOperation(value = "分页查询操作步骤")
/**
*分页查询操作步骤
*/
@GetMapping(path = "/{definitionId}/step")
public PageVO<OperateStepVO> queryPagedOperateStep(@PathVariable Long definitionId, PageQueryVO queryVO) {
return this.iOperateService.queryPagedOperateStep(definitionId, queryVO);
}
@ApiOperation(value = "修改操作步骤")
/**
*修改操作步骤
*/
@PutMapping(path = "/step/{id}")
public void updateStep(@PathVariable Long id, @RequestBody @Validated(value = {OperateSignleCreateCheck.class}) OperateStepVO stepVO) {
this.iOperateService.updateStep(id, stepVO);
}
@ApiOperation(value = "删除操作步骤")
/**
*删除操作步骤
*/
@DeleteMapping(path = "/step/{id}")
public void deleteStep(@PathVariable Long id) {
this.iOperateService.deleteStep(id);
}
@ApiOperation(value = "获取实训类型下的操作类型")
/**
*获取实训类型下的操作类型
*/
@GetMapping(path = "/type")
public List<TreeNode> queryOperateType(Long mapId, String productType) {
return this.iOperateService.queryOperateTypes(mapId, productType);
}
@ApiOperation(value = "生成操作")
/**
*生成操作
*/
@PostMapping(path = "/{mapId}/generate")
public void generate(@PathVariable Long mapId,
@RequestBody @Validated(value = {OperateBatchCreateCheck.class}) ValidList<OperateDefinitionVO> definitionVOList) {
this.iOperateService.generate(mapId, definitionVOList);
}
@ApiOperation(value = "另存为")
/**
*另存为
*/
@PostMapping(path = "/{mapId}/saveAs/{other}")
public void saveAs(@PathVariable @NotBlank Long mapId,
@PathVariable @NotBlank Long other) {
this.iOperateService.saveAs(mapId, other);
}
@ApiOperation(value = "查询占位数据列表")
/**
*查询占位数据列表
*/
@GetMapping(path = "/placeholder")
public List<OperatePlaceholderVO> queryPlaceholder(String trainingType) {
return this.iOperateService.queryPlaceholder(trainingType);

View File

@ -10,16 +10,15 @@ import club.joylink.rtss.vo.client.LessonVO;
import club.joylink.rtss.vo.client.Node;
import club.joylink.rtss.vo.client.PageVO;
import club.joylink.rtss.vo.client.org.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import java.util.List;
@Api(tags = {"组织成员管理接口"})
/**
*组织成员管理接口
*/
@RestController
@RequestMapping("/api/company")
public class OrgController {
@ -39,232 +38,308 @@ public class OrgController {
@Autowired
private IOrgExamService iOrgExamService;
@ApiOperation(value = "创建顶级组织")
/**
*创建顶级组织
*/
@PostMapping
public CompanyVO create(@RequestBody @Validated CompanyVO company, @RequestAttribute(AuthenticateInterceptor.LOGIN_USER_KEY) AccountVO user) {
return iOrgService.createTopOrg(company, user);
}
@ApiOperation(value = "获取公司列表")
/**
*获取公司列表
*/
@GetMapping
public List<CompanyVO> queryAll() {
return iOrgService.queryAllTopOrg();
}
@ApiOperation(value = "分页获取公司列表")
/**
*分页获取公司列表
*/
@GetMapping("paging")
public PageVO<CompanyVO> pagingQueryAll(OrgQueryVO queryVO) {
return iOrgService.pagedQueryAllTopOrg(queryVO);
}
@ApiOperation(value = "查询公司信息")
/**
*查询公司信息
*/
@GetMapping("{id}")
public CompanyVO get(@PathVariable Long id) {
return iOrgService.get(id);
}
@ApiOperation(value = "更新公司信息")
/**
*更新公司信息
*/
@PutMapping("{id}")
public CompanyVO updateCompany(@PathVariable Long id, @RequestBody @Validated CompanyVO company, @RequestAttribute AccountVO user) {
return iOrgService.updateOrg(id, company, user);
}
@ApiOperation(value = "微信小程用户绑定为单位管理员")
/**
*微信小程用户绑定为单位管理员
*/
@PutMapping(path = "/bind/company")
public CompanyVO userScanCodeBindCompany(Long userId, Long companyId) {
return iOrgUserService.userScanCodeBindCompanyManager(userId, companyId);
}
@ApiOperation(value = "添加部门信息")
/**
*添加部门信息
*/
@PostMapping(path = "/dept")
public DepartmentVO createDepart(@RequestBody @Validated DepartmentVO departmentVO) {
return iOrgUserService.createDepart(departmentVO);
}
@ApiOperation(value = "获取单位所有部门")
/**
*获取单位所有部门
*/
@GetMapping(path = "{companyId}/dept")
public List<DepartmentVO> queryCompanyDepart(@PathVariable Long companyId) {
return iOrgUserService.getCompanyAllDepart(companyId);
}
@ApiOperation(value = "获取部门及其子树")
/**
*获取部门及其子树
*/
@GetMapping(path = "{companyId}/dept/{deptId}/tree")
public DepartmentVO queryDepartTree(@PathVariable Long deptId, @PathVariable Long companyId) {
return iOrgUserService.getDepartTree(companyId, deptId);
}
@ApiOperation(value = "获取部门及其子部门")
/**
*获取部门及其子部门
*/
@GetMapping(path = "{companyId}/dept/{deptId}")
public List<DepartmentVO> queryDepart(@PathVariable Long deptId, @PathVariable Long companyId) {
return iOrgUserService.getDepartAndChild(companyId, deptId);
}
@ApiOperation(value = "删除部门信息")
/**
*删除部门信息
*/
@DeleteMapping("/dept/{deptId}")
public void deleteDepart(@PathVariable Long deptId) {
iOrgService.deleteNonTopOrg(deptId);
}
@ApiOperation(value = "查询部门信息")
/**
*查询部门信息
*/
@GetMapping("/dept/{deptId}")
public DepartmentVO getDepart(@PathVariable Long deptId) {
return iOrgUserService.getDepartById(deptId);
}
@ApiOperation(value = "更新部门信息")
/**
*更新部门信息
*/
@PutMapping("/dept/{id}")
public void updateDepartInfo(@PathVariable Long id, @RequestBody @Validated DepartmentVO departmentVO) {
iOrgUserService.updateDepartInfo(id, departmentVO);
}
@ApiOperation(value = "添加单位成员关系信息")
/**
*添加单位成员关系信息
*/
@PostMapping("refUserInfo")
public void addCompanyUserInfo(@RequestAttribute @ApiIgnore AccountVO user, @RequestBody UserDepartRelVO userDepartRelVO) {
public void addCompanyUserInfo(@RequestAttribute AccountVO user, @RequestBody UserDepartRelVO userDepartRelVO) {
iOrgUserService.addDepartUserInfo(user, userDepartRelVO);
}
@ApiOperation(value = "更新单位成员关系信息")
/**
*更新单位成员关系信息
*/
@PutMapping("refUserInfo")
public void updateCompanyUserInfo(@RequestAttribute @ApiIgnore AccountVO user, @RequestBody UserDepartRelVO userDepartRelVO) {
public void updateCompanyUserInfo(@RequestAttribute AccountVO user, @RequestBody UserDepartRelVO userDepartRelVO) {
iOrgUserService.updateDepartUserInfo(user, userDepartRelVO);
}
@ApiOperation(value = "取消单位的部门成员关系")
/**
*取消单位的部门成员关系
*/
@DeleteMapping("departUserInfo")
public void deleteCompanyUserInfo(@RequestAttribute @ApiIgnore AccountVO user, @RequestBody @Validated UserDepartRelVO userDepartRelVO) {
public void deleteCompanyUserInfo(@RequestAttribute AccountVO user, @RequestBody @Validated UserDepartRelVO userDepartRelVO) {
iOrgUserService.deleteDepartUserInfo(user, userDepartRelVO);
}
@ApiOperation(value = "分页获取班级学生信息")
/**
*分页获取班级学生信息
*/
@GetMapping("/dept/{clsId}/departUserInfo")
public PageVO<OrgUserVO> getCompanyUserInfo(@RequestAttribute @ApiIgnore AccountVO user, @PathVariable Integer clsId, CompanyUserQueryVO companyUserQueryVO) {
public PageVO<OrgUserVO> getCompanyUserInfo(@RequestAttribute AccountVO user, @PathVariable Integer clsId, CompanyUserQueryVO companyUserQueryVO) {
return iOrgUserService.getCompanyDepartUserInfoList(user, clsId, companyUserQueryVO);
}
@ApiOperation(value = "导入单位成员信息")
/**
*导入单位成员信息
*/
@PostMapping("{clsId}/departUserInfo/import")
public void importCompanyUserInfo(@RequestAttribute @ApiIgnore AccountVO user, @PathVariable Long clsId, @RequestBody List<ImportOrgUserVO> importOrgUsers) {
public void importCompanyUserInfo(@RequestAttribute AccountVO user, @PathVariable Long clsId, @RequestBody List<ImportOrgUserVO> importOrgUsers) {
iOrgUserService.importCompanyUserInfo(user, clsId, importOrgUsers);
}
@ApiOperation(value = "获取单位用户的部门信息")
/**
*获取单位用户的部门信息
*/
@GetMapping("{companyId}/userDeparts")
public List<OrgUserVO> getUserCompanyDeparts(@RequestAttribute @ApiIgnore AccountVO user, @PathVariable Integer companyId) {
public List<OrgUserVO> getUserCompanyDeparts(@RequestAttribute AccountVO user, @PathVariable Integer companyId) {
return iOrgUserService.getUserCompanyDeparts(user, companyId);
}
@ApiOperation("查询自己给该组织(班级)排的课")
/**
*查询自己给该组织班级排的课
*/
@GetMapping("/orgLesson/{orgId}/list")
public List<LessonVO> queryOrgLessonICreated(@PathVariable Long orgId, @RequestAttribute AccountVO user) {
return iOrgLessonService.queryOrgLessonICreated(orgId, user);
}
@ApiOperation("修改班级-课程关系")
/**
*修改班级-课程关系
*/
@PutMapping("/orgLesson/{clsId}/update")
public void updateOrgLesson(@PathVariable Long clsId, @RequestBody List<Long> lessonIds, @RequestAttribute LoginUserInfoVO loginInfo) {
iOrgLessonService.updateOrgLesson(clsId, lessonIds, loginInfo);
}
@ApiOperation("给班级添加学生")
/**
*给班级添加学生
*/
@PostMapping("/orgUser/{clsId}/addStudent")
public void addStudent(@PathVariable Long clsId, @RequestBody ImportOrgUserVO importVO, @RequestAttribute AccountVO user) {
iOrgUserService.addStudent(clsId, importVO, user);
}
@ApiOperation("创建班级")
/**
*创建班级
*/
@PostMapping("/org/cls/create")
public void createCls(@RequestBody NonTopOrgCreateVO createVO, @RequestAttribute LoginUserInfoVO loginInfo) {
iOrgService.createCls(createVO, loginInfo);
}
@ApiOperation("分页查询当前登录项目所属组织下的班级")
/**
*分页查询当前登录项目所属组织下的班级
*/
@GetMapping("/paged/cls")
public PageVO<DepartmentVO> pagedQuerySelfCls(OrgQueryVO queryVO, @RequestAttribute LoginUserInfoVO loginInfo) {
return iOrgService.pagedQueryCls(queryVO, loginInfo);
}
@ApiOperation("查询当前登录项目所属组织下的班级")
/**
*查询当前登录项目所属组织下的班级
*/
@GetMapping("/list/cls")
public List<DepartmentVO> queryCls(OrgQueryVO queryVO, @RequestAttribute LoginUserInfoVO loginInfo) {
return iOrgService.queryCls(queryVO, loginInfo);
}
@ApiOperation("创建评价规则")
/**
*创建评价规则
*/
@PostMapping("/orgScoringRule")
public void createScoringRule(@RequestBody OrgScoringRuleVO orgScoringRuleVO, @RequestAttribute LoginUserInfoVO loginInfo) {
iOrgScoringRuleService.createScoringRule(orgScoringRuleVO, loginInfo);
}
@ApiOperation("更新评价规则")
/**
*更新评价规则
*/
@PutMapping("/orgScoringRule")
public void UpdateScoringRule(@RequestBody OrgScoringRuleVO orgScoringRuleVO, @RequestAttribute AccountVO user) {
iOrgScoringRuleService.updateScoringRule(orgScoringRuleVO, user);
}
@ApiOperation("查询自己创建的评价规则基础信息")
/**
*查询自己创建的评价规则基础信息
*/
@GetMapping("/orgScoringRule/basicInfo/self/paged")
public PageVO<OrgScoringRuleVO> queryOrgScoringRuleBasicInfo(OrgScoringRuleQueryVO queryVO, @RequestAttribute AccountVO user) {
return iOrgScoringRuleService.queryBasicInfo(queryVO, user);
}
@ApiOperation("查询自己创建的指定评价规则详细信息")
/**
*查询自己创建的指定评价规则详细信息
*/
@GetMapping("/orgScoringRule/details/self/{orgId}/{schoolYear}/{term}")
public OrgScoringRuleVO queryOrgScoringRuleDetails(@PathVariable Long orgId, @PathVariable String schoolYear,
@PathVariable Integer term, @RequestAttribute LoginUserInfoVO loginInfo) {
return iOrgScoringRuleService.queryOrgScoringRuleDetails(orgId, schoolYear, term, loginInfo);
}
@ApiOperation("查询指定评价规则详细信息")
/**
*查询指定评价规则详细信息
*/
@GetMapping("/orgScoringRule/details/self/{ruleId}")
public OrgScoringRuleVO queryOrgScoringRuleDetails(@PathVariable Long ruleId) {
return iOrgScoringRuleService.getOrgScoringRuleDetails(ruleId);
}
@ApiOperation("获取评价规则的评分结果")
/**
*获取评价规则的评分结果
*/
@GetMapping("/orgScoringRule/score/{orgId}/{schoolYear}/{term}")
public List<OrgScoringResultVO> score(@PathVariable Long orgId, @PathVariable String schoolYear,
@PathVariable Integer term, @RequestAttribute LoginUserInfoVO loginInfo) {
return iOrgScoringRuleService.score(orgId, schoolYear, term, loginInfo);
}
@ApiOperation("删除评分规则")
/**
*删除评分规则
*/
@DeleteMapping("/orgScoringRule/details/self/{ruleId}")
public void deleteScoringRule(@PathVariable Long ruleId, @RequestAttribute AccountVO user) {
iOrgScoringRuleService.deleteRuleOfSelf(ruleId, user.getId());
}
@ApiOperation("查询规则能够应用到的组织")
/**
*查询规则能够应用到的组织
*/
@GetMapping("/orgScoringRule/{ruleId}/canApplyTo")
public List<DepartmentVO> queryRuleCanApplyTo(@PathVariable Long ruleId, @RequestAttribute AccountVO user) {
return iOrgScoringRuleService.queryRuleCanApplyTo(ruleId, user);
}
@ApiOperation("将评价规则应用到")
/**
*将评价规则应用到
*/
@PostMapping("/orgScoringRule/{ruleId}/apply")
public void applyOrgScoringRule(@PathVariable Long ruleId, @RequestBody List<Long> orgIds) {
iOrgScoringRuleService.applyOrgScoringRule(ruleId, orgIds);
}
@ApiOperation("给班级安排考试")
/**
*给班级安排考试
*/
@PostMapping("/orgExam/{clsId}")
public void createOrgExam(@PathVariable Long clsId, @RequestBody List<Long> examIds, @RequestAttribute AccountVO user) {
iOrgExamService.create(clsId, examIds, user);
}
@ApiOperation("查询班级安排的考试id")
/**
*查询班级安排的考试id
*/
@GetMapping("/orgExam/{clsId}/list")
public List<String> queryOrgExam(@PathVariable Long clsId, @RequestAttribute AccountVO user) {
return iOrgExamService.queryOrgExam(clsId, user);
}
@Role(RoleEnum.Admin)
@ApiOperation("管理员查看组织树")
/**
*管理员查看组织树
*/
@GetMapping("/orgTree/{orgId}")
public Node<Object> adminQueryOrgTree(@PathVariable Long orgId, @RequestAttribute AccountVO user) {
return iOrgService.adminQueryOrgTree(orgId);
}
@ApiOperation("获取学生实训使用时长")
/**
*获取学生实训使用时长
*/
@GetMapping("/usage/students")
public List<StudentsUsageStatisticsVO> statisticUsage(@Validated UsageQueryVO queryVO) {
return iOrgUserService.statisticUsage(queryVO);

View File

@ -1,22 +1,16 @@
package club.joylink.rtss.controller;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
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 club.joylink.rtss.services.IOrganizationService;
import club.joylink.rtss.vo.client.OrganizationVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import java.util.List;
@Api(tags = {"组织/企业管理接口"})
/**
* 组织/企业管理接口
*/
@RestController
@RequestMapping("/api/organization")
public class OrganizationController {
@ -24,14 +18,21 @@ public class OrganizationController {
@Autowired
private IOrganizationService iOrganizationService;
@ApiOperation(value = "获取组织/企业数据")
/**
* 获取组织/企业数据
* @return
*/
@GetMapping(path = "")
public List<OrganizationVO> queryOrganization() {
List<OrganizationVO> list = this.iOrganizationService.queryOrganization();
return list;
}
@ApiOperation(value = "添加组织/企业")
/**
* 添加组织/企业
* @param organization
* @return
*/
@PostMapping(path = "")
public OrganizationVO create(@RequestBody @Validated OrganizationVO organization) {
OrganizationVO org = this.iOrganizationService.create(organization);

View File

@ -9,16 +9,15 @@ import club.joylink.rtss.vo.client.runplan.RunPlanQueryVO;
import club.joylink.rtss.vo.client.runplan.RunPlanVO;
import club.joylink.rtss.vo.client.script.ScriptQueryVO;
import club.joylink.rtss.vo.client.script.ScriptVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import java.util.List;
@Api(tags = { "发布审核接口" })
/**
*发布审核接口
*/
@RestController
@RequestMapping("/api/review")
public class ReleaseReviewController {
@ -26,89 +25,117 @@ public class ReleaseReviewController {
@Autowired
private IReleaseReviewService iReleaseReviewService;
@ApiOperation(value = "分页获取待审核的草稿课程")
/**
*分页获取待审核的草稿课程
*/
@GetMapping(path = "/query/lesson")
public PageVO<LessonVO> queryPendingReviewLesson(ReleaseReviewQueryVO queryVO){
return iReleaseReviewService.queryPendingReviewLesson(queryVO);
}
@ApiOperation(value = "发布课程")
/**
*发布课程
*/
@PostMapping(path="/{id}/publishLesson")
public void publishLesson(@PathVariable Long id, @RequestBody @Validated LessonPublishVO publishVO) {
iReleaseReviewService.publishLesson(id, publishVO);
}
@ApiOperation(value = "课程申请驳回")
/**
*课程申请驳回
*/
@PostMapping(path = "/lesson/{id}")
public void rejectLesson(@PathVariable Long id, @RequestBody ReleaseReviewQueryVO queryVO){
iReleaseReviewService.rejectLesson(id,queryVO.getExplanation());
}
@ApiOperation(value = "用户申请发布课程或者撤销课程申请")
/**
*用户申请发布课程或者撤销课程申请
*/
@GetMapping(path = "/lesson/releaseOrCancel/{id}/{status}")
public void applicationForReleaseOrCancelLesson(@PathVariable Long id,@PathVariable String status){
iReleaseReviewService.applicationForReleaseOrCancelLesson(id,status);
}
@ApiOperation(value = "预览课程")
/**
*预览课程
*/
@GetMapping(path = "/previewLesson/{id}")
public List<TreeNode> previewLesson(@PathVariable Long id){
return iReleaseReviewService.previewLesson(id);
}
//----------------------------------------
@ApiOperation(value = "分页获取待审核的草稿剧本")
/**
*分页获取待审核的草稿剧本
*/
@GetMapping(path = "/query/script")
public PageVO<ScriptVO> queryPendingReviewScript(ScriptQueryVO queryVO){
return iReleaseReviewService.queryPendingReviewScript(queryVO);
}
@ApiOperation(value = "发布剧本")
/**
*发布剧本
*/
@PostMapping(path="/{id}/publishScript")
public void publishScript(@PathVariable Long id, @ApiIgnore @RequestAttribute AccountVO user){
public void publishScript(@PathVariable Long id, @RequestAttribute AccountVO user){
iReleaseReviewService.publishScript(id, user);
}
@ApiOperation(value = "剧本申请驳回")
/**
*剧本申请驳回
*/
@PostMapping(path = "/script/{id}")
public void rejectScript(@PathVariable Long id, @RequestBody @Validated ReleaseReviewVO releaseReviewVO){
iReleaseReviewService.rejectScript(id, releaseReviewVO);
}
//------------------------------------
@ApiOperation(value = "分页获取待审核的草稿运行图")
/**
*分页获取待审核的草稿运行图
*/
@GetMapping(path = "/query/runPlan")
public PageVO<RunPlanVO> queryPendingReviewRunPlan(RunPlanQueryVO queryVO){
return iReleaseReviewService.queryPendingReviewRunPlan(queryVO);
}
@ApiOperation(value = "发布运行图")
/**
*发布运行图
*/
@PostMapping(path = "/{planId}/publishRunPlan")
public List<String> publishRunPlan(@PathVariable Long planId, @ApiIgnore @RequestAttribute AccountVO user){
public List<String> publishRunPlan(@PathVariable Long planId, @RequestAttribute AccountVO user){
return iReleaseReviewService.publishRunPlan(planId, user);
}
@ApiOperation(value = "直接发布运行图")
/**
*直接发布运行图
*/
@PostMapping(path = "/{planId}/directPublishRunPlan")
public List<String> directPublishRunPlan(@PathVariable Long planId, String runPlanName, @ApiIgnore @RequestAttribute AccountVO user){
public List<String> directPublishRunPlan(@PathVariable Long planId, String runPlanName, @RequestAttribute AccountVO user){
return iReleaseReviewService.directPublishRunPlan(planId, runPlanName, user);
}
@ApiOperation(value = "运行图申请驳回")
/**
*运行图申请驳回
*/
@PostMapping(path = "/runPlan/{id}")
public void rejectRunPlan(@PathVariable Long id,@RequestBody ReleaseReviewQueryVO queryVO){
iReleaseReviewService.rejectRunPlan(id,queryVO.getExplanation());
}
@ApiOperation(value = "用户申请发布运行图或者撤销运行图申请")
/**
*用户申请发布运行图或者撤销运行图申请
*/
@GetMapping(path = "/runPlan/releaseOrCancel/{id}/{status}")
public void applicationForReleaseOrCancelRunPlan(@PathVariable Long id, @PathVariable String status){
iReleaseReviewService.applicationForReleaseOrCancelRunPlan(id,status);
}
@ApiOperation(value = "预览运行图")
/**
*预览运行图
*/
@GetMapping(path = "/previewRunPlan/{planId}")
public String reviewRunPlan(@PathVariable Long planId,@ApiIgnore @RequestAttribute(name = AuthenticateInterceptor.LOGIN_INFO_KEY)
public String reviewRunPlan(@PathVariable Long planId, @RequestAttribute(name = AuthenticateInterceptor.LOGIN_INFO_KEY)
LoginUserInfoVO loginUserInfoVO){
return iReleaseReviewService.previewRunPlan(planId,loginUserInfoVO);
}

View File

@ -1,30 +1,16 @@
package club.joylink.rtss.controller;
import club.joylink.rtss.services.rpTools.RunPlanToolsService;
import club.joylink.rtss.vo.client.rpTools.AreaVO;
import club.joylink.rtss.vo.client.rpTools.MapStationVO;
import club.joylink.rtss.vo.client.rpTools.MapVO;
import club.joylink.rtss.vo.client.rpTools.RunPlanConfigVO;
import club.joylink.rtss.vo.client.rpTools.RunPlanDataVO;
import club.joylink.rtss.vo.client.rpTools.RunPlanGroupVO;
import club.joylink.rtss.vo.client.rpTools.TripAddVO;
import club.joylink.rtss.vo.client.rpTools.TripChangeVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import club.joylink.rtss.vo.client.rpTools.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@Api(tags = "运行图工具接口")
/**
*运行图工具接口
*/
@RestController
@RequestMapping(path = "/api/rpTools")
public class RunPlanToolsController {
@ -32,139 +18,185 @@ public class RunPlanToolsController {
@Autowired
private RunPlanToolsService runPlanToolsService;
@ApiOperation(value = "查询线路列表")
/**
*查询线路列表
*/
@GetMapping(path = "/map")
public List<MapVO> listMap() {
return runPlanToolsService.listMap();
}
@ApiOperation(value = "查询线路车站列表")
/**
*查询线路车站列表
*/
@GetMapping(path = "/{mapId}/station")
public List<MapStationVO> listMapStation(@PathVariable Long mapId) {
return runPlanToolsService.listMapStation(mapId);
}
@ApiOperation(value = "更新线路车站")
/**
*更新线路车站
*/
@PutMapping(path = "/station/{stationId}")
public void updateStation(@PathVariable Long stationId, @RequestBody MapStationVO stationVO) {
runPlanToolsService.updateStation(stationId, stationVO);
}
@ApiOperation(value = "查询运行图列表")
/**
*查询运行图列表
*/
@GetMapping(path = "")
public List<RunPlanGroupVO> listRunPlan() {
return runPlanToolsService.listRunPlan();
}
@ApiOperation(value = "创建新运行图")
/**
*创建新运行图
*/
@PostMapping(path = "")
public Long create(@RequestBody @Validated RunPlanGroupVO groupVO) {
return runPlanToolsService.create(groupVO);
}
@ApiOperation(value = "获取运行图数据")
/**
*获取运行图数据
*/
@GetMapping(path = "/{planId}")
public RunPlanDataVO getRunPlanECharts(@PathVariable Long planId) {
return runPlanToolsService.getRunPlanECharts(planId);
}
@ApiOperation(value = "获取运行图配置")
/**
*获取运行图配置
*/
@GetMapping(path = "/{planId}/config")
public RunPlanConfigVO getRunPlanConfig(@PathVariable Long planId) {
return runPlanToolsService.getRunPlanConfig(planId);
}
@ApiOperation(value = "修改运行图配置")
/**
*修改运行图配置
*/
@PutMapping(path = "/{planId}/config")
public void setRunPlanConfig(@PathVariable Long planId, @RequestBody RunPlanConfigVO configVO) {
runPlanToolsService.setRunPlanConfig(planId, configVO);
}
@ApiOperation(value = "编辑运行图")
/**
*编辑运行图
*/
@PutMapping(path = "/{planId}/edit")
public Boolean editPlan(@PathVariable Long planId) {
return runPlanToolsService.editPlan(planId);
}
@ApiOperation(value = "结束编辑")
/**
*结束编辑
*/
@PutMapping(path = "/{planId}/endEdit")
public void endEdit(@PathVariable Long planId) {
runPlanToolsService.endEdit(planId);
}
@ApiOperation(value = "添加车次")
/**
*添加车次
*/
@PostMapping(path = "/{planId}/trip")
public void addTrip(@PathVariable Long planId, @RequestBody @Validated TripAddVO tripAddVO) {
runPlanToolsService.addTrip(planId, tripAddVO);
}
@ApiOperation(value = "修改站间运行时间")
/**
*修改站间运行时间
*/
@PutMapping(path = "/{planId}/{tripNo}/running")
public void changeArrivalTime(@PathVariable Long planId, @PathVariable Integer tripNo, @RequestBody @Validated TripChangeVO tripChangeVO) {
runPlanToolsService.changeRunningTime(planId, tripNo, tripChangeVO);
}
@ApiOperation(value = "修改停站时间")
/**
*修改停站时间
*/
@PutMapping(path = "/{planId}/{tripNo}/stop")
public void changeDepartureTime(@PathVariable Long planId, @PathVariable Integer tripNo, @RequestBody @Validated TripChangeVO tripChangeVO) {
runPlanToolsService.changeStopTime(planId, tripNo, tripChangeVO);
}
@ApiOperation(value = "平移服务")
/**
*平移服务
*/
@PutMapping(path = "/{planId}/{serviceNo}/service")
public void changeServiceTime(@PathVariable Long planId, @PathVariable Integer serviceNo, @RequestBody TripChangeVO tripChangeVO) {
runPlanToolsService.changeServiceTime(planId, serviceNo, tripChangeVO);
}
@ApiOperation(value = "修改折返时间")
/**
*修改折返时间
*/
@PutMapping(path = "/{planId}/{tripNo}/turnBack")
public void changeTurnBackTime(@PathVariable Long planId, @PathVariable Integer tripNo, @RequestBody TripChangeVO tripChangeVO) {
runPlanToolsService.changeTurnBackTime(planId, tripNo, tripChangeVO);
}
@ApiOperation(value = "删除车次")
/**
*删除车次
*/
@DeleteMapping(path = "/{planId}/{tripNo}/trip")
public void deleteTrip(@PathVariable Long planId, @PathVariable Integer tripNo) {
runPlanToolsService.deleteTrip(planId, tripNo);
}
@ApiOperation(value = "删除服务")
/**
*删除服务
*/
@DeleteMapping(path = "/{planId}/{serviceNo}/service")
public void deleteService(@PathVariable Long planId, @PathVariable Integer serviceNo) {
runPlanToolsService.deleteService(planId, serviceNo);
}
@ApiOperation(value = "添加施工区域")
/**
*添加施工区域
*/
@PostMapping(path = "/{planId}/area")
public void addArea(@PathVariable Long planId, @RequestBody @Validated AreaVO areaVO) {
runPlanToolsService.addArea(planId, areaVO);
}
@ApiOperation(value = "修改区域")
/**
*修改区域
*/
@PutMapping(path = "/{planId}/{areaNo}/area")
public void changeArea(@PathVariable Long planId, @PathVariable Integer areaNo, @RequestBody @Validated AreaVO areaVO) {
runPlanToolsService.changeArea(planId, areaNo, areaVO);
}
@ApiOperation(value = "修改区域文字")
/**
*修改区域文字
*/
@PutMapping(path = "/{planId}/{areaNo}/text")
public void changeAreaText(@PathVariable Long planId, @PathVariable Integer areaNo, @RequestBody AreaVO areaVO) {
runPlanToolsService.changeAreaText(planId, areaNo, areaVO);
}
@ApiOperation(value = "删除区域")
/**
*删除区域
*/
@DeleteMapping(path = "/{planId}/{areaNo}/area")
public void deleteArea(@PathVariable Long planId, @PathVariable Integer areaNo) {
runPlanToolsService.deleteArea(planId, areaNo);
}
@ApiOperation(value = "清除数据")
/**
*清除数据
*/
@PutMapping(path = "/{planId}/clear")
public void clear(@PathVariable Long planId) {
runPlanToolsService.clear(planId);
}
@ApiOperation(value = "删除运行图")
/**
*删除运行图
*/
@DeleteMapping(path = "/{groupId}")
public void delete(@PathVariable Long groupId) {
runPlanToolsService.delete(groupId);

View File

@ -8,16 +8,15 @@ import club.joylink.rtss.vo.client.PageVO;
import club.joylink.rtss.vo.client.notice.SysNoticePageQueryVO;
import club.joylink.rtss.vo.client.notice.SystemNoticeVO;
import club.joylink.rtss.vo.client.notice.UserSysnoticeUnreadVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import java.util.List;
@Api(tags = {"系统通知接口"})
/**
*系统通知接口
*/
@RestController
@RequestMapping(path = "api/v1/sysNotice")
public class SysNoticeController {
@ -25,37 +24,47 @@ public class SysNoticeController {
@Autowired
private ISystemNoticeService systemNoticeService;
@ApiOperation(value = "通知")
/**
*通知
*/
@PostMapping
@Role(RoleEnum.SuperAdmin)
public void notice(@ApiIgnore @RequestAttribute AccountVO user, String noticeType, @RequestBody @Validated SystemNoticeVO sysNotice) {
public void notice(@RequestAttribute AccountVO user, String noticeType, @RequestBody @Validated SystemNoticeVO sysNotice) {
sysNotice.setCreator(user.getId());
systemNoticeService.notice(sysNotice, noticeType);
}
@ApiOperation(value = "分页查询通知")
/**
*分页查询通知
*/
@GetMapping(path = "/paging")
public PageVO<SystemNoticeVO> pagingQuery(SysNoticePageQueryVO pageQueryVO) {
return systemNoticeService.pagingQuerySysNotice(pageQueryVO);
}
@ApiOperation(value = "删除通知")
/**
*删除通知
*/
@DeleteMapping
@Role(RoleEnum.SuperAdmin)
public void deleteSysNotice(@RequestBody List<Long> sysNoticeIds) {
systemNoticeService.deleteSysNotice(sysNoticeIds);
}
@ApiOperation(value = "用户查询未读通知")
/**
*用户查询未读通知
*/
@GetMapping(path = "/unread")
public UserSysnoticeUnreadVO loadCompetitionPaper(@ApiIgnore @RequestAttribute AccountVO user) {
public UserSysnoticeUnreadVO loadCompetitionPaper(@RequestAttribute AccountVO user) {
return systemNoticeService.getUserRelUnreadNotice(user);
}
@ApiOperation(value = "用户设置已读未读")
/**
*用户设置已读未读
*/
@PutMapping(path = "/read")
public void getCompetitionPaper(@ApiIgnore @RequestAttribute AccountVO user, @RequestBody List<Long> sysNoticeIds, @RequestParam(defaultValue = "true",required = false) boolean read) {
public void getCompetitionPaper(@RequestAttribute AccountVO user, @RequestBody List<Long> sysNoticeIds, @RequestParam(defaultValue = "true",required = false) boolean read) {
systemNoticeService.setUserSysNoticeReadStatus(user, sysNoticeIds, read);
}

View File

@ -1,9 +1,7 @@
package club.joylink.rtss.controller;
import club.joylink.rtss.simulation.cbtc.command.VoiceCommandBO;
import club.joylink.rtss.services.IVoiceCommandService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
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;
@ -12,20 +10,28 @@ import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@Api(tags = "语音指令接口")
/**
* 语音指令接口
*/
@RestController
@RequestMapping("/api/voiceCommand")
public class VoiceCommandController {
@Autowired
private IVoiceCommandService iVoiceCommandService;
@ApiOperation("添加语音指令")
/**
* 添加语音指令
* @param command
*/
@PostMapping("")
public void create(VoiceCommandBO command) {
iVoiceCommandService.create(command);
}
@ApiOperation("查询所有语音指令")
/**
* 查询所有语音指令
* @return
*/
@GetMapping("")
public List<VoiceCommandBO> getAll() {
return iVoiceCommandService.getAll();

View File

@ -9,7 +9,6 @@ import lombok.Getter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import java.util.List;
import java.util.stream.Collectors;
@ -28,7 +27,7 @@ public class CacheController {
}
@GetMapping(path = "/heartBeat")
public boolean heartBeat(@ApiIgnore @RequestAttribute AccountVO user) {
public boolean heartBeat(@RequestAttribute AccountVO user) {
return true;
}

View File

@ -15,20 +15,16 @@ import club.joylink.rtss.vo.client.userPermission.UserPermissionVO;
import club.joylink.rtss.vo.client.validGroup.competition.CompetitionUpdateCheck;
import club.joylink.rtss.vo.view.OperationStatisticAnswerView;
import com.fasterxml.jackson.annotation.JsonView;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import springfox.documentation.annotations.ApiIgnore;
import java.util.List;
/**
* 竞赛实操内容管理
*/
@Api(tags = {"竞赛实操内容管理"})
@RestController
@RequestMapping(path = "/api/v1/competitionPractical")
public class CompetitionPracticalController {
@ -36,163 +32,215 @@ public class CompetitionPracticalController {
@Autowired
private ICompetitionPracticalService iCompetitionPracticalService;
@ApiOperation("分页查询竞赛场景信息")
/**
*分页查询竞赛场景信息
*/
@GetMapping("")
public PageVO<CompetitionVO> pagedQueryCompetition(CompetitionPagedQueryVO queryVO) {
return iCompetitionPracticalService.pagedQueryCompetition(queryVO);
}
@ApiOperation("查询竞赛场景信息列表")
/**
*查询竞赛场景信息列表
*/
@GetMapping("/list")
public List<CompetitionVO> getCompetitionList() {
return iCompetitionPracticalService.getCompetitionList();
}
@ApiOperation("新增竞赛场景")
/**
*新增竞赛场景
*/
@PostMapping("")
public void createCompetition(@RequestBody @Validated CompetitionVO competitionVO) {
iCompetitionPracticalService.createCompetition(competitionVO);
}
@ApiOperation("更新竞赛场景基础信息")
/**
*更新竞赛场景基础信息
*/
@PutMapping("")
public void updateCompetition(@RequestBody @Validated(CompetitionUpdateCheck.class) CompetitionVO competitionVO) {
iCompetitionPracticalService.updateCompetition(competitionVO);
}
@ApiOperation("删除竞赛场景")
/**
*删除竞赛场景
*/
@DeleteMapping("/{id}")
public void deleteCompetition(@PathVariable Long id) {
iCompetitionPracticalService.deleteCompetition(id);
}
@ApiOperation("获取场景详细信息")
/**
*获取场景详细信息
*/
@GetMapping("/detail/{id}")
public CompetitionVO getDetail(@PathVariable Long id) {
return iCompetitionPracticalService.getDetail(id);
}
@ApiOperation("保存数据")
/**
*保存数据
*/
@PostMapping("/detail")
public void saveDetail(@RequestBody @Validated(value = CompetitionUpdateCheck.class) CompetitionVO competitionVO) {
iCompetitionPracticalService.saveDetail(competitionVO);
}
@ApiOperation("导出")
/**
*导出
*/
@GetMapping("/{id}/export")
public CompetitionWithBLOBs export(@PathVariable Long id) {
return iCompetitionPracticalService.export(id);
}
@ApiOperation("导入")
/**
*导入
*/
@PostMapping("/{scriptId}/import")
public void importFromJson(@PathVariable Long scriptId, String name, @RequestBody CompetitionWithBLOBs competition) {
iCompetitionPracticalService.importFromJson(scriptId, name, competition);
}
@ApiOperation("查询权限")
/**
*查询权限
*/
@GetMapping("/query/permissions")
public UserPermissionVO queryPermissions(Long mapId, @RequestAttribute AccountVO user) {
return iCompetitionPracticalService.queryPermissions(mapId, user);
}
@ApiOperation("购买权限")
/**
*购买权限
*/
@PostMapping("/purchasePermission")
public WxPayUnifiedOrderResultVO purchasePermission(Long mapId, Integer monthAmount, @RequestAttribute AccountVO user) {
return iCompetitionPracticalService.purchasePermission(mapId, monthAmount, user);
}
@Role(RoleEnum.SuperAdmin)
@ApiOperation("查询有场景录音数据的用户")
/**
*查询有场景录音数据的用户
*/
@GetMapping("/voice/record/users/{competitionId}")
public List<AccountVO> queryVoiceRecordUsers(@PathVariable Long competitionId) {
return iCompetitionPracticalService.queryVoiceRecordUsers(competitionId);
}
@ApiOperation("查询语音录制")
/**
*查询语音录制
*/
@GetMapping("/voice/record/query/{userId}/{competitionId}")
public List<CompetitionVoiceRecordVO> queryVoiceRecords(@PathVariable Long userId, @PathVariable Long competitionId) {
return iCompetitionPracticalService.queryVoiceRecords(userId, competitionId);
}
@ApiOperation("新增语音录制")
/**
*新增语音录制
*/
@PostMapping("/voice/record/{competitionId}/{cmdEvaRuleId}/{actionId}")
public CompetitionVoiceRecordVO voiceRecord(@PathVariable Long competitionId, @PathVariable Long cmdEvaRuleId, @PathVariable String actionId, MultipartFile file, @RequestAttribute AccountVO user) {
return iCompetitionPracticalService.voiceRecord(competitionId, cmdEvaRuleId, actionId, file, user);
}
@ApiOperation("更新语音录制")
/**
*更新语音录制
*/
@PutMapping("/voice/record/{recordId}")
public CompetitionVoiceRecordVO updateVoiceRecord(@PathVariable Long recordId, MultipartFile file, @RequestAttribute AccountVO user) {
return iCompetitionPracticalService.updateVoiceRecord(recordId, file, user);
}
@ApiOperation("语音录制校验")
/**
*语音录制校验
*/
@PostMapping("/voice/record/check/{recordId}")
public VoiceErrorVO voiceRecordCheck(@PathVariable Long recordId, @RequestBody CommandPublishStatisticVO commandPublishStatisticVO) {
return iCompetitionPracticalService.voiceRecordCheck(recordId, commandPublishStatisticVO);
}
@ApiOperation("语音录制校验(整个场景)")
/**
*语音录制校验整个场景
*/
@GetMapping("/voice/record/check/{competitionId}/{userId}")
public List<VoiceErrorVO> voiceRecordCheck(@PathVariable Long competitionId, @PathVariable Long userId) {
return iCompetitionPracticalService.voiceRecordCheck(competitionId, userId);
}
/* ------------------------- 竞赛运行相关 ------------------------- */
@ApiOperation("加载竞赛场景")
/**
*加载竞赛场景
*/
@PutMapping("/load/{group}/{id}")
public void loadCompetition(@PathVariable String group, @PathVariable Long id,
@ApiIgnore @RequestAttribute(name = AuthenticateInterceptor.LOGIN_INFO_KEY) LoginUserInfoVO userInfo) {
@RequestAttribute(name = AuthenticateInterceptor.LOGIN_INFO_KEY) LoginUserInfoVO userInfo) {
iCompetitionPracticalService.loadCompetition(group, id, userInfo);
}
@ApiOperation("小程序加载竞赛场景")
/**
*小程序加载竞赛场景
*/
@PutMapping("/load/{id}")
public String createSimulationAndLoadCompetition(@PathVariable Long id,
@ApiIgnore @RequestAttribute(name = AuthenticateInterceptor.LOGIN_INFO_KEY) LoginUserInfoVO userInfo) {
@RequestAttribute(name = AuthenticateInterceptor.LOGIN_INFO_KEY) LoginUserInfoVO userInfo) {
return iCompetitionPracticalService.createSimulationAndLoadCompetition(id, userInfo);
}
@ApiOperation("开始竞赛实操")
/**
*开始竞赛实操
*/
@PutMapping("/start/{group}")
public void start(@PathVariable String group, String memberId, ScriptBO.Mode mode,
@ApiIgnore @RequestAttribute(name = AuthenticateInterceptor.LOGIN_INFO_KEY) LoginUserInfoVO userInfo) {
@RequestAttribute(name = AuthenticateInterceptor.LOGIN_INFO_KEY) LoginUserInfoVO userInfo) {
iCompetitionPracticalService.start(group, memberId, mode, userInfo);
}
@ApiOperation("获取运营统计数据")
/**
*获取运营统计数据
*/
@GetMapping("/detail/os/{group}")
@JsonView(OperationStatisticAnswerView.class)
public OperationStatisticVO getOperationStatistic(@PathVariable String group) {
return iCompetitionPracticalService.getOperationStatistic(group);
}
@ApiOperation("提交运营统计答案")
/**
*提交运营统计答案
*/
@PutMapping("/detail/os/{group}")
public void submit(@PathVariable String group, @RequestBody OperationStatisticVO operationStatisticVO) {
iCompetitionPracticalService.submit(group, operationStatisticVO);
}
@ApiOperation("结束竞赛实操")
/**
*结束竞赛实操
*/
@PutMapping("/finish/{group}")
public CompetitionResult finish(@PathVariable String group, @RequestBody OperationStatisticVO operationStatisticVO, @RequestAttribute AccountVO user) {
return iCompetitionPracticalService.finish(group, operationStatisticVO, user);
}
@ApiOperation("退出场景")
/**
*退出场景
*/
@PutMapping("/exit/{group}")
public void exit(@PathVariable String group, @RequestAttribute AccountVO user) {
iCompetitionPracticalService.exit(group, user);
}
@ApiOperation("完成操作类动作(小程序专用)")
/**
*完成操作类动作小程序专用
*/
@PutMapping("/{group}/finish/operation/{actionId}")
public void finishAction(@PathVariable String group, @PathVariable String actionId, @RequestAttribute AccountVO user) {
iCompetitionPracticalService.finishOperationAction(group, actionId, user);
}
@ApiOperation("语音播放完毕")
/**
*语音播放完毕
*/
@PutMapping("/{group}/audio/over/{conversationMessageId}")
public void audioOver(@PathVariable String group, @PathVariable String conversationMessageId, @RequestAttribute AccountVO user) {
iCompetitionPracticalService.audioOver(group, conversationMessageId, user);

View File

@ -4,16 +4,14 @@ package club.joylink.rtss.controller.competition;
import club.joylink.rtss.services.completition.CompetitionUserLikeManager;
import club.joylink.rtss.vo.AccountVO;
import club.joylink.rtss.vo.client.competition.CompetitionUserLikesVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.validation.constraints.PositiveOrZero;
@Api(tags = "竞赛用户点赞")
/**
* 竞赛用户点赞
*/
@RestController
@RequestMapping(path = "/api/v1/likes")
public class CompetitionUserLikesController {
@ -21,15 +19,25 @@ public class CompetitionUserLikesController {
@Autowired
private CompetitionUserLikeManager likeManager;
@ApiOperation(value = "获取各用户点赞数和已点赞用户")
/**
* 获取各用户点赞数和已点赞用户
* @param projectCode
* @param user
* @return
*/
@GetMapping(path = "/project/{projectCode}")
public CompetitionUserLikesVO getUserLikes(@PathVariable String projectCode, @ApiIgnore @RequestAttribute AccountVO user) {
public CompetitionUserLikesVO getUserLikes(@PathVariable String projectCode, @RequestAttribute AccountVO user) {
return likeManager.getUserLikes(user.getId(), projectCode);
}
@ApiOperation(value = "点赞")
/**
* 点赞
* @param user
* @param projectCode
* @param like
*/
@PostMapping(path = "/project/{projectCode}")
public void like(@ApiIgnore @RequestAttribute AccountVO user, @PathVariable String projectCode, @PositiveOrZero @RequestParam Long like) {
public void like(@RequestAttribute AccountVO user, @PathVariable String projectCode, @PositiveOrZero @RequestParam Long like) {
likeManager.like(projectCode, user.getId(), like);
}

View File

@ -6,16 +6,15 @@ import club.joylink.rtss.vo.LoginUserInfoVO;
import club.joylink.rtss.vo.client.PageVO;
import club.joylink.rtss.vo.client.competition.TheoryQuestionRuleQueryVO;
import club.joylink.rtss.vo.client.competition.TheoryQuestionsRuleVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import java.util.List;
@Api(tags = {"出题规则"})
/**
*出题规则
*/
@RestController
@RequestMapping("/api/questionsRule")
public class RaceQuestionsRuleController {
@ -23,43 +22,55 @@ public class RaceQuestionsRuleController {
@Autowired
private IRaceQuestionsRuleService iRaceQuestionsRuleService;
@ApiOperation(value = "添加规则")
/**
*添加规则
*/
@PostMapping
public TheoryQuestionsRuleVO create(@RequestBody @Validated TheoryQuestionsRuleVO ruleVO,
@ApiIgnore @RequestAttribute(name = AuthenticateInterceptor.LOGIN_INFO_KEY) LoginUserInfoVO loginUserInfoVO) {
@RequestAttribute(name = AuthenticateInterceptor.LOGIN_INFO_KEY) LoginUserInfoVO loginUserInfoVO) {
ruleVO.setProjectCode(loginUserInfoVO.getProject().name());
TheoryQuestionsRuleVO vo = this.iRaceQuestionsRuleService.create(ruleVO);
return vo;
}
@ApiOperation(value = "获取规则列表")
/**
*获取规则列表
*/
@GetMapping
public List<TheoryQuestionsRuleVO> queryAll() {
List<TheoryQuestionsRuleVO> list = this.iRaceQuestionsRuleService.queryRules();
return list;
}
@ApiOperation(value = "分页获取规则列表")
/**
*分页获取规则列表
*/
@GetMapping("paging")
public PageVO<TheoryQuestionsRuleVO> pagingQueryRules(TheoryQuestionRuleQueryVO queryVO,@ApiIgnore @RequestAttribute(name = AuthenticateInterceptor.LOGIN_INFO_KEY) LoginUserInfoVO loginInfo) {
public PageVO<TheoryQuestionsRuleVO> pagingQueryRules(TheoryQuestionRuleQueryVO queryVO, @RequestAttribute(name = AuthenticateInterceptor.LOGIN_INFO_KEY) LoginUserInfoVO loginInfo) {
queryVO.setProjectCode(loginInfo.getProject().name());
PageVO<TheoryQuestionsRuleVO> list = this.iRaceQuestionsRuleService.pagingQueryRules(queryVO);
return list;
}
@ApiOperation(value = "删除规则")
/**
*删除规则
*/
@DeleteMapping("{id}")
public void delete(@PathVariable Integer id) {
this.iRaceQuestionsRuleService.deleteById(id);
}
@ApiOperation(value = "查询规则内容")
/**
*查询规则内容
*/
@GetMapping("{id}")
public TheoryQuestionsRuleVO get(@PathVariable Integer id) {
return this.iRaceQuestionsRuleService.getById(id);
}
@ApiOperation(value = "更改规则内容")
/**
*更改规则内容
*/
@PutMapping("{id}")
public TheoryQuestionsRuleVO get(@PathVariable Integer id, @RequestBody @Validated TheoryQuestionsRuleVO ruleVO) {
return this.iRaceQuestionsRuleService.update(id, ruleVO);

View File

@ -8,16 +8,12 @@ import club.joylink.rtss.vo.LoginUserInfoVO;
import club.joylink.rtss.vo.client.competition.ProjectTheoryAnswerVO;
import club.joylink.rtss.vo.client.question.QuestionVO;
import club.joylink.rtss.vo.client.race.RaceResultDetailVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import java.util.List;
/**竞赛理论试题管理*/
@Api(tags = {"竞赛理论试题管理"})
@RestController
@RequestMapping(path = "api/v1/competitionTheory")
public class RaceTheoryController {
@ -27,24 +23,17 @@ public class RaceTheoryController {
//------------------------------------ 项目理论题部分----------------------------------------
/**获取项目理论题*/
@ApiOperation(value = "获取项目理论题")
@GetMapping(path = "/project/{projectCode}")
public List<QuestionVO> getProjectTheory(String mode, @PathVariable String projectCode, @RequestAttribute LoginUserInfoVO loginInfo, @ApiIgnore @RequestAttribute AccountVO user) {
public List<QuestionVO> getProjectTheory(String mode, @PathVariable String projectCode, @RequestAttribute LoginUserInfoVO loginInfo, @RequestAttribute AccountVO user) {
return iRaceTheoryService.getProjectTheory(mode, projectCode, user.getCompanyId(), user);
}
/**根据练习或者考试提交理论题、计算分数*/
@ApiOperation(value = "提交试卷")
@PostMapping(path = "/project/{projectCode}/submit")
public List<RaceResultDetailVO> submitProjectTheory(@PathVariable String projectCode, @RequestBody ProjectTheoryAnswerVO theoryAnswers, @RequestAttribute LoginUserInfoVO loginInfo,@ApiIgnore @RequestAttribute AccountVO user) {
public List<RaceResultDetailVO> submitProjectTheory(@PathVariable String projectCode, @RequestBody ProjectTheoryAnswerVO theoryAnswers, @RequestAttribute LoginUserInfoVO loginInfo, @RequestAttribute AccountVO user) {
return iRaceTheoryService.submitProjectTheory(user, projectCode, user.getCompanyId(), theoryAnswers);
}
/**获取作答详情*/
/**评分*/
/**获取成绩*/
/**清除理论考试结果*/
@ApiOperation(value = "清除理论考试结果")
@DeleteMapping(path = "/project/{projectCode}")
@Role(RoleEnum.SuperAdmin)
public void submitProjectTheory(@PathVariable String projectCode, @RequestParam(required = false) Long companyId) {
@ -54,7 +43,6 @@ public class RaceTheoryController {
/**
* 评分员获取考生理论考试结果详情
*/
@ApiOperation(value = "评分员获取考生理论考试结果详情")
@GetMapping(path = "/project/{projectCode}/result/detail")
public List<RaceResultDetailVO> getTheoryAnswerDetails(@PathVariable String projectCode, @RequestParam(required = false) Long companyId, Long id) {
return iRaceTheoryService.getTheoryResultDetails(projectCode, companyId, id);

View File

@ -4,16 +4,14 @@ package club.joylink.rtss.controller.competition;
import club.joylink.rtss.services.completition.IRaceQuestionMocksStatsService;
import club.joylink.rtss.vo.AccountVO;
import club.joylink.rtss.vo.client.competition.UserQuestionStatsVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import java.util.List;
@Api(tags = "项目题库用户答题统计")
/**
* 项目题库用户答题统计
*/
@RestController
@RequestMapping(path = "/api/question/mocksStatistics")
public class UserAnswerStatsController {
@ -21,13 +19,23 @@ public class UserAnswerStatsController {
@Autowired
private IRaceQuestionMocksStatsService statsService;
@ApiOperation(value = "查询某用户小程序测试历史成绩")
/**
* 查询某用户小程序测试历史成绩
* @param userId
* @param projectCode
* @param user
* @return
*/
@GetMapping(path = "/project/{projectCode}")
public List<UserQuestionStatsVO> getQuestionProgress(Long userId,@PathVariable String projectCode, @ApiIgnore @RequestAttribute AccountVO user) {
public List<UserQuestionStatsVO> getQuestionProgress(Long userId,@PathVariable String projectCode, @RequestAttribute AccountVO user) {
return statsService.getHistoryScores(userId,user, projectCode);
}
@ApiOperation(value = "查询历史成绩排名")
/**
* 查询历史成绩排名
* @param projectCode
* @return
*/
@GetMapping(path = "ranking/project/{projectCode}")
public List<UserQuestionStatsVO> getQuestionProgress(@PathVariable String projectCode) {
return statsService.getHistoryScoresRanking( projectCode);

View File

@ -4,16 +4,14 @@ package club.joylink.rtss.controller.competition;
import club.joylink.rtss.services.completition.IUserQuestionProgressService;
import club.joylink.rtss.vo.AccountVO;
import club.joylink.rtss.vo.client.competition.RaceQuestionProgressVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.validation.constraints.PositiveOrZero;
@Api(tags = "项目题库用户答题进度接口")
/**
* 项目题库用户答题进度接口
*/
@RestController
@RequestMapping(path = "/api/questionProgress")
public class UserQuestionProgressController {
@ -21,29 +19,37 @@ public class UserQuestionProgressController {
@Autowired
private IUserQuestionProgressService progressService;
@ApiOperation(value = "获取用户答题进展")
/**
* 获取用户答题进展
* @param projectCode
* @param user
* @return
*/
@GetMapping(path = "/project/{projectCode}")
public RaceQuestionProgressVO getQuestionProgress(@PathVariable String projectCode, @ApiIgnore @RequestAttribute AccountVO user) {
public RaceQuestionProgressVO getQuestionProgress(@PathVariable String projectCode, @RequestAttribute AccountVO user) {
return progressService.getQuestionProgress(user.getId(), projectCode, user.getCompanyId());
}
@ApiOperation(value = "更新答题进度")
/**
* 更新答题进度
* @param user
* @param projectCode
* @param index
*/
@PostMapping(path = "/project/{projectCode}")
public void addQuestionProgress(@ApiIgnore @RequestAttribute AccountVO user, @PathVariable String projectCode, @PositiveOrZero @RequestParam Long index) {
public void addQuestionProgress(@RequestAttribute AccountVO user, @PathVariable String projectCode, @PositiveOrZero @RequestParam Long index) {
progressService.addQuestionProgress(user.getId(), projectCode, user.getCompanyId(),index);
}
/**添加错题*/
@ApiOperation(value = "添加错题")
@PostMapping(path = "incorrect/project/{projectCode}")
public void addIncorrectQuestion(@ApiIgnore @RequestAttribute AccountVO user, @PathVariable String projectCode, @PositiveOrZero @RequestParam Long id) {
public void addIncorrectQuestion(@RequestAttribute AccountVO user, @PathVariable String projectCode, @PositiveOrZero @RequestParam Long id) {
progressService.addIncorrectQuestion(user.getId(), projectCode, user.getCompanyId(),id);
}
/**删除错题*/
@ApiOperation(value = "删除错题")
@DeleteMapping(path = "incorrect/project/{projectCode}")
public void deleteIncorrectQuestion(@ApiIgnore @RequestAttribute AccountVO user, @PathVariable String projectCode, @PositiveOrZero @RequestParam Long id) {
public void deleteIncorrectQuestion(@RequestAttribute AccountVO user, @PathVariable String projectCode, @PositiveOrZero @RequestParam Long id) {
progressService.deleteIncorrectQuestion(user.getId(), projectCode,user.getCompanyId(), id);
}

View File

@ -10,17 +10,16 @@ import club.joylink.rtss.vo.client.competition.TheoryQuestionCountVO;
import club.joylink.rtss.vo.client.question.QuestionOptionVO;
import club.joylink.rtss.vo.client.question.QuestionQueryVO;
import club.joylink.rtss.vo.client.question.QuestionVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import java.util.List;
@Api(tags = "题库管理接口")
/**
*题库管理接口
*/
@RestController
@RequestMapping(path = "/api/questionBank")
public class QuestionBankController {
@ -28,69 +27,89 @@ public class QuestionBankController {
@Autowired
private IQuestionBankService iQuestionBankService;
@ApiOperation(value = "分页查询题目")
/**
*分页查询题目
*/
@GetMapping(path = "/questions/paging")
public PageVO<QuestionVO> pagingQueryQuestions(@RequestAttribute LoginUserInfoVO loginInfo, QuestionQueryVO queryVO) {
queryVO.setProjectCode(loginInfo.getProject().name());
return iQuestionBankService.pagingQueryQuestions(queryVO);
}
@ApiOperation(value = "查询题目列表")
/**
*查询题目列表
*/
@GetMapping(path = "/questions")
public List<QuestionVO> queryQuestions(@RequestAttribute LoginUserInfoVO loginInfo,QuestionQueryVO queryVO) {
queryVO.setProjectCode(loginInfo.getProject().name());
return iQuestionBankService.queryQuestions(queryVO);
}
@ApiOperation(value = "获取题目信息")
/**
*获取题目信息
*/
@GetMapping(path = "/questions/{questionId}")
public QuestionVO getQuestion(@PathVariable Long questionId) {
return iQuestionBankService.getQuestion(questionId);
}
@ApiOperation(value = "添加题目")
/**
*添加题目
*/
@PostMapping(path = "/questions")
public void addQuestion(@Validated @RequestBody QuestionVO questionVO,@RequestAttribute LoginUserInfoVO loginInfo,
@ApiIgnore @RequestAttribute AccountVO user) {
@RequestAttribute AccountVO user) {
questionVO.setProjectCode(loginInfo.getProject().name());
iQuestionBankService.addQuestion(questionVO, user);
}
@ApiOperation(value = "导入项目或单位试题库")
/**
*导入项目或单位试题库
*/
@PostMapping(path = "/questions/import")
public void importProjectQuestion(@Validated @RequestBody List<QuestionVO> questions, @RequestAttribute LoginUserInfoVO loginInfo,
@ApiIgnore @RequestAttribute AccountVO user, @RequestParam(required = false, name = "id") Long companyId) {
@RequestAttribute AccountVO user, @RequestParam(required = false, name = "id") Long companyId) {
iQuestionBankService.importProjectQuestion(questions, loginInfo.getProject().name(), companyId,user);
}
@ApiOperation(value = "更新题目")
/**
*更新题目
*/
@PutMapping(path = "/questions/{questionId}")
public void updateQuestion(@PathVariable Long questionId, @RequestAttribute LoginUserInfoVO loginInfo,@RequestBody QuestionVO questionVO) {
questionVO.setProjectCode(loginInfo.getProject().name());
iQuestionBankService.updateQuestion(questionId, questionVO);
}
@ApiOperation(value = "删除题目")
/**
*删除题目
*/
@DeleteMapping(path = "/questions/{questionId}")
public void deleteQuestion(@PathVariable Long questionId) {
iQuestionBankService.deleteQuestion(questionId);
}
@ApiOperation(value = "根据题目查询选项")
/**
*根据题目查询选项
*/
@GetMapping(path = "/questions/{questionId}/options")
public List<QuestionOptionVO> getOptionsByQuestionId(@PathVariable Long questionId) {
return iQuestionBankService.getOptionsByQuestionId(questionId);
}
@ApiOperation(value = "根据题型获取题目数量")
/**
*根据题型获取题目数量
*/
@GetMapping(path = "/number")
public Integer getNumberUnderKnowledgeAndType(@RequestAttribute LoginUserInfoVO loginInfo, String type, Long companyId) {
return iQuestionBankService.getNumberWithType(type, loginInfo.getProject().name(), companyId);
}
@ApiOperation(value = "获取题型数量")
/**
*获取题型数量
*/
@GetMapping(path = "/type/number")
public List<TheoryQuestionCountVO> getNumberUnderKnowledgeAndType(@RequestAttribute LoginUserInfoVO loginInfo, @RequestParam(required = false) Long companyId) {

View File

@ -2,7 +2,6 @@ package club.joylink.rtss.controller.doc;
import club.joylink.rtss.services.doc.DocumentService;
import club.joylink.rtss.vo.doc.DocumentVO;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
@ -18,13 +17,20 @@ public class DocumentController {
@Autowired
private DocumentService documentService;
@ApiOperation(value = "查询文档列表")
/**
* 查询文档列表
* @return
*/
@GetMapping(path = "")
public List<DocumentVO> listDocuments() {
return documentService.listDocuments();
}
@ApiOperation(value = "获取文档详情")
/**
* 获取文档详情
* @param id
* @return
*/
@GetMapping(path = "/{id}")
public DocumentVO getDetail(@PathVariable Long id) {
return documentService.getDetail(id);

View File

@ -3,11 +3,9 @@ package club.joylink.rtss.controller.doc;
import club.joylink.rtss.services.doc.DocumentDraftService;
import club.joylink.rtss.vo.AccountVO;
import club.joylink.rtss.vo.doc.DocumentVO;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import java.util.List;
@ -18,43 +16,57 @@ public class DocumentDraftController {
@Autowired
private DocumentDraftService documentDraftService;
@ApiOperation(value = "查询草稿文档列表")
/**
*查询草稿文档列表
*/
@GetMapping(path = "")
public List<DocumentVO> listMyDocuments(@ApiIgnore @RequestAttribute AccountVO user) {
public List<DocumentVO> listMyDocuments(@RequestAttribute AccountVO user) {
return documentDraftService.listMyDocuments(user);
}
@ApiOperation(value = "创建新的草稿文档")
/**
*创建新的草稿文档
*/
@PostMapping(path = "")
public void create(@RequestBody @Validated DocumentVO documentVO, @ApiIgnore @RequestAttribute AccountVO user) {
public void create(@RequestBody @Validated DocumentVO documentVO, @RequestAttribute AccountVO user) {
documentDraftService.create(documentVO, user);
}
@ApiOperation(value = "更新标题")
/**
*更新标题
*/
@PutMapping(path = "/{id}")
public void updateTitle(@PathVariable Long id, @RequestBody @Validated DocumentVO documentVO) {
documentDraftService.updateTitle(id, documentVO);
}
@ApiOperation(value = "获取文档详情")
/**
*获取文档详情
*/
@GetMapping(path = "/{id}")
public DocumentVO getDetail(@PathVariable Long id) {
return documentDraftService.getDetail(id);
}
@ApiOperation(value = "保存数据")
/**
*保存数据
*/
@PutMapping(path = "/{id}/data")
public void save(@PathVariable Long id, @RequestBody DocumentVO documentVO) {
documentDraftService.save(id, documentVO.getContent());
}
@ApiOperation(value = "发布文档")
/**
*发布文档
*/
@PutMapping(path = "/{id}/publish")
public void publish(@PathVariable Long id, @ApiIgnore @RequestAttribute AccountVO user) {
public void publish(@PathVariable Long id, @RequestAttribute AccountVO user) {
documentDraftService.publish(id, user);
}
@ApiOperation(value = "删除文档")
/**
*删除文档
*/
@DeleteMapping(path = "/{id}")
public void delete(@PathVariable Long id) {
documentDraftService.delete(id);

View File

@ -1,26 +1,16 @@
package club.joylink.rtss.controller.draft;
import java.util.List;
import club.joylink.rtss.services.ISysDictionaryService;
import club.joylink.rtss.vo.client.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import club.joylink.rtss.services.ISysDictionaryService;
import java.util.List;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
@Api(value="数据字典controller", tags= {"数据字典管理接口"})
/**
* 数据字典管理接口
*/
@RestController
@RequestMapping("/api/dictionary")
public class DictionaryController {
@ -32,82 +22,108 @@ public class DictionaryController {
this.iSysDictionaryService = iSysDictionaryService;
}
@ApiOperation(value="字典目录分页查询")
/**
*字典目录分页查询
*/
@GetMapping(path="/list")
public PageVO<DictionaryVO> queryDic(DictionaryQueryVO queryVO) {
return this.iSysDictionaryService.queryPage(queryVO);
}
@ApiOperation(value="创建字典目录")
/**
*创建字典目录
*/
@PostMapping(path="/create")
public void createDic(@RequestBody @Validated DictionaryVO dicVo) {
this.iSysDictionaryService.createDic(dicVo);
}
@ApiOperation(value="校验字典目录编码是否已经存在")
/**
*校验字典目录编码是否已经存在
*/
@GetMapping(path="/checkExistByCode")
public boolean checkExistByCode(String code) {
return this.iSysDictionaryService.checkByCode(code);
}
@ApiOperation(value="根据id获取对象")
/**
*根据id获取对象
*/
@GetMapping(path="/{id}")
public DictionaryVO getData(@PathVariable Long id) {
return this.iSysDictionaryService.queryData(id);
}
@ApiOperation(value="更新字典目录信息")
/**
*更新字典目录信息
*/
@PutMapping(path="/update/{id}")
public void updateDic(@PathVariable Long id, @RequestBody @Validated DictionaryVO dicVo) {
this.iSysDictionaryService.updateDic(id, dicVo);
}
@ApiOperation(value="删除字典目录")
/**
*删除字典目录
*/
@DeleteMapping(path="/delete/{id}")
public void deleteDic(@PathVariable Long id) {
this.iSysDictionaryService.deleteDic(id);
}
@ApiOperation(value="查询字典目录对应明细数据列表")
/**
*查询字典目录对应明细数据列表
*/
@GetMapping(path="/{id}/detail/list")
public PageVO<DictionaryDetailVO> queryDicDetail(@PathVariable(name="id") Long dicId, DictionaryDetailQueryVO queryVO) {
return this.iSysDictionaryService.queryDetailPage(dicId, queryVO);
}
@ApiOperation(value="创建字典明细")
/**
*创建字典明细
*/
@PostMapping(path="/{id}/detail/create")
public void createDicDetail(@PathVariable(name="id") Long dicId, @RequestBody @Validated DictionaryDetailVO detailVo) {
detailVo.setDicId(dicId);
this.iSysDictionaryService.createDicDetail(detailVo);
}
@ApiOperation(value="校验字典明细编码是否存在")
/**
*校验字典明细编码是否存在
*/
@GetMapping(path="/{id}/detail/checkExistByCode")
public boolean checkDetailExistByCode(@PathVariable(name="id") @ApiParam(name="id", value="字典目录id") Long dicId,
public boolean checkDetailExistByCode(@PathVariable(name="id") Long dicId,
String code) {
return this.iSysDictionaryService.checkDetailByCode(dicId, code);
}
@ApiOperation(value="根据id获取对象")
/**
*根据id获取对象
*/
@GetMapping(path="/{id}/detail/{detailId}")
public DictionaryDetailVO getDetailData(@PathVariable(name="id") Long dicId, @PathVariable(name="detailId") Long id) {
return this.iSysDictionaryService.getDetailData(dicId, id);
}
@ApiOperation(value="更新字典明细信息")
/**
*更新字典明细信息
*/
@PutMapping(path="/{id}/detail/update/{detailId}")
public void updateDicDetail(@PathVariable(name="id") Long dicId, @PathVariable(name="detailId") Long id, @RequestBody @Validated DictionaryDetailVO detailVo) {
detailVo.setDicId(dicId);
this.iSysDictionaryService.updateDicDetail(id, detailVo);
}
@ApiOperation(value="删除字典明细")
/**
*删除字典明细
*/
@DeleteMapping(path="/{id}/detail/delete/{detailId}")
public void deleteDicDetail(@PathVariable(name="id") Long dicId, @PathVariable(name="detailId") Long id) {
this.iSysDictionaryService.deleteDicDetail(id);
}
@ApiOperation(value="根据字典code获取字典明细列表")
/**
*根据字典code获取字典明细列表
*/
@GetMapping(path="/getDetailListByCode")
public List<DictionaryDetailVO> getDicDetailListByCode(String code) {
return this.iSysDictionaryService.getDicDetailListByDicCode(code);

View File

@ -7,14 +7,13 @@ import club.joylink.rtss.vo.client.ibp.IbpCopyVO;
import club.joylink.rtss.vo.client.ibp.IbpCreateVO;
import club.joylink.rtss.vo.client.ibp.IbpQueryVO;
import club.joylink.rtss.vo.client.ibp.IbpVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
@Api(value="草稿IBP盘接口")
/**
*草稿IBP盘接口
*/
@RestController
@RequestMapping("/api/draftIbp")
public class DraftIbpController {
@ -22,52 +21,68 @@ public class DraftIbpController {
@Autowired
private DraftIbpService draftIbpService;
@ApiOperation(value = "查询用户草稿IBP盘绘制数据列表")
/**
*查询用户草稿IBP盘绘制数据列表
*/
@GetMapping("/list/user")
public PageVO<IbpVO> queryUserDraftIbpList(IbpQueryVO queryVO, @ApiIgnore @RequestAttribute AccountVO user) {
public PageVO<IbpVO> queryUserDraftIbpList(IbpQueryVO queryVO, @RequestAttribute AccountVO user) {
return this.draftIbpService.queryUserDraftIbpList(queryVO, user);
}
@ApiOperation(value = "创建草稿IBP盘")
/**
*创建草稿IBP盘
*/
@PostMapping("")
public IbpVO createDraftIbp(@RequestBody @Validated IbpCreateVO ibpCreateVO,
@ApiIgnore @RequestAttribute AccountVO user) {
@RequestAttribute AccountVO user) {
return this.draftIbpService.create(ibpCreateVO, user);
}
@ApiOperation(value = "根据id查询IBP数据")
/**
*根据id查询IBP数据
*/
@GetMapping("/{id}")
public IbpVO getIbp(@PathVariable Long id) {
return this.draftIbpService.getById(id);
}
@ApiOperation(value = "更新草稿IBP盘基本信息")
/**
*更新草稿IBP盘基本信息
*/
@PutMapping("/{id}/basic")
public IbpVO updateDraftIbpBasicInfo(@PathVariable Long id,
@RequestBody @Validated IbpCreateVO ibpCreateVO,
@ApiIgnore @RequestAttribute AccountVO user) {
@RequestBody @Validated IbpCreateVO ibpCreateVO,
@RequestAttribute AccountVO user) {
return this.draftIbpService.updateBasicInfo(id, ibpCreateVO, user);
}
@ApiOperation(value = "更新草稿IBP盘绘图数据")
/**
*更新草稿IBP盘绘图数据
*/
@PutMapping("/{id}/data")
public void updateDraftIbpDrawData(@PathVariable Long id, @RequestBody String drawData) {
this.draftIbpService.updateDrawData(id, drawData);
}
@ApiOperation(value = "发布IBP盘数据")
/**
*发布IBP盘数据
*/
@PostMapping("/{id}/publish")
public void publish(@PathVariable Long id, @ApiIgnore @RequestAttribute AccountVO user) {
public void publish(@PathVariable Long id, @RequestAttribute AccountVO user) {
this.draftIbpService.publish(id, user);
}
@ApiOperation(value = "根据id删除草稿IBP盘数据")
/**
*根据id删除草稿IBP盘数据
*/
@DeleteMapping("/{id}/delete")
public void delete(@PathVariable Long id) {
this.draftIbpService.delete(id);
}
@ApiOperation("复制已有的IBP数据关联新的地图和车站")
/**
*复制已有的IBP数据关联新的地图和车站
*/
@PostMapping("/copy")
public void copy(@Validated @RequestBody IbpCopyVO copyVO, @RequestAttribute AccountVO user) {
this.draftIbpService.copyFromPublished(copyVO, user);

View File

@ -15,20 +15,19 @@ import club.joylink.rtss.vo.map.query.MapAutoReentryQueryVO;
import club.joylink.rtss.vo.map.query.MapDestinationCodeDefinitionQueryVO;
import club.joylink.rtss.vo.map.query.MapParkTimeQueryVO;
import club.joylink.rtss.vo.map.query.MapRoutingDataQueryVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.CollectionUtils;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@Api(tags = {"地图草稿数据管理接口"})
/**
*地图草稿数据管理接口
*/
@RestController
@RequestMapping("/api/mapBuild")
@Slf4j
@ -42,45 +41,59 @@ public class DraftMapController {
/*-------------- 地图,绘图相关操作 ------------------*/
@ApiOperation(value = "获取地图草稿数据列表")
/**
*获取地图草稿数据列表
*/
@GetMapping(path = "/list")
public List<DraftMapVO> list(@ApiIgnore @RequestAttribute AccountVO user) {
public List<DraftMapVO> list(@RequestAttribute AccountVO user) {
return iDraftMapService.list(user);
}
@ApiOperation(value = "根据草稿地图id查询数据")
/**
*根据草稿地图id查询数据
*/
@GetMapping(path = "/findById/{draftMapId}")
public DraftMapVO findById(@PathVariable Long draftMapId) {
return iDraftMapService.findById(draftMapId);
}
@ApiOperation(value = "获取皮肤地图草稿树")
/**
*获取皮肤地图草稿树
*/
@GetMapping(path = "/tree")
public List<TreeNode> tree(@ApiIgnore @RequestAttribute AccountVO user) {
public List<TreeNode> tree(@RequestAttribute AccountVO user) {
return iDraftMapService.tree(user);
}
@ApiOperation(value = "新建地图草稿")
/**
*新建地图草稿
*/
@PostMapping(path = "/create")
public String create(@RequestBody @Validated(value = DraftMapCreateCheck.class) DraftMapVO draftMapVo,
@ApiIgnore @RequestAttribute AccountVO user) {
@RequestAttribute AccountVO user) {
return iDraftMapService.create(draftMapVo, user);
}
@ApiOperation(value = "修改地图草稿信息")
/**
*修改地图草稿信息
*/
@PutMapping(path = "/{id}")
public void update(@PathVariable Long id, @RequestBody @Validated(value = DraftMapCreateCheck.class) DraftMapVO draftMapVo,
@ApiIgnore @RequestAttribute AccountVO user) {
@RequestAttribute AccountVO user) {
iDraftMapService.update(id, draftMapVo, user);
}
@ApiOperation(value = "地图草稿另存为")
/**
*地图草稿另存为
*/
@PostMapping(path = "/{id}/saveAs")
public String saveAs(@PathVariable Long id, @RequestBody DraftMapVO vo) {
return iDraftMapService.saveAs(id, vo.getName());
}
@ApiOperation(value = "查询地图及对应数据")
/**
*查询地图及对应数据
*/
@GetMapping(path = "/{id}/mapDataDetail")
public MapGraphDataNewVO getMapShapeData(@PathVariable Long id) {
return iDraftMapService.getMapShapeData(id);
@ -94,56 +107,72 @@ public class DraftMapController {
/**
* 保存地图元素信息
*/
@ApiOperation(value = "保存地图草稿对象数据")
/**
*保存地图草稿对象数据
*/
@PostMapping(path = "/{id}/saveElements")
public void saveMapElsDetail(@PathVariable Long id, @RequestBody String shapeData) {
iDraftMapService.saveMapElsDetail(id, shapeData);
}
@ApiOperation(value = "清除原联锁数据,生成新的联锁数据并保存")
/**
*清除原联锁数据生成新的联锁数据并保存
*/
@PostMapping(path = "/{id}/ci/generateAndSave")
public CiGenerateResultVO generateAndSaveCiData(@PathVariable Long id) {
return this.draftMapCiDataGenerator.generate(id);
}
@ApiOperation(value = "草稿地图导出")
/**
*草稿地图导出
*/
@GetMapping(path = "/{id}/export")
public MapVO export(@PathVariable Long id) {
return this.iDraftMapService.export(id);
}
@ApiOperation(value = "地图数据导入")
/**
*地图数据导入
*/
@PostMapping(path = "/import")
public void importFrom(@RequestBody MapVO mapVO, @ApiIgnore @RequestAttribute AccountVO user) {
public void importFrom(@RequestBody MapVO mapVO, @RequestAttribute AccountVO user) {
iDraftMapService.importFrom(mapVO, user);
}
@ApiOperation(value = "从发布的地图新建地图草稿")
/**
*从发布的地图新建地图草稿
*/
@PostMapping(path = "/createFrom")
public void createFrom(@RequestBody @Validated(value = DraftMapCreateFromCheck.class) DraftMapVO draftMapVO,
@ApiIgnore @RequestAttribute AccountVO user) {
@RequestAttribute AccountVO user) {
iDraftMapService.createFrom(draftMapVO.getId(), draftMapVO.getName(), user);
}
/**
* 删除地图草稿
*/
@ApiOperation(value = "删除地图草稿")
/**
*删除地图草稿
*/
@DeleteMapping(path = "/delete/{id}")
public void deleteMap(@PathVariable Long id, @RequestAttribute AccountVO user) {
iDraftMapService.deleteMap(id, user);
}
@ApiOperation(value = "数据校验")
/**
*数据校验
*/
@GetMapping(path = "/{id}/checkData")
public List<String> checkData(@PathVariable Long id) {
return iDraftMapService.checkData(iDraftMapService.getMapData(id));
}
@ApiOperation(value = "发布")
/**
*发布
*/
@PostMapping(path = "/{id}/publish")
public List<String> publish(@PathVariable Long id, @RequestBody @Validated(value = DraftMapPublishCheck.class) DraftMapVO draftMapVO,
@ApiIgnore @RequestAttribute AccountVO user) {
@RequestAttribute AccountVO user) {
MapDataVO mapData = iDraftMapService.getMapData(id);
List<String> list = new ArrayList<>();
if (mapData.getCheckConfig() == null || mapData.getCheckConfig().isCheck()) {
@ -155,29 +184,37 @@ public class DraftMapController {
return list;
}
@ApiOperation(value = "发布地图3D数据")
/**
*发布地图3D数据
*/
@PostMapping(path = "/{id}/publish/3d")
public void publish3DData(@PathVariable Long id,
@RequestBody @Validated(value = DraftMapPublishCheck.class) DraftMapVO draftMapVO,
@ApiIgnore @RequestAttribute AccountVO user) {
@RequestAttribute AccountVO user) {
this.iDraftMapService.publish3DData(id, draftMapVO, user);
}
/*-------------- 联动道岔 ------------------*/
@ApiOperation(value = "创建联动道岔关系")
/**
*创建联动道岔关系
*/
@PostMapping(path = "/switchCoupled")
public void createSwitchCoupled(@RequestBody MapSwitchCoupledVO vo) {
iDraftMapService.createSwitchCoupled(vo);
}
@ApiOperation(value = "查询地图的联动道岔关系列表")
/**
*查询地图的联动道岔关系列表
*/
@GetMapping(path = "/{mapId}/switchCoupled")
public PageVO<MapSwitchCoupledVO> selectSwitchCoupled(@PathVariable Long mapId, MapSwitchCoupledQueryVO queryVO) {
return iDraftMapService.selectSwitchCoupled(mapId, queryVO);
}
@ApiOperation(value = "删除联动道岔关系")
/**
*删除联动道岔关系
*/
@DeleteMapping(path = "/switchCoupled/{coupleId}")
public void delSwitchCoupledById(@PathVariable Long coupleId) {
iDraftMapService.delSwitchCoupled(coupleId);
@ -185,7 +222,9 @@ public class DraftMapController {
/*-------------- 信号机接近区段 ------------------*/
@ApiOperation(value = "创建信号机接近区段")
/**
*创建信号机接近区段
*/
@PostMapping(path = "/approachSection")
public void createApproachSection(@RequestBody @Validated MapSignalApproachSectionVO approachSectionVO) {
this.iDraftMapService.createApproachSection(approachSectionVO);
@ -199,19 +238,25 @@ public class DraftMapController {
// return this.iDraftMapService.queryPagedApproachSection(mapId, queryVO);
// }
@ApiOperation(value = "根据id查询信号机接近区段")
/**
*根据id查询信号机接近区段
*/
@GetMapping(path = "/approachSection/{id}")
public MapSignalApproachSectionVO getApproachSectionById(@PathVariable Long id) {
return this.iDraftMapService.getApproachSectionById(id);
}
@ApiOperation(value = "更新信号机接近区段")
/**
*更新信号机接近区段
*/
@PutMapping(path = "/approachSection/{id}")
public void updateApproachSection(@PathVariable Long id, @RequestBody @Validated MapSignalApproachSectionVO approachSectionVO) {
this.iDraftMapService.updateApproachSection(id, approachSectionVO);
}
@ApiOperation(value = "删除信号机接近区段")
/**
*删除信号机接近区段
*/
@DeleteMapping(path = "/approachSection/{id}")
public void deleteApproachSection(@PathVariable Long id) {
this.iDraftMapService.deleteApproachSection(id);
@ -219,31 +264,41 @@ public class DraftMapController {
/*-------------- 自动信号 ------------------*/
@ApiOperation(value = "创建自动信号")
/**
*创建自动信号
*/
@PostMapping(path = "/autoSignal")
public void createAutoSignal(@RequestBody @Validated MapAutoSignalVO autoSignalVO) {
iDraftMapService.createAutoSignal(autoSignalVO);
}
@ApiOperation(value = "分页获取自动信号")
/**
*分页获取自动信号
*/
@GetMapping(path = "/{mapId}/autoSignal")
public PageVO<MapAutoSignalVO> queryPagedAutoSignal(@PathVariable Long mapId, MapAutoSignalQueryVO queryVO) {
return iDraftMapService.queryPagedAutoSignal(mapId, queryVO);
}
@ApiOperation(value = "获取自动信号")
/**
*获取自动信号
*/
@GetMapping(path = "/autoSignal/{autoSignalId}")
public MapAutoSignalVO getAutoSignal(@PathVariable Long autoSignalId) {
return iDraftMapService.getAutoSignal(autoSignalId);
}
@ApiOperation(value = "更新自动信号")
/**
*更新自动信号
*/
@PutMapping(path = "/autoSignal/{autoSignalId}")
public void updateAutoSignal(@PathVariable Long autoSignalId, @RequestBody @Validated MapAutoSignalVO autoSignalVO) {
iDraftMapService.updateAutoSignal(autoSignalId, autoSignalVO);
}
@ApiOperation(value = "删除自动信号")
/**
*删除自动信号
*/
@DeleteMapping(path = "/autoSignal/{autoSignalId}")
public void deleteAutoSignal(@PathVariable Long autoSignalId) {
iDraftMapService.deleteAutoSignal(autoSignalId);
@ -251,31 +306,41 @@ public class DraftMapController {
/*!!!!!!!!!!!!!!!!!!!!!!! 新 自动信号 !!!!!!!!!!!!!!!!!!!!!!!!!!*/
@ApiOperation(value = "新创建自动信号")
/**
*新创建自动信号
*/
@PostMapping(path = "/autoSignalNew")
public void createAutoSignal(@RequestBody @Validated MapAutoSignalNewVO autoSignalVO) {
iDraftMapService.createAutoSignal(autoSignalVO);
}
@ApiOperation(value = "新分页获取自动信号")
/**
*新分页获取自动信号
*/
@GetMapping(path = "/{mapId}/autoSignalNew")
public PageVO<MapAutoSignalNewVO> queryPagedAutoSignalNew(@PathVariable Long mapId, MapAutoSignalQueryVO queryVO) {
return iDraftMapService.queryPagedAutoSignalNew(mapId, queryVO);
}
@ApiOperation(value = "新获取自动信号")
/**
*新获取自动信号
*/
@GetMapping(path = "/autoSignalNew/{autoSignalId}")
public MapAutoSignalNewVO getAutoSignalNew(@PathVariable Long autoSignalId) {
return iDraftMapService.getAutoSignalNew(autoSignalId);
}
@ApiOperation(value = "新更新自动信号")
/**
*新更新自动信号
*/
@PutMapping(path = "/autoSignalNew/{autoSignalId}")
public void updateAutoSignal(@PathVariable Long autoSignalId, @RequestBody @Validated MapAutoSignalNewVO autoSignalVO) {
iDraftMapService.updateAutoSignal(autoSignalId, autoSignalVO);
}
@ApiOperation(value = "新删除自动信号")
/**
*新删除自动信号
*/
@DeleteMapping(path = "/autoSignalNew/{autoSignalId}")
public void deleteAutoSignalNew(@PathVariable Long autoSignalId) {
iDraftMapService.deleteAutoSignal(autoSignalId);
@ -283,31 +348,41 @@ public class DraftMapController {
/*-------------- 进路 ------------------*/
@ApiOperation(value = "创建进路")
/**
*创建进路
*/
@PostMapping(path = "/route")
public void createRoute(@RequestBody @Validated MapRouteVO routeVO) {
iDraftMapService.createRoute(routeVO);
}
@ApiOperation(value = "查询进路列表")
/**
*查询进路列表
*/
@GetMapping(path = "/{mapId}/route")
public PageVO<MapRouteVO> queryPagedRoute(@PathVariable Long mapId, MapRouteQueryVO queryVO) {
return iDraftMapService.queryPagedRoute(mapId, queryVO);
}
@ApiOperation(value = "查询进路数据明细")
/**
*查询进路数据明细
*/
@GetMapping(path = "/route/{routeId}")
public MapRouteVO getRouteDetail(@PathVariable Long routeId) {
return iDraftMapService.getRouteDetail(routeId);
}
@ApiOperation(value = "更新进路数据")
/**
*更新进路数据
*/
@PutMapping(path = "/route/{routeId}")
public void updateRoute(@PathVariable Long routeId, @RequestBody @Validated MapRouteVO routeVO) {
iDraftMapService.updateRoute(routeId, routeVO);
}
@ApiOperation(value = "删除进路")
/**
*删除进路
*/
@DeleteMapping(path = "/route/{routeId}")
public void deleteRoute(@PathVariable Long routeId) {
iDraftMapService.deleteRoute(routeId);
@ -315,31 +390,41 @@ public class DraftMapController {
/*-------------- 新 进路 ------------------*/
@ApiOperation(value = "新创建进路")
/**
*新创建进路
*/
@PostMapping(path = "/routeNew")
public void createRoute(@RequestBody @Validated MapRouteNewVO routeVO) {
iDraftMapService.createRoute(routeVO);
}
@ApiOperation(value = "新查询进路列表")
/**
*新查询进路列表
*/
@GetMapping(path = "/{mapId}/routeNew")
public PageVO<MapRouteNewVO> queryPagedRouteNew(@PathVariable Long mapId, MapRouteQueryVO queryVO) {
return iDraftMapService.queryPagedRouteNew(mapId, queryVO);
}
@ApiOperation(value = "新查询进路数据明细")
/**
*新查询进路数据明细
*/
@GetMapping(path = "/routeNew/{routeId}")
public MapRouteNewVO getRouteDetailNew(@PathVariable Long routeId) {
return iDraftMapService.getRouteDetailNew(routeId);
}
@ApiOperation(value = "新更新进路数据")
/**
*新更新进路数据
*/
@PutMapping(path = "/routeNew/{routeId}")
public void updateRoute(@PathVariable Long routeId, @RequestBody @Validated MapRouteNewVO routeVO) {
iDraftMapService.updateRoute(routeId, routeVO);
}
@ApiOperation(value = "新删除进路")
/**
*新删除进路
*/
@DeleteMapping(path = "/routeNew/{routeId}")
public void deleteRouteNew(@PathVariable Long routeId) {
iDraftMapService.deleteRoute(routeId);
@ -381,13 +466,17 @@ public class DraftMapController {
/*-------------- 自动折返 ------------------*/
@ApiOperation(value = "创建自动折返")
/**
*创建自动折返
*/
@PostMapping(path = "/autoReentry")
public void createAutoReentry(@RequestBody @Validated MapAutoReentryVO mapAutoReentryVO) {
this.iDraftMapService.createAutoReentry(mapAutoReentryVO);
}
@ApiOperation(value = "分页查询自动折返列表")
/**
*分页查询自动折返列表
*/
@GetMapping(path = "/{mapId}/autoReentry/paging")
public PageVO<MapAutoReentryVO> queryPagedAutoReentry(
@PathVariable Long mapId,
@ -395,26 +484,34 @@ public class DraftMapController {
return this.iDraftMapService.queryPagedAutoReentry(mapId, queryVO);
}
@ApiOperation(value = "查询根据折返轨分组的自动折返列表")
/**
*查询根据折返轨分组的自动折返列表
*/
@GetMapping(path = "/{mapId}/autoReentry/group/reentryTrack")
public Map<String, List<MapAutoReentryVO>> queryAutoReentrysGroupByReentryTrack(
@PathVariable Long mapId) {
return this.iDraftMapService.queryAutoReentrysGroupByReentryTrack(mapId);
}
@ApiOperation(value = "根据id查询自动折返")
/**
*根据id查询自动折返
*/
@GetMapping(path = "/autoReentry/{id}")
public MapAutoReentryVO getAutoReentryById(@PathVariable Long id) {
return this.iDraftMapService.getAutoReentryById(id);
}
@ApiOperation(value = "更新自动折返")
/**
*更新自动折返
*/
@PutMapping(path = "/autoReentry/{id}")
public void updateAutoReentry(@PathVariable Long id, @RequestBody @Validated MapAutoReentryVO mapAutoReentryVO) {
this.iDraftMapService.updateAutoReentry(id, mapAutoReentryVO);
}
@ApiOperation(value = "删除自动折返")
/**
*删除自动折返
*/
@DeleteMapping(path = "/autoReentry/{id}")
public void deleteAutoReentry(@PathVariable Long id) {
this.iDraftMapService.deleteAutoReentry(id);
@ -422,31 +519,41 @@ public class DraftMapController {
/*-------------- 路径单元 ------------------*/
@ApiOperation(value = "获取路径单元列表")
/**
*获取路径单元列表
*/
@GetMapping(path = "/{mapId}/routeUnit")
public PageVO<MapRouteUnitVO> getRouteUnitList(@PathVariable Long mapId, MapRouteUnitQueryVO queryVO) {
return iDraftMapService.getRouteUnitList(mapId, queryVO);
}
@ApiOperation(value = "创建路径单元")
/**
*创建路径单元
*/
@PostMapping(path = "/routeUnit")
public void createRouteUnit(@RequestBody @Validated MapRouteUnitVO mapRouteUnitVO) {
iDraftMapService.createRouteUnit(mapRouteUnitVO);
}
@ApiOperation(value = "获取路径单元")
/**
*获取路径单元
*/
@GetMapping(path = "/routeUnit/{routeUnitId}")
public MapRouteUnitVO getRouteUnit(@PathVariable Long routeUnitId) {
return iDraftMapService.getRouteUnit(routeUnitId);
}
@ApiOperation(value = "更新路径单元")
/**
*更新路径单元
*/
@PutMapping(path = "/routeUnit/{routeUnitId}")
public void updateRouteUnit(@PathVariable Long routeUnitId, @RequestBody @Validated MapRouteUnitVO mapRouteUnitVO) {
iDraftMapService.updateRouteUnit(routeUnitId, mapRouteUnitVO);
}
@ApiOperation(value = "删除路径单元")
/**
*删除路径单元
*/
@DeleteMapping(path = "/routeUnit/{routeUnitId}")
public void deleteRouteUnit(@PathVariable Long routeUnitId) {
iDraftMapService.deleteRouteUnit(routeUnitId);
@ -454,31 +561,41 @@ public class DraftMapController {
/*-------------- 交路 ------------------*/
@ApiOperation(value = "创建交路")
/**
*创建交路
*/
@PostMapping(path = "/routing")
public void createRouting(@RequestBody @Validated MapRoutingVO routingVO) {
iDraftMapService.createRouting(routingVO);
}
@ApiOperation(value = "分页获取交路")
/**
*分页获取交路
*/
@GetMapping(path = "/{mapId}/routing")
public PageVO<MapRoutingVO> queryPagedRouting(@PathVariable Long mapId, PageQueryVO queryVO) {
return iDraftMapService.queryPagedRouting(mapId, queryVO);
}
@ApiOperation(value = "获取交路")
/**
*获取交路
*/
@GetMapping(path = "/routing/{routingId}")
public MapRoutingVO getRouting(@PathVariable Long routingId) {
return iDraftMapService.getRouting(routingId);
}
@ApiOperation(value = "更新交路")
/**
*更新交路
*/
@PutMapping(path = "/routing/{routingId}")
public void updateRouting(@PathVariable Long routingId, @RequestBody @Validated MapRoutingVO routingVO) {
iDraftMapService.updateRouting(routingId, routingVO);
}
@ApiOperation(value = "删除交路")
/**
*删除交路
*/
@DeleteMapping(path = "/routing/{routingId}")
public void deleteRouting(@PathVariable Long routingId) {
iDraftMapService.deleteRouting(routingId);
@ -486,37 +603,49 @@ public class DraftMapController {
/*-------------- 新 交路 ------------------*/
@ApiOperation(value = "新创建交路,可同时创建回路")
/**
*新创建交路可同时创建回路
*/
@PostMapping(path = "/routingData")
public void createRoutingData(@RequestBody @Validated MapRoutingDataVO routingVO) {
iDraftMapService.createRoutingData(routingVO);
}
@ApiOperation(value = "新生成交路区段数据")
/**
*新生成交路区段数据
*/
@PutMapping(path = "/routingData/generate")
public MapRoutingDataVO generateRoutingData(@RequestBody @Validated MapRoutingDataVO routingVO) {
return iDraftMapService.generateRoutingData(routingVO);
}
@ApiOperation(value = "新分页获取交路")
/**
*新分页获取交路
*/
@GetMapping(path = "/{mapId}/routingData")
public PageVO<MapRoutingDataVO> queryPagedRoutingData(@PathVariable Long mapId, MapRoutingDataQueryVO queryVO) {
return iDraftMapService.queryPagedRoutingData(mapId, queryVO);
}
@ApiOperation(value = "新获取交路详情")
/**
*新获取交路详情
*/
@GetMapping(path = "/routingData/{routingId}")
public MapRoutingDataVO getRoutingData(@PathVariable Long routingId) {
return iDraftMapService.getRoutingData(routingId);
}
@ApiOperation(value = "新更新交路")
/**
*新更新交路
*/
@PutMapping(path = "/routingData/{routingId}")
public void updateRoutingData(@PathVariable Long routingId, @RequestBody @Validated MapRoutingDataVO routingVO) {
iDraftMapService.updateRoutingData(routingId, routingVO);
}
@ApiOperation(value = "新删除交路")
/**
*新删除交路
*/
@DeleteMapping(path = "/routingData/{routingId}")
public void deleteRoutingData(@PathVariable Long routingId) {
iDraftMapService.deleteRouting(routingId);
@ -524,31 +653,41 @@ public class DraftMapController {
/*-------------- 新 车站区段停站时间 ------------------*/
@ApiOperation(value = "新创建车站区段停站时间")
/**
*新创建车站区段停站时间
*/
@PostMapping(path = "/stationParkTime")
public void createStationParkTime(@RequestBody @Validated MapStationParkingTimeVO parkingTimeVO) {
iDraftMapService.createStationParkTime(parkingTimeVO);
}
@ApiOperation(value = "新分页车站区段停站时间")
/**
*新分页车站区段停站时间
*/
@GetMapping(path = "/{mapId}/stationParkTime")
public PageVO<MapStationParkingTimeVO> queryPagedStationParkTime(@PathVariable Long mapId, MapParkTimeQueryVO queryVO) {
return iDraftMapService.queryPagedStationParkTime(mapId, queryVO);
}
@ApiOperation(value = "新获取车站区段停站时间")
/**
*新获取车站区段停站时间
*/
@GetMapping(path = "/stationParkTime/{id}")
public MapStationParkingTimeVO getStationParkTime(@PathVariable Long id) {
return iDraftMapService.getStationParkTime(id);
}
@ApiOperation(value = "新更新车站区段停站时间")
/**
*新更新车站区段停站时间
*/
@PutMapping(path = "/stationParkTime/{id}")
public void updateStationParkTime(@PathVariable Long id, @RequestBody @Validated MapStationParkingTimeVO parkingTimeVO) {
iDraftMapService.updateStationParkTime(id, parkingTimeVO);
}
@ApiOperation(value = "新删除车站区段停站时间")
/**
*新删除车站区段停站时间
*/
@DeleteMapping(path = "/stationParkTime/{id}")
public void deleteStationParkTime(@PathVariable Long id) {
iDraftMapService.deleteStationParkTime(id);
@ -556,19 +695,25 @@ public class DraftMapController {
/*-------------- 3d ------------------*/
@ApiOperation(value = "创建地图3d数据")
/**
*创建地图3d数据
*/
@PostMapping(path = "/3dMapData")
public Map3dDataVO create3dMapData(@RequestBody @Validated Map3dDataVO mapData3D, @RequestAttribute AccountVO user) {
return iDraftMapService.create3dMapData(mapData3D, user);
}
@ApiOperation(value = "通过地图id获取地图3d数据")
/**
*通过地图id获取地图3d数据
*/
@GetMapping(path = "/3dMapData/{mapId}")
public Map3dDataVO get3dMapDataByMapId(@PathVariable Long mapId) {
return iDraftMapService.find3dMapDataByMapId(mapId);
}
@ApiOperation(value = "更新保存地图3d数据")
/**
*更新保存地图3d数据
*/
@PutMapping(path = "/3dMapData/{map3dId}")
public void update3dMapData(@PathVariable Long map3dId, @RequestBody @Validated Map3dDataVO mapData3D) {
iDraftMapService.update3dMapData(map3dId, mapData3D);
@ -576,31 +721,41 @@ public class DraftMapController {
/*-------------- 目的地码 ------------------*/
@ApiOperation(value = "保存目的地码")
/**
*保存目的地码
*/
@PostMapping("/{mapId}/destinationCodeDefinition")
public void saveOperationDefinitions(@PathVariable Long mapId, @RequestBody @Validated MapDestinationCodeDefinitionVO operationDefinitionVO) {
iDraftMapService.saveOperationDefinitions(mapId, operationDefinitionVO);
}
@ApiOperation(value = "根据地图id和code获取目的地码")
/**
*根据地图id和code获取目的地码
*/
@GetMapping("/{mapId}/{code}/destinationCodeDefinition")
public MapDestinationCodeDefinitionVO getOperationDefinitions(@PathVariable Long mapId, @PathVariable String code) {
return iDraftMapService.getOperationDefinitions(mapId, code);
}
@ApiOperation("分页获取目的地码")
/**
*分页获取目的地码
*/
@GetMapping("/{mapId}/destinationCodeDefinition")
public PageVO<MapDestinationCodeDefinitionVO> queryPagedOperationDefinitions(@PathVariable Long mapId, MapDestinationCodeDefinitionQueryVO queryVO) {
return iDraftMapService.pagedQueryOperationDefinitions(mapId, queryVO);
}
@ApiOperation("更新目的地码")
/**
*更新目的地码
*/
@PutMapping("/{mapId}/destinationCodeDefinition")
public void updateOperationDefinition(@PathVariable Long mapId, @RequestBody MapDestinationCodeDefinitionVO definitionVO) {
iDraftMapService.updateOperationDefinition(mapId, definitionVO);
}
@ApiOperation("删除目的地码")
/**
*删除目的地码
*/
@DeleteMapping("/{mapId}/{code}/destinationCodeDefinition")
public void deleteOperationDefinition(@PathVariable Long mapId, @PathVariable String code){
iDraftMapService.deleteOperationDefinition(mapId, code);

View File

@ -1,7 +1,6 @@
package club.joylink.rtss.controller.draft;
import club.joylink.rtss.services.draftData.DraftMapDataHandleService;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
@ -9,8 +8,10 @@ import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 草稿地图数据处理接口
*/
@Slf4j
@Api(tags = {"草稿地图数据处理接口"})
@RestController
@RequestMapping("/api/draftMap/handle")
public class DraftMapDataHandleController {

View File

@ -4,14 +4,14 @@ import club.joylink.rtss.services.draftData.DraftMapFlankProtectionService;
import club.joylink.rtss.vo.client.PageVO;
import club.joylink.rtss.vo.map.MapRouteFlankProtectionNewVO;
import club.joylink.rtss.vo.map.query.MapRouteFlankProtectionQueryVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@Api(tags = {"草稿地图侧防管理接口"})
/**
*草稿地图侧防管理接口
*/
@RestController
@RequestMapping("/api/draftMap/flankProtection")
@Slf4j
@ -20,32 +20,42 @@ public class DraftMapFlankProtectionController {
@Autowired
private DraftMapFlankProtectionService draftMapFlankProtectionService;
@ApiOperation(value = "新建进路侧防")
/**
*新建进路侧防
*/
@PostMapping(path = "")
public void create(@RequestBody @Validated MapRouteFlankProtectionNewVO flankProtectionNewVO) {
this.draftMapFlankProtectionService.create(flankProtectionNewVO);
}
@ApiOperation(value = "查询进路侧防列表")
/**
*查询进路侧防列表
*/
@GetMapping(path = "/{mapId}/paging")
public PageVO<MapRouteFlankProtectionNewVO> pagingQueryFlankProtection(@PathVariable Long mapId,
MapRouteFlankProtectionQueryVO queryVO) {
return this.draftMapFlankProtectionService.pagingQueryFlankProtections(mapId, queryVO);
}
@ApiOperation(value = "查询进路侧防明细")
/**
*查询进路侧防明细
*/
@GetMapping(path = "/{id}")
public MapRouteFlankProtectionNewVO getRouteDetailNew(@PathVariable Long id) {
return this.draftMapFlankProtectionService.getById(id);
}
@ApiOperation(value = "更新进路侧防数据")
/**
*更新进路侧防数据
*/
@PutMapping(path = "/{id}")
public void update(@PathVariable Long id, @RequestBody @Validated MapRouteFlankProtectionNewVO flankProtectionNewVO) {
this.draftMapFlankProtectionService.update(id, flankProtectionNewVO);
}
@ApiOperation(value = "删除进路侧防")
/**
*删除进路侧防
*/
@DeleteMapping(path = "/{id}")
public void delete(@PathVariable Long id) {
this.draftMapFlankProtectionService.delete(id);

View File

@ -6,14 +6,14 @@ import club.joylink.rtss.vo.map.MapStationRunLevelVO;
import club.joylink.rtss.vo.map.query.MapRunLevelQueryVO;
import club.joylink.rtss.vo.map.validate.RunLevelCreateCheck;
import club.joylink.rtss.vo.map.validate.RunLevelUpdateCheck;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@Api(tags = {"草稿地图运行等级管理接口"})
/**
*草稿地图运行等级管理接口
*/
@RestController
@RequestMapping("/api/draftMap/runLevel")
@Slf4j
@ -22,49 +22,65 @@ public class DraftMapStationRunLevelController {
@Autowired
private DraftMapRunLevelService draftMapRunLevelService;
@ApiOperation(value = "根据地图交路区段生成站间运行等级")
/**
*根据地图交路区段生成站间运行等级
*/
@PostMapping(path = "/generate/routing/{routingId}")
public void generate(@PathVariable Long routingId) {
this.draftMapRunLevelService.generate(routingId);
}
@ApiOperation(value = "根据地图交路一键生成生成所有站间运行等级")
/**
*根据地图交路一键生成生成所有站间运行等级
*/
@PostMapping(path = "/generate/routing")
public void autoGenerate(Long mapId) {
this.draftMapRunLevelService.autoGenerate(mapId);
}
@ApiOperation(value = "根据地图起始-终点车站站台区段生成站间运行等级")
/**
*根据地图起始-终点车站站台区段生成站间运行等级
*/
@PostMapping(path = "/generate")
public MapStationRunLevelVO generate(@RequestBody @Validated MapStationRunLevelVO runLevelVO) {
return this.draftMapRunLevelService.generate(runLevelVO);
}
@ApiOperation(value = "新建站间运行等级")
/**
*新建站间运行等级
*/
@PostMapping(path = "")
public void createRoute(@RequestBody @Validated(RunLevelCreateCheck.class) MapStationRunLevelVO runLevelVO) {
this.draftMapRunLevelService.create(runLevelVO);
}
@ApiOperation(value = "查询站间运行等级列表")
/**
*查询站间运行等级列表
*/
@GetMapping(path = "/{mapId}/listAll")
public PageVO<MapStationRunLevelVO> queryPagedRouteNew(@PathVariable Long mapId, MapRunLevelQueryVO queryVO) {
return this.draftMapRunLevelService.queryAllRunLevels(mapId, queryVO);
}
@ApiOperation(value = "查询站间运行等级明细")
/**
*查询站间运行等级明细
*/
@GetMapping(path = "/{id}")
public MapStationRunLevelVO getRouteDetailNew(@PathVariable Long id) {
return this.draftMapRunLevelService.getById(id);
}
@ApiOperation(value = "更新站间运行等级数据")
/**
*更新站间运行等级数据
*/
@PutMapping(path = "/{id}")
public void updateRoute(@PathVariable Long id, @RequestBody @Validated(RunLevelUpdateCheck.class) MapStationRunLevelVO runLevelVO) {
this.draftMapRunLevelService.update(id, runLevelVO);
}
@ApiOperation(value = "删除站间运行等级")
/**
*删除站间运行等级
*/
@DeleteMapping(path = "/{id}")
public void deleteRouteNew(@PathVariable Long id) {
this.draftMapRunLevelService.delete(id);

View File

@ -7,16 +7,15 @@ import club.joylink.rtss.vo.LoginUserInfoVO;
import club.joylink.rtss.vo.client.*;
import club.joylink.rtss.vo.client.validGroup.DraftLessonCreateCheck;
import club.joylink.rtss.vo.client.validGroup.DraftLessonCreateFromCheck;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import java.util.List;
@Api(tags = { "课程草稿数据管理接口" })
/**
*课程草稿数据管理接口
*/
@RestController
@RequestMapping("/api/lessonDraft")
public class LessonDraftController {
@ -24,87 +23,115 @@ public class LessonDraftController {
@Autowired
private ILessonDraftService iLessonDraftService;
@ApiOperation(value = "分页查询个人课程草稿")
/**
*分页查询个人课程草稿
*/
@GetMapping(path = "/{mapId}/list")
public PageVO<LessonVO> getLessonTree(@PathVariable Long mapId, PageQueryVO queryVO, @ApiIgnore @RequestAttribute AccountVO user) {
public PageVO<LessonVO> getLessonTree(@PathVariable Long mapId, PageQueryVO queryVO, @RequestAttribute AccountVO user) {
return this.iLessonDraftService.queryPagedDraftLesson(mapId, queryVO, user);
}
@ApiOperation(value = "分页查询个人当前项目下课程草稿")
/**
*分页查询个人当前项目下课程草稿
*/
@GetMapping(path = "/paged/self")
public PageVO<LessonVO> pagedQueryPersonalLesson(LessonQueryVO pageQueryVO,
@RequestAttribute(AuthenticateInterceptor.LOGIN_INFO_KEY) LoginUserInfoVO loginInfo) {
return this.iLessonDraftService.pagedQueryPersonalLesson(pageQueryVO, loginInfo);
}
@ApiOperation(value = "获取课程树")
/**
*获取课程树
*/
@GetMapping(path = "/{lessonId}/tree")
public List<TreeNode> getLessonTree(@PathVariable Long lessonId, @ApiIgnore @RequestAttribute AccountVO user) {
public List<TreeNode> getLessonTree(@PathVariable Long lessonId, @RequestAttribute AccountVO user) {
return this.iLessonDraftService.getLessonTree(lessonId, user);
}
@ApiOperation(value = "获取课程基本信息")
/**
*获取课程基本信息
*/
@GetMapping(path="/{id}")
public LessonVO getLesson(@PathVariable Long id) {
return this.iLessonDraftService.getLesson(id);
}
@ApiOperation(value = "创建课程信息")
/**
*创建课程信息
*/
@PostMapping(path = "")
public void createLesson(@RequestBody @Validated(value = DraftLessonCreateCheck.class) LessonVO lessonVo, @RequestAttribute AccountVO user) {
this.iLessonDraftService.createLesson(lessonVo, user);
}
@ApiOperation(value = "从发布课程创建")
/**
*从发布课程创建
*/
@PostMapping(path = "/createForm")
public void createFrom(@RequestBody @Validated(value = DraftLessonCreateFromCheck.class) LessonVO lessonVo, @RequestAttribute AccountVO user) {
this.iLessonDraftService.createFrom(lessonVo, user);
}
@ApiOperation(value = "更新课程信息")
/**
*更新课程信息
*/
@PutMapping(path = "/{id}")
public void updateLesson(@PathVariable Long id, @RequestBody LessonVO lessonVo, @RequestAttribute AccountVO user) {
this.iLessonDraftService.updateLesson(id, lessonVo, user);
}
@ApiOperation(value = "删除课程")
/**
*删除课程
*/
@DeleteMapping(path="/{id}")
public void deleteLesson(@PathVariable Long id) {
this.iLessonDraftService.deleteLesson(id);
}
@ApiOperation(value = "发布课程")
/**
*发布课程
*/
@PostMapping(path="/{id}/publish")
public void publishLesson(@PathVariable Long id, @RequestBody @Validated LessonPublishVO publishVO) {
this.iLessonDraftService.publishLesson(id, publishVO);
}
@ApiOperation(value = "获取课程章节信息")
/**
*获取课程章节信息
*/
@GetMapping(path="/chapter/{id}")
public LessonChapterVO getChapter(@PathVariable Long id) {
return this.iLessonDraftService.getChapter(id);
}
@ApiOperation(value = "创建课程章节")
/**
*创建课程章节
*/
@PostMapping(path="/{id}/chapter")
public void createChapter(@PathVariable Long id, @RequestBody @Validated LessonChapterVO chapterVo) {
chapterVo.setLessonId(id);
this.iLessonDraftService.createChapter(chapterVo);
}
@ApiOperation(value = "更新课程章节信息")
/**
*更新课程章节信息
*/
@PutMapping(path="/chapter/{id}")
public void updateChapter(@PathVariable Long id, @RequestBody @Validated LessonChapterVO chapterVo) {
this.iLessonDraftService.updateChapter(id, chapterVo);
}
@ApiOperation(value = "删除课程章节")
/**
*删除课程章节
*/
@DeleteMapping(path="/chapter/{id}")
public void updateChapter(@PathVariable Long id) {
this.iLessonDraftService.deleteChapter(id);
}
@ApiOperation(value = "拖拽排序")
/**
*拖拽排序
*/
@PutMapping(path="/dragSort")
public void dragSort(@RequestBody DragSortReqVO sortReq) {
this.iLessonDraftService.dragSort(sortReq);

View File

@ -0,0 +1,70 @@
package club.joylink.rtss.controller.draft;
import club.joylink.rtss.services.model2d.Model2dDraftService;
import club.joylink.rtss.vo.AccountVO;
import club.joylink.rtss.vo.client.PageVO;
import club.joylink.rtss.vo.model2d.Model2dCreateCheck;
import club.joylink.rtss.vo.model2d.Model2dQueryVO;
import club.joylink.rtss.vo.model2d.Model2dVO;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
/**
* 2d模型操作接口
*/
@RestController
@RequestMapping("/draft/model2d")
public class Model2dDraftController {
private Model2dDraftService model2dDraftService;
/**
* 新建用户草稿2d模型
* @param model2dVO
* @return
*/
@PostMapping("/")
public String create(@RequestBody @Validated(Model2dCreateCheck.class) Model2dVO model2dVO, @RequestAttribute AccountVO user) {
return model2dDraftService.create(model2dVO, user);
}
/**
* 分页查询用户2d模型草稿
* @param queryVO
* @return
*/
@GetMapping("/paging")
public PageVO<Model2dVO> pageQuery(Model2dQueryVO queryVO, @RequestAttribute AccountVO user) {
return this.model2dDraftService.pageQuery(queryVO, user);
}
/**
* 更新2d模型基本信息
* @param id
* @param model2dVO
*/
@PutMapping("/{id}/basic")
public void updateBasicInfo(@PathVariable Long id, @RequestBody Model2dVO model2dVO, @RequestAttribute AccountVO user) {
this.model2dDraftService.updateBasicInfo(id, model2dVO, user);
}
/**
* 更新2d模型数据
* @param id
* @param model2dVO
*/
@PutMapping("/{id}/data")
public void updateData(@PathVariable Long id, @RequestBody Model2dVO model2dVO, @RequestAttribute AccountVO user) {
this.model2dDraftService.updateData(id, model2dVO, user);
}
/**
* 删除用户草稿2d模型
* @param id
*/
@DeleteMapping("/{id}")
public void delete(@PathVariable Long id) {
this.model2dDraftService.delete(id);
}
}

View File

@ -6,15 +6,14 @@ import club.joylink.rtss.vo.client.PageVO;
import club.joylink.rtss.vo.client.iscs.IscsCopyVO;
import club.joylink.rtss.vo.client.iscs.IscsQueryVO;
import club.joylink.rtss.vo.client.iscs.IscsVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
@Api(tags = {"iscs数据"})
/**
*iscs数据
*/
@RestController
@RequestMapping("/api/v1/iscs")
@Slf4j
@ -23,7 +22,9 @@ public class IscsController {
@Autowired
private IIscsService iscsService;
@ApiOperation("分页查询iscs数据")
/**
*分页查询iscs数据
*/
@GetMapping("/pagedQuery")
public PageVO<IscsVO> pagedQuery(IscsQueryVO queryVO) {
return iscsService.pagedQuery(queryVO);
@ -32,31 +33,41 @@ public class IscsController {
/**
* 保存地图元素信息
*/
@ApiOperation(value = "保存iscs数据")
/**
*保存iscs数据
*/
@PostMapping(path = "saveElements")
public void saveIscsData(@RequestBody IscsVO iscsVO ,@ApiIgnore @RequestAttribute AccountVO user) {
public void saveIscsData(@RequestBody IscsVO iscsVO , @RequestAttribute AccountVO user) {
iscsService.saveIscsData(iscsVO);
}
@ApiOperation(value = "根据条件获取iscs数据")
/**
*根据条件获取iscs数据
*/
@GetMapping
public IscsVO getIscsDataBy(@Validated IscsVO iscsVO, @ApiIgnore @RequestAttribute AccountVO user) {
public IscsVO getIscsDataBy(@Validated IscsVO iscsVO, @RequestAttribute AccountVO user) {
return this.iscsService.getIscsDataBy(iscsVO);
}
@ApiOperation("删除iscs数据")
/**
*删除iscs数据
*/
@DeleteMapping("/{id}")
public void delete(@PathVariable Integer id) {
iscsService.delete(id);
}
@ApiOperation("地图是否有iscs数据")
/**
*地图是否有iscs数据
*/
@GetMapping("hasData")
public boolean isExisted(Long mapId) {
return iscsService.isExistedWithMapId(mapId);
}
@ApiOperation("复制iscs数据")
/**
*复制iscs数据
*/
@PostMapping("/copy")
public void copy(@RequestBody @Validated IscsCopyVO copyVO) {
iscsService.copy(copyVO);

View File

@ -6,15 +6,15 @@ import club.joylink.rtss.vo.license.LicenseCreateCheck;
import club.joylink.rtss.vo.license.LicenseQueryVO;
import club.joylink.rtss.vo.license.LicenseVO;
import club.joylink.rtss.vo.license.LicenseValidateCheck;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.util.Objects;
@Api(tags = {"许可证服务接口"})
/**
*许可证服务接口
*/
@RestController
@RequestMapping(path = "/api/license")
public class LicenseController {
@ -22,37 +22,49 @@ public class LicenseController {
@Autowired
private LicenseService licenseService;
@ApiOperation("创建新的license")
/**
*创建新的license
*/
@PostMapping("")
public void createLicense(@RequestBody @Validated(LicenseCreateCheck.class) LicenseVO licenseVO) {
this.licenseService.createLicense(licenseVO);
}
@ApiOperation("分页查询license数据列表")
/**
*分页查询license数据列表
*/
@GetMapping("/pagingQuery")
public PageVO<LicenseVO> pagedQuery(LicenseQueryVO queryVO) {
return this.licenseService.pagedQuery(queryVO);
}
@ApiOperation("设置失效(不可用)")
/**
*设置失效不可用
*/
@PutMapping("/{id}/invalidating")
public void invalidating(@PathVariable Long id) {
this.licenseService.invalidating(id);
}
@ApiOperation("本地部署第一次使用连接互联网访问joylink服务验证license")
/**
*本地部署第一次使用连接互联网访问joylink服务验证license
*/
@PostMapping("/validate")
public boolean validateLicense(@RequestBody @Validated(LicenseValidateCheck.class) LicenseVO licenseVO) {
return this.licenseService.validateLicense(licenseVO.getLicense());
}
@ApiOperation("连接互联网验证license成功后将license证书保存到本地部署服务器")
/**
*连接互联网验证license成功后将license证书保存到本地部署服务器
*/
@PostMapping("/local")
public void saveLocalLicense(@RequestBody @Validated(LicenseValidateCheck.class) LicenseVO licenseVO) {
this.licenseService.saveLocalLicense(licenseVO.getLicense());
}
@ApiOperation("获取本地已经保存的license")
/**
*获取本地已经保存的license
*/
@GetMapping("/local")
public String getLocalLicense() {
LicenseVO license = this.licenseService.getLicense();

View File

@ -5,9 +5,6 @@ import club.joylink.rtss.vo.client.WebSocketMessageType;
import club.joylink.rtss.vo.client.factory.SocketMessageFactory;
import club.joylink.rtss.vo.client.pushMessage.CommonMessageVO;
import club.joylink.rtss.websocket.StompMessageService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
@ -20,7 +17,9 @@ import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
@Api(value = "推送消息管理controller", tags = "推送消息管理接口")
/**
* 推送消息管理接口
*/
@Slf4j
@RestController
@RequestMapping("/api/pushMessage")
@ -32,9 +31,12 @@ public class PushMessageController {
@Autowired
private LoginSessionManager loginSessionManager;
@ApiOperation(value = "触发消息推送", httpMethod = "POST")
/**
* 触发消息推送
* @param commonMessageVO
*/
@RequestMapping(method = RequestMethod.POST)
public void pushMessage(@ApiParam(name = "传入对象", type = "json", value = "传入json格式", required = true) @Valid @RequestBody CommonMessageVO commonMessageVO) {
public void pushMessage(@Valid @RequestBody CommonMessageVO commonMessageVO) {
log.info("****触发消息推送********");
List<Long> userIdList = this.loginSessionManager.getAllLoginUserIds();
Set<String> allSubscribers = userIdList.stream().map(id -> String.valueOf(id)).collect(Collectors.toSet());

View File

@ -4,13 +4,14 @@ import club.joylink.rtss.controller.advice.AuthenticateInterceptor;
import club.joylink.rtss.simulation.cbtc.passenger.PassengerFlowSimulateService;
import club.joylink.rtss.vo.AccountVO;
import club.joylink.rtss.vo.client.passenger.PassengerFlowMessage2TD;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@Api("客流量")
/**
* 客流
*/
@RestController
@RequestMapping("/api/passenger")
public class PassengerController {

View File

@ -9,15 +9,15 @@ import club.joylink.rtss.vo.client.goods.GoodsUpdateVO;
import club.joylink.rtss.vo.client.goods.GoodsVO;
import club.joylink.rtss.vo.client.permission.PermissionQueryVO;
import club.joylink.rtss.vo.client.permission.PermissionSelectVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Map;
@Api(tags = {"商品管理接口"})
/**
*商品管理接口
*/
@RestController
@RequestMapping(path = "/api/goods")
public class GoodsController {
@ -25,85 +25,81 @@ public class GoodsController {
@Autowired
private IGoodsService iGoodsService;
@ApiOperation(value = "分页查询商品")
/**
*分页查询商品
*/
@GetMapping(path = "")
public PageVO<GoodsVO> queryPagedGoods(GoodsQueryVO queryVO) {
return iGoodsService.queryPagedGoods(queryVO);
}
@ApiOperation(value = "查询指定权限的商品")
/**
*查询指定权限的商品
*/
@GetMapping(path = "/detail")
public PageVO<GoodsVO> queryPagedGoodsByPermission(PermissionQueryVO queryVO) {
return iGoodsService.queryPagedGoodsByPermission(queryVO);
}
@ApiOperation(value = "查询商品详情")
/**
*查询商品详情
*/
@GetMapping(path = "/{id}")
public GoodsVO selectById(@PathVariable long id) {
return iGoodsService.queryById(id);
}
@ApiOperation(value = "获取有效商品列表")
/**
*获取有效商品列表
*/
@GetMapping(path = "/list")
public List<GoodsVO> selectValidGoodsList() {
return iGoodsService.selectValidGoodsList();
}
// @ApiOperation(value = "创建商品")
// @PostMapping(path = "")
// public GoodsVO createGoods(@RequestBody @Validated(value = {CreateGoodsCheck.class}) GoodsCreateVO createVO, @ApiIgnore @RequestAttribute UserVO user) {
// return iGoodsService.createGoods(createVO, user);
// }
//
// @ApiOperation(value = "批量创建商品")
// @PostMapping(path = "/create/list")
// public List<GoodsVO> createManyGoods(@RequestBody @Validated(value = {CreateGoodsCheck.class}) List<GoodsCreateVO> createVOList, @ApiIgnore @RequestAttribute UserVO user) {
// return iGoodsService.createManyGoods(createVOList, user);
// }
//
// @ApiOperation(value = "通过关联权限创建权限包商品")
// @PostMapping(path = "/create/package")
// public GoodsVO createGoodsByRelPermissions(@RequestBody @Validated(value = {CreateGoodsByPermissionPackageCheck.class}) GoodsCreateVO createVO, @ApiIgnore @RequestAttribute UserVO user) {
// return iGoodsService.createGoodsByRelPermissions(createVO, user);
// }
@ApiOperation(value = "更新商品")
/**
*更新商品
*/
@PutMapping(path = "/{id}")
public void updateGoods(@PathVariable Long id, @RequestBody GoodsUpdateVO updateVO, @RequestAttribute AccountVO user) {
iGoodsService.updateGoods(id, updateVO, user);
}
// @ApiOperation(value = "删除商品")
// @DeleteMapping(path = "/{id}")
// public void deleteGoods(@PathVariable long id) {
// iGoodsService.deleteGoods(id);
// }
@ApiOperation(value = "更新试用时间")
/**
*更新试用时间
*/
@PutMapping(path = "/{id}/tryUse")
public void tryUse(@PathVariable Long id, @RequestBody Map<String, Long> map, @RequestAttribute AccountVO user) {
this.iGoodsService.tryUse(id, map, user);
}
@ApiOperation(value = "获取试用时长")
/**
*获取试用时长
*/
@GetMapping(path = "/tryUse")
public GoodsTryVO getTryUseTime(PermissionSelectVO permissionSelectVO, @RequestAttribute AccountVO user) {
return this.iGoodsService.getTryUseTime(permissionSelectVO, user);
}
@ApiOperation(value = "切换商品是否可用")
/**
*切换商品是否可用
*/
@PutMapping(path = "/{id}/status")
public void toggleGoodsStatus(@PathVariable long id) {
iGoodsService.toggleGoodsStatus(id);
}
@ApiOperation(value = "根据权限id查询商品")
/**
*根据权限id查询商品
*/
@GetMapping(path = "/permissionId")
public GoodsVO selectGoodsByPermissionId(Long permissionId) {
return iGoodsService.queryGoodsByPermissionId(permissionId);
}
@ApiOperation(value = "根据权限ids查询权限包商品")
/**
*根据权限ids查询权限包商品
*/
@GetMapping(path = "/permissionIds")
public GoodsVO findGoodsByPermissionIds(Long[] ids) {
return iGoodsService.findGoodsByRelPermissionIds(ids);

View File

@ -7,41 +7,48 @@ import club.joylink.rtss.vo.client.order.OrderCreateVO;
import club.joylink.rtss.vo.client.order.OrderDetailVO;
import club.joylink.rtss.vo.client.order.OrderVO;
import club.joylink.rtss.vo.client.permission.OrderQueryVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import java.util.List;
@Api(tags = { "订单管理接口" })
/**
*订单管理接口
*/
@RestController
@RequestMapping("/api/order")
public class OrderController {
@Autowired
private IOrderService iOrderService;
@ApiOperation(value = "分页获取订单")
/**
*分页获取订单
*/
@GetMapping(path = "")
public PageVO<OrderVO> queryPagedOrders(OrderQueryVO queryVO) {
return this.iOrderService.queryPagedOrders(queryVO);
}
@ApiOperation(value = "分页获取订单(销售员)")
/**
*分页获取订单(销售员)
*/
@GetMapping(path = "/seller")
public PageVO<OrderVO> queryPagedOrders(OrderQueryVO queryVO, @RequestAttribute @ApiIgnore AccountVO user) {
public PageVO<OrderVO> queryPagedOrders(OrderQueryVO queryVO, @RequestAttribute AccountVO user) {
return this.iOrderService.queryPagedOrders(queryVO, user);
}
@ApiOperation(value = "创建订单")
/**
*创建订单
*/
@PostMapping(path="")
public String createOrder(@RequestBody @Validated OrderCreateVO createVO, @RequestAttribute @ApiIgnore AccountVO user) {
public String createOrder(@RequestBody @Validated OrderCreateVO createVO, @RequestAttribute AccountVO user) {
return this.iOrderService.createOrder(createVO, user);
}
@ApiOperation(value = "获取订单详情")
/**
*获取订单详情
*/
@GetMapping(path = "/{id}")
public List<OrderDetailVO> getOrderDetail(@PathVariable Long id) {
return this.iOrderService.getOrderDetail(id);
@ -55,19 +62,25 @@ public class OrderController {
// return this.iOrderService.pay(id, payType, null);
// }
@ApiOperation(value = "订单提交")
/**
*订单提交
*/
@PostMapping(path = "/submit")
public OrderCreateVO submit(@RequestBody OrderCreateVO orderCreateVO, @RequestAttribute AccountVO user) {
return this.iOrderService.submit(orderCreateVO, user);
}
@ApiOperation(value = "计算订单总价")
/**
*计算订单总价
*/
@GetMapping(path = "/price")
public Float computeTotal(Long goodsId, Integer goodsAmount, Integer monthAmount) {
return this.iOrderService.compute(goodsId, goodsAmount, monthAmount);
}
@ApiOperation(value = "订单取消支付")
/**
*订单取消支付
*/
@PutMapping(path = "/{id}/cancelPay")
public void cancelPay(@PathVariable Long id, @RequestAttribute AccountVO user) {
this.iOrderService.cancelPay(id, user);

View File

@ -6,13 +6,12 @@ import club.joylink.rtss.vo.client.PageVO;
import club.joylink.rtss.vo.client.permission.PermissionQueryVO;
import club.joylink.rtss.vo.client.permission.PermissionUpdateVO;
import club.joylink.rtss.vo.client.permission.PermissionVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
@Api(tags = {"权限管理接口"})
/**
*权限管理接口
*/
@RestController
@RequestMapping("/api/permission")
public class PermissionController {
@ -20,19 +19,25 @@ public class PermissionController {
@Autowired
private IPermissionService iPermissionService;
@ApiOperation(value = "分页获取权限数据")
/**
*分页获取权限数据
*/
@GetMapping(path = "")
public PageVO<PermissionVO> queryPagedPermission(PermissionQueryVO queryVO) {
return iPermissionService.queryPagedPermission(queryVO);
}
@ApiOperation(value = "查询权限详情")
/**
*查询权限详情
*/
@GetMapping(path = "/{id}")
public PermissionVO getDetailWithSub(@PathVariable Long id) {
return iPermissionService.getById(id);
}
@ApiOperation(value = "查询包权限详情")
/**
*查询包权限详情
*/
@GetMapping(path = "/{id}/package")
public PageVO<PermissionVO> getPackageDetail(@PathVariable Long id, PermissionQueryVO queryVO) {
return iPermissionService.getPackageDetail(id, queryVO);
@ -44,22 +49,28 @@ public class PermissionController {
// return iPermissionService.create(createVO, user);
// }
@ApiOperation(value = "更新权限")
/**
*更新权限
*/
@PutMapping(path = "/{id}")
public void updatePermission(@PathVariable Long id, @RequestBody PermissionUpdateVO updateVO,
@RequestAttribute @ApiIgnore AccountVO user) {
@RequestAttribute AccountVO user) {
iPermissionService.updatePermission(id, updateVO, user);
}
@ApiOperation(value = "一键生成权限")
/**
*一键生成权限
*/
@PostMapping(path = "/{mapId}/generate")
public void generatePermission(@PathVariable Long mapId, @RequestAttribute @ApiIgnore AccountVO user) {
public void generatePermission(@PathVariable Long mapId, @RequestAttribute AccountVO user) {
iPermissionService.generatePermission(mapId, user);
}
@ApiOperation(value = "真·一键生成权限")
/**
*·一键生成权限
*/
@PostMapping(path = "/realGenerate")
public void realGenerate(@RequestAttribute @ApiIgnore AccountVO user) {
public void realGenerate(@RequestAttribute AccountVO user) {
iPermissionService.realGenerate(user);
}
}

View File

@ -11,16 +11,15 @@ import club.joylink.rtss.vo.client.permissionDistribute.DistributeVO;
import club.joylink.rtss.vo.client.permissionDistribute.PermissionDistributeQueryVO;
import club.joylink.rtss.vo.client.userPermission.UserPermissionDistributeVO;
import club.joylink.rtss.vo.client.userPermission.UserPermissionVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import java.util.List;
@Api(tags = {"权限分发管理接口"})
/**
*权限分发管理接口
*/
@RestController
@RequestMapping("/api/distribute")
public class PermissionDistributeController {
@ -28,33 +27,43 @@ public class PermissionDistributeController {
@Autowired
private IPermissionDistributeService permissionDistributeService;
@ApiOperation(value = "分页查询权限分发数据")
/**
*分页查询权限分发数据
*/
@GetMapping(path = "")
public PageVO<DistributeVO> queryPagedDistribute(PermissionDistributeQueryVO queryVO) {
return this.permissionDistributeService.queryPagedDistribute(queryVO);
}
@ApiOperation(value = "生成打包分发二维码")
/**
*生成打包分发二维码
*/
@GetMapping(path = "/package/qrCode")
public String generateQrCode(Long id) {
return this.permissionDistributeService.generateQrCode(id);
}
@ApiOperation(value = "权限分发立即失效")
/**
*权限分发立即失效
*/
@GetMapping(path = "/{id}/invalid")
public void immediateInvalid(@PathVariable Long id) {
permissionDistributeService.immediateInvalid(id);
}
@ApiOperation(value = "从订单分发权限,获取权限分发二维码")
/**
*从订单分发权限获取权限分发二维码
*/
@GetMapping(path = "/{orderCode}/distribute")
public String givePermission(@PathVariable String orderCode, @RequestAttribute @ApiIgnore AccountVO user) {
public String givePermission(@PathVariable String orderCode, @RequestAttribute AccountVO user) {
return permissionDistributeService.distributeFromOrder(orderCode, user);
}
@ApiOperation(value = "权限获取")
/**
*权限获取
*/
@GetMapping(path = "/getPermission")
public void getPermission(Long state, @RequestAttribute @ApiIgnore AccountVO user) {
public void getPermission(Long state, @RequestAttribute AccountVO user) {
this.permissionDistributeService.getUserPermission(state, user);
}
@ -66,47 +75,61 @@ public class PermissionDistributeController {
*/
@PostMapping(path = "/{id}/distribute/{accountId}")
public void distributeToAccount(@PathVariable Long id, @PathVariable Long accountId,
@RequestAttribute @ApiIgnore AccountVO user) {
@RequestAttribute AccountVO user) {
this.permissionDistributeService.distributeToAccount(id, accountId, user);
}
@ApiOperation(value = "快速生成权限分发")
/**
*快速生成权限分发
*/
@PostMapping(path = "/createQuickly")
public String createQuickly(@RequestBody OrderCreateVO orderCreateVO, @RequestAttribute @ApiIgnore AccountVO user) {
public String createQuickly(@RequestBody OrderCreateVO orderCreateVO, @RequestAttribute AccountVO user) {
return permissionDistributeService.createQuickly(orderCreateVO, user);
}
@ApiOperation(value = "微信小程序扫码获取权限")
/**
*微信小程序扫码获取权限
*/
@GetMapping(path = "/permission")
public List<UserPermissionVO> wmGetPermission(String code, Long id) {
return this.permissionDistributeService.wmGetPermission(code, id);
}
@ApiOperation(value = "用户权限转增分发打包生成权限")
/**
*用户权限转增分发打包生成权限
*/
@PostMapping(path = "/packageUserPermission")
public String packageUserPermission(@RequestBody @Validated UserPermissionDistributeVO userPermissionAndAmountVO, @RequestAttribute @ApiIgnore AccountVO user) {
public String packageUserPermission(@RequestBody @Validated UserPermissionDistributeVO userPermissionAndAmountVO, @RequestAttribute AccountVO user) {
return permissionDistributeService.distributeFromUserPermission(userPermissionAndAmountVO, user);
}
@ApiOperation(value = "查询个人权限分发列表")
/**
*查询个人权限分发列表
*/
@GetMapping(path = "/personal")
public List<DistributeVO> queryPersonalDistributeList(@RequestAttribute @ApiIgnore AccountVO user) {
public List<DistributeVO> queryPersonalDistributeList(@RequestAttribute AccountVO user) {
return permissionDistributeService.queryPersonalDistributeList(user);
}
@ApiOperation(value = "查询权限分发领取用户列表")
/**
*查询权限分发领取用户列表
*/
@GetMapping(path = "/{id}/users")
public List<UserPermissionVO> queryDistributeGetUsers(@PathVariable Long id, @RequestAttribute @ApiIgnore AccountVO user) {
public List<UserPermissionVO> queryDistributeGetUsers(@PathVariable Long id, @RequestAttribute AccountVO user) {
return permissionDistributeService.queryDistributeGetUsers(id, user);
}
@ApiOperation(value = "回收权限分发到用户权限中")
/**
*回收权限分发到用户权限中
*/
@PutMapping(path = "/{id}/restore")
public void restore(@PathVariable Long id) {
this.permissionDistributeService.return2UserPermission(id);
}
@ApiOperation(value = "查询权限分发包详情")
/**
*查询权限分发包详情
*/
@GetMapping(path = "/package/{id}/detail")
public PageVO<DistributeVO> queryPackageDetail(@PathVariable Long id,
PermissionDistributeQueryVO queryVO) {
@ -114,14 +137,18 @@ public class PermissionDistributeController {
}
@Role({RoleEnum.SuperAdmin, RoleEnum.Admin})
@ApiOperation("创建项目下所有地图权限的权限分发")
/**
*创建项目下所有地图权限的权限分发
*/
@PostMapping("/{project}/allMap/distribute")
public String createAllMapDistribute(@PathVariable Project project, Integer num, @RequestAttribute AccountVO user) {
return permissionDistributeService.createAllMapDistribute(project, num, user);
}
@Role(RoleEnum.SuperAdmin)
@ApiOperation("收回从该权限分发获取的用户权限")
/**
*收回从该权限分发获取的用户权限
*/
@PutMapping("/{id}/back")
public void takeBack(@PathVariable Long id) {
permissionDistributeService.takeBack(id);

View File

@ -7,16 +7,15 @@ import club.joylink.rtss.vo.AccountVO;
import club.joylink.rtss.vo.LoginUserInfoVO;
import club.joylink.rtss.vo.client.PageVO;
import club.joylink.rtss.vo.client.project.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import java.util.List;
@Api(tags = {"项目设备管理接口(新)"})
/**
*项目设备管理接口()
*/
@RestController
@RequestMapping(path = "/api/device")
public class DeviceController {
@ -24,142 +23,186 @@ public class DeviceController {
@Autowired
private DeviceService deviceService;
@ApiOperation(value = "分页查询项目设备")
/**
*分页查询项目设备
*/
@GetMapping("/paging")
public PageVO<ProjectDeviceVO> pagingQuery(ProjectDevicePageQueryVO queryVO,
@ApiIgnore @RequestAttribute(name = AuthenticateInterceptor.LOGIN_INFO_KEY)
@RequestAttribute(name = AuthenticateInterceptor.LOGIN_INFO_KEY)
LoginUserInfoVO userLoginInfo) {
return this.deviceService.pagingQuery(queryVO, userLoginInfo);
}
@ApiOperation(value = "项目设备编号是否已经存在")
/**
*项目设备编号是否已经存在
*/
@GetMapping("/exist/{code}")
public boolean isDeviceCodeExist(@PathVariable String code,
@ApiIgnore @RequestAttribute(name = AuthenticateInterceptor.LOGIN_INFO_KEY)
@RequestAttribute(name = AuthenticateInterceptor.LOGIN_INFO_KEY)
LoginUserInfoVO userLoginInfo) {
return this.deviceService.isDeviceCodeExist(userLoginInfo.getProject(), code);
}
@ApiOperation(value = "新建项目设备")
/**
*新建项目设备
*/
@PostMapping("")
public String create(@RequestBody @Validated ProjectDeviceVO deviceVO,
@ApiIgnore @RequestAttribute(name = AuthenticateInterceptor.LOGIN_INFO_KEY)
@RequestAttribute(name = AuthenticateInterceptor.LOGIN_INFO_KEY)
LoginUserInfoVO userLoginInfo) {
return this.deviceService.create(deviceVO, userLoginInfo);
}
@ApiOperation(value = "获取设备详情(包含配置信息)")
/**
*获取设备详情包含配置信息
*/
@GetMapping("/{id}")
public ProjectDeviceVO getDeviceDetailInfoById(@PathVariable Long id) {
return this.deviceService.getDeviceDetailInfoById(id);
}
@ApiOperation(value = "添加/修改道岔设备网关映射配置")
/**
*添加/修改道岔设备网关映射配置
*/
@PutMapping("/{id}/config/plcgateway")
public void updatePlcGatewayConfig(@PathVariable Long id, @RequestBody @Validated PlcGatewayConfigVO configVO) {
this.deviceService.updatePlcGatewayConfig(id, configVO);
}
@ApiOperation(value = "添加/修改道岔设备网关映射配置")
/**
*添加/修改道岔设备网关映射配置
*/
@PutMapping("/{id}/config/switch")
public void updateSwitchConfig(@PathVariable Long id, @RequestBody @Validated SwitchConfigVO configVO) {
this.deviceService.updateSwitchConfig(id, configVO);
}
@ApiOperation(value = "添加/修改信号机设备网关映射配置")
/**
*添加/修改信号机设备网关映射配置
*/
@PutMapping("/{id}/config/signal")
public void updateSignalConfig(@PathVariable Long id, @RequestBody @Validated SignalConfigVO configVO) {
this.deviceService.updateSignalConfig(id, configVO);
}
@ApiOperation(value = "添加/修改屏蔽门设备网关映射配置")
/**
*添加/修改屏蔽门设备网关映射配置
*/
@PutMapping("/{id}/config/psc")
public void updatePscConfig(@PathVariable Long id, @RequestBody @Validated PscConfigVO configVO) {
this.deviceService.updatePscConfig(id, configVO);
}
@ApiOperation(value = "添加/修改屏蔽门设备网关映射配置")
/**
*添加/修改屏蔽门设备网关映射配置
*/
@PutMapping("/{id}/config/psd")
public void updatePsdConfig(@PathVariable Long id, @RequestBody @Validated PsdConfigVO configVO) {
this.deviceService.updatePsdConfig(id, configVO);
}
@ApiOperation(value = "添加/修改屏蔽门设备网关映射配置")
/**
*添加/修改屏蔽门设备网关映射配置
*/
@PutMapping("/{id}/config/psl")
public void updatePslConfig(@PathVariable Long id, @RequestBody @Validated PslConfigVO configVO) {
this.deviceService.updatePslConfig(id, configVO);
}
@ApiOperation(value = "添加/修改屏蔽门设备网关映射配置")
/**
*添加/修改屏蔽门设备网关映射配置
*/
@PutMapping("/{id}/config/ibp")
public void updateIbpConfig(@PathVariable Long id, @RequestBody @Validated IbpConfigVO configVO) {
this.deviceService.updateIbpConfig(id, configVO);
}
@ApiOperation(value = "添加/修改虚拟IBP盘配置")
/**
*添加/修改虚拟IBP盘配置
*/
@PutMapping("/{id}/config/vribp")
public void updateVrIbpConfig(@PathVariable Long id, @RequestBody @Validated VrIbpConfigVO configVO) {
this.deviceService.updateVrIbpConfig(id, configVO);
}
@ApiOperation(value = "添加/修改现地工作站配置")
/**
*添加/修改现地工作站配置
*/
@PutMapping("/{id}/config/lw")
public void updateLwConfig(@PathVariable Long id, @RequestBody @Validated LwConfigVO configVO) {
this.deviceService.updateLwConfig(id, configVO);
}
@ApiOperation(value = "添加/修改大屏工作站配置")
/**
*添加/修改大屏工作站配置
*/
@PutMapping("/{id}/config/lsw")
public void updateLswConfig(@PathVariable Long id, @RequestBody @Validated LswConfigVO configVO) {
this.deviceService.updateLswConfig(id, configVO);
}
@ApiOperation(value = "添加/修改CCTV工作站配置")
/**
*添加/修改CCTV工作站配置
*/
@PutMapping("/{id}/config/cctv")
public void updateCctvConfig(@PathVariable Long id, @RequestBody @Validated RelationLoginConfigVO configVO) {
this.deviceService.updateCctvConfig(id, configVO);
}
@ApiOperation(value = "添加/修改电子沙盘工作站配置")
/**
*添加/修改电子沙盘工作站配置
*/
@PutMapping("/{id}/config/sandbox")
public void updateSandboxConfig(@PathVariable Long id, @RequestBody @Validated RelationLoginConfigVO configVO) {
this.deviceService.updateSandboxConfig(id, configVO);
}
@ApiOperation(value = "添加/修改虚拟屏蔽门工作站配置")
/**
*添加/修改虚拟屏蔽门工作站配置
*/
@PutMapping("/{id}/config/vrpsd")
public void updateVrpsdConfig(@PathVariable Long id, @RequestBody @Validated VrpsdConfigVO configVO) {
this.deviceService.updateVrpsdConfig(id, configVO);
}
@ApiOperation(value = "添加/修改现地综合监控工作站配置")
/**
*添加/修改现地综合监控工作站配置
*/
@PutMapping("/{id}/config/iscslw")
public void updateIscsLwConfig(@PathVariable Long id, @RequestBody @Validated RelationLoginConfigVO configVO) {
this.deviceService.updateIscsLwConfig(id, configVO);
}
@ApiOperation(value = "添加/修改中心综合监控工作站配置")
/**
*添加/修改中心综合监控工作站配置
*/
@PutMapping("/{id}/config/iscscw")
public void updateIscsCwConfig(@PathVariable Long id, @RequestBody @Validated RelationLoginConfigVO configVO) {
this.deviceService.updateIscsCwConfig(id, configVO);
}
@ApiOperation(value = "添加/修改联锁工作站配置")
/**
*添加/修改联锁工作站配置
*/
@PutMapping("/{id}/config/ilw")
public void updateIlwConfig(@PathVariable Long id, @RequestBody @Validated RelationLoginConfigVO configVO) {
this.deviceService.updateIlwConfig(id, configVO);
}
@ApiOperation(value = "删除设备")
/**
*删除设备
*/
@DeleteMapping("/{id}")
public void delete(@PathVariable Long id) {
this.deviceService.delete(id);
}
@ApiOperation(value = "查询某个类型的所有设备")
/**
*查询某个类型的所有设备
*/
@GetMapping("/{type}/all")
public List<ProjectDeviceVO> queryByType(@PathVariable ProjectDeviceType type,
@ApiIgnore @RequestAttribute(name = AuthenticateInterceptor.LOGIN_INFO_KEY)
@RequestAttribute(name = AuthenticateInterceptor.LOGIN_INFO_KEY)
LoginUserInfoVO userLoginInfo) {
return this.deviceService.queryByType(type, userLoginInfo.getProject());
}
@ -171,19 +214,19 @@ public class DeviceController {
// return this.iProjectDeviceService.queryByProjectCode(projectCode, group);
// }
@PostMapping("/xty/addOrUpdate")
public void addOrUpdateXtyDeviceConfig(@ApiIgnore @RequestAttribute(name = AuthenticateInterceptor.LOGIN_USER_KEY)
public void addOrUpdateXtyDeviceConfig(@RequestAttribute(name = AuthenticateInterceptor.LOGIN_USER_KEY)
AccountVO accountVO) {
this.deviceService.addOrUpdateXtyDeviceConfig(accountVO);
}
@PostMapping("/gzb/addOrUpdate")
public void addOrUpdateGzbDeviceConfig(@ApiIgnore @RequestAttribute(name = AuthenticateInterceptor.LOGIN_USER_KEY)
public void addOrUpdateGzbDeviceConfig(@RequestAttribute(name = AuthenticateInterceptor.LOGIN_USER_KEY)
AccountVO accountVO) {
this.deviceService.addOrUpdateGzbDeviceConfig(accountVO);
}
@PostMapping("/sdy/addOrUpdate")
public void addOrUpdateSdyDeviceConfig(@ApiIgnore @RequestAttribute(name = AuthenticateInterceptor.LOGIN_USER_KEY)
public void addOrUpdateSdyDeviceConfig(@RequestAttribute(name = AuthenticateInterceptor.LOGIN_USER_KEY)
AccountVO accountVO) {
this.deviceService.addOrUpdateSdyDeviceConfig(accountVO);
}

View File

@ -5,8 +5,6 @@ import club.joylink.rtss.vo.client.CommandCopyVO;
import club.joylink.rtss.vo.client.CommandDefinitionQueryVO;
import club.joylink.rtss.vo.client.CommandDefinitionVO;
import club.joylink.rtss.vo.client.PageVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@ -15,7 +13,9 @@ import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import java.util.List;
@Api(tags = {"指令管理接口"})
/**
*指令管理接口
*/
@RestController
@RequestMapping(path = "/api/cmd")
public class CommandController {
@ -23,46 +23,60 @@ public class CommandController {
@Autowired
private ICommandService iCommandService;
@ApiOperation(value = "创建指令")
/**
*创建指令
*/
@RequestMapping(method = RequestMethod.POST)
public void createCommand(@Valid @RequestBody CommandDefinitionVO commandDefinitionVO) {
iCommandService.addDefinition(commandDefinitionVO);
}
@ApiOperation(value = "修改指令")
/**
*修改指令
*/
@RequestMapping(method = RequestMethod.PUT)
public void updateCommand(@Valid @RequestBody CommandDefinitionVO commandDefinitionVO) {
iCommandService.updateDefinition(commandDefinitionVO);
}
@ApiOperation(value = "code按条件分页查询指令可根据线路过滤结果")
/**
*code按条件分页查询指令可根据线路过滤结果
*/
@RequestMapping(method = RequestMethod.GET)
public PageVO<CommandDefinitionVO> selectCommands(String lineCode, CommandDefinitionQueryVO commandDefinitionQueryVO) {
return iCommandService.queryPagedDefinitions(lineCode, commandDefinitionQueryVO);
}
@ApiOperation(value = "根据线路查询指令,可根据仿真角色过滤")
/**
*根据线路查询指令可根据仿真角色过滤
*/
@RequestMapping(path="line/{lineCode}",method = RequestMethod.GET)
public List<CommandDefinitionVO> selectCommands(@NotBlank @PathVariable String lineCode,String prdType,String simulationRole) {
return iCommandService.queryDefinitions(lineCode,prdType, simulationRole);
}
@ApiOperation(value = "根据指令id查询信息")
/**
*根据指令id查询信息
*/
@RequestMapping(path = "{id}",method = RequestMethod.GET)
public CommandDefinitionVO selectCommandById(@PathVariable Long id) {
return iCommandService.queryDefinitionById(id);
}
@ApiOperation(value = "根据id删除指令")
/**
*根据id删除指令
*/
@RequestMapping(path = "{id}", method = RequestMethod.DELETE)
public void deleteCommand(@PathVariable Long id) {
iCommandService.deleteDefinition(id);
}
@ApiOperation("复制指令")
/**
*复制指令
*/
@PostMapping("/copy")
public void copy(@RequestBody @Validated CommandCopyVO copyVO) {
iCommandService.copy(copyVO);

View File

@ -8,29 +8,32 @@ import club.joylink.rtss.vo.client.ExamDefinitionQueryVO;
import club.joylink.rtss.vo.client.ExamDefinitionVO;
import club.joylink.rtss.vo.client.PageVO;
import club.joylink.rtss.vo.client.validGroup.ExamDefinitionRulesCheck;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import java.util.List;
@Api(tags = {"考试定义接口"})
/**
*考试定义接口
*/
@RestController
@RequestMapping("api/exam")
public class ExamController {
@Autowired
private IExamService iExamService;
@ApiOperation(value = "创建考试")
/**
*创建考试
*/
@PostMapping(path = "")
public void create(@RequestBody @Validated ExamDefinitionVO examDefinitionVO, @RequestAttribute @ApiIgnore AccountVO user) {
public void create(@RequestBody @Validated ExamDefinitionVO examDefinitionVO, @RequestAttribute AccountVO user) {
iExamService.create(examDefinitionVO, user);
}
@ApiOperation(value = "检查分数是否合理")
/**
*检查分数是否合理
*/
@GetMapping(path = "/checkScore")
public boolean checkScore(@Validated(value = ExamDefinitionRulesCheck.class) ExamDefinitionVO examDefinitionVO) {
return iExamService.checkScore(examDefinitionVO);
@ -43,7 +46,9 @@ public class ExamController {
// return iExamService.queryTrainingTypes(lessonId);
// }
@ApiOperation(value = "查询试题信息及规则信息")
/**
*查询试题信息及规则信息
*/
@GetMapping(path = "/{id}")
public ExamDefinitionVO queryExamInfo(@PathVariable Long id) {
return iExamService.queryExamInfo(id);
@ -55,15 +60,19 @@ public class ExamController {
// return iExamService.queryExamList(lessonId, user);
// }
@ApiOperation(value = "查询试题列表信息")
/**
*查询试题列表信息
*/
@GetMapping(path = "/list")
public PageVO<ExamDefinitionVO> queryExamInfoList(ExamDefinitionQueryVO queryVO) {
return iExamService.queryExamInfoList(queryVO);
}
@ApiOperation(value = "删除试题")
/**
*删除试题
*/
@DeleteMapping(path = "/{id}")
public void deleteExam(@PathVariable Long id, @ApiIgnore @RequestAttribute AccountVO user) {
public void deleteExam(@PathVariable Long id, @RequestAttribute AccountVO user) {
iExamService.deleteExam(id, user);
}
@ -73,43 +82,57 @@ public class ExamController {
// return iExamService.queryTrainingNum(lessonId, trainingType, operateType);
// }
@ApiOperation(value = "试题上线")
/**
*试题上线
*/
@PutMapping(value = "/{id}/onLine")
public void onLine(@PathVariable Long id, @RequestAttribute @ApiIgnore AccountVO user) {
public void onLine(@PathVariable Long id, @RequestAttribute AccountVO user) {
this.iExamService.onLine(id, user);
}
@ApiOperation(value = "试题下线")
/**
*试题下线
*/
@PutMapping(value = "/{id}/offLine")
public void offLine(@PathVariable Long id, @RequestAttribute @ApiIgnore AccountVO user) {
public void offLine(@PathVariable Long id, @RequestAttribute AccountVO user) {
this.iExamService.offLine(id, user);
}
@ApiOperation(value = "更新试题")
/**
*更新试题
*/
@PutMapping(path = "/{id}")
public void update(@PathVariable Long id, @RequestBody ExamDefinitionVO examDefinitionVO) {
this.iExamService.update(id, examDefinitionVO);
}
@ApiOperation(value = "分页查询当前登录项目下的试卷")
/**
*分页查询当前登录项目下的试卷
*/
@GetMapping("/paged/loginProject")
public PageVO<ExamDefinitionVO> pagedQueryByLoginProject(ExamDefinitionQueryVO queryVO, @RequestAttribute LoginUserInfoVO loginInfo) {
return this.iExamService.pagedQueryByLoginProject(queryVO, loginInfo);
}
@ApiOperation(value = "不分页查询当前登录项目下的试卷")
/**
*不分页查询当前登录项目下的试卷
*/
@GetMapping("/list/loginProject")
public List<ExamDefinitionVO> listQueryExamByLoginProject(ExamDefinitionQueryVO queryVO, @RequestAttribute LoginUserInfoVO loginInfo) {
return this.iExamService.listQueryExamByLoginProject(queryVO, loginInfo);
}
@ApiOperation(value = "不分页查询组织下自己创建的试卷")
/**
*不分页查询组织下自己创建的试卷
*/
@GetMapping("/list/org/self")
public List<ExamDefinitionVO> listQueryOrgExamOfSelf(Long clsId, @RequestAttribute LoginUserInfoVO loginInfo) {
return this.iExamService.listQueryOrgExamICreated(clsId, loginInfo);
}
@ApiOperation("查询试卷")
/**
*查询试卷
*/
@GetMapping("/list/{mapId}")
public List<ExamDefinitionVO> listQuery(@PathVariable Long mapId, String prdType) {
return iExamService.queryBasicInfo(mapId, prdType, BusinessConsts.STATUS_USE);

View File

@ -4,13 +4,13 @@ import club.joylink.rtss.services.publishData.IbpService;
import club.joylink.rtss.vo.client.PageVO;
import club.joylink.rtss.vo.client.ibp.IbpQueryVO;
import club.joylink.rtss.vo.client.ibp.IbpVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@Api(value="发布IBP盘数据接口")
/**
*发布IBP盘数据接口
*/
@RestController
@RequestMapping("/api/ibp")
public class IbpController {
@ -18,25 +18,33 @@ public class IbpController {
@Autowired
private IbpService ibpService;
@ApiOperation(value = "分页查询发布的IBP数据基本信息")
/**
*分页查询发布的IBP数据基本信息
*/
@GetMapping("")
public PageVO<IbpVO> pagingQueryIbpList(IbpQueryVO queryVO) {
return this.ibpService.pagingQueryIbpList(queryVO);
}
@ApiOperation(value = "根据id查询IBP数据")
/**
*根据id查询IBP数据
*/
@GetMapping("/{id}")
public IbpVO getIbp(@PathVariable Long id) {
return this.ibpService.getById(id);
}
@ApiOperation(value = "根据线路编码和车站编码查询IBP数据")
/**
*根据线路编码和车站编码查询IBP数据
*/
@GetMapping("/query")
public IbpVO getBy(@Validated IbpQueryVO queryVO) {
return this.ibpService.getBy(queryVO);
}
@ApiOperation("删除已发布的ibp数据")
/**
*删除已发布的ibp数据
*/
@DeleteMapping("/{id}")
public void delete(@PathVariable Long id) {
ibpService.delete(id);

View File

@ -12,16 +12,15 @@ import club.joylink.rtss.vo.client.LessonTreeVO;
import club.joylink.rtss.vo.client.LessonVO;
import club.joylink.rtss.vo.client.PageVO;
import club.joylink.rtss.vo.client.validGroup.LessonUpdateNameAndRemarksCheck;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import java.util.List;
@Api(tags = { "课程数据管理接口" })
/**
*课程数据管理接口
*/
@RestController
@RequestMapping("/api/lesson")
public class LessonController {
@ -37,100 +36,130 @@ public class LessonController {
this.iLessonService = iLessonService;
}
@ApiOperation(value = "获取课程实训树")
/**
*获取课程实训树
*/
@GetMapping(path = "/{id}/tree")
public LessonTreeVO getLessonTrainingTree(@PathVariable Long id, @RequestAttribute AccountVO user) {
return this.iLessonService.getLessonTree(id, user);
}
@ApiOperation(value = "获取课程详情")
/**
*获取课程详情
*/
@GetMapping(path="/{id}")
public LessonVO getLessonDetail(@PathVariable Long id, @RequestAttribute AccountVO user) {
return this.iLessonService.getLessonDetail(id, user);
}
@ApiOperation(value = "根据条件获取课程列表")
/**
*根据条件获取课程列表
*/
@GetMapping(path = "")
public List<LessonVO> queryLessons(LessonQueryVO lessonQueryVO) {
return this.iLessonService.queryValidLessons(lessonQueryVO);
}
@ApiOperation(value = "根据部门获取关联课程列表")
/**
*根据部门获取关联课程列表
*/
@GetMapping(path = "/depart/{departId}")
public List<LessonVO> queryLessons(@PathVariable Long departId) {
return this.iOrgUserService.getLessonsByDepart(departId);
}
@ApiOperation(value = "获取课程列表")
/**
*获取课程列表
*/
@GetMapping(path = "/listOfMap")
public List<LessonVO> queryLessonsOfMap(Long mapId) {
return this.iLessonService.queryValidLessonsOfMap(mapId);
}
@ApiOperation(value = "分页获取已发布的课程")
/**
*分页获取已发布的课程
*/
@GetMapping(path = "/publishedLesson")
public PageVO<LessonVO> selectPagedPublishedLesson(LessonQueryVO queryVO) {
return iLessonService.selectPagedPublishedLesson(queryVO);
}
@Role(RoleEnum.SuperAdmin)
@ApiOperation(value = "删除已发布的课程")
/**
*删除已发布的课程
*/
@DeleteMapping(path = "/publishedLesson/{lessonId}")
public void deletePublishedLesson(@PathVariable Long lessonId, @RequestAttribute AccountVO user) {
iLessonService.deletePublishedLesson(lessonId, user);
}
@Role(RoleEnum.LessonCreater)
@ApiOperation(value = "用户删除教学实训删除自己发布的课程")
/**
*用户删除教学实训删除自己发布的课程
*/
@DeleteMapping(path = "/usedLesson/{lessonId}")
public void deleteUsedLesson(@PathVariable Long lessonId, @RequestAttribute AccountVO user) {
iLessonService.deleteUsedLesson(lessonId, user);
}
@ApiOperation(value = "发布课程上线")
/**
*发布课程上线
*/
@PutMapping(path = "/{id}/onLine")
@Role({RoleEnum.Admin,RoleEnum.SuperAdmin})
public void onLine(@PathVariable Long id, @RequestAttribute AccountVO user) {
this.iLessonService.onLine(id, user);
}
@ApiOperation(value = "发布课程下线")
/**
*发布课程下线
*/
@PutMapping(path = "/{id}/offLine")
@Role({RoleEnum.Admin,RoleEnum.SuperAdmin})
public void offLine(@PathVariable Long id, @RequestAttribute AccountVO user) {
this.iLessonService.offLine(id, user);
}
@ApiOperation(value = "更新课程名称和简介")
/**
*更新课程名称和简介
*/
@PutMapping(path = "/{id}/nameAndRemarks")
@Role({RoleEnum.Admin,RoleEnum.SuperAdmin})
public void updateNameAndRemarks(@PathVariable Long id,
@RequestBody @Validated(LessonUpdateNameAndRemarksCheck.class) LessonVO lessonVO,
@ApiIgnore @RequestAttribute AccountVO user) {
@RequestAttribute AccountVO user) {
this.iLessonService.updateNameAndRemarks(id, lessonVO.getName(), lessonVO.getRemarks(), user);
}
@ApiOperation(value = "生成默认课程和考试功能")
/**
*生成默认课程和考试功能
*/
@PostMapping(path = "/generating")
public void generateLessonAndExam(@ApiIgnore @RequestAttribute AccountVO user, @RequestBody List<Long> mapIds) {
public void generateLessonAndExam(@RequestAttribute AccountVO user, @RequestBody List<Long> mapIds) {
iLessonService.generateLessonAndExam(mapIds, user);
}
@ApiOperation(value = "分页查询用户当前登录的项目下的课程")
/**
*分页查询用户当前登录的项目下的课程
*/
@GetMapping(path = "/paged/byLoginProject")
public PageVO<LessonVO> pagedQueryByLoginProject(LessonQueryVO queryVO,
@RequestAttribute(AuthenticateInterceptor.LOGIN_INFO_KEY) LoginUserInfoVO loginInfo) {
return iLessonService.pagedQueryByLoginProject(queryVO, loginInfo);
}
@ApiOperation(value = "查询用户当前登录的项目下的课程")
/**
*查询用户当前登录的项目下的课程
*/
@GetMapping(path = "/list/byLoginProject")
public List<LessonVO> queryByLoginProject(LessonQueryVO queryVO,
@RequestAttribute(AuthenticateInterceptor.LOGIN_INFO_KEY) LoginUserInfoVO loginInfo) {
return iLessonService.queryByLoginProject(queryVO, loginInfo);
}
@ApiOperation(value = "查询自己给指定班级创建的课程")
/**
*查询自己给指定班级创建的课程
*/
@GetMapping(path = "/list/org/self")
public List<LessonVO> queryOrgLessonOfSelf(Long clsId, @RequestAttribute LoginUserInfoVO loginInfo) {
return iLessonService.queryOrgLessonOfSelf(clsId, loginInfo);

View File

@ -14,18 +14,17 @@ import club.joylink.rtss.vo.client.map.MapCopyOption;
import club.joylink.rtss.vo.client.map.MapInfoUpdateVO;
import club.joylink.rtss.vo.client.validGroup.MapInfoSortCheck;
import club.joylink.rtss.vo.map.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.List;
@Api(tags = {"发布地图管理接口"})
/**
*发布地图管理接口
*/
@RestController
@RequestMapping("/api/map")
public class MapController {
@ -39,32 +38,42 @@ public class MapController {
@Autowired
private IReleaseService iReleaseService;
@ApiOperation(value = "查询有地图的城市相关字典详情")
/**
*查询有地图的城市相关字典详情
*/
@GetMapping(path = "/city")
public List<DictionaryDetailVO> queryCityHasMap(String dicCode) {
return iMapService.queryCityHasMap(dicCode);
}
@ApiOperation(value = "查询有地图的城市列表")
/**
*查询有地图的城市列表
*/
@GetMapping(path = "/exist")
public boolean checkNameExist(@NotBlank String name) {
return iMapService.checkNameExist(name);
}
@ApiOperation(value = "根据地图id查询地图当前使用版本")
/**
*根据地图id查询地图当前使用版本
*/
@GetMapping(path = "/{id}/version")
public String getMapVersionById(@PathVariable Long id) {
return this.iMapService.getMapDetail(id).getVersion();
}
@ApiOperation(value = "根据地图id查询地图明细")
/**
*根据地图id查询地图明细
*/
@GetMapping(path = "/{id}/details")
public MapVO getMapDetailsById(@PathVariable Long id) {
MapVO mapVO = this.iMapService.getMapDetail(id);
return mapVO;
}
@ApiOperation("根据地图id查询绘图数据")
/**
*根据地图id查询绘图数据
*/
@GetMapping("/{id}/graphData")
public MapGraphDataNewVO getGraphData(@PathVariable Long id) {
MapVO mapVO = this.iMapService.getMapDetail(id);
@ -72,239 +81,315 @@ public class MapController {
}
@ApiOperation(value = "根据地图id查询地图数据")
/**
*根据地图id查询地图数据
*/
@GetMapping(path = "/{id}/mapData")
public MapVO getMapDataById(@PathVariable Long id) {
MapVO mapVO = this.iMapService.getMapDetail(id);
return mapVO;
}
@ApiOperation(value = "根据地图id查询3D数据")
/**
*根据地图id查询3D数据
*/
@GetMapping(path = "/{id}/3dMapData")
public Map3dDataVO getMap3DDataById(@PathVariable Long id) {
return iMapService.findMap3dDataByMapId(id);
}
@ApiOperation(value = "获取有屏蔽门的站台列表")
/**
*获取有屏蔽门的站台列表
*/
@GetMapping(path = "/{id}/stand/hasDoor")
public List getHasScreenDoorStand(@PathVariable @NotNull Long id) {
return this.iMapService.getHasScreenDoorStand(id);
}
@ApiOperation(value = "查询列表")
/**
*查询列表
*/
@GetMapping(path = "/list")
public List<MapVO> list(MapVO mapVO) {
return this.iMapService.list(mapVO);
}
@ApiOperation(value = "查询所有地图名称")
/**
*查询所有地图名称
*/
@GetMapping("/list/all/name")
public List<MapVO> queryAllMapName() {
return iMapService.queryAllMapName();
}
@ApiOperation(value = "查询用户所属项目所有上线的地图信息列表")
/**
*查询用户所属项目所有上线的地图信息列表
*/
@GetMapping("/online/all")
public List<MapVO> list(@ApiIgnore @RequestAttribute(name = AuthenticateInterceptor.LOGIN_INFO_KEY)
LoginUserInfoVO loginUserInfoVO) {
public List<MapVO> list(@RequestAttribute(name = AuthenticateInterceptor.LOGIN_INFO_KEY)
LoginUserInfoVO loginUserInfoVO) {
return this.iMapService.queryOnlineMapInfoListOfProject(loginUserInfoVO.getProject());
}
@ApiOperation(value = "查询上架地图列表")
/**
*查询上架地图列表
*/
@GetMapping(path = "/listOnline")
public List<MapVO> listOnline() {
return this.iMapService.listOnline();
}
@ApiOperation(value = "根据定制项目编号查询地图列表")
/**
*根据定制项目编号查询地图列表
*/
@GetMapping(path = "/project/{projectCode}/list")
public List<MapVO> listByProjectCode(@PathVariable String projectCode) {
return this.iMapService.listByProjectCode(projectCode);
}
@ApiOperation(value = "查询基于指定真实线路的发布地图列表")
/**
*查询基于指定真实线路的发布地图列表
*/
@GetMapping(path = "/{lineCode}/list")
public List<MapVO> getMapListBySkin(@PathVariable String lineCode) {
return this.iMapService.getMapListByLineCode(lineCode);
}
@ApiOperation(value = "分页查询地图数据")
/**
*分页查询地图数据
*/
@GetMapping(path = "")
public PageVO<MapVO> queryPagedMaps(MapQueryVO queryVO) {
return this.iMapService.queryPagedMaps(queryVO);
}
@ApiOperation(value = "分页查询地图版本数据")
/**
*分页查询地图版本数据
*/
@GetMapping(path = "/{id}/versions")
public PageVO<MapVersionVO> queryPagedMapVersions(@PathVariable Long id, PageQueryVO queryVO) {
return iMapService.queryPagedMapVersions(id, queryVO);
}
@Role(RoleEnum.SuperAdmin)
@ApiOperation(value = "删除地图数据")
/**
*删除地图数据
*/
@DeleteMapping(path = "/{id}")
public void delete(@PathVariable Long id, @RequestAttribute AccountVO user) {
this.iMapService.deleteMap(id, user);
}
@ApiOperation(value = "根据地图id获取地图信息")
/**
*根据地图id获取地图信息
*/
@GetMapping(path = "/{id}")
public MapVO get(@PathVariable Long id) {
return this.iMapService.getMapInfoById(id);
}
@ApiOperation(value = "发布地图数据导出")
/**
*发布地图数据导出
*/
@GetMapping(value = "/{id}/export")
public MapVO exportTo(@PathVariable Long id) {
return iMapService.export(id);
}
@ApiOperation(value = "发布地图上线")
/**
*发布地图上线
*/
@PutMapping(value = "/{id}/onLine")
@Role({RoleEnum.SuperAdmin,RoleEnum.Admin})
public void onLine(@PathVariable Long id, @RequestAttribute AccountVO user) {
this.iMapService.onLine(id, user);
}
@ApiOperation(value = "发布地图下线")
/**
*发布地图下线
*/
@PutMapping(value = "/{id}/offLine")
public void offLine(@PathVariable Long id, @RequestAttribute AccountVO user) {
this.iMapService.offLine(id, user);
}
@ApiOperation(value = "修改发布地图名称")
/**
*修改发布地图名称
*/
@PutMapping(path = "/{id}/updateName")
public void updateName(@PathVariable Long id, @RequestBody MapVO mapVO, @ApiIgnore @RequestAttribute AccountVO user) {
public void updateName(@PathVariable Long id, @RequestBody MapVO mapVO, @RequestAttribute AccountVO user) {
this.iMapService.updateName(id, mapVO.getName(), user);
}
@ApiOperation(value = "修改发布地图所属城市")
/**
*修改发布地图所属城市
*/
@PutMapping(path = "/{id}/city")
public void updateBelongCity(@PathVariable Long id, @RequestBody MapVO mapVO, @ApiIgnore @RequestAttribute AccountVO user) {
public void updateBelongCity(@PathVariable Long id, @RequestBody MapVO mapVO, @RequestAttribute AccountVO user) {
this.iMapService.updateBelongCity(id, mapVO.getCityCode(), user);
}
@Role({RoleEnum.Admin, RoleEnum.SuperAdmin})
@ApiOperation(value = "修改地图基本信息")
/**
*修改地图基本信息
*/
@PutMapping(path = "/{id}/info")
public void updateBasicInfo(@PathVariable Long id, @RequestBody MapInfoUpdateVO updateVO,
@ApiIgnore @RequestAttribute AccountVO user) {
@RequestAttribute AccountVO user) {
this.iMapService.updateBasicInfo(id, updateVO, user);
}
@ApiOperation(value = "设置发布地图所属项目")
/**
*设置发布地图所属项目
*/
@PutMapping(path = "/{id}/project")
public void updateBelongProject(@PathVariable Long id, @RequestBody MapVO mapVO, @ApiIgnore @RequestAttribute AccountVO user) {
public void updateBelongProject(@PathVariable Long id, @RequestBody MapVO mapVO, @RequestAttribute AccountVO user) {
this.iMapService.updateBelongProject(id, mapVO.isProject(), mapVO.getProjectCode(), user);
}
@ApiOperation(value = "复制地图线路数据(必选,地图数据(包括地图/运行图);可选,包括课程/考试/剧本等)")
/**
*复制地图线路数据必选地图数据(包括地图/运行图)可选包括课程/考试/剧本等
*/
@PostMapping(path = "/copy/{id}")
public void copyMapData(@PathVariable Long id, @RequestBody MapCopyOption copyOption, @ApiIgnore @RequestAttribute AccountVO user) {
public void copyMapData(@PathVariable Long id, @RequestBody MapCopyOption copyOption, @RequestAttribute AccountVO user) {
this.iMapService.copyMapData(id, copyOption, user);
}
@ApiOperation(value = "校验地图名称是否已经存在(是否重复)")
/**
*校验地图名称是否已经存在是否重复
*/
@GetMapping(path = "/nameExist")
public boolean checkMapNameExist(@RequestParam String name) {
return this.iMapService.isMapNameExist(name);
}
@ApiOperation("校验所有地图数据")
/**
*校验所有地图数据
*/
@GetMapping("/all/simulationCheck")
public List<MapVO> doSimulationCheckAll(@ApiIgnore @RequestAttribute LoginUserInfoVO loginInfo) {
public List<MapVO> doSimulationCheckAll(@RequestAttribute LoginUserInfoVO loginInfo) {
return this.iMapService.doSimulationCheckAll(loginInfo);
}
@ApiOperation(value = "检测地图仿真数据是否存在错误")
/**
*检测地图仿真数据是否存在错误
*/
@GetMapping(path = "/{id}/simulationCheck")
public List<String> doSimulationCheck(@PathVariable Long id, @ApiIgnore @RequestAttribute AccountVO user) {
public List<String> doSimulationCheck(@PathVariable Long id, @RequestAttribute AccountVO user) {
return this.iMapService.doSimulationCheck(id, user);
}
@ApiOperation(value = "更新地图序号")
/**
*更新地图序号
*/
@PutMapping(path = "/sort")
public void updateOrderNumber(@Validated(value = MapInfoSortCheck.class) @RequestBody List<MapUpdateVO> updateVOS) {
iMapService.updateOrderNumber(updateVOS);
}
@Role(RoleEnum.SuperAdmin)
@ApiOperation(value = "导出本地需要地图相关数据(本地部署地图数据)")
/**
*导出本地需要地图相关数据本地部署地图数据
*/
@PostMapping(path = "/local/export")
public LocalDataVO exportLocalMapData(@RequestBody List<Long> mapIdList, @ApiIgnore @RequestAttribute AccountVO user) {
public LocalDataVO exportLocalMapData(@RequestBody List<Long> mapIdList, @RequestAttribute AccountVO user) {
return this.localDataService.exportLocalMapData(mapIdList, user);
}
@Role(RoleEnum.SuperAdmin)
@ApiOperation(value = "导入本地需要地图相关数据(本地部署地图数据)")
/**
*导入本地需要地图相关数据本地部署地图数据
*/
@PostMapping(path = "/local/import")
public void importLocalMapData(@RequestBody LocalDataVO localDataVO, @ApiIgnore @RequestAttribute AccountVO user) {
public void importLocalMapData(@RequestBody LocalDataVO localDataVO, @RequestAttribute AccountVO user) {
this.localDataService.importLocalMapData(localDataVO, user);
}
@ApiOperation(value = "获取地图下所有需要值班员的车站")
/**
*获取地图下所有需要值班员的车站
*/
@GetMapping(path = "/{id}/station/needSupervisor")
public List<MapStationNewVO> getNeedSupervisorStations(@PathVariable Long id) {
return iMapService.getNeedSupervisorStations(id);
}
@ApiOperation(value = "获取地图车站下所有有屏蔽门的站台")
/**
*获取地图车站下所有有屏蔽门的站台
*/
@GetMapping("/{id}/station/{stationCode}/standWithPsd")
public List<MapStationStandNewVO> getStationHasPsdStands(@PathVariable Long id,
@PathVariable String stationCode) {
return this.iMapService.getStationHasPsdStands(id, stationCode);
}
@ApiOperation("获取地图车站下的区段")
/**
*获取地图车站下的区段
*/
@GetMapping("/{id}/station/{stationCode}/sections")
public List<MapSectionNewVO> querySectionsUnderTheStation(@PathVariable Long id, @PathVariable String stationCode){
return this.iMapService.querySectionsUnderTheStation(id, stationCode);
}
@ApiOperation("获取集中站下所有区段")
/**
*获取集中站下所有区段
*/
@GetMapping("/{id}/deviceStation/{stationCode}/sections")
public List<MapSectionNewVO> querySectionBelongTheDeviceStation(@PathVariable Long id, @PathVariable String stationCode) {
return this.iMapService.querySectionBelongTheDeviceStation(id, stationCode);
}
@ApiOperation(value = "获取地图站台关联的屏蔽门")
/**
*获取地图站台关联的屏蔽门
*/
@GetMapping("/{id}/stand/{standCode}/psd")
public List<MapPSDVO> getStandPsds(@PathVariable Long id,
@PathVariable String standCode) {
return this.iMapService.getStandPsds(id, standCode);
}
@ApiOperation("导出地图相关数据")
/**
*导出地图相关数据
*/
@GetMapping("/{id}/export/new")
public ReleaseVO export(@PathVariable Long id, @Validated ReleaseConfigVO configs) {
return iReleaseService.exportAsJson(id, configs);
}
@ApiOperation("导入地图相关数据")
/**
*导入地图相关数据
*/
@PutMapping("/{id}/import/new")
public void importFromJson(@PathVariable Long id, @RequestBody ReleaseVO json, @RequestAttribute AccountVO user) {
iReleaseService.importFromJson(id, json, user);
}
@ApiOperation("一键生成发布地图相关功能:目前生成权限及子系统")
/**
*一键生成发布地图相关功能目前生成权限及子系统
*/
@PostMapping("/{id}/function/generate")
public void generate(@PathVariable Long id, @ApiIgnore @RequestAttribute AccountVO user) {
public void generate(@PathVariable Long id, @RequestAttribute AccountVO user) {
this.iMapService.generateMapFunction(id, user);
}
@ApiOperation("查询地图数据现有版本")
/**
*查询地图数据现有版本
*/
@GetMapping("/{id}/dataVersions")
public List<String> getMapDataVersion(@PathVariable Long id) {
return iMapService.getMapDataVersion(id);
}
@ApiOperation("查询所有地图下的所有车站")
/**
*查询所有地图下的所有车站
*/
@GetMapping("/allStations")
public List<MapStationNewVO> getAllStations() {
return iMapService.getAllStations();
}
@ApiOperation("查询地图下所有区段")
/**
*查询地图下所有区段
*/
@GetMapping("/{id}/sections")
public List<MapSectionNewVO> querySectionsUnderMap(@PathVariable Long id) {
return iMapService.querySectionsUnderMap(id);

View File

@ -6,13 +6,13 @@ import club.joylink.rtss.vo.client.PageVO;
import club.joylink.rtss.vo.client.ReleaseVO;
import club.joylink.rtss.vo.client.map.MapGroupQueryVO;
import club.joylink.rtss.vo.client.map.MapGroupVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@Api(tags = {"地图数据组管理"})
/**
*地图数据组管理
*/
@RestController
@RequestMapping("/api/mapGroup")
public class MapGroupController {
@ -20,38 +20,50 @@ public class MapGroupController {
@Autowired
private IMapGroupService iMapGroupService;
@ApiOperation(value = "添加地图数据组")
/**
*添加地图数据组
*/
@PostMapping(path = "")
public void createMapGroup(@RequestBody @Validated MapGroupVO mapGroupVO) {
this.iMapGroupService.create(mapGroupVO);
}
@ApiOperation(value = "修改地图数据组")
/**
*修改地图数据组
*/
@PutMapping(path = "{groupId}")
public void updateMapGroup(@PathVariable Long groupId, @RequestBody @Validated MapGroupVO mapGroupVO) {
this.iMapGroupService.update(groupId, mapGroupVO);
}
@ApiOperation(value = "地图数据组关联地图")
/**
*地图数据组关联地图
*/
@PutMapping(path = "{groupId}/ref/map/{mapId}")
public void refMap2Group(@PathVariable Long groupId, @PathVariable Long mapId) {
this.iMapGroupService.relMap2Group(groupId, mapId);
}
@ApiOperation(value = "删除地图数据组")
/**
*删除地图数据组
*/
@DeleteMapping(path = "{groupId}")
public void deleteMapGroup(@PathVariable Long groupId) {
this.iMapGroupService.delete(groupId);
}
@ApiOperation(value = "分页获取所有地图数据组")
/**
*分页获取所有地图数据组
*/
@GetMapping(path = "page")
public PageVO<MapGroupVO> getPageMapGroups(MapGroupQueryVO queryVO) {
return this.iMapGroupService.getPage(queryVO);
}
@ApiOperation("同步导入地图相关数据")
/**
*同步导入地图相关数据
*/
@PutMapping("{id}/syc/import")
public void importFromJson(@RequestBody ReleaseVO json, @RequestAttribute AccountVO user, @PathVariable Long id) {
iMapGroupService.syncImportMapData(id,json, user);

View File

@ -9,15 +9,15 @@ import club.joylink.rtss.vo.client.TreeNode;
import club.joylink.rtss.vo.client.sub.MapSystemDetailVO;
import club.joylink.rtss.vo.client.sub.MapSystemQueryVO;
import club.joylink.rtss.vo.client.sub.MapSystemVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@Api(tags = {"地图系统接口"})
/**
*地图系统接口
*/
@RestController
@RequestMapping("/api/mapSystem")
public class MapSystemController {
@ -25,7 +25,9 @@ public class MapSystemController {
@Autowired
private IMapSystemService iMapSystemService;
@ApiOperation(value = "生成地图系统")
/**
*生成地图系统
*/
@PostMapping("/generate/{mapId}")
public void generateSystem(@PathVariable Long mapId) {
iMapSystemService.generateSystem(mapId);
@ -36,50 +38,66 @@ public class MapSystemController {
iMapSystemService.generateSystem(mapId, prdType);
}
@ApiOperation(value = "分页查询地图系统")
/**
*分页查询地图系统
*/
@GetMapping("")
public PageVO<MapSystemVO> generateSystem(MapSystemQueryVO queryVO) {
return iMapSystemService.queryPagedMapSystem(queryVO);
}
@ApiOperation(value = "创建地图系统")
/**
*创建地图系统
*/
@PostMapping("")
public void createMapSystem(@RequestBody @Validated MapSystemVO mapSystemVO) {
iMapSystemService.createMapSystem(mapSystemVO);
}
@ApiOperation(value = "更新地图系统")
/**
*更新地图系统
*/
@PutMapping("/{id}")
public void createMapSystem(@PathVariable Long id, @RequestBody MapSystemVO mapSystemVO) {
iMapSystemService.updateMapSystem(id, mapSystemVO);
}
@ApiOperation(value = "根据城市code查询地图系统数据")
/**
*根据城市code查询地图系统数据
*/
@GetMapping("/city/{cityCode}")
public List<TreeNode> queryByCityCode(@PathVariable String cityCode) {
return iMapSystemService.queryByCityCode(cityCode);
}
@ApiOperation(value = "根据定制项目编号查询地图系统数据")
/**
*根据定制项目编号查询地图系统数据
*/
@GetMapping("/project")
public List<TreeNode> queryByProjectCode(@RequestAttribute(name = AuthenticateInterceptor.LOGIN_INFO_KEY)
LoginUserInfoVO loginUserInfoVO) {
LoginUserInfoVO loginUserInfoVO) {
return iMapSystemService.queryByProjectCode(loginUserInfoVO.getProject());
}
@ApiOperation(value = "查询子系统信息")
/**
*查询子系统信息
*/
@GetMapping("/{id}")
public MapSystemVO getMapSystemDetail(@PathVariable Long id) {
return iMapSystemService.getMapSystem(id);
}
@ApiOperation(value = "查询子系统详情")
/**
*查询子系统详情
*/
@GetMapping("/{id}/detail")
public MapSystemDetailVO getMapSystemDetail(@PathVariable Long id, @RequestAttribute LoginUserInfoVO loginInfo) {
return iMapSystemService.getMapSystemDetail(id, loginInfo);
}
@ApiOperation(value = "删除地图系统")
/**
*删除地图系统
*/
@DeleteMapping("/{id}")
public void delete(@PathVariable Long id, @RequestAttribute AccountVO user) {
iMapSystemService.delete(id, user);

View File

@ -3,15 +3,14 @@ package club.joylink.rtss.controller.publish;
import club.joylink.rtss.services.publishData.MapPassengerFlowDataService;
import club.joylink.rtss.vo.AccountVO;
import club.joylink.rtss.vo.client.passenger.MapPassengerFlowVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import java.util.List;
@Api(tags = {"客流数据管理接口"})
/**
* 客流数据管理接口
*/
@RestController
@RequestMapping("/map/{mapId}/passengerFlowData")
public class PassengerFlowDataController {
@ -19,21 +18,35 @@ public class PassengerFlowDataController {
@Autowired
private MapPassengerFlowDataService mapPassengerFlowDataService;
@ApiOperation(value = "站台客流数据导入")
/**
* 站台客流数据导入
* @param mapId
* @param data
* @param user
*/
@PostMapping("/stand")
public void importStandData(@PathVariable Long mapId, @RequestBody String data,
@ApiIgnore @RequestAttribute AccountVO user) {
@RequestAttribute AccountVO user) {
this.mapPassengerFlowDataService.importStandData(mapId, data);
}
@ApiOperation(value = "车次客流数据导入")
/**
* 车次客流数据导入
* @param mapId
* @param data
* @param user
*/
@PostMapping("/trip")
public void importTripData(@PathVariable Long mapId, @RequestBody String data,
@ApiIgnore @RequestAttribute AccountVO user) {
@RequestAttribute AccountVO user) {
this.mapPassengerFlowDataService.importTripData(mapId, data);
}
@ApiOperation(value = "获取客流数据基础信息")
/**
* 获取客流数据基础信息
* @param mapId
* @return
*/
@GetMapping
public List<MapPassengerFlowVO> getPassengerFlowBaseData(@PathVariable Long mapId) {
return this.mapPassengerFlowDataService.queryAllPassengerFlowBaseDataOfMap(mapId);

View File

@ -7,16 +7,15 @@ import club.joylink.rtss.vo.client.map.RealLineListVO;
import club.joylink.rtss.vo.map.RealLineConfigVO;
import club.joylink.rtss.vo.map.RealLineVO;
import club.joylink.rtss.vo.map.query.RealLineQueryVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import java.util.List;
@Api(tags = {"真实线路管理接口"})
/**
*真实线路管理接口
*/
@RestController
@RequestMapping(path = "/api/realLine")
public class RealLineController {
@ -24,63 +23,83 @@ public class RealLineController {
@Autowired
private IRealLineService iRealLineService;
@ApiOperation(value = "添加真实线路")
/**
*添加真实线路
*/
@PostMapping(path = "")
public void create(@RequestBody @Validated RealLineVO skinVO, @RequestAttribute @ApiIgnore AccountVO user) {
public void create(@RequestBody @Validated RealLineVO skinVO, @RequestAttribute AccountVO user) {
this.iRealLineService.create(skinVO, user);
}
@ApiOperation(value = "获取真实线路列表")
/**
*获取真实线路列表
*/
@GetMapping(path = "/list")
public List<RealLineListVO> queryList(RealLineQueryVO queryVO) {
return this.iRealLineService.queryList(queryVO);
}
@ApiOperation(value = "分页查询真实线路")
/**
*分页查询真实线路
*/
@GetMapping(path = "")
public PageVO<RealLineListVO> queryPagedSkin(RealLineQueryVO queryVO) {
return this.iRealLineService.queryPagedSkin(queryVO);
}
@ApiOperation(value = "根据id查询真实线路")
/**
*根据id查询真实线路
*/
@GetMapping(path = "/{id}")
public RealLineVO get(@PathVariable Long id) {
return this.iRealLineService.get(id);
}
@ApiOperation(value = "修改真实线路")
/**
*修改真实线路
*/
@PutMapping(path = "/{id}")
public void get(@PathVariable Long id, @RequestBody @Validated RealLineVO skinVO,
@RequestAttribute @ApiIgnore AccountVO user) {
@RequestAttribute AccountVO user) {
this.iRealLineService.update(id, skinVO, user);
}
@ApiOperation(value = "删除真实线路")
/**
*删除真实线路
*/
@DeleteMapping(path = "/{id}")
public void delete(@PathVariable Long id) {
this.iRealLineService.delete(id);
}
@ApiOperation(value = "检查code是否存在")
/**
*检查code是否存在
*/
@GetMapping(path = "/{code}/exist")
public boolean checkCodeExist(@PathVariable String code) {
return this.iRealLineService.checkCodeExist(code);
}
@ApiOperation(value = "根据code修改真实线路")
/**
*根据code修改真实线路
*/
@PutMapping(path = "/{code}/update")
public void get(@PathVariable String code, @RequestBody RealLineVO skinVO,
@RequestAttribute @ApiIgnore AccountVO user) {
@RequestAttribute AccountVO user) {
this.iRealLineService.updateByCode(code, skinVO, user);
}
@ApiOperation(value = "保存线路配置")
/**
*保存线路配置
*/
@PostMapping(path = "/config/{id}")
public void saveLineConfig(@PathVariable Long id, @RequestBody @Validated RealLineConfigVO config) {
this.iRealLineService.saveLineConfig(id, config);
}
@ApiOperation(value = "根据id查询线路配置")
/**
*根据id查询线路配置
*/
@GetMapping(path = "/config/{id}")
public RealLineConfigVO getLineConfigById(@PathVariable Long id) {
return this.iRealLineService.getLineConfigById(id);

View File

@ -7,17 +7,16 @@ import club.joylink.rtss.services.ILoadPlanService;
import club.joylink.rtss.vo.AccountVO;
import club.joylink.rtss.vo.client.PageVO;
import club.joylink.rtss.vo.client.runplan.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.validation.constraints.NotNull;
import java.util.List;
@Api(tags = {"每日运行计划接口"})
/**
*每日运行计划接口
*/
@RestController
@RequestMapping("/api/runPlan/daily")
public class RunPlanDailyController {
@ -28,53 +27,69 @@ public class RunPlanDailyController {
@Autowired
private ILoadPlanService iLoadPlanService;
@ApiOperation(value = "分页获取每日加载运行图")
/**
*分页获取每日加载运行图
*/
@GetMapping(path = "")
public PageVO<RunPlanVO> queryPagedRunPlan(RunPlanQueryVO queryVO) {
return this.iDailyRunPlanService.queryPagedRunPlan(queryVO);
}
@ApiOperation(value = "删除每日加载运行图")
/**
*删除每日加载运行图
*/
@DeleteMapping(path = "/{planId}")
@Role(RoleEnum.SuperAdmin)
public void deleteTemplatePlan(@PathVariable Long planId, @RequestAttribute AccountVO user) {
this.iDailyRunPlanService.deletePlan(user, planId);
}
@ApiOperation(value = "用户创建加载计划")
/**
*用户创建加载计划
*/
@PostMapping(path = "/runPlanLoad")
public void createRunPlanLoad(@RequestBody @Validated RunPlanLoadVO runPlanLoadVO,
@ApiIgnore @RequestAttribute AccountVO user) {
@RequestAttribute AccountVO user) {
this.iLoadPlanService.createLoadPlan(runPlanLoadVO, user);
}
@ApiOperation(value = "分页查询加载计划")
/**
*分页查询加载计划
*/
@GetMapping(path = "/runPlanLoad")
public PageVO<RunPlanLoadVO> queryPagedRunPlanLoad(RunPlanLoadQueryVO queryVO) {
return this.iLoadPlanService.queryPagedLoadPlan(queryVO);
}
@ApiOperation(value = "删除加载计划")
/**
*删除加载计划
*/
@DeleteMapping(path = "/runPlanLoad/{id}")
public void deleteRunPlanLoad(@PathVariable Long id, @ApiIgnore @RequestAttribute AccountVO user) {
public void deleteRunPlanLoad(@PathVariable Long id, @RequestAttribute AccountVO user) {
this.iLoadPlanService.deleteLoadPlan(id, user);
}
@ApiOperation(value = "管理员创建通用加载计划")
/**
*管理员创建通用加载计划
*/
@PostMapping(path = "/runPlanLoad/common")
public void createCommonRunPlanLoad(@RequestBody RunPlanLoadVO runPlanLoadVO,
@ApiIgnore @RequestAttribute AccountVO user) {
@RequestAttribute AccountVO user) {
this.iLoadPlanService.createCommonLoadPlan(runPlanLoadVO, user);
}
@ApiOperation(value = "从加载计划创建每日计划")
/**
*从加载计划创建每日计划
*/
@PostMapping(path = "/runPlanLoad/{id}/generate")
public void createDailyPlanFromLoadPlan(@PathVariable @NotNull Long id,
@ApiIgnore @RequestAttribute AccountVO user) {
@RequestAttribute AccountVO user) {
this.iLoadPlanService.createDailyPlanFromLoadPlan(id, user);
}
@ApiOperation(value = "查询运行图的数据绘制运行图")
/**
*查询运行图的数据绘制运行图
*/
@GetMapping(path = "/{planId}")
public RunPlanEChartsDataVO selectDiagramData(@PathVariable Long planId) {
return this.iDailyRunPlanService.selectDiagramData(planId);

View File

@ -9,18 +9,17 @@ import club.joylink.rtss.vo.client.runplan.RunPlanEChartsDataVO;
import club.joylink.rtss.vo.client.runplan.RunPlanQueryVO;
import club.joylink.rtss.vo.client.runplan.RunPlanTemplateUpdateVO;
import club.joylink.rtss.vo.client.runplan.RunPlanVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.List;
@Api(tags = {"运行计划模板接口"})
/**
*运行计划模板接口
*/
@RestController
@RequestMapping("/api/runPlan/template")
public class RunPlanTemplateController {
@ -28,62 +27,80 @@ public class RunPlanTemplateController {
@Autowired
private IRunPlanTemplateService iRunPlanTemplateService;
@ApiOperation(value = "分页获取运行图模板")
/**
*分页获取运行图模板
*/
@GetMapping(path = "")
public PageVO<RunPlanVO> queryPagedRunPlan(RunPlanQueryVO queryVO) {
return this.iRunPlanTemplateService.queryPagedRunPlan(queryVO);
}
@ApiOperation(value = "查询所有模板运行图")
/**
*查询所有模板运行图
*/
@GetMapping(path = "/all")
public List<RunPlanVO> queryAll() {
return this.iRunPlanTemplateService.queryAll();
}
@ApiOperation(value = "查询地图下的模板运行图")
/**
*查询地图下的模板运行图
*/
@GetMapping(path = "/{mapId}/list")
public List<RunPlanVO> queryPlanOfMap(@PathVariable Long mapId) {
return this.iRunPlanTemplateService.queryPlanListByMapId(mapId);
}
@ApiOperation(value = "模板运行图是否被其他数据使用")
/**
*模板运行图是否被其他数据使用
*/
@GetMapping(path = "/{planId}/exist")
public boolean isUsed(@PathVariable Long planId) {
return this.iRunPlanTemplateService.isUsed(planId);
}
@ApiOperation(value = "删除运行图模板")
/**
*删除运行图模板
*/
@DeleteMapping(path = "/{planId}")
@Role({RoleEnum.SuperAdmin,RoleEnum.Admin})
public void deleteTemplatePlan(@PathVariable Long planId, @ApiIgnore @RequestAttribute AccountVO user) {
public void deleteTemplatePlan(@PathVariable Long planId, @RequestAttribute AccountVO user) {
this.iRunPlanTemplateService.deletePlan(planId, user);
}
@ApiOperation(value = "复制运行图模板")
/**
*复制运行图模板
*/
@PostMapping(path = "/{id}/copyAs/{mapId}")
public void copyAs(@PathVariable @NotNull Long id,
@PathVariable @NotBlank Long mapId,
String name,
@ApiIgnore @RequestAttribute AccountVO user) {
@PathVariable @NotBlank Long mapId,
String name,
@RequestAttribute AccountVO user) {
this.iRunPlanTemplateService.copyAs(id, mapId, name, user);
}
@ApiOperation(value = "使用此模板生成当日运行图")
/**
*使用此模板生成当日运行图
*/
@PostMapping(path = "/generate/{planId}")
@Role({RoleEnum.SuperAdmin,RoleEnum.Admin})
public void generateDailyRunPlan(@PathVariable Long planId,
@RequestParam Long mapId,
@ApiIgnore @RequestAttribute AccountVO user) {
@RequestAttribute AccountVO user) {
this.iRunPlanTemplateService.generateDailyRunPlan(planId, mapId, user);
}
@ApiOperation(value = "查询运行图的数据绘制运行图")
/**
*查询运行图的数据绘制运行图
*/
@GetMapping(path = "/{planId}")
public RunPlanEChartsDataVO selectDiagramData(@PathVariable Long planId) {
return iRunPlanTemplateService.selectDiagramData(planId);
}
@ApiOperation("修改模板运行图信息")
/**
*修改模板运行图信息
*/
@PutMapping("/update")
public void update(@RequestBody @Validated RunPlanTemplateUpdateVO updateVO) {
iRunPlanTemplateService.update(updateVO);

View File

@ -15,17 +15,16 @@ import club.joylink.rtss.vo.client.validGroup.RunPlanNameCheck;
import club.joylink.rtss.vo.client.validGroup.ValidList;
import club.joylink.rtss.vo.map.MapStationRunLevelVO;
import club.joylink.rtss.vo.runplan.RunPlanInputData;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.CollectionUtils;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import java.util.List;
@Api(tags = {"运行计划草稿接口"})
/**
*运行计划草稿接口
*/
@RestController
@RequestMapping("/api/runPlan/draft")
public class RunPlanDraftController {
@ -36,52 +35,68 @@ public class RunPlanDraftController {
@Autowired
private IRunPlanRoutingService iRunPlanRoutingService;
@ApiOperation(value = "创建运行图草稿")
/**
*创建运行图草稿
*/
@PostMapping(path = "")
public String create(@RequestBody @Validated(value = RunPlanCreateCheck.class) RunPlanVO runPlanVO,
@ApiIgnore @RequestAttribute AccountVO user) {
@RequestAttribute AccountVO user) {
return iRunPlanDraftService.create(runPlanVO, user);
}
@ApiOperation(value = "修改运行图名称")
/**
*修改运行图名称
*/
@PutMapping(path = "/{id}")
public void updateName(@PathVariable Long id, @RequestBody @Validated(value = RunPlanNameCheck.class) RunPlanVO runPlanVO,
@ApiIgnore @RequestAttribute AccountVO user) {
@RequestAttribute AccountVO user) {
iRunPlanDraftService.updateName(id, runPlanVO.getName(), user);
}
@ApiOperation(value = "从模板运行图创建")
/**
*从模板运行图创建
*/
@PostMapping(path = "/createFrom/{templateId}")
public String createFrom(@PathVariable Long templateId, @RequestBody @Validated(value = RunPlanNameCheck.class) RunPlanVO runPlanVO,
@ApiIgnore @RequestAttribute AccountVO user) {
@RequestAttribute AccountVO user) {
return iRunPlanDraftService.createFrom(templateId, runPlanVO.getName(), user);
}
@ApiOperation(value = "根据mapId查询运行图纵坐标车站节点")
/**
*根据mapId查询运行图纵坐标车站节点
*/
@GetMapping(path = "/station/{mapId}")
public List selectOrdinateByMapId(@PathVariable Long mapId) {
return iRunPlanDraftService.selectOrdinateByMapId(mapId);
}
@ApiOperation(value = "查询运行图的数据绘制运行图")
/**
*查询运行图的数据绘制运行图
*/
@GetMapping(path = "/{planId}")
public RunPlanEChartsDataVO selectDiagramData(@PathVariable Long planId) {
return iRunPlanDraftService.selectDiagramData(planId);
}
@ApiOperation(value = "删除运行图")
/**
*删除运行图
*/
@DeleteMapping(path = "/{planId}")
public void deleteDiagramDraftData(@PathVariable Long planId, @RequestAttribute AccountVO user) {
iRunPlanDraftService.deleteDiagramDraftData(planId, user);
}
@ApiOperation(value = "删除运行图数据")
/**
*删除运行图数据
*/
@DeleteMapping(path = "/{planId}/data")
public void deleteDraftData(@PathVariable Long planId, @RequestAttribute AccountVO user) {
iRunPlanDraftService.deleteDraftData(planId, user);
}
@ApiOperation(value = "运行图草稿发布")
/**
*运行图草稿发布
*/
@PostMapping(path = "/{planId}/publish")
public List<String> publish(@PathVariable Long planId, @RequestAttribute AccountVO user) {
List<String> checkedList = this.dataCheck(planId,user);
@ -91,177 +106,227 @@ public class RunPlanDraftController {
return checkedList;
}
@ApiOperation(value = "导入真实运行图")
/**
*导入真实运行图
*/
@PostMapping(path = "/{mapId}/prdPlan")
public void importPrdPlan(@PathVariable Long mapId,
@RequestBody @Validated ValidList<RunPlanImport> runPlanImportList,
@ApiIgnore @RequestAttribute AccountVO user) {
@RequestAttribute AccountVO user) {
this.iRunPlanDraftService.importRunPlan(mapId, runPlanImportList, user);
}
@ApiOperation(value = "查询地图下个人运行图列表")
/**
*查询地图下个人运行图列表
*/
@GetMapping(path = "/{mapId}/list")
public List<RunPlanVO> queryListByMapId(@PathVariable Long mapId, @RequestAttribute AccountVO user) {
return this.iRunPlanDraftService.queryListByMapId(mapId, user);
}
@ApiOperation(value = "获取站间运行时间")
/**
*获取站间运行时间
*/
@GetMapping(path = "/{mapId}/stationRunning")
public List<MapStationRunningVO> getStationRunningDate(@PathVariable Long mapId, @ApiIgnore @RequestAttribute AccountVO user) {
public List<MapStationRunningVO> getStationRunningDate(@PathVariable Long mapId, @RequestAttribute AccountVO user) {
return this.iRunPlanDraftService.getStationRunningDate(mapId, user);
}
@ApiOperation(value = "设置站间运行时间")
/**
*设置站间运行时间
*/
@PutMapping(path = "/{mapId}/stationRunning")
public void setStationRunningTime(@PathVariable Long mapId,
@RequestBody List<RunPlanLevelVO> runPlanLevelVOList,
@ApiIgnore @RequestAttribute AccountVO user) {
@RequestAttribute AccountVO user) {
this.iRunPlanDraftService.setStationRunningTime(mapId, runPlanLevelVOList, user);
}
@ApiOperation(value = "获取地图原始站间运行等级")
/**
*获取地图原始站间运行等级
*/
@GetMapping(path = "/{mapId}/stationRunLevel")
public List<MapStationRunLevelVO> getStationRunningLevels(@PathVariable Long mapId) {
return this.iRunPlanDraftService.getStationRunLevel(mapId);
}
@ApiOperation(value = "查询运行图服务号是否存在")
/**
*查询运行图服务号是否存在
*/
@GetMapping(path = "/{planId}/{serviceNumber}/service")
public boolean ifServerExists(@PathVariable Long planId, @PathVariable String serviceNumber) {
return this.iRunPlanDraftService.ifServerExists(planId, serviceNumber);
}
@ApiOperation(value = "查询地图默认交路列表")
/**
*查询地图默认交路列表
*/
@GetMapping(path = "/{planId}/routingList")
public List getRoutingList(@PathVariable Long planId) {
return this.iRunPlanDraftService.getRoutingList(planId);
}
@ApiOperation(value = "根据车次号查询交路")
/**
*根据车次号查询交路
*/
@GetMapping(path = "/{planId}/routing")
public Object queryRoutingBySDTNumber(@PathVariable Long planId, String SDTNumber) {
return this.iRunPlanDraftService.queryRoutingBySDTNumber(planId, SDTNumber);
}
@ApiOperation(value = "根据车次号查询用户交路")
/**
*根据车次号查询用户交路
*/
@GetMapping(path = "/{planId}/userRouting")
public RunPlanRoutingVO queryRoutingBySDTNumber(@PathVariable Long planId, String SDTNumber, @ApiIgnore @RequestAttribute AccountVO user) {
public RunPlanRoutingVO queryRoutingBySDTNumber(@PathVariable Long planId, String SDTNumber, @RequestAttribute AccountVO user) {
return this.iRunPlanRoutingService.queryUserRoutingBySDTNumber(user.getId(), planId, SDTNumber);
}
@ApiOperation(value = "根据交路查询交路区段列表")
/**
*根据交路查询交路区段列表
*/
@GetMapping(path = "/{planId}/{routingCode}/routingSectionList")
public List getRoutingSectionList(@PathVariable Long planId, @PathVariable String routingCode) {
return this.iRunPlanDraftService.getRoutingSectionList(planId, routingCode);
}
@ApiOperation(value = "根据用户交路查询交路区段列表")
/**
*根据用户交路查询交路区段列表
*/
@GetMapping(path = "/{routingCode}/routingSectionList")
public List<RunPlanRoutingSection> getRoutingSectionList( @PathVariable Long routingCode, @ApiIgnore @RequestAttribute AccountVO user) {
public List<RunPlanRoutingSection> getRoutingSectionList( @PathVariable Long routingCode, @RequestAttribute AccountVO user) {
return this.iRunPlanRoutingService.getRoutingSectionDataBy(user.getId() , routingCode);
}
@ApiOperation(value = "增加计划")
/**
*增加计划
*/
@PostMapping(path = "/{planId}/service")
public void addRunPlanService(@PathVariable Long planId,
@RequestBody @Validated RunPlanServiceConfigVO serviceConfig,
@ApiIgnore @RequestAttribute AccountVO user) {
this.iRunPlanDraftService.addRunPlanService(planId, serviceConfig, user);
@RequestBody @Validated RunPlanServiceConfigVO serviceConfig,
@RequestAttribute AccountVO user) {
this.iRunPlanDraftService.addRunPlanService(planId, serviceConfig, user);
}
@ApiOperation(value = "生成计划")
/**
*生成计划
*/
@PostMapping(path = "/{planId}/service/generate")
public void generateRunPlanService(@RequestBody @Validated RunPlanInputData inputData, @PathVariable Long planId,@ApiIgnore @RequestAttribute AccountVO user) {
iRunPlanDraftService.generateRunPlanService(user.getId(),planId,inputData);
public void generateRunPlanService(@RequestBody @Validated RunPlanInputData inputData, @PathVariable Long planId, @RequestAttribute AccountVO user) {
iRunPlanDraftService.generateRunPlanService(user.getId(),planId,inputData);
}
@ApiOperation(value = "修改计划")
/**
*修改计划
*/
@PutMapping(path = "/{planId}/service/{serviceNumber}")
public void updateRunPlanService(@PathVariable Long planId,
@PathVariable String serviceNumber,
@RequestBody @Validated RunPlanServiceConfigVO serviceConfig,
@ApiIgnore @RequestAttribute AccountVO user) {
@RequestBody @Validated RunPlanServiceConfigVO serviceConfig,
@RequestAttribute AccountVO user) {
this.iRunPlanDraftService.updateRunPlanService(planId, serviceNumber, serviceConfig, user);
}
@ApiOperation(value = "删除计划")
/**
*删除计划
*/
@DeleteMapping(path = "/{planId}/service/{serviceNumber}")
public void deleteRunPlanService(@PathVariable Long planId,
@PathVariable String serviceNumber,
@ApiIgnore @RequestAttribute AccountVO user) {
@PathVariable String serviceNumber,
@RequestAttribute AccountVO user) {
this.iRunPlanDraftService.deleteRunPlanService(planId, serviceNumber, user);
}
@ApiOperation(value = "复制计划")
/**
*复制计划
*/
@PostMapping(path = "/{planId}/service/{serviceNumber}")
public void copyRunPlanService(@PathVariable Long planId,
@PathVariable String serviceNumber,
@PathVariable String serviceNumber,
@RequestBody RunPlanServiceConfigVO serviceConfig,
@ApiIgnore @RequestAttribute AccountVO user) {
@RequestAttribute AccountVO user) {
this.iRunPlanDraftService.copyRunPlanService(planId, serviceNumber, serviceConfig, user);
}
@ApiOperation(value = "平移计划")
/**
*平移计划
*/
@PutMapping(path = "/{planId}/service/{serviceNumber}/move")
public void moveRunPlanService(@PathVariable Long planId,
@PathVariable String serviceNumber,
@RequestBody RunPlanServiceConfigVO serviceConfig,
@ApiIgnore @RequestAttribute AccountVO user) {
@RequestAttribute AccountVO user) {
this.iRunPlanDraftService.moveRunPlanService(planId, serviceNumber, serviceConfig, user);
}
@ApiOperation(value = "修改计划号")
/**
*修改计划号
*/
@PutMapping(path = "/{planId}/service/{serviceNumber}/serviceNumber")
public void updateRunPlanService(@PathVariable Long planId, @PathVariable String serviceNumber, String newServiceNumber) {
this.iRunPlanDraftService.updateRunPlanServiceNumber(planId, serviceNumber, newServiceNumber);
}
@ApiOperation(value = "增加任务")
/**
*增加任务
*/
@PostMapping(path = "/{planId}/{serviceNumber}/trip")
public void addRunPlanTrip(@PathVariable Long planId, @PathVariable String serviceNumber,
@RequestBody @Validated RunPlanTripConfigVO tripConfig,
@ApiIgnore @RequestAttribute AccountVO user) {
@RequestAttribute AccountVO user) {
this.iRunPlanDraftService.addRunPlanTrip(planId, serviceNumber, tripConfig, user);
}
@ApiOperation(value = "修改任务")
/**
*修改任务
*/
@PutMapping(path = "/{planId}/trip/{SDTNumber}")
public void updateRunPlanTrip(@PathVariable Long planId, @PathVariable String SDTNumber,
@RequestBody @Validated RunPlanTripConfigVO tripConfig) {
this.iRunPlanDraftService.updateRunPlanTrip(planId, SDTNumber, tripConfig);
}
@ApiOperation(value = "修改任务车次号")
/**
*修改任务车次号
*/
@PutMapping(path = "/{planId}/trip/{SDTNumber}/tripNumber")
public void updateRunPlanTripNumber(@PathVariable Long planId, @PathVariable String SDTNumber,String tripNumber) {
this.iRunPlanDraftService.updateRunPlanTripNumber(planId, SDTNumber, tripNumber);
}
@ApiOperation(value = "删除任务")
/**
*删除任务
*/
@DeleteMapping(path = "/{planId}/trip/{SDTNumber}")
public void deleteRunPlanTrip(@PathVariable Long planId, @PathVariable String SDTNumber, boolean deleteBefore,
@ApiIgnore @RequestAttribute AccountVO user) {
@RequestAttribute AccountVO user) {
this.iRunPlanDraftService.deleteRunPlanTrip(planId, SDTNumber, deleteBefore, user);
}
//TODO
@ApiOperation(value = "有效性检查")
/**
*有效性检查
*/
@GetMapping (path = "/{planId}/check")
public List<String> dataCheck(@PathVariable Long planId,@ApiIgnore @RequestAttribute AccountVO user) {
public List<String> dataCheck(@PathVariable Long planId, @RequestAttribute AccountVO user) {
return this.iRunPlanDraftService.dataCheck(planId,user.getId());
}
//Temp use
@Role(RoleEnum.SuperAdmin)
@ApiOperation(value = "手动删除折返轨时刻数据")
/**
*手动删除折返轨时刻数据
*/
@PutMapping(path = "/{planId}/removeTBTrackTripTime")
public void removeTBTrackTripTime(@PathVariable Long planId) {
this.iRunPlanDraftService.removeTBTrackTripTime(planId);
this.iRunPlanDraftService.removeTBTrackTripTime(planId);
}
@ApiOperation(value = "运行图仿真测试")
/**
*运行图仿真测试
*/
@GetMapping (path = "/{planId}/simulation")
public String simulationCheck(@PathVariable Long planId, @ApiIgnore @RequestAttribute(name = AuthenticateInterceptor.LOGIN_INFO_KEY)
public String simulationCheck(@PathVariable Long planId, @RequestAttribute(name = AuthenticateInterceptor.LOGIN_INFO_KEY)
LoginUserInfoVO loginUserInfoVO) {
List<String> checkedList = this.dataCheck(planId,loginUserInfoVO.getAccountVO());
if(CollectionUtils.isEmpty(checkedList)) {

View File

@ -7,15 +7,15 @@ import club.joylink.rtss.services.runplan.IRunPlanUserConfigService;
import club.joylink.rtss.vo.AccountVO;
import club.joylink.rtss.vo.client.PageVO;
import club.joylink.rtss.vo.client.runplan.user.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@Api(tags = {"运行计划用户数据接口"})
/**
*运行计划用户数据接口
*/
@RestController
@RequestMapping("/api/runPlan/userData")
public class RunPlanUserDataController {
@ -32,93 +32,123 @@ public class RunPlanUserDataController {
@Autowired
private IRunPlanUserConfigService iRunPlanUserConfigService;
@ApiOperation(value = "用户创建交路")
/**
*用户创建交路
*/
@PostMapping(path = "/routing")
public void createUserRouting(@RequestBody @Validated RunPlanRoutingVO routingVO, @RequestAttribute AccountVO user) {
routingVO.setUserId(user.getId());
iRunPlanRoutingService.createUserRouting(routingVO);
iRunPlanRoutingService.createUserRouting(routingVO);
}
@ApiOperation(value = "生成通用交路区段数据")
/**
*生成通用交路区段数据
*/
@PostMapping(path = "/routing/path/generate")
public RunPlanRoutingVO generateUserRoutingPath(@RequestBody @Validated RunPlanRoutingVO routingVO) {
return iRunPlanRoutingService.generateUserRoutingData(routingVO);
}
@ApiOperation(value = "分页获取用户交路")
/**
*分页获取用户交路
*/
@GetMapping(path = "/{mapId}/routing/page")
public PageVO<RunPlanRoutingVO> queryPagedUserRouting(@PathVariable Long mapId, RunPlanRoutingQueryVO queryVO, @RequestAttribute AccountVO user) {
return iRunPlanRoutingService.queryPagedUserRouting(user.getId(), mapId, queryVO);
}
@ApiOperation(value = "用户同步默认交路相关数据:运行等级/停站时间/折返时间")
/**
*用户同步默认交路相关数据:运行等级/停站时间/折返时间
*/
@PutMapping(path = "/{mapId}/defaultRouting/sync")
public void pullDefaultRouting(@PathVariable Long mapId,@RequestAttribute AccountVO user) {
iRunPlanRoutingService.syncDefaultRoutingRefData(user.getId(), mapId);
iRunPlanRoutingService.syncDefaultRoutingRefData(user.getId(), mapId);
}
@ApiOperation(value = "获取用户交路数据")
/**
*获取用户交路数据
*/
@GetMapping(path = "/{mapId}/routing")
public List<RunPlanRoutingVO> queryUserRoutings(@PathVariable Long mapId, @RequestAttribute AccountVO user) {
return iRunPlanRoutingService.getUserRoutingBy(user.getId(), mapId);
}
@ApiOperation(value = "获取用户交路详情")
/**
*获取用户交路详情
*/
@GetMapping(path = "/routing/{routingId}")
public RunPlanRoutingVO getUserRouting(@PathVariable Long routingId) {
return iRunPlanRoutingService.getUserRouting(routingId);
}
@ApiOperation(value = "更新用户交路")
/**
*更新用户交路
*/
@PutMapping(path = "/routing/{routingId}")
public void updateUserRouting(@PathVariable Long routingId, @RequestBody @Validated RunPlanRoutingVO routingVO,@RequestAttribute AccountVO user) {
routingVO.setUserId(user.getId());
iRunPlanRoutingService.updateUserRouting(routingId, routingVO);
}
@ApiOperation(value = "删除用户交路")
/**
*删除用户交路
*/
@DeleteMapping(path = "/routing/{routingId}")
public void deleteUserRouting(@PathVariable Long routingId) {
iRunPlanRoutingService.deleteUserRouting(routingId);
}
@ApiOperation(value = "分页获取用户站间运行等级")
/**
*分页获取用户站间运行等级
*/
@GetMapping(path = "/{mapId}/runlevel/page")
public PageVO<RunPlanRunlevelVO> queryPagedUserRunlevel(@PathVariable Long mapId, RunPlanRunLevelQueryVO queryVO, @RequestAttribute AccountVO user) {
return iRunPlanRunlevelService.queryUserRunLevels(user.getId(), mapId, queryVO);
}
@ApiOperation(value = "更新用户站间运行等级")
/**
*更新用户站间运行等级
*/
@PutMapping(path = "/{mapId}/runlevel")
public void updateUserRunlevel(@PathVariable Long mapId, @RequestBody @Validated List<RunPlanRunlevelVO> list, @RequestAttribute AccountVO user) {
iRunPlanRunlevelService.updateRefLevels(user.getId(), mapId, list);
}
@ApiOperation(value = "用于区段数据变化时更新站间距离且重新计算运行等级数据")
/**
*用于区段数据变化时更新站间距离且重新计算运行等级数据
*/
@PutMapping(path = "/{mapId}/runlevelDistance")
public List<RunPlanRunlevelVO> updateRunlevelDistance(@PathVariable Long mapId, @RequestAttribute AccountVO user) {
return iRunPlanRunlevelService.updateRunlevelDistance(user.getId(), mapId);
}
@ApiOperation(value = "分页获取用户轨道停车时间")
/**
*分页获取用户轨道停车时间
*/
@GetMapping(path = "/{mapId}/parktime/page")
public PageVO<RunPlanParkingTimeVO> queryPagedUserParktime(@PathVariable Long mapId, RunPlanParktimeQueryVO queryVO, @RequestAttribute AccountVO user) {
return iRunPlanParktimeService.queryUserParktimes(user.getId(), mapId, queryVO);
}
@ApiOperation(value = "更新用户轨道停车时间")
/**
*更新用户轨道停车时间
*/
@PutMapping(path = "/{mapId}/parktime")
public void updateUserParktime(@PathVariable Long mapId, @RequestBody @Validated List<RunPlanParkingTimeVO> list, @RequestAttribute AccountVO user) {
iRunPlanParktimeService.updateRefUserParktime(user.getId(), mapId, list);
}
@ApiOperation(value = "保存用户配置")
/**
*保存用户配置
*/
@PostMapping(path = "/{mapId}/config")
public void createUserConfig(@PathVariable Long mapId, @RequestBody @Validated RunPlanUserConfigVO.Config config, @RequestAttribute AccountVO user) {
iRunPlanUserConfigService.saveConfig(user.getId(), mapId, config);
}
@ApiOperation(value = "获取用户配置")
/**
*获取用户配置
*/
@GetMapping(path = "/{mapId}/config")
public RunPlanUserConfigVO getUserConfig(@PathVariable Long mapId, @RequestAttribute AccountVO user) {
return iRunPlanUserConfigService.getConfig(user.getId(), mapId);

View File

@ -2,10 +2,8 @@ package club.joylink.rtss.controller.script;
import club.joylink.rtss.services.script.IScriptService;
import club.joylink.rtss.vo.client.PageVO;
import club.joylink.rtss.vo.client.script.ScriptVO;
import club.joylink.rtss.vo.client.script.ScriptQueryVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import club.joylink.rtss.vo.client.script.ScriptVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
@ -14,20 +12,30 @@ import org.springframework.web.bind.annotation.RestController;
import javax.validation.constraints.NotNull;
@Api(tags = "新版剧本接口")
/**
* 新版剧本接口
*/
@RestController
@RequestMapping("/api/script/v1")
public class ScriptController {
@Autowired
private IScriptService iScriptService;
@ApiOperation(value = "分页查询上线的剧本")
/**
* 分页查询上线的剧本
* @param scriptQueryVO
* @return
*/
@GetMapping(path = "/paging/online")
public PageVO<ScriptVO> pagingQueryOnlineScript(ScriptQueryVO scriptQueryVO) {
return iScriptService.pagingQueryOnlineScript(scriptQueryVO);
}
@ApiOperation(value = "通过id查询剧本详细信息")
/**
* 通过id查询剧本详细信息
* @param id
* @return
*/
@GetMapping(path = "/{id}/detail")
public ScriptVO getDetailInfoById(@PathVariable @NotNull Long id) {
return iScriptService.getDetailForClientById(id);

View File

@ -8,14 +8,13 @@ import club.joylink.rtss.vo.client.PageVO;
import club.joylink.rtss.vo.client.script.ScriptUpdateVO;
import club.joylink.rtss.vo.client.script.ScriptVO;
import club.joylink.rtss.vo.client.validGroup.ScriptCreateCheck;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
@Api(tags = { "草稿剧本接口" })
/**
*草稿剧本接口
*/
@RestController
@RequestMapping(path = "/api/script/draft")
public class ScriptDraftController {
@ -23,58 +22,76 @@ public class ScriptDraftController {
@Autowired
private IScriptDraftService iScriptDraftService;
@ApiOperation(value = "分页查询地图下个人的剧本列表")
/**
*分页查询地图下个人的剧本列表
*/
@GetMapping(path = "/{mapId}/list")
public PageVO<ScriptVO> listByMapIdOfUser(@PathVariable Long mapId, PageQueryVO queryVO,
@ApiIgnore @RequestAttribute AccountVO user) {
@RequestAttribute AccountVO user) {
return iScriptDraftService.queryPagedScript(mapId, user, queryVO);
}
@ApiOperation(value = "创建剧本")
/**
*创建剧本
*/
@PostMapping(path = "")
public String createScript(@RequestBody @Validated(value = ScriptCreateCheck.class) ScriptVO scriptVO,
@ApiIgnore @RequestAttribute AccountVO user) {
@RequestAttribute AccountVO user) {
return iScriptDraftService.createScript(scriptVO, user);
}
@ApiOperation(value = "通过id查询剧本基础信息")
/**
*通过id查询剧本基础信息
*/
@GetMapping(path = "/{id}")
public ScriptVO getBasicInfoById(@PathVariable Long id) {
return iScriptDraftService.getBasicInfo(id);
}
@ApiOperation(value = "修改剧本基本信息")
/**
*修改剧本基本信息
*/
@PutMapping(path = "/{id}")
public void updateScriptBasicInfo(@PathVariable Long id, @RequestBody @Validated ScriptUpdateVO updateVO,
@ApiIgnore @RequestAttribute AccountVO user) {
@RequestAttribute AccountVO user) {
iScriptDraftService.updateScriptInfo(id, updateVO, user);
}
@ApiOperation(value = "根据id删除剧本")
/**
*根据id删除剧本
*/
@DeleteMapping(path = "/{id}")
public void deleteScriptById(@PathVariable Long id, @ApiIgnore @RequestAttribute AccountVO user) {
public void deleteScriptById(@PathVariable Long id, @RequestAttribute AccountVO user) {
iScriptDraftService.deleteScript(id, user);
}
@ApiOperation(value = "剧本发布")
/**
*剧本发布
*/
@PutMapping(path = "/{id}/publish")
public void publish(@PathVariable Long id, @RequestBody String name, @RequestAttribute AccountVO user){
iScriptDraftService.publish(id, name, user);
}
@ApiOperation(value = "剧本撤销发布")
/**
*剧本撤销发布
*/
@PutMapping(path = "/{id}/retract")
public void retract(@PathVariable Long id, @RequestAttribute AccountVO user){
iScriptDraftService.retract(id, user);
}
@ApiOperation("导出剧本数据")
/**
*导出剧本数据
*/
@GetMapping("/{id}/export")
public ScriptDraftWithBLOBs export(@PathVariable Long id) {
return iScriptDraftService.export(id);
}
@ApiOperation("导入剧本数据")
/**
*导入剧本数据
*/
@PostMapping("/{mapId}/import")
public void importFromJson(@PathVariable Long mapId, String name, @RequestBody ScriptDraftWithBLOBs scriptDraft, @RequestAttribute AccountVO user) {
iScriptDraftService.importFromJson(mapId, name, scriptDraft, user);

View File

@ -5,16 +5,15 @@ import club.joylink.rtss.simulation.cbtc.Simulation;
import club.joylink.rtss.simulation.cbtc.data.vo.VirtualRealityTrainVO;
import club.joylink.rtss.simulation.cbtc.driving.DrivingService;
import club.joylink.rtss.vo.AccountVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.validation.constraints.NotBlank;
import java.util.List;
@Api(tags = { "驾驶操作接口" })
/**
* 驾驶操作接口
*/
@RestController
@RequestMapping("/simulation/driving")
public class DrivingOperationController {
@ -25,17 +24,26 @@ public class DrivingOperationController {
@Autowired
private DrivingService drivingService;
@ApiOperation(value = "获取在运行的列车列表")
/**
* 获取在运行的列车列表
* @param group
* @return
*/
@GetMapping(path = "/{group}/trainList")
public List<VirtualRealityTrainVO> getSimulationUsedTrainList(@PathVariable @NotBlank String group) {
Simulation simulation = this.groupSimulationService.getSimulationByGroup(group);
return this.drivingService.getOnlineTrainList(simulation);
}
@ApiOperation(value = "绑定一辆列车")
/**
* 绑定一辆列车
* @param group
* @param groupNumber
* @param user
*/
@PostMapping("/{group}/bindTrain/{groupNumber}")
public void bindTrain(@PathVariable String group, @PathVariable String groupNumber,
@ApiIgnore @RequestAttribute AccountVO user) {
@RequestAttribute AccountVO user) {
Simulation simulation = this.groupSimulationService.getSimulationByGroup(group);
this.drivingService.bindTrain(simulation, user.getId(), groupNumber);
}

View File

@ -8,16 +8,15 @@ import club.joylink.rtss.vo.LoginUserInfoVO;
import club.joylink.rtss.vo.client.simulationv1.MemberAddParamVO;
import club.joylink.rtss.vo.client.simulationv1.PlayRoleConfigVO;
import club.joylink.rtss.vo.client.simulationv1.SimulationMemberVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import java.util.List;
@Api(tags = "联合多人仿真接口")
/**
*联合多人仿真接口
*/
@RestController
@RequestMapping("/api/jointSimulation")
public class JointSimulationController {
@ -25,44 +24,56 @@ public class JointSimulationController {
@Autowired
private GroupSimulationService groupSimulationService;
@ApiOperation("生成综合仿真分享二维码")
/**
*生成综合仿真分享二维码
*/
@GetMapping("/{group}/qrCode")
public String generateQrCode(@PathVariable String group) {
return this.groupSimulationService.generateQrCode(group);
}
@ApiOperation("获取权限成为仿真用户")
/**
*获取权限成为仿真用户
*/
@PostMapping("/{group}/permission")
public SimulationVO getPermission(@PathVariable String group,
@ApiIgnore @RequestAttribute(name = AuthenticateInterceptor.LOGIN_USER_KEY)
@RequestAttribute(name = AuthenticateInterceptor.LOGIN_USER_KEY)
AccountVO user) {
return this.groupSimulationService.getPermission(group, user);
}
@ApiOperation("将指定用户踢出仿真")
/**
*将指定用户踢出仿真
*/
@DeleteMapping("/{group}/kickOut")
public void kickOut(@PathVariable String group,
Long userId,
@ApiIgnore @RequestAttribute(name = AuthenticateInterceptor.LOGIN_USER_KEY)
@RequestAttribute(name = AuthenticateInterceptor.LOGIN_USER_KEY)
AccountVO user) {
this.groupSimulationService.kickOut(group, userId, user);
}
@ApiOperation("获取用户所在的综合演练仿真")
/**
*获取用户所在的综合演练仿真
*/
@GetMapping("/list/containUser")
public List<SimulationVO> queryJointSimulationByUser(@ApiIgnore @RequestAttribute(name = AuthenticateInterceptor.LOGIN_INFO_KEY)
LoginUserInfoVO loginUserInfoVO) {
public List<SimulationVO> queryJointSimulationByUser(@RequestAttribute(name = AuthenticateInterceptor.LOGIN_INFO_KEY)
LoginUserInfoVO loginUserInfoVO) {
return this.groupSimulationService.queryJointSimulationByUser(loginUserInfoVO);
}
@ApiOperation("分配用户(取消)扮演角色")
/**
*分配用户(取消)扮演角色
*/
@PutMapping("/{group}/assignRoles")
public void assignRoles(@PathVariable String group,
@RequestBody @Validated List<PlayRoleConfigVO> configVOList) {
this.groupSimulationService.assignRoles(group, configVOList);
}
@ApiOperation("添加新仿真角色成员")
/**
*添加新仿真角色成员
*/
@PostMapping("/{group}/member")
public SimulationMemberVO addMember(@PathVariable String group,
@RequestBody @Validated MemberAddParamVO param) {

View File

@ -7,19 +7,18 @@ import club.joylink.rtss.vo.LoginUserInfoVO;
import club.joylink.rtss.vo.client.schedulingNew.SchedulingCheckResultNewVO;
import club.joylink.rtss.vo.client.schedulingNew.SchedulingPlanDetailVO;
import club.joylink.rtss.vo.client.schedulingNew.SchedulingPlanNewVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.validation.constraints.NotBlank;
import java.time.LocalDate;
import java.util.List;
@Api(tags = { "新派班工作站仿真接口" })
/**
*新派班工作站仿真接口
*/
@RestController
@RequestMapping(path = "/api/v1/scheduling")
public class SchedulingSimulationController {
@ -32,20 +31,24 @@ public class SchedulingSimulationController {
return this.schedulingService.queryCurrentSchedulingPlan(group);
}
@ApiOperation(value = "查询某天的派班计划")
/**
*查询某天的派班计划
*/
@GetMapping(path = "/{group}/day")
public SchedulingPlanNewVO findSchedulingPlanOfDay(@PathVariable @NotBlank String group,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") LocalDate day,
@ApiIgnore @RequestAttribute(name = AuthenticateInterceptor.LOGIN_INFO_KEY)
@RequestAttribute(name = AuthenticateInterceptor.LOGIN_INFO_KEY)
LoginUserInfoVO loginUserInfoVO) {
return this.schedulingService.queryAndLoadSchedulingPlanOfDay(group, day, loginUserInfoVO);
}
@ApiOperation(value = "生成某天的基础派班计划")
/**
*生成某天的基础派班计划
*/
@PostMapping(path = "/{group}/generate")
public SchedulingPlanNewVO generateBaseSchedulingPlanOfDay(@PathVariable @NotBlank String group,
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") LocalDate day,
@ApiIgnore @RequestAttribute AccountVO user) {
@RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") LocalDate day,
@RequestAttribute AccountVO user) {
return this.schedulingService.generateSchedulingPlanOfDay(group, day, user);
}
@ -56,24 +59,30 @@ public class SchedulingSimulationController {
// return this.schedulingService.applyAndCheckConflict(group, editVOList);
// }
@ApiOperation(value = "保存派班计划数据")
/**
*保存派班计划数据
*/
@PostMapping(path = "/{group}/save")
public SchedulingCheckResultNewVO saveSchedulingPlan(@PathVariable @NotBlank String group,
@Validated @RequestBody List<SchedulingPlanDetailVO> editVOList,
@ApiIgnore @RequestAttribute(name = AuthenticateInterceptor.LOGIN_INFO_KEY)
LoginUserInfoVO loginUserInfoVO) {
@RequestAttribute(name = AuthenticateInterceptor.LOGIN_INFO_KEY)
LoginUserInfoVO loginUserInfoVO) {
return this.schedulingService.save(group, editVOList, loginUserInfoVO);
}
@ApiOperation(value = "生成地图通用派班计划")
/**
*生成地图通用派班计划
*/
@PostMapping(path = "/generate/common")
public void generateMapCommonSchedulingPlan(Long mapId, @ApiIgnore @RequestAttribute AccountVO user) {
public void generateMapCommonSchedulingPlan(Long mapId, @RequestAttribute AccountVO user) {
this.schedulingService.generateCommonSchedulingPlan(mapId, user);
}
@ApiOperation(value = "所有地图生成通用派班计划", hidden = true)
/**
*所有地图生成通用派班计划
*/
@PostMapping(path = "/generate/common/all")
public void generateAllMapCommonSchedulingPlan(@ApiIgnore @RequestAttribute AccountVO user) {
public void generateAllMapCommonSchedulingPlan(@RequestAttribute AccountVO user) {
this.schedulingService.generateAllMapCommonSchedulingPlan(user);
}

View File

@ -11,18 +11,17 @@ import club.joylink.rtss.vo.client.script.ScriptActionUpdateVO;
import club.joylink.rtss.vo.client.script.ScriptActionVO;
import club.joylink.rtss.vo.client.script.ScriptVO;
import club.joylink.rtss.vo.client.simulationv1.SimulationMemberVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.List;
@Api(tags = {"剧本仿真接口"})
/**
*剧本仿真接口
*/
@RestController
@RequestMapping("/api/scriptSimulation")
public class ScriptSimulationController {
@ -30,39 +29,51 @@ public class ScriptSimulationController {
@Autowired
private IScriptSimulationService iScriptSimulationService;
@ApiOperation(value = "开始剧本编制仿真")
/**
*开始剧本编制仿真
*/
@GetMapping("/{scriptId}/scriptWrite")
public String scriptWriteSimulation(@PathVariable @NotNull Long scriptId,
@ApiIgnore @RequestAttribute(name = AuthenticateInterceptor.LOGIN_INFO_KEY)
@RequestAttribute(name = AuthenticateInterceptor.LOGIN_INFO_KEY)
LoginUserInfoVO userLoginInfo) {
return this.iScriptSimulationService.scriptWriteSimulation(scriptId, userLoginInfo);
}
@ApiOperation(value = "获取仿真所有出演成员")
/**
*获取仿真所有出演成员
*/
@GetMapping("/{group}/allPlayer")
public List<SimulationMemberVO> getAllPlayer(@PathVariable String group) {
return iScriptSimulationService.getAllPlayer(group);
}
@ApiOperation("获取剧本所有选取过的成员")
/**
*获取剧本所有选取过的成员
*/
@GetMapping("/{group}/allSelectedMembers")
public List<SimulationMemberVO> getAllSelectedMembers(@PathVariable String group) {
return iScriptSimulationService.getAllSelectedMembers(group);
}
@ApiOperation(value = "获取剧本所有动作")
/**
*获取剧本所有动作
*/
@GetMapping("/{group}/allAction")
public List<ScriptActionVO> getAllAction(@PathVariable @NotBlank String group) {
return iScriptSimulationService.getAllAction(group);
}
@ApiOperation("修改剧本会话动作")
/**
*修改剧本会话动作
*/
@PutMapping("/{group}/action/update")
public void updateAction(@PathVariable @NotBlank String group, @RequestBody @NotNull @Validated ScriptActionUpdateVO updateVO) {
iScriptSimulationService.updateAction(group, updateVO);
}
@ApiOperation("删除剧本会话动作")
/**
*删除剧本会话动作
*/
@DeleteMapping("/{group}/{actionId}/delete")
public void deleteAction(@PathVariable String group, @PathVariable String actionId) {
iScriptSimulationService.deleteAction(group, actionId);
@ -74,101 +85,133 @@ public class ScriptSimulationController {
// return iScriptSimulationService.getCondition(group, actionId);
// }
@ApiOperation("更新触发条件")
/**
*更新触发条件
*/
@PutMapping("/{group}/{actionId}/updateCondition")
public void updateCondition(@PathVariable String group, @PathVariable String actionId, @RequestBody ScriptActionBO.Condition condition) {
iScriptSimulationService.updateCondition(group, actionId, condition);
}
@ApiOperation(value = "更新位置")
/**
*更新位置
*/
@PutMapping("/{group}/mapLocation")
public void updateMapLocation(@PathVariable String group, @RequestBody MapLocationVO locationVO) {
iScriptSimulationService.updateMapLocation(group, locationVO);
}
@ApiOperation(value = "保存背景")
/**
*保存背景
*/
@PutMapping("/{group}/saveScenes")
public void saveScenes(@PathVariable @NotBlank String group) {
iScriptSimulationService.saveBgScenes(group);
}
@ApiOperation("开始替换背景")
/**
*开始替换背景
*/
@PutMapping("/{group}/replace/start")
public void replaceStart(@PathVariable String group) {
iScriptSimulationService.replaceStart(group);
}
@ApiOperation("替换背景")
/**
*替换背景
*/
@PutMapping("/{group}/replace/confirm")
public void replaceBgScenes(@PathVariable String group) {
iScriptSimulationService.replaceBgScenes(group);
}
@ApiOperation("背景替换取消")
/**
*背景替换取消
*/
@PutMapping("/{group}/replace/cancel")
public void replaceEnd(@PathVariable String group) {
iScriptSimulationService.replaceEnd(group);
}
@ApiOperation(value = "重置剧本")
/**
*重置剧本
*/
@PutMapping("/{group}/reset")
public void reset(@PathVariable @NotBlank String group, @ApiIgnore @RequestAttribute AccountVO user) {
public void reset(@PathVariable @NotBlank String group, @RequestAttribute AccountVO user) {
iScriptSimulationService.reset(group, user);
}
@ApiOperation(value = "保存数据")
/**
*保存数据
*/
@PutMapping("/{group}/saveData")
public void saveData(@PathVariable String group) {
iScriptSimulationService.saveData(group);
}
@ApiOperation("切换扮演的出演成员")
/**
*切换扮演的出演成员
*/
@PutMapping("/{group}/{memberId}/switch")
public void switchPlayer(@PathVariable String group, @PathVariable String memberId, @ApiIgnore @RequestAttribute AccountVO user) {
public void switchPlayer(@PathVariable String group, @PathVariable String memberId, @RequestAttribute AccountVO user) {
iScriptSimulationService.switchPlayer(group, memberId, user);
}
//----------- 剧本运行相关 -----------
@ApiOperation("加载已发布的剧本到仿真中")
/**
*加载已发布的剧本到仿真中
*/
@PutMapping("/{group}/load/script/{scriptId}")
public void loadScript(@PathVariable String group, @PathVariable Long scriptId) {
iScriptSimulationService.loadScript(group, scriptId);
}
@ApiOperation(value = "预览剧本")
/**
*预览剧本
*/
@GetMapping("/{scriptId}/preview")
public String preview(@PathVariable Long scriptId, @ApiIgnore @RequestAttribute(name = AuthenticateInterceptor.LOGIN_INFO_KEY) LoginUserInfoVO loginUserInfoVO) {
public String preview(@PathVariable Long scriptId, @RequestAttribute(name = AuthenticateInterceptor.LOGIN_INFO_KEY) LoginUserInfoVO loginUserInfoVO) {
return iScriptSimulationService.preview(scriptId, loginUserInfoVO);
}
@ApiOperation("选择角色并开始剧本演出")
/**
*选择角色并开始剧本演出
*/
@PutMapping("/{group}/chooseMemberAndStart")
public void chooseMemberAndStartScript(@PathVariable String group, String memberId, ScriptBO.Mode mode, @RequestAttribute AccountVO user) {
iScriptSimulationService.chooseMemberAndStartScript(group, memberId, mode, user);
}
@ApiOperation("结束剧本演出")
/**
*结束剧本演出
*/
@GetMapping("/{group}/finish")
public Integer finishScript(@PathVariable String group) {
return iScriptSimulationService.finishScript(group);
}
@ApiOperation(value = "获取仿真中加载的剧本详情")
/**
*获取仿真中加载的剧本详情
*/
@GetMapping("/{group}/scriptDetail")
public ScriptVO getScriptDetail(@PathVariable String group) {
return iScriptSimulationService.getScriptDetail(group);
}
@ApiOperation("重新预览剧本")
/**
*重新预览剧本
*/
@PutMapping("/{group}/rePreview")
public void rePreview(@PathVariable String group, @RequestAttribute AccountVO user) {
iScriptSimulationService.rePreview(group, user);
}
@ApiOperation("托管驾驶")
/**
*托管驾驶
*/
@PutMapping("/{group}/trust")
public void trust(@PathVariable String group, @ApiIgnore @RequestAttribute AccountVO user) {
public void trust(@PathVariable String group, @RequestAttribute AccountVO user) {
iScriptSimulationService.trust(group, user);
}
}

View File

@ -6,16 +6,15 @@ import club.joylink.rtss.simulation.cbtc.conversation.ConversationManagerService
import club.joylink.rtss.simulation.cbtc.conversation.ConversationText;
import club.joylink.rtss.simulation.cbtc.data.vo.ConversationVO;
import club.joylink.rtss.vo.AccountVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import springfox.documentation.annotations.ApiIgnore;
import java.util.List;
@Api("仿真会话接口")
/**
*仿真会话接口
*/
@RestController
@RequestMapping("/api/simulation/{group}/conversation")
public class SimulationConversationController {
@ -23,14 +22,18 @@ public class SimulationConversationController {
@Autowired
private ConversationManagerService conversationManagerService;
@ApiOperation("根据会话id获取仿真会话")
/**
*根据会话id获取仿真会话
*/
@GetMapping("/{id}")
public ConversationVO getConversation(@PathVariable String group,
@PathVariable String id) {
return this.conversationManagerService.getConversationById(group, id);
}
@ApiOperation("获取所有会话")
/**
*获取所有会话
*/
@GetMapping("/listAll")
public List<ConversationVO> getAllConversations(@PathVariable String group) {
return this.conversationManagerService.getAllConversations(group);
@ -45,43 +48,53 @@ public class SimulationConversationController {
// return this.conversationManagerService.createConversation(group, userVO, memberIdList);
// }
@ApiOperation("发起会话")
/**
*发起会话
*/
@PostMapping("")
public ConversationVO startConversation(@PathVariable String group,
@ApiIgnore @RequestAttribute(name = AuthenticateInterceptor.LOGIN_USER_KEY) AccountVO accountVO,
@RequestAttribute(name = AuthenticateInterceptor.LOGIN_USER_KEY) AccountVO accountVO,
CommunicationObject object, @RequestBody List<String> memberIds) {
return this.conversationManagerService.createConversation(group, accountVO, object, memberIds);
}
@ApiOperation("成员接受仿真会话邀请")
/**
*成员接受仿真会话邀请
*/
@PostMapping("/{id}/connect")
public ConversationVO acceptConversationInvite(@PathVariable String group,
@PathVariable String id,
@ApiIgnore @RequestAttribute(name = AuthenticateInterceptor.LOGIN_USER_KEY)
@RequestAttribute(name = AuthenticateInterceptor.LOGIN_USER_KEY)
AccountVO accountVO) {
return this.conversationManagerService.connect2Conversation(group, accountVO, id);
}
@ApiOperation("结束会话")
/**
*结束会话
*/
@PutMapping("/{id}/over")
public void overConversation(@PathVariable String group,
@PathVariable String id,
@ApiIgnore @RequestAttribute(name = AuthenticateInterceptor.LOGIN_USER_KEY)
@RequestAttribute(name = AuthenticateInterceptor.LOGIN_USER_KEY)
AccountVO accountVO) {
this.conversationManagerService.exitConversation(group, id, accountVO);
}
@ApiOperation("发送会话消息(语音输入)")
/**
*发送会话消息语音输入
*/
@PostMapping("/{id}/chat")
public void chat(@PathVariable String group,
@PathVariable String id,
MultipartFile file,
@ApiIgnore @RequestAttribute(name = AuthenticateInterceptor.LOGIN_USER_KEY)
@RequestAttribute(name = AuthenticateInterceptor.LOGIN_USER_KEY)
AccountVO accountVO) {
this.conversationManagerService.chat(group, id, accountVO, file);
}
@ApiOperation("发送会话消息(文字输入)")
/**
*发送会话消息文字输入
*/
@PostMapping("/{id}/chat/text")
public void textChat(@PathVariable String group, @PathVariable String id, @RequestBody ConversationText text, @RequestAttribute AccountVO user) {
this.conversationManagerService.textChat(group, id, text, user);

View File

@ -5,13 +5,12 @@ import club.joylink.rtss.simulation.cbtc.data.vo.SimulationVO;
import club.joylink.rtss.vo.AccountVO;
import club.joylink.rtss.vo.client.PageVO;
import club.joylink.rtss.vo.client.simulationv1.ExistSimulationQueryVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
@Api(tags = { "仿真管理接口" })
/**
* 仿真管理接口
*/
@RestController
@RequestMapping("/manage/simulation")
public class SimulationManageController {
@ -19,21 +18,33 @@ public class SimulationManageController {
@Autowired
private SimulationManageService simulationManageService;
@ApiOperation(value = "分页查询存在的仿真数据")
/**
* 分页查询存在的仿真数据
* @param queryVO
* @return
*/
@GetMapping("/exists")
public PageVO<SimulationVO> pagingQueryExistSimulations(ExistSimulationQueryVO queryVO) {
return this.simulationManageService.pagingQueryExistSimulations(queryVO);
}
@ApiOperation(value = "根据仿真group获取仿真基础信息")
/**
* 根据仿真group获取仿真基础信息
* @param group
* @return
*/
@GetMapping("/{group}")
public SimulationVO getSimulationBasicInfo(@PathVariable String group) {
return this.simulationManageService.getSimulationBasicInfo(group);
}
@ApiOperation(value = "销毁仿真")
/**
* 销毁仿真
* @param group
* @param user
*/
@DeleteMapping("/{group}")
public void destroySimulation(@PathVariable String group, @ApiIgnore @RequestAttribute AccountVO user) {
public void destroySimulation(@PathVariable String group, @RequestAttribute AccountVO user) {
this.simulationManageService.destroySimulation(group, user);
}

View File

@ -2,23 +2,14 @@ package club.joylink.rtss.controller.simulation;
import club.joylink.rtss.simulation.cbtc.GroupSimulationService;
import club.joylink.rtss.simulation.cbtc.data.vo.RealDeviceVO;
import club.joylink.rtss.simulation.cbtc.data.vo.SimulationVO;
import club.joylink.rtss.controller.advice.AuthenticateInterceptor;
import club.joylink.rtss.vo.LoginUserInfoVO;
import club.joylink.rtss.vo.client.simulationv1.MemberAddParamVO;
import club.joylink.rtss.vo.client.simulationv1.PlayRoleConfigVO;
import club.joylink.rtss.vo.client.simulationv1.SimulationMemberVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import java.util.List;
@Api(tags = "仿真真实设备接口")
/**
* 仿真真实设备接口
*/
@RestController
@RequestMapping("/api/simulation/{group}/realDevice")
public class SimulationRealDeviceController {
@ -26,24 +17,37 @@ public class SimulationRealDeviceController {
@Autowired
private GroupSimulationService groupSimulationService;
@ApiOperation("获取仿真全部真实设备")
/**
* 获取仿真全部真实设备
* @param group
* @return
*/
@GetMapping("/list")
public List<RealDeviceVO> getAllRealDevices(@PathVariable String group) {
return this.groupSimulationService.getRealDeviceList(group);
}
@ApiOperation("连接仿真设备和真实设备")
/**
* 连接仿真设备和真实设备
* @param group
* @param id
* @param sdCode
*/
@PostMapping("/{id}/connect/{sdCode}")
public void connect(@PathVariable String group,
@ApiParam("项目设备id") @PathVariable Long id,
@ApiParam("仿真设备编码") @PathVariable String sdCode) {
@PathVariable Long id,
@PathVariable String sdCode) {
this.groupSimulationService.connectDevice(group, sdCode, id);
}
@ApiOperation("断开仿真设备和真实设备的连接")
/**
* 断开仿真设备和真实设备的连接
* @param group
* @param id 项目设备id
*/
@PutMapping("/{id}/disconnect")
public void disconnect(@PathVariable String group,
@ApiParam("项目设备id") @PathVariable Long id) {
@PathVariable Long id) {
this.groupSimulationService.disconnectDevice(group, id);
}

View File

@ -13,7 +13,6 @@ import club.joylink.rtss.simulation.cbtc.command.CommandInitiateVO;
import club.joylink.rtss.simulation.cbtc.communication.vo.fault.DeviceFaultInfo;
import club.joylink.rtss.simulation.cbtc.data.status.IbpStatus;
import club.joylink.rtss.simulation.cbtc.data.vo.SimulationVO;
import club.joylink.rtss.simulation.cbtc.data.vr.VirtualRealityIbp;
import club.joylink.rtss.simulation.cbtc.data.vr.VirtualRealityPsl;
import club.joylink.rtss.simulation.cbtc.member.SimulationMember;
import club.joylink.rtss.simulation.cbtc.script.ScriptBO;
@ -31,13 +30,10 @@ import club.joylink.rtss.vo.client.simulationv1.SimulationMemberVO;
import club.joylink.rtss.vo.client.simulationv1.SimulationUserVO;
import club.joylink.rtss.vo.map.MapStationNewVO;
import club.joylink.rtss.vo.map.MapVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
@ -48,7 +44,9 @@ import java.util.Map;
import java.util.Objects;
import java.util.Set;
@Api(tags = {"新仿真接口"})
/**
*新仿真接口
*/
@RestController
@RequestMapping("/simulation")
public class SimulationV1Controller {
@ -65,121 +63,157 @@ public class SimulationV1Controller {
@Autowired
private IVirtualRealityPslService iVirtualRealityPslService;
@ApiOperation(value = "根据产品类型创建仿真")
/**
*根据产品类型创建仿真
*/
@GetMapping("")
public String simulation(Long mapId, String prdType,
@ApiIgnore @RequestAttribute(name = AuthenticateInterceptor.LOGIN_INFO_KEY)
@RequestAttribute(name = AuthenticateInterceptor.LOGIN_INFO_KEY)
LoginUserInfoVO loginUserInfoVO) {
String simulation = this.groupSimulationService.simulation(mapId, prdType, loginUserInfoVO);
return simulation;
}
@ApiOperation(value = "创建实训仿真")
/**
*创建实训仿真
*/
@GetMapping(path = "/training/{trainingId}")
public String trainingSimulation(@PathVariable Long trainingId,
@ApiIgnore @RequestAttribute(name = AuthenticateInterceptor.LOGIN_INFO_KEY)
@RequestAttribute(name = AuthenticateInterceptor.LOGIN_INFO_KEY)
LoginUserInfoVO loginUserInfoVO) {
return this.groupSimulationService.trainingSimulation(trainingId, loginUserInfoVO);
}
@ApiOperation(value = "创建考试仿真")
/**
*创建考试仿真
*/
@GetMapping(path = "/exam/{examId}")
public String examSimulate(@PathVariable Long examId,
@ApiIgnore @RequestAttribute(name = AuthenticateInterceptor.LOGIN_INFO_KEY)
@RequestAttribute(name = AuthenticateInterceptor.LOGIN_INFO_KEY)
LoginUserInfoVO loginUserInfoVO) {
return this.groupSimulationService.examSimulation(examId, loginUserInfoVO);
}
@ApiOperation(value = "获取客户端已经进入仿真的用户仿真所在group")
/**
*获取客户端已经进入仿真的用户仿真所在group
*/
@GetMapping(path = "/running")
public List<String> getRunningSimulationBySubscribeUser(@ApiIgnore @RequestAttribute AccountVO user) {
public List<String> getRunningSimulationBySubscribeUser(@RequestAttribute AccountVO user) {
return this.groupSimulationService.getUserRunningSimulationGroups(user);
}
@ApiOperation(value = "根据仿真group获取仿真基础信息")
/**
*根据仿真group获取仿真基础信息
*/
@GetMapping("/{group}")
public SimulationVO getSimulationBasicInfo(@PathVariable String group) {
return this.groupSimulationService.getSimulationBasicInfo(group);
}
@ApiOperation(value = "获取用户在仿真中的用户信息")
/**
*获取用户在仿真中的用户信息
*/
@GetMapping("/{group}/simulationUser")
public SimulationUserVO getSimulationUserInfo(@PathVariable String group,
@ApiIgnore @RequestAttribute(name = AuthenticateInterceptor.LOGIN_USER_KEY)
@RequestAttribute(name = AuthenticateInterceptor.LOGIN_USER_KEY)
AccountVO accountVO) {
return this.groupSimulationService.getSimulationUserInfo(group, accountVO);
}
@ApiOperation("获取所有仿真用户")
/**
*获取所有仿真用户
*/
@GetMapping("/{group}/simulationUsers")
public List<SimulationUserVO> queryAllSimulationUsers(@PathVariable String group) {
return this.groupSimulationService.queryAllSimulationUsers(group);
}
@ApiOperation(value = "根据仿真group获取仿真地图数据")
/**
*根据仿真group获取仿真地图数据
*/
@GetMapping("/{group}/mapData")
public MapVO getSimulationMapData(@PathVariable String group) {
return this.groupSimulationService.getSimulationMapData(group);
}
@ApiOperation(value = "根据group获取排序的车站列表包含车辆段/停车场)")
/**
*根据group获取排序的车站列表包含车辆段/停车场
*/
@GetMapping("/{group}/stationWithDepot")
public List<MapStationNewVO> getSortedStationListWithDepot(@PathVariable String group) {
return this.groupSimulationService.getSortedStationListWithDepot(group);
}
@ApiOperation(value = "加载指定运行计划到仿真中")
/**
*加载指定运行计划到仿真中
*/
@PutMapping("/{group}/load/runPlan/{templateId}")
public void loadRunPlan(@PathVariable String group, @PathVariable Long templateId) {
this.groupSimulationService.loadRunPlan(group, templateId);
}
@ApiOperation(value = "根据仿真group获取仿真运行图")
/**
*根据仿真group获取仿真运行图
*/
@GetMapping("/{group}/runPlan")
public RunPlanEChartsDataVO getSimulationRunPlan(@PathVariable String group) {
return this.groupSimulationService.getSimulationRunPlan(group);
}
@ApiOperation(value = "获取仿真运行图车次号列表")
/**
*获取仿真运行图车次号列表
*/
@GetMapping("/{group}/tripNumbers")
public List<String> getSimulationRunPlanTripNumbers(@PathVariable String group) {
return this.groupSimulationService.getSimulationRunPlanTripNumbers(group);
}
@ApiOperation(value = "根据车次号获取服务号")
/**
*根据车次号获取服务号
*/
@GetMapping("/{group}/serviceNumber")
public List<String> getServiceNumberByTripNumber(@PathVariable String group, String tripNumber) {
return this.groupSimulationService.getServiceNumberByTripNumber(group, tripNumber);
}
@ApiOperation(value = "根据车次号获取计划车次信息")
/**
*根据车次号获取计划车次信息
*/
@GetMapping("/{group}/planTripInfo")
public PlanTripNumberVO getPlanTripByTripNumber(@PathVariable String group, String tripNumber) {
return this.groupSimulationService.getPlanTripByTripNumber(group, tripNumber);
}
@ApiOperation(value = "根据服务号和车次号获取计划车次信息")
/**
*根据服务号和车次号获取计划车次信息
*/
@GetMapping("/{group}/planTripInfoBySt")
public PlanTripNumberVO planTripInfoBySt(@PathVariable String group, String serviceNumber, String tripNumber) {
return this.groupSimulationService.planTripInfoByServiceAndTripNumber(group, serviceNumber, tripNumber);
}
@ApiOperation(value = "仿真操作")
/**
*仿真操作
*/
@PostMapping("/{group}/operate/{type}")
public Object operate(@PathVariable @NotBlank String group, @PathVariable @NotNull String type,
@RequestBody Map<String, Object> param, @ApiIgnore @RequestAttribute AccountVO user) {
@RequestBody Map<String, Object> param, @RequestAttribute AccountVO user) {
return this.groupSimulationService.operate(group, type, param, user);
}
@ApiOperation("仿真指令")
/**
*仿真指令
*/
@PostMapping("/{group}/command")
public void command(@PathVariable String group, @RequestBody @Validated CommandInitiateVO initiateVO, @ApiIgnore @RequestAttribute AccountVO user) {
public void command(@PathVariable String group, @RequestBody @Validated CommandInitiateVO initiateVO, @RequestAttribute AccountVO user) {
Simulation simulation = this.groupSimulationService.getSimulationByGroup(group);
SimulationMember member = simulation.getSimulationMemberByUserId(user.getId());
this.groupSimulationService.command(simulation, initiateVO, member);
}
@ApiOperation(value = "根据计划时间获取此时间点可以加载的最大列车数量")
/**
*根据计划时间获取此时间点可以加载的最大列车数量
*/
@GetMapping("/{group}/loadTrainNumber")
public int getLoadTrainNumber(@PathVariable String group,
@DateTimeFormat(pattern = "HH:mm:ss") LocalTime time) {
@ -187,66 +221,86 @@ public class SimulationV1Controller {
return this.groupSimulationService.getGivenTimeCouldLoadedTrainNumber(group, time);
}
@ApiOperation(value = "按计划行车")
/**
*按计划行车
*/
@PostMapping("/{group}/ranAsPlan")
public void runAsPlan(@PathVariable String group, @RequestBody @Validated RunAsPlanParam param) {
this.groupSimulationService.runAsPlan(group, param);
}
@ApiOperation(value = "退出计划")
/**
*退出计划
*/
@PostMapping("/{group}/planOver")
public void planOver(@PathVariable String group) {
this.groupSimulationService.planOver(group);
}
@ApiOperation(value = "清除仿真")
/**
*清除仿真
*/
@DeleteMapping("/{group}/clear")
public void clearSimulation(@PathVariable String group, @ApiIgnore @RequestAttribute AccountVO user) {
public void clearSimulation(@PathVariable String group, @RequestAttribute AccountVO user) {
this.groupSimulationService.clearSimulation(group, user);
}
@ApiOperation(value = "加载剧本并扮演成员(已发布的剧本)")
/**
*加载剧本并扮演成员已发布的剧本
*/
@PutMapping(path = "/{group}/script/{scriptId}")
public void loadScriptAndPlayMember(@PathVariable String group,
@PathVariable Long scriptId,
String memberId,
ScriptBO.Mode mode,
@ApiIgnore @RequestAttribute AccountVO user) {
@RequestAttribute AccountVO user) {
this.groupSimulationService.loadScriptAndPlayMember(group, scriptId, memberId, mode, user);
}
@ApiOperation(value = "退出剧本")
/**
*退出剧本
*/
@PutMapping(path = "/{group}/exitScript")
public void exitScript(@PathVariable @NotBlank String group, @ApiIgnore @RequestAttribute AccountVO user) {
public void exitScript(@PathVariable @NotBlank String group, @RequestAttribute AccountVO user) {
this.groupSimulationService.exitScript(group, user);
}
@ApiOperation(value = "获取所有仿真成员列表")
/**
*获取所有仿真成员列表
*/
@GetMapping(path = "/{group}/members")
public List<SimulationMemberVO> getSimulationMembers(@PathVariable @NotBlank String group) {
return this.groupSimulationService.getSimulationMembers(group);
}
@ApiOperation(value = "仿真暂停")
/**
*仿真暂停
*/
@PutMapping(path = "/{group}/pause")
public void pause(@PathVariable String group) {
groupSimulationService.pauseSimulation(group);
}
@ApiOperation(value = "仿真恢复运行")
/**
*仿真恢复运行
*/
@PutMapping(path = "/{group}/resume")
public void resume(@PathVariable String group) {
groupSimulationService.resumeSimulation(group);
}
@ApiOperation(value = "获取仿真设备故障列表")
/**
*获取仿真设备故障列表
*/
@GetMapping(path = "/{group}/deviceFaultInfos")
public List<DeviceFaultInfo> getSimulationDeviceFaultInfoList(
@PathVariable @NotBlank String group) {
return this.groupSimulationService.getSimulationDeviceFaultInfoList(group);
}
@ApiOperation(value = "取消自动故障")
/**
*取消自动故障
*/
@PutMapping(path = "/{group}/faultMode/{id}")
public void setFaultMode(@PathVariable @NotBlank String group, @PathVariable(required = false) Integer id) {
if (Objects.isNull(id)) {
@ -256,43 +310,57 @@ public class SimulationV1Controller {
this.groupSimulationService.cancelAutoFault(group, id);
}
@ApiOperation(value = "设置自动故障")
/**
*设置自动故障
*/
@PostMapping(path = "/{group}/faultMode")
public Integer setFaultMode(@PathVariable @NotBlank String group, @RequestBody FaultRuleVO ruleVO) {
return this.groupSimulationService.setFaultMode(group, ruleVO);
}
@ApiOperation(value = "查询已设置所有的自动触发故障")
/**
*查询已设置所有的自动触发故障
*/
@GetMapping(path = "/{group}/faultMode/faultRule")
public Set<FaultRuleVO> getNotTriggerAutoFault(@PathVariable @NotBlank String group) {
return this.groupSimulationService.getTriggerAutoFaults(group);
}
@ApiOperation(value = "查询所有目的地码")
/**
*查询所有目的地码
*/
@GetMapping("/{group}/destinationCode/list")
public List<DestinationCodeVO> getAllDestinationCode(@PathVariable String group) {
return this.groupSimulationService.getAllDestinationCode(group);
}
@ApiOperation("获取IBP盘状态")
/**
*获取IBP盘状态
*/
@GetMapping("/{group}/{stationCode}/ibp/status")
public IbpStatus getIbpStatus(@PathVariable String group, @PathVariable String stationCode) {
return iVirtualRealityIBPService.getIbpStatus(group, stationCode);
}
@ApiOperation("按下IBP盘按钮")
/**
*按下IBP盘按钮
*/
@PutMapping("/{group}/ibp/press/{stationCode}/{buttonCode}")
public void pressIbpButton(@PathVariable String group, @PathVariable String stationCode, @PathVariable String buttonCode) {
iVirtualRealityIBPService.pressTheButton(group, stationCode, buttonCode);
}
@ApiOperation("松开IBP盘按钮")
/**
*松开IBP盘按钮
*/
@PutMapping("/{group}/ibp/release/{stationCode}/{buttonCode}")
public void releaseIbpButton(@PathVariable String group, @PathVariable String stationCode, @PathVariable String buttonCode) {
iVirtualRealityIBPService.releaseIbpButton(group, stationCode, buttonCode);
}
@ApiOperation("查询报警列表")
/**
*查询报警列表
*/
@GetMapping(path = "/{group}/alarm")
public List<AtsAlarm> listAlarm(@PathVariable String group, String level,
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime startTime,
@ -300,51 +368,67 @@ public class SimulationV1Controller {
return groupSimulationService.listAlarm(group, level, startTime, endTime);
}
@ApiOperation("仿真报警确认")
/**
*仿真报警确认
*/
@PutMapping(path = "/{group}/alarm/confirm")
public void AlarmConfirm(@PathVariable String group, @RequestBody List<String> codes, @ApiIgnore @RequestAttribute AccountVO user) {
public void AlarmConfirm(@PathVariable String group, @RequestBody List<String> codes, @RequestAttribute AccountVO user) {
groupSimulationService.alarmConfirm(group, codes, user);
}
@ApiOperation("仿真客流数据切换")
/**
*仿真客流数据切换
*/
@PutMapping(path = "/{group}/passengerFlow/{passengerFlowId}")
public void AlarmConfirm(@PathVariable String group, @PathVariable Long passengerFlowId) {
groupSimulationService.changePassengerFlow(group, passengerFlowId);
}
@ApiOperation("获取仿真日志")
/**
*获取仿真日志
*/
@GetMapping("/{group}/log")
public PageVO<SimulationLog> getLog(@PathVariable String group, SimulationLogPagedQueryVO queryVO) {
return groupSimulationService.getLog(group, queryVO);
}
/* ----------------------- 泰雷兹操作辅助接口 ----------------------- */
@ApiOperation("查询进路路径")
/**
*查询进路路径
*/
@GetMapping("/{group}/querySectionPaths")
public List<List<String>> querySectionPaths(@PathVariable String group, String groupNumber, String standCode, String signalCode) {
return simulationSupportService.queryRoutePaths(group, groupNumber, standCode, signalCode);
}
@ApiOperation("查询列车或运行线经过的站台")
/**
*查询列车或运行线经过的站台
*/
@GetMapping("/{group}/queryStands/trainOrDestination")
public List<String> queryStandsThatTrainGoingThrough(@PathVariable String group, String groupNumber, String destinationCode) {
return simulationSupportService.queryStandsThatTrainGoingThrough(group, groupNumber, destinationCode);
}
@ApiOperation("查询为该列车已建立的进路")
/**
*查询为该列车已建立的进路
*/
@GetMapping("/{group}/queryEstablishedRoutes/{groupNumber}")
public List<String> queryEstablishedRoutes(@PathVariable String group, @PathVariable String groupNumber) {
return simulationSupportService.queryEstablishedRoutes(group, groupNumber);
}
/* ----------------------- PSL盘接口 ----------------------- */
@ApiOperation("获取PSL盘状态")
/**
*获取PSL盘状态
*/
@GetMapping("/{group}/{standCode}/psl/status")
public PslStatus getPslStatus(@PathVariable String group, @PathVariable String standCode) {
return iVirtualRealityPslService.getStatus(group, standCode);
}
@ApiOperation("按下IBP盘按钮")
/**
*按下IBP盘按钮
*/
@PutMapping("/{group}/{standCode}/psl/{button}")
public void pressPslButton(@PathVariable String group, @PathVariable String standCode, @PathVariable VirtualRealityPsl.Button button) {
iVirtualRealityPslService.pressTheButton(group, standCode, button);

View File

@ -5,7 +5,6 @@ import club.joylink.rtss.simulation.rt.RtSimulationService;
import club.joylink.rtss.simulation.rt.vo.RtSimulationInfoVO;
import club.joylink.rtss.vo.LoginUserInfoVO;
import club.joylink.rtss.vo.map.MapVO;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -21,19 +20,30 @@ public class RtSimulationController {
return rtSimulationService.create(loginInfo.getAccountVO(), mapId, prdTypeEnum).getId();
}
@ApiOperation(value = "根据仿真group获取仿真基础信息")
/**
* 根据仿真group获取仿真基础信息
* @param id
* @return
*/
@GetMapping("/{id}")
public RtSimulationInfoVO getSimulationBasicInfo(@PathVariable String id) {
return rtSimulationService.getBasicInfo(id);
}
@ApiOperation(value = "根据仿真group获取仿真地图数据")
/**
* 根据仿真group获取仿真地图数据
* @param id
* @return
*/
@GetMapping("/{id}/mapData")
public MapVO getSimulationMapData(@PathVariable String id) {
return rtSimulationService.getMapData(id);
}
@ApiOperation(value = "退出计划")
/**
* 退出计划
* @param id
*/
@PostMapping("/{id}/planOver")
public void planOver(@PathVariable String id) {
this.rtSimulationService.init(id);

View File

@ -5,8 +5,6 @@ import club.joylink.rtss.vo.statistics.DailyLiveQuantityVO;
import club.joylink.rtss.vo.statistics.DailyLiveStatisticsQueryVO;
import club.joylink.rtss.vo.statistics.DailyLiveUserQuantityQueryVO;
import club.joylink.rtss.vo.statistics.UserQuantityQueryVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
@ -14,7 +12,9 @@ import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@Api(tags = {"信息统计接口"})
/**
*信息统计接口
*/
@RestController
@RequestMapping(path = "/api/statistics")
public class StatisticsController {
@ -22,25 +22,33 @@ public class StatisticsController {
@Autowired
private StatisticsService statisticsService;
@ApiOperation("获取注册用户总数量")
/**
*获取注册用户总数量
*/
@GetMapping("/userQuantity")
public Long getUserQuantity(UserQuantityQueryVO queryVO) {
return this.statisticsService.getUserQuantity(queryVO);
}
@ApiOperation("获取指定日期日活用户数量")
/**
*获取指定日期日活用户数量
*/
@GetMapping("/dailyLiveUserQuantity")
public Long getDailyLiveUserQuantity(DailyLiveUserQuantityQueryVO queryVO) {
return this.statisticsService.getDailyLiveUserQuantity(queryVO);
}
@ApiOperation("获取日用户总数统计列表")
/**
*获取日用户总数统计列表
*/
@GetMapping("/dailyRegisterStatistics")
public List<DailyLiveQuantityVO> getDailyUserQuantityStatistics(DailyLiveStatisticsQueryVO queryVO) {
return this.statisticsService.getDailyUserQuantityStatistics(queryVO);
}
@ApiOperation("获取日活用户统计列表")
/**
*获取日活用户统计列表
*/
@GetMapping("/dailyLiveStatistics")
public List<DailyLiveQuantityVO> getDailyLiveStatistics(DailyLiveStatisticsQueryVO queryVO) {
return this.statisticsService.getDailyLiveStatistics(queryVO);

View File

@ -10,11 +10,9 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;
import static club.joylink.rtss.constants.RoleEnum.SuperAdmin;
@ApiIgnore
@RestController
@RequestMapping("/api/test/modbus")
public class ModbusTestController {

View File

@ -17,18 +17,17 @@ import club.joylink.rtss.vo.client.training.TrainingStepVO;
import club.joylink.rtss.vo.client.validGroup.DraftTrainingCreateCheck;
import club.joylink.rtss.vo.client.validGroup.DraftTrainingStepCheck;
import club.joylink.rtss.vo.client.validGroup.GenerateConfigDeleteCheck;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.validation.constraints.NotBlank;
import java.util.Map;
import java.util.Set;
@Api(tags = { "实训数据管理接口" })
/**
*实训数据管理接口
*/
@RestController
@RequestMapping("/api/v1/training")
public class TrainingV1Controller {
@ -43,68 +42,82 @@ public class TrainingV1Controller {
this.generateTask = generateTask;
}
@ApiOperation(value = "创建实训基本信息")
/**
*创建实训基本信息
*/
@PostMapping(path = "")
public String createTraining(
@RequestBody @Validated(value = { DraftTrainingCreateCheck.class }) TrainingNewVO trainingVo,
@ApiIgnore @RequestAttribute AccountVO user) {
@RequestAttribute AccountVO user) {
return this.iTrainingService.createTraining(trainingVo, user);
}
@ApiOperation(value = "获取实训基本信息")
/**
*获取实训基本信息
*/
@GetMapping(path="/{id}")
public TrainingNewVO getTraining(@PathVariable Long id) {
return this.iTrainingService.getTrainingById(id);
}
@ApiOperation(value = "更新实训基本信息")
/**
*更新实训基本信息
*/
@PutMapping(path = "/{id}")
public void updateTraining(@PathVariable Long id,
@RequestBody @Validated(value = { DraftTrainingCreateCheck.class }) TrainingNewVO trainingVo,
@ApiIgnore @RequestAttribute AccountVO user) {
@RequestAttribute AccountVO user) {
this.iTrainingService.updateTraining(id, trainingVo, user);
}
@ApiOperation(value = "获取实训明细")
/**
*获取实训明细
*/
@GetMapping(path = "/{id}/detail")
public TrainingNewVO getTrainingDetail(@PathVariable Long id, String group) {
return this.iTrainingService.getTrainingDetail(id, group);
}
@ApiOperation(value = "保存实训明细")
/**
*保存实训明细
*/
@PostMapping(path = "/{id}/detailSave")
public void saveTrainingDetail(@PathVariable Long id, String group) {
this.iTrainingService.saveTrainingDetail(id, group);
}
@ApiOperation(value = "保存实训步骤")
/**
*保存实训步骤
*/
@PostMapping(path = "/{id}/stepsSave")
public void saveTrainingSteps(@PathVariable Long id, String group,
@RequestBody @Validated(value = { DraftTrainingStepCheck.class }) TrainingNewVO trainingVo) {
this.iTrainingService.saveTrainingSteps(id, group, trainingVo);
}
@ApiOperation(value="实训开始")
/**
*实训开始
*/
@GetMapping(path="/{id}/start")
public void trainingStart(@PathVariable Long id, String group, String mode) {
this.iTrainingService.trainingStart(id, group, mode);
}
/**
* 实训操作下一步
* @param step 步骤
*实训操作下一步
*/
@ApiOperation(value="实训操作下一步")
@PostMapping(path="/{id}/nextStep")
public void nextStep(@PathVariable Long id, String group, @RequestBody TrainingStepVO step) {
this.iTrainingService.nextStep(id, group, step);
}
@ApiOperation(value="实训结束")
/**
*实训结束
*/
@GetMapping(path="/{lessonId}/{id}/end")
public TrainingResultVO trainingEnd(@PathVariable Long lessonId, @PathVariable Long id, String group,
@NotBlank String mode, @NotBlank String usedTime,
@ApiIgnore @RequestAttribute AccountVO user) {
@RequestAttribute AccountVO user) {
return this.iTrainingService.trainingEnd(lessonId, id, group, mode, usedTime, user);
}
@ -120,7 +133,9 @@ public class TrainingV1Controller {
// iTrainingService.delTraining(trainingId, user);
// }
@ApiOperation(value = "分页查询实训")
/**
*分页查询实训
*/
@GetMapping(path = "/pagedQuery")
public PageVO<TrainingNewVO> pagedListGenerateTraining(TrainingQueryVO queryVO) {
return this.iTrainingService.pagedQueryTrainings(queryVO);
@ -132,7 +147,9 @@ public class TrainingV1Controller {
// this.generateTask.execute(config);
// }
@ApiOperation(value = "一键生成地图实训生成中返回true")
/**
*一键生成地图实训生成中返回true
*/
@PostMapping(path = "/generate/{mapId}")
public boolean generateTrainings(@PathVariable Long mapId,boolean noCheck) {
Set<Long> runningMapIds = this.generateTask.getRunningmapIds();
@ -150,54 +167,70 @@ public class TrainingV1Controller {
}
@ApiOperation(value = "删除自动生成实训")
/**
*删除自动生成实训
*/
@DeleteMapping(path = "/generate")
public void deleteGenerateTraining(@Validated(GenerateConfigDeleteCheck.class) GenerateConfig config) {
this.generateTask.delete(config);
}
@ApiOperation(value = "按操作类型批量更新自动生成实训的用时/说明")
/**
*按操作类型批量更新自动生成实训的用时/说明
*/
@PutMapping(path = "/batchUpdateGenerate")
public void batchUpdateGenerateTraining(@RequestBody GenerateConfig config) {
this.generateTask.batchUpdateGenerateTraining(config);
}
@ApiOperation(value = "分页查询用户实训数据")
/**
*分页查询用户实训数据
*/
@GetMapping(path = "/list")
public PageVO<UserTrainingListVO> queryPagedUserTraining(UserTrainingQueryVO queryVO) {
return this.iTrainingService.queryPagedUserTraining(queryVO);
}
@ApiOperation(value = "添加用户实训数据")
/**
*添加用户实训数据
*/
@PostMapping(path = "/userTraining")
public void updateUserTraining(@RequestBody @Validated UserTrainingVO userTrainingVO,
@ApiIgnore @RequestAttribute AccountVO user) {
@RequestAttribute AccountVO user) {
this.iTrainingService.addUserTraining(userTrainingVO, user);
}
@ApiOperation(value = "更新用户实训数据")
/**
*更新用户实训数据
*/
@PutMapping(path = "/userTraining/{id}")
@Role({RoleEnum.SuperAdmin,RoleEnum.Admin})
public void updateUserTraining(@PathVariable Long id,
@RequestBody UserTrainingVO userTrainingVO,
@ApiIgnore @RequestAttribute AccountVO user) {
@RequestAttribute AccountVO user) {
this.iTrainingService.updateUserTraining(id, userTrainingVO, user);
}
@ApiOperation(value = "删除用户实训数据")
/**
*删除用户实训数据
*/
@DeleteMapping(path = "/userTraining/{id}")
@Role({RoleEnum.SuperAdmin,RoleEnum.Admin})
public void deleteUserTraining(@PathVariable Long id, @ApiIgnore @RequestAttribute AccountVO user) {
public void deleteUserTraining(@PathVariable Long id, @RequestAttribute AccountVO user) {
this.iTrainingService.deleteUserTraining(id, user);
}
@ApiOperation("加载实训到仿真中")
/**
*加载实训到仿真中
*/
@PutMapping("/{group}/{id}/loadTraining")
public TrainingNewVO loadTraining(@PathVariable String group, @PathVariable Long id) {
return iTrainingService.loadTraining(group, id);
}
@ApiOperation("查询实训、操作类型及数量")
/**
*查询实训操作类型及数量
*/
@GetMapping("/trainingTypeAndQuantity")
public Map<String, Map<String, Long>> queryTrainingTypeAndQuantity(Long mapId, String prdType) {
return iTrainingService.queryTrainingTypeAndQuantity(mapId, prdType);

View File

@ -14,17 +14,16 @@ import club.joylink.rtss.vo.client.user.WeChatBindStatusVO;
import club.joylink.rtss.vo.user.AccountCreateVO;
import club.joylink.rtss.vo.user.CreateAccountCheck;
import club.joylink.rtss.vo.user.UserGenerateConfigVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.validation.constraints.NotBlank;
import java.util.List;
@Api(tags = { "用户配置接口" })
/**
* 用户配置接口
*/
@RestController
@RequestMapping("/api/user")
public class UserController {
@ -38,39 +37,47 @@ public class UserController {
@Autowired
private IDepartUserStatisticService iDepartUserStatisticService;
/**
*生成线下环境用户
*/
@Role({RoleEnum.SuperAdmin})
@ApiOperation(value = "生成线下环境用户")
@PostMapping(path = "/generate/offline")
public void generateOfflineUsers(@RequestBody @Validated UserGenerateConfigVO generateConfigVO,
@RequestAttribute @ApiIgnore AccountVO user) {
@RequestAttribute AccountVO user) {
this.userGenerateService.generateOfflineUser(generateConfigVO, user);
}
@Role({RoleEnum.SuperAdmin, RoleEnum.Admin})
@PostMapping(path = "")
public void createAccount(@RequestBody @Validated(CreateAccountCheck.class) AccountCreateVO accountCreateVO,
@RequestAttribute @ApiIgnore AccountVO user) {
@RequestAttribute AccountVO user) {
this.iSysUserService.createAccount(accountCreateVO, user);
}
/**
*分页获取用户数据
*/
@Role({RoleEnum.Admin, RoleEnum.SuperAdmin})
@ApiOperation(value = "分页获取用户数据")
@GetMapping(path = "")
public PageVO<AccountVO> queryPagedUser(UserQueryVO queryVO) {
return this.iSysUserService.queryPagedUser(queryVO);
}
/**
*修改用户角色
*/
@Role(RoleEnum.SuperAdmin)
@ApiOperation(value = "修改用户角色")
@PutMapping(path = "/{id}/role")
public void updateUserRole(@PathVariable Long id, @RequestBody AccountVO accountVO, @RequestAttribute @ApiIgnore AccountVO user) {
public void updateUserRole(@PathVariable Long id, @RequestBody AccountVO accountVO, @RequestAttribute AccountVO user) {
this.iSysUserService.updateUserRole(id, user.getId(), accountVO);
}
/**
*超管修改用户信息
*/
@Role(RoleEnum.SuperAdmin)
@ApiOperation("超管修改用户信息")
@PutMapping("/superAdmin/update/userInfo")
public void superAdminUpdateUserInfo(@RequestBody AccountVO updateUser, @RequestAttribute @ApiIgnore AccountVO user) {
public void superAdminUpdateUserInfo(@RequestBody AccountVO updateUser, @RequestAttribute AccountVO user) {
iSysUserService.superAdminUpdateUserInfo(updateUser, user);
}
@ -80,50 +87,66 @@ public class UserController {
this.iSysUserService.logicDelete(id);
}
@ApiOperation(value = "修改用户密码")
/**
* 修改用户密码
*/
@PutMapping(path = "/{id}/password")
public void updateUserPassword(@PathVariable Long id, @RequestBody AccountVO accountVO, @RequestAttribute @ApiIgnore AccountVO user) {
public void updateUserPassword(@PathVariable Long id, @RequestBody AccountVO accountVO, @RequestAttribute AccountVO user) {
this.iSysUserService.updateUserPassword(id, accountVO.getPassword());
}
@ApiOperation(value = "获取微信小程序绑定二维码")
/**
* 获取微信小程序绑定二维码
*/
@GetMapping(path = "/bind/wm/url")
public WeChatBindStatusVO getWeChatBindUrl(@RequestAttribute @ApiIgnore AccountVO user) {
public WeChatBindStatusVO getWeChatBindUrl(@RequestAttribute AccountVO user) {
return this.iSysUserService.getWeChatBindUrl(user);
}
@ApiOperation(value = "用户绑定微信小程序")
/**
* 用户绑定微信小程序
*/
@PutMapping(path = "/bind/wm")
public void userBindWm(String code, Long userId) {
this.iSysUserService.userBindWm(code, userId);
}
@ApiOperation(value = "获取用户总数量")
/**
* 获取用户总数量
*/
@GetMapping(path = "/amount")
public int getUserAmount() {
return iSysUserService.getUserAmount();
}
@ApiOperation(value = "分页获取用户数据(模糊查询)")
/**
* 分页获取用户数据模糊查询
*/
@GetMapping(path = "/fuzzy")
public List<AccountVO> fuzzyQueryPagedUser(@NotBlank(message = "参数不能为空") String fuzzyParam) {
return this.iSysUserService.fuzzyQueryPagedUser(fuzzyParam);
}
@ApiOperation(value="导出部门学生信息及成绩接口")
@PutMapping(path="/scores")
public List<ExportStudentInfo> getStudentSores( @Validated @RequestBody StudentInfoExportParam infoExportParam){
/**
* 导出部门学生信息及成绩接口
*/
@PutMapping(path = "/scores")
public List<ExportStudentInfo> getStudentSores(@Validated @RequestBody StudentInfoExportParam infoExportParam) {
return this.iDepartUserStatisticService.studentInfoStatistics(infoExportParam);
}
@ApiOperation("查询销售人员")
/**
* 查询销售人员
*/
@GetMapping("/seller")
public List<AccountVO> querySellers(){
public List<AccountVO> querySellers() {
return iSysUserService.querySellers();
}
/**
*查询管理和超管
*/
@Role({RoleEnum.Admin, RoleEnum.SuperAdmin})
@ApiOperation("查询管理和超管")
@GetMapping("/adminAndSuperAdmin")
public List<AccountVO> queryAdminsAndSuperAdmins() {
return iSysUserService.queryAdminsAndSuperAdmins();

View File

@ -5,14 +5,13 @@ import club.joylink.rtss.controller.advice.Role;
import club.joylink.rtss.services.IUserExamService;
import club.joylink.rtss.vo.AccountVO;
import club.joylink.rtss.vo.client.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
@Api(tags = { "用户考试接口" })
/**
*用户考试接口
*/
@RestController
@RequestMapping("/api/userExam")
public class UserExamController {
@ -20,58 +19,76 @@ public class UserExamController {
@Autowired
private IUserExamService iUserExamService;
@ApiOperation(value = "生成用户考试实例")
/**
*生成用户考试实例
*/
@GetMapping(path = "/{examId}/generate")
public UserExamVO generateExamInstance(@PathVariable long examId, @ApiIgnore @RequestAttribute AccountVO user) {
public UserExamVO generateExamInstance(@PathVariable long examId, @RequestAttribute AccountVO user) {
return this.iUserExamService.generateExamInstance(examId, user);
}
@ApiOperation(value = "获取用户考试实例")
/**
*获取用户考试实例
*/
@GetMapping(path = "/{id}")
public UserExamVO getExamInstance(@PathVariable long id, @ApiIgnore @RequestAttribute AccountVO user) {
public UserExamVO getExamInstance(@PathVariable long id, @RequestAttribute AccountVO user) {
return this.iUserExamService.getExamInstance(id, user);
}
@ApiOperation(value = "完成考试题目")
/**
*完成考试题目
*/
@PutMapping(path = "/finish")
public void finish(@RequestBody @Validated UserExamQuestionsVO userExamQuestionsVO,
@ApiIgnore @RequestAttribute AccountVO user) {
@RequestAttribute AccountVO user) {
this.iUserExamService.finish(userExamQuestionsVO, user);
}
@ApiOperation(value = "提交考试")
/**
*提交考试
*/
@PutMapping(path = "/{id}/submit")
public UserExamVO submit(@PathVariable long id, @ApiIgnore @RequestAttribute AccountVO user) {
public UserExamVO submit(@PathVariable long id, @RequestAttribute AccountVO user) {
return this.iUserExamService.submit(id, user);
}
@ApiOperation(value = "放弃考试")
/**
*放弃考试
*/
@PutMapping(path = "/{id}/abandon")
public void abandon(@PathVariable long id, @ApiIgnore @RequestAttribute AccountVO user) {
public void abandon(@PathVariable long id, @RequestAttribute AccountVO user) {
this.iUserExamService.abandon(id, user);
}
@ApiOperation(value = "分页查询用户考试数据")
/**
*分页查询用户考试数据
*/
@GetMapping(path = "/list")
public PageVO<UserExamListVO> queryPagedUserExam(UserExamQueryVO queryVO) {
return this.iUserExamService.queryPagedUserExam(queryVO);
}
@ApiOperation(value = "修改用户考试数据")
/**
*修改用户考试数据
*/
@PutMapping(path = "/{id}")
@Role({RoleEnum.SuperAdmin, RoleEnum.Admin})
public void updateUserExam(@PathVariable Long id, @RequestBody UserExamVO userExamVO, @ApiIgnore @RequestAttribute AccountVO user) {
public void updateUserExam(@PathVariable Long id, @RequestBody UserExamVO userExamVO, @RequestAttribute AccountVO user) {
this.iUserExamService.updateUserExam(id, userExamVO, user);
}
@ApiOperation(value = "删除用户考试数据")
/**
*删除用户考试数据
*/
@DeleteMapping(path = "/{id}")
@Role({RoleEnum.SuperAdmin, RoleEnum.Admin})
public void queryPagedUserExam(@PathVariable Long id, @ApiIgnore @RequestAttribute AccountVO user) {
public void queryPagedUserExam(@PathVariable Long id, @RequestAttribute AccountVO user) {
this.iUserExamService.deleteUserExam(id, user);
}
@ApiOperation("查询组织成员的考试成绩")
/**
*查询组织成员的考试成绩
*/
@GetMapping("/paged/orgUser/{orgId}/{examId}")
public PageVO<UserExamVO> pagedQueryOrgUserExamResult(@PathVariable Long orgId, @PathVariable Long examId, PageQueryVO queryVO) {
return this.iUserExamService.pagedQueryOrgUserExamResult(orgId, examId, queryVO);

View File

@ -8,15 +8,15 @@ import club.joylink.rtss.vo.client.user.UpdateMobileVO;
import club.joylink.rtss.vo.client.user.UpdatePasswordVO;
import club.joylink.rtss.vo.user.AccountCreateVO;
import club.joylink.rtss.vo.user.UserRegisterCheck;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@Api(tags = { "用户信息接口" })
/**
*用户信息接口
*/
@RestController
@RequestMapping("/api/userinfo")
public class UserInfoController {
@ -29,80 +29,106 @@ public class UserInfoController {
this.iSysUserService.register(accountCreateVO);
}
@ApiOperation(value = "根据姓名或电话号查询用户")
/**
*根据姓名或电话号查询用户
*/
@GetMapping(path="/nameOrMobile")
public List<AccountVO> queryUserByNameOrMobile(String query) {
List<AccountVO> list = this.iSysUserService.queryUserByNameOrMobile(query);
return list;
}
@ApiOperation(value = "根据用户id获取用户信息")
/**
*根据用户id获取用户信息
*/
@GetMapping(path = "/{id}")
public AccountVO getUserBaseInfoById(@PathVariable Long id) {
return this.iSysUserService.getUserBaseInfoById(id);
}
@ApiOperation(value = "修改用户信息")
/**
*修改用户信息
*/
@PutMapping(path = "/{id}")
public void modify(@PathVariable Long id, @RequestBody AccountVO userInfo, String vdcode) {
this.iSysUserService.modify(id, userInfo, vdcode);
}
@ApiOperation(value = "微信关注事件")
/**
*微信关注事件
*/
@GetMapping(path = "/wxsubscribe")
public void wxSubscribe(@RequestParam String wxId) {
iSysUserService.wxSubscribeEventHandle(wxId);
}
@ApiOperation(value = "批量修改用户的openId为unionId")
/**
*批量修改用户的openId为unionId
*/
@PutMapping(path = "/batchchange/unionid")
public void batchChangeOpenId2UnionId() {
this.iSysUserService.batchChangeOpenId2UnionId();
}
@ApiOperation(value = "更新用户真实姓名")
/**
*更新用户真实姓名
*/
@PutMapping(path = "/{id}/name")
public void updateName(@PathVariable Long id, String name) {
this.iSysUserService.updateUserName(id, name);
}
@ApiOperation(value = "更新用户昵称")
/**
*更新用户昵称
*/
@PutMapping(path = "/{id}/nickname")
public void updateNickname(@PathVariable Long id, String nickname) {
this.iSysUserService.updateNickname(id, nickname);
}
@ApiOperation(value = "用户上传头像")
/**
*用户上传头像
*/
@PostMapping(path = "/{id}/avatar")
public void uploadAvatar(@PathVariable Long id, @RequestBody AccountVO accountVO) {
this.iSysUserService.updateAvatar(id, accountVO.getAvatarPath());
}
@ApiOperation(value = "发送手机验证码")
/**
*发送手机验证码
*/
@PostMapping(path = "/mobile/code")
public String sendMobileValidCode(@RequestBody MobileInfoVO mobileInfoVO) {
return this.iSysUserService.sendMobileValidCode(mobileInfoVO);
}
@ApiOperation(value = "发送邮箱验证码")
/**
*发送邮箱验证码
*/
@PostMapping(path = "/email/code")
public String sendEmailValidCode(String email) {
return this.iSysUserService.sendEmailValidCode(email);
}
@ApiOperation(value = "更新用户手机号")
/**
*更新用户手机号
*/
@PutMapping(path = "/{id}/mobile")
public void updateMobile(@PathVariable Long id, @RequestBody @Validated UpdateMobileVO updateMobileVO) {
this.iSysUserService.updateMobile(id, updateMobileVO);
}
@ApiOperation(value = "更新用户邮箱")
/**
*更新用户邮箱
*/
@PutMapping(path = "/{id}/email")
public void updateEmail(@PathVariable Long id, @RequestBody @Validated UpdateEmailVO updateEmailVO) {
this.iSysUserService.updateEmail(id, updateEmailVO);
}
@ApiOperation(value = "更新用户登陆密码")
/**
*更新用户登陆密码
*/
@PutMapping(path = "/{id}/password")
public void updatePassword(@PathVariable Long id, @RequestBody @Validated UpdatePasswordVO updatePasswordVO) {
this.iSysUserService.updatePassword(id, updatePasswordVO);

View File

@ -9,16 +9,15 @@ import club.joylink.rtss.vo.client.permission.DistributeSelectVO;
import club.joylink.rtss.vo.client.permission.PermissionQueryVO;
import club.joylink.rtss.vo.client.permission.UserPermissionQueryVO;
import club.joylink.rtss.vo.client.userPermission.UserPermissionVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import java.util.List;
@Api(tags = { "用户权限管理" })
/**
*用户权限管理
*/
@RestController
@RequestMapping("/api/userPermission")
public class UserPermissionController {
@ -26,37 +25,49 @@ public class UserPermissionController {
@Autowired
private IUserPermissionService iUserPermissionService;
@ApiOperation(value = "分页获取用户权限数据")
/**
*分页获取用户权限数据
*/
@GetMapping(path="")
public PageVO<UserPermissionVO> queryPagedPermission(PermissionQueryVO queryVO,@RequestAttribute @ApiIgnore AccountVO user) {
public PageVO<UserPermissionVO> queryPagedPermission(PermissionQueryVO queryVO,@RequestAttribute AccountVO user) {
return this.iUserPermissionService.queryPagedPermission(queryVO);
}
@ApiOperation(value = "设置用户权限状态")
/**
*设置用户权限状态
*/
@PutMapping(path = "/{id}/status")
public void invalid(@PathVariable Long id) {
this.iUserPermissionService.setInvalid(id);
}
@ApiOperation(value = "获取用户可以分发的权限")
/**
*获取用户可以分发的权限
*/
@GetMapping(path="/getAvailableUserPermission")
public List<UserPermissionVO> findAvailablePermission(DistributeSelectVO distributeSelectVO, @RequestAttribute @ApiIgnore AccountVO user) {
public List<UserPermissionVO> findAvailablePermission(DistributeSelectVO distributeSelectVO, @RequestAttribute AccountVO user) {
return this.iUserPermissionService.queryUserPermissionVOListThatCanDistribute(distributeSelectVO,user);
}
@ApiOperation(value = "分页获取个人权限数据")
/**
*分页获取个人权限数据
*/
@GetMapping(path = "/my")
public PageVO<UserPermissionVO> queryMyPermission(PermissionQueryVO queryVO, @RequestAttribute @ApiIgnore AccountVO user) {
public PageVO<UserPermissionVO> queryMyPermission(PermissionQueryVO queryVO, @RequestAttribute AccountVO user) {
return this.iUserPermissionService.queryMyPermission(user, queryVO);
}
@ApiOperation(value = "设置用户权限所有者")
/**
*设置用户权限所有者
*/
@PutMapping(path = "/{id}/owner")
public void setPermissionOwner(@PathVariable Long id, @RequestBody AccountVO owner, @RequestAttribute @ApiIgnore AccountVO user) {
public void setPermissionOwner(@PathVariable Long id, @RequestBody AccountVO owner, @RequestAttribute AccountVO user) {
this.iUserPermissionService.setPermissionOwner(id, owner, user);
}
@ApiOperation(value = "用户数据统计")
/**
*用户数据统计
*/
@GetMapping(path = "/statistic")
public PageVO<UserPermissionVO> userPermissionStatistic(PermissionQueryVO queryVO) {
return iUserPermissionService.userPermissionStatistic(queryVO);
@ -69,39 +80,49 @@ public class UserPermissionController {
// }
@GetMapping(path = "/personal")
public List<UserPermissionVO> queryPersonalUserPermission(@RequestAttribute @ApiIgnore AccountVO user) {
public List<UserPermissionVO> queryPersonalUserPermission(@RequestAttribute AccountVO user) {
return iUserPermissionService.queryPersonalUserPermission(user);
}
@ApiOperation("根据地图一键领取权限")
/**
*根据地图一键领取权限
*/
@PostMapping("/{mapId}/getPermissions")
public void getPermissions4Map(@PathVariable Long mapId, Integer count ,@RequestAttribute @ApiIgnore AccountVO user) {
public void getPermissions4Map(@PathVariable Long mapId, Integer count ,@RequestAttribute AccountVO user) {
iUserPermissionService.getPermissions4Map(mapId, count, user);
}
/**
*将用户权限退回到权限分发中
*/
@Role({RoleEnum.Admin, RoleEnum.SuperAdmin})
@ApiOperation(value = "将用户权限退回到权限分发中")
@PutMapping(path = "/{id}/back")
public void return2Distribute(@PathVariable Long id) {
iUserPermissionService.return2Distribute(id);
}
/**
*将用户权限专用退回到用户权限中
*/
@Role({RoleEnum.Admin, RoleEnum.SuperAdmin})
@ApiOperation("将用户权限(专用)退回到用户权限中")
@PutMapping("/{id}/back/up")
public void return2UserPermission(@PathVariable Long id) {
iUserPermissionService.return2UserPermission(id);
}
/**
*查询从该用户权限流向的用户权限
*/
@Role({RoleEnum.Admin, RoleEnum.SuperAdmin})
@ApiOperation("查询从该用户权限流向的用户权限")
@GetMapping("/ups/fromThisUP")
public PageVO<UserPermissionVO> queryUPsFromThisUP(@Validated UserPermissionQueryVO queryVO) {
return iUserPermissionService.queryUPsFromThisUP(queryVO);
}
/**
*收回从该用户权限流出的所有权限权限分发及用户权限
*/
@Role({RoleEnum.Admin, RoleEnum.SuperAdmin})
@ApiOperation("收回从该用户权限流出的所有权限(权限分发及用户权限)")
@PutMapping("/{id}/takeBack/all")
public void takeBackAll(@PathVariable long id) {
iUserPermissionService.takeBack(id);

View File

@ -6,16 +6,15 @@ import club.joylink.rtss.services.IUserUsageStatsService;
import club.joylink.rtss.services.user.IUserSimulationStatService;
import club.joylink.rtss.vo.AccountVO;
import club.joylink.rtss.vo.client.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import java.util.List;
@Api(tags = { "用户使用数据统计接口" })
/**
*用户使用数据统计接口
*/
@RestController
@RequestMapping(path = "/api/stats")
public class UserUsageStatsController {
@ -26,105 +25,137 @@ public class UserUsageStatsController {
@Autowired
private IUserSimulationStatService iUserSimulationStatService;
@ApiOperation(value = "课程列表")
/**
*课程列表
*/
@GetMapping(path = "/lesson/list")
public List<UserRankStatsVO> queryLessonList(@RequestAttribute AccountVO user) {
return this.iUserUsageStatsService.queryLessonList(user);
}
@ApiOperation(value = "课程统计排名")
/**
*课程统计排名
*/
@GetMapping(path = "/lesson/{lessonId}/rank")
public List<UserRankStatsVO> lessonRank(@PathVariable Long lessonId, @RequestAttribute AccountVO user) {
return this.iUserUsageStatsService.lessonRank(lessonId, user);
}
@ApiOperation(value = "个人课程实训数据统计")
/**
*个人课程实训数据统计
*/
@GetMapping(path = "/lesson/{lessonId}/stats")
public List<UserRankStatsVO> lessonPersonalStats(@PathVariable Long lessonId, @RequestAttribute AccountVO user) {
return this.iUserUsageStatsService.personalLessonStats(lessonId, user);
}
@ApiOperation(value = "查询参与考试的课程列表")
/**
*查询参与考试的课程列表
*/
@GetMapping(path = "/exam/lessonList")
public List<UserRankStatsVO> queryExamLessonList(@ApiIgnore @RequestAttribute AccountVO user) {
public List<UserRankStatsVO> queryExamLessonList(@RequestAttribute AccountVO user) {
return this.iUserUsageStatsService.queryExamLessonList(user);
}
@ApiOperation(value = "查询参与考试的试题列表")
/**
*查询参与考试的试题列表
*/
@GetMapping(path = "/exam/{lessonId}/list")
public List<UserRankStatsVO> queryExamList(@PathVariable Long lessonId, @ApiIgnore @RequestAttribute AccountVO user) {
public List<UserRankStatsVO> queryExamList(@PathVariable Long lessonId, @RequestAttribute AccountVO user) {
return this.iUserUsageStatsService.queryExamList(lessonId, user);
}
@ApiOperation(value = "考试排名")
/**
*考试排名
*/
@GetMapping(path = "/exam/{examId}/rank")
public List<UserRankStatsVO> examRank(@PathVariable long examId, @ApiIgnore @RequestAttribute AccountVO user) {
public List<UserRankStatsVO> examRank(@PathVariable long examId, @RequestAttribute AccountVO user) {
return this.iUserUsageStatsService.examRank(examId, user);
}
@ApiOperation(value = "个人考试数据统计")
/**
*个人考试数据统计
*/
@GetMapping(path = "/exam/{examId}/stats")
public List<UserRankStatsVO> examPersonalStats(@PathVariable long examId, @ApiIgnore @RequestAttribute AccountVO user) {
public List<UserRankStatsVO> examPersonalStats(@PathVariable long examId, @RequestAttribute AccountVO user) {
return this.iUserUsageStatsService.examPersonalStats(examId, user);
}
@ApiOperation(value = "查询参与仿真的地图列表")
/**
*查询参与仿真的地图列表
*/
@GetMapping(path = "/simulation/mapList")
public List<UserRankStatsVO> querySimulationMapList(@ApiIgnore @RequestAttribute AccountVO user) {
public List<UserRankStatsVO> querySimulationMapList(@RequestAttribute AccountVO user) {
return iUserSimulationStatService.querySimulationMapList(user);
}
@ApiOperation(value = "查询参与仿真的产品列表")
/**
*查询参与仿真的产品列表
*/
@GetMapping(path = "/simulation/{mapId}/prdList")
public List<UserRankStatsVO> querySimulationPrdList(@PathVariable Long mapId, @ApiIgnore @RequestAttribute AccountVO user) {
public List<UserRankStatsVO> querySimulationPrdList(@PathVariable Long mapId, @RequestAttribute AccountVO user) {
return iUserSimulationStatService.querySimulationPrdList(mapId, user);
}
@ApiOperation(value = "仿真时长排名")
/**
*仿真时长排名
*/
@GetMapping(path = "/simulation/{mapId}/{prdType}/rank")
public List<UserRankStatsVO> simulationRank(@PathVariable Long mapId, @PathVariable String prdType, @ApiIgnore @RequestAttribute AccountVO user) {
public List<UserRankStatsVO> simulationRank(@PathVariable Long mapId, @PathVariable String prdType, @RequestAttribute AccountVO user) {
return iUserSimulationStatService.simulationRank(mapId, prdType, user);
}
@ApiOperation(value = "个人仿真数据统计")
/**
*个人仿真数据统计
*/
@GetMapping(path = "/simulation/{mapId}/stats")
public List<UserRankStatsVO> simulationPersonalStats(@PathVariable Long mapId, @ApiIgnore @RequestAttribute AccountVO user) {
public List<UserRankStatsVO> simulationPersonalStats(@PathVariable Long mapId, @RequestAttribute AccountVO user) {
return iUserSimulationStatService.simulationPersonalStats(mapId, user);
}
@ApiOperation(value = "统计各系统总时长")
/**
*统计各系统总时长
*/
@GetMapping(path = "/total")
public List<UsageTotalStatsVO> totalSimulationDuration(boolean filter) {
return iUserUsageStatsService.totalDuration(filter);
}
@ApiOperation("分页查询用户仿真数据")
/**
*分页查询用户仿真数据
*/
@GetMapping("/simulation")
public PageVO<UserSimulationStatsListVO> queryPagedStats(UserSimulationStatsQueryVO queryVO) {
return iUserSimulationStatService.queryPagedStats(queryVO);
}
/**
*添加用户仿真数据
*/
@Role(value = {RoleEnum.SuperAdmin, RoleEnum.Admin})
@ApiOperation(value = "添加用户仿真数据")
@PostMapping(path = "/simulation")
public void addUserSimulationStats(@RequestBody @Validated UserSimulationStatsVO statsVO,
@ApiIgnore @RequestAttribute AccountVO user) {
@RequestAttribute AccountVO user) {
iUserSimulationStatService.addUserSimulationStats(statsVO, user);
}
/**
*更新用户仿真数据
*/
@Role(value = {RoleEnum.SuperAdmin, RoleEnum.Admin})
@ApiOperation(value = "更新用户仿真数据")
@PutMapping(path = "/{statsId}")
public void updateUserSimulationStats(@PathVariable Long statsId,
@RequestBody UserSimulationStatsVO statsVO,
@ApiIgnore @RequestAttribute AccountVO user) {
@RequestAttribute AccountVO user) {
iUserSimulationStatService.updateUserSimulationStats(statsId, statsVO, user);
}
/**
*删除用户仿真数据
*/
@Role(value = {RoleEnum.SuperAdmin, RoleEnum.Admin})
@ApiOperation(value = "删除用户仿真数据")
@DeleteMapping(path = "/{statsId}")
public void deleteUserSimulationStats(@PathVariable Long statsId, @ApiIgnore @RequestAttribute AccountVO user) {
public void deleteUserSimulationStats(@PathVariable Long statsId, @RequestAttribute AccountVO user) {
iUserSimulationStatService.deleteUserSimulationStats(statsId, user);
}

View File

@ -7,8 +7,6 @@ import club.joylink.rtss.vo.client.PageQueryVO;
import club.joylink.rtss.vo.client.PageVO;
import club.joylink.rtss.vo.client.VoiceRecognitionResult;
import club.joylink.rtss.vo.client.competition.VoiceErrorVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.GetMapping;
@ -17,7 +15,9 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
@Api("语音AI接口")
/**
* 语音AI接口
*/
@RestController
@RequestMapping("/api/voice")
public class VoiceController {
@ -33,13 +33,21 @@ public class VoiceController {
@Autowired
private IVoiceTrainingService iVoiceTrainingService;
@ApiOperation("语音识别")
/**
* 语音识别
* @param file
* @return
*/
@PostMapping("recognition")
public VoiceRecognitionResult voiceRecognition(MultipartFile file) {
return iVoiceTrainingService.voiceRecognition(file);
}
@ApiOperation("查询语音识别错误集")
/**
* 查询语音识别错误集
* @param queryVO
* @return
*/
@GetMapping("/errorSet/paged")
public PageVO<VoiceErrorVO> pagedQueryErrorSet(PageQueryVO queryVO) {
return iVoiceTrainingService.pagedQueryErrorSet(queryVO);

View File

@ -2,15 +2,15 @@ package club.joylink.rtss.controller.wechat;
import club.joylink.rtss.wechat.MiniProgramService;
import club.joylink.rtss.wechat.vo.WxError;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import java.io.IOException;
@Api(tags = {"微信小程序功能接口"})
/**
* 微信小程序功能接口
*/
@RestController
@RequestMapping(path = "/api/wechat/mp")
public class WeChatMpAbilityController {
@ -18,13 +18,22 @@ public class WeChatMpAbilityController {
@Autowired
private MiniProgramService miniProgramService;
@ApiOperation(value = "检查一段文本是否含有违法违规内容")
/**
* 检查一段文本是否含有违法违规内容
* @param content
* @return
*/
@PostMapping(path = "/msgSecCheck")
private WxError msgSecCheck(@RequestBody String content) {
return this.miniProgramService.msgSecCheck(content);
}
@ApiOperation(value = "检查图片是否含有违法违规内容")
/**
* 检查图片是否含有违法违规内容
* @param file
* @return
* @throws IOException
*/
@PostMapping(path = "/imgSecCheck")
private WxError imgSecCheck(@RequestPart MultipartFile file) throws IOException {
return this.miniProgramService.imgSecCheck(file);

View File

@ -0,0 +1,41 @@
package club.joylink.rtss.dao;
import club.joylink.rtss.entity.Model2d;
import club.joylink.rtss.entity.Model2dExample;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;
@Mapper
@Repository
public interface Model2dDAO {
long countByExample(Model2dExample example);
int deleteByExample(Model2dExample example);
int deleteByPrimaryKey(Long id);
int insert(Model2d record);
int insertSelective(Model2d record);
List<Model2d> selectByExampleWithBLOBs(Model2dExample example);
List<Model2d> selectByExample(Model2dExample example);
Model2d selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") Model2d record, @Param("example") Model2dExample example);
int updateByExampleWithBLOBs(@Param("record") Model2d record, @Param("example") Model2dExample example);
int updateByExample(@Param("record") Model2d record, @Param("example") Model2dExample example);
int updateByPrimaryKeySelective(Model2d record);
int updateByPrimaryKeyWithBLOBs(Model2d record);
int updateByPrimaryKey(Model2d record);
}

View File

@ -0,0 +1,41 @@
package club.joylink.rtss.dao;
import club.joylink.rtss.entity.Model2dDraft;
import club.joylink.rtss.entity.Model2dDraftExample;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;
@Mapper
@Repository
public interface Model2dDraftDAO {
long countByExample(Model2dDraftExample example);
int deleteByExample(Model2dDraftExample example);
int deleteByPrimaryKey(Long id);
int insert(Model2dDraft record);
int insertSelective(Model2dDraft record);
List<Model2dDraft> selectByExampleWithBLOBs(Model2dDraftExample example);
List<Model2dDraft> selectByExample(Model2dDraftExample example);
Model2dDraft selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") Model2dDraft record, @Param("example") Model2dDraftExample example);
int updateByExampleWithBLOBs(@Param("record") Model2dDraft record, @Param("example") Model2dDraftExample example);
int updateByExample(@Param("record") Model2dDraft record, @Param("example") Model2dDraftExample example);
int updateByPrimaryKeySelective(Model2dDraft record);
int updateByPrimaryKeyWithBLOBs(Model2dDraft record);
int updateByPrimaryKey(Model2dDraft record);
}

View File

@ -0,0 +1,45 @@
package club.joylink.rtss.entity;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* @author
*
*/
@Data
public class Model2d implements Serializable {
private Long id;
/**
* 编号唯一
*/
private String code;
/**
* 模型名称
*/
private String name;
/**
* 状态
*/
private String state;
private Long createUserId;
private LocalDateTime createTime;
private Long updateUserId;
private LocalDateTime updateTime;
/**
* 模型数据
*/
private String jsonData;
private static final long serialVersionUID = 1L;
}

View File

@ -0,0 +1,40 @@
package club.joylink.rtss.entity;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* @author
*
*/
@Data
public class Model2dDraft implements Serializable {
private Long id;
/**
* 编号
*/
private String code;
/**
* 模型名称
*/
private String name;
private Long createUserId;
private LocalDateTime createTime;
private Long updateUserId;
private LocalDateTime updateTime;
/**
* 模型数据
*/
private String jsonData;
private static final long serialVersionUID = 1L;
}

View File

@ -0,0 +1,663 @@
package club.joylink.rtss.entity;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
public class Model2dDraftExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
private Integer limit;
private Long offset;
public Model2dDraftExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
public void setLimit(Integer limit) {
this.limit = limit;
}
public Integer getLimit() {
return limit;
}
public void setOffset(Long offset) {
this.offset = offset;
}
public Long getOffset() {
return offset;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(Long value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Long value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(Long value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Long value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(Long value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Long value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<Long> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Long> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Long value1, Long value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Long value1, Long value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andCodeIsNull() {
addCriterion("code is null");
return (Criteria) this;
}
public Criteria andCodeIsNotNull() {
addCriterion("code is not null");
return (Criteria) this;
}
public Criteria andCodeEqualTo(String value) {
addCriterion("code =", value, "code");
return (Criteria) this;
}
public Criteria andCodeNotEqualTo(String value) {
addCriterion("code <>", value, "code");
return (Criteria) this;
}
public Criteria andCodeGreaterThan(String value) {
addCriterion("code >", value, "code");
return (Criteria) this;
}
public Criteria andCodeGreaterThanOrEqualTo(String value) {
addCriterion("code >=", value, "code");
return (Criteria) this;
}
public Criteria andCodeLessThan(String value) {
addCriterion("code <", value, "code");
return (Criteria) this;
}
public Criteria andCodeLessThanOrEqualTo(String value) {
addCriterion("code <=", value, "code");
return (Criteria) this;
}
public Criteria andCodeLike(String value) {
addCriterion("code like", value, "code");
return (Criteria) this;
}
public Criteria andCodeNotLike(String value) {
addCriterion("code not like", value, "code");
return (Criteria) this;
}
public Criteria andCodeIn(List<String> values) {
addCriterion("code in", values, "code");
return (Criteria) this;
}
public Criteria andCodeNotIn(List<String> values) {
addCriterion("code not in", values, "code");
return (Criteria) this;
}
public Criteria andCodeBetween(String value1, String value2) {
addCriterion("code between", value1, value2, "code");
return (Criteria) this;
}
public Criteria andCodeNotBetween(String value1, String value2) {
addCriterion("code not between", value1, value2, "code");
return (Criteria) this;
}
public Criteria andNameIsNull() {
addCriterion("`name` is null");
return (Criteria) this;
}
public Criteria andNameIsNotNull() {
addCriterion("`name` is not null");
return (Criteria) this;
}
public Criteria andNameEqualTo(String value) {
addCriterion("`name` =", value, "name");
return (Criteria) this;
}
public Criteria andNameNotEqualTo(String value) {
addCriterion("`name` <>", value, "name");
return (Criteria) this;
}
public Criteria andNameGreaterThan(String value) {
addCriterion("`name` >", value, "name");
return (Criteria) this;
}
public Criteria andNameGreaterThanOrEqualTo(String value) {
addCriterion("`name` >=", value, "name");
return (Criteria) this;
}
public Criteria andNameLessThan(String value) {
addCriterion("`name` <", value, "name");
return (Criteria) this;
}
public Criteria andNameLessThanOrEqualTo(String value) {
addCriterion("`name` <=", value, "name");
return (Criteria) this;
}
public Criteria andNameLike(String value) {
addCriterion("`name` like", value, "name");
return (Criteria) this;
}
public Criteria andNameNotLike(String value) {
addCriterion("`name` not like", value, "name");
return (Criteria) this;
}
public Criteria andNameIn(List<String> values) {
addCriterion("`name` in", values, "name");
return (Criteria) this;
}
public Criteria andNameNotIn(List<String> values) {
addCriterion("`name` not in", values, "name");
return (Criteria) this;
}
public Criteria andNameBetween(String value1, String value2) {
addCriterion("`name` between", value1, value2, "name");
return (Criteria) this;
}
public Criteria andNameNotBetween(String value1, String value2) {
addCriterion("`name` not between", value1, value2, "name");
return (Criteria) this;
}
public Criteria andCreateUserIdIsNull() {
addCriterion("create_user_id is null");
return (Criteria) this;
}
public Criteria andCreateUserIdIsNotNull() {
addCriterion("create_user_id is not null");
return (Criteria) this;
}
public Criteria andCreateUserIdEqualTo(Long value) {
addCriterion("create_user_id =", value, "createUserId");
return (Criteria) this;
}
public Criteria andCreateUserIdNotEqualTo(Long value) {
addCriterion("create_user_id <>", value, "createUserId");
return (Criteria) this;
}
public Criteria andCreateUserIdGreaterThan(Long value) {
addCriterion("create_user_id >", value, "createUserId");
return (Criteria) this;
}
public Criteria andCreateUserIdGreaterThanOrEqualTo(Long value) {
addCriterion("create_user_id >=", value, "createUserId");
return (Criteria) this;
}
public Criteria andCreateUserIdLessThan(Long value) {
addCriterion("create_user_id <", value, "createUserId");
return (Criteria) this;
}
public Criteria andCreateUserIdLessThanOrEqualTo(Long value) {
addCriterion("create_user_id <=", value, "createUserId");
return (Criteria) this;
}
public Criteria andCreateUserIdIn(List<Long> values) {
addCriterion("create_user_id in", values, "createUserId");
return (Criteria) this;
}
public Criteria andCreateUserIdNotIn(List<Long> values) {
addCriterion("create_user_id not in", values, "createUserId");
return (Criteria) this;
}
public Criteria andCreateUserIdBetween(Long value1, Long value2) {
addCriterion("create_user_id between", value1, value2, "createUserId");
return (Criteria) this;
}
public Criteria andCreateUserIdNotBetween(Long value1, Long value2) {
addCriterion("create_user_id not between", value1, value2, "createUserId");
return (Criteria) this;
}
public Criteria andCreateTimeIsNull() {
addCriterion("create_time is null");
return (Criteria) this;
}
public Criteria andCreateTimeIsNotNull() {
addCriterion("create_time is not null");
return (Criteria) this;
}
public Criteria andCreateTimeEqualTo(LocalDateTime value) {
addCriterion("create_time =", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotEqualTo(LocalDateTime value) {
addCriterion("create_time <>", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeGreaterThan(LocalDateTime value) {
addCriterion("create_time >", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeGreaterThanOrEqualTo(LocalDateTime value) {
addCriterion("create_time >=", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeLessThan(LocalDateTime value) {
addCriterion("create_time <", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeLessThanOrEqualTo(LocalDateTime value) {
addCriterion("create_time <=", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeIn(List<LocalDateTime> values) {
addCriterion("create_time in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotIn(List<LocalDateTime> values) {
addCriterion("create_time not in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeBetween(LocalDateTime value1, LocalDateTime value2) {
addCriterion("create_time between", value1, value2, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) {
addCriterion("create_time not between", value1, value2, "createTime");
return (Criteria) this;
}
public Criteria andUpdateUserIdIsNull() {
addCriterion("update_user_id is null");
return (Criteria) this;
}
public Criteria andUpdateUserIdIsNotNull() {
addCriterion("update_user_id is not null");
return (Criteria) this;
}
public Criteria andUpdateUserIdEqualTo(Long value) {
addCriterion("update_user_id =", value, "updateUserId");
return (Criteria) this;
}
public Criteria andUpdateUserIdNotEqualTo(Long value) {
addCriterion("update_user_id <>", value, "updateUserId");
return (Criteria) this;
}
public Criteria andUpdateUserIdGreaterThan(Long value) {
addCriterion("update_user_id >", value, "updateUserId");
return (Criteria) this;
}
public Criteria andUpdateUserIdGreaterThanOrEqualTo(Long value) {
addCriterion("update_user_id >=", value, "updateUserId");
return (Criteria) this;
}
public Criteria andUpdateUserIdLessThan(Long value) {
addCriterion("update_user_id <", value, "updateUserId");
return (Criteria) this;
}
public Criteria andUpdateUserIdLessThanOrEqualTo(Long value) {
addCriterion("update_user_id <=", value, "updateUserId");
return (Criteria) this;
}
public Criteria andUpdateUserIdIn(List<Long> values) {
addCriterion("update_user_id in", values, "updateUserId");
return (Criteria) this;
}
public Criteria andUpdateUserIdNotIn(List<Long> values) {
addCriterion("update_user_id not in", values, "updateUserId");
return (Criteria) this;
}
public Criteria andUpdateUserIdBetween(Long value1, Long value2) {
addCriterion("update_user_id between", value1, value2, "updateUserId");
return (Criteria) this;
}
public Criteria andUpdateUserIdNotBetween(Long value1, Long value2) {
addCriterion("update_user_id not between", value1, value2, "updateUserId");
return (Criteria) this;
}
public Criteria andUpdateTimeIsNull() {
addCriterion("update_time is null");
return (Criteria) this;
}
public Criteria andUpdateTimeIsNotNull() {
addCriterion("update_time is not null");
return (Criteria) this;
}
public Criteria andUpdateTimeEqualTo(LocalDateTime value) {
addCriterion("update_time =", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotEqualTo(LocalDateTime value) {
addCriterion("update_time <>", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeGreaterThan(LocalDateTime value) {
addCriterion("update_time >", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeGreaterThanOrEqualTo(LocalDateTime value) {
addCriterion("update_time >=", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeLessThan(LocalDateTime value) {
addCriterion("update_time <", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeLessThanOrEqualTo(LocalDateTime value) {
addCriterion("update_time <=", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeIn(List<LocalDateTime> values) {
addCriterion("update_time in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotIn(List<LocalDateTime> values) {
addCriterion("update_time not in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeBetween(LocalDateTime value1, LocalDateTime value2) {
addCriterion("update_time between", value1, value2, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) {
addCriterion("update_time not between", value1, value2, "updateTime");
return (Criteria) this;
}
}
/**
*/
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}

View File

@ -0,0 +1,733 @@
package club.joylink.rtss.entity;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
public class Model2dExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
private Integer limit;
private Long offset;
public Model2dExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
public void setLimit(Integer limit) {
this.limit = limit;
}
public Integer getLimit() {
return limit;
}
public void setOffset(Long offset) {
this.offset = offset;
}
public Long getOffset() {
return offset;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(Long value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Long value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(Long value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Long value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(Long value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Long value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<Long> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Long> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Long value1, Long value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Long value1, Long value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andCodeIsNull() {
addCriterion("code is null");
return (Criteria) this;
}
public Criteria andCodeIsNotNull() {
addCriterion("code is not null");
return (Criteria) this;
}
public Criteria andCodeEqualTo(String value) {
addCriterion("code =", value, "code");
return (Criteria) this;
}
public Criteria andCodeNotEqualTo(String value) {
addCriterion("code <>", value, "code");
return (Criteria) this;
}
public Criteria andCodeGreaterThan(String value) {
addCriterion("code >", value, "code");
return (Criteria) this;
}
public Criteria andCodeGreaterThanOrEqualTo(String value) {
addCriterion("code >=", value, "code");
return (Criteria) this;
}
public Criteria andCodeLessThan(String value) {
addCriterion("code <", value, "code");
return (Criteria) this;
}
public Criteria andCodeLessThanOrEqualTo(String value) {
addCriterion("code <=", value, "code");
return (Criteria) this;
}
public Criteria andCodeLike(String value) {
addCriterion("code like", value, "code");
return (Criteria) this;
}
public Criteria andCodeNotLike(String value) {
addCriterion("code not like", value, "code");
return (Criteria) this;
}
public Criteria andCodeIn(List<String> values) {
addCriterion("code in", values, "code");
return (Criteria) this;
}
public Criteria andCodeNotIn(List<String> values) {
addCriterion("code not in", values, "code");
return (Criteria) this;
}
public Criteria andCodeBetween(String value1, String value2) {
addCriterion("code between", value1, value2, "code");
return (Criteria) this;
}
public Criteria andCodeNotBetween(String value1, String value2) {
addCriterion("code not between", value1, value2, "code");
return (Criteria) this;
}
public Criteria andNameIsNull() {
addCriterion("`name` is null");
return (Criteria) this;
}
public Criteria andNameIsNotNull() {
addCriterion("`name` is not null");
return (Criteria) this;
}
public Criteria andNameEqualTo(String value) {
addCriterion("`name` =", value, "name");
return (Criteria) this;
}
public Criteria andNameNotEqualTo(String value) {
addCriterion("`name` <>", value, "name");
return (Criteria) this;
}
public Criteria andNameGreaterThan(String value) {
addCriterion("`name` >", value, "name");
return (Criteria) this;
}
public Criteria andNameGreaterThanOrEqualTo(String value) {
addCriterion("`name` >=", value, "name");
return (Criteria) this;
}
public Criteria andNameLessThan(String value) {
addCriterion("`name` <", value, "name");
return (Criteria) this;
}
public Criteria andNameLessThanOrEqualTo(String value) {
addCriterion("`name` <=", value, "name");
return (Criteria) this;
}
public Criteria andNameLike(String value) {
addCriterion("`name` like", value, "name");
return (Criteria) this;
}
public Criteria andNameNotLike(String value) {
addCriterion("`name` not like", value, "name");
return (Criteria) this;
}
public Criteria andNameIn(List<String> values) {
addCriterion("`name` in", values, "name");
return (Criteria) this;
}
public Criteria andNameNotIn(List<String> values) {
addCriterion("`name` not in", values, "name");
return (Criteria) this;
}
public Criteria andNameBetween(String value1, String value2) {
addCriterion("`name` between", value1, value2, "name");
return (Criteria) this;
}
public Criteria andNameNotBetween(String value1, String value2) {
addCriterion("`name` not between", value1, value2, "name");
return (Criteria) this;
}
public Criteria andStateIsNull() {
addCriterion("`state` is null");
return (Criteria) this;
}
public Criteria andStateIsNotNull() {
addCriterion("`state` is not null");
return (Criteria) this;
}
public Criteria andStateEqualTo(String value) {
addCriterion("`state` =", value, "state");
return (Criteria) this;
}
public Criteria andStateNotEqualTo(String value) {
addCriterion("`state` <>", value, "state");
return (Criteria) this;
}
public Criteria andStateGreaterThan(String value) {
addCriterion("`state` >", value, "state");
return (Criteria) this;
}
public Criteria andStateGreaterThanOrEqualTo(String value) {
addCriterion("`state` >=", value, "state");
return (Criteria) this;
}
public Criteria andStateLessThan(String value) {
addCriterion("`state` <", value, "state");
return (Criteria) this;
}
public Criteria andStateLessThanOrEqualTo(String value) {
addCriterion("`state` <=", value, "state");
return (Criteria) this;
}
public Criteria andStateLike(String value) {
addCriterion("`state` like", value, "state");
return (Criteria) this;
}
public Criteria andStateNotLike(String value) {
addCriterion("`state` not like", value, "state");
return (Criteria) this;
}
public Criteria andStateIn(List<String> values) {
addCriterion("`state` in", values, "state");
return (Criteria) this;
}
public Criteria andStateNotIn(List<String> values) {
addCriterion("`state` not in", values, "state");
return (Criteria) this;
}
public Criteria andStateBetween(String value1, String value2) {
addCriterion("`state` between", value1, value2, "state");
return (Criteria) this;
}
public Criteria andStateNotBetween(String value1, String value2) {
addCriterion("`state` not between", value1, value2, "state");
return (Criteria) this;
}
public Criteria andCreateUserIdIsNull() {
addCriterion("create_user_id is null");
return (Criteria) this;
}
public Criteria andCreateUserIdIsNotNull() {
addCriterion("create_user_id is not null");
return (Criteria) this;
}
public Criteria andCreateUserIdEqualTo(Long value) {
addCriterion("create_user_id =", value, "createUserId");
return (Criteria) this;
}
public Criteria andCreateUserIdNotEqualTo(Long value) {
addCriterion("create_user_id <>", value, "createUserId");
return (Criteria) this;
}
public Criteria andCreateUserIdGreaterThan(Long value) {
addCriterion("create_user_id >", value, "createUserId");
return (Criteria) this;
}
public Criteria andCreateUserIdGreaterThanOrEqualTo(Long value) {
addCriterion("create_user_id >=", value, "createUserId");
return (Criteria) this;
}
public Criteria andCreateUserIdLessThan(Long value) {
addCriterion("create_user_id <", value, "createUserId");
return (Criteria) this;
}
public Criteria andCreateUserIdLessThanOrEqualTo(Long value) {
addCriterion("create_user_id <=", value, "createUserId");
return (Criteria) this;
}
public Criteria andCreateUserIdIn(List<Long> values) {
addCriterion("create_user_id in", values, "createUserId");
return (Criteria) this;
}
public Criteria andCreateUserIdNotIn(List<Long> values) {
addCriterion("create_user_id not in", values, "createUserId");
return (Criteria) this;
}
public Criteria andCreateUserIdBetween(Long value1, Long value2) {
addCriterion("create_user_id between", value1, value2, "createUserId");
return (Criteria) this;
}
public Criteria andCreateUserIdNotBetween(Long value1, Long value2) {
addCriterion("create_user_id not between", value1, value2, "createUserId");
return (Criteria) this;
}
public Criteria andCreateTimeIsNull() {
addCriterion("create_time is null");
return (Criteria) this;
}
public Criteria andCreateTimeIsNotNull() {
addCriterion("create_time is not null");
return (Criteria) this;
}
public Criteria andCreateTimeEqualTo(LocalDateTime value) {
addCriterion("create_time =", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotEqualTo(LocalDateTime value) {
addCriterion("create_time <>", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeGreaterThan(LocalDateTime value) {
addCriterion("create_time >", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeGreaterThanOrEqualTo(LocalDateTime value) {
addCriterion("create_time >=", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeLessThan(LocalDateTime value) {
addCriterion("create_time <", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeLessThanOrEqualTo(LocalDateTime value) {
addCriterion("create_time <=", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeIn(List<LocalDateTime> values) {
addCriterion("create_time in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotIn(List<LocalDateTime> values) {
addCriterion("create_time not in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeBetween(LocalDateTime value1, LocalDateTime value2) {
addCriterion("create_time between", value1, value2, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) {
addCriterion("create_time not between", value1, value2, "createTime");
return (Criteria) this;
}
public Criteria andUpdateUserIdIsNull() {
addCriterion("update_user_id is null");
return (Criteria) this;
}
public Criteria andUpdateUserIdIsNotNull() {
addCriterion("update_user_id is not null");
return (Criteria) this;
}
public Criteria andUpdateUserIdEqualTo(Long value) {
addCriterion("update_user_id =", value, "updateUserId");
return (Criteria) this;
}
public Criteria andUpdateUserIdNotEqualTo(Long value) {
addCriterion("update_user_id <>", value, "updateUserId");
return (Criteria) this;
}
public Criteria andUpdateUserIdGreaterThan(Long value) {
addCriterion("update_user_id >", value, "updateUserId");
return (Criteria) this;
}
public Criteria andUpdateUserIdGreaterThanOrEqualTo(Long value) {
addCriterion("update_user_id >=", value, "updateUserId");
return (Criteria) this;
}
public Criteria andUpdateUserIdLessThan(Long value) {
addCriterion("update_user_id <", value, "updateUserId");
return (Criteria) this;
}
public Criteria andUpdateUserIdLessThanOrEqualTo(Long value) {
addCriterion("update_user_id <=", value, "updateUserId");
return (Criteria) this;
}
public Criteria andUpdateUserIdIn(List<Long> values) {
addCriterion("update_user_id in", values, "updateUserId");
return (Criteria) this;
}
public Criteria andUpdateUserIdNotIn(List<Long> values) {
addCriterion("update_user_id not in", values, "updateUserId");
return (Criteria) this;
}
public Criteria andUpdateUserIdBetween(Long value1, Long value2) {
addCriterion("update_user_id between", value1, value2, "updateUserId");
return (Criteria) this;
}
public Criteria andUpdateUserIdNotBetween(Long value1, Long value2) {
addCriterion("update_user_id not between", value1, value2, "updateUserId");
return (Criteria) this;
}
public Criteria andUpdateTimeIsNull() {
addCriterion("update_time is null");
return (Criteria) this;
}
public Criteria andUpdateTimeIsNotNull() {
addCriterion("update_time is not null");
return (Criteria) this;
}
public Criteria andUpdateTimeEqualTo(LocalDateTime value) {
addCriterion("update_time =", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotEqualTo(LocalDateTime value) {
addCriterion("update_time <>", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeGreaterThan(LocalDateTime value) {
addCriterion("update_time >", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeGreaterThanOrEqualTo(LocalDateTime value) {
addCriterion("update_time >=", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeLessThan(LocalDateTime value) {
addCriterion("update_time <", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeLessThanOrEqualTo(LocalDateTime value) {
addCriterion("update_time <=", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeIn(List<LocalDateTime> values) {
addCriterion("update_time in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotIn(List<LocalDateTime> values) {
addCriterion("update_time not in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeBetween(LocalDateTime value1, LocalDateTime value2) {
addCriterion("update_time between", value1, value2, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) {
addCriterion("update_time not between", value1, value2, "updateTime");
return (Criteria) this;
}
}
/**
*/
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}

View File

@ -8,7 +8,6 @@ import club.joylink.rtss.vo.client.VoiceRecognitionResult;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import net.bytebuddy.utility.RandomString;
import org.springframework.core.io.FileSystemResource;
import org.springframework.http.ResponseEntity;
import org.springframework.util.LinkedMultiValueMap;
@ -19,16 +18,17 @@ import org.springframework.web.multipart.MultipartFile;
import java.io.*;
import java.time.LocalDate;
import java.util.Objects;
import java.util.concurrent.atomic.AtomicInteger;
public interface IVoiceService {
String AudioFileBasePath = "/usr/local/joylink/jlcloud/audio/";
String FileUriPrefix = "https://oss.joylink.club/oss/joylink";
AtomicInteger SN = new AtomicInteger(0);
static String getFilePath() {
LocalDate now = LocalDate.now();
String datePath = now.getYear() + File.separator + now.getMonthValue() + File.separator + now.getDayOfMonth();
String fileName = System.currentTimeMillis() + "-" + RandomString.make() + ".wav";
String fileName = System.currentTimeMillis() + "-" + SN.incrementAndGet() + ".wav";
String directoryPath = AudioFileBasePath + datePath;
File directory = new File(directoryPath);
if (!directory.exists()) {

View File

@ -0,0 +1,18 @@
package club.joylink.rtss.services.model2d;
import club.joylink.rtss.vo.AccountVO;
import club.joylink.rtss.vo.client.PageVO;
import club.joylink.rtss.vo.model2d.Model2dQueryVO;
import club.joylink.rtss.vo.model2d.Model2dVO;
public interface Model2dDraftService {
String create(Model2dVO model2dVO, AccountVO user);
void delete(Long id);
PageVO<Model2dVO> pageQuery(Model2dQueryVO queryVO, AccountVO user);
void updateBasicInfo(Long id, Model2dVO model2dVO, AccountVO user);
void updateData(Long id, Model2dVO model2dVO, AccountVO user);
}

View File

@ -0,0 +1,92 @@
package club.joylink.rtss.services.model2d;
import club.joylink.rtss.dao.Model2dDraftDAO;
import club.joylink.rtss.entity.Model2dDraft;
import club.joylink.rtss.entity.Model2dDraftExample;
import club.joylink.rtss.exception.BusinessExceptionAssertEnum;
import club.joylink.rtss.vo.AccountVO;
import club.joylink.rtss.vo.client.PageVO;
import club.joylink.rtss.vo.model2d.Model2dQueryVO;
import club.joylink.rtss.vo.model2d.Model2dVO;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;
import java.time.LocalDateTime;
@Service
public class Model2dDraftServiceImpl implements Model2dDraftService {
@Autowired
private Model2dDraftDAO model2dDraftDAO;
@Override
public String create(Model2dVO model2dVO, AccountVO user) {
BusinessExceptionAssertEnum.DATA_UNIQUE_PROPERTY_REPEAT
.assertNotTrue(this.isUserCodeExist(user.getId(), model2dVO.getCode()),
String.format("编号重复:[%s]", model2dVO.getCode()));
Model2dDraft db = model2dVO.toDraftDB();
db.setCreateUserId(user.getId());
db.setCreateTime(LocalDateTime.now());
this.model2dDraftDAO.insertSelective(db);
return String.valueOf(db.getId());
}
@Override
public void delete(Long id) {
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertNotNull(id);
this.model2dDraftDAO.deleteByPrimaryKey(id);
}
@Override
public PageVO<Model2dVO> pageQuery(Model2dQueryVO queryVO, AccountVO user) {
Model2dDraftExample example = new Model2dDraftExample();
Model2dDraftExample.Criteria criteria = example.createCriteria();
if (StringUtils.hasText(queryVO.getCode())) {
criteria.andCodeLike(String.format("%%%s%%", queryVO.getCode()));
}
if (StringUtils.hasText(queryVO.getName())) {
criteria.andNameLike(String.format("%%%s%%", queryVO.getName()));
}
PageHelper.startPage(queryVO.getPageNum(), queryVO.getPageSize());
Page<Model2dDraft> page = (Page<Model2dDraft>) this.model2dDraftDAO.selectByExample(example);
return PageVO.convert(page, Model2dVO.convert2VO(page.getResult()));
}
@Override
public void updateBasicInfo(Long id, Model2dVO model2dVO, AccountVO user) {
Model2dDraft db = this.getEntityById(id);
if (StringUtils.hasText(model2dVO.getCode())) {
db.setCode(model2dVO.getCode());
}
if (StringUtils.hasText(model2dVO.getName())) {
db.setName(model2dVO.getName());
}
this.model2dDraftDAO.updateByPrimaryKeySelective(db);
}
private Model2dDraft getEntityById(Long id) {
Model2dDraft model2dDraft = this.model2dDraftDAO.selectByPrimaryKey(id);
BusinessExceptionAssertEnum.DATA_NOT_EXIST.assertNotNull(model2dDraft,
String.format("不存在id为[%s]的2d模型草稿", id));
return model2dDraft;
}
@Override
public void updateData(Long id, Model2dVO model2dVO, AccountVO user) {
Model2dDraft db = this.getEntityById(id);
if (StringUtils.hasText(model2dVO.getJsonData())) {
db.setJsonData(model2dVO.getJsonData());
}
this.model2dDraftDAO.updateByPrimaryKeySelective(db);
}
private boolean isUserCodeExist(Long userId, String code) {
Model2dDraftExample example = new Model2dDraftExample();
example.createCriteria()
.andCreateUserIdEqualTo(userId)
.andCodeEqualTo(code);
return this.model2dDraftDAO.countByExample(example) > 0;
}
}

View File

@ -3,7 +3,6 @@ package club.joylink.rtss.services.training.data;
import club.joylink.rtss.vo.client.validGroup.GenerateConfigCheck;
import club.joylink.rtss.vo.client.validGroup.GenerateConfigDeleteCheck;
import club.joylink.rtss.vo.client.validGroup.GenerateConfigUpdateCheck;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
@ -18,7 +17,6 @@ public class GenerateConfig {
@NotNull(message = "地图id不能为空", groups = {GenerateConfigCheck.class, GenerateConfigDeleteCheck.class, GenerateConfigUpdateCheck.class})
private Long mapId;
@ApiModelProperty(hidden = true)
private String prdType;
@NotBlank(message = "实训类型不能为空", groups = {GenerateConfigCheck.class, GenerateConfigDeleteCheck.class, GenerateConfigUpdateCheck.class})

View File

@ -1,7 +1,5 @@
package club.joylink.rtss.simulation.cbtc.command;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
@ -12,7 +10,6 @@ import java.util.Map;
/**
* 指令发起
*/
@ApiModel("指令发起")
@Getter
@Setter
@NoArgsConstructor
@ -21,8 +18,9 @@ public class CommandInitiateVO {
@NotBlank(message = "指令执行方id不能为空")
private String targetMemberId;
@ApiModelProperty("参数集合")
/**
* 参数集合
*/
private Map<String, Object> params;
public CommandInitiateVO(CommandBO.CommandType commandType, String targetMemberId, Map<String, Object> params) {

View File

@ -1,13 +1,11 @@
package club.joylink.rtss.simulation.cbtc.command;
import club.joylink.rtss.entity.VoiceCommandWithBLOBs;
import club.joylink.rtss.exception.BusinessExceptionAssertEnum;
import club.joylink.rtss.simulation.cbtc.Simulation;
import club.joylink.rtss.simulation.cbtc.data.vr.VirtualRealityTrain;
import club.joylink.rtss.simulation.cbtc.member.SimulationMember;
import club.joylink.rtss.entity.VoiceCommandWithBLOBs;
import club.joylink.rtss.exception.BusinessExceptionAssertEnum;
import club.joylink.rtss.util.JsonUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
@ -24,21 +22,27 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
@ApiModel("语音指令数据")
/**
*语音指令数据
*/
@Getter
@Setter
@NoArgsConstructor
public class VoiceCommandBO {
private Long id;
@ApiModelProperty("所属地图id")
/**
*所属地图id
*/
@NotNull(message = "所属地图id不能为空")
private Long mapId;
/**
* 指令的句式
*/
@ApiModelProperty("语音指令句式")
/**
*语音指令句式
*/
@NotNull(message = "语音指令句式不能为空")
private String pattern;
@ -50,45 +54,61 @@ public class VoiceCommandBO {
/**
* 可以触发这条指令的角色
*/
@ApiModelProperty("可以触发语音的成员类型")
/**
*可以触发语音的成员类型
*/
@NotNull(message = "可以触发语音指令的成员类型不能为空")
private List<SimulationMember.Type> fromType;
/**
* 应当接受指令的角色
*/
@ApiModelProperty("接收语音的成员类型")
/**
*接收语音的成员类型
*/
private List<SimulationMember.Type> targetType;
/**
* 每个子表达式对应的关键词
*/
@ApiModelProperty("每个子表达式索引与对应的关键词")
/**
*每个子表达式索引与对应的关键词
*/
@NotEmpty(message = "子表达式索引与对应的关键词不能为空")
private Map<Integer, KeyWord> keyWordMap;
/**
* 用于查找接收指令的成员关联的设备的关键词的下标
*/
@ApiModelProperty("用于查找语音接收成员关联设备的关键词的索引")
/**
*用于查找语音接收成员关联设备的关键词的索引
*/
private Integer deviceKeyWordIndex;
/**
* 回复内容
*/
@ApiModelProperty("语音接收者要回复的内容")
/**
*语音接收者要回复的内容
*/
private String reply;
/**
* 回复内容的参数在匹配到的表达式中的索引
*/
@ApiModelProperty("作为回复内容参数的关键词的索引")
/**
*作为回复内容参数的关键词的索引
*/
private List<Integer> replyParamIndexes;
@ApiModelProperty("语音对应的指令")
/**
*语音对应的指令
*/
private CommandBO.CommandType command;
@ApiModelProperty("指令参数")
/**
*指令参数
*/
private List<Integer> commandParamIndexes;
public VoiceCommandBO(Long mapId, String pattern, Type type, List<SimulationMember.Type> fromType, List<SimulationMember.Type> targetType,

View File

@ -1,6 +1,5 @@
package club.joylink.rtss.simulation.cbtc.data.vo;
import io.swagger.annotations.ApiModel;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
@ -10,7 +9,6 @@ import lombok.Setter;
*/
@Getter
@Setter
@ApiModel("控制权转换申请回复")
@NoArgsConstructor
public class ControlTransferReplyVO {
private String stationCode;

View File

@ -11,7 +11,6 @@ import club.joylink.rtss.simulation.cbtc.member.SimulationMemberPO;
import club.joylink.rtss.util.JsonUtils;
import club.joylink.rtss.vo.client.script.MapLocationVO;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
@ -22,10 +21,12 @@ import java.time.LocalDateTime;
import java.util.*;
import java.util.stream.Collectors;
/**
* 新版仿真剧本
*/
@Getter
@Setter
@NoArgsConstructor
@ApiModel(value = "新版仿真剧本")
public class ScriptBO {
private Long id;

View File

@ -6,8 +6,6 @@ import club.joylink.rtss.entity.SysAccount;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
@ -22,8 +20,10 @@ import java.util.Arrays;
import java.util.Collections;
import java.util.List;
/**
* 账户对象
*/
@SuppressWarnings("serial")
@ApiModel(value = "账户对象")
@Getter
@Setter
@EqualsAndHashCode
@ -181,13 +181,11 @@ public class AccountVO implements Serializable {
return account;
}
@ApiModelProperty(hidden=true)
@JsonIgnore
public String getIdStr() {
return String.valueOf(this.id);
}
@ApiModelProperty(hidden=true)
@JsonIgnore
public String getRolesStr() {
if(!CollectionUtils.isEmpty(this.roles)) {

View File

@ -5,7 +5,6 @@ import club.joylink.rtss.constants.Project;
import club.joylink.rtss.entity.SysAccountLogin;
import club.joylink.rtss.util.EncryptUtil;
import club.joylink.rtss.vo.client.project.ProjectDeviceVO;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
@ -24,8 +23,9 @@ public class LoginUserInfoVO {
* 登陆的系统
*/
private Client client;
@ApiModelProperty("所属项目")
/**
* 所属项目
*/
private Project project;
private ProjectDeviceVO deviceVO;

View File

@ -2,15 +2,15 @@ package club.joylink.rtss.vo;
import club.joylink.rtss.vo.client.PageQueryVO;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.springframework.util.CollectionUtils;
import java.util.List;
@ApiModel(value = "用户信息查询对象")
/**
* 用户信息查询对象
*/
@Getter
@Setter
public class UserQueryVO extends PageQueryVO {
@ -24,7 +24,6 @@ public class UserQueryVO extends PageQueryVO {
/**
* 真实姓名
*/
@ApiModelProperty(value = "真实姓名")
private String name;
private String type;
@ -34,28 +33,23 @@ public class UserQueryVO extends PageQueryVO {
/**
* 昵称
*/
@ApiModelProperty(value = "昵称")
private String nickname;
/**
* 手机号
*/
@ApiModelProperty(value = "手机号")
private String mobile;
/**
* 单位名称
*/
@ApiModelProperty(value = "单位名称")
private Long companyId;
/**
* 角色
*/
@ApiModelProperty(value = "角色")
private List<String> roles;
@ApiModelProperty(hidden=true)
@JsonIgnore
public String getRolesStr() {
if(!CollectionUtils.isEmpty(this.roles)) {

View File

@ -1,19 +1,17 @@
package club.joylink.rtss.vo.client;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
@ApiModel(value = "指令定义查询对象")
@Getter
@Setter
public class CommandDefinitionQueryVO extends PageQueryVO {
@ApiModelProperty(value = "操作对象")
/**
* 操作对象
*/
private String operateObject;
@ApiModelProperty(value = "仿真角色")
/**
* 仿真角色
*/
private String simulationRole;
}

View File

@ -1,11 +1,9 @@
package club.joylink.rtss.vo.client;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import club.joylink.rtss.entity.CommandDefinition;
import club.joylink.rtss.util.JsonUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
@ -16,7 +14,9 @@ import javax.validation.constraints.NotEmpty;
import java.util.ArrayList;
import java.util.List;
@ApiModel(value = "指令定义对象")
/**
*指令定义对象
*/
@NoArgsConstructor
@Getter
@Setter
@ -25,32 +25,48 @@ public class CommandDefinitionVO {
@JsonSerialize(using = ToStringSerializer.class)
private Long id;
@ApiModelProperty(value = "线路编号")
/**
*线路编号
*/
@NotBlank(message = "线路编号不能为空")
private String lineCode;
@ApiModelProperty(value = "操作")
/**
*操作
*/
@NotBlank(message = "操作内容不能为空")
private String operate;
@ApiModelProperty(value = "产品类型code")
/**
*产品类型code
*/
@NotBlank(message = "产品类型不能为空")
private String prdType;
@ApiModelProperty(value = "仿真角色")
/**
*仿真角色
*/
@NotBlank(message = "仿真角色不能为空")
private String simulationRole;
@ApiModelProperty(value = "控制模式")
/**
*控制模式
*/
@NotEmpty(message = "控制模式不能为空")
private List<String> controlMode;
@ApiModelProperty(value = "操作对象")
/**
*操作对象
*/
@NotBlank(message = "操作对象不能为空")
private String operateObject;
@ApiModelProperty(value = "操作条件json数组型字符串")
/**
*操作条件json数组型字符串
*/
private List<CommandCondition> conditionList;
@ApiModelProperty(value = "操作参数json数组型字符串")
/**
*操作参数json数组型字符串
*/
private List<CommandParam> paramList;
public CommandDefinitionVO(CommandDefinition definition) {

View File

@ -1,12 +1,9 @@
package club.joylink.rtss.vo.client;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
@SuppressWarnings("serial")
@ApiModel(value="字典明细")
@Getter
@Setter
public class DictionaryDetailQueryVO extends PageQueryVO {
@ -14,18 +11,15 @@ public class DictionaryDetailQueryVO extends PageQueryVO {
/**
* 编码
*/
@ApiModelProperty(value = "编码")
private String code;
/**
* 名称
*/
@ApiModelProperty(value = "名称")
private String name;
/**
* 状态0-禁用1-启用
*/
@ApiModelProperty(value = "状态")
private String status;
}

View File

@ -1,10 +1,8 @@
package club.joylink.rtss.vo.client;
import club.joylink.rtss.entity.SysDictionaryDetail;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import club.joylink.rtss.entity.SysDictionaryDetail;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
@ -16,7 +14,6 @@ import java.util.ArrayList;
import java.util.List;
@SuppressWarnings("serial")
@ApiModel(value="字典明细")
@NoArgsConstructor
@Getter
@Setter
@ -28,35 +25,30 @@ public class DictionaryDetailVO implements Serializable {
/**
* 字典id
*/
@ApiModelProperty(value = "字典id")
@JsonSerialize(using = ToStringSerializer.class)
private Long dicId;
/**
* 编码
*/
@ApiModelProperty(value = "编码")
@NotBlank(message="{dictionary.detail.code.notBlank}")
private String code;
/**
* 名称
*/
@ApiModelProperty(value = "名称")
@NotBlank(message="{dictionary.detail.name.notBlank}")
private String name;
/**
* 状态0-禁用1-启用
*/
@ApiModelProperty(value = "状态")
@NotBlank(message="{dictionary.detail.deviceStatus.notBlank}")
private String status;
/**
* 备注说明
*/
@ApiModelProperty(value = "备注说明")
private String remarks;
public DictionaryDetailVO(SysDictionaryDetail dicDetail) {

View File

@ -1,12 +1,12 @@
package club.joylink.rtss.vo.client;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
/**
* 字典目录
*/
@SuppressWarnings("serial")
@ApiModel(value="字典目录")
@Getter
@Setter
public class DictionaryQueryVO extends PageQueryVO {
@ -14,18 +14,15 @@ public class DictionaryQueryVO extends PageQueryVO {
/**
* 编码
*/
@ApiModelProperty(value = "编码")
private String code;
/**
* 名称
*/
@ApiModelProperty(value = "名称")
private String name;
/**
* 状态0-禁用1-启用
*/
@ApiModelProperty(value = "状态")
private String status;
}

View File

@ -1,10 +1,8 @@
package club.joylink.rtss.vo.client;
import club.joylink.rtss.entity.SysDictionary;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import club.joylink.rtss.entity.SysDictionary;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
@ -16,8 +14,10 @@ import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
/**
* 字典目录
*/
@SuppressWarnings("serial")
@ApiModel(value="字典目录")
@NoArgsConstructor
@Getter
@Setter
@ -29,21 +29,18 @@ public class DictionaryVO implements Serializable {
/**
* 编码
*/
@ApiModelProperty(value = "编码")
@NotBlank(message="{dictionary.code.notBlank}")
private String code;
/**
* 名称
*/
@ApiModelProperty(value = "名称")
@NotBlank(message="{dictionary.name.notBlank}")
private String name;
/**
* 状态0-禁用1-启用
*/
@ApiModelProperty(value = "状态")
@NotBlank(message="{dictionary.deviceStatus.notBlank}")
@Pattern(regexp="[01]", message="不是期望的值")
private String status;
@ -51,7 +48,6 @@ public class DictionaryVO implements Serializable {
/**
* 备注说明
*/
@ApiModelProperty(value = "备注说明")
private String remarks;
public DictionaryVO(SysDictionary sysDic) {

View File

@ -2,7 +2,6 @@ package club.joylink.rtss.vo.client;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
@ -22,21 +21,18 @@ public class DragSortReqVO {
/**
* 拖拽对象课程ID
*/
@ApiModelProperty(value="拖拽对象课程id")
@JsonSerialize(using = ToStringSerializer.class)
private Long lessonId;
/**
* 拖拽对象章节ID
*/
@ApiModelProperty(value="拖拽对象章节id")
@JsonSerialize(using = ToStringSerializer.class)
private Long chapterId;
/**
* 拖拽对象id
*/
@ApiModelProperty(value="拖拽对象id")
@NotBlank(message="拖拽对象id 不能为空")
@JsonSerialize(using = ToStringSerializer.class)
private Long sourceId;
@ -44,14 +40,12 @@ public class DragSortReqVO {
/**
* 拖拽对象类型
*/
@ApiModelProperty(value="拖拽对象类型")
@NotBlank(message="拖拽对象类型 不能为空")
private String sourceType;
/**
* 放置位置对象id
*/
@ApiModelProperty(value="放置位置对象id")
@NotBlank(message="放置位置对象id 不能为空")
@JsonSerialize(using = ToStringSerializer.class)
private Long targetId;
@ -59,14 +53,12 @@ public class DragSortReqVO {
/**
* 放置位置对象类型
*/
@ApiModelProperty(value="放置位置对象类型")
@NotBlank(message="放置位置对象类型 不能为空")
private String targetType;
/**
* 位置类型
* 位置类型,只能是 'before'/'after'/'inner' 中的一个
*/
@ApiModelProperty(value="位置类型,只能是 'before'/'after'/'inner' 中的一个")
@NotBlank(message="位置类型 不能为空")
@Pattern(regexp="before|after|inner", message="位置类型只能是 'before'/'after'/'inner' 中的一个")
private String location;

View File

@ -1,37 +1,34 @@
package club.joylink.rtss.vo.client;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
@ApiModel(value = "考试定义查询对象")
/**
* 考试定义查询对象
*/
@Getter
@Setter
public class ExamDefinitionQueryVO extends PageQueryVO {
@ApiModelProperty(value = "所属地图ID")
private Long mapId;
/**
* 所属课程ID
*/
@ApiModelProperty(value = "所属课程ID")
private Long lessonId;
/**
* 考试名称
*/
@ApiModelProperty(value = "考试名称")
private String name;
/**
* 创建人名称
*/
@ApiModelProperty(value = "创建人名称")
private String creatorName;
@ApiModelProperty(value = "状态")
/**
* 状态
*/
private String status;
private Integer clsId;

View File

@ -1,18 +1,18 @@
package club.joylink.rtss.vo.client;
import club.joylink.rtss.entity.ExamDefinitionRules;
import io.swagger.annotations.ApiModel;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.ArrayList;
import java.util.List;
@ApiModel(value = "考试定义规则")
/**
* 考试定义规则
*/
@NoArgsConstructor
@Getter
@Setter

Some files were not shown because too many files have changed in this diff Show More