refactor:添加注释和swagger
parent
3aab1823a1
commit
030f16e6a8
|
@ -95,6 +95,7 @@
|
|||
<version>1.3.2</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
|
|
@ -10,7 +10,8 @@ import java.util.HashMap;
|
|||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Author:liuxinyue
|
||||
*
|
||||
* @author liuxinyue
|
||||
* @Package:com.muyu.mqtt.configure
|
||||
* @Project:cloud-server
|
||||
* @name:KafkaConsumerConfig
|
||||
|
|
|
@ -10,7 +10,8 @@ import java.util.HashMap;
|
|||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Author:liuxinyue
|
||||
*
|
||||
* @author liuxinyue
|
||||
* @Package:com.muyu.mqtt.configure
|
||||
* @Project:cloud-server
|
||||
* @name:KafkaProviderConfig
|
||||
|
|
|
@ -10,7 +10,8 @@ import org.springframework.stereotype.Component;
|
|||
import javax.annotation.PostConstruct;
|
||||
|
||||
/**
|
||||
* @Author:liuxinyue
|
||||
*
|
||||
* @author liuxinyue
|
||||
* @Package:com.muyu.mqtt.configure
|
||||
* @Project:cloud-server
|
||||
* @name:MqttConfigure
|
||||
|
|
|
@ -10,7 +10,14 @@ import lombok.extern.log4j.Log4j2;
|
|||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
/**
|
||||
* 车辆类型管理
|
||||
* @author liuxingue
|
||||
* @package com.muyu.server.controller
|
||||
* @name CarTypeController
|
||||
* @Date 2024/9/29 12:06
|
||||
*/
|
||||
|
||||
|
||||
|
||||
@RestController
|
||||
|
|
|
@ -16,7 +16,8 @@ import java.util.List;
|
|||
|
||||
|
||||
/**
|
||||
* @Author:liuxinyue
|
||||
* 数据类型管理
|
||||
* @author liuxinyue
|
||||
* @Package:com.sheep.controller
|
||||
* @Project:cloud-server-c
|
||||
* @name:DataTypeController
|
||||
|
|
|
@ -18,14 +18,15 @@ import org.springframework.web.bind.annotation.*;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author:yuping
|
||||
* 电子围栏
|
||||
* @author yuping
|
||||
* @Package:com.muyu.fence.controller
|
||||
* @Project:cloud-server
|
||||
* @name:FenceEtlController
|
||||
* @Date:2024/9/17 16:28
|
||||
*/
|
||||
@Log4j2
|
||||
@Tag(name = "电子围栏")
|
||||
@Tag(name = "电子围栏",description = "电子围栏")
|
||||
@RestController
|
||||
@RequestMapping("/fence")
|
||||
@RequiredArgsConstructor
|
||||
|
@ -36,21 +37,21 @@ public class ElectronicFenceController {
|
|||
|
||||
|
||||
@PostMapping("/fenceArray")
|
||||
@Operation(description = "查询所有可用的围栏")
|
||||
@Operation(summary = "查询所有可用的电子围栏",description = "查询所有可用的围栏")
|
||||
public Result<List<ElectronicFenceResp>> fenceArray() {
|
||||
System.out.println("=====>" + "hgfvhgjy");
|
||||
return Result.success(electronicFenceService.fenceArray());
|
||||
}
|
||||
|
||||
@PostMapping("/fenceselectList")
|
||||
@Operation(description = "列表")
|
||||
@Operation(summary = "列表",description = "列表")
|
||||
public Result<List<ElectronicFenceResp>> fenceselectList(@RequestBody ElectroicFenceListReq electroicFenceListReq) {
|
||||
System.out.println("=====>" + "hgfvhgjy");
|
||||
return Result.success(electronicFenceService.fenceselectList(electroicFenceListReq));
|
||||
}
|
||||
|
||||
@PostMapping("/add")
|
||||
@Operation(description = "添加")
|
||||
@Operation(summary = "添加电子围栏",description = "添加电子围栏")
|
||||
public Result AddFence(@RequestBody ElectroicFenceAddReq electroicFenceAddReq) {
|
||||
|
||||
electronicFenceService.unquireFence(electroicFenceAddReq.getName());
|
||||
|
@ -60,7 +61,7 @@ public class ElectronicFenceController {
|
|||
}
|
||||
|
||||
@PostMapping("/upd/{id}")
|
||||
@Operation(description = "修改")
|
||||
@Operation(summary = "修改电子围栏",description = "修改电子围栏")
|
||||
public Result UpdFence(@PathVariable("id") Long id, @RequestBody ElectroicFenceUpdReq electroicFenceUpdReq) {
|
||||
|
||||
electronicFenceService.updateById(ElectronicFence.buildByElectronicUpd(electroicFenceUpdReq, () -> id));
|
||||
|
@ -69,7 +70,7 @@ public class ElectronicFenceController {
|
|||
}
|
||||
|
||||
@PostMapping("/findElectronicByid/{id}")
|
||||
@Operation(description = "通过id回显围栏信息")
|
||||
@Operation(summary = "通过Id回显电子围栏信息",description = "通过Id回显电子围栏")
|
||||
public Result<ElectronicFence> findElectronicByid(@PathVariable("id") Long id) {
|
||||
|
||||
ElectronicFence electronicFence= electronicFenceService.findElectronicByid(id);
|
||||
|
@ -101,7 +102,7 @@ public class ElectronicFenceController {
|
|||
}
|
||||
|
||||
@PostMapping("/open/{id}")
|
||||
@Operation(description = "开启围栏")
|
||||
@Operation(summary = "开启电子围栏",description = "开启电子围栏")
|
||||
public Result openFence(@PathVariable("id") Long id) {
|
||||
|
||||
electronicFenceService.openFence(id);
|
||||
|
@ -110,7 +111,7 @@ public class ElectronicFenceController {
|
|||
}
|
||||
|
||||
@PostMapping("/close/{id}")
|
||||
@Operation(description = "关闭围栏")
|
||||
@Operation(summary = "关闭电子围栏",description = "关闭电子围栏")
|
||||
public Result closeFence(@PathVariable("id") Long id) {
|
||||
|
||||
electronicFenceService.closeFence(id);
|
||||
|
@ -119,7 +120,7 @@ public class ElectronicFenceController {
|
|||
}
|
||||
|
||||
@PostMapping("/setFenceWay")
|
||||
@Operation(description = "设置电子围栏的位置")
|
||||
@Operation(summary = "设置电子围栏的位置",description = "设置电子围栏的位置")
|
||||
public Result setFenceWay(@RequestBody FenceWayReq fenceWayReq) {
|
||||
|
||||
Long id = fenceWayReq.getId();
|
||||
|
|
|
@ -20,7 +20,8 @@ import org.springframework.web.bind.annotation.*;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author:yuping
|
||||
* 围栏组
|
||||
* @author yuping
|
||||
* @Package:com.muyu.fence.controller
|
||||
* @Project:cloud-server
|
||||
* @name:FenceGroupController
|
||||
|
@ -30,7 +31,7 @@ import java.util.List;
|
|||
@Log4j2
|
||||
@RestController
|
||||
@RequestMapping("/group")
|
||||
@Tag(name = "围栏组")
|
||||
@Tag(name = "围栏组",description = "围栏组管理")
|
||||
public class ElectronicFenceGroupController {
|
||||
|
||||
@Autowired
|
||||
|
@ -41,6 +42,7 @@ public class ElectronicFenceGroupController {
|
|||
|
||||
|
||||
@PostMapping("/selectGroupList")
|
||||
@Operation(summary = "围栏组列表",description = "围栏组列表")
|
||||
public Result<List<GroupFenceListresp>> selectGroupList(@RequestBody ElectronicFenceGroupListReq req) {
|
||||
//查询所有的围栏组
|
||||
List<ElectronicFenceGroup> fenceListList = electronicFenceGroupService.selectGroupList(req);
|
||||
|
@ -52,6 +54,7 @@ public class ElectronicFenceGroupController {
|
|||
|
||||
@Transactional
|
||||
@PostMapping("/addGroup")
|
||||
@Operation(summary = "添加围栏组",description = "添加围栏组")
|
||||
public Result addGroup(@RequestBody ElectronicFenceGroupAddReq addReq) {
|
||||
|
||||
ElectronicFenceGroup electronicFenceGroup = ElectronicFenceGroup.buildByAdd(addReq);
|
||||
|
@ -66,7 +69,7 @@ public class ElectronicFenceGroupController {
|
|||
}
|
||||
|
||||
@PostMapping("/findGroupByid/{id}")
|
||||
@Operation(description = "通过id回显围栏组信息")
|
||||
@Operation(summary = "通过id回显围栏组信息",description = "通过id回显围栏组信息")
|
||||
public Result<ElectronicFenceGroupResp> findGroupByid(@PathVariable("id") Long id) {
|
||||
|
||||
ElectronicFenceGroupResp fenceGroupResp = electronicFenceGroupService.findGroupByid(id);
|
||||
|
@ -77,7 +80,7 @@ public class ElectronicFenceGroupController {
|
|||
|
||||
@Transactional
|
||||
@PostMapping("/updGroup/{id}")
|
||||
@Operation(description = "修改")
|
||||
@Operation(summary = "修改围栏组",description = "修改")
|
||||
public Result UpdFence(@PathVariable("id") Long id, @RequestBody ElectronicFenceGroupUpdReq req) {
|
||||
|
||||
electronicFenceGroupService.updateById(ElectronicFenceGroup.buildByUpd(req, () -> id));
|
||||
|
|
|
@ -9,7 +9,10 @@ import com.muyu.server.controller.form.InsertEnterprise;
|
|||
import com.muyu.server.controller.form.SearchEnterpriseName;
|
||||
import com.muyu.server.controller.form.UpdateEnterprise;
|
||||
import com.muyu.server.service.EnterpriseService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.validation.Valid;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
|
@ -17,12 +20,16 @@ import java.util.HashMap;
|
|||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Author YuPing
|
||||
* 企业运营控制层
|
||||
* @author yuping
|
||||
* @Description 企业运营控制层
|
||||
* @Version 1.0
|
||||
* @Data 2024-09-26 20:24:05
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/enterprise")
|
||||
@Log4j2
|
||||
@Tag(name = "企业运营管理",description = "企业运营管理")
|
||||
public class EnterpriseController {
|
||||
|
||||
@Autowired
|
||||
|
@ -35,6 +42,7 @@ public class EnterpriseController {
|
|||
* @return
|
||||
*/
|
||||
@PostMapping("/selectEnterprise")
|
||||
@Operation(summary = "查询分页企业信息",description = "查询分页企业信息")
|
||||
public Result selectEnterprise(@RequestBody @Valid SearchEnterpriseName form) {
|
||||
Integer page = form.getPage();
|
||||
Integer length = form.getLength();
|
||||
|
@ -55,6 +63,7 @@ public class EnterpriseController {
|
|||
* @return
|
||||
*/
|
||||
@PostMapping("/insert")
|
||||
@Operation(summary = "新增企业信息",description = "新增企业信息")
|
||||
public Result insert(@RequestBody @Valid InsertEnterprise form){
|
||||
Enterprise enterprise = new Enterprise();
|
||||
|
||||
|
@ -73,6 +82,7 @@ public class EnterpriseController {
|
|||
* @return
|
||||
*/
|
||||
@GetMapping("/searchById")
|
||||
@Operation(summary = "根据编号查询企业信息",description = "根据编号查询企业信息")
|
||||
public Result searchById(@RequestParam("enterpriseId") Integer enterpriseId){
|
||||
HashMap map = enterpriseService.searchById(enterpriseId);
|
||||
return Result.success(map);
|
||||
|
@ -85,6 +95,7 @@ public class EnterpriseController {
|
|||
* @return
|
||||
*/
|
||||
@PostMapping("/updateEnterEnterprise")
|
||||
@Operation(summary = "修改企业信息",description = "修改企业信息")
|
||||
public Result updateEnterprise(@RequestBody @Valid UpdateEnterprise form){
|
||||
Enterprise enterprise = new Enterprise();
|
||||
|
||||
|
@ -104,6 +115,7 @@ public class EnterpriseController {
|
|||
* @return
|
||||
*/
|
||||
@PostMapping("/deleteByIds")
|
||||
@Operation(summary = "删除企业信息",description = "删除企业信息")
|
||||
public Result deleteByIds(@RequestBody @Valid DeleteEnterpriseByIds form){
|
||||
int rows = enterpriseService.deleteByIds(form.getIds());
|
||||
return Result.success(rows);
|
||||
|
|
|
@ -13,7 +13,8 @@ import org.springframework.web.bind.annotation.*;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author:liuxinyue
|
||||
* 报文模版管理
|
||||
* @author liuxinyue
|
||||
* @Package:com.sheep.message.controller
|
||||
* @Project:cloud-server-c
|
||||
* @name:MessageTemplateTypeController
|
||||
|
|
|
@ -14,6 +14,13 @@ import org.springframework.web.bind.annotation.*;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 车辆管理
|
||||
* @author sx
|
||||
* @Package:com.template.controller
|
||||
* @name:SysCarController
|
||||
* @Date:2024/9/20 12:12
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/sysCar")
|
||||
@AllArgsConstructor
|
||||
|
|
|
@ -13,6 +13,7 @@ import io.swagger.v3.oas.annotations.Operation;
|
|||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
|
@ -29,6 +30,7 @@ import java.util.List;
|
|||
@RestController
|
||||
@RequestMapping("/breakdown")
|
||||
@Tag(name = "车辆故障码",description = "车辆故障码管理")
|
||||
@Log4j2
|
||||
public class SysCarFaultController extends BaseController
|
||||
{
|
||||
@Resource
|
||||
|
|
|
@ -10,6 +10,7 @@ import com.muyu.server.service.SysCarFaultLogService;
|
|||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
|
@ -26,6 +27,7 @@ import java.util.List;
|
|||
@RestController
|
||||
@RequestMapping("/log")
|
||||
@Tag(name = "车辆故障记录",description = "车辆故障记录管理")
|
||||
@Log4j2
|
||||
public class SysCarFaultLogController extends BaseController {
|
||||
@Autowired
|
||||
private SysCarFaultLogService service;
|
||||
|
@ -36,7 +38,7 @@ public class SysCarFaultLogController extends BaseController {
|
|||
* @return
|
||||
*/
|
||||
@PostMapping("/list")
|
||||
@Operation(summary = "查询故障记录列表")
|
||||
@Operation(summary = "查询故障记录列表",description = "查询故障记录列表")
|
||||
public Result<TableDataInfo<SysCarFaultLog>> list(@RequestBody SysCarFaultLog sysCarFaultLog){
|
||||
startPage();
|
||||
List<SysCarFaultLog> list = service.selectSysCarFaultLogList(sysCarFaultLog);
|
||||
|
@ -49,7 +51,7 @@ public class SysCarFaultLogController extends BaseController {
|
|||
* @return
|
||||
*/
|
||||
@PostMapping("/listStatusIgnore")
|
||||
@Operation(summary = "查询故障记录状态为忽略的数据列表")
|
||||
@Operation(summary = "查询故障记录状态为忽略的数据列表",description = "查询故障记录状态为忽略的数据列表")
|
||||
public Result<TableDataInfo<SysCarFaultLog>>listStatusIgnore(@RequestBody SysCarFaultLog sysCarFaultLog){
|
||||
startPage();
|
||||
List<SysCarFaultLog> list = service.listStatusIgnore(sysCarFaultLog);
|
||||
|
@ -63,7 +65,7 @@ public class SysCarFaultLogController extends BaseController {
|
|||
* @return
|
||||
*/
|
||||
@PostMapping("/listStatusSolve")
|
||||
@Operation(summary = "查询故障记录状态为已解决的数据列表")
|
||||
@Operation(summary = "查询故障记录状态为已解决的数据列表",description = "查询故障记录状态为已解决的数据列表")
|
||||
public Result<TableDataInfo<SysCarFaultLog>>listStatusSolve(@RequestBody SysCarFaultLog sysCarFaultLog){
|
||||
startPage();
|
||||
List<SysCarFaultLog> list = service.listStatusSolve(sysCarFaultLog);
|
||||
|
@ -76,7 +78,7 @@ public class SysCarFaultLogController extends BaseController {
|
|||
* @return
|
||||
*/
|
||||
@PostMapping("/listStatusProcess")
|
||||
@Operation(summary = "查询故障记录状态为处理中的数据列表")
|
||||
@Operation(summary = "查询故障记录状态为处理中的数据列表",description = "查询故障记录状态为处理中的数据列表")
|
||||
public Result<TableDataInfo<SysCarFaultLog>>listStatusProcess(@RequestBody SysCarFaultLog sysCarFaultLog){
|
||||
startPage();
|
||||
List<SysCarFaultLog> list = service.listStatusProcess(sysCarFaultLog);
|
||||
|
@ -89,7 +91,7 @@ public class SysCarFaultLogController extends BaseController {
|
|||
* @return
|
||||
*/
|
||||
@PostMapping("/add")
|
||||
@Operation(summary = "新增故障记录")
|
||||
@Operation(summary = "新增故障记录",description = "新增故障记录")
|
||||
public Result<Integer> add(@RequestBody SysCarFaultLog sysCarFaultLog){
|
||||
|
||||
return toAjax(service.save(sysCarFaultLog));
|
||||
|
@ -101,7 +103,7 @@ public class SysCarFaultLogController extends BaseController {
|
|||
* @param sysCarFaultLog
|
||||
*/
|
||||
@PostMapping("/export")
|
||||
@Operation(summary = "导出故障记录")
|
||||
@Operation(summary = "导出故障记录",description = "导出故障记录")
|
||||
public void export(HttpServletResponse response, SysCarFaultLog sysCarFaultLog){
|
||||
List<SysCarFaultLog> list = service.selectSysCarFaultLogList(sysCarFaultLog);
|
||||
ExcelUtil<SysCarFaultLog> util = new ExcelUtil<SysCarFaultLog>(SysCarFaultLog.class);
|
||||
|
@ -114,7 +116,7 @@ public class SysCarFaultLogController extends BaseController {
|
|||
* @return
|
||||
*/
|
||||
@PutMapping("/updateStatusById/{ids}")
|
||||
@Operation(summary = "把处理中的数据修改为忽略")
|
||||
@Operation(summary = "把处理中的数据修改为忽略",description = "把处理中的数据修改为忽略")
|
||||
public Result updateStatusById(@PathVariable("ids")String idsStr){
|
||||
Long[] ids = Arrays.stream(idsStr.split(","))
|
||||
.map(Long::valueOf)
|
||||
|
|
|
@ -6,6 +6,9 @@ import com.muyu.common.core.web.controller.BaseController;
|
|||
import com.muyu.common.core.web.page.TableDataInfo;
|
||||
import com.muyu.common.domain.SysCarFaultMessage;
|
||||
import com.muyu.server.service.SysCarFaultMessageService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
|
@ -21,15 +24,18 @@ import java.util.List;
|
|||
*/
|
||||
@RestController
|
||||
@RequestMapping("/message")
|
||||
@Log4j2
|
||||
@Tag(name = "站内信",description = "站内信管理")
|
||||
public class SysCarFaultMessageController extends BaseController {
|
||||
@Autowired
|
||||
private SysCarFaultMessageService service;
|
||||
|
||||
/**
|
||||
* 查询所有故障信息
|
||||
* 查询所有站内信信息
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
@Operation(summary = "查询所有站内信信息",description = "查询所有站内信信息")
|
||||
public Result<TableDataInfo<SysCarFaultMessage>> list(){
|
||||
startPage();
|
||||
List<SysCarFaultMessage> list = service.list();
|
||||
|
@ -37,11 +43,12 @@ public class SysCarFaultMessageController extends BaseController {
|
|||
}
|
||||
|
||||
/**
|
||||
* 查询状态为1的故障信息
|
||||
* 查询状态为已读的信息
|
||||
* @return
|
||||
*/
|
||||
|
||||
@GetMapping("/listStatusOne")
|
||||
@Operation(summary ="查询状态为以解决的故障信息",description = "查询状态为已解决的故障信息")
|
||||
public Result<TableDataInfo<SysCarFaultMessage>>listStatusOne(){
|
||||
startPage();
|
||||
List<SysCarFaultMessage> list = service.listStatusOnt();
|
||||
|
@ -49,10 +56,11 @@ public class SysCarFaultMessageController extends BaseController {
|
|||
}
|
||||
|
||||
/**
|
||||
* 查询状态为2的故障信息
|
||||
* 查询状态为未读的信息
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/listStatusTwo")
|
||||
@Operation(summary = "查询状态为未读的信息",description = "查询状态为未读的信息")
|
||||
public Result<TableDataInfo<SysCarFaultMessage>>listStatusTwo(){
|
||||
startPage();
|
||||
List<SysCarFaultMessage> list = service.listStatusTwo();
|
||||
|
@ -64,6 +72,7 @@ public class SysCarFaultMessageController extends BaseController {
|
|||
* @return
|
||||
*/
|
||||
@PutMapping("/updateStatusById/{id}")
|
||||
@Operation(summary = "修改未读站内信息为已读",description = "修改未读站内信息为已读")
|
||||
public Result updateStatusById(@PathVariable("id")Long id){
|
||||
UpdateWrapper<SysCarFaultMessage> wrapper = new UpdateWrapper<>();
|
||||
wrapper.eq("id",id);
|
||||
|
|
|
@ -14,7 +14,7 @@ import org.springframework.web.bind.annotation.RestController;
|
|||
|
||||
/**
|
||||
* 车辆日志管理 接口控制层
|
||||
* @author 袁子龙
|
||||
* @author liuxinyue
|
||||
* @package: com.muyu.breakdown.controller
|
||||
* @name: SysCarLogController
|
||||
* @date: 2024/9/22 14:39
|
||||
|
|
|
@ -6,6 +6,7 @@ import com.muyu.server.service.TemplateService;
|
|||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.apache.iotdb.rpc.IoTDBConnectionException;
|
||||
import org.apache.iotdb.rpc.StatementExecutionException;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -19,7 +20,8 @@ import java.util.List;
|
|||
import java.util.concurrent.ExecutionException;
|
||||
|
||||
/**
|
||||
* @Author:liuxinyue
|
||||
* 报文模版管理
|
||||
* @author liuxinyue
|
||||
* @Package:com.template.controller
|
||||
* @Project:cloud-server-c
|
||||
* @name:TemplateController
|
||||
|
@ -29,6 +31,7 @@ import java.util.concurrent.ExecutionException;
|
|||
@RequestMapping("/template")
|
||||
@AllArgsConstructor
|
||||
@Tag(name = "报文模版管理",description = "报文模版管理")
|
||||
@Log4j2
|
||||
public class TemplateController {
|
||||
|
||||
@Autowired
|
||||
|
|
|
@ -3,20 +3,34 @@ package com.muyu.server.controller;
|
|||
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.server.service.TemplateNeedService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 查询报文模版
|
||||
* @author sx
|
||||
* @Package:com.template.controller
|
||||
* @name:templateNeed
|
||||
* @Date:2024/9/20 12:12
|
||||
*/
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/templateNeed")
|
||||
@Tag(name = "查询报文模版",description = "查询报文模版")
|
||||
@Log4j2
|
||||
public class TemplateNeedController {
|
||||
@Autowired
|
||||
private TemplateNeedService templateNeedService;
|
||||
|
||||
|
||||
@GetMapping("/selectByTemplateId/{templateId}")
|
||||
@Operation(summary = "根据模板ID查询报文模版",description = "根据模板ID查询报文模版")
|
||||
public Result selectByTemplateId(@PathVariable("templateId") Long templateId){
|
||||
return Result.success(templateNeedService.selectByTemplateId(templateId));
|
||||
}
|
||||
|
|
|
@ -2,6 +2,9 @@ package com.muyu.server.controller;
|
|||
|
||||
import com.muyu.common.domain.WarnLogs;
|
||||
import com.muyu.server.service.WarnLogsService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
|
@ -20,6 +23,8 @@ import com.muyu.common.core.domain.Result;
|
|||
*/
|
||||
@RestController
|
||||
@RequestMapping("/logs")
|
||||
@Tag(name = "预警日志",description = "预警日志管理")
|
||||
@Log4j2
|
||||
public class WarnLogsController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
|
@ -29,6 +34,7 @@ public class WarnLogsController extends BaseController
|
|||
* 查询预警日志列表
|
||||
*/
|
||||
@GetMapping("/selectWarnLogsList")
|
||||
@Operation(summary = "预警日志列表",description = "预警日志列表")
|
||||
public Result selectWarnLogsList(){
|
||||
return Result.success(warnLogsService.selectWarnLogsList());
|
||||
}
|
||||
|
@ -38,6 +44,7 @@ public class WarnLogsController extends BaseController
|
|||
* 获取预警日志详细信息
|
||||
*/
|
||||
@GetMapping(value = "selectWarnLogsById/{id}")
|
||||
@Operation(summary = "根据ID查询预警日志信息",description = "根据ID查询预警日志信息")
|
||||
public Result selectWarnLogsById(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(warnLogsService.selectWarnLogsById(id));
|
||||
|
@ -47,6 +54,7 @@ public class WarnLogsController extends BaseController
|
|||
* 新增预警日志
|
||||
*/
|
||||
@PostMapping("/addWarnLogs")
|
||||
@Operation(summary = "新增预警日志",description = "新增预警日志")
|
||||
public Result<Integer> addWarnLogs(@RequestBody WarnLogs warnLogs)
|
||||
{
|
||||
int i = warnLogsService.addWarnLogs(warnLogs);
|
||||
|
|
|
@ -6,6 +6,9 @@ import javax.annotation.Resource;
|
|||
|
||||
import com.muyu.common.domain.WarnRule;
|
||||
import com.muyu.server.service.WarnRuleService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
|
@ -24,6 +27,8 @@ import com.muyu.common.core.domain.Result;
|
|||
*/
|
||||
@RestController
|
||||
@RequestMapping("/rule")
|
||||
@Tag(name = "预警规则管理",description = "预警规则管理")
|
||||
@Log4j2
|
||||
public class WarnRuleController extends BaseController
|
||||
{
|
||||
@Resource
|
||||
|
@ -33,6 +38,7 @@ public class WarnRuleController extends BaseController
|
|||
* 查询预警规则列表
|
||||
*/
|
||||
@GetMapping("/selectWarnRuleRespList")
|
||||
@Operation(summary = "预警规则列表",description = "预警规则列表")
|
||||
public Result selectWarnRuleRespList()
|
||||
{
|
||||
return Result.success(warnRuleService.selectWarnRuleRespList());
|
||||
|
@ -43,6 +49,7 @@ public class WarnRuleController extends BaseController
|
|||
*/
|
||||
|
||||
@GetMapping(value = "selectById/{id}")
|
||||
@Operation(summary = "根据ID查询预警规则信息",description = "根据ID查询预警规则信息")
|
||||
public Result<List<WarnRule>> selectById(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(warnRuleService.selectWarnRuleById(id));
|
||||
|
@ -53,6 +60,7 @@ public class WarnRuleController extends BaseController
|
|||
*/
|
||||
|
||||
@PostMapping("/addWarnRule")
|
||||
@Operation(summary = "新增预警规则",description = "新增预警规则")
|
||||
public Result<Integer> addWarnRule(@RequestBody WarnRule warnRule)
|
||||
{
|
||||
int i = warnRuleService.addWarnRule(warnRule);
|
||||
|
@ -64,6 +72,7 @@ public class WarnRuleController extends BaseController
|
|||
*/
|
||||
|
||||
@PostMapping("/updWarnRule")
|
||||
@Operation(summary = "修改预警规则",description = "修改预警规则")
|
||||
public Result updWarnRule(@RequestBody WarnRule warnRule)
|
||||
{
|
||||
int i = warnRuleService.updWarnRule(warnRule);
|
||||
|
@ -74,6 +83,7 @@ public class WarnRuleController extends BaseController
|
|||
* 删除预警规则
|
||||
*/
|
||||
@DeleteMapping("/{ids}")
|
||||
@Operation(summary = "删除预警规则",description = "删除预警规则")
|
||||
public Result remove(@PathVariable("ids") Long[] ids)
|
||||
{
|
||||
warnRuleService.removeBatchByIds(Arrays.asList(ids));
|
||||
|
@ -84,6 +94,7 @@ public class WarnRuleController extends BaseController
|
|||
|
||||
//根据策略ID查规则
|
||||
@GetMapping("/selectListByStrategyId/{strategyId}")
|
||||
@Operation(summary = "根据策略ID查询预警规则列表",description = "根据策略ID查询预警规则列表")
|
||||
public Result selectListByStrategyId(@PathVariable("strategyId") Long strategyId){
|
||||
return Result.success(warnRuleService.selectListByStrategyId(strategyId));
|
||||
}
|
||||
|
|
|
@ -4,7 +4,8 @@ import jakarta.validation.constraints.NotEmpty;
|
|||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Author YuPing
|
||||
* 删除企业信息
|
||||
* @author yuping
|
||||
* @Description 删除企业信息
|
||||
* @Version 1.0
|
||||
* @Data 2024-09-26 22:05:47
|
||||
|
|
|
@ -5,10 +5,11 @@ import jakarta.validation.constraints.NotNull;
|
|||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Author YuPing
|
||||
* @Description 新增企业信息表单
|
||||
* @Version 1.0
|
||||
* @Data 2024-09-26 21:16:06
|
||||
* 新增企业信息表单
|
||||
* @author yuping
|
||||
* @package com.muyu.server.controller.form
|
||||
* @name InsertEnterprise
|
||||
* @Date 2024/9/29 12:06
|
||||
*/
|
||||
@Data
|
||||
public class InsertEnterprise {
|
||||
|
|
|
@ -6,10 +6,11 @@ import lombok.Data;
|
|||
import org.hibernate.validator.constraints.Range;
|
||||
|
||||
/**
|
||||
* @Author YuPing
|
||||
* @Description 企业名称查询表单
|
||||
* @Version 1.0
|
||||
* @Data 2024-09-26 20:48:33
|
||||
* 企业名称查询表单
|
||||
* @author yuping
|
||||
* @package com.muyu.server.controller.form
|
||||
* @name SearchEnterpriseName
|
||||
* @Date 2024/9/29 12:06
|
||||
*/
|
||||
@Data
|
||||
public class SearchEnterpriseName {
|
||||
|
|
|
@ -7,10 +7,11 @@ import jakarta.validation.constraints.Pattern;
|
|||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Author YuPing
|
||||
* @Description 修改企业信息
|
||||
* @Version 1.0
|
||||
* @Data 2024-09-26 21:22:05
|
||||
* 修改企业信息
|
||||
* @author yuping
|
||||
* @package com.muyu.server.controller.form
|
||||
* @name UpdateEnterprise
|
||||
* @Date 2024/9/29 12:06
|
||||
*/
|
||||
@Data
|
||||
public class UpdateEnterprise {
|
||||
|
|
|
@ -9,6 +9,13 @@ import org.apache.ibatis.annotations.Select;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 车辆类型Mapper接口
|
||||
* @author sx
|
||||
* @package com.muyu.server.mapper
|
||||
* @name CarTypeMapper
|
||||
* @Date 2024/9/29 12:06
|
||||
*/
|
||||
@Mapper
|
||||
public interface CarTypeMapper extends BaseMapper<CarType> {
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ import org.apache.ibatis.annotations.Mapper;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 故障记录日志 管理层
|
||||
* 故障记录日志 Mapper接口
|
||||
* @author 袁子龙
|
||||
* @package com.muyu.breakdown.mapper
|
||||
* @name: SysCarFaultLogMapper
|
||||
|
|
|
@ -9,10 +9,11 @@ import org.apache.ibatis.annotations.Param;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 预警日志Mapper接口
|
||||
*
|
||||
* @author muyu
|
||||
* @date 2024-09-20
|
||||
* 车辆预警日志 Mapper 接口
|
||||
* @author sx
|
||||
* @package com.muyu.server.mapper
|
||||
* @name WarnLogsMapper
|
||||
* @date 2024-09-29 12:21:09
|
||||
*/
|
||||
@Mapper
|
||||
public interface WarnLogsMapper extends BaseMapper<WarnLogs> {
|
||||
|
|
|
@ -11,8 +11,9 @@ import java.util.List;
|
|||
|
||||
/**
|
||||
* 预警规则Mapper接口
|
||||
*
|
||||
* @author muyu
|
||||
* @author sx
|
||||
* @package com.muyu.server.mapper
|
||||
* @name WarnRuleMapper
|
||||
* @date 2024-09-20
|
||||
*/
|
||||
@Mapper
|
||||
|
|
|
@ -12,8 +12,9 @@ import java.util.List;
|
|||
|
||||
/**
|
||||
* 预警策略Mapper接口
|
||||
*
|
||||
* @author muyu
|
||||
* @package com.muyu.server.mapper
|
||||
* @name WarnStrategyMapper
|
||||
* @date 2024-09-20
|
||||
*/
|
||||
@Mapper
|
||||
|
|
Loading…
Reference in New Issue