Commit d3f66440 authored by 王蔡翾's avatar 王蔡翾
Browse files

初始化

parents
HELP.md
target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/
### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
!**/src/main/**/build/
!**/src/test/**/build/
### VS Code ###
.vscode/
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>operation_platform</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>operation_platform</name>
<description>operation_platform</description>
<properties>
<java.version>1.8</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<spring-boot.version>2.3.2.RELEASE</spring-boot.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.ruzhoukj</groupId>
<artifactId>common-core</artifactId>
<version>1.0.2</version>
</dependency>
<dependency>
<groupId>com.ruzhoukj</groupId>
<artifactId>common-mongo</artifactId>
<version>1.0.0</version>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring-boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring-boot.version}</version>
<configuration>
<mainClass>com.example.operation_platform.OperationPlatformApplication</mainClass>
<skip>true</skip>
</configuration>
<executions>
<execution>
<id>repackage</id>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
package com.example.operation_platform;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableScheduling;
@SpringBootApplication
@MapperScan("com.example.operation_platform.mapper")
@ComponentScan({"com.platform", "com.example.operation_platform"})
@EnableScheduling
public class OperationPlatformApplication {
public static void main(String[] args) {
SpringApplication.run(OperationPlatformApplication.class, args);
}
}
package com.example.operation_platform.controller;
import com.example.operation_platform.model.dto.GuideDTO;
import com.example.operation_platform.model.dto.MessageDTO;
import com.example.operation_platform.model.entity.GuideEntity;
import com.example.operation_platform.model.vo.GuideVO;
import com.example.operation_platform.service.GuideService;
import com.platform.controller.BaseController;
import com.platform.model.resp.Result;
import com.platform.page.TableDataInfo;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@RestController//接口方法返回对象,转换成json文本
@RequestMapping("/guide")
public class GuideController extends BaseController {
@Resource
private GuideService guideService;
@PostMapping("/page")
public TableDataInfo page(@RequestBody GuideDTO guideDTO) {
startPage(guideDTO.getPageNum(), guideDTO.getPageSize());
return getDataTable(guideService.queryguidelist(guideDTO));
}
@GetMapping()
public Result<GuideVO> queryByName(@RequestParam(name = "name") String name ) {
return Result.data(guideService.queryByName(name));
}
@PutMapping//维保类型编辑
public Result<GuideEntity> update(@RequestBody GuideDTO guideDTO) {
// 调用Service更新
boolean success = guideService.updateById(guideDTO);
// 返回操作结果
return toAjax(success);
}
}
package com.example.operation_platform.controller;
import com.example.operation_platform.model.dto.MessageDTO;
import com.example.operation_platform.model.dto.WorkerDTO;
import com.example.operation_platform.model.entity.MessageEntity;
import com.example.operation_platform.model.entity.WorkerEntity;
import com.example.operation_platform.model.vo.PeopleMessageVO;
import com.example.operation_platform.service.MessageService;
import com.platform.controller.BaseController;
import com.platform.model.resp.Result;
import com.platform.page.TableDataInfo;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@RestController//接口方法返回对象,转换成json文本
@RequestMapping("/robot")
public class MessageController extends BaseController {
@Resource
private MessageService messageService;
//分页
@PostMapping("/page")
public TableDataInfo page(@RequestBody MessageDTO messageDTO) {
startPage(messageDTO.getPageNum(), messageDTO.getPageSize());
return getDataTable(messageService.queryrobotList(messageDTO));
}
@PostMapping("/save")
public Result save(@RequestBody MessageDTO messageDTO) {
return toAjax(messageService.save(messageDTO));
}
@PutMapping("/reset")
public Result<MessageEntity> resetmessage(@RequestBody MessageDTO messageDTO) {
messageService.resetmessage(messageDTO);
return Result.success("重置成功");
}
@GetMapping()
public Result<PeopleMessageVO> queryPeople(@RequestParam(name = "stationId")Long stationId) {
return Result.data(messageService.queryPeople(stationId));
}
}
package com.example.operation_platform.controller;
import com.example.operation_platform.model.dto.OperationDoDTO;
import com.example.operation_platform.model.entity.OperationDoEntity;
import com.example.operation_platform.model.entity.OperationItem;
import com.example.operation_platform.service.OperationDoService;
import com.platform.controller.BaseController;
import com.platform.model.resp.Result;
import com.platform.page.TableDataInfo;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@RestController//接口方法返回对象,转换成json文本
@RequestMapping("/Operation")
public class OperationDoController extends BaseController {
@Resource
private OperationDoService operationDoService;
//分页
@PostMapping("/page")
public TableDataInfo page(@RequestBody OperationDoDTO operationDoDTO) {
startPage(operationDoDTO.getPageNum(), operationDoDTO.getPageSize());
return getDataTable(operationDoService.queryDoList(operationDoDTO));
}
@PostMapping("/save")
public Result save(@RequestBody OperationDoDTO operationDoDTO) {
return toAjax(operationDoService.save(operationDoDTO));
}
@PutMapping
public Result<OperationDoEntity> update(@RequestBody OperationDoDTO operationDoDTO) {
// 调用Service更新
boolean success = operationDoService.updateById(operationDoDTO);
// 返回操作结果
return toAjax(success);
}
@DeleteMapping("/{Id}")//删除
public Result<OperationDoEntity> RemoveById(@PathVariable Integer Id) {
operationDoService.removeById(Id);
return Result.data(null);
}
@PutMapping("/stopDo")
public Result<OperationDoEntity> stopDo(@RequestBody OperationDoDTO operationDoDTO) {
operationDoService.stopDo(operationDoDTO);
return Result.success("项目已终止");
}
}
package com.example.operation_platform.controller;
import com.example.operation_platform.model.dto.OperationItemDTO;
import com.example.operation_platform.model.entity.OperationItem;
import com.example.operation_platform.service.OperationItemService;
import com.platform.controller.BaseController;
import com.platform.model.resp.Result;
import com.platform.page.TableDataInfo;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@RestController
@RequestMapping("/Item")
public class OperationItemController extends BaseController {
@Resource
private OperationItemService operationItemService;
@PostMapping("/page")//项目列表分页查询
public TableDataInfo page(@RequestBody OperationItemDTO operationItemDTO) {
startPage(operationItemDTO.getPageNum(), operationItemDTO.getPageSize());
return getDataTable(operationItemService.queryItemList(operationItemDTO));
}
@PostMapping("/save")//项目新增
public Result save(@RequestBody OperationItemDTO operationItemDTO) {
return toAjax(operationItemService.save(operationItemDTO));
}
@PutMapping//项目编辑
public Result<OperationItem> update(@RequestBody OperationItemDTO operationItemDTO) {
// 调用Service更新
boolean success = operationItemService.updateById(operationItemDTO);
// 返回操作结果
return toAjax(success);
}
@DeleteMapping("/{itemId}")//项目删除
public Result<OperationItem> RemoveById(@PathVariable Integer itemId) {
operationItemService.removeById(itemId);
return Result.data(null);
}
}
package com.example.operation_platform.controller;
import com.example.operation_platform.model.dto.OperationJobDTO;
import com.example.operation_platform.service.OperationJobService;
import com.platform.controller.BaseController;
import com.platform.page.TableDataInfo;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
@RestController
@RequestMapping("/job")
public class OperationJobController extends BaseController {
@Resource
private OperationJobService operationJobService;
@PostMapping("/page")//任务列表分页查询
public TableDataInfo page(@RequestBody OperationJobDTO operationJobDTO) {
startPage(operationJobDTO.getPageNum(), operationJobDTO.getPageSize());
return getDataTable(operationJobService.queryJobList(operationJobDTO));
}
}
package com.example.operation_platform.controller;
import com.example.operation_platform.model.dto.OperationRecordDTO;
import com.example.operation_platform.service.TbOperationRecordService;
import com.platform.controller.BaseController;
import com.platform.model.resp.Result;
import com.platform.page.TableDataInfo;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
@RestController
@RequestMapping("/operation/record")
public class OperationRecordController extends BaseController {
@Resource
private TbOperationRecordService tbOperationRecordService;
@PostMapping("/page")
public TableDataInfo page(@RequestBody OperationRecordDTO operationRecordDTO) {
startPage(operationRecordDTO.getPageNum(), operationRecordDTO.getPageSize());
return getDataTable(tbOperationRecordService.queryrecordList(operationRecordDTO));
}
@PostMapping("/save")
public Result save(@RequestBody OperationRecordDTO operationRecordDTO) {
return toAjax(tbOperationRecordService.save(operationRecordDTO));
}
}
package com.example.operation_platform.controller;
import com.example.operation_platform.model.dto.OperationItemDTO;
import com.example.operation_platform.model.dto.OperationTypeDTO;
import com.example.operation_platform.model.entity.OperationItem;
import com.example.operation_platform.model.entity.OperationTypeEntity;
import com.example.operation_platform.service.OperationItemService;
import com.example.operation_platform.service.OperationTypeService;
import com.platform.controller.BaseController;
import com.platform.model.resp.Result;
import com.platform.page.TableDataInfo;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@RestController
@RequestMapping("/Type")
public class OperationTypeController extends BaseController {
@Resource
private OperationTypeService operationTypeService;
@PostMapping("/page")//维保类型列表分页查询
public TableDataInfo page(@RequestBody OperationTypeDTO operationTypeDTO) {
startPage(operationTypeDTO.getPageNum(), operationTypeDTO.getPageSize());
return getDataTable(operationTypeService.queryTypeList(operationTypeDTO));
}
@PostMapping("/save")//维保类型新增
public Result save(@RequestBody OperationTypeDTO operationTypeDTO) {
return toAjax(operationTypeService.save(operationTypeDTO));
}
@PutMapping//维保类型编辑
public Result<OperationTypeEntity> update(@RequestBody OperationTypeDTO operationTypeDTO) {
// 调用Service更新
boolean success = operationTypeService.updateById(operationTypeDTO);
// 返回操作结果
return toAjax(success);
}
@DeleteMapping("/{TypeId}")//维保类型删除
public Result<OperationTypeEntity> RemoveById(@PathVariable Integer TypeId) {
operationTypeService.removeById(TypeId);
return Result.data(null);
}
}
package com.example.operation_platform.controller;
import com.example.operation_platform.model.dto.RunLogDTO;
import com.example.operation_platform.model.entity.UavOperateLogEntity;
import com.example.operation_platform.service.RunLogService;
import com.platform.controller.BaseController;
import com.platform.model.resp.Result;
import com.platform.page.TableDataInfo;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
@RestController
@RequestMapping("/run/log")
public class RunLogController extends BaseController {
@Resource
private RunLogService runLogService;
@PostMapping("/page")
public TableDataInfo page(@RequestBody RunLogDTO runLogDTO) {
startPage(runLogDTO.getPageNum(), runLogDTO.getPageSize());
return getDataTable(runLogService.queryLogList(runLogDTO));
}
@GetMapping("/{id}")
public Result<List<UavOperateLogEntity>> info(@PathVariable("id") String id) {
return Result.data(runLogService.getInfoById(id));
}
@GetMapping("/download/{id}")
public void download(@PathVariable("id") String id, HttpServletResponse response) {
runLogService.download(id,response);
}
}
package com.example.operation_platform.controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class Test {
@GetMapping("/test")
public String test() {
return "test";
}
}
package com.example.operation_platform.controller;
import com.example.operation_platform.model.dto.WorkerDTO;
import com.example.operation_platform.model.entity.WorkerEntity;
import com.example.operation_platform.model.vo.TermAndImgVO;
import com.example.operation_platform.model.vo.WorkerVO;
import com.example.operation_platform.service.WorkerService;
import com.platform.controller.BaseController;
import com.platform.model.resp.Result;
import com.platform.page.TableDataInfo;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
@RestController
@RequestMapping("/worker")
public class WorkerController extends BaseController {
@Resource
private WorkerService workerService;
@PostMapping("/page")
public TableDataInfo page(@RequestBody WorkerDTO workerDTO) {
startPage(workerDTO.getPageNum(), workerDTO.getPageSize());
return getDataTable(workerService.queryList(workerDTO));
}
@PostMapping("/save")//人员新增
public Result save(@RequestBody WorkerDTO workerDTO) {
return toAjax(workerService.save(workerDTO));
}
@PutMapping//人员更新
public Result<WorkerEntity> update(@RequestBody WorkerDTO workerDTO) {
// 调用Service更新
boolean success = workerService.updateById(workerDTO);
// 返回操作结果
return toAjax(success);
}
@GetMapping("/{workerId}")//人员查询
public Result<TermAndImgVO> queryById(@PathVariable Integer workerId) {
return Result.data(workerService.queryById(workerId));
}
@DeleteMapping("/{workerId}")//人员删除
public Result<WorkerEntity> RemoveById(@PathVariable Integer workerId) {
workerService.removeById(workerId);
return Result.data(null);
}
@PostMapping("/login")
public Result<WorkerEntity> login(@RequestBody WorkerDTO workerDTO) {
WorkerVO workerVo = workerService.queryByUsername(workerDTO);
if (workerVo == null) {
return Result.fail("用户名或密码错误");
}
return Result.success("密码正确");
}
@PutMapping("/resetPassword")
public Result<WorkerEntity> resetPassword(@RequestBody WorkerDTO workerDTO) {
workerService.resetPassword(workerDTO);
return Result.success("密码重置成功");
}
@GetMapping("/queryByType/{typeId}")
public Result<List<WorkerVO>> queryByType(@PathVariable Integer typeId) {
return Result.data(workerService.queryByType(typeId));
}
}
package com.example.operation_platform.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.operation_platform.model.dto.GuideDTO;
import com.example.operation_platform.model.entity.GuideEntity;
import com.example.operation_platform.model.vo.GuideVO;
import java.util.List;
public interface GuideMapper extends BaseMapper<GuideEntity> {
/**
* 查询指南
*
* @param name name
* @return GuideVO
*/
GuideVO queryByName(String name);
/**
* 指南列表
*
* @param guideDTO guideDTO
* @return GuideVO
*/
List<GuideVO> queryguidelist(GuideDTO guideDTO);
}
package com.example.operation_platform.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.operation_platform.model.dto.MessageDTO;
import com.example.operation_platform.model.entity.MessageEntity;
import com.example.operation_platform.model.vo.MessageVO;
import com.example.operation_platform.model.vo.PeopleMessageVO;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface MessageMapper extends BaseMapper<MessageEntity> {
/**
* 查询智能设备列表
*
* @param messageDTO messageDTO
* @return List<MessageVO>
*/
List<MessageVO> queryrobotList(MessageDTO messageDTO);
/**
* 重置智能设备信息
*
* @param messageDTO messageDTO
* @return List<MessageVO>
*/
void resetmessage(MessageDTO messageDTO);
/*
* 人员信息列表
* @param stationId stationId
*/
PeopleMessageVO queryPeople(@Param("stationId") Long stationId);
}
package com.example.operation_platform.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.operation_platform.model.dto.OperationDoDTO;
import com.example.operation_platform.model.entity.OperationDoEntity;
import com.example.operation_platform.model.vo.OperationDoVO;
import java.util.List;
public interface OperationDoMapper extends BaseMapper<OperationDoEntity> {
/**
* 查看维保管理列表
* @param operationDoDTO operationDoDTO
* @return List<OperationVO>
*/
List<OperationDoVO> queryDoList(OperationDoDTO operationDoDTO);
/**
* 终止项目
* @param operationDoDTO operationDoDTO
* @return OperationVO
*/
void stopDo(OperationDoDTO operationDoDTO);
}
package com.example.operation_platform.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.operation_platform.model.dto.OperationItemDTO;
import com.example.operation_platform.model.entity.OperationItem;
import com.example.operation_platform.model.vo.OperationItemVO;
import java.util.List;
public interface OperationItemMapper extends BaseMapper<OperationItem> {
/**
* 查询维保项目列表
*
* @param operationItemDTO operationItemDTO
* @return List<WorkerVO>
*/
List<OperationItemVO> queryItemList(OperationItemDTO operationItemDTO);
}
package com.example.operation_platform.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.operation_platform.model.dto.OperationJobDTO;
import com.example.operation_platform.model.entity.OperationJob;
import com.example.operation_platform.model.vo.OperationJobVO;
import java.util.List;
public interface OperationJobMapper extends BaseMapper<OperationJob> {
/**
* 查询任务列表
* @param operationJobDTO
* @return
*/
List<OperationJobVO> queryJobList(OperationJobDTO operationJobDTO);
}
package com.example.operation_platform.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.operation_platform.model.dto.OperationTypeDTO;
import com.example.operation_platform.model.entity.OperationTypeEntity;
import com.example.operation_platform.model.vo.OperationTypeVO;
import java.util.List;
public interface OperationTypeMapper extends BaseMapper<OperationTypeEntity> {
/**
* 查询维保类型列表
*
* @param operationTypeDTO operationTypeDTO
* @return List<OperationTypeVO>
*/
List<OperationTypeVO> queryTypeList(OperationTypeDTO operationTypeDTO);
}
package com.example.operation_platform.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.operation_platform.model.dto.RunLogDTO;
import com.example.operation_platform.model.entity.RunLogEntity;
import com.example.operation_platform.model.vo.RunLogVO;
import java.util.List;
public interface RunLogMapper extends BaseMapper<RunLogEntity> {
List<RunLogVO> queryLogList(RunLogDTO runLogDTO);
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment