Merge branch 'plp'
commit
46453c9664
@ -0,0 +1,95 @@
|
||||
package cn.iocoder.yudao.module.mes.controller.admin.zjtask;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.*;
|
||||
import javax.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import cn.iocoder.yudao.module.mes.controller.admin.zjtask.vo.*;
|
||||
import cn.iocoder.yudao.module.mes.dal.dataobject.zjtask.ZjTaskDO;
|
||||
import cn.iocoder.yudao.module.mes.service.zjtask.ZjTaskService;
|
||||
|
||||
@Tag(name = "管理后台 - 质量管理-检验任务")
|
||||
@RestController
|
||||
@RequestMapping("/mes/zj-task")
|
||||
@Validated
|
||||
public class ZjTaskController {
|
||||
|
||||
@Resource
|
||||
private ZjTaskService zjTaskService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建质量管理-检验任务")
|
||||
@PreAuthorize("@ss.hasPermission('mes:zj-task:create')")
|
||||
public CommonResult<Long> createZjTask(@Valid @RequestBody ZjTaskSaveReqVO createReqVO) {
|
||||
return success(zjTaskService.createZjTask(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新质量管理-检验任务")
|
||||
@PreAuthorize("@ss.hasPermission('mes:zj-task:update')")
|
||||
public CommonResult<Boolean> updateZjTask(@Valid @RequestBody ZjTaskSaveReqVO updateReqVO) {
|
||||
zjTaskService.updateZjTask(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除质量管理-检验任务")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('mes:zj-task:delete')")
|
||||
public CommonResult<Boolean> deleteZjTask(@RequestParam("id") Long id) {
|
||||
zjTaskService.deleteZjTask(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得质量管理-检验任务")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('mes:zj-task:query')")
|
||||
public CommonResult<ZjTaskRespVO> getZjTask(@RequestParam("id") Long id) {
|
||||
ZjTaskDO zjTask = zjTaskService.getZjTask(id);
|
||||
return success(BeanUtils.toBean(zjTask, ZjTaskRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得质量管理-检验任务分页")
|
||||
@PreAuthorize("@ss.hasPermission('mes:zj-task:query')")
|
||||
public CommonResult<PageResult<ZjTaskRespVO>> getZjTaskPage(@Valid ZjTaskPageReqVO pageReqVO) {
|
||||
PageResult<ZjTaskDO> pageResult = zjTaskService.getZjTaskPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, ZjTaskRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出质量管理-检验任务 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('mes:zj-task:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportZjTaskExcel(@Valid ZjTaskPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<ZjTaskDO> list = zjTaskService.getZjTaskPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "质量管理-检验任务.xls", "数据", ZjTaskRespVO.class,
|
||||
BeanUtils.toBean(list, ZjTaskRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,68 @@
|
||||
package cn.iocoder.yudao.module.mes.controller.admin.zjtask.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
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 ZjTaskPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "单号")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "名称", example = "王五")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "质检分类", example = "2")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "检验方案id", example = "3630")
|
||||
private Long schemaId;
|
||||
|
||||
@Schema(description = "检验方案名称", example = "赵六")
|
||||
private String schemaName;
|
||||
|
||||
@Schema(description = "备注", example = "你说的对")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "工单")
|
||||
private String ticket;
|
||||
|
||||
@Schema(description = "工序", example = "1")
|
||||
private String orgType;
|
||||
|
||||
@Schema(description = "负责人id", example = "6442")
|
||||
private Long managerId;
|
||||
|
||||
@Schema(description = "负责人名称", example = "张三")
|
||||
private String managerName;
|
||||
|
||||
@Schema(description = "执行人id", example = "10505")
|
||||
private Long executorId;
|
||||
|
||||
@Schema(description = "执行人名称", example = "王五")
|
||||
private String executorName;
|
||||
|
||||
@Schema(description = "状态", example = "1")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "结果")
|
||||
private String result;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
@Schema(description = "执行时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] executeTime;
|
||||
|
||||
}
|
||||
@ -0,0 +1,68 @@
|
||||
package cn.iocoder.yudao.module.mes.controller.admin.zjtask.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.*;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
@Schema(description = "管理后台 - 质量管理-检验任务新增/修改 Request VO")
|
||||
@Data
|
||||
public class ZjTaskSaveReqVO {
|
||||
|
||||
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "31746")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "单号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "单号不能为空")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "名称", example = "王五")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "质检分类", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@NotEmpty(message = "质检分类不能为空")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "检验方案id", requiredMode = Schema.RequiredMode.REQUIRED, example = "3630")
|
||||
@NotNull(message = "检验方案id不能为空")
|
||||
private Long schemaId;
|
||||
|
||||
@Schema(description = "检验方案名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六")
|
||||
@NotEmpty(message = "检验方案名称不能为空")
|
||||
private String schemaName;
|
||||
|
||||
@Schema(description = "备注", example = "你说的对")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "工单", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "工单不能为空")
|
||||
private String ticket;
|
||||
|
||||
@Schema(description = "工序", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotEmpty(message = "工序不能为空")
|
||||
private String orgType;
|
||||
|
||||
@Schema(description = "负责人id", example = "6442")
|
||||
private Long managerId;
|
||||
|
||||
@Schema(description = "负责人名称", example = "张三")
|
||||
private String managerName;
|
||||
|
||||
@Schema(description = "执行人id", example = "10505")
|
||||
private Long executorId;
|
||||
|
||||
@Schema(description = "执行人名称", example = "王五")
|
||||
private String executorName;
|
||||
|
||||
@Schema(description = "状态", example = "1")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "结果")
|
||||
private String result;
|
||||
|
||||
@Schema(description = "执行时间")
|
||||
private LocalDateTime executeTime;
|
||||
|
||||
}
|
||||
@ -0,0 +1,36 @@
|
||||
package cn.iocoder.yudao.module.mes.controller.admin.zjtaskresults.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "管理后台 - 检验任务-检验结果批量更新 Request VO")
|
||||
@Data
|
||||
public class ZjTaskResultsBatchUpdateReqVO {
|
||||
|
||||
@Schema(description = "批量更新的检验结果列表", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "更新列表不能为空")
|
||||
@Valid
|
||||
private List<ResultItem> results;
|
||||
|
||||
/**
|
||||
* 批量更新子项
|
||||
*/
|
||||
@Data
|
||||
public static class ResultItem {
|
||||
@Schema(description = "检验结果ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "8755")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "检验结果 0-待检测 1-检测通过 2-检测不通过", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
private Integer zjResult;
|
||||
|
||||
@Schema(description = "图片路径", example = "/upload/123.jpg")
|
||||
private String images;
|
||||
|
||||
@Schema(description = "任务ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "5389")
|
||||
private Long taskId;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,62 @@
|
||||
package cn.iocoder.yudao.module.mes.controller.admin.zjtaskresults.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
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 ZjTaskResultsPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "检验类型", example = "2")
|
||||
private Long zjType;
|
||||
|
||||
@Schema(description = "名称", example = "张三")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "备注", example = "你说的对")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "作业方式")
|
||||
private String tool;
|
||||
|
||||
@Schema(description = "标准值")
|
||||
private Double standardVal;
|
||||
|
||||
@Schema(description = "单位")
|
||||
private String unit;
|
||||
|
||||
@Schema(description = "上限值")
|
||||
private Double upperVal;
|
||||
|
||||
@Schema(description = "下限值")
|
||||
private Double lowerVal;
|
||||
|
||||
@Schema(description = "检验结果 0-待检测 1-检测通过 2-检测不通过")
|
||||
private Integer zjResult;
|
||||
|
||||
@Schema(description = "图片路径")
|
||||
private String images;
|
||||
|
||||
@Schema(description = "检验时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] zjTime;
|
||||
|
||||
@Schema(description = "任务id", example = "5389")
|
||||
private Long taskId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
@Schema(description = "设备id", example = "23960")
|
||||
private Long deviceId;
|
||||
|
||||
}
|
||||
@ -0,0 +1,75 @@
|
||||
package cn.iocoder.yudao.module.mes.controller.admin.zjtaskresults.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 检验任务-检验结果 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class ZjTaskResultsRespVO {
|
||||
|
||||
@Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "8755")
|
||||
@ExcelProperty("id")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "检验类型", example = "2")
|
||||
@ExcelProperty("检验类型")
|
||||
private Long zjType;
|
||||
|
||||
@Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
|
||||
@ExcelProperty("名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "备注", example = "你说的对")
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "作业方式")
|
||||
@ExcelProperty("作业方式")
|
||||
private String tool;
|
||||
|
||||
@Schema(description = "标准值")
|
||||
@ExcelProperty("标准值")
|
||||
private Double standardVal;
|
||||
|
||||
@Schema(description = "单位")
|
||||
@ExcelProperty("单位")
|
||||
private String unit;
|
||||
|
||||
@Schema(description = "上限值")
|
||||
@ExcelProperty("上限值")
|
||||
private Double upperVal;
|
||||
|
||||
@Schema(description = "下限值")
|
||||
@ExcelProperty("下限值")
|
||||
private Double lowerVal;
|
||||
|
||||
@Schema(description = "检验结果 0-待检测 1-检测通过 2-检测不通过")
|
||||
@ExcelProperty("检验结果 0-待检测 1-检测通过 2-检测不通过")
|
||||
private Integer zjResult;
|
||||
|
||||
@Schema(description = "图片路径")
|
||||
@ExcelProperty("图片路径")
|
||||
private String images;
|
||||
|
||||
@Schema(description = "检验时间")
|
||||
@ExcelProperty("检验时间")
|
||||
private LocalDateTime zjTime;
|
||||
|
||||
@Schema(description = "任务id", example = "5389")
|
||||
@ExcelProperty("任务id")
|
||||
private Long taskId;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "设备id", example = "23960")
|
||||
@ExcelProperty("设备id")
|
||||
private Long deviceId;
|
||||
|
||||
}
|
||||
@ -0,0 +1,57 @@
|
||||
package cn.iocoder.yudao.module.mes.controller.admin.zjtaskresults.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import javax.validation.constraints.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 检验任务-检验结果新增/修改 Request VO")
|
||||
@Data
|
||||
public class ZjTaskResultsSaveReqVO {
|
||||
|
||||
@Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "8755")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "检验类型", example = "2")
|
||||
private Long zjType;
|
||||
|
||||
@Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
|
||||
@NotEmpty(message = "名称不能为空")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "备注", example = "你说的对")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "作业方式")
|
||||
private String tool;
|
||||
|
||||
@Schema(description = "标准值")
|
||||
private Double standardVal;
|
||||
|
||||
@Schema(description = "单位")
|
||||
private String unit;
|
||||
|
||||
@Schema(description = "上限值")
|
||||
private Double upperVal;
|
||||
|
||||
@Schema(description = "下限值")
|
||||
private Double lowerVal;
|
||||
|
||||
@Schema(description = "检验结果 0-待检测 1-检测通过 2-检测不通过")
|
||||
private Integer zjResult;
|
||||
|
||||
@Schema(description = "图片路径")
|
||||
private String images;
|
||||
|
||||
@Schema(description = "检验时间")
|
||||
private LocalDateTime zjTime;
|
||||
|
||||
@Schema(description = "任务id", example = "5389")
|
||||
private Long taskId;
|
||||
|
||||
@Schema(description = "设备id", example = "23960")
|
||||
private Long deviceId;
|
||||
|
||||
}
|
||||
@ -0,0 +1,91 @@
|
||||
package cn.iocoder.yudao.module.mes.dal.dataobject.zjtask;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
/**
|
||||
* 质量管理-检验任务 DO
|
||||
*
|
||||
* @author 必硕科技
|
||||
*/
|
||||
@TableName("mes_zj_task")
|
||||
@KeySequence("mes_zj_task_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class ZjTaskDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 单号
|
||||
*/
|
||||
private String code;
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 质检分类
|
||||
*/
|
||||
private String type;
|
||||
/**
|
||||
* 检验方案id
|
||||
*/
|
||||
private Long schemaId;
|
||||
/**
|
||||
* 检验方案名称
|
||||
*/
|
||||
private String schemaName;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 工单
|
||||
*/
|
||||
private String ticket;
|
||||
/**
|
||||
* 工序
|
||||
*/
|
||||
private String orgType;
|
||||
/**
|
||||
* 负责人id
|
||||
*/
|
||||
private Long managerId;
|
||||
/**
|
||||
* 负责人名称
|
||||
*/
|
||||
private String managerName;
|
||||
/**
|
||||
* 执行人id
|
||||
*/
|
||||
private Long executorId;
|
||||
/**
|
||||
* 执行人名称
|
||||
*/
|
||||
private String executorName;
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* 结果
|
||||
*/
|
||||
private String result;
|
||||
/**
|
||||
* 执行时间
|
||||
*/
|
||||
private LocalDateTime executeTime;
|
||||
|
||||
}
|
||||
@ -0,0 +1,84 @@
|
||||
package cn.iocoder.yudao.module.mes.dal.dataobject.zjtaskresults;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
/**
|
||||
* 检验任务-检验结果 DO
|
||||
*
|
||||
* @author 必硕科技
|
||||
*/
|
||||
@TableName("mes_zj_task_results")
|
||||
@KeySequence("mes_zj_task_results_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class ZjTaskResultsDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 检验类型
|
||||
*/
|
||||
private Long zjType;
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 作业方式
|
||||
*/
|
||||
private String tool;
|
||||
/**
|
||||
* 标准值
|
||||
*/
|
||||
private Double standardVal;
|
||||
/**
|
||||
* 单位
|
||||
*/
|
||||
private String unit;
|
||||
/**
|
||||
* 上限值
|
||||
*/
|
||||
private Double upperVal;
|
||||
/**
|
||||
* 下限值
|
||||
*/
|
||||
private Double lowerVal;
|
||||
/**
|
||||
* 检验结果 0-待检测 1-检测通过 2-检测不通过
|
||||
*/
|
||||
private Integer zjResult;
|
||||
/**
|
||||
* 图片路径
|
||||
*/
|
||||
private String images;
|
||||
/**
|
||||
* 检验时间
|
||||
*/
|
||||
private LocalDateTime zjTime;
|
||||
/**
|
||||
* 任务id
|
||||
*/
|
||||
private Long taskId;
|
||||
/**
|
||||
* 设备id
|
||||
*/
|
||||
private Long deviceId;
|
||||
|
||||
}
|
||||
@ -0,0 +1,40 @@
|
||||
package cn.iocoder.yudao.module.mes.dal.mysql.zjtask;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.mes.dal.dataobject.zjtask.ZjTaskDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import cn.iocoder.yudao.module.mes.controller.admin.zjtask.vo.*;
|
||||
|
||||
/**
|
||||
* 质量管理-检验任务 Mapper
|
||||
*
|
||||
* @author 必硕科技
|
||||
*/
|
||||
@Mapper
|
||||
public interface ZjTaskMapper extends BaseMapperX<ZjTaskDO> {
|
||||
|
||||
default PageResult<ZjTaskDO> selectPage(ZjTaskPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<ZjTaskDO>()
|
||||
.eqIfPresent(ZjTaskDO::getCode, reqVO.getCode())
|
||||
.likeIfPresent(ZjTaskDO::getName, reqVO.getName())
|
||||
.eqIfPresent(ZjTaskDO::getType, reqVO.getType())
|
||||
.eqIfPresent(ZjTaskDO::getSchemaId, reqVO.getSchemaId())
|
||||
.likeIfPresent(ZjTaskDO::getSchemaName, reqVO.getSchemaName())
|
||||
.eqIfPresent(ZjTaskDO::getRemark, reqVO.getRemark())
|
||||
.eqIfPresent(ZjTaskDO::getTicket, reqVO.getTicket())
|
||||
.eqIfPresent(ZjTaskDO::getOrgType, reqVO.getOrgType())
|
||||
.eqIfPresent(ZjTaskDO::getManagerId, reqVO.getManagerId())
|
||||
.likeIfPresent(ZjTaskDO::getManagerName, reqVO.getManagerName())
|
||||
.eqIfPresent(ZjTaskDO::getExecutorId, reqVO.getExecutorId())
|
||||
.likeIfPresent(ZjTaskDO::getExecutorName, reqVO.getExecutorName())
|
||||
.eqIfPresent(ZjTaskDO::getStatus, reqVO.getStatus())
|
||||
.eqIfPresent(ZjTaskDO::getResult, reqVO.getResult())
|
||||
.betweenIfPresent(ZjTaskDO::getCreateTime, reqVO.getCreateTime())
|
||||
.orderByDesc(ZjTaskDO::getId));
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,39 @@
|
||||
package cn.iocoder.yudao.module.mes.dal.mysql.zjtaskresults;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.mes.dal.dataobject.zjtaskresults.ZjTaskResultsDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import cn.iocoder.yudao.module.mes.controller.admin.zjtaskresults.vo.*;
|
||||
|
||||
/**
|
||||
* 检验任务-检验结果 Mapper
|
||||
*
|
||||
* @author 必硕科技
|
||||
*/
|
||||
@Mapper
|
||||
public interface ZjTaskResultsMapper extends BaseMapperX<ZjTaskResultsDO> {
|
||||
|
||||
default PageResult<ZjTaskResultsDO> selectPage(ZjTaskResultsPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<ZjTaskResultsDO>()
|
||||
.eqIfPresent(ZjTaskResultsDO::getZjType, reqVO.getZjType())
|
||||
.likeIfPresent(ZjTaskResultsDO::getName, reqVO.getName())
|
||||
.eqIfPresent(ZjTaskResultsDO::getRemark, reqVO.getRemark())
|
||||
.eqIfPresent(ZjTaskResultsDO::getTool, reqVO.getTool())
|
||||
.eqIfPresent(ZjTaskResultsDO::getStandardVal, reqVO.getStandardVal())
|
||||
.eqIfPresent(ZjTaskResultsDO::getUnit, reqVO.getUnit())
|
||||
.eqIfPresent(ZjTaskResultsDO::getUpperVal, reqVO.getUpperVal())
|
||||
.eqIfPresent(ZjTaskResultsDO::getLowerVal, reqVO.getLowerVal())
|
||||
.eqIfPresent(ZjTaskResultsDO::getZjResult, reqVO.getZjResult())
|
||||
.eqIfPresent(ZjTaskResultsDO::getImages, reqVO.getImages())
|
||||
.betweenIfPresent(ZjTaskResultsDO::getZjTime, reqVO.getZjTime())
|
||||
.eqIfPresent(ZjTaskResultsDO::getTaskId, reqVO.getTaskId())
|
||||
.betweenIfPresent(ZjTaskResultsDO::getCreateTime, reqVO.getCreateTime())
|
||||
.eqIfPresent(ZjTaskResultsDO::getDeviceId, reqVO.getDeviceId())
|
||||
.orderByDesc(ZjTaskResultsDO::getId));
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue