故障
This commit is contained in:
parent
e50703034d
commit
c4978f239a
|
@ -5,6 +5,8 @@ import lombok.Data;
|
||||||
import com.ruoyi.common.annotation.Excel;
|
import com.ruoyi.common.annotation.Excel;
|
||||||
import com.ruoyi.common.core.domain.BaseEntity;
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 故障对象 bst_fault
|
* 故障对象 bst_fault
|
||||||
*
|
*
|
||||||
|
@ -36,7 +38,7 @@ public class Fault extends BaseEntity
|
||||||
|
|
||||||
@Excel(name = "故障部位")
|
@Excel(name = "故障部位")
|
||||||
@ApiModelProperty("故障部位")
|
@ApiModelProperty("故障部位")
|
||||||
private String faultSite;
|
private List<String> faultSite;
|
||||||
|
|
||||||
@Excel(name = "故障详情")
|
@Excel(name = "故障详情")
|
||||||
@ApiModelProperty("故障详情")
|
@ApiModelProperty("故障详情")
|
||||||
|
|
|
@ -3,13 +3,14 @@ package com.ruoyi.bst.fault.domain;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class FaultQuery extends Fault{
|
public class FaultQuery extends Fault{
|
||||||
|
|
||||||
@ApiModelProperty("故障部位")
|
@ApiModelProperty("故障部位")
|
||||||
private String faultSite;
|
private List<String> faultSite;
|
||||||
|
|
||||||
@ApiModelProperty("报修进度")
|
@ApiModelProperty("报修进度")
|
||||||
private String appealStatus;
|
private String appealStatus;
|
||||||
|
|
|
@ -1,22 +1,33 @@
|
||||||
package com.ruoyi.web.app;
|
package com.ruoyi.web.app;
|
||||||
|
|
||||||
|
import com.ruoyi.bst.fault.domain.FaultVO;
|
||||||
import com.ruoyi.bst.fault.service.FaultService;
|
import com.ruoyi.bst.fault.service.FaultService;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.utils.SecurityUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户查询自己提交的故障信息
|
||||||
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("app/fault")
|
@RequestMapping("/app/fault")
|
||||||
public class AppFaultController {
|
public class AppFaultController {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private FaultService faultService;
|
private FaultService faultService;
|
||||||
//TODO : 前台用户查询自己提交的申报信息
|
|
||||||
@GetMapping("/{id}")
|
@GetMapping("/{id}")
|
||||||
public AjaxResult get(@PathVariable Long id) {
|
public AjaxResult get(@PathVariable Long id) {
|
||||||
|
Long userId = SecurityUtils.getLoginUser().getUserId();
|
||||||
|
// 当用户查询的故障信息是自己的或当前用户是超级管理员时
|
||||||
|
if (userId.equals(id)|| userId == 1){
|
||||||
|
FaultVO faultVO = faultService.selectFaultById(id);
|
||||||
|
return AjaxResult.success(faultVO);
|
||||||
|
}
|
||||||
|
return AjaxResult.error("您的查询不合法!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user