故障类型的编写
parent
c8cd62c1be
commit
2ed82cdd80
|
@ -3,7 +3,8 @@ package com.muyu.fault.controller;
|
||||||
|
|
||||||
import com.muyu.common.core.domain.Result;
|
import com.muyu.common.core.domain.Result;
|
||||||
import com.muyu.fault.common.FaultLog;
|
import com.muyu.fault.common.FaultLog;
|
||||||
import com.muyu.fault.service.impl.FaultLogService;
|
import com.muyu.fault.service.FaultLogService;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
@ -12,6 +13,7 @@ import java.util.List;
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/log")
|
@RequestMapping("/log")
|
||||||
|
@Tag(name = "故障日志",description = "对故障记录日志")
|
||||||
public class FaultLogController{
|
public class FaultLogController{
|
||||||
@Autowired
|
@Autowired
|
||||||
private FaultLogService faultLogService;
|
private FaultLogService faultLogService;
|
||||||
|
|
|
@ -4,7 +4,8 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||||
import com.muyu.common.core.domain.Result;
|
import com.muyu.common.core.domain.Result;
|
||||||
import com.muyu.common.security.utils.SecurityUtils;
|
import com.muyu.common.security.utils.SecurityUtils;
|
||||||
import com.muyu.fault.common.FaultMessage;
|
import com.muyu.fault.common.FaultMessage;
|
||||||
import com.muyu.fault.service.impl.FaultMessageService;
|
import com.muyu.fault.service.FaultMessageService;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
@ -12,6 +13,7 @@ import java.util.List;
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/message")
|
@RequestMapping("/message")
|
||||||
|
@Tag(name = "站内信的管理",description = "对站内信息的处理与查看")
|
||||||
public class FaultMessageController {
|
public class FaultMessageController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private FaultMessageService faultMessageService;
|
private FaultMessageService faultMessageService;
|
||||||
|
@ -43,7 +45,7 @@ public class FaultMessageController {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value = "/selectOne",method = RequestMethod.POST)
|
@RequestMapping(value = "/selectOne",method = RequestMethod.POST)
|
||||||
public Result selectOne(){
|
public Result<List<FaultMessage>> selectOne(){
|
||||||
List<FaultMessage> one = faultMessageService.selectOne();
|
List<FaultMessage> one = faultMessageService.selectOne();
|
||||||
return Result.success(one);
|
return Result.success(one);
|
||||||
}
|
}
|
||||||
|
@ -53,7 +55,7 @@ public class FaultMessageController {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value = "/selectTwo",method = RequestMethod.POST)
|
@RequestMapping(value = "/selectTwo",method = RequestMethod.POST)
|
||||||
public Result selectTwo(){
|
public Result<List<FaultMessage>> selectTwo(){
|
||||||
List<FaultMessage> one = faultMessageService.selectTwo();
|
List<FaultMessage> one = faultMessageService.selectTwo();
|
||||||
return Result.success(one);
|
return Result.success(one);
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,29 @@
|
||||||
|
package com.muyu.fault.controller;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.muyu.common.core.domain.Result;
|
||||||
|
import com.muyu.fault.common.FaultType;
|
||||||
|
import com.muyu.fault.service.FaultTypeService;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/type")
|
||||||
|
@Tag(name = "故障类型",description = "对故障类型的定义")
|
||||||
|
public class FaultTypeController {
|
||||||
|
@Autowired
|
||||||
|
private FaultTypeService faultTypeService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 故障类型表
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "faultTypeList",method = RequestMethod.GET)
|
||||||
|
public Result faultTypeList(){
|
||||||
|
LambdaQueryWrapper<FaultType> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
return Result.success(faultTypeService.list(queryWrapper));
|
||||||
|
}
|
||||||
|
}
|
|
@ -2,12 +2,9 @@ package com.muyu.fault.controller;
|
||||||
|
|
||||||
|
|
||||||
import com.muyu.common.core.domain.Result;
|
import com.muyu.common.core.domain.Result;
|
||||||
import com.muyu.common.security.utils.SecurityUtils;
|
|
||||||
import com.muyu.fault.common.FaultLog;
|
|
||||||
import com.muyu.fault.common.FaultMessage;
|
|
||||||
import com.muyu.fault.common.FaultrRule;
|
import com.muyu.fault.common.FaultrRule;
|
||||||
import com.muyu.fault.common.SysCarFault;
|
import com.muyu.fault.service.FaultrRuleService;
|
||||||
import com.muyu.fault.service.impl.FaultrRuleService;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
@ -16,6 +13,7 @@ import java.util.List;
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/rule")
|
@RequestMapping("/rule")
|
||||||
|
@Tag(name = "故障的规则",description = "对故障数据规则的判断")
|
||||||
public class FaultrRuleController {
|
public class FaultrRuleController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private FaultrRuleService faultrRuleService;
|
private FaultrRuleService faultrRuleService;
|
||||||
|
|
|
@ -7,21 +7,22 @@ import com.muyu.common.core.web.controller.BaseController;
|
||||||
import com.muyu.common.security.utils.SecurityUtils;
|
import com.muyu.common.security.utils.SecurityUtils;
|
||||||
import com.muyu.fault.common.FaultLog;
|
import com.muyu.fault.common.FaultLog;
|
||||||
import com.muyu.fault.common.SysCarFault;
|
import com.muyu.fault.common.SysCarFault;
|
||||||
import com.muyu.fault.service.impl.FaultLogService;
|
import com.muyu.fault.service.FaultLogService;
|
||||||
import com.muyu.fault.service.impl.SysCarFaultService;
|
import com.muyu.fault.service.SysCarFaultService;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/faultInfo")
|
@RequestMapping("/faultInfo")
|
||||||
|
@Tag(name = "故障管理",description = "故障的管理与查看")
|
||||||
public class SysCarFaultController extends BaseController
|
public class SysCarFaultController extends BaseController
|
||||||
{
|
{
|
||||||
@Resource
|
@Resource
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
package com.muyu.fault.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.muyu.fault.common.FaultType;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface FaultTypeMapper extends BaseMapper<FaultType> {
|
||||||
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
package com.muyu.fault.service.impl;
|
package com.muyu.fault.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.muyu.fault.common.FaultLog;
|
import com.muyu.fault.common.FaultLog;
|
||||||
|
@ -10,4 +10,5 @@ public interface FaultLogService extends IService<FaultLog> {
|
||||||
|
|
||||||
|
|
||||||
FaultLog byidId(Long faultLogId);
|
FaultLog byidId(Long faultLogId);
|
||||||
|
|
||||||
}
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
package com.muyu.fault.service.impl;
|
package com.muyu.fault.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.muyu.fault.common.FaultMessage;
|
import com.muyu.fault.common.FaultMessage;
|
|
@ -0,0 +1,7 @@
|
||||||
|
package com.muyu.fault.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.muyu.fault.common.FaultType;
|
||||||
|
|
||||||
|
public interface FaultTypeService extends IService<FaultType> {
|
||||||
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
package com.muyu.fault.service.impl;
|
package com.muyu.fault.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.muyu.fault.common.FaultrRule;
|
import com.muyu.fault.common.FaultrRule;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.muyu.fault.service.impl;
|
package com.muyu.fault.service;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
|
@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.muyu.common.core.utils.StringUtils;
|
import com.muyu.common.core.utils.StringUtils;
|
||||||
import com.muyu.fault.common.FaultLog;
|
import com.muyu.fault.common.FaultLog;
|
||||||
import com.muyu.fault.mapper.FaultLogMapper;
|
import com.muyu.fault.mapper.FaultLogMapper;
|
||||||
|
import com.muyu.fault.service.FaultLogService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.util.Assert;
|
import org.springframework.util.Assert;
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,7 @@ import com.muyu.common.core.utils.StringUtils;
|
||||||
import com.muyu.common.security.utils.SecurityUtils;
|
import com.muyu.common.security.utils.SecurityUtils;
|
||||||
import com.muyu.fault.common.FaultMessage;
|
import com.muyu.fault.common.FaultMessage;
|
||||||
import com.muyu.fault.mapper.FaultMessageMapper;
|
import com.muyu.fault.mapper.FaultMessageMapper;
|
||||||
|
import com.muyu.fault.service.FaultMessageService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
package com.muyu.fault.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.muyu.fault.common.FaultType;
|
||||||
|
import com.muyu.fault.mapper.FaultTypeMapper;
|
||||||
|
import com.muyu.fault.service.FaultTypeService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class FaultTypeServiceImpl extends ServiceImpl<FaultTypeMapper, FaultType> implements FaultTypeService {
|
||||||
|
}
|
|
@ -3,9 +3,9 @@ package com.muyu.fault.service.impl;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.muyu.common.core.utils.StringUtils;
|
import com.muyu.common.core.utils.StringUtils;
|
||||||
import com.muyu.fault.common.FaultLog;
|
|
||||||
import com.muyu.fault.common.FaultrRule;
|
import com.muyu.fault.common.FaultrRule;
|
||||||
import com.muyu.fault.mapper.FaultrRuleMapper;
|
import com.muyu.fault.mapper.FaultrRuleMapper;
|
||||||
|
import com.muyu.fault.service.FaultrRuleService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.util.Assert;
|
import org.springframework.util.Assert;
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@ package com.muyu.fault.service.impl;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.muyu.fault.common.SysCarFault;
|
import com.muyu.fault.common.SysCarFault;
|
||||||
|
import com.muyu.fault.service.SysCarFaultService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.muyu.fault.mapper.SysCarFaultMapper;
|
import com.muyu.fault.mapper.SysCarFaultMapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
|
Loading…
Reference in New Issue