Ver código fonte

矿石分析记录表初始代码

zdz 3 semanas atrás
pai
commit
6cf10cc8ea

+ 169 - 0
jfcloud-aigc-biz/src/main/java/com/github/jfcloud/aigc/mineral/controller/MineralAnalysisTaskController.java

@@ -0,0 +1,169 @@
+/*
+ *    Copyright (c) 2018-2025, jackzhou All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the jfcloud.vip developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: jackzhou (i_amzxj@163.com)
+ */
+
+package com.github.jfcloud.aigc.mineral.controller;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.github.jfcloud.aigc.mineral.dto.MineralAnalysisTaskDTO;
+import com.github.jfcloud.aigc.mineral.entity.MineralAnalysisTask;
+import com.github.jfcloud.aigc.mineral.mapper.MineralAnalysisTaskMapper;
+import com.github.jfcloud.aigc.mineral.service.MineralAnalysisTaskService;
+import com.github.jfcloud.common.core.util.R;
+import com.github.jfcloud.common.excel.annotation.ResponseExcel;
+import com.github.jfcloud.common.log.annotation.SysLog;
+import com.github.jfcloud.web.controller.JfcloudRestController;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * 矿石分析记录表
+ *
+ * @author jackzhou
+ * @date 2025-12-01 16:07:52
+ */
+@RestController
+@RequestMapping("/mineralanalysistask")
+@Tag(description = "mineralanalysistask", name = "矿石分析记录表管理")
+public class MineralAnalysisTaskController extends JfcloudRestController<MineralAnalysisTask, MineralAnalysisTaskDTO, MineralAnalysisTaskService, MineralAnalysisTaskMapper> {
+
+    public MineralAnalysisTaskController(MineralAnalysisTaskService service) {
+        super(service);
+    }
+
+
+    /**
+     * 列表查询
+     *
+     * @return
+     */
+    @Override
+    @Operation(summary = "列表查询", description = "列表查询")
+    @GetMapping("/list")
+    //@PreAuthorize("@pms.hasPermission('mineral_mineralanalysistask_list')")
+    public R list() {
+        return super.list();
+    }
+
+    /**
+     * 分页查询
+     *
+     * @param page                分页对象
+     * @param mineralAnalysisTask 矿石分析记录表
+     * @return
+     */
+    @Override
+    @Operation(summary = "分页查询", description = "分页查询")
+    @GetMapping("/page")
+    //@PreAuthorize("@pms.hasPermission('mineral_mineralanalysistask_page')")
+    public R page(Page page) {
+        return super.page(page);
+    }
+
+
+    /**
+     * 通过id查询矿石分析记录表
+     *
+     * @param id id
+     * @return R
+     */
+    @Override
+    @Operation(summary = "通过id查询", description = "通过id查询")
+    @GetMapping("/{id}")
+    //@PreAuthorize("@pms.hasPermission('mineral_mineralanalysistask_view')")
+    public R getById(@PathVariable("id") java.io.Serializable id) {
+        return super.getById(id);
+    }
+
+    /**
+     * 新增矿石分析记录表
+     *
+     * @param mineralAnalysisTask 矿石分析记录表
+     * @return R
+     */
+    @Override
+    @Operation(summary = "新增矿石分析记录表", description = "新增矿石分析记录表")
+    @SysLog("新增矿石分析记录表")
+    @PostMapping("/save")
+    //@PreAuthorize("@pms.hasPermission('mineral_mineralanalysistask_add')")
+    public R save(@RequestBody @Validated MineralAnalysisTaskDTO mineralAnalysisTask) {
+        return super.save(mineralAnalysisTask);
+    }
+
+    /**
+     * 修改矿石分析记录表
+     *
+     * @param mineralAnalysisTask 矿石分析记录表
+     * @return R
+     */
+    @Operation(summary = "修改矿石分析记录表", description = "修改矿石分析记录表")
+    @SysLog("修改矿石分析记录表")
+    @PostMapping("/edit")
+    @Override
+    //@PreAuthorize("@pms.hasPermission('mineral_mineralanalysistask_edit')")
+    public R update(@RequestBody @Validated MineralAnalysisTaskDTO mineralAnalysisTask) {
+        return super.update(mineralAnalysisTask);
+    }
+
+    /**
+     * 通过id删除矿石分析记录表
+     *
+     * @param id id
+     * @return R
+     */
+    @Override
+    @Operation(summary = "通过id删除矿石分析记录表", description = "通过id删除矿石分析记录表")
+    @SysLog("通过id删除矿石分析记录表")
+    @PostMapping("/delete/{id}")
+    //@PreAuthorize("@pms.hasPermission('mineral_mineralanalysistask_del')")
+    public R removeById(@PathVariable java.io.Serializable id) {
+        return super.removeById(id);
+    }
+
+    /**
+     * 通过id批量删除
+     *
+     * @param ids id列表
+     * @return R
+     */
+    @SysLog("通过id批量删除")
+    @Operation(summary = "通过id批量删除", description = "通过id批量删除")
+    @PostMapping("/delete")
+    //@PreAuthorize("@pms.hasPermission('mineral_mineralanalysistask_dels')")
+    public R removeByIds(@RequestBody List<Serializable> ids) {
+        return super.removeByIds(ids);
+    }
+
+
+    /**
+     * 导出excel 表格
+     *
+     * @param mineralAnalysisTask 查询条件
+     * @return excel 文件流
+     */
+    @Override
+    @ResponseExcel
+    @PostMapping("/export")
+    //@PreAuthorize("@pms.hasPermission('mineral_mineralanalysistask_export')")
+    public void export(@RequestBody MineralAnalysisTaskDTO mineralAnalysisTask) {
+        super.export(mineralAnalysisTask);
+    }
+}

+ 106 - 0
jfcloud-aigc-biz/src/main/java/com/github/jfcloud/aigc/mineral/dto/MineralAnalysisTaskDTO.java

@@ -0,0 +1,106 @@
+/*
+ *    Copyright (c) 2018-2025, jackzhou All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the jfcloud.vip developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: jackzhou (i_amzxj@163.com)
+ */
+
+package com.github.jfcloud.aigc.mineral.dto;
+
+import com.github.jfcloud.common.core.base.JfcloudBaseDTO;
+import com.github.jfcloud.common.core.base.JfcloudProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.time.LocalDateTime;
+
+/**
+ * 矿石分析记录表
+ *
+ * @author jackzhou
+ * @date 2025-12-01 16:07:52
+ */
+@Data
+@Schema(description = "矿石分析记录表")
+public class MineralAnalysisTaskDTO extends JfcloudBaseDTO {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * id
+     */
+    @Schema(description = "id")
+    @JfcloudProperty("id")
+    private Long id;
+    /**
+     * 任务编号
+     */
+    @Schema(description = "任务编号")
+    @JfcloudProperty("任务编号")
+    private String taskCode;
+    /**
+     * 原始图片存储路径
+     */
+    @Schema(description = "原始图片存储路径")
+    @JfcloudProperty("原始图片存储路径")
+    private String image;
+    /**
+     * 选择的模型版本
+     */
+    @Schema(description = "选择的模型版本")
+    @JfcloudProperty("选择的模型版本")
+    private String modelVersion;
+    /**
+     * 置信度阈值(UI滑块0-1)
+     */
+    @Schema(description = "置信度阈值(UI滑块0-1)")
+    @JfcloudProperty("置信度阈值(UI滑块0-1)")
+    private BigDecimal confThreshold;
+    /**
+     * 检测精度(UI下拉框)
+     */
+    @Schema(description = "检测精度(UI下拉框)")
+    @JfcloudProperty("检测精度(UI下拉框)")
+    private String precisionMode;
+    /**
+     * YOLO生成标记图的路径/URL
+     */
+    @Schema(description = "YOLO生成标记图的路径/URL")
+    @JfcloudProperty("YOLO生成标记图的路径/URL")
+    private String resultImage;
+    /**
+     * AI分析简报
+     */
+    @Schema(description = "AI分析简报")
+    @JfcloudProperty("AI分析简报")
+    private String aiSummary;
+    /**
+     * 状态: 0-进行中, 1-成功, 2-失败
+     */
+    @Schema(description = "状态: 0-进行中, 1-成功, 2-失败")
+    @JfcloudProperty("状态: 0-进行中, 1-成功, 2-失败")
+    private String status;
+    /**
+     * 失败时的错误信息
+     */
+    @Schema(description = "失败时的错误信息")
+    @JfcloudProperty("失败时的错误信息")
+    private String errorMsg;
+    /**
+     * 分析完成时间
+     */
+    @Schema(description = "分析完成时间")
+    @JfcloudProperty("分析完成时间")
+    private LocalDateTime finishTime;
+}

+ 123 - 0
jfcloud-aigc-biz/src/main/java/com/github/jfcloud/aigc/mineral/entity/MineralAnalysisTask.java

@@ -0,0 +1,123 @@
+/*
+ *    Copyright (c) 2018-2025, jackzhou All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the jfcloud.vip developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: jackzhou (i_amzxj@163.com)
+ */
+
+package com.github.jfcloud.aigc.mineral.entity;
+
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.github.jfcloud.common.core.base.JfcloudBaseEntity;
+import com.github.jfcloud.common.core.base.JfcloudProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.math.BigDecimal;
+import java.time.LocalDateTime;
+
+/**
+ * 矿石分析记录表
+ *
+ * @author jackzhou
+ * @date 2025-12-01 16:07:52
+ */
+@Data
+@TableName("mineral_analysis_task")
+@EqualsAndHashCode(callSuper = true)
+@Schema(description = "矿石分析记录表")
+public class MineralAnalysisTask extends JfcloudBaseEntity<MineralAnalysisTask> {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * id
+     */
+    @TableId
+
+    @Schema(description = "id")
+    @JfcloudProperty("id")
+    private Long id;
+    /**
+     * 任务编号
+     */
+
+    @Schema(description = "任务编号")
+    @JfcloudProperty("任务编号")
+    private String taskCode;
+    /**
+     * 原始图片存储路径
+     */
+
+    @Schema(description = "原始图片存储路径")
+    @JfcloudProperty("原始图片存储路径")
+    private String image;
+    /**
+     * 选择的模型版本
+     */
+
+    @Schema(description = "选择的模型版本")
+    @JfcloudProperty("选择的模型版本")
+    private String modelVersion;
+    /**
+     * 置信度阈值(UI滑块0-1)
+     */
+
+    @Schema(description = "置信度阈值(UI滑块0-1)")
+    @JfcloudProperty("置信度阈值(UI滑块0-1)")
+    private BigDecimal confThreshold;
+    /**
+     * 检测精度(UI下拉框)
+     */
+
+    @Schema(description = "检测精度(UI下拉框)")
+    @JfcloudProperty("检测精度(UI下拉框)")
+    private String precisionMode;
+    /**
+     * YOLO生成标记图的路径/URL
+     */
+
+    @Schema(description = "YOLO生成标记图的路径/URL")
+    @JfcloudProperty("YOLO生成标记图的路径/URL")
+    private String resultImage;
+    /**
+     * AI分析简报
+     */
+
+    @Schema(description = "AI分析简报")
+    @JfcloudProperty("AI分析简报")
+    private String aiSummary;
+    /**
+     * 状态: 0-进行中, 1-成功, 2-失败
+     */
+
+    @Schema(description = "状态: 0-进行中, 1-成功, 2-失败")
+    @JfcloudProperty("状态: 0-进行中, 1-成功, 2-失败")
+    private String status;
+    /**
+     * 失败时的错误信息
+     */
+
+    @Schema(description = "失败时的错误信息")
+    @JfcloudProperty("失败时的错误信息")
+    private String errorMsg;
+    /**
+     * 分析完成时间
+     */
+
+    @Schema(description = "分析完成时间")
+    @JfcloudProperty("分析完成时间")
+    private LocalDateTime finishTime;
+}

+ 33 - 0
jfcloud-aigc-biz/src/main/java/com/github/jfcloud/aigc/mineral/mapper/MineralAnalysisTaskMapper.java

@@ -0,0 +1,33 @@
+/*
+ *    Copyright (c) 2018-2025, jackzhou All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the jfcloud.vip developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: jackzhou (i_amzxj@163.com)
+ */
+
+package com.github.jfcloud.aigc.mineral.mapper;
+
+import com.github.jfcloud.aigc.mineral.entity.MineralAnalysisTask;
+import com.github.jfcloud.common.data.datascope.JfcloudBaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 矿石分析记录表
+ *
+ * @author jackzhou
+ * @date 2025-12-01 16:07:52
+ */
+@Mapper
+public interface MineralAnalysisTaskMapper extends JfcloudBaseMapper<MineralAnalysisTask> {
+
+}

+ 32 - 0
jfcloud-aigc-biz/src/main/java/com/github/jfcloud/aigc/mineral/service/MineralAnalysisTaskService.java

@@ -0,0 +1,32 @@
+/*
+ *    Copyright (c) 2018-2025, jackzhou All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the jfcloud.vip developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: jackzhou (i_amzxj@163.com)
+ */
+
+package com.github.jfcloud.aigc.mineral.service;
+
+import com.github.jfcloud.aigc.mineral.dto.MineralAnalysisTaskDTO;
+import com.github.jfcloud.aigc.mineral.entity.MineralAnalysisTask;
+import com.github.jfcloud.common.data.service.JfcloudBaseService;
+
+/**
+ * 矿石分析记录表
+ *
+ * @author jackzhou
+ * @date 2025-12-01 16:07:52
+ */
+public interface MineralAnalysisTaskService extends JfcloudBaseService<MineralAnalysisTaskDTO, MineralAnalysisTask> {
+
+}

+ 36 - 0
jfcloud-aigc-biz/src/main/java/com/github/jfcloud/aigc/mineral/service/impl/MineralAnalysisTaskServiceImpl.java

@@ -0,0 +1,36 @@
+/*
+ *    Copyright (c) 2018-2025, jackzhou All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the jfcloud.vip developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: jackzhou (i_amzxj@163.com)
+ */
+package com.github.jfcloud.aigc.mineral.service.impl;
+
+import com.github.jfcloud.aigc.mineral.dto.MineralAnalysisTaskDTO;
+import com.github.jfcloud.aigc.mineral.entity.MineralAnalysisTask;
+import com.github.jfcloud.aigc.mineral.mapper.MineralAnalysisTaskMapper;
+import com.github.jfcloud.aigc.mineral.service.MineralAnalysisTaskService;
+import com.github.jfcloud.common.data.service.impl.JfcloudBaseServiceImpl;
+import lombok.RequiredArgsConstructor;
+import org.springframework.stereotype.Service;
+
+/**
+ * 矿石分析记录表
+ *
+ * @author jackzhou
+ * @date 2025-12-01 16:07:52
+ */
+@Service
+@RequiredArgsConstructor
+public class MineralAnalysisTaskServiceImpl extends JfcloudBaseServiceImpl<MineralAnalysisTaskMapper, MineralAnalysisTaskDTO, MineralAnalysisTask> implements MineralAnalysisTaskService {
+}

+ 49 - 0
jfcloud-aigc-biz/src/main/resources/mapper.aigc/MineralAnalysisTaskMapper.xml

@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  ~
+  ~      Copyright (c) 2018-2025, jackzhou All rights reserved.
+  ~
+  ~  Redistribution and use in source and binary forms, with or without
+  ~  modification, are permitted provided that the following conditions are met:
+  ~
+  ~ Redistributions of source code must retain the above copyright notice,
+  ~  this list of conditions and the following disclaimer.
+  ~  Redistributions in binary form must reproduce the above copyright
+  ~  notice, this list of conditions and the following disclaimer in the
+  ~  documentation and/or other materials provided with the distribution.
+  ~  Neither the name of the jfcloud.vip developer nor the names of its
+  ~  contributors may be used to endorse or promote products derived from
+  ~  this software without specific prior written permission.
+  ~  Author: jackzhou (i_amzxj@163.com)
+  ~
+  -->
+
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="com.github.jfcloud.aigc.mineral.mapper.MineralAnalysisTaskMapper">
+
+    <resultMap id="mineralAnalysisTaskMap" type="com.github.jfcloud.aigc.mineral.entity.MineralAnalysisTask">
+        <id property="id" column="id"/>
+        <result property="taskCode" column="task_code"/>
+        <result property="image" column="image"/>
+        <result property="modelVersion" column="model_version"/>
+        <result property="confThreshold" column="conf_threshold"/>
+        <result property="precisionMode" column="precision_mode"/>
+        <result property="resultImage" column="result_image"/>
+        <result property="aiSummary" column="ai_summary"/>
+        <result property="status" column="status"/>
+        <result property="errorMsg" column="error_msg"/>
+        <result property="finishTime" column="finish_time"/>
+        <result property="createBy" column="create_by"/>
+        <result property="updateBy" column="update_by"/>
+        <result property="createTime" column="create_time"/>
+        <result property="updateTime" column="update_time"/>
+        <result property="delFlag" column="del_flag"/>
+        <result property="tenantId" column="tenant_id"/>
+        <result property="groupIndex" column="group_index"/>
+        <result property="groupPi" column="group_pi"/>
+        <result property="deptId" column="dept_id"/>
+
+    </resultMap>
+</mapper>