Merge branch 'plp' of F:\JavaProject\besure_server with conflicts.
parent
ff8e320ff6
commit
e0dccb5183
@ -0,0 +1,36 @@
|
|||||||
|
package cn.iocoder.yudao.module.erp.controller.admin.moldrepair.enums;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单据状态枚举
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@AllArgsConstructor
|
||||||
|
public enum MoldRecordStatusEnum {
|
||||||
|
|
||||||
|
PENDING(0, "待完成"),
|
||||||
|
COMPLETED(1, "已完成"),
|
||||||
|
// 可以根据需要添加其他状态
|
||||||
|
CANCELED(2, "已取消");
|
||||||
|
|
||||||
|
@JsonValue
|
||||||
|
private final Integer code;
|
||||||
|
private final String name;
|
||||||
|
|
||||||
|
@JsonCreator
|
||||||
|
public static MoldRecordStatusEnum getByCode(Integer code) {
|
||||||
|
if (code == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
for (MoldRecordStatusEnum status : MoldRecordStatusEnum.values()) {
|
||||||
|
if (status.getCode().equals(code)) {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,78 @@
|
|||||||
|
package cn.iocoder.yudao.module.erp.controller.admin.moldrepair.vo;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.ToString;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 模具维修记录分页 Request VO")
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
public class MoldRepairPageReqVO extends PageParam {
|
||||||
|
|
||||||
|
@Schema(description = "维修单编号")
|
||||||
|
private String repairCode;
|
||||||
|
|
||||||
|
@Schema(description = "维修单名称", example = "王五")
|
||||||
|
private String repairName;
|
||||||
|
|
||||||
|
@Schema(description = "模具ID", example = "6979")
|
||||||
|
private Long moldId;
|
||||||
|
|
||||||
|
@Schema(description = "模具编码")
|
||||||
|
private String moldCode;
|
||||||
|
|
||||||
|
@Schema(description = "模具名称", example = "张三")
|
||||||
|
private String moldName;
|
||||||
|
|
||||||
|
@Schema(description = "品牌")
|
||||||
|
private String moldBrand;
|
||||||
|
|
||||||
|
@Schema(description = "规格型号")
|
||||||
|
private String moldSpec;
|
||||||
|
|
||||||
|
@Schema(description = "模具类型", example = "1622")
|
||||||
|
private Long moldTypeId;
|
||||||
|
|
||||||
|
@Schema(description = "报修日期")
|
||||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
|
private LocalDateTime[] requireDate;
|
||||||
|
|
||||||
|
@Schema(description = "完成日期")
|
||||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
|
private LocalDateTime[] finishDate;
|
||||||
|
|
||||||
|
@Schema(description = "验收日期")
|
||||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
|
private LocalDateTime[] confirmDate;
|
||||||
|
|
||||||
|
@Schema(description = "维修结果")
|
||||||
|
private String repairResult;
|
||||||
|
|
||||||
|
@Schema(description = "维修人员")
|
||||||
|
private String acceptedBy;
|
||||||
|
|
||||||
|
@Schema(description = "验收人员")
|
||||||
|
private String confirmBy;
|
||||||
|
|
||||||
|
@Schema(description = "单据状态0-待完成 1-已完成", example = "1")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
@Schema(description = "备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
@Schema(description = "创建时间")
|
||||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
|
private LocalDateTime[] createTime;
|
||||||
|
|
||||||
|
|
||||||
|
@Schema(description = "ids集合导出用")
|
||||||
|
private String ids;
|
||||||
|
}
|
||||||
@ -0,0 +1,110 @@
|
|||||||
|
package cn.iocoder.yudao.module.erp.controller.admin.moldrepair.vo;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
|
||||||
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import com.alibaba.excel.annotation.write.style.ColumnWidth;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 模具维修记录 Response VO")
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
public class MoldRepairRespVO {
|
||||||
|
|
||||||
|
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "27809")
|
||||||
|
// @ExcelProperty("ID")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Schema(description = "维修单编号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@ExcelProperty("维修单编号")
|
||||||
|
private String repairCode;
|
||||||
|
|
||||||
|
@Schema(description = "维修单名称", example = "王五")
|
||||||
|
@ExcelProperty("维修单名称")
|
||||||
|
private String repairName;
|
||||||
|
|
||||||
|
@Schema(description = "模具ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "6979")
|
||||||
|
// @ExcelProperty("模具ID")
|
||||||
|
private Long moldId;
|
||||||
|
|
||||||
|
@Schema(description = "模具编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@ExcelProperty("模具编码")
|
||||||
|
private String moldCode;
|
||||||
|
|
||||||
|
@Schema(description = "模具名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
|
||||||
|
@ExcelProperty("模具名称")
|
||||||
|
private String moldName;
|
||||||
|
|
||||||
|
@Schema(description = "品牌")
|
||||||
|
// @ExcelProperty("品牌")
|
||||||
|
private String moldBrand;
|
||||||
|
|
||||||
|
@Schema(description = "规格型号")
|
||||||
|
// @ExcelProperty("规格型号")
|
||||||
|
private String moldSpec;
|
||||||
|
|
||||||
|
@Schema(description = "模具类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1622")
|
||||||
|
// @ExcelProperty(value = "模具类型", converter = DictConvert.class)
|
||||||
|
// @DictFormat("mes_machine_type") // TODO 代码优化:建议设置到对应的 DictTypeConstants 枚举类中
|
||||||
|
private Long moldTypeId;
|
||||||
|
|
||||||
|
@Schema(description = "报修日期")
|
||||||
|
@ExcelProperty("报修日期")
|
||||||
|
@ColumnWidth(20)
|
||||||
|
private LocalDateTime requireDate;
|
||||||
|
|
||||||
|
@Schema(description = "完成日期")
|
||||||
|
@ExcelProperty("完成日期")
|
||||||
|
@ColumnWidth(20)
|
||||||
|
private LocalDateTime finishDate;
|
||||||
|
|
||||||
|
@Schema(description = "验收日期")
|
||||||
|
@ExcelProperty("验收日期")
|
||||||
|
@ColumnWidth(20)
|
||||||
|
private LocalDateTime confirmDate;
|
||||||
|
|
||||||
|
@Schema(description = "维修结果")
|
||||||
|
@ExcelProperty("维修结果")
|
||||||
|
private String repairResult;
|
||||||
|
|
||||||
|
@Schema(description = "维修人员")
|
||||||
|
@ExcelProperty("维修人员")
|
||||||
|
private String acceptedBy;
|
||||||
|
|
||||||
|
@Schema(description = "验收人员")
|
||||||
|
@ExcelProperty("验收人员")
|
||||||
|
private String confirmBy;
|
||||||
|
|
||||||
|
@Schema(description = "单据状态", example = "1")
|
||||||
|
@ExcelProperty(value = "单据状态 0-待完成 1-已完成")
|
||||||
|
@DictFormat("mes_mold_record_status") // TODO 代码优化:建议设置到对应的 DictTypeConstants 枚举类中
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
@Schema(description = "单据状态", example = "1")
|
||||||
|
@ExcelProperty(value = "单据状态 0-待完成 1-已完成")
|
||||||
|
@DictFormat("mes_mold_record_status") // TODO 代码优化:建议设置到对应的 DictTypeConstants 枚举类中
|
||||||
|
private String statusName;
|
||||||
|
|
||||||
|
@Schema(description = "备注", example = "你猜")
|
||||||
|
@ExcelProperty("备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@ExcelProperty("创建时间")
|
||||||
|
@ColumnWidth(20)
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
@Schema(description = "模具类型 1-模具 2-关键件", example = "你猜")
|
||||||
|
private Integer deviceType;
|
||||||
|
|
||||||
|
@Schema(description = "模具Id", example = "你猜")
|
||||||
|
private Long deviceId;
|
||||||
|
|
||||||
|
@Schema(description = "关键件Id", example = "你猜")
|
||||||
|
private Long componentId;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,83 @@
|
|||||||
|
package cn.iocoder.yudao.module.erp.controller.admin.moldrepair.vo;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.module.erp.dal.dataobject.moldrepair.MoldRepairLineDO;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotEmpty;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 模具维修记录新增/修改 Request VO")
|
||||||
|
@Data
|
||||||
|
public class MoldRepairSaveReqVO {
|
||||||
|
|
||||||
|
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "27809")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Schema(description = "维修单编号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@NotEmpty(message = "维修单编号不能为空")
|
||||||
|
private String repairCode;
|
||||||
|
|
||||||
|
@Schema(description = "维修单名称", example = "王五")
|
||||||
|
private String repairName;
|
||||||
|
|
||||||
|
@Schema(description = "模具ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "6979")
|
||||||
|
// @NotNull(message = "模具ID不能为空")
|
||||||
|
private Long moldId;
|
||||||
|
|
||||||
|
@Schema(description = "模具编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
// @NotEmpty(message = "模具编码不能为空")
|
||||||
|
private String moldCode;
|
||||||
|
|
||||||
|
@Schema(description = "模具名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
|
||||||
|
// @NotEmpty(message = "模具名称不能为空")
|
||||||
|
private String moldName;
|
||||||
|
|
||||||
|
@Schema(description = "品牌")
|
||||||
|
private String moldBrand;
|
||||||
|
|
||||||
|
@Schema(description = "规格型号")
|
||||||
|
private String moldSpec;
|
||||||
|
|
||||||
|
@Schema(description = "模具类型-待用", requiredMode = Schema.RequiredMode.REQUIRED, example = "1622")
|
||||||
|
// @NotNull(message = "模具类型不能为空")
|
||||||
|
private Long moldTypeId;
|
||||||
|
|
||||||
|
@Schema(description = "报修日期")
|
||||||
|
private LocalDateTime requireDate;
|
||||||
|
|
||||||
|
@Schema(description = "完成日期")
|
||||||
|
private LocalDateTime finishDate;
|
||||||
|
|
||||||
|
@Schema(description = "验收日期")
|
||||||
|
private LocalDateTime confirmDate;
|
||||||
|
|
||||||
|
@Schema(description = "维修结果")
|
||||||
|
private String repairResult;
|
||||||
|
|
||||||
|
@Schema(description = "维修人员")
|
||||||
|
private String acceptedBy;
|
||||||
|
|
||||||
|
@Schema(description = "验收人员")
|
||||||
|
private String confirmBy;
|
||||||
|
|
||||||
|
@Schema(description = "单据状态", example = "1")
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
@Schema(description = "备注", example = "你猜")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
@Schema(description = "模具维修记录行列表")
|
||||||
|
private List<MoldRepairLineDO> moldRepairLines;
|
||||||
|
|
||||||
|
@Schema(description = "模具类型 1-模具 2-关键件")
|
||||||
|
private Integer deviceType;
|
||||||
|
|
||||||
|
@Schema(description = "模具Id")
|
||||||
|
private Long deviceId;
|
||||||
|
|
||||||
|
@Schema(description = "关键件Id")
|
||||||
|
private Long componentId;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,87 @@
|
|||||||
|
package cn.iocoder.yudao.module.erp.controller.admin.moldticketmanagement.enums;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划类型枚举
|
||||||
|
* 1-点检 2-保养
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
public enum MoldPlanTypeEnum {
|
||||||
|
|
||||||
|
INSPECTION(1, "点检"),
|
||||||
|
MAINTENANCE(2, "保养");
|
||||||
|
|
||||||
|
private final Integer code;
|
||||||
|
private final String description;
|
||||||
|
|
||||||
|
MoldPlanTypeEnum(Integer code, String description) {
|
||||||
|
this.code = code;
|
||||||
|
this.description = description;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据code获取枚举
|
||||||
|
*/
|
||||||
|
public static MoldPlanTypeEnum getByCode(Integer code) {
|
||||||
|
if (code == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
for (MoldPlanTypeEnum type : values()) {
|
||||||
|
if (type.getCode().equals(code)) {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据code获取描述
|
||||||
|
*/
|
||||||
|
public static String getDescriptionByCode(Integer code) {
|
||||||
|
MoldPlanTypeEnum type = getByCode(code);
|
||||||
|
return type != null ? type.getDescription() : "未知";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检查code是否有效
|
||||||
|
*/
|
||||||
|
public static boolean isValidCode(Integer code) {
|
||||||
|
return getByCode(code) != null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取所有code列表
|
||||||
|
*/
|
||||||
|
public static List<Integer> getAllCodes() {
|
||||||
|
return Arrays.stream(values())
|
||||||
|
.map(MoldPlanTypeEnum::getCode)
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取所有描述列表
|
||||||
|
*/
|
||||||
|
public static List<String> getAllDescriptions() {
|
||||||
|
return Arrays.stream(values())
|
||||||
|
.map(MoldPlanTypeEnum::getDescription)
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取code和描述的映射
|
||||||
|
*/
|
||||||
|
public static Map<Integer, String> getCodeDescriptionMap() {
|
||||||
|
Map<Integer, String> map = new LinkedHashMap<>();
|
||||||
|
for (MoldPlanTypeEnum type : values()) {
|
||||||
|
map.put(type.getCode(), type.getDescription());
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,63 @@
|
|||||||
|
package cn.iocoder.yudao.module.erp.controller.admin.moldticketmanagement.vo;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.ToString;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 项目方案关联分页 Request VO")
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
public class MoldTicketManagementPageReqVO extends PageParam {
|
||||||
|
|
||||||
|
@Schema(description = "项目ID", example = "21368")
|
||||||
|
private Long taskId;
|
||||||
|
|
||||||
|
@Schema(description = "方案ID", example = "20459")
|
||||||
|
private Long planId;
|
||||||
|
|
||||||
|
@Schema(description = "单号")
|
||||||
|
private String planNo;
|
||||||
|
|
||||||
|
@Schema(description = "设备名称", example = "张三")
|
||||||
|
private String moldName;
|
||||||
|
|
||||||
|
@Schema(description = "类型(1-点检 2-保养)", example = "2")
|
||||||
|
private String planType;
|
||||||
|
|
||||||
|
@Schema(description = "计划配置名称", example = "赵六")
|
||||||
|
private String configName;
|
||||||
|
|
||||||
|
@Schema(description = "作业状态", example = "1")
|
||||||
|
private Integer jobStatus;
|
||||||
|
|
||||||
|
@Schema(description = "作业结果")
|
||||||
|
private String jobResult;
|
||||||
|
|
||||||
|
@Schema(description = "创建时间")
|
||||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
|
private LocalDateTime[] createTime;
|
||||||
|
|
||||||
|
|
||||||
|
@Schema(description = "id集合导出用")
|
||||||
|
private String ids;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 作业开始时间
|
||||||
|
*/
|
||||||
|
private String taskTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 作业结束时间
|
||||||
|
*/
|
||||||
|
private String taskEndTime;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,91 @@
|
|||||||
|
package cn.iocoder.yudao.module.erp.controller.admin.moldticketmanagement.vo;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||||
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
|
||||||
|
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 项目方案关联 Response VO")
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
public class MoldTicketManagementRespVO extends BaseDO {
|
||||||
|
|
||||||
|
@Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "6566")
|
||||||
|
@ExcelProperty("id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Schema(description = "任务Id", example = "21368")
|
||||||
|
// @ExcelProperty("项目ID")
|
||||||
|
private Long taskId;
|
||||||
|
|
||||||
|
@Schema(description = "方案ID", example = "20459")
|
||||||
|
// @ExcelProperty("方案ID")
|
||||||
|
private Long planId;
|
||||||
|
|
||||||
|
@Schema(description = "单号")
|
||||||
|
@ExcelProperty("单号")
|
||||||
|
private String planNo;
|
||||||
|
|
||||||
|
@Schema(description = "设备名称", example = "张三")
|
||||||
|
@ExcelProperty("设备名称")
|
||||||
|
private String moldName;
|
||||||
|
|
||||||
|
@Schema(description = "类型", example = "2")
|
||||||
|
@ExcelProperty("类型")
|
||||||
|
private String planType;
|
||||||
|
|
||||||
|
@Schema(description = "计划配置名称", example = "赵六")
|
||||||
|
@ExcelProperty("计划配置名称")
|
||||||
|
private String configName;
|
||||||
|
|
||||||
|
@Schema(description = "作业状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||||
|
@ExcelProperty("作业状态")
|
||||||
|
private Integer jobStatus;
|
||||||
|
|
||||||
|
@Schema(description = "作业结果")
|
||||||
|
@ExcelProperty("作业结果")
|
||||||
|
private Integer jobResult;
|
||||||
|
|
||||||
|
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@ExcelProperty("创建时间")
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 作业开始时间
|
||||||
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonSerialize(using = LocalDateTimeSerializer.class)
|
||||||
|
@JsonDeserialize(using = LocalDateTimeDeserializer.class)
|
||||||
|
private LocalDateTime taskTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 作业结束时间
|
||||||
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonSerialize(using = LocalDateTimeSerializer.class)
|
||||||
|
@JsonDeserialize(using = LocalDateTimeDeserializer.class)
|
||||||
|
private LocalDateTime taskEndTime;
|
||||||
|
|
||||||
|
|
||||||
|
@Schema(description = "创建人名字")
|
||||||
|
@ExcelProperty("创建人名字")
|
||||||
|
private String creatorName;
|
||||||
|
|
||||||
|
@Schema(description = "作业人")
|
||||||
|
private String operator;
|
||||||
|
@Schema(description = "作业人名称")
|
||||||
|
@ExcelProperty("作业人名称")
|
||||||
|
private String operatorName;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,42 @@
|
|||||||
|
package cn.iocoder.yudao.module.erp.controller.admin.moldticketmanagement.vo;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 项目方案关联新增/修改 Request VO")
|
||||||
|
@Data
|
||||||
|
public class MoldTicketManagementSaveReqVO {
|
||||||
|
|
||||||
|
@Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "6566")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Schema(description = "项目ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "21368")
|
||||||
|
@NotNull(message = "项目ID不能为空")
|
||||||
|
private Long subjectId;
|
||||||
|
|
||||||
|
@Schema(description = "方案ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "20459")
|
||||||
|
@NotNull(message = "方案ID不能为空")
|
||||||
|
private Long planId;
|
||||||
|
|
||||||
|
@Schema(description = "单号")
|
||||||
|
private String planNo;
|
||||||
|
|
||||||
|
@Schema(description = "设备名称", example = "张三")
|
||||||
|
private String moldName;
|
||||||
|
|
||||||
|
@Schema(description = "类型", example = "2")
|
||||||
|
private String planType;
|
||||||
|
|
||||||
|
@Schema(description = "计划配置名称", example = "赵六")
|
||||||
|
private String configName;
|
||||||
|
|
||||||
|
@Schema(description = "作业状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||||
|
@NotNull(message = "作业状态不能为空")
|
||||||
|
private Integer jobStatus;
|
||||||
|
|
||||||
|
@Schema(description = "作业结果")
|
||||||
|
private Integer jobResult;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,49 @@
|
|||||||
|
package cn.iocoder.yudao.module.erp.controller.admin.moldticketresults.vo;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.ToString;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 工单检验结果分页 Request VO")
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
public class MoldTicketResultsPageReqVO extends PageParam {
|
||||||
|
|
||||||
|
@Schema(description = "检验项名称", example = "赵六")
|
||||||
|
private String inspectionItemName;
|
||||||
|
|
||||||
|
@Schema(description = "检验方式")
|
||||||
|
private String inspectionMethod;
|
||||||
|
|
||||||
|
@Schema(description = "判定基准")
|
||||||
|
private String judgmentCriteria;
|
||||||
|
|
||||||
|
@Schema(description = "检验结果 0-待检测 1-检测通过 2-检测不通过")
|
||||||
|
private Integer inspectionResult;
|
||||||
|
|
||||||
|
@Schema(description = "图片路径")
|
||||||
|
private String images;
|
||||||
|
|
||||||
|
@Schema(description = "备注", example = "你说的对")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
@Schema(description = "检验时间")
|
||||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
|
private LocalDateTime[] inspectionTime;
|
||||||
|
|
||||||
|
@Schema(description = "工单管理Id")
|
||||||
|
private Long managementId;
|
||||||
|
|
||||||
|
@Schema(description = "创建时间")
|
||||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
|
private LocalDateTime[] createTime;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,56 @@
|
|||||||
|
package cn.iocoder.yudao.module.erp.controller.admin.moldticketresults.vo;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 工单检验结果 Response VO")
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
public class MoldTicketResultsRespVO {
|
||||||
|
|
||||||
|
@Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "30557")
|
||||||
|
@ExcelProperty("id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Schema(description = "检验项名称", example = "赵六")
|
||||||
|
@ExcelProperty("检验项名称")
|
||||||
|
private String inspectionItemName;
|
||||||
|
|
||||||
|
@Schema(description = "检验方式")
|
||||||
|
@ExcelProperty("检验方式")
|
||||||
|
private String inspectionMethod;
|
||||||
|
|
||||||
|
@Schema(description = "判定基准")
|
||||||
|
@ExcelProperty("判定基准")
|
||||||
|
private String judgmentCriteria;
|
||||||
|
|
||||||
|
@Schema(description = "检验结果 0-待检测 1-检测通过 2-检测不通过")
|
||||||
|
@ExcelProperty("检验结果 0-待检测 1-检测通过 2-检测不通过")
|
||||||
|
private Integer inspectionResult;
|
||||||
|
|
||||||
|
@Schema(description = "图片路径")
|
||||||
|
@ExcelProperty("图片路径")
|
||||||
|
private String images;
|
||||||
|
|
||||||
|
@Schema(description = "备注", example = "你说的对")
|
||||||
|
@ExcelProperty("备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
@Schema(description = "检验时间")
|
||||||
|
@ExcelProperty("检验时间")
|
||||||
|
private LocalDateTime inspectionTime;
|
||||||
|
|
||||||
|
@Schema(description = "工单管理Id")
|
||||||
|
private Long managementId;
|
||||||
|
|
||||||
|
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@ExcelProperty("创建时间")
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
@Schema(description = "模具Id")
|
||||||
|
private Long moldId;
|
||||||
|
}
|
||||||
@ -0,0 +1,42 @@
|
|||||||
|
package cn.iocoder.yudao.module.erp.controller.admin.moldticketresults.vo;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 工单检验结果新增/修改 Request VO")
|
||||||
|
@Data
|
||||||
|
public class MoldTicketResultsSaveReqVO {
|
||||||
|
|
||||||
|
@Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "30557")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Schema(description = "检验项名称", example = "赵六")
|
||||||
|
private String inspectionItemName;
|
||||||
|
|
||||||
|
@Schema(description = "工单管理Id")
|
||||||
|
private Long managementId;
|
||||||
|
|
||||||
|
@Schema(description = "检验方式")
|
||||||
|
private String inspectionMethod;
|
||||||
|
|
||||||
|
@Schema(description = "判定基准")
|
||||||
|
private String judgmentCriteria;
|
||||||
|
|
||||||
|
@Schema(description = "检验结果 0-待检测 1-检测通过 2-检测不通过")
|
||||||
|
private Integer inspectionResult;
|
||||||
|
|
||||||
|
@Schema(description = "图片路径")
|
||||||
|
private String images;
|
||||||
|
|
||||||
|
@Schema(description = "备注", example = "你说的对")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
@Schema(description = "检验时间")
|
||||||
|
private LocalDateTime inspectionTime;
|
||||||
|
|
||||||
|
@Schema(description = "检验人")
|
||||||
|
private String inspector;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,117 @@
|
|||||||
|
package cn.iocoder.yudao.module.erp.dal.dataobject.moldrepair;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||||
|
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.*;
|
||||||
|
import org.apache.ibatis.type.Alias;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 模具维修记录 DO
|
||||||
|
*
|
||||||
|
* @author 内蒙必硕
|
||||||
|
*/
|
||||||
|
@TableName("mes_mold_repair")
|
||||||
|
@KeySequence("mes_mold_repair_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@Alias("ErpMoldRepairDO")
|
||||||
|
public class MoldRepairDO extends BaseDO {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ID
|
||||||
|
*/
|
||||||
|
@TableId
|
||||||
|
private Long id;
|
||||||
|
/**
|
||||||
|
* 维修单编号
|
||||||
|
*/
|
||||||
|
private String repairCode;
|
||||||
|
/**
|
||||||
|
* 维修单名称
|
||||||
|
*/
|
||||||
|
private String repairName;
|
||||||
|
/**
|
||||||
|
* 模具ID
|
||||||
|
*/
|
||||||
|
private Long moldId;
|
||||||
|
/**
|
||||||
|
* 模具编码
|
||||||
|
*/
|
||||||
|
private String moldCode;
|
||||||
|
/**
|
||||||
|
* 模具名称
|
||||||
|
*/
|
||||||
|
private String moldName;
|
||||||
|
/**
|
||||||
|
* 品牌
|
||||||
|
*/
|
||||||
|
private String moldBrand;
|
||||||
|
/**
|
||||||
|
* 规格型号
|
||||||
|
*/
|
||||||
|
private String moldSpec;
|
||||||
|
/**
|
||||||
|
* 模具类型
|
||||||
|
*
|
||||||
|
* 枚举 {@link TODO mes_machine_type 对应的类}
|
||||||
|
*/
|
||||||
|
private Long moldTypeId;
|
||||||
|
/**
|
||||||
|
* 报修日期
|
||||||
|
*/
|
||||||
|
private LocalDateTime requireDate;
|
||||||
|
/**
|
||||||
|
* 完成日期
|
||||||
|
*/
|
||||||
|
private LocalDateTime finishDate;
|
||||||
|
/**
|
||||||
|
* 验收日期
|
||||||
|
*/
|
||||||
|
private LocalDateTime confirmDate;
|
||||||
|
/**
|
||||||
|
* 维修结果
|
||||||
|
*/
|
||||||
|
private String repairResult;
|
||||||
|
/**
|
||||||
|
* 维修人员
|
||||||
|
*/
|
||||||
|
private String acceptedBy;
|
||||||
|
/**
|
||||||
|
* 验收人员
|
||||||
|
*/
|
||||||
|
private String confirmBy;
|
||||||
|
/**
|
||||||
|
* 单据状态0-待完成 1-已完成
|
||||||
|
*
|
||||||
|
* 枚举 {@link TODO mes_mold_record_status 对应的类}
|
||||||
|
*/
|
||||||
|
private Integer status;
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 模具类型 1-模具 2-关键件
|
||||||
|
*/
|
||||||
|
private Integer moldType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备Id
|
||||||
|
*/
|
||||||
|
private Long deviceId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关键件Id
|
||||||
|
*/
|
||||||
|
private Long componentId;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,76 @@
|
|||||||
|
package cn.iocoder.yudao.module.erp.dal.dataobject.moldrepair;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||||
|
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.*;
|
||||||
|
import org.apache.ibatis.type.Alias;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 模具维修记录行 DO
|
||||||
|
*
|
||||||
|
* @author 内蒙必硕
|
||||||
|
*/
|
||||||
|
@TableName("mes_mold_repair_line")
|
||||||
|
@KeySequence("mes_mold_repair_line_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@Alias("ErpMoldRepairLineDO")
|
||||||
|
public class MoldRepairLineDO extends BaseDO {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ID
|
||||||
|
*/
|
||||||
|
@TableId
|
||||||
|
private Long id;
|
||||||
|
/**
|
||||||
|
* 维修单ID
|
||||||
|
*/
|
||||||
|
private Long repairId;
|
||||||
|
/**
|
||||||
|
* 项目ID
|
||||||
|
*/
|
||||||
|
private Long subjectId;
|
||||||
|
/**
|
||||||
|
* 项目编码
|
||||||
|
*/
|
||||||
|
private String subjectCode;
|
||||||
|
/**
|
||||||
|
* 项目名称
|
||||||
|
*/
|
||||||
|
private String subjectName;
|
||||||
|
/**
|
||||||
|
* 项目类型
|
||||||
|
*/
|
||||||
|
private String subjectType;
|
||||||
|
/**
|
||||||
|
* 项目内容
|
||||||
|
*/
|
||||||
|
private String subjectContent;
|
||||||
|
/**
|
||||||
|
* 标准
|
||||||
|
*/
|
||||||
|
private String subjectStandard;
|
||||||
|
/**
|
||||||
|
* 故障描述
|
||||||
|
*/
|
||||||
|
private String malfunction;
|
||||||
|
/**
|
||||||
|
* 故障描述资源
|
||||||
|
*/
|
||||||
|
private String malfunctionUrl;
|
||||||
|
/**
|
||||||
|
* 维修情况
|
||||||
|
*/
|
||||||
|
private String repairDes;
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,70 @@
|
|||||||
|
package cn.iocoder.yudao.module.erp.dal.dataobject.moldticketresults;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||||
|
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.*;
|
||||||
|
import org.apache.ibatis.type.Alias;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单检验结果 DO
|
||||||
|
*
|
||||||
|
* @author 内蒙必硕
|
||||||
|
*/
|
||||||
|
@TableName("mes_mold_ticket_results")
|
||||||
|
@KeySequence("mes_mold_ticket_results_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@Alias("ErpMoldTicketResultsDO")
|
||||||
|
public class MoldTicketResultsDO extends BaseDO {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* id
|
||||||
|
*/
|
||||||
|
@TableId
|
||||||
|
private Long id;
|
||||||
|
/**
|
||||||
|
* 检验项名称
|
||||||
|
*/
|
||||||
|
private String inspectionItemName;
|
||||||
|
/**
|
||||||
|
* 检验方式
|
||||||
|
*/
|
||||||
|
private String inspectionMethod;
|
||||||
|
/**
|
||||||
|
* 判定基准
|
||||||
|
*/
|
||||||
|
private String judgmentCriteria;
|
||||||
|
/**
|
||||||
|
* 检验结果 0-待检测 1-检测通过 2-检测不通过
|
||||||
|
*/
|
||||||
|
private Integer inspectionResult;
|
||||||
|
/**
|
||||||
|
* 图片路径
|
||||||
|
*/
|
||||||
|
private String images;
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
/**
|
||||||
|
* 检验时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime inspectionTime;
|
||||||
|
/**
|
||||||
|
* 检验人
|
||||||
|
*/
|
||||||
|
private Long managementId;
|
||||||
|
/**
|
||||||
|
* 模具id
|
||||||
|
*/
|
||||||
|
private Long moldId;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,27 @@
|
|||||||
|
package cn.iocoder.yudao.module.erp.dal.mysql.moldrepair;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||||
|
import cn.iocoder.yudao.module.erp.dal.dataobject.moldrepair.MoldRepairLineDO;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备维修记录行 Mapper
|
||||||
|
*
|
||||||
|
* @author 内蒙必硕
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
@Repository("erpMoldRepairLineMapper")
|
||||||
|
public interface MoldRepairLineMapper extends BaseMapperX<MoldRepairLineDO> {
|
||||||
|
|
||||||
|
default List<MoldRepairLineDO> selectListByRepairId(Long repairId) {
|
||||||
|
return selectList(MoldRepairLineDO::getRepairId, repairId);
|
||||||
|
}
|
||||||
|
|
||||||
|
default int deleteByRepairId(Long repairId) {
|
||||||
|
return delete(MoldRepairLineDO::getRepairId, repairId);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,61 @@
|
|||||||
|
package cn.iocoder.yudao.module.erp.dal.mysql.moldrepair;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||||
|
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||||
|
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||||
|
import cn.iocoder.yudao.module.erp.controller.admin.moldrepair.vo.MoldRepairPageReqVO;
|
||||||
|
import cn.iocoder.yudao.module.erp.dal.dataobject.moldrepair.MoldRepairDO;
|
||||||
|
import com.alibaba.excel.util.StringUtils;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备维修记录 Mapper
|
||||||
|
*
|
||||||
|
* @author 内蒙必硕
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
@Repository("erpMoldRepairMapper")
|
||||||
|
public interface MoldRepairMapper extends BaseMapperX<MoldRepairDO> {
|
||||||
|
|
||||||
|
default PageResult<MoldRepairDO> selectPage(MoldRepairPageReqVO reqVO) {
|
||||||
|
|
||||||
|
|
||||||
|
LambdaQueryWrapperX<MoldRepairDO> moldRepairDOLambdaQueryWrapperX = new LambdaQueryWrapperX<>();
|
||||||
|
moldRepairDOLambdaQueryWrapperX
|
||||||
|
.eqIfPresent(MoldRepairDO::getRepairCode, reqVO.getRepairCode())
|
||||||
|
.likeIfPresent(MoldRepairDO::getRepairName, reqVO.getRepairName())
|
||||||
|
.eqIfPresent(MoldRepairDO::getMoldId, reqVO.getMoldId())
|
||||||
|
.eqIfPresent(MoldRepairDO::getMoldCode, reqVO.getMoldCode())
|
||||||
|
.likeIfPresent(MoldRepairDO::getMoldName, reqVO.getMoldName())
|
||||||
|
.eqIfPresent(MoldRepairDO::getMoldBrand, reqVO.getMoldBrand())
|
||||||
|
.eqIfPresent(MoldRepairDO::getMoldSpec, reqVO.getMoldSpec())
|
||||||
|
.eqIfPresent(MoldRepairDO::getMoldTypeId, reqVO.getMoldTypeId())
|
||||||
|
.betweenIfPresent(MoldRepairDO::getRequireDate, reqVO.getRequireDate())
|
||||||
|
.betweenIfPresent(MoldRepairDO::getFinishDate, reqVO.getFinishDate())
|
||||||
|
.betweenIfPresent(MoldRepairDO::getConfirmDate, reqVO.getConfirmDate())
|
||||||
|
.eqIfPresent(MoldRepairDO::getRepairResult, reqVO.getRepairResult())
|
||||||
|
.eqIfPresent(MoldRepairDO::getAcceptedBy, reqVO.getAcceptedBy())
|
||||||
|
.eqIfPresent(MoldRepairDO::getConfirmBy, reqVO.getConfirmBy())
|
||||||
|
.eqIfPresent(MoldRepairDO::getStatus, reqVO.getStatus())
|
||||||
|
.eqIfPresent(MoldRepairDO::getRemark, reqVO.getRemark())
|
||||||
|
.betweenIfPresent(MoldRepairDO::getCreateTime, reqVO.getCreateTime())
|
||||||
|
.orderByDesc(MoldRepairDO::getCreateTime);
|
||||||
|
|
||||||
|
// 单独处理 ids 条件
|
||||||
|
if (StringUtils.isNotBlank(reqVO.getIds())) {
|
||||||
|
List<Long> idList = Arrays.stream(reqVO.getIds().split(","))
|
||||||
|
.map(String::trim)
|
||||||
|
.map(Long::valueOf)
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
moldRepairDOLambdaQueryWrapperX.in(MoldRepairDO::getId, idList);
|
||||||
|
}
|
||||||
|
|
||||||
|
return selectPage(reqVO,moldRepairDOLambdaQueryWrapperX );
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,38 @@
|
|||||||
|
package cn.iocoder.yudao.module.erp.dal.mysql.moldticketresults;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||||
|
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||||
|
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||||
|
import cn.iocoder.yudao.module.erp.controller.admin.moldticketresults.vo.MoldTicketResultsPageReqVO;
|
||||||
|
import cn.iocoder.yudao.module.erp.dal.dataobject.moldticketresults.MoldTicketResultsDO;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单检验结果 Mapper
|
||||||
|
*
|
||||||
|
* @author 内蒙必硕
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
@Repository("erpMoldTicketResultsMapper")
|
||||||
|
public interface MoldTicketResultsMapper extends BaseMapperX<MoldTicketResultsDO> {
|
||||||
|
|
||||||
|
default PageResult<MoldTicketResultsDO> selectPage(MoldTicketResultsPageReqVO reqVO) {
|
||||||
|
return selectPage(reqVO, new LambdaQueryWrapperX<MoldTicketResultsDO>()
|
||||||
|
.likeIfPresent(MoldTicketResultsDO::getInspectionItemName, reqVO.getInspectionItemName())
|
||||||
|
.eqIfPresent(MoldTicketResultsDO::getInspectionMethod, reqVO.getInspectionMethod())
|
||||||
|
.eqIfPresent(MoldTicketResultsDO::getJudgmentCriteria, reqVO.getJudgmentCriteria())
|
||||||
|
.eqIfPresent(MoldTicketResultsDO::getInspectionResult, reqVO.getInspectionResult())
|
||||||
|
.eqIfPresent(MoldTicketResultsDO::getImages, reqVO.getImages())
|
||||||
|
.eqIfPresent(MoldTicketResultsDO::getRemark, reqVO.getRemark())
|
||||||
|
.betweenIfPresent(MoldTicketResultsDO::getInspectionTime, reqVO.getInspectionTime())
|
||||||
|
.eqIfPresent(MoldTicketResultsDO::getManagementId, reqVO.getManagementId())
|
||||||
|
.betweenIfPresent(MoldTicketResultsDO::getCreateTime, reqVO.getCreateTime())
|
||||||
|
.orderByDesc(MoldTicketResultsDO::getId));
|
||||||
|
}
|
||||||
|
|
||||||
|
List<MoldTicketResultsDO> findByMoldIdAndPlanType(@Param("moldId") Long moldId,@Param("planType") Integer planType);
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue