parent
22f87b2bf7
commit
2924d20b32
29 changed files with 1540 additions and 2 deletions
@ -0,0 +1,47 @@ |
|||||||
|
package org.springblade.desk.device.pojo.entity; |
||||||
|
|
||||||
|
import lombok.Data; |
||||||
|
import io.swagger.v3.oas.annotations.media.Schema; |
||||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||||
|
|
||||||
|
import java.math.BigDecimal; |
||||||
|
import java.util.Date; |
||||||
|
|
||||||
|
import lombok.EqualsAndHashCode; |
||||||
|
import org.springblade.core.mp.base.BaseEntity; |
||||||
|
import org.springblade.core.tenant.mp.TenantEntity; |
||||||
|
|
||||||
|
import java.io.Serial; |
||||||
|
|
||||||
|
/** |
||||||
|
* 量具信息 实体类 |
||||||
|
* |
||||||
|
* @author qyl |
||||||
|
* @since 2025-12-29 |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
@TableName("MES_MEA_TOOL") |
||||||
|
@Schema(description = "MeaTool对象") |
||||||
|
@EqualsAndHashCode(callSuper = true) |
||||||
|
public class MeaToolEntity extends BaseEntity { |
||||||
|
|
||||||
|
@Serial |
||||||
|
private static final long serialVersionUID = 1L; |
||||||
|
|
||||||
|
/** |
||||||
|
* 序号 |
||||||
|
*/ |
||||||
|
@Schema(description = "序号") |
||||||
|
private String orders; |
||||||
|
/** |
||||||
|
* 尺寸 |
||||||
|
*/ |
||||||
|
@Schema(description = "尺寸") |
||||||
|
private String mtSize; |
||||||
|
/** |
||||||
|
* 量具 |
||||||
|
*/ |
||||||
|
@Schema(description = "量具") |
||||||
|
private String mtName; |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,62 @@ |
|||||||
|
package org.springblade.desk.device.pojo.entity; |
||||||
|
|
||||||
|
import lombok.Data; |
||||||
|
import io.swagger.v3.oas.annotations.media.Schema; |
||||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||||
|
|
||||||
|
import java.math.BigDecimal; |
||||||
|
import java.util.Date; |
||||||
|
|
||||||
|
import lombok.EqualsAndHashCode; |
||||||
|
import org.springblade.core.mp.base.BaseEntity; |
||||||
|
import org.springblade.core.tenant.mp.TenantEntity; |
||||||
|
|
||||||
|
import java.io.Serial; |
||||||
|
|
||||||
|
/** |
||||||
|
* 量具保养 实体类 |
||||||
|
* |
||||||
|
* @author qyl |
||||||
|
* @since 2025-12-29 |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
@TableName("MES_MEASURING_UPKEEP") |
||||||
|
@Schema(description = "MeasuringUpkeep对象") |
||||||
|
@EqualsAndHashCode(callSuper = true) |
||||||
|
public class MeasuringUpkeepEntity extends BaseEntity { |
||||||
|
|
||||||
|
@Serial |
||||||
|
private static final long serialVersionUID = 1L; |
||||||
|
|
||||||
|
/** |
||||||
|
* 保养单号 |
||||||
|
*/ |
||||||
|
@Schema(description = "保养单号") |
||||||
|
private String mmCode; |
||||||
|
/** |
||||||
|
* 库存物料;外键(库存物料) |
||||||
|
*/ |
||||||
|
@Schema(description = "库存物料;外键(库存物料)") |
||||||
|
private Long miId; |
||||||
|
/** |
||||||
|
* 备注 |
||||||
|
*/ |
||||||
|
@Schema(description = "备注") |
||||||
|
private String memo; |
||||||
|
/** |
||||||
|
* |
||||||
|
*/ |
||||||
|
@Schema(description = "") |
||||||
|
private Long createMan; |
||||||
|
/** |
||||||
|
* 审批状态;-1 |
||||||
|
*/ |
||||||
|
@Schema(description = "审批状态;-1") |
||||||
|
private Short approvalStatus; |
||||||
|
/** |
||||||
|
* 库存物料 |
||||||
|
*/ |
||||||
|
@Schema(description = "库存物料") |
||||||
|
private Long rlsId; |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,71 @@ |
|||||||
|
package org.springblade.desk.device.pojo.entity; |
||||||
|
|
||||||
|
import lombok.Data; |
||||||
|
import io.swagger.v3.oas.annotations.media.Schema; |
||||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||||
|
|
||||||
|
import java.math.BigDecimal; |
||||||
|
import java.util.Date; |
||||||
|
|
||||||
|
import lombok.EqualsAndHashCode; |
||||||
|
import org.springblade.core.mp.base.BaseEntity; |
||||||
|
|
||||||
|
import java.io.Serial; |
||||||
|
|
||||||
|
/** |
||||||
|
* 设备维修记录 实体类 |
||||||
|
* |
||||||
|
* @author qyl |
||||||
|
* @since 2025-12-29 |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
@TableName("MES_UPKEEP_RECORDS") |
||||||
|
@Schema(description = "UpkeepRecords对象") |
||||||
|
@EqualsAndHashCode(callSuper = true) |
||||||
|
public class UpkeepRecordsEntity extends BaseEntity { |
||||||
|
|
||||||
|
@Serial |
||||||
|
private static final long serialVersionUID = 1L; |
||||||
|
|
||||||
|
/** |
||||||
|
* 设备 |
||||||
|
*/ |
||||||
|
@Schema(description = "设备") |
||||||
|
private String device; |
||||||
|
/** |
||||||
|
* 设备编号 |
||||||
|
*/ |
||||||
|
@Schema(description = "设备编号") |
||||||
|
private String deviceCode; |
||||||
|
/** |
||||||
|
* 故障日期 |
||||||
|
*/ |
||||||
|
@Schema(description = "故障日期") |
||||||
|
private Date faultDate; |
||||||
|
/** |
||||||
|
* 故障描述 |
||||||
|
*/ |
||||||
|
@Schema(description = "故障描述") |
||||||
|
private String faultMemo; |
||||||
|
/** |
||||||
|
* 维修日期 |
||||||
|
*/ |
||||||
|
@Schema(description = "维修日期") |
||||||
|
private Date upkeepDate; |
||||||
|
/** |
||||||
|
* 维修结果 |
||||||
|
*/ |
||||||
|
@Schema(description = "维修结果") |
||||||
|
private String upkeepResult; |
||||||
|
/** |
||||||
|
* 备注 |
||||||
|
*/ |
||||||
|
@Schema(description = "备注") |
||||||
|
private String memo; |
||||||
|
/** |
||||||
|
* 维修人 |
||||||
|
*/ |
||||||
|
@Schema(description = "维修人") |
||||||
|
private String upkeepMan; |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,70 @@ |
|||||||
|
package org.springblade.desk.device.pojo.excel; |
||||||
|
|
||||||
|
|
||||||
|
import lombok.Data; |
||||||
|
|
||||||
|
import java.math.BigDecimal; |
||||||
|
import java.util.Date; |
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty; |
||||||
|
import com.alibaba.excel.annotation.write.style.ColumnWidth; |
||||||
|
import com.alibaba.excel.annotation.write.style.ContentRowHeight; |
||||||
|
import com.alibaba.excel.annotation.write.style.HeadRowHeight; |
||||||
|
|
||||||
|
import java.io.Serializable; |
||||||
|
import java.io.Serial; |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 量具信息 Excel实体类 |
||||||
|
* |
||||||
|
* @author qyl |
||||||
|
* @since 2025-12-29 |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
@ColumnWidth(25) |
||||||
|
@HeadRowHeight(20) |
||||||
|
@ContentRowHeight(18) |
||||||
|
public class MeaToolExcel implements Serializable { |
||||||
|
|
||||||
|
@Serial |
||||||
|
private static final long serialVersionUID = 1L; |
||||||
|
|
||||||
|
/** |
||||||
|
* 序号 |
||||||
|
*/ |
||||||
|
@ColumnWidth(20) |
||||||
|
@ExcelProperty("序号") |
||||||
|
private String orders; |
||||||
|
/** |
||||||
|
* 流水号 |
||||||
|
*/ |
||||||
|
@ColumnWidth(20) |
||||||
|
@ExcelProperty("流水号") |
||||||
|
private BigDecimal id; |
||||||
|
/** |
||||||
|
* |
||||||
|
*/ |
||||||
|
@ColumnWidth(20) |
||||||
|
@ExcelProperty("") |
||||||
|
private String tenantId; |
||||||
|
/** |
||||||
|
* 删除标记;1:删除,0:正常 |
||||||
|
*/ |
||||||
|
@ColumnWidth(20) |
||||||
|
@ExcelProperty("删除标记;1:删除,0:正常") |
||||||
|
private Long isDeleted; |
||||||
|
/** |
||||||
|
* 尺寸 |
||||||
|
*/ |
||||||
|
@ColumnWidth(20) |
||||||
|
@ExcelProperty("尺寸") |
||||||
|
private String mtSize; |
||||||
|
/** |
||||||
|
* 量具 |
||||||
|
*/ |
||||||
|
@ColumnWidth(20) |
||||||
|
@ExcelProperty("量具") |
||||||
|
private String mtName; |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,88 @@ |
|||||||
|
package org.springblade.desk.device.pojo.excel; |
||||||
|
|
||||||
|
|
||||||
|
import lombok.Data; |
||||||
|
|
||||||
|
import java.math.BigDecimal; |
||||||
|
import java.util.Date; |
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty; |
||||||
|
import com.alibaba.excel.annotation.write.style.ColumnWidth; |
||||||
|
import com.alibaba.excel.annotation.write.style.ContentRowHeight; |
||||||
|
import com.alibaba.excel.annotation.write.style.HeadRowHeight; |
||||||
|
|
||||||
|
import java.io.Serializable; |
||||||
|
import java.io.Serial; |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 量具保养 Excel实体类 |
||||||
|
* |
||||||
|
* @author qyl |
||||||
|
* @since 2025-12-29 |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
@ColumnWidth(25) |
||||||
|
@HeadRowHeight(20) |
||||||
|
@ContentRowHeight(18) |
||||||
|
public class MeasuringUpkeepExcel implements Serializable { |
||||||
|
|
||||||
|
@Serial |
||||||
|
private static final long serialVersionUID = 1L; |
||||||
|
|
||||||
|
/** |
||||||
|
* 流水号 |
||||||
|
*/ |
||||||
|
@ColumnWidth(20) |
||||||
|
@ExcelProperty("流水号") |
||||||
|
private BigDecimal id; |
||||||
|
/** |
||||||
|
* |
||||||
|
*/ |
||||||
|
@ColumnWidth(20) |
||||||
|
@ExcelProperty("") |
||||||
|
private String tenantId; |
||||||
|
/** |
||||||
|
* 删除标记;1:删除,0:正常 |
||||||
|
*/ |
||||||
|
@ColumnWidth(20) |
||||||
|
@ExcelProperty("删除标记;1:删除,0:正常") |
||||||
|
private Long isDeleted; |
||||||
|
/** |
||||||
|
* 保养单号 |
||||||
|
*/ |
||||||
|
@ColumnWidth(20) |
||||||
|
@ExcelProperty("保养单号") |
||||||
|
private String mmCode; |
||||||
|
/** |
||||||
|
* 库存物料;外键(库存物料) |
||||||
|
*/ |
||||||
|
@ColumnWidth(20) |
||||||
|
@ExcelProperty("库存物料;外键(库存物料)") |
||||||
|
private Long miId; |
||||||
|
/** |
||||||
|
* 备注 |
||||||
|
*/ |
||||||
|
@ColumnWidth(20) |
||||||
|
@ExcelProperty("备注") |
||||||
|
private String memo; |
||||||
|
/** |
||||||
|
* |
||||||
|
*/ |
||||||
|
@ColumnWidth(20) |
||||||
|
@ExcelProperty("") |
||||||
|
private Long createMan; |
||||||
|
/** |
||||||
|
* 审批状态;-1 |
||||||
|
*/ |
||||||
|
@ColumnWidth(20) |
||||||
|
@ExcelProperty("审批状态;-1") |
||||||
|
private Short approvalStatus; |
||||||
|
/** |
||||||
|
* 库存物料 |
||||||
|
*/ |
||||||
|
@ColumnWidth(20) |
||||||
|
@ExcelProperty("库存物料") |
||||||
|
private Long rlsId; |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,100 @@ |
|||||||
|
package org.springblade.desk.device.pojo.excel; |
||||||
|
|
||||||
|
|
||||||
|
import lombok.Data; |
||||||
|
|
||||||
|
import java.math.BigDecimal; |
||||||
|
import java.util.Date; |
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty; |
||||||
|
import com.alibaba.excel.annotation.write.style.ColumnWidth; |
||||||
|
import com.alibaba.excel.annotation.write.style.ContentRowHeight; |
||||||
|
import com.alibaba.excel.annotation.write.style.HeadRowHeight; |
||||||
|
|
||||||
|
import java.io.Serializable; |
||||||
|
import java.io.Serial; |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 设备维修记录 Excel实体类 |
||||||
|
* |
||||||
|
* @author qyl |
||||||
|
* @since 2025-12-29 |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
@ColumnWidth(25) |
||||||
|
@HeadRowHeight(20) |
||||||
|
@ContentRowHeight(18) |
||||||
|
public class UpkeepRecordsExcel implements Serializable { |
||||||
|
|
||||||
|
@Serial |
||||||
|
private static final long serialVersionUID = 1L; |
||||||
|
|
||||||
|
/** |
||||||
|
* 流水号 |
||||||
|
*/ |
||||||
|
@ColumnWidth(20) |
||||||
|
@ExcelProperty("流水号") |
||||||
|
private BigDecimal id; |
||||||
|
/** |
||||||
|
* |
||||||
|
*/ |
||||||
|
@ColumnWidth(20) |
||||||
|
@ExcelProperty("") |
||||||
|
private String tenantId; |
||||||
|
/** |
||||||
|
* 删除标记;1:删除,0:正常 |
||||||
|
*/ |
||||||
|
@ColumnWidth(20) |
||||||
|
@ExcelProperty("删除标记;1:删除,0:正常") |
||||||
|
private Long isDeleted; |
||||||
|
/** |
||||||
|
* 设备 |
||||||
|
*/ |
||||||
|
@ColumnWidth(20) |
||||||
|
@ExcelProperty("设备") |
||||||
|
private String device; |
||||||
|
/** |
||||||
|
* 设备编号 |
||||||
|
*/ |
||||||
|
@ColumnWidth(20) |
||||||
|
@ExcelProperty("设备编号") |
||||||
|
private String deviceCode; |
||||||
|
/** |
||||||
|
* 故障日期 |
||||||
|
*/ |
||||||
|
@ColumnWidth(20) |
||||||
|
@ExcelProperty("故障日期") |
||||||
|
private Date faultDate; |
||||||
|
/** |
||||||
|
* 故障描述 |
||||||
|
*/ |
||||||
|
@ColumnWidth(20) |
||||||
|
@ExcelProperty("故障描述") |
||||||
|
private String faultMemo; |
||||||
|
/** |
||||||
|
* 维修日期 |
||||||
|
*/ |
||||||
|
@ColumnWidth(20) |
||||||
|
@ExcelProperty("维修日期") |
||||||
|
private Date upkeepDate; |
||||||
|
/** |
||||||
|
* 维修结果 |
||||||
|
*/ |
||||||
|
@ColumnWidth(20) |
||||||
|
@ExcelProperty("维修结果") |
||||||
|
private String upkeepResult; |
||||||
|
/** |
||||||
|
* 备注 |
||||||
|
*/ |
||||||
|
@ColumnWidth(20) |
||||||
|
@ExcelProperty("备注") |
||||||
|
private String memo; |
||||||
|
/** |
||||||
|
* 维修人 |
||||||
|
*/ |
||||||
|
@ColumnWidth(20) |
||||||
|
@ExcelProperty("维修人") |
||||||
|
private String upkeepMan; |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,31 @@ |
|||||||
|
package org.springblade.desk.device.pojo.vo; |
||||||
|
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
||||||
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
||||||
|
import org.springblade.desk.device.pojo.entity.MeaToolEntity; |
||||||
|
import lombok.Data; |
||||||
|
import lombok.EqualsAndHashCode; |
||||||
|
|
||||||
|
import java.io.Serial; |
||||||
|
|
||||||
|
/** |
||||||
|
* 量具信息 视图实体类 |
||||||
|
* |
||||||
|
* @author qyl |
||||||
|
* @since 2025-12-29 |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
@EqualsAndHashCode(callSuper = true) |
||||||
|
public class MeaToolVO extends MeaToolEntity { |
||||||
|
@Serial |
||||||
|
private static final long serialVersionUID = 1L; |
||||||
|
/** |
||||||
|
* 主键ID |
||||||
|
*/ |
||||||
|
@JsonSerialize(using = ToStringSerializer.class) |
||||||
|
private Long id; |
||||||
|
/** |
||||||
|
* 状态名称 |
||||||
|
*/ |
||||||
|
String statusName; |
||||||
|
} |
||||||
@ -0,0 +1,31 @@ |
|||||||
|
package org.springblade.desk.device.pojo.vo; |
||||||
|
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
||||||
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
||||||
|
import org.springblade.desk.device.pojo.entity.MeasuringUpkeepEntity; |
||||||
|
import lombok.Data; |
||||||
|
import lombok.EqualsAndHashCode; |
||||||
|
|
||||||
|
import java.io.Serial; |
||||||
|
|
||||||
|
/** |
||||||
|
* 量具保养 视图实体类 |
||||||
|
* |
||||||
|
* @author qyl |
||||||
|
* @since 2025-12-29 |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
@EqualsAndHashCode(callSuper = true) |
||||||
|
public class MeasuringUpkeepVO extends MeasuringUpkeepEntity { |
||||||
|
@Serial |
||||||
|
private static final long serialVersionUID = 1L; |
||||||
|
/** |
||||||
|
* 主键ID |
||||||
|
*/ |
||||||
|
@JsonSerialize(using = ToStringSerializer.class) |
||||||
|
private Long id; |
||||||
|
/** |
||||||
|
* 状态名称 |
||||||
|
*/ |
||||||
|
String statusName; |
||||||
|
} |
||||||
@ -0,0 +1,31 @@ |
|||||||
|
package org.springblade.desk.device.pojo.vo; |
||||||
|
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
||||||
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
||||||
|
import org.springblade.desk.device.pojo.entity.UpkeepRecordsEntity; |
||||||
|
import lombok.Data; |
||||||
|
import lombok.EqualsAndHashCode; |
||||||
|
|
||||||
|
import java.io.Serial; |
||||||
|
|
||||||
|
/** |
||||||
|
* 设备维修记录 视图实体类 |
||||||
|
* |
||||||
|
* @author qyl |
||||||
|
* @since 2025-12-29 |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
@EqualsAndHashCode(callSuper = true) |
||||||
|
public class UpkeepRecordsVO extends UpkeepRecordsEntity { |
||||||
|
@Serial |
||||||
|
private static final long serialVersionUID = 1L; |
||||||
|
/** |
||||||
|
* 主键ID |
||||||
|
*/ |
||||||
|
@JsonSerialize(using = ToStringSerializer.class) |
||||||
|
private Long id; |
||||||
|
/** |
||||||
|
* 状态名称 |
||||||
|
*/ |
||||||
|
String statusName; |
||||||
|
} |
||||||
@ -0,0 +1,135 @@ |
|||||||
|
package org.springblade.desk.device.controller; |
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.Parameters; |
||||||
|
import io.swagger.v3.oas.annotations.enums.ParameterIn; |
||||||
|
import io.swagger.v3.oas.annotations.media.Schema; |
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag; |
||||||
|
import io.swagger.v3.oas.annotations.Operation; |
||||||
|
import io.swagger.v3.oas.annotations.Parameter; |
||||||
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
||||||
|
import lombok.AllArgsConstructor; |
||||||
|
import jakarta.validation.Valid; |
||||||
|
|
||||||
|
import org.springblade.core.secure.BladeUser; |
||||||
|
import org.springblade.core.secure.annotation.IsAdmin; |
||||||
|
import org.springblade.core.mp.support.Condition; |
||||||
|
import org.springblade.core.mp.support.Query; |
||||||
|
import org.springblade.core.tool.api.R; |
||||||
|
import org.springblade.core.tool.utils.Func; |
||||||
|
import org.springblade.desk.device.pojo.excel.MeaToolExcel; |
||||||
|
import org.springframework.web.bind.annotation.*; |
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||||
|
import org.springblade.desk.device.pojo.entity.MeaToolEntity; |
||||||
|
import org.springblade.desk.device.pojo.vo.MeaToolVO; |
||||||
|
import org.springblade.desk.device.wrapper.MeaToolWrapper; |
||||||
|
import org.springblade.desk.device.service.IMeaToolService; |
||||||
|
import org.springblade.core.boot.ctrl.BladeController; |
||||||
|
import org.springblade.core.tool.utils.DateUtil; |
||||||
|
import org.springblade.core.excel.util.ExcelUtil; |
||||||
|
import org.springblade.core.tool.constant.BladeConstant; |
||||||
|
|
||||||
|
import java.util.Map; |
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
import jakarta.servlet.http.HttpServletResponse; |
||||||
|
|
||||||
|
/** |
||||||
|
* 量具信息 控制器 |
||||||
|
* |
||||||
|
* @author qyl |
||||||
|
* @since 2025-12-29 |
||||||
|
*/ |
||||||
|
@RestController |
||||||
|
@AllArgsConstructor |
||||||
|
@RequestMapping("/meaTool") |
||||||
|
@Tag(name = "量具信息", description = "量具信息接口") |
||||||
|
public class MeaToolController extends BladeController { |
||||||
|
|
||||||
|
private final IMeaToolService meaToolService; |
||||||
|
|
||||||
|
/** |
||||||
|
* 量具信息 详情 |
||||||
|
*/ |
||||||
|
@GetMapping("/detail") |
||||||
|
@ApiOperationSupport(order = 1) |
||||||
|
@Operation(summary = "详情", description = "传入meaTool") |
||||||
|
public R<MeaToolVO> detail(MeaToolEntity meaTool) { |
||||||
|
MeaToolEntity detail = meaToolService.getOne(Condition.getQueryWrapper(meaTool)); |
||||||
|
return R.data(MeaToolWrapper.build().entityVO(detail)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 量具信息 自定义分页 |
||||||
|
*/ |
||||||
|
@GetMapping("/page") |
||||||
|
@ApiOperationSupport(order = 3) |
||||||
|
@Operation(summary = "分页", description = "") |
||||||
|
@Parameters({ |
||||||
|
@Parameter(name = "mtName", description = "量具", in = ParameterIn.QUERY, schema = @Schema(type = "string")), |
||||||
|
@Parameter(name = "mtSize", description = "尺寸", in = ParameterIn.QUERY, schema = @Schema(type = "string")), |
||||||
|
}) |
||||||
|
public R<IPage<MeaToolVO>> page(@Parameter(hidden = true) MeaToolEntity meaTool, Query query) { |
||||||
|
IPage<MeaToolEntity> pages = meaToolService.selectMeaToolPage(Condition.getPage(query), meaTool); |
||||||
|
return R.data(MeaToolWrapper.build().pageVO(pages)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 量具信息 新增 |
||||||
|
*/ |
||||||
|
@PostMapping("/save") |
||||||
|
@ApiOperationSupport(order = 4) |
||||||
|
@Operation(summary = "新增", description = "传入meaTool") |
||||||
|
public R save(@Valid @RequestBody MeaToolEntity meaTool) { |
||||||
|
return R.status(meaToolService.save(meaTool)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 量具信息 修改 |
||||||
|
*/ |
||||||
|
@PostMapping("/update") |
||||||
|
@ApiOperationSupport(order = 5) |
||||||
|
@Operation(summary = "修改", description = "传入meaTool") |
||||||
|
public R update(@Valid @RequestBody MeaToolEntity meaTool) { |
||||||
|
return R.status(meaToolService.updateById(meaTool)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 量具信息 新增或修改 |
||||||
|
*/ |
||||||
|
@PostMapping("/submit") |
||||||
|
@ApiOperationSupport(order = 6) |
||||||
|
@Operation(summary = "新增或修改", description = "传入meaTool") |
||||||
|
public R submit(@Valid @RequestBody MeaToolEntity meaTool) { |
||||||
|
return R.status(meaToolService.saveOrUpdate(meaTool)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 量具信息 删除 |
||||||
|
*/ |
||||||
|
@PostMapping("/remove") |
||||||
|
@ApiOperationSupport(order = 7) |
||||||
|
@Operation(summary = "逻辑删除", description = "传入ids") |
||||||
|
public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) { |
||||||
|
return R.status(meaToolService.deleteLogic(Func.toLongList(ids))); |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 导出数据 |
||||||
|
*/ |
||||||
|
@IsAdmin |
||||||
|
@GetMapping("/export-meaTool") |
||||||
|
@ApiOperationSupport(order = 9) |
||||||
|
@Operation(summary = "导出数据", description = "传入meaTool") |
||||||
|
public void exportMeaTool(@Parameter(hidden = true) @RequestParam Map<String, Object> meaTool, BladeUser bladeUser, HttpServletResponse response) { |
||||||
|
QueryWrapper<MeaToolEntity> queryWrapper = Condition.getQueryWrapper(meaTool, MeaToolEntity.class); |
||||||
|
//if (!AuthUtil.isAdministrator()) {
|
||||||
|
// queryWrapper.lambda().eq(MeaTool::getTenantId, bladeUser.getTenantId());
|
||||||
|
//}
|
||||||
|
//queryWrapper.lambda().eq(MeaToolEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED);
|
||||||
|
List<MeaToolExcel> list = meaToolService.exportMeaTool(queryWrapper); |
||||||
|
ExcelUtil.export(response, "量具信息数据" + DateUtil.time(), "量具信息数据表", list, MeaToolExcel.class); |
||||||
|
} |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,135 @@ |
|||||||
|
package org.springblade.desk.device.controller; |
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.Parameters; |
||||||
|
import io.swagger.v3.oas.annotations.enums.ParameterIn; |
||||||
|
import io.swagger.v3.oas.annotations.media.Schema; |
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag; |
||||||
|
import io.swagger.v3.oas.annotations.Operation; |
||||||
|
import io.swagger.v3.oas.annotations.Parameter; |
||||||
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
||||||
|
import lombok.AllArgsConstructor; |
||||||
|
import jakarta.validation.Valid; |
||||||
|
|
||||||
|
import org.springblade.core.secure.BladeUser; |
||||||
|
import org.springblade.core.secure.annotation.IsAdmin; |
||||||
|
import org.springblade.core.mp.support.Condition; |
||||||
|
import org.springblade.core.mp.support.Query; |
||||||
|
import org.springblade.core.tool.api.R; |
||||||
|
import org.springblade.core.tool.utils.Func; |
||||||
|
import org.springblade.desk.device.pojo.excel.MeasuringUpkeepExcel; |
||||||
|
import org.springframework.web.bind.annotation.*; |
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||||
|
import org.springblade.desk.device.pojo.entity.MeasuringUpkeepEntity; |
||||||
|
import org.springblade.desk.device.pojo.vo.MeasuringUpkeepVO; |
||||||
|
import org.springblade.desk.device.wrapper.MeasuringUpkeepWrapper; |
||||||
|
import org.springblade.desk.device.service.IMeasuringUpkeepService; |
||||||
|
import org.springblade.core.boot.ctrl.BladeController; |
||||||
|
import org.springblade.core.tool.utils.DateUtil; |
||||||
|
import org.springblade.core.excel.util.ExcelUtil; |
||||||
|
import org.springblade.core.tool.constant.BladeConstant; |
||||||
|
|
||||||
|
import java.util.Map; |
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
import jakarta.servlet.http.HttpServletResponse; |
||||||
|
|
||||||
|
/** |
||||||
|
* 量具保养 控制器 |
||||||
|
* |
||||||
|
* @author qyl |
||||||
|
* @since 2025-12-29 |
||||||
|
*/ |
||||||
|
@RestController |
||||||
|
@AllArgsConstructor |
||||||
|
@RequestMapping("/measuringUpkeep") |
||||||
|
@Tag(name = "量具保养", description = "量具保养接口") |
||||||
|
public class MeasuringUpkeepController extends BladeController { |
||||||
|
|
||||||
|
private final IMeasuringUpkeepService measuringUpkeepService; |
||||||
|
|
||||||
|
/** |
||||||
|
* 量具保养 详情 |
||||||
|
*/ |
||||||
|
@GetMapping("/detail") |
||||||
|
@ApiOperationSupport(order = 1) |
||||||
|
@Operation(summary = "详情", description = "传入measuringUpkeep") |
||||||
|
public R<MeasuringUpkeepVO> detail(MeasuringUpkeepEntity measuringUpkeep) { |
||||||
|
MeasuringUpkeepEntity detail = measuringUpkeepService.getOne(Condition.getQueryWrapper(measuringUpkeep)); |
||||||
|
return R.data(MeasuringUpkeepWrapper.build().entityVO(detail)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 量具保养 自定义分页 |
||||||
|
*/ |
||||||
|
@GetMapping("/page") |
||||||
|
@ApiOperationSupport(order = 3) |
||||||
|
@Operation(summary = "分页", description = "") |
||||||
|
@Parameters({ |
||||||
|
@Parameter(name = "mmCode", description = "保养单号", in = ParameterIn.QUERY, schema = @Schema(type = "string")), |
||||||
|
@Parameter(name = "approvalStatus", description = "审批状态", in = ParameterIn.QUERY, schema = @Schema(type = "int")), |
||||||
|
}) |
||||||
|
public R<IPage<MeasuringUpkeepVO>> page(@Parameter(hidden = true) MeasuringUpkeepEntity measuringUpkeep, Query query) { |
||||||
|
IPage<MeasuringUpkeepEntity> pages = measuringUpkeepService.selectMeasuringUpkeepPage(Condition.getPage(query), measuringUpkeep); |
||||||
|
return R.data(MeasuringUpkeepWrapper.build().pageVO(pages)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 量具保养 新增 |
||||||
|
*/ |
||||||
|
@PostMapping("/save") |
||||||
|
@ApiOperationSupport(order = 4) |
||||||
|
@Operation(summary = "新增", description = "传入measuringUpkeep") |
||||||
|
public R save(@Valid @RequestBody MeasuringUpkeepEntity measuringUpkeep) { |
||||||
|
return R.status(measuringUpkeepService.save(measuringUpkeep)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 量具保养 修改 |
||||||
|
*/ |
||||||
|
@PostMapping("/update") |
||||||
|
@ApiOperationSupport(order = 5) |
||||||
|
@Operation(summary = "修改", description = "传入measuringUpkeep") |
||||||
|
public R update(@Valid @RequestBody MeasuringUpkeepEntity measuringUpkeep) { |
||||||
|
return R.status(measuringUpkeepService.updateById(measuringUpkeep)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 量具保养 新增或修改 |
||||||
|
*/ |
||||||
|
@PostMapping("/submit") |
||||||
|
@ApiOperationSupport(order = 6) |
||||||
|
@Operation(summary = "新增或修改", description = "传入measuringUpkeep") |
||||||
|
public R submit(@Valid @RequestBody MeasuringUpkeepEntity measuringUpkeep) { |
||||||
|
return R.status(measuringUpkeepService.saveOrUpdate(measuringUpkeep)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 量具保养 删除 |
||||||
|
*/ |
||||||
|
@PostMapping("/remove") |
||||||
|
@ApiOperationSupport(order = 7) |
||||||
|
@Operation(summary = "逻辑删除", description = "传入ids") |
||||||
|
public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) { |
||||||
|
return R.status(measuringUpkeepService.deleteLogic(Func.toLongList(ids))); |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 导出数据 |
||||||
|
*/ |
||||||
|
@IsAdmin |
||||||
|
@GetMapping("/export-measuringUpkeep") |
||||||
|
@ApiOperationSupport(order = 9) |
||||||
|
@Operation(summary = "导出数据", description = "传入measuringUpkeep") |
||||||
|
public void exportMeasuringUpkeep(@Parameter(hidden = true) @RequestParam Map<String, Object> measuringUpkeep, BladeUser bladeUser, HttpServletResponse response) { |
||||||
|
QueryWrapper<MeasuringUpkeepEntity> queryWrapper = Condition.getQueryWrapper(measuringUpkeep, MeasuringUpkeepEntity.class); |
||||||
|
//if (!AuthUtil.isAdministrator()) {
|
||||||
|
// queryWrapper.lambda().eq(MeasuringUpkeep::getTenantId, bladeUser.getTenantId());
|
||||||
|
//}
|
||||||
|
//queryWrapper.lambda().eq(MeasuringUpkeepEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED);
|
||||||
|
List<MeasuringUpkeepExcel> list = measuringUpkeepService.exportMeasuringUpkeep(queryWrapper); |
||||||
|
ExcelUtil.export(response, "量具保养数据" + DateUtil.time(), "量具保养数据表", list, MeasuringUpkeepExcel.class); |
||||||
|
} |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,135 @@ |
|||||||
|
package org.springblade.desk.device.controller; |
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.Parameters; |
||||||
|
import io.swagger.v3.oas.annotations.enums.ParameterIn; |
||||||
|
import io.swagger.v3.oas.annotations.media.Schema; |
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag; |
||||||
|
import io.swagger.v3.oas.annotations.Operation; |
||||||
|
import io.swagger.v3.oas.annotations.Parameter; |
||||||
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
||||||
|
import lombok.AllArgsConstructor; |
||||||
|
import jakarta.validation.Valid; |
||||||
|
|
||||||
|
import org.springblade.core.secure.BladeUser; |
||||||
|
import org.springblade.core.secure.annotation.IsAdmin; |
||||||
|
import org.springblade.core.mp.support.Condition; |
||||||
|
import org.springblade.core.mp.support.Query; |
||||||
|
import org.springblade.core.tool.api.R; |
||||||
|
import org.springblade.core.tool.utils.Func; |
||||||
|
import org.springblade.desk.device.pojo.excel.UpkeepRecordsExcel; |
||||||
|
import org.springframework.web.bind.annotation.*; |
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||||
|
import org.springblade.desk.device.pojo.entity.UpkeepRecordsEntity; |
||||||
|
import org.springblade.desk.device.pojo.vo.UpkeepRecordsVO; |
||||||
|
import org.springblade.desk.device.wrapper.UpkeepRecordsWrapper; |
||||||
|
import org.springblade.desk.device.service.IUpkeepRecordsService; |
||||||
|
import org.springblade.core.boot.ctrl.BladeController; |
||||||
|
import org.springblade.core.tool.utils.DateUtil; |
||||||
|
import org.springblade.core.excel.util.ExcelUtil; |
||||||
|
import org.springblade.core.tool.constant.BladeConstant; |
||||||
|
|
||||||
|
import java.util.Map; |
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
import jakarta.servlet.http.HttpServletResponse; |
||||||
|
|
||||||
|
/** |
||||||
|
* 设备维修记录 控制器 |
||||||
|
* |
||||||
|
* @author qyl |
||||||
|
* @since 2025-12-29 |
||||||
|
*/ |
||||||
|
@RestController |
||||||
|
@AllArgsConstructor |
||||||
|
@RequestMapping("/upkeepRecords") |
||||||
|
@Tag(name = "设备维修记录", description = "设备维修记录接口") |
||||||
|
public class UpkeepRecordsController extends BladeController { |
||||||
|
|
||||||
|
private final IUpkeepRecordsService upkeepRecordsService; |
||||||
|
|
||||||
|
/** |
||||||
|
* 设备维修记录 详情 |
||||||
|
*/ |
||||||
|
@GetMapping("/detail") |
||||||
|
@ApiOperationSupport(order = 1) |
||||||
|
@Operation(summary = "详情", description = "传入upkeepRecords") |
||||||
|
public R<UpkeepRecordsVO> detail(UpkeepRecordsEntity upkeepRecords) { |
||||||
|
UpkeepRecordsEntity detail = upkeepRecordsService.getOne(Condition.getQueryWrapper(upkeepRecords)); |
||||||
|
return R.data(UpkeepRecordsWrapper.build().entityVO(detail)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 设备维修记录 自定义分页 |
||||||
|
*/ |
||||||
|
@GetMapping("/page") |
||||||
|
@ApiOperationSupport(order = 3) |
||||||
|
@Operation(summary = "分页", description = "") |
||||||
|
@Parameters({ |
||||||
|
@Parameter(name = "deviceCode", description = "设备编号", in = ParameterIn.QUERY, schema = @Schema(type = "string")), |
||||||
|
@Parameter(name = "upkeepResult", description = "维修结果", in = ParameterIn.QUERY, schema = @Schema(type = "string")), |
||||||
|
}) |
||||||
|
public R<IPage<UpkeepRecordsVO>> page(@Parameter(hidden = true) UpkeepRecordsEntity upkeepRecords, Query query) { |
||||||
|
IPage<UpkeepRecordsEntity> pages = upkeepRecordsService.selectUpkeepRecordsPage(Condition.getPage(query), upkeepRecords); |
||||||
|
return R.data(UpkeepRecordsWrapper.build().pageVO(pages)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 设备维修记录 新增 |
||||||
|
*/ |
||||||
|
@PostMapping("/save") |
||||||
|
@ApiOperationSupport(order = 4) |
||||||
|
@Operation(summary = "新增", description = "传入upkeepRecords") |
||||||
|
public R save(@Valid @RequestBody UpkeepRecordsEntity upkeepRecords) { |
||||||
|
return R.status(upkeepRecordsService.save(upkeepRecords)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 设备维修记录 修改 |
||||||
|
*/ |
||||||
|
@PostMapping("/update") |
||||||
|
@ApiOperationSupport(order = 5) |
||||||
|
@Operation(summary = "修改", description = "传入upkeepRecords") |
||||||
|
public R update(@Valid @RequestBody UpkeepRecordsEntity upkeepRecords) { |
||||||
|
return R.status(upkeepRecordsService.updateById(upkeepRecords)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 设备维修记录 新增或修改 |
||||||
|
*/ |
||||||
|
@PostMapping("/submit") |
||||||
|
@ApiOperationSupport(order = 6) |
||||||
|
@Operation(summary = "新增或修改", description = "传入upkeepRecords") |
||||||
|
public R submit(@Valid @RequestBody UpkeepRecordsEntity upkeepRecords) { |
||||||
|
return R.status(upkeepRecordsService.saveOrUpdate(upkeepRecords)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 设备维修记录 删除 |
||||||
|
*/ |
||||||
|
@PostMapping("/remove") |
||||||
|
@ApiOperationSupport(order = 7) |
||||||
|
@Operation(summary = "逻辑删除", description = "传入ids") |
||||||
|
public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) { |
||||||
|
return R.status(upkeepRecordsService.deleteLogic(Func.toLongList(ids))); |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 导出数据 |
||||||
|
*/ |
||||||
|
@IsAdmin |
||||||
|
@GetMapping("/export-upkeepRecords") |
||||||
|
@ApiOperationSupport(order = 9) |
||||||
|
@Operation(summary = "导出数据", description = "传入upkeepRecords") |
||||||
|
public void exportUpkeepRecords(@Parameter(hidden = true) @RequestParam Map<String, Object> upkeepRecords, BladeUser bladeUser, HttpServletResponse response) { |
||||||
|
QueryWrapper<UpkeepRecordsEntity> queryWrapper = Condition.getQueryWrapper(upkeepRecords, UpkeepRecordsEntity.class); |
||||||
|
//if (!AuthUtil.isAdministrator()) {
|
||||||
|
// queryWrapper.lambda().eq(UpkeepRecords::getTenantId, bladeUser.getTenantId());
|
||||||
|
//}
|
||||||
|
//queryWrapper.lambda().eq(UpkeepRecordsEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED);
|
||||||
|
List<UpkeepRecordsExcel> list = upkeepRecordsService.exportUpkeepRecords(queryWrapper); |
||||||
|
ExcelUtil.export(response, "设备维修记录数据" + DateUtil.time(), "设备维修记录数据表", list, UpkeepRecordsExcel.class); |
||||||
|
} |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,39 @@ |
|||||||
|
package org.springblade.desk.device.mapper; |
||||||
|
|
||||||
|
import org.springblade.desk.device.pojo.entity.MeaToolEntity; |
||||||
|
import org.springblade.desk.device.pojo.excel.MeaToolExcel; |
||||||
|
import org.springblade.desk.device.pojo.vo.MeaToolVO; |
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||||
|
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||||
|
import org.apache.ibatis.annotations.Param; |
||||||
|
|
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
/** |
||||||
|
* 量具信息 Mapper 接口 |
||||||
|
* |
||||||
|
* @author qyl |
||||||
|
* @since 2025-12-29 |
||||||
|
*/ |
||||||
|
public interface MeaToolMapper extends BaseMapper<MeaToolEntity> { |
||||||
|
|
||||||
|
/** |
||||||
|
* 自定义分页 |
||||||
|
* |
||||||
|
* @param page 分页参数 |
||||||
|
* @param meaTool 查询参数 |
||||||
|
* @return List<MeaToolVO> |
||||||
|
*/ |
||||||
|
List<MeaToolVO> selectMeaToolPage(IPage page, MeaToolVO meaTool); |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 获取导出数据 |
||||||
|
* |
||||||
|
* @param queryWrapper 查询条件 |
||||||
|
* @return List<MeaToolExcel> |
||||||
|
*/ |
||||||
|
List<MeaToolExcel> exportMeaTool(@Param("ew") Wrapper<MeaToolEntity> queryWrapper); |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,34 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||||
|
<mapper namespace="org.springblade.desk.device.mapper.MeaToolMapper"> |
||||||
|
|
||||||
|
<!-- 通用查询映射结果 --> |
||||||
|
<resultMap id="mesMeaToolResultMap" type="org.springblade.desk.device.pojo.entity.MeaToolEntity"> |
||||||
|
<result column="ORDERS" property="orders"/> |
||||||
|
<result column="ID" property="id"/> |
||||||
|
<result column="TENANT_ID" property="tenantId"/> |
||||||
|
<result column="CREATE_USER" property="createUser"/> |
||||||
|
<result column="CREATE_TIME" property="createTime"/> |
||||||
|
<result column="CREATE_DEPT" property="createDept"/> |
||||||
|
<result column="UPDATE_USER" property="updateUser"/> |
||||||
|
<result column="UPDATE_TIME" property="updateTime"/> |
||||||
|
<result column="STATUS" property="status"/> |
||||||
|
<result column="IS_DELETED" property="isDeleted"/> |
||||||
|
<result column="MT_SIZE" property="mtSize"/> |
||||||
|
<result column="MT_NAME" property="mtName"/> |
||||||
|
</resultMap> |
||||||
|
|
||||||
|
|
||||||
|
<select id="selectMeaToolPage" resultMap="mesMeaToolResultMap"> |
||||||
|
select * |
||||||
|
from MES_MEA_TOOL |
||||||
|
where is_deleted = 0 |
||||||
|
</select> |
||||||
|
|
||||||
|
|
||||||
|
<select id="exportMeaTool" resultType="org.springblade.desk.device.pojo.excel.MeaToolExcel"> |
||||||
|
SELECT * |
||||||
|
FROM MES_MEA_TOOL ${ew.customSqlSegment} |
||||||
|
</select> |
||||||
|
|
||||||
|
</mapper> |
||||||
@ -0,0 +1,39 @@ |
|||||||
|
package org.springblade.desk.device.mapper; |
||||||
|
|
||||||
|
import org.springblade.desk.device.pojo.entity.MeasuringUpkeepEntity; |
||||||
|
import org.springblade.desk.device.pojo.excel.MeasuringUpkeepExcel; |
||||||
|
import org.springblade.desk.device.pojo.vo.MeasuringUpkeepVO; |
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||||
|
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||||
|
import org.apache.ibatis.annotations.Param; |
||||||
|
|
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
/** |
||||||
|
* 量具保养 Mapper 接口 |
||||||
|
* |
||||||
|
* @author qyl |
||||||
|
* @since 2025-12-29 |
||||||
|
*/ |
||||||
|
public interface MeasuringUpkeepMapper extends BaseMapper<MeasuringUpkeepEntity> { |
||||||
|
|
||||||
|
/** |
||||||
|
* 自定义分页 |
||||||
|
* |
||||||
|
* @param page 分页参数 |
||||||
|
* @param measuringUpkeep 查询参数 |
||||||
|
* @return List<MeasuringUpkeepVO> |
||||||
|
*/ |
||||||
|
List<MeasuringUpkeepVO> selectMeasuringUpkeepPage(IPage page, MeasuringUpkeepVO measuringUpkeep); |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 获取导出数据 |
||||||
|
* |
||||||
|
* @param queryWrapper 查询条件 |
||||||
|
* @return List<MeasuringUpkeepExcel> |
||||||
|
*/ |
||||||
|
List<MeasuringUpkeepExcel> exportMeasuringUpkeep(@Param("ew") Wrapper<MeasuringUpkeepEntity> queryWrapper); |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,37 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||||
|
<mapper namespace="org.springblade.desk.device.mapper.MeasuringUpkeepMapper"> |
||||||
|
|
||||||
|
<!-- 通用查询映射结果 --> |
||||||
|
<resultMap id="mesMeasuringUpkeepResultMap" type="org.springblade.desk.device.pojo.entity.MeasuringUpkeepEntity"> |
||||||
|
<result column="ID" property="id"/> |
||||||
|
<result column="TENANT_ID" property="tenantId"/> |
||||||
|
<result column="CREATE_USER" property="createUser"/> |
||||||
|
<result column="CREATE_TIME" property="createTime"/> |
||||||
|
<result column="CREATE_DEPT" property="createDept"/> |
||||||
|
<result column="UPDATE_USER" property="updateUser"/> |
||||||
|
<result column="UPDATE_TIME" property="updateTime"/> |
||||||
|
<result column="STATUS" property="status"/> |
||||||
|
<result column="IS_DELETED" property="isDeleted"/> |
||||||
|
<result column="MM_CODE" property="mmCode"/> |
||||||
|
<result column="MI_ID" property="miId"/> |
||||||
|
<result column="MEMO" property="memo"/> |
||||||
|
<result column="CREATE_MAN" property="createMan"/> |
||||||
|
<result column="APPROVAL_STATUS" property="approvalStatus"/> |
||||||
|
<result column="RLS_ID" property="rlsId"/> |
||||||
|
</resultMap> |
||||||
|
|
||||||
|
|
||||||
|
<select id="selectMeasuringUpkeepPage" resultMap="mesMeasuringUpkeepResultMap"> |
||||||
|
select * |
||||||
|
from MES_MEASURING_UPKEEP |
||||||
|
where is_deleted = 0 |
||||||
|
</select> |
||||||
|
|
||||||
|
|
||||||
|
<select id="exportMeasuringUpkeep" resultType="org.springblade.desk.device.pojo.excel.MeasuringUpkeepExcel"> |
||||||
|
SELECT * |
||||||
|
FROM MES_MEASURING_UPKEEP ${ew.customSqlSegment} |
||||||
|
</select> |
||||||
|
|
||||||
|
</mapper> |
||||||
@ -0,0 +1,39 @@ |
|||||||
|
package org.springblade.desk.device.mapper; |
||||||
|
|
||||||
|
import org.springblade.desk.device.pojo.entity.UpkeepRecordsEntity; |
||||||
|
import org.springblade.desk.device.pojo.excel.UpkeepRecordsExcel; |
||||||
|
import org.springblade.desk.device.pojo.vo.UpkeepRecordsVO; |
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||||
|
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||||
|
import org.apache.ibatis.annotations.Param; |
||||||
|
|
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
/** |
||||||
|
* 设备维修记录 Mapper 接口 |
||||||
|
* |
||||||
|
* @author qyl |
||||||
|
* @since 2025-12-29 |
||||||
|
*/ |
||||||
|
public interface UpkeepRecordsMapper extends BaseMapper<UpkeepRecordsEntity> { |
||||||
|
|
||||||
|
/** |
||||||
|
* 自定义分页 |
||||||
|
* |
||||||
|
* @param page 分页参数 |
||||||
|
* @param upkeepRecords 查询参数 |
||||||
|
* @return List<UpkeepRecordsVO> |
||||||
|
*/ |
||||||
|
List<UpkeepRecordsVO> selectUpkeepRecordsPage(IPage page, UpkeepRecordsVO upkeepRecords); |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 获取导出数据 |
||||||
|
* |
||||||
|
* @param queryWrapper 查询条件 |
||||||
|
* @return List<UpkeepRecordsExcel> |
||||||
|
*/ |
||||||
|
List<UpkeepRecordsExcel> exportUpkeepRecords(@Param("ew") Wrapper<UpkeepRecordsEntity> queryWrapper); |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,39 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||||
|
<mapper namespace="org.springblade.desk.device.mapper.UpkeepRecordsMapper"> |
||||||
|
|
||||||
|
<!-- 通用查询映射结果 --> |
||||||
|
<resultMap id="mesUpkeepRecordsResultMap" type="org.springblade.desk.device.pojo.entity.UpkeepRecordsEntity"> |
||||||
|
<result column="ID" property="id"/> |
||||||
|
<result column="TENANT_ID" property="tenantId"/> |
||||||
|
<result column="CREATE_USER" property="createUser"/> |
||||||
|
<result column="CREATE_TIME" property="createTime"/> |
||||||
|
<result column="CREATE_DEPT" property="createDept"/> |
||||||
|
<result column="UPDATE_USER" property="updateUser"/> |
||||||
|
<result column="UPDATE_TIME" property="updateTime"/> |
||||||
|
<result column="STATUS" property="status"/> |
||||||
|
<result column="IS_DELETED" property="isDeleted"/> |
||||||
|
<result column="DEVICE" property="device"/> |
||||||
|
<result column="DEVICE_CODE" property="deviceCode"/> |
||||||
|
<result column="FAULT_DATE" property="faultDate"/> |
||||||
|
<result column="FAULT_MEMO" property="faultMemo"/> |
||||||
|
<result column="UPKEEP_DATE" property="upkeepDate"/> |
||||||
|
<result column="UPKEEP_RESULT" property="upkeepResult"/> |
||||||
|
<result column="MEMO" property="memo"/> |
||||||
|
<result column="UPKEEP_MAN" property="upkeepMan"/> |
||||||
|
</resultMap> |
||||||
|
|
||||||
|
|
||||||
|
<select id="selectUpkeepRecordsPage" resultMap="mesUpkeepRecordsResultMap"> |
||||||
|
select * |
||||||
|
from MES_UPKEEP_RECORDS |
||||||
|
where is_deleted = 0 |
||||||
|
</select> |
||||||
|
|
||||||
|
|
||||||
|
<select id="exportUpkeepRecords" resultType="org.springblade.desk.device.pojo.excel.UpkeepRecordsExcel"> |
||||||
|
SELECT * |
||||||
|
FROM MES_UPKEEP_RECORDS ${ew.customSqlSegment} |
||||||
|
</select> |
||||||
|
|
||||||
|
</mapper> |
||||||
@ -0,0 +1,37 @@ |
|||||||
|
package org.springblade.desk.device.service; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
||||||
|
import org.springblade.desk.device.pojo.entity.MeaToolEntity; |
||||||
|
import org.springblade.desk.device.pojo.excel.MeaToolExcel; |
||||||
|
import org.springblade.desk.device.pojo.vo.MeaToolVO; |
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||||
|
import org.springblade.core.mp.base.BaseService; |
||||||
|
|
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
/** |
||||||
|
* 量具信息 服务类 |
||||||
|
* |
||||||
|
* @author qyl |
||||||
|
* @since 2025-12-29 |
||||||
|
*/ |
||||||
|
public interface IMeaToolService extends BaseService<MeaToolEntity> { |
||||||
|
/** |
||||||
|
* 自定义分页 |
||||||
|
* |
||||||
|
* @param page 分页参数 |
||||||
|
* @param meaTool 查询参数 |
||||||
|
* @return IPage<MeaToolVO> |
||||||
|
*/ |
||||||
|
IPage<MeaToolEntity> selectMeaToolPage(IPage<MeaToolEntity> page, MeaToolEntity meaTool); |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 导出数据 |
||||||
|
* |
||||||
|
* @param queryWrapper 查询条件 |
||||||
|
* @return List<MeaToolExcel> |
||||||
|
*/ |
||||||
|
List<MeaToolExcel> exportMeaTool(Wrapper<MeaToolEntity> queryWrapper); |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,37 @@ |
|||||||
|
package org.springblade.desk.device.service; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
||||||
|
import org.springblade.desk.device.pojo.entity.MeasuringUpkeepEntity; |
||||||
|
import org.springblade.desk.device.pojo.excel.MeasuringUpkeepExcel; |
||||||
|
import org.springblade.desk.device.pojo.vo.MeasuringUpkeepVO; |
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||||
|
import org.springblade.core.mp.base.BaseService; |
||||||
|
|
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
/** |
||||||
|
* 量具保养 服务类 |
||||||
|
* |
||||||
|
* @author qyl |
||||||
|
* @since 2025-12-29 |
||||||
|
*/ |
||||||
|
public interface IMeasuringUpkeepService extends BaseService<MeasuringUpkeepEntity> { |
||||||
|
/** |
||||||
|
* 自定义分页 |
||||||
|
* |
||||||
|
* @param page 分页参数 |
||||||
|
* @param measuringUpkeep 查询参数 |
||||||
|
* @return IPage<MeasuringUpkeepVO> |
||||||
|
*/ |
||||||
|
IPage<MeasuringUpkeepEntity> selectMeasuringUpkeepPage(IPage<MeasuringUpkeepEntity> page, MeasuringUpkeepEntity measuringUpkeep); |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 导出数据 |
||||||
|
* |
||||||
|
* @param queryWrapper 查询条件 |
||||||
|
* @return List<MeasuringUpkeepExcel> |
||||||
|
*/ |
||||||
|
List<MeasuringUpkeepExcel> exportMeasuringUpkeep(Wrapper<MeasuringUpkeepEntity> queryWrapper); |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,37 @@ |
|||||||
|
package org.springblade.desk.device.service; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
||||||
|
import org.springblade.desk.device.pojo.entity.UpkeepRecordsEntity; |
||||||
|
import org.springblade.desk.device.pojo.excel.UpkeepRecordsExcel; |
||||||
|
import org.springblade.desk.device.pojo.vo.UpkeepRecordsVO; |
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||||
|
import org.springblade.core.mp.base.BaseService; |
||||||
|
|
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
/** |
||||||
|
* 设备维修记录 服务类 |
||||||
|
* |
||||||
|
* @author qyl |
||||||
|
* @since 2025-12-29 |
||||||
|
*/ |
||||||
|
public interface IUpkeepRecordsService extends BaseService<UpkeepRecordsEntity> { |
||||||
|
/** |
||||||
|
* 自定义分页 |
||||||
|
* |
||||||
|
* @param page 分页参数 |
||||||
|
* @param upkeepRecords 查询参数 |
||||||
|
* @return IPage<UpkeepRecordsVO> |
||||||
|
*/ |
||||||
|
IPage<UpkeepRecordsEntity> selectUpkeepRecordsPage(IPage<UpkeepRecordsEntity> page, UpkeepRecordsEntity upkeepRecords); |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 导出数据 |
||||||
|
* |
||||||
|
* @param queryWrapper 查询条件 |
||||||
|
* @return List<UpkeepRecordsExcel> |
||||||
|
*/ |
||||||
|
List<UpkeepRecordsExcel> exportUpkeepRecords(Wrapper<UpkeepRecordsEntity> queryWrapper); |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,53 @@ |
|||||||
|
package org.springblade.desk.device.service.impl; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
||||||
|
import org.springblade.desk.device.pojo.entity.MeaToolEntity; |
||||||
|
import org.springblade.desk.device.pojo.entity.MeaToolEntity; |
||||||
|
import org.springblade.desk.device.pojo.excel.MeaToolExcel; |
||||||
|
import org.springblade.desk.device.pojo.vo.MeaToolVO; |
||||||
|
import org.springblade.desk.device.mapper.MeaToolMapper; |
||||||
|
import org.springblade.desk.device.service.IMeaToolService; |
||||||
|
import org.springframework.stereotype.Service; |
||||||
|
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||||
|
import org.springblade.core.mp.base.BaseServiceImpl; |
||||||
|
|
||||||
|
import java.util.List; |
||||||
|
import java.util.Objects; |
||||||
|
|
||||||
|
/** |
||||||
|
* 量具信息 服务实现类 |
||||||
|
* |
||||||
|
* @author qyl |
||||||
|
* @since 2025-12-29 |
||||||
|
*/ |
||||||
|
@Service |
||||||
|
public class MeaToolServiceImpl extends BaseServiceImpl<MeaToolMapper, MeaToolEntity> implements IMeaToolService { |
||||||
|
|
||||||
|
@Override |
||||||
|
public IPage<MeaToolEntity> selectMeaToolPage(IPage<MeaToolEntity> page, MeaToolEntity meaTool) { |
||||||
|
// return page.setRecords(baseMapper.selectMeaToolPage(page, meaTool));
|
||||||
|
// 1. 创建条件构造器
|
||||||
|
LambdaQueryWrapper<MeaToolEntity> wrapper = Wrappers.<MeaToolEntity>lambdaQuery(); |
||||||
|
|
||||||
|
// 2. 动态添加条件(核心!)
|
||||||
|
// 根据实体对象 entity 中字段是否为空,来动态拼接WHERE条件
|
||||||
|
wrapper.like(Objects.nonNull(meaTool.getMtName()), MeaToolEntity::getMtName, meaTool.getMtName()); |
||||||
|
wrapper.like(Objects.nonNull(meaTool.getMtSize()), MeaToolEntity::getMtSize, meaTool.getMtSize()); |
||||||
|
|
||||||
|
// 3. 执行分页查询
|
||||||
|
return baseMapper.selectPage(page, wrapper); |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
@Override |
||||||
|
public List<MeaToolExcel> exportMeaTool(Wrapper<MeaToolEntity> queryWrapper) { |
||||||
|
List<MeaToolExcel> meaToolList = baseMapper.exportMeaTool(queryWrapper); |
||||||
|
//meaToolList.forEach(meaTool -> {
|
||||||
|
// meaTool.setTypeName(DictCache.getValue(DictEnum.YES_NO, MeaTool.getType()));
|
||||||
|
//});
|
||||||
|
return meaToolList; |
||||||
|
} |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,53 @@ |
|||||||
|
package org.springblade.desk.device.service.impl; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
||||||
|
import org.springblade.desk.device.pojo.entity.MeasuringUpkeepEntity; |
||||||
|
import org.springblade.desk.device.pojo.entity.MeasuringUpkeepEntity; |
||||||
|
import org.springblade.desk.device.pojo.excel.MeasuringUpkeepExcel; |
||||||
|
import org.springblade.desk.device.pojo.vo.MeasuringUpkeepVO; |
||||||
|
import org.springblade.desk.device.mapper.MeasuringUpkeepMapper; |
||||||
|
import org.springblade.desk.device.service.IMeasuringUpkeepService; |
||||||
|
import org.springframework.stereotype.Service; |
||||||
|
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||||
|
import org.springblade.core.mp.base.BaseServiceImpl; |
||||||
|
|
||||||
|
import java.util.List; |
||||||
|
import java.util.Objects; |
||||||
|
|
||||||
|
/** |
||||||
|
* 量具保养 服务实现类 |
||||||
|
* |
||||||
|
* @author qyl |
||||||
|
* @since 2025-12-29 |
||||||
|
*/ |
||||||
|
@Service |
||||||
|
public class MeasuringUpkeepServiceImpl extends BaseServiceImpl<MeasuringUpkeepMapper, MeasuringUpkeepEntity> implements IMeasuringUpkeepService { |
||||||
|
|
||||||
|
@Override |
||||||
|
public IPage<MeasuringUpkeepEntity> selectMeasuringUpkeepPage(IPage<MeasuringUpkeepEntity> page, MeasuringUpkeepEntity measuringUpkeep) { |
||||||
|
// return page.setRecords(baseMapper.selectMeasuringUpkeepPage(page, measuringUpkeep));
|
||||||
|
// 1. 创建条件构造器
|
||||||
|
LambdaQueryWrapper<MeasuringUpkeepEntity> wrapper = Wrappers.<MeasuringUpkeepEntity>lambdaQuery(); |
||||||
|
|
||||||
|
// 2. 动态添加条件(核心!)
|
||||||
|
// 根据实体对象 entity 中字段是否为空,来动态拼接WHERE条件
|
||||||
|
wrapper.like(Objects.nonNull(measuringUpkeep.getMmCode()), MeasuringUpkeepEntity::getMmCode, measuringUpkeep.getMmCode()); |
||||||
|
wrapper.eq(Objects.nonNull(measuringUpkeep.getApprovalStatus()), MeasuringUpkeepEntity::getApprovalStatus, measuringUpkeep.getApprovalStatus()); |
||||||
|
|
||||||
|
// 3. 执行分页查询
|
||||||
|
return baseMapper.selectPage(page, wrapper); |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
@Override |
||||||
|
public List<MeasuringUpkeepExcel> exportMeasuringUpkeep(Wrapper<MeasuringUpkeepEntity> queryWrapper) { |
||||||
|
List<MeasuringUpkeepExcel> measuringUpkeepList = baseMapper.exportMeasuringUpkeep(queryWrapper); |
||||||
|
//measuringUpkeepList.forEach(measuringUpkeep -> {
|
||||||
|
// measuringUpkeep.setTypeName(DictCache.getValue(DictEnum.YES_NO, MeasuringUpkeep.getType()));
|
||||||
|
//});
|
||||||
|
return measuringUpkeepList; |
||||||
|
} |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,53 @@ |
|||||||
|
package org.springblade.desk.device.service.impl; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
||||||
|
import org.springblade.desk.device.pojo.entity.RecorderTypeEntity; |
||||||
|
import org.springblade.desk.device.pojo.entity.UpkeepRecordsEntity; |
||||||
|
import org.springblade.desk.device.pojo.excel.UpkeepRecordsExcel; |
||||||
|
import org.springblade.desk.device.pojo.vo.UpkeepRecordsVO; |
||||||
|
import org.springblade.desk.device.mapper.UpkeepRecordsMapper; |
||||||
|
import org.springblade.desk.device.service.IUpkeepRecordsService; |
||||||
|
import org.springframework.stereotype.Service; |
||||||
|
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||||
|
import org.springblade.core.mp.base.BaseServiceImpl; |
||||||
|
|
||||||
|
import java.util.List; |
||||||
|
import java.util.Objects; |
||||||
|
|
||||||
|
/** |
||||||
|
* 设备维修记录 服务实现类 |
||||||
|
* |
||||||
|
* @author qyl |
||||||
|
* @since 2025-12-29 |
||||||
|
*/ |
||||||
|
@Service |
||||||
|
public class UpkeepRecordsServiceImpl extends BaseServiceImpl<UpkeepRecordsMapper, UpkeepRecordsEntity> implements IUpkeepRecordsService { |
||||||
|
|
||||||
|
@Override |
||||||
|
public IPage<UpkeepRecordsEntity> selectUpkeepRecordsPage(IPage<UpkeepRecordsEntity> page, UpkeepRecordsEntity upkeepRecords) { |
||||||
|
// return page.setRecords(baseMapper.selectUpkeepRecordsPage(page, upkeepRecords));
|
||||||
|
// 1. 创建条件构造器
|
||||||
|
LambdaQueryWrapper<UpkeepRecordsEntity> wrapper = Wrappers.<UpkeepRecordsEntity>lambdaQuery(); |
||||||
|
|
||||||
|
// 2. 动态添加条件(核心!)
|
||||||
|
// 根据实体对象 entity 中字段是否为空,来动态拼接WHERE条件
|
||||||
|
wrapper.like(Objects.nonNull(upkeepRecords.getDeviceCode()), UpkeepRecordsEntity::getDeviceCode, upkeepRecords.getDeviceCode()); |
||||||
|
wrapper.eq(Objects.nonNull(upkeepRecords.getUpkeepResult()), UpkeepRecordsEntity::getUpkeepResult, upkeepRecords.getUpkeepResult()); |
||||||
|
|
||||||
|
// 3. 执行分页查询
|
||||||
|
return baseMapper.selectPage(page, wrapper); |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
@Override |
||||||
|
public List<UpkeepRecordsExcel> exportUpkeepRecords(Wrapper<UpkeepRecordsEntity> queryWrapper) { |
||||||
|
List<UpkeepRecordsExcel> upkeepRecordsList = baseMapper.exportUpkeepRecords(queryWrapper); |
||||||
|
//upkeepRecordsList.forEach(upkeepRecords -> {
|
||||||
|
// upkeepRecords.setTypeName(DictCache.getValue(DictEnum.YES_NO, UpkeepRecords.getType()));
|
||||||
|
//});
|
||||||
|
return upkeepRecordsList; |
||||||
|
} |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,35 @@ |
|||||||
|
package org.springblade.desk.device.wrapper; |
||||||
|
|
||||||
|
import org.springblade.core.mp.support.BaseEntityWrapper; |
||||||
|
import org.springblade.core.tool.utils.BeanUtil; |
||||||
|
import org.springblade.desk.device.pojo.entity.MeaToolEntity; |
||||||
|
import org.springblade.desk.device.pojo.vo.MeaToolVO; |
||||||
|
|
||||||
|
import java.util.Objects; |
||||||
|
|
||||||
|
/** |
||||||
|
* 量具信息 包装类,返回视图层所需的字段 |
||||||
|
* |
||||||
|
* @author qyl |
||||||
|
* @since 2025-12-29 |
||||||
|
*/ |
||||||
|
public class MeaToolWrapper extends BaseEntityWrapper<MeaToolEntity, MeaToolVO> { |
||||||
|
|
||||||
|
public static MeaToolWrapper build() { |
||||||
|
return new MeaToolWrapper(); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public MeaToolVO entityVO(MeaToolEntity meaTool) { |
||||||
|
MeaToolVO meaToolVO = Objects.requireNonNull(BeanUtil.copyProperties(meaTool, MeaToolVO.class)); |
||||||
|
|
||||||
|
//User createUser = UserCache.getUser(meaTool.getCreateUser());
|
||||||
|
//User updateUser = UserCache.getUser(meaTool.getUpdateUser());
|
||||||
|
//meaToolVO.setCreateUserName(createUser.getName());
|
||||||
|
//meaToolVO.setUpdateUserName(updateUser.getName());
|
||||||
|
|
||||||
|
return meaToolVO; |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,35 @@ |
|||||||
|
package org.springblade.desk.device.wrapper; |
||||||
|
|
||||||
|
import org.springblade.core.mp.support.BaseEntityWrapper; |
||||||
|
import org.springblade.core.tool.utils.BeanUtil; |
||||||
|
import org.springblade.desk.device.pojo.entity.MeasuringUpkeepEntity; |
||||||
|
import org.springblade.desk.device.pojo.vo.MeasuringUpkeepVO; |
||||||
|
|
||||||
|
import java.util.Objects; |
||||||
|
|
||||||
|
/** |
||||||
|
* 量具保养 包装类,返回视图层所需的字段 |
||||||
|
* |
||||||
|
* @author qyl |
||||||
|
* @since 2025-12-29 |
||||||
|
*/ |
||||||
|
public class MeasuringUpkeepWrapper extends BaseEntityWrapper<MeasuringUpkeepEntity, MeasuringUpkeepVO> { |
||||||
|
|
||||||
|
public static MeasuringUpkeepWrapper build() { |
||||||
|
return new MeasuringUpkeepWrapper(); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public MeasuringUpkeepVO entityVO(MeasuringUpkeepEntity measuringUpkeep) { |
||||||
|
MeasuringUpkeepVO measuringUpkeepVO = Objects.requireNonNull(BeanUtil.copyProperties(measuringUpkeep, MeasuringUpkeepVO.class)); |
||||||
|
|
||||||
|
//User createUser = UserCache.getUser(measuringUpkeep.getCreateUser());
|
||||||
|
//User updateUser = UserCache.getUser(measuringUpkeep.getUpdateUser());
|
||||||
|
//measuringUpkeepVO.setCreateUserName(createUser.getName());
|
||||||
|
//measuringUpkeepVO.setUpdateUserName(updateUser.getName());
|
||||||
|
|
||||||
|
return measuringUpkeepVO; |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,35 @@ |
|||||||
|
package org.springblade.desk.device.wrapper; |
||||||
|
|
||||||
|
import org.springblade.core.mp.support.BaseEntityWrapper; |
||||||
|
import org.springblade.core.tool.utils.BeanUtil; |
||||||
|
import org.springblade.desk.device.pojo.entity.UpkeepRecordsEntity; |
||||||
|
import org.springblade.desk.device.pojo.vo.UpkeepRecordsVO; |
||||||
|
|
||||||
|
import java.util.Objects; |
||||||
|
|
||||||
|
/** |
||||||
|
* 设备维修记录 包装类,返回视图层所需的字段 |
||||||
|
* |
||||||
|
* @author qyl |
||||||
|
* @since 2025-12-29 |
||||||
|
*/ |
||||||
|
public class UpkeepRecordsWrapper extends BaseEntityWrapper<UpkeepRecordsEntity, UpkeepRecordsVO> { |
||||||
|
|
||||||
|
public static UpkeepRecordsWrapper build() { |
||||||
|
return new UpkeepRecordsWrapper(); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public UpkeepRecordsVO entityVO(UpkeepRecordsEntity upkeepRecords) { |
||||||
|
UpkeepRecordsVO upkeepRecordsVO = Objects.requireNonNull(BeanUtil.copyProperties(upkeepRecords, UpkeepRecordsVO.class)); |
||||||
|
|
||||||
|
//User createUser = UserCache.getUser(upkeepRecords.getCreateUser());
|
||||||
|
//User updateUser = UserCache.getUser(upkeepRecords.getUpdateUser());
|
||||||
|
//upkeepRecordsVO.setCreateUserName(createUser.getName());
|
||||||
|
//upkeepRecordsVO.setUpdateUserName(updateUser.getName());
|
||||||
|
|
||||||
|
return upkeepRecordsVO; |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
} |
||||||
Loading…
Reference in new issue