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