| | |
| | | package org.jeecg.modules.eam.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | |
| | | @ApiModelProperty(value = "故障分类") |
| | | @Dict(dicCode = "fault_reason_category") |
| | | private String faultCategory; |
| | | |
| | | @TableField(exist = false) |
| | | private String text; |
| | | @TableField(exist = false) |
| | | private String value; |
| | | } |
| | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | /** |
| | | * @Description: 设备故障原因维护 |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-03-19 |
| | |
| | | queryWrapper.eq("del_flag", CommonConstant.DEL_FLAG_0); |
| | | Page<EamEquipmentFaultReason> page = new Page<EamEquipmentFaultReason>(pageNo, pageSize); |
| | | IPage<EamEquipmentFaultReason> pageList = eamEquipmentFaultReasonService.page(page, queryWrapper); |
| | | List<EamEquipmentFaultReason> records = pageList.getRecords(); |
| | | records.forEach(r ->{ |
| | | r.setText(r.getFaultName()); |
| | | r.setValue(r.getId()); |
| | | }); |
| | | return Result.OK(pageList); |
| | | } |
| | | |